Sunday, May 12, 2013
RP-PROVIDE-FROM-FRST - Macro is used to retrieve the first record from internal table and placed in the table header in the given time period.Example:
RP_PROVIDE_FROM_FRST 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.

START-OF-SELECTION.

GET PERNR.
  RP_PROVIDE_FROM_FRST P0006 '2' PN-BEGDA PN-ENDDA.
  IF PNP-SW-FOUND EQ '1'.
    WRITE: / PERNR-PERNR, P0006-ANSSA, PN-BEGDA, PN-ENDDA.
  ELSE.
    REJECT.
  ENDIF.

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.