‎2019 Dec 18 2:35 PM
suppose i have a table with field number and the records in the field are 1 2 3 4 6 9 10. now i have a select option in my selection screen and i insert values 1 to 10 in the select options .
my requirement is a logic to validate and get an error message for the missing no. 5 7 8 on the selection screen.
how to validate this on selection screen?
‎2019 Dec 18 3:03 PM
‎2019 Dec 18 3:13 PM
First try in your end. if its not work your code, share it. look at the answer it will help you to build the logic.
‎2019 Dec 18 10:18 PM
You can implement something like this:
TYPES: ty_itab TYPE TABLE OF i WITH EMPTY KEY.
DATA(lt_entry_data) = VALUE ty_itab( ( 1 ) ( 2 ) ( 3 ) ( 4 ) ( 6 ) ( 9 ) (10) ).
DATA lt_result TYPE ty_itab.
lv_numbr = so_numbr-low.
WHILE lv_numbr <= so_numbr-high.
READ lt_entry_data WITH KEY table_line = lv_numbr TRANSPORTING NO FIELDS.
IF sy-subrc <> 0.
APPEND lv_numbr TO lt_result.
WRITE: \ lv_numr.
ENDIF.
ADD 1 to lv_numbr.
ENDWHILE.