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

screen field disable

Former Member
0 Likes
617

Hi all,

I am showing two radio buttons in the selection screen and I am disabling the screen field,when ever user click on the 1st radio button.

I am writing the logic like this

PARAMETERS : rad1 RADIOBUTTON GROUP rad1 USER-COMMAND radio DEFAULT 'X'.

PARAMETERS : rad2 RADIOBUTTON GROUP rad1

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF rad1 = 'X'.

IF screen-name = 'p_curr'.

screen-active = 0.

MODIFY SCREEN.

else

screen-active = 1.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

but the problem is it is disabling the screen field,i want to disable the screen field and selection text.

please tell me how to do that.

regards,

Rakesh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
575
AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.
IF rad1 = 'X'.
IF screen-name cs 'P_CURR'.  "<====Use CS  and also caps
screen-active = 0.
MODIFY SCREEN.
else
screen-active = 1.
MODIFY SCREEN.
ENDIF.

ENDIF.
ENDLOOP.
4 REPLIES 4
Read only

Former Member
0 Likes
575

Hi Rakesh,

Check out the below sample code for your requirement.


selection-screen: begin of line.

parameters P_SD as checkbox default  'X' user-command FLAG.
selection-screen: comment 3(50) TEXT.
selection-screen : end of line.



selection-screen begin of block B1 with frame.
parameters: P_ES  as checkbox default  'X' modif id BL2,
            P_CMD as checkbox default  'X' modif id BL2,
            P_GMD as checkbox default  'X' modif id BL2,
            P_OSM as checkbox default  'X' modif id BL2 .
selection-screen end of block B1.

*&--------------------------------------------------------------------*
*                 INITIALIZATION
*&--------------------------------------------------------------------*
initialization .

  TEXT = 'Sales and Distribution'.
*&--------------------------------------------------------------------*
*                 AT SELECTION SCEEN
*&--------------------------------------------------------------------*

at selection-screen output.
  loop at screen.
    if P_SD <> 'X' and
       SCREEN-GROUP1 = 'BL2'.
      SCREEN-ACTIVE = '0'.
    endif.
    modify screen.
  endloop.

Thanks,

Chidanand

Read only

madan_ullasa
Contributor
0 Likes
575

Hi,

Use screen 'display'.. Your requirement is not clear.. if you are disabling the field and that works then what

is the issue? Where is the selection text?

Regds

Madan

Read only

Former Member
0 Likes
576
AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.
IF rad1 = 'X'.
IF screen-name cs 'P_CURR'.  "<====Use CS  and also caps
screen-active = 0.
MODIFY SCREEN.
else
screen-active = 1.
MODIFY SCREEN.
ENDIF.

ENDIF.
ENDLOOP.
Read only

Former Member
0 Likes
575

Change statement

IF screen-name = 'p_curr'.

as

IF screen-name CS 'P_CURR'

.

Regards

Eswar

Edited by: Eswar Rao Boddeti on Oct 15, 2008 11:42 AM

Ooops i am slow