2020 Apr 07 10:44 AM
Hello together,
is there a new syntax statement to do the following?
LOOP AT lt_tab ASSIGNING <ls_ine> WHERE vbeln = <ls_dlv>-dlv_id.
DELETE lt_tab_1 WHERE vbeln = <ls_dlv_split_request>-vbeln_new.
DELETE lt_tab.
ENDLOOP.
2020 Apr 07 5:55 PM
Excuse me, but there is no relationship between lt_tab and lt_tab_1, is it normal? Or is your question only about DELETE lt_tab?
If your question is about DELETE:
2020 Apr 08 11:15 AM
Here are some examples with the new expressions that could help you with rewriting the code:
" VALUE expression
" New lt_tab_2 has only values from Old lt_tab_1 that are not in lt_tab based on vbeln
TYPES: rty_vbeln TYPE RANGE OF vbeln.
DATA(lt_tab_2) = VALUE tty_tab_1( FOR wa1 IN lt_tab_1
WHERE ( KEY NOT IN VALUE rty_vbeln( FOR wa2 IN lt_tab
( SIGN = 'I' OPTION = 'EQ' LOW = wa2-vbeln ) ) )
( vbeln = wa1-vbeln ) ).
" FILTER expression
" Table lt_tab is filtered by not having a specific value
lt_tab = filter #( lt_tab WHERE vbeln <> <ls_dlv>-dlv_id ).
" Table lt_tab_1 is filtered by values that are not in table lt_tab based on vbeln
lt_tab_1 = filter #( lt_tab_1 EXCEPT in lt_tab where vbeln = vbeln ).
2020 May 13 4:06 PM
coding1407, please follow up on your open question.