Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

Provide statement

Former Member

Former Member
0 Kudos

RP_PROVIDE_FROM_LAST can only be used to select 1 infotype (i.e.

table record) at a time. It uses the selection dates specified and

returns the correct record for those dates.

Former Member
0 Kudos

The macro RP_PROVIDE_FROM_LAST is used to

retrieve the last entry of the current period in the table header entry from an internal

infotype table (here p0001 and p0002).

rp_provide_from_last p0032 space from-date to-date will return the last record of infty 32 valid between from-date and to-date, rp_provide_from_frst the first.

You might want to check whether reading was successful, to do so use pnp-sw-found (pnp-sw-found = '1' means reading was successful.)

Please note, that the macros will only provide data, that has been selected by the logical database pnp before, so if you make restrictions regarding validity date on the selection-screen of pnp.

Former Member
0 Kudos

Hi Jayasree,

This is a predifined Macro, RP-PROVIDE-FROM-LAST is used to get required record into the header line of the internal table.

You need to pass the follwing Parameters to this Macro.

Subtype: If the Infotype has any subtypes, pass the required subtype. Else pass SPACE as the Subtype.

PN-BEGDA and PN-ENDDA are the dates selected on the selection screen.

Say you need to get the latest record from Infotype 0000


If PNP-SW-F0UND = 1.

*--Atleast one record found

Move P0000 to your Final Internal table.


Hope you r cleared with the Provide Statement.