You are on page 1of 2

Rutina Final:

TYPES:
BEGIN OF ty_ExisteReg_tab,
/BIC/ZDP_CH074 TYPE /BIC/OIZDP_CH074,
END OF ty_ExisteReg_tab.

DATA: it_ExisteReg_tab TYPE STANDARD TABLE OF


ty_ExisteReg_tab,
g_WORKAREA TYPE ty_ExisteReg_tab.

*$*$ end of 2nd part global - insert your code only before this line *

*---------------------------------------------------------------------*
* CLASS routine IMPLEMENTATION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform IMPLEMENTATION.

*----------------------------------------------------------------------*
* Method end_routine
*----------------------------------------------------------------------*
* Calculation of result package via end routine.
* Note: Update of target fields depends on rule assignment in
* transformation editor. Only fields that have a rule assigned,
* are updated to the data target.
*----------------------------------------------------------------------*
* <-> result package
*----------------------------------------------------------------------*
METHOD end_routine.
*=== Segments ===

FIELD-SYMBOLS:
<RESULT_FIELDS> TYPE _ty_s_TG_1.

DATA:
MONITOR_REC TYPE rstmonitor.

*$*$ begin of routine - insert your code only below this line *-*
... "insert your code here

SELECT /BIC/ZDP_CH074
INTO TABLE it_ExisteReg_tab
FROM /BIC/PZDP_CH074
FOR ALL ENTRIES IN RESULT_PACKAGE
WHERE /BIC/ZDP_CH074 = RESULT_PACKAGE-/BIC/ZDP_CH074.
*
LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.

CLEAR g_WORKAREA.
READ TABLE it_ExisteReg_tab INTO g_WORKAREA
WITH
KEY
/BIC/ZDP_CH074 = <RESULT_FIELDS>-/BIC/ZDP_CH074.

IF SY-SUBRC = 0.
<RESULT_FIELDS>-/BIC/ZDP_CH083 = 1.
ENDIF.

ENDLOOP.

You might also like