‎2007 May 18 7:37 AM
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
‎2007 May 18 7:44 AM
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
‎2007 May 18 7:40 AM
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
‎2007 May 18 7:43 AM
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
‎2007 May 18 7:44 AM
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
‎2007 May 18 8:03 AM
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
‎2007 May 18 8:06 AM
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