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

Radio Buttons

radhushankar
Participant
0 Likes
1,304

Hi all

i have two radio buttons , I placed this radiobuttons in the program(VA21 AND VA22) sapmv45a in screen number 8309.

The Radio buttons are namely by QUOTATION APPROVED AND QUOTATION NOT APPROVED.

if the transaction is va21 means it has to defaulty marked as quotaion not approved radio button. In this users are not permitted to change the status.

can any one tel me how to make the other radio button defultly unmarkd by transaction specific.

if it is va22 means the user can change the status between the buttons.he can approve or not approve the quotation.

ppls can u plz tel me how to valiadate the radiobuttons transaction specific???

1 ACCEPTED SOLUTION
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,277

HI,

You can code using SY-TCODE as follows

in the PBO Module

if SY-TCODE = 'VA21'.

LOOP AT SCREEN.

check screen-Name = 'RAD1'

screen-input = 0.

rad1 = 'X'.

modify screen.

ENDLOOP.

endif.

if sy-tcode = 'VA22'.

  • Put the code as per your need

endif.

<b>WHEN YOU TEST YOUR PROGRAM TEST IT USING TRANSACTION NOT BY EXECUTING THE PROGRAM</b>

Regards,

Sesh

.

9 REPLIES 9
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,278

HI,

You can code using SY-TCODE as follows

in the PBO Module

if SY-TCODE = 'VA21'.

LOOP AT SCREEN.

check screen-Name = 'RAD1'

screen-input = 0.

rad1 = 'X'.

modify screen.

ENDLOOP.

endif.

if sy-tcode = 'VA22'.

  • Put the code as per your need

endif.

<b>WHEN YOU TEST YOUR PROGRAM TEST IT USING TRANSACTION NOT BY EXECUTING THE PROGRAM</b>

Regards,

Sesh

.

Read only

0 Likes
1,277

hi tried ur way but the system allowing me to select the another radio button also..my requirement is the system should not allow rne te select the second radio button

Read only

0 Likes
1,277

HI,

Then for the other radio button set

SCREEN-ACTIVE = 0.

You need to use LOOP AT SCREEN ENDLOOP and then

use SCREEN-NAME = 'RAD1' or SCREEN-NAME = 'RAD2' and then use

SCREEN-INPUT = 0 for disabling the input.

SCREEN-ACTIVE = 0 for removing the radio button from screen.

Regards,

Sesh

Read only

0 Likes
1,277

hei thank u..i got it

while displaying the two radio buttons by default it showing the first radio button as a selected one..i want to show the second one as a selected one.can u tel me how 2 change it??

Read only

0 Likes
1,277

Hi,

The corresponding data field assign default value of 'X'.

as below.

DATA: rad1 type c value 'X".

Else.

IN your PBO Module check a flag

DATA: flag.

in the PBO Module.

if flag is initial.

rad1 = 'X' " by default this will be selected

endif.

Regards,

Sesh

Read only

0 Likes
1,277

thank you sesh.Can you give me ur mail id.

Read only

0 Likes
1,277

Hi.

Its [email protected]

Regards,

Sesh

Read only

0 Likes
1,277

hi i sent u a gamil request in name arun.joseph,[email protected] accept it

Thanks

Arun.j

Read only

Former Member
0 Likes
1,277

in the initialization Event, assign the value of radio button as 'X'.