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

Check BOx

Former Member
0 Likes
725

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
697

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

7 REPLIES 7
Read only

Former Member
0 Likes
697

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

Read only

0 Likes
697

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.

Read only

Former Member
0 Likes
697

Hi,

If you give USER-COMMAND addition..Then you don't have to hit enter..

Thanks,

Naren

Read only

0 Likes
697

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.

Read only

0 Likes
697

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

Read only

Former Member
0 Likes
698

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

Read only

0 Likes
697

Thanks Ravi and Naren.

Madhu.