10-15-2008 5:53 AM
Hi all,
Can any one please explain me what his line would do?
rp_provide_from_last p0001 space pn-begda pn-endda.
I know p0001[] is itab and p0001 its wa but I cantunderstand what it does.?
Thanks in advance.
10-15-2008 5:57 AM
HI
http://help.sap.com/saphelp_45b/helpdata/en/60/d8bc17576311d189270000e8322f96/content.htm
Check the above link
Reagrds
Pavan
10-15-2008 5:57 AM
Please check the link below
http://help.sap.com/saphelp_47x200/helpdata/en/4f/d527e1575e11d189270000e8322f96/content.htm
the macro rp_provide_from_last fetches the last record in the date range(parameters 3 and 4) into the header of the internal table, please check the definition of this macro in the database table TRMAC.
10-15-2008 8:09 AM
in your example:
rp_provide_from_last p0001 space pn-begda pn-endda.
rp_provide_from_last is a macro which will get you latest record from internal table p0001, it will place the fetched record in the header of P0001.
space is placeholder for subtype, there is no subtype in infotype 0001 so thats why we put 'space' here.
pn-begda and pn-endda are the date ranges in which the latest record will be fetched.
P0001 will be populated with all records of current pernr. so basically we are looking for latest record in the dates that user provides on the selection screen.
Hope it helps.
Thanks.