2009 Jan 03 9:22 PM
HI,
There is a way to write this short code in better way ?
what is disturb is the number 2 and maybe the exit.
Best Regards
lv_extract_tabix = lines( lt_dupl ).
IF lv_extract_tabix GE 2.
EXIT.
ENDIF.
2009 Jan 03 10:58 PM
Hello Michael
Without knowing the requirements it is somewhat difficult to rewrite the coding. I assume you want to check whether the itab has at least a given number of entries.
CONSTANTS:
gc_min_lines TYPE i value '2'.
...
READ TABLE lt_dupl TRANSPORTING NO FIELDS INDEX gc_min_lines.
CHECK ( syst-subrc = 0 ).
Regards
Uwe
HI,
There is a way to write this short code in better way ?
what is disturb is the number 2 and maybe the exit.
Best Regards
lv_extract_tabix = lines( lt_dupl ).
IF lv_extract_tabix GE 2.
EXIT.
ENDIF.
2009 Jan 03 9:48 PM
Hi,
The only way to make this code shorter is to write:
lv_extract_tabix = lines( lt_dupl ).
CHECK lv_extract_tabix EQ 1.But I don't really see a problem with the code you wrote.
Guy.
2009 Jan 03 10:58 PM
Hello Michael
Without knowing the requirements it is somewhat difficult to rewrite the coding. I assume you want to check whether the itab has at least a given number of entries.
CONSTANTS:
gc_min_lines TYPE i value '2'.
...
READ TABLE lt_dupl TRANSPORTING NO FIELDS INDEX gc_min_lines.
CHECK ( syst-subrc = 0 ).
Regards
Uwe