‎2006 Dec 08 10:46 AM
if data is fetched into pernr structure according to the selection screen criteria what is the need for seperate tables p0003 or p0006.....
Kindly explain the entire flow logic of the foll .code:
tables :pernr.
infotypes:0001,0002,0006.....
get pernr.
provide * from p0002
from p0006....
between pn-begda and pn-endda.
where p0006-subty = '1'.
write : /......
end provide.
iare pxxxx tables or structures and why are they used if data is getting fetched into pernr table
answers will be rewarded
‎2006 Dec 08 10:49 AM
These are structures only, but after get pernr event, these p0001... are automatically filled with all data.At run time check with debugging in p0001[]. you need get and add into our internal tables, using provide * or rp_provide macro.
‎2006 Dec 08 10:49 AM
Hi Rohan,
I guess in pernr structure you will not get all the details regarding particular infotype . To get all the details you have to go with the infotypes .
Rewards points if it is helpful.
Rewards,
Kiran i
‎2006 Dec 08 11:25 AM
Hi Rohan,
Seems you are new to HR ABAP rather new to SAP HR.
These are some basic details or HR ABAP. This may help you understand the concept.
PERNR is called as Personal Number in SAP-HR and all the details related to the personal number is logically grouped together and stored on a time framed basis within an INFOTYPE.
So Consider you are an Employee of an Organization ABC. And Your Personal No is 1000. So your address related info needs to be saved. All address related info will be stored in a Infotype where ur address details will be on a timelined basis. This you consider as one INFOTYPE for your PERNR.
Now coming back to the code you have given.
Once you encounter GET PERNR. This event fills all the Infotypes declared with the INFOTYPE statement for the pernr, one by one all the pernr in the PERNR table is used in a iterative manner.
Now the PROVIDE statement filters the infotype records based on the PN-BEGDA and PN-ENDDA which is the selection period selected on the selection screen.
Hope this might have helped you little bit.
If still you have confusion revert back ..else award reward points
Regards,
Mayank