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 field disable

Former Member
0 Likes
739

Hi All,

I have a report with a selection screen having a check box,cost centre,vendor no and other fields.My requirment is when the user clicks the check box the vendor no and the cost centre input should be enabled.I have written the below code but the AT SELECTION-SCREEN OUTPUT is getting triggred only during PBO but not during PAI when the user clicks the check box.plz help.

AT SELECTION-SCREEN OUTPUT.

IF p_check EQ 'X'.

LOOP AT SCREEN.

IF screen-name = 'FLIEF' OR screen-name = 'KOSTL'.

screen-active = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Thanks,

Rakesh.

6 REPLIES 6
Read only

Former Member
0 Likes
717

hi,

to catch it in PAI.

use this event

<b>at selection-screen</b>

Regards

Reshma

Read only

Former Member
0 Likes
717

Use screen group and set input = 1. That will work...

Check the check box value in the loop. then it will work...

PARAMETERS:

p_text(5) type c default '1234' modif id the.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'THE'.

screen-active = 1.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

0 Likes
717

yes use the other screen fields input and output otherthan active.

Regards,

Sudheer

Read only

former_member491305
Active Contributor
0 Likes
717

Hi Rakesh,

I think you did not set the user-command for the check box.That is why AT SELECTION-SCREEN OUTPUT event is not triggerred when u click the check box.Please check the following code this will help you.

SELECT-OPTIONS: s_matnr FOR makt-matnr .

PARAMETERS: p_werks TYPE ekpo-werks .

PARAMETERS:p_chk AS CHECKBOX USER-COMMAND cmd.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-name = 'P_WERKS' AND p_chk = 'X'.

screen-input = 0.

ELSE.

screen-input = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Read only

0 Likes
717

U need to <b><u>award points for all the useful replies</u></b>, and also u nees to <b><u>mark it as Answered if ur problem is solved</u></b>.

Regards

Sudheer

Read only

former_member196299
Active Contributor
0 Likes
717

hi Rakesh ,

When you write anything under the event AT SELECTION-SCREEN OUTPUT, it will be triggered only in the PBO event of the screen not in the PAI .

for making the screen fields active write the code in the PAI part of the screen , then it will work fine .

Regards,

Ranjita