Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

At selection screen on validation

0 Likes
984

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?

3 REPLIES 3
Read only

FredericGirod
Active Contributor
899

Check examples provided in transaction DWDM

Read only

Nawanandana
Active Contributor
0 Likes
899

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.

Read only

grigore_turcan
Explorer
0 Likes
899

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.