Application Development and Automation 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: 
Read only

Macro

Former Member
0 Likes
958

Hi Gurus,

What is the use of the following Macros in ABAP HR

rp_provide_from_frst

rp_provide_from_last

and what is the difference between them?

Points will be awarded.

Thanks

SC

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
925

Hi,

1-) RP_PROVIDE_FROM_FIRST

This macro analyzes the infotype data records that were transferred in an

internal table to the macro with regard to the specified period.

If no data record exists in the specified period, the PNP_SW_FOUND

global switch is set to 0. otherwise it has the value 1.

2-) RP_PROVIDE_FROM_LAST

It places the last data record that is valid in the specified period ( the data

record with the highest ENDDA).

****do reward if usefull

regards,

vijay

5 REPLIES 5
Read only

Former Member
0 Likes
925

Hi

In HR for a single employee lot of records will be stored based on dates.

to fetch the first and latest these are used.

rp_provide_from_frst

is used to fetch the first record for that pernr no

rp_provide_from_last

is used to get the latest record from the infotype for that pernr.

These are use along with PNP LDB attachment to the program and using the command

GET PERNR .

and after that we have to write these statements.

Reward points if useful

Regards

Anji

Read only

Former Member
0 Likes
925

hi,

following are some of the macros that are mostly used in SAP HR

RP_PROVIDE_FROM_LAST

RP_PROVIDE_FROM_FIRST

RP_SET_DATA_INTERVAL

RP_READ_INFOTYPE

The PR_PROVIDE_FROM_LAST macro writes the last valid record in the data selection period to the header line of the internal info type table.

You can use the function module HR_READ_INFOTYPE to read the personnel data in reports which do not use an HR logical database

go through FM mentioned above it will solve your problem,

don't forget to reward points,

cheers

Read only

Former Member
0 Likes
926

Hi,

1-) RP_PROVIDE_FROM_FIRST

This macro analyzes the infotype data records that were transferred in an

internal table to the macro with regard to the specified period.

If no data record exists in the specified period, the PNP_SW_FOUND

global switch is set to 0. otherwise it has the value 1.

2-) RP_PROVIDE_FROM_LAST

It places the last data record that is valid in the specified period ( the data

record with the highest ENDDA).

****do reward if usefull

regards,

vijay

Read only

Former Member
0 Likes
925

Hi Gurus,

Thanks for all for quick reponse. Can you tell me the description of another macro

pnp-sw-found? Where we have to use this macro?

Thanks

SC

Read only

0 Likes
925

Hi

Used similar to SY-SUBRC check in the HR programming.

Get pernr.

rp_provode_from_last P0001 .......

if pnp-sw-found = 0.

write: p0001-pernr.

else.

reject.

endif.

Reward points if useful

Regards

Anji