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

Modifications on selection screen

Former Member
0 Likes
563

Hi Guis,

I have a requirement on selection screen.

I have one check box and one input field on the screen.If i select the check box then i have to display the input filed in the same screen if I deselect the check box then I have to disappear the input field .

I write the logic under AT SELECTION OUTPUT i can able to disappear the input field but if I select the check box I am unable to display the input field.

please anyone give the solution.

thanks,

Santhosh

1 ACCEPTED SOLUTION
Read only

venkat_o
Active Contributor
0 Likes
535

Hi,

<li>Try this way.

REPORT ztest_notepad.
PARAMETERS:
      c_check AS CHECKBOX USER-COMMAND uc1,
      p_input TYPE char5 modif id md1.

AT SELECTION-SCREEN output.
  LOOP AT SCREEN.
    IF screen-group1 EQ 'MD1'.
      CASE c_check.
        WHEN 'X'.
          screen-active = '1'.
        WHEN OTHERS.
          screen-active = '0'.
      ENDCASE.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Regards,

Venkat.O

3 REPLIES 3
Read only

Former Member
0 Likes
535

Hi,

I think you should get a lot of threads related to this kind of requirement if you search SCN.

It should be done like below:



parameters: p_check as checkbox user-command ucom,
                    p_field like  mara-matnr.
at selection-screen output.


 loop at screen.
  if screen-name = 'p_field'.
   if p_check eq ' '.
    screen-invisible = 1.
  modify screen.
   else.
  screen-input = 1.
modify screen.
   endif.
  endif.
endloop.

hope it helps

Regards,

Himanshu

Read only

venkat_o
Active Contributor
0 Likes
536

Hi,

<li>Try this way.

REPORT ztest_notepad.
PARAMETERS:
      c_check AS CHECKBOX USER-COMMAND uc1,
      p_input TYPE char5 modif id md1.

AT SELECTION-SCREEN output.
  LOOP AT SCREEN.
    IF screen-group1 EQ 'MD1'.
      CASE c_check.
        WHEN 'X'.
          screen-active = '1'.
        WHEN OTHERS.
          screen-active = '0'.
      ENDCASE.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Regards,

Venkat.O

Read only

Former Member
0 Likes
535

Hi friend,

Please excute this code first input field disappeard.when u select the check box and press the enter then u can get the field.

i thing this is code is usefull for u.

PARAMETERS:c1 as CHECKBOX,

p1 type string MODIF ID 001.

AT SELECTION-SCREEN OUTPUT.

loop AT SCREEN.

if c1 = 'X'.

if screen-group1 eq '001'." and screen-group1 eq 003.

screen-INVISIBLE = 1.

SCREEN-ACTIVE = 1.

MODIFY SCREEN.

endif.

else.

if screen-group1 eq '001'." and screen-group1 eq 003.

screen-INVISIBLE = 0.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

endif.

endif.

endloop.

thanks,

muralii