‎2007 Mar 27 4:48 PM
Hello Friends,
I have 2 check Box on screen. When User checks one the other should grayout. User should have the option of checking only one. I cant use radio buttons because the user can uncheck both the boxes.
Any suggestions.
Madhu.
‎2007 Mar 27 5:18 PM
Hi Madhu,
The user-command I am mentioning is for the check box...If you see in my example..The parameters declaration has an addition USER-COMMAND USR1..Which means..When the check box is pressed..The event AT SELECTION-SCREEN event will be triggered and then the AT SELECTION-SCREEN OUTPUT...This is used to avoid hitting enter ...
Hope I am clear ..
THanks,
Naren
‎2007 Mar 27 4:51 PM
Hi,
Check this example.
PARAMETERS: P_C1 AS CHECKBOX USER-COMMAND USR1.
PARAMETERS: P_C2 AS CHECKBOX USER-COMMAND USR2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF P_C1 = 'X' AND SCREEN-NAME = 'P_C2'.
SCREEN-INPUT = '0'.
ENDIF.
IF P_C2 = 'X' AND SCREEN-NAME = 'P_C1'.
SCREEN-INPUT = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
THanks,
Naren
‎2007 Mar 27 5:02 PM
Thanks Naren.
I tried it, When the user checks the box to take the action the user have to hit enter. I tried to check both the boxes it accepted and then hit enter. It grays out both the boxes.
Anyways will try out. Thanks,
Madhu.
‎2007 Mar 27 5:04 PM
Hi,
If you give USER-COMMAND addition..Then you don't have to hit enter..
Thanks,
Naren
‎2007 Mar 27 5:11 PM
This is a intreactive ALV report so I am already using the user command in the program.
Can I use it again and how.
How would I call this user command, I mean how would I pass it.
Madhu.
‎2007 Mar 27 5:15 PM
Hi madhu,
I think you have got confused.
the user -command event you are talking about is at the basic list level.
The user-command that Narendra is talking about, in the selection screen level is different. The event that gets triggered when the check box is triggered is at selection-screen.
So, whatever code you want to write, should be written in at selection-screen event, which gets triggered on selection/deselection of the checkbox
Regards,
Ravi
‎2007 Mar 27 5:18 PM
Hi Madhu,
The user-command I am mentioning is for the check box...If you see in my example..The parameters declaration has an addition USER-COMMAND USR1..Which means..When the check box is pressed..The event AT SELECTION-SCREEN event will be triggered and then the AT SELECTION-SCREEN OUTPUT...This is used to avoid hitting enter ...
Hope I am clear ..
THanks,
Naren
‎2007 Mar 27 5:22 PM