Application Development 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: 

radio button

Former Member
0 Kudos

hi just want to ask help. i have 4 radio buttons in my screen, i want to display specific selection-option if i select certain radio button. how should i do it?

example:

i will select radio button for Report By PO. i will only display the selection-option for PO.

or i will select radio button for Report By Vendor. i will only display the selection-option for Vendor.

thanks.

donna

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Donna,

This example is for 2 radiobuttons.

You can extend it for 4 radiobuttons. Just use MODIF ID to separate out the groups.

<b>PARAMETER PORDER RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND COM.

PARAMETER PVENDOR RADIOBUTTON GROUP G1.

PARAMETERS PEBELN LIKE EKKO-EBELN MODIF ID PO.

PARAMETERS PLIFNR LIKE LFA1-LIFNR MODIF ID VEN.

AT SELECTION-SCREEN OUTPUT .

LOOP AT SCREEN .

CHECK SCREEN-GROUP1 = 'PO' OR

SCREEN-GROUP1 = 'VEN'.

IF PORDER = 'X'.

IF SCREEN-GROUP1 EQ 'PO'.

SCREEN-ACTIVE = 1.

ELSEIF SCREEN-GROUP1 EQ 'VEN'.

SCREEN-ACTIVE = 0.

ENDIF.

ELSE.

IF SCREEN-GROUP1 EQ 'VEN'.

SCREEN-ACTIVE = 1.

ELSEIF SCREEN-GROUP1 EQ 'PO'.

SCREEN-ACTIVE = 0.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.</b>

Dont forget to reward if answers were helpful.

Cheers

2 REPLIES 2

Former Member
0 Kudos

Hi Donna,

This example is for 2 radiobuttons.

You can extend it for 4 radiobuttons. Just use MODIF ID to separate out the groups.

<b>PARAMETER PORDER RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND COM.

PARAMETER PVENDOR RADIOBUTTON GROUP G1.

PARAMETERS PEBELN LIKE EKKO-EBELN MODIF ID PO.

PARAMETERS PLIFNR LIKE LFA1-LIFNR MODIF ID VEN.

AT SELECTION-SCREEN OUTPUT .

LOOP AT SCREEN .

CHECK SCREEN-GROUP1 = 'PO' OR

SCREEN-GROUP1 = 'VEN'.

IF PORDER = 'X'.

IF SCREEN-GROUP1 EQ 'PO'.

SCREEN-ACTIVE = 1.

ELSEIF SCREEN-GROUP1 EQ 'VEN'.

SCREEN-ACTIVE = 0.

ENDIF.

ELSE.

IF SCREEN-GROUP1 EQ 'VEN'.

SCREEN-ACTIVE = 1.

ELSEIF SCREEN-GROUP1 EQ 'PO'.

SCREEN-ACTIVE = 0.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.</b>

Dont forget to reward if answers were helpful.

Cheers

Former Member
0 Kudos

Hi,

Check this link,

<u>http://help.sap.com/saphelp_erp2004/helpdata/en/79/34a23dd9b511d1950e0000e8353423/frameset.htm</u>

Hope it helps u.

Thanks&Regards,

Ruthra