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: 

Addition of radio button in module pool

Former Member
0 Kudos

hello all,

Can anyone please send a solution for this topic.

the scenario is

I WANT TO ADD TO RADIO BUTTONS IN A SCREEN.

1)SORT BY MATERIAL

2)SORT BY SALES QUANTITY.

NOW TO DO THIS I WENT TO THE SCREEN DRAGGED 2 RADIO BUTTONS FROM THE TOOL AND GAVE THE NAME IN ATTRIBUTES AS

R_MATNR AND R_MENGE.

NOW IN MODULE POOL PROGRAM.

IN INPUT, THE CODE I WROTE WAS

IF R_MATNR = 'X'.

SORT ITAB BY MATNR.

ELSEIF R_MENGE.

SORT ITAB BY MENGE

ENDIF.

NOW THIS IS NOT WORKING

CAN ANY MODULE POOL EXPERT DROP A SOLUTION FOR THIS AND OTHER PROB IS THAT TWO RADIO BUTTONS ARE ENABLED IN SCREEN,I JUST NEED THE RADIO BUTTON THAT THE USER SELECTS TO BE ACTIVATED, HOW DO I DO THIS?

KINDLY SEND ME AN ANSWER AT THE EARLIEST POSSIBILITY, WOULD BE REALLY KIND OF U IF ANYONE CAN SORT THIS OUT.

8 REPLIES 8

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
IF R_MATNR = 'X'.
SORT ITAB BY MATNR.
<b>ELSEIF R_MENGE.</b> 
SORT ITAB BY MENGE
ENDIF.

Where is the literal for R_MENGE?


IF R_MATNR = 'X'.
SORT ITAB BY MATNR.
<b>ELSEIF R_MENGE = 'X'.</b>
SORT ITAB BY MENGE
ENDIF.

REgards,

Rich Heilman

0 Kudos

Also, you must create a radiobutton group for you radiobuttons. In screen painter, click the first radiobutton, now hold down Shift and click the other one, now rightclick on them and choose, radiobutton group, define.

Regards,

RIch Heilman

naimesh_patel
Active Contributor
0 Kudos

You must have to create radiobutton group..

Regards,

Naimesh

former_member181962
Active Contributor
0 Kudos

HI Naddem,

The system wil know that the radio-buttons belong to a smae group anly if you specify it in the element attributes.

Give a same name for the radio-button group.

It will work fine.

Regards,

Ravi

Former Member
0 Kudos

hi,

u need to first group the radiobuttons in the layout editor by selecting them together at once and then follow this

edit-grouping-radiobuttongroup-define.

then in abap editor the code written by u works.

0 Kudos

hi,

u need to first group the radiobuttons in the layout editor by selecting them together at once and then follow this

edit-grouping-radiobuttongroup-define.

then in abap editor the code written by u works with a change.

IF R_MATNR = 'X'.

SORT ITAB BY MATNR.

<i><b>ELSEIF R_MENGE = 'X'</b></i>.

SORT ITAB BY MENGE

ENDIF.

0 Kudos

Please make sure to award points for helpful answers and mark your post as solved when solved comepletely. Thanks.

Regards,

Rich Heilman

LucianoBentiveg
Active Contributor
0 Kudos

In dinpro, select both radio buttons, left click on selection, then you have the option to define redio button group.