Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

HR ABAP doubts

abdulazeez12
Active Contributor
0 Kudos

Hii All-

I have a requirement to fetch all the full time/part time active employees from the start date of the reporting period. The report must be able to be run for past and future periods and only include the active employees based on the start date selected.

In the above scenario, should I have to use RP-PROVIDE-FROM-LAST OR use PROVIDE-ENDPROVIDE to fetch the data from INfo types??

Another question is, what report category should I have to use here? How can I assign report category to the report??

I shall reward the helpful answers.

Tx

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Shakir,

First of all you have to assign logical database name say PNP in the attributes of the program. After assigning the logical data base, you can see teh button below with HR REPORT CATEGORY. Click on that and select Master dat(infotypes) radio button. After that go for f4 help to see the existed HR report categories. From that you select one which contains the fields you want. If you are not able to find Hr report category with the fields you want then you need to create your own report category with the fields you want.

If you want to select only active employees

RP-PROVIDE-FROM-LAST p0000 space pn-begda pn-endda.

CHECK P0000-STAT2 = '3'.

note: '3' or some other value based on the values stored in infotype 0000 for the employment status.

if employee is not active then it will skip that employee and selects the next employee.

3 REPLIES 3

Former Member
0 Kudos

HI

PLEASE CHECK Defining a new report category UNDER THE LINK

http://www.atomhr.com/know_preview/hr580_cust_sel_sceen_chp1_46.htm

<b>Reward points</b>

Regards

Former Member
0 Kudos

Hi Shakir,

First of all you have to assign logical database name say PNP in the attributes of the program. After assigning the logical data base, you can see teh button below with HR REPORT CATEGORY. Click on that and select Master dat(infotypes) radio button. After that go for f4 help to see the existed HR report categories. From that you select one which contains the fields you want. If you are not able to find Hr report category with the fields you want then you need to create your own report category with the fields you want.

If you want to select only active employees

RP-PROVIDE-FROM-LAST p0000 space pn-begda pn-endda.

CHECK P0000-STAT2 = '3'.

note: '3' or some other value based on the values stored in infotype 0000 for the employment status.

if employee is not active then it will skip that employee and selects the next employee.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Use LDB in the attrribute of program.Make sure in selection screen active (3) is selected for status(Logic for group/subgroup).Otherwise, include the logic in Initialization so that it is by default.Then you make sure that the users don't change it.For that in at selection-screen output,you can loop at screen.In that and check the screen-name and then change screen-input accordingly.

Then in program, you can try like this.

tables pernr.

infotypes : 0001, 0000, 0002.

start-of-selection.

get pernr.

rp-provide-from-last p0000 space pn-endda pn-begda.

...

end-of-selection.

Another way is is use select statement and for all entries and then while selecting from pa0000 make sure in the where condition stat2 = 3.Similarly write condition for group and employee subgroup.