Provide the Last Entry in the Period 
Use
Use the following programming utility to place the last entry in a required period (this can be a for a subtype) in the table header entry from an internal infotype table.
Macro: RP_PROVIDE_FROM_LAST
You define the macro using the keyword INFOTYPES.
You use macro RP_PROVIDE_FROM_LAST in programs for the logical databases PNP and PAP where the last data record for a period (can be a subtype) is read from an infotype table. The infotype table has been filled earlier (for example, with GET PERNR or RP_READ_INFOTYPE). This macro is only helpful if the infotype (or subtype) has time constraint 1 or 2.
Prerequisites
Features
The macro RP_PROVIDE_FROM_LAST makes sure that the last entry for a specified period is placed in the table header entry of the report output list.
Parameters
RP_PROVIDE_FROM_LAST inftytab subty beg end
IN : |
1) Name of the internal table |
|
2) Subtype required or SPACE if no subtype is being specified | |
|
3) Validity begin date of the time interval | |
|
4) Validity end date of the time interval | |
OUT: |
1) PNP-SW-FOUND: has the value 0 if there is no matching entry in the infotype table in the given time period. Otherwise it has the value 1. |
|
2) The matching table header entry if PNP-SW-FOUND = 1 orthe cleared table header entry if PNP-SW-FOUND = 0 |
Check
None
Example
(RP_PROVIDE_FROM_LAST inftytab subty beg end)

The module PROVIDE-FROM-FINAL, which is not implemented, is a special case of PROVIDE-FROM-LAST:
PROVIDE-FROM-FINAL inftytab subty beg end =
RP_PROVIDE_FROM_LAST inftytab subty end end