2022 Apr 20 11:51 AM
Dear all,
Is there another way to write the following code using 7.5?
LOOP AT lt_dfies ASSIGNING FIELD-SYMBOL(<lfs_dfies>).
IF <lfs_dfies>-keyflag NE 'X'.
EXIT.
ENDIF.
CASE <lfs_dfies>-fieldname.
WHEN 'MANDT'.
CONTINUE.
WHEN OTHERS.
lt_fcat = VALUE #( BASE lt_fcat ( fieldname = <lfs_dfies>-fieldname
tabname = ls_t681-kotab )
).
ENDCASE.
ENDLOOP.
SPAN {
font-family: "Courier New";
font-size: 10pt;
color: #000000;
background: #FFFFFF;
}.L0S31 {
font-style: italic;
color: #808080;
}.L0S33 {
color: #4DA619;
}.L0S52 {
color: #0000FF;
}.L0S55 {
color: #800080;
}.L0S70 {
color: #808080;
}
Thanks in advance for your help.
David
2022 Apr 20 12:29 PM
something like that?
lt_fcat = VALUE #( FOR <lfs_dfies> IN lt_dfies
WHERE ( keyflag = 'X' AND fieldname <> 'MANDT' )
( fieldname = <lfs_dfies>-fieldname
tabname = ls_t681-kotab ) ).
NB: I don't call that optimization, I call that "legibility".
2022 Apr 20 2:15 PM
Hi Sandra,
Thanks it helps me a lot to understand the new coding.
David