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

help in dates

Former Member
0 Likes
522

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 don’t bring me anythihng what can I do ?

regards

<b>rp_provide_from_last t_0022 ' ' '18000101' '99991231'.</b>

*pnpbegda pnpendda

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
470

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

3 REPLIES 3
Read only

suresh_datti
Active Contributor
0 Likes
470

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

Read only

Former Member
0 Likes
470

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

Read only

Former Member
0 Likes
471

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