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

LOOP AT SCREEN REQUIRED SELECT-OPTION

brkcnplt
Explorer
0 Likes
1,253

Hi Experts ,
In my case I need to make s_proc is required if s_objid is not inital ,

Here is my code which I tried.

SELECT-OPTIONS: s_objid FOR crmd_orderadm_h-object_id,
                s_proc FOR crmd_orderadm_h-process_type NO INTERVALS MODIF ID md1.
SELECTION-SCREEN: END OF BLOCK blok1.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF s_proc-low IS NOT INITIAL.
      IF screen-group1 = 'MD1'.
        screen-required = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.
  ENDLOOP.

What I'm missing ?
Kind Regards.

1 ACCEPTED SOLUTION
Read only

former_member1716
Active Contributor
1,147

brkcnplt,

You can achieve the same requirement using AT SELECTION SCREEN event as given below:

AT SELECTION SCREEN.
IF s_objid is not initial and s_proc is initial.
*** Write your error message here asking the user to populate s_proc when S_objid is entered.
ENDIF.

Regards!

4 REPLIES 4
Read only

former_member1716
Active Contributor
1,148

brkcnplt,

You can achieve the same requirement using AT SELECTION SCREEN event as given below:

AT SELECTION SCREEN.
IF s_objid is not initial and s_proc is initial.
*** Write your error message here asking the user to populate s_proc when S_objid is entered.
ENDIF.

Regards!

Read only

0 Likes
1,147

thank you , this solved my problem.

I wonder what if I wanted to do the same thing at selection-screen output. Is there any way to do that there ?
Thank you again

Read only

1,147
brkcnplt You can do whatever you want in the output block. But why would you want to validate the input not during input validation?
Read only

1,147

brkcnplt,To understand that you first need to understand the difference between the two events, knowing the difference can give you a better understanding.Regards!