Code: Alles auswählen.
lt_comord = gt_csdp.
sort lt_comord by j_3acomord gstrs.
delete ADJACENT DUPLICATES FROM lt_comord COMPARING j_3acomord.
delete lt_comord where j_3acomord = ' '.
sort gt_csdp by j_3acomord gstrs.
LOOP AT lt_comord ASSIGNING <ls_comord>.
select * from afko into table lt_int
where j_3acomord = <ls_comord>-j_3acomord.
if lt_int is NOT INITIAL.
LOOP AT lt_int ASSIGNING <ls_int> where gstrs <> <ls_comord>-gstrs.
if sy-subrc = 0.
LOOP AT gt_csdp ASSIGNING <ls_csdp> where j_3acomord = <ls_comord>-j_3acomord.
if sy-subrc = 0.
clear <ls_csdp>-gstrs.
endif.
ENDLOOP.
exit.
endif.
ENDLOOP.
endif.
endloop.
Code: Alles auswählen.
lt_comord = gt_csdp.
sort lt_comord by j_3acomord gstrs.
delete ADJACENT DUPLICATES FROM lt_comord COMPARING j_3acomord.
delete lt_comord where j_3acomord = ' '.
sort gt_csdp by j_3acomord gstrs.
check lt_comord is not initial.
select * from afko appending table lt_int
for all entries in lt_comord
where j_3acomord = lt_comord-j_3acomord.
LOOP AT lt_comord ASSIGNING <ls_comord>.
LOOP AT lt_int ASSIGNING <ls_int> where j_3acomord = <ls_comord>-j_3acomord
AND gstrs <> <ls_comord>-gstrs.
LOOP AT gt_csdp ASSIGNING <ls_csdp> where j_3acomord = <ls_comord>-j_3acomord.
clear <ls_csdp>-gstrs.
ENDLOOP.
EXIT.
ENDLOOP
ENDLOOP.
Code: Alles auswählen.
SORT itab BY feld1 feld2.
READ TABLE itab TRANSPORTING NO FIELDS BINARY SEARCH WITH KEY feld1 = 1 feld2 = 2.
IF sy-subrc EQ 0.
ld_index = sy-tabix.
LOOP AT itab ASSIGNING <line> FROM ld_index.
IF <line>-feld1 NE 1 OR <line>-feld2 NE 2.
exit.
ENDIF.
* Verarbeitung
ENDLOOP.
ENDIF.