‎2007 May 09 6:49 AM
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.
‎2007 May 09 6:53 AM
hi,
to catch it in PAI.
use this event
<b>at selection-screen</b>
Regards
Reshma
‎2007 May 09 6:53 AM
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.
‎2007 May 09 7:37 AM
yes use the other screen fields input and output otherthan active.
Regards,
Sudheer
‎2007 May 09 10:26 AM
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.
‎2007 May 18 10:41 AM
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
‎2007 May 18 12:39 PM
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