‎2007 May 07 4:54 PM
Hallow
I wont to bring data from rp_provide_from_last for all dates
I use <b>pnpce</b> and in pnpbegda & endda I write between <b>1.1.2007 -> 7.4.07</b> but the data from infotype 0022 is for all time so I wont bring him no meter what is the date the user choose.
how can i avoid dates in provide or choose all.
I try like that but it dont bring me anythihng what can I do ?
regards
<b>rp_provide_from_last t_0022 ' ' '18000101' '99991231'.</b>
*pnpbegda pnpendda
‎2007 May 07 6:48 PM
Hi there. When you use the statement GET PERNR along with the logical database, the infotype is automatically filled with all records belonging to that pernr. So by looping at p0022 you are getting all of the records, no matter what date. You only want to use the macro RP_PROVIDE_FROM_LAST if you are looking for the single most recent record. If you want to look at multiple records within a date range, then you could use
LOOP AT p0022 WHERE endda >= '20070101' AND endda <= '20070407'.
do your processing here
ENDLOOP.
If you don't want to worry about dates at all, just use
LOOP AT p0022.
do your processing here
ENDLOOP.
- April King
‎2007 May 07 4:59 PM
use the p0022 loop instead..
loop at p0022 where endda ge pn-ebgda
and begda le pn-endda.
* here you'e all the records within the date range one by one
* with each loop pass
endloop.
~Suresh
‎2007 May 07 5:44 PM
Hi
the Macros
Rp_provide_from_last and Rp_provide_from_first are used to get the Last and first records only
they won't get multiple records
to get the multiple records loop the infotype and use .
Date specifications data will be in PA0041
Infotype 22 contains Education data.
Reward Points if useful
Regards
Anji
‎2007 May 07 6:48 PM
Hi there. When you use the statement GET PERNR along with the logical database, the infotype is automatically filled with all records belonging to that pernr. So by looping at p0022 you are getting all of the records, no matter what date. You only want to use the macro RP_PROVIDE_FROM_LAST if you are looking for the single most recent record. If you want to look at multiple records within a date range, then you could use
LOOP AT p0022 WHERE endda >= '20070101' AND endda <= '20070407'.
do your processing here
ENDLOOP.
If you don't want to worry about dates at all, just use
LOOP AT p0022.
do your processing here
ENDLOOP.
- April King