Create HR Report Category in SAP
Posted by Admin, under ABAP HR, Report, Selection-Screen, TutorialCreating / Maintaining a Report Category is one of the important task in ABAP HR when handling Logical Databases. Report Category provides an added flexibility in term of field selection to be displayed on screen and the handling of fields in the back-end.

The steps for Creating/Using Report category can be defined as follows:
1. Create a program using the transaction SE38.

Provide the logical database name as PNP. Click on SAVE.
2. Then again follow this menu path—>GOTO—->ATTRIBUTES.

3. Click on the button HR report category to use the existing report category.

Select the radio button “Master Data (Infotypes)”.

Creating HR report category
1. Click on HR report category
Give name of the HR report category to be create like ____0001(4 underscores 3 zeros 1) here follow the standards for creating the HR report category.
To create new HR report category, click on new entries
Give the report category name : ____0002 (this is an example )
Description : this is test report category

Then save it under a transport request.
Click on allowable selection criteria—>choose enter—-> new entries.

Get the fields from select option field with F4 help and give the values to be appeared in the selection screen of the LDB you want.

Save it.
Using Report Category in the LDB
If the report category is space, it means there is nothing given in the HR report category.
The output screen will be like this…with more field options.

If the report category is
a) _____000 (5 underscores 3 zeros no gap) No LDB selection screen is displayed. It shows a clear screen.
b) _____001 (5 underscores 2 zeros 1 no gap) only personnel number with out search help
c) _____003 (5 underscores 2 zeros 3 no gap) personnel number, Employment status, Payroll area,Pers.area/subarea/cost center
Few sample programs:
1) Program for understanding the PNP LDB with report category _____001.
report zpnpldb .
INFOTYPES: 0001.
tables : pernr .
GET PERNR.
PROVIDE * FROM P0001 BETWEEN PN-BEGDA AND PN-ENDDA.
WRITE: / P0001-PERNR,
P0001-STELL,
P0001-BEGDA,
P0001-ENDDA.
ENDPROVIDE.
TABLES: PERNR.
INFOTYPES: 0001.
GET PERNR.
RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA .
IF PNP-SW-FOUND = 1.
WRITE: / PERNR-PERNR, P0001-STELL, PN-BEGDA, PN-ENDDA.
ELSE.
REJECT.
ENDIF.
2) This is a simple program for understanding the PNP LDB with report category space or with no report category.
report zpnpldb .
tables : pernr .
INFOTYPES: 2001 MODE N.
initialization .
*pnpbegda = sy-datum - 30 .
*pnpendda = sy-datum .
pnppernr-sign = 'I'.
pnppernr-option = 'EQ' .
pnppernr-low = '1000'.
append pnppernr.
pnppernr-low = '1001'.
append pnppernr.
pnppernr-low = '1002'.
append pnppernr.
pnppernr-low = '1003'.
append pnppernr.
start-of-selection .
GET PERNR.
RP_READ_ALL_TIME_ITY PN-BEGDA PN-ENDDA.
LOOP AT P2001.
WRITE: / p2001-pernr , p2001-begda, p2001-endda, P2001-ABWTG.
ENDLOOP.
end-of-selection .
You might also be interested in these posts:

I like that you
think. Thank you for share very
Good
Post a Comment