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

selection screen

Former Member
0 Likes
914

Hi All,

I have a selection screen defined as following

PARAMETERS : p_last RADIOBUTTON GROUP r1 ,

p_all RADIOBUTTON GROUP r1 DEFAULT 'X',

p_some RADIOBUTTON GROUP r1.

SELECT-OPTIONS : s_res_no FOR syst-index NO-EXTENSION.

My requirement is i have to enable s_res_no only when p_some is checked.or else it shud be disabled.How can i do that.

Regards,

Sai

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
892

Just copy and paste this code and check if it works, otherwise revert with the problme that u've faced

PARAMETERS :

p_last RADIOBUTTON GROUP r1 user-command RAD ,

p_all RADIOBUTTON GROUP r1 DEFAULT 'X',

p_some RADIOBUTTON GROUP r1 .

SELECT-OPTIONS : s_res_no FOR syst-index NO-EXTENSION MODIF ID MOD.

at selection-output.

if p_some = 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'MOD'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

endif.

10 REPLIES 10
Read only

Former Member
0 Likes
892

use AT SELECTION SCREEN OUTPUT event and there use LOOP AT SCREEN.

You can find lots of post in SDN on this.

Regards,

Atish

Read only

Former Member
0 Likes
892

PARAMETERS : p_last RADIOBUTTON GROUP r1 ,

p_all RADIOBUTTON GROUP r1 DEFAULT 'X' user-command ucom,

p_some RADIOBUTTON GROUP r1.

SELECT-OPTIONS : s_res_no FOR syst-index NO-EXTENSION.

at selection-screen ooutput.

if p_some = 'X'.

loop at screen.

if screen-name = 'S_RES_NO-LOW' or screen-name = 'S_RES_NO-HIGH'.

screen-input = '1'.

modify screen.

endif.

endloop.

else.

loop at screen.

if screen-name = 'S_RES_NO-LOW' or screen-name = 'S_RES_NO-HIGH'.

screen-input = '0'.

modify screen.

endif.

endloop.

endif.

regards

shiba dutta

Read only

Former Member
0 Likes
892

Hi,

You will have to some of the following steps

1). Assign a USERCOMMAND for the check box.

2). Assign a MODIF ID to the filed for which you want to make changes.

3). Write the event AT SELECTION-SCREEN OUTPUT

4). Inside the event AT SELECTION-SCREEN OUTPUT loop at the SCREEN table and modify the atrribute of the field which you want to make it non mandatory.

A sample program

REPORT demo_at_selection_screen_pbo.

PARAMETERS: test1(10) TYPE c MODIF ID sc1,

test2(10) TYPE c MODIF ID sc2,

test3(10) TYPE c MODIF ID sc1,

test4(10) TYPE c MODIF ID sc2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'SC1'.

screen-intensified = '1'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

IF screen-group1 = 'SC2'.

screen-intensified = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
892

hi,

AT SELECTION-SCREEN OUTPUT.

Loop at screen.

if screen-name = 's_res_no'.

if p_some = 'X'.

screen-active = 1.

else.

screen-active = 0.

endif.

endif.

modify screen.

endloop.

reward points if it is helpful.

regards,

Sangeetha.a

Read only

Former Member
0 Likes
893

Just copy and paste this code and check if it works, otherwise revert with the problme that u've faced

PARAMETERS :

p_last RADIOBUTTON GROUP r1 user-command RAD ,

p_all RADIOBUTTON GROUP r1 DEFAULT 'X',

p_some RADIOBUTTON GROUP r1 .

SELECT-OPTIONS : s_res_no FOR syst-index NO-EXTENSION MODIF ID MOD.

at selection-output.

if p_some = 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'MOD'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

endif.

Read only

0 Likes
892

it is giving an error message 'at selection output is allowed only with loop end loop'

Read only

0 Likes
892

try this, this will definitley work

PARAMETERS :

p_last RADIOBUTTON GROUP r1 user-command RAD ,

p_all RADIOBUTTON GROUP r1 DEFAULT 'X',

p_some RADIOBUTTON GROUP r1 .

SELECT-OPTIONS : s_res_no FOR syst-index NO-EXTENSION MODIF ID MOD.

at selection-screen output.

<b>if p_some = 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'MOD'.

screen-input = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

else.

LOOP AT SCREEN.

IF screen-group1 = 'MOD'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

endif.</b>

Message was edited by:

Rajesh

Read only

0 Likes
892

Thanks its working.

Read only

Former Member
0 Likes
892

AT selection-screen output.

loop at screen.

if p_some = ' '.

s_res_no = no input.

endif.

endloop[.

Read only

Former Member
0 Likes
892

have you tried my previous post coding? what output are you getting there ?

regards

shiba dutta