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

at selection screen output

Former Member
0 Likes
831

Hi Gurus,

In selection screen (1000) I have 2 fields9(field1 and field2) and a checkbox. The requirment is,

when I execute the program, if the checkbox is not checked then the field2 should

be inactive for user to enter the value, but If i check the checkbox it should

be enabled for input, I have tried with at selection screen output, but is not working properly. Could anyone suggest how to do it.

Regards,

John

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
801

at selection-screen.

If rad1 = 'X'.

loop at screen.

case screen-name.

when 'FIELD2'.

screen-active = 0.

modify screen.

endcase.

endloop.

Hi Gurus,

In selection screen (1000) I have 2 fields9(field1 and field2) and a checkbox. The requirment is,

when I execute the program, if the checkbox is not checked then the field2 should

be inactive for user to enter the value, but If i check the checkbox it should

be enabled for input, I have tried with at selection screen output, but is not working properly. Could anyone suggest how to do it.

Regards,

John

6 REPLIES 6
Read only

Former Member
0 Likes
802

at selection-screen.

If rad1 = 'X'.

loop at screen.

case screen-name.

when 'FIELD2'.

screen-active = 0.

modify screen.

endcase.

endloop.

Read only

former_member491305
Active Contributor
0 Likes
801

Hi,

Make sure you have given function code for the check box.Then only all the events(At selection-screen,At selection-screen output) will trigger when you check/uncheck the check box.

Parameters:p_chk checkbox user-command chk.

At selection-screen output.

<Do screen modification>

Regards,

Vignesh.

Read only

Former Member
0 Likes
801

hey john..

try the foll:

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t02.

parameter: p_kunnr type kna1-kunnr modif id TES.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t04.

PARAMETER: cb1 AS CHECKBOX DEFAULT 'X' modif id SEL,

cb2 AS CHECKBOX modif id SEL.

SELECTION-SCREEN END OF BLOCK b2.

**----


      • A T S E L E C T I O N - S C R E E N *

**----


**

at selection-screen output.

if cb1 = 'X'.

loop at screen.

if screen-group1 = 'TES'.

screen-active = 0.

modify screen.

endif.

endloop.

else.

loop at screen.

if screen-group1 = 'TES'.

screen-active = 1.

modify screen.

endif.

endloop.

endif.

Plz reward pts if helpful.

Read only

0 Likes
801

Hi,

Here I have only one checkbox, so i cannot use screen group.

Please suggest

regards,

John

Read only

0 Likes
801

Hi John,

It will work with AT SELECTION SCREEN OUTPUT but you need to press the ENTER after selecting the checkbox then only this event will be called.

Regards,

Atish

Read only

Former Member
0 Likes
801

try this it will be use full

SELECTION-SCREEN BEGIN OF BLOCK sel WITH FRAME TITLE txt.

PARAMETERS: s_ab AS CHECKBOX DEFAULT '' USER-COMMAND chk MODIF ID sak.

SELECT-OPTIONS s_gl FOR bseg-umskz MODIF ID san NO INTERVALS .

SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr .

SELECTION-SCREEN END OF BLOCK sel.

AT SELECTION-SCREEN OUTPUT.

IF s_ab = ' ' .

LOOP AT SCREEN.

IF screen-group1 = 'SAN'.

screen-active = 0.

ENDIF.

IF screen-group1 = 'SAK'.

screen-active = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

AT SELECTION-SCREEN.

IF sy-ucomm = 'CHK'.

IF s_ab = 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'SAN'.

screen-input = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

IF s_ab = ' '.

LOOP AT SCREEN.

IF screen-group1 = 'SAN'.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

ENDIF.

<b>If it is use full please reward</b>