After selecting function module RP_FILL_WAGE_TYPE_TABLE_EXT, the headers of tables P0001, P0007, and P0008 no longer contain the value which was there prior to selection; instead, it contains the last table entry.
Cause and prerequisitesIn functon module RP_FILL_WAGE_TYPE_TABLE_EXT, a LOOP is performed via tables PP0001, PP0007, and PP0008. Because the tables are copied by reference to the function module, the respective last entries are contained in the header when you exit the LOOP.
SolutionIn Function module RP_FILL_WAGE_TYPE_TABLE_EXT, enter the line
LOCAL: PP0001, PP0007, PP0008.
FUNCTION RP_FILL_WAGE_TYPE_TABLE_EXT.
*"--------------------------------------------------------------
*"Local interface:
*" IMPORTING
*" APPLI LIKE PINDB-ANWDG DEFAULT 'E'
*" BEGDA LIKE PREL-BEGDA DEFAULT 01010000
*" ENDDA LIKE PREL-ENDDA DEFAULT 31129999
*" INFTY LIKE PREL-INFTY DEFAULT '0008'
*" OBJPS LIKE PREL-OBJPS DEFAULT ' '
*" PERNR LIKE PREL-PERNR
*" SUBTY LIKE PREL-SUBTY DEFAULT '0 '
*" TABLES
*" PP0001 STRUCTURE P0001
*" PP0007 STRUCTURE P0007
*" PP0008 STRUCTURE P0008
*" PPBWLA STRUCTURE PBWLA
*" EXCEPTIONS
*" ERROR_AT_INDIRECT_EVALUATION
*"---------------------------------------------------------------
* new output
LOCAL: P0001, P0007, P0008. "QEAK102869
LOCAL: PP0001, PP0007, PP0008. "YREK135861 --> new
CLEAR PPBWLA. REFRESH PPBWLA.
*save import-parameters
MOVE PERNR TO PINDB-PERNR.
...
No comments:
Post a Comment