7.40 Corresponding Örnek 1
Bir internal tablo içindeki istenilen alanları , başka bir internal tablo içine atar.
TYPES: BEGIN OF ty_mchb,
matnr TYPE matnr,
werks TYPE werks_d,
lgort TYPE lgort_d,
charg TYPE charg_d,
clabs TYPE labst,
meins TYPE meins,
matkl TYPE matkl,
END OF ty_mchb.
TYPES: ty_tt_mchb TYPE TABLE OF ty_mchb.
TYPES: BEGIN OF ty_parti,
charg TYPE charg_d,
END OF ty_parti.
TYPES: ty_tt_parti TYPE TABLE OF ty_parti.
DATA: lt_parti TYPE ty_tt_parti.
.
.
.
lt_parti = CORRESPONDING #( lt_mchb ).
SORT lt_parti.
DELETE ADJACENT DUPLICATES FROM lt_parti.
IF NOT lt_parti[] IS INITIAL.
SELECT charg zoperlist next_arbpl zstatu FROM zpp_t_0028
INTO TABLE lt_0028
FOR ALL ENTRIES IN lt_parti
WHERE charg EQ lt_parti-charg.
ENDIF.