Sunday, May 12, 2013
RP-PROVIDE-FROM-LAST - Read latest record
Macro is used to retrieve the last(latest) record from internal table and placed in the table header in the given time period.
Example:
RP_PROVIDE_FROM_LAST P0006 '2' PN-BEGDA PN-ENDDA.
Example:
RP_PROVIDE_FROM_LAST P0006 '2' PN-BEGDA PN-ENDDA.
Inputs
|
P0006
|
Internal table
|
2
|
Subtype
|
|
PN-BEGDA
|
Start date
|
|
PN-ENDDA
|
End date
|
|
Output
|
PNP-SW-FOUND
|
'1' - if there is any matching entry in the infotype table in
the given time period
|
PNP-SW-FOUND
|
'0' - if there is no matching entry in the infotype table in the
given time period
|
Sample program
REPORT ZTEST_NOTEPAD. TABLES: PERNR. INFOTYPES: 0006. GET PERNR. RP_PROVIDE_FROM_LAST P0006 '2' PN-BEGDA PN-ENDDA IF PNP-SW-FOUND EQ '1'. WRITE: / PERNR-PERNR, P0006-ANSSA, PN-BEGDA, PN-ENDDA. ELSE. REJECT. ENDIF.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
Thanks for the nice explanation
ReplyDelete