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 - to get payroll data after payroll run

Former Member
0 Kudos

Hi,

there is a Weekly payroll area, Now after the payroll run every week - I need to get all the wage types starting with '7' for the pernr s.

For this i first find out the date (current date - 7 days) and then pass it to FM : HRAR_GET_PAYROLL_PERIOD to get the payroll period - Is this step correct ?

then i read the RGDIR and then the payroll results using FMs. Is this the correct way to do.

Also if i need all the wagetypes starting with '7' is it fine if i read only the RT table.. is there any need to read any other ?

Any help with the correct flow logic ..

1 REPLY 1

MarcinPciak
Active Contributor
0 Kudos

This FM returns correct results, but to be 100% sure do a small test:

- go to se37 -> run this FM to test it

- as you have weekly payroll, there should be around 4 such periods within one month, so you should be getting 4 different BEGDA and ENDDA for different date

- enter dates like 01.07.2009 - BEGDA ENDDA should be 01.07.2009 - 08.07.2009

then 09.07.2009 - BEGA ENDDA should be 09-07.2009 - 16.07.2009

etc

- for all above results there should be same PABRJ PABRP, but these are of no interests

- if you get something like above, this means that FM works fine

Now when you get RGDIR, filter it to get only data where FPBEG = BEGDA and FPEND = ENDDA. This way you will work only with the period you want.

Also if i need all the wagetypes starting with '7' is it fine if i read only the RT table.. is there any need to read any other ?

I usually work with this one, also CRT (Cumulative RT) can store WT. My functional guy, however, says that sometimes they might appear in some other tables like BT, but this I am not sure about.

Regards

Marcin