Create HR Report Category in SAP

2
882

Creating / 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.

 

rep_cat8

 

 

The steps for Creating/Using Report category can be defined as follows:

1.  Create a program using the transaction SE38. 

 

rep_cat1

 

Provide the logical database name as PNP. Click on SAVE. 

 

2. Then again follow this menu path—>GOTO—->ATTRIBUTES.

 

rep_cat2

 

 

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

 

rep_cat3

 

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

 

rep_cat4

 

 

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        

rep_cat5

Then save it under a transport request.

Click on allowable selection criteria—>choose enter—-> new entries.

rep_cat6

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.

rep_cat7

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.

rep_cat8

 

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 .

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here