Skip to Content
0
Oct 16, 2018 at 06:15 AM

New in ABAP 7.5

310 Views

Dear all,

I would like to begin writing in ABAP 7.50.

How can I write the following sample code in new format?

Thanks in advance for your help.

David

SELECT k~ebeln k~lifnr p~ebelp p~matnr p~werks
INTO TABLE lt_ekxo
FROM ekpo AS p INNER JOIN ekko 
ON p~ebeln = k~ebeln
WHERE ebeln = lv_ebeln.
IF sy-subrc EQ 0.
SORT  lt_ekxo BY ebeln ebelp.
ENDIF.

lt_ekxo_tmp = lt_ekxo.
SORT lt_ekxo_tmp BY matnr.
DELETE ADJACENT DUPLICATES FROM lt_ekxo_tmp COMPARING matnr.

IF NOT lt_ekxo_tmp IS INITIAL.
SELECT matnr mtart
INTO TABLE lt_mara
FROM mara
FOR ALL ENTRIES IN lt_ekxo_tmp
WHERE matnr = lt_ekxo_tmp.
IF sy-subrc NE 0.
CLEAR lt_mara.
ENDIF.
ENDIF.