Macro not working
I have written a program by using macro "rp_read_all_time_ity" . But when i execute this program
no records were fetched from this macro.
I have also tested this macro in another program where it is already used and in that program it works fine.
Can any body give me solution for this.
Edited by: UNMESH DESHPANDE on Sep 11, 2008 11:27 AM
<Has nothing to do with ABAP Objects - moved to ABAP General. Please choose your forums more carefully in future>
Edited by: Mike Pokraka on Sep 11, 2008 11:34 PM
Saquib Khan, PMP replied
Only in PNP database reports under GET PERNR, because the personnel number for which data is being read comes from field PERNR-PERNR, while the field being used is PNP-SW-AUTH-SKIPPED-RECORD.
(RP_READ_ALL_TIME_ITY beg end) DATA: BEGDA LIKE P2001-BEGDA, ENDDA LIKE P2001-ENDDA. INFOTYPES: 0000, 0001, 0002, ... 2001 MODE N, 2002 MODE N, ... GET PERNR. BEGDA = '19900101'. ENDDA = '19900131'. RP_READ_ALL_TIME_ITY BEGDA ENDDA. IF PNP-SW-AUTH-SKIPPED-RECORD NE '0'. WRITE: / 'Authorization for time data missing'. WRITE: / 'for personnel number', PERNR-PERNR. REJECT. ENDIF.
This RMAC module can be used when, for example, the time infotypes were originally defined in MODE N. This was done because the time data (from LOW-DATE to HIGH-DATE) might not all have fitted into the buffer. Now, however, they are read with shorter intervals (for example, in RPCALCx0 with payroll periods).
-Due to the large amount of data in HR, the infotypes 2000 u2013 2999 should not be read when GET PERNR occurs. Therefore, these infotypes are declared with the enhancement MODE N.
-As a result, the infotype tables under GET PERNR are not filled. The time infotype tables are filled subsequently using the macro RP_READ_ALL_TIME_ITY, but only for the time interval specified by PN-BEGDA and PN-ENDDA.