Code: Alles auswählen.
DATA: lt_y5cxic_fcodes_ma TYPE TABLE OF y5cxic_fcodes_ma,
ls_y5cxic_fcodes_ma TYPE y5cxic_fcodes_ma.
DATA: BEGIN OF key_struc,
mandt TYPE y5cxic_fcodes_ma-mandt,
GSART TYPE y5cxic_fcodes_ma-GSART,
SBEWART TYPE y5cxic_fcodes_ma-SBEWART,
AMOUNT_TYPE TYPE y5cxic_fcodes_ma-AMOUNT_TYPE,
DEBIT_CREDIT TYPE y5cxic_fcodes_ma-DEBIT_CREDIT,
FLAG_STORNO TYPE y5cxic_fcodes_ma-FLAG_STORNO,
FLAG_ABWKTO_REF TYPE y5cxic_fcodes_ma-FLAG_ABWKTO_REF,
FLAG_FREMDWAEHRU TYPE y5cxic_fcodes_ma-FLAG_FREMDWAEHRU,
GUELTIG_AB TYPE y5cxic_fcodes_ma-GUELTIG_AB,
END OF key_struc.
SELECT * FROM y5cxic_fcodes_ma INTO TABLE lt_y5cxic_fcodes_ma.
SORT lt_y5cxic_fcodes_ma.
*Schlüsselfelder wurden gefunden
LOOP AT p_lt_table_ma INTO ls_y5cxic_fcodes_ma.
READ TABLE lt_y5cxic_fcodes_ma TRANSPORTING NO FIELDS
WITH KEY key_struc BINARY SEARCH.
IF sy-subrc EQ 0. "Fehler
WRITE: / '___________ gefunden'.
ELSEIF sy-subrc EQ 4.
WRITE: / '___________NO DATA'.
* break XXKGOEB.
SKIP.
ENDIF.
ENDLOOP.
ENDIF.