Code: Alles auswählen.
PROGRAM UPDATE_ROUTINE.
*$*$ begin of global - insert your declaration only below this line *-*
DAtA: WA_DP TYPE /BIC/CS8ZSD_SCL.
DATA: g_check type c.
DATA: l_itab_ods TYPE STANDARD TABLE OF /BIC/AZBW_PGMI00.
*$*$ end of global - insert your declaration only before this line *-*
FORM startup
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
DATA_PACKAGE STRUCTURE /BIC/CS8ZSD_SCL
USING RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
*$*$ begin of routine - insert your code only below this line *-*
* fill the internal table "MONITOR", to make monitor entries
TYPES:
BEGIN OF DATA_PACKAGE_STRUCTURE.
INCLUDE STRUCTURE /BIC/AZBW_PGMI00.
TYPES: l_recno LIKE sy-tabix,
END OF DATA_PACKAGE_STRUCTURE.
DATA: l_wa_dp TYPE DATA_PACKAGE_STRUCTURE.
DATA: l_itab_dp TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE.
DATA: l_lines TYPE I.
DATA: l_wa_ods TYPE /BIC/AZBW_PGMI00.
IF g_check <> 'x'.
SELECT * FROM /BIC/AZBW_PGMI00 INTO TABLE l_itab_ods.
move 'x' to g_check.
ENDIF.
LOOP AT DATA_PACKAGE INTO l_wa_dp.
LOOP AT l_itab_ods INTO l_wa_ods.
* WHERE /BIC/ZNRMIT = l_wa_dp-/BIC/ZNRMIT.
if l_wa_ods-/BIC/ZNRMIT = l_wa_dp-/BIC/ZNRMIT.
l_wa_dp-/BIC/ZPRGRP = l_wa_ods-/BIC/ZPRGRP.
APPEND l_wa_dp TO l_itab_dp .
ENDIF.
ENDLOOP.
ENDLOOP.
REFRESH DATA_PACKAGE.
DATA_PACKAGE[] = l_itab_dp[].
DESCRIBE TABLE l_itab_dp LINES l_lines.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.
*$*$ end of routine - insert your code only before this line *-*
*
ENDFORM.