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

disable fields on selection screen

Former Member
0 Likes
501

Hi,

I have 4 input fields on selection screen.

if I select field1, f2, f3 and f4 should be disabled and vice versa. I should allow user to enter value for only 1 input field.

Thanks

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
477

Search this forum for "LOOP AT SCREEN".

Regards,

Rich Heilman

Read only

Former Member
0 Likes
477

Hi ,

By creating the radio Buttons you can acheive this..

try this way..



PARAMETERS: p_rb1  RADIOBUTTON GROUP gr1 USER-COMMAND cde DEFAULT 'X',
                         p_rb2  RADIOBUTTON GROUP gr1 ,
                         p_rb3  RADIOBUTTON GROUP gr1 ,
                         p_rb4  RADIOBUTTON GROUP gr1 .
PARAMETERS: field1 mod-id id1,
                         field2 mod-id id2,
                         field3 mod-id id3,
                         field4 mod-id id4.



at selection-screen output.

if p_rb1 = 'X'.

loop at screen.
  disable id2 id3 id4.
Endif.
endif.
"do the same for if p_rb2.p_rb3.p_rb4.

prabhudas

Edited by: Prabhu Das on Jul 7, 2009 12:59 AM

Read only

Former Member
0 Likes
477

Hi

u need to make it inside of AT SELECTION-SCREEN OUTPUT. Try to do sth like this:


PARAMETERS: p_pfile TYPE rlgrap-filename MODIF ID ccc, 
                         p_afile TYPE rlgrap-filename MODIF ID aaa. 

AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.
      CASE screen-group1.
        WHEN 'CCC'.
          screen-input = 1.
          screen-invisible = 0.
          MODIFY SCREEN.
      WHEN 'AAA'.
          screen-input = 0.
          screen-invisible = 1.
          MODIFY SCREEN.
      ENDCASE.
    ENDLOOP.

probably u will need to add extra code, but that is how to modify the screen.

Regards