Hi ABAP experts
At syntax check I get this error message:
E:Field "RESULT_PACKAGE" is unknown. It is neither defined in one of the tables nor in a "DATA"-statement.
Do you have an idea how to fix this issue?
Thank you.
*$*$ begin of 2nd part global - insert your code only below this line *
... "insert your code here
TABLES: /BIC/AZFC_DS1700.
DATA: ITAB2 TYPE STANDARD TABLE OF /BIC/AZFC_DS1700 WITH HEADER LINE.
DATA: WA LIKE LINE OF ITAB2.
*$*$ end of 2nd part global - insert your code only before this line *
$*$ begin of routine - insert your code only below this line *-*
... "insert your code here
*-- fill table "MONITOR" with values of structure "MONITOR_REC"
*- to make monitor entries
... "to cancel the update process
* raise exception type CX_RSROUT_ABORT.
DATA: ITAB_REFRESH TYPE STANDARD TABLE OF _TY_S_TG_1.
DATA: ITAB_TARGET TYPE STANDARD TABLE OF _TY_S_TG_1.
DATA: WA_TARGET LIKE LINE OF ITAB_TARGET.
DATA : ICOUNT TYPE RSARECORD.
*$*$ end of routine - insert your code only before this line
*$*$ begin of inverse routine - insert your code only below this line*-*
... "insert your code here
* Ensuring the source package is not empty
IF RESULT_PACKAGE IS NOT INITIAL.
ICOUNT = 1.
REFRESH ITAB2.
* Selecting records from IBAN DSO for which
* BANKL and BANKN matches with the same of source package
SELECT /BIC/ZIBAN FROM /BIC/AZFC_DS1700 INTO TABLE ITAB2
FOR ALL ENTRIES IN RESULT_PACKAGE
WHERE /BIC/ZBANKL = RESULT_PACKAGE-/BIC/ZBANKL AND
/BIC/ZBANKN = RESULT_PACKAGE-/BIC/ZBANKN.
* Sorting for optimizing readaccess
SORT ITAB2 BY /BIC/ZBANKL /BIC/ZBANKN.
* Processing Refresh itab_target.
SORT RESULT_PACKAGE BY /BIC/ZBANKL /BIC/ZBANKN /BIC/ZIBAN.
LOOP AT &RP& ASSIGNING <RESULT_FIELDS>.
LOOP AT ITAB2 INTO WA WHERE /BIC/ZBANKL =
<RESULT_FIELDS>-/BIC/ZBANKL AND
/BIC/ZBANKN = <RESULT_FIELDS>-/BIC/ZBANKN.
<RESULT_FIELDS>-/BIC/ZIBAN = WA-/BIC/ZIBAN.
<RESULT_FIELDS>-RECORD = ICOUNT.
ICOUNT = ICOUNT + 1.
APPEND <RESULT_FIELDS> TO ITAB_TARGET.
ENDLOOP.
ENDLOOP.
SORT ITAB_TARGET BY /BIC/ZBANKL /BIC/ZBANKN /BIC/ZIBAN.
REFRESH RESULT_PACKAGE.
RESULT_PACKAGE[] = ITAB_TARGET[].
ENDIF.
*$*$ end of inverse routine - insert your code only before this line *-*