Skip to Content
0

To Create Radio Buttons and Inputs Fields Dynamically

Jan 09 at 10:32 AM

119

avatar image
Former Member

Hello Experts,

I'm developing one report where I'm creating Input Fields Dynamically, in order to create Parameters and Select Options dynamically, I've used FM FREE_SELECTIONS_INIT. Now, I wants to create radio button using the same, but unfortunately, I'm not getting any option in order to do the same. Is it possible to create radio buttons using the same FM? Else alternate solution any?

Thanks in advance!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
avatar image
Former Member Feb 21 at 10:12 AM
0

Hi All..

Resolved my query using following FM:-

ABAP4_CALL_TRANSACTION

Thank you for your answers.

Share
10 |10000 characters needed characters left characters exceeded
Michelle Crapo Jan 09 at 02:00 PM
0

Are you trying to do this with a report? How are they determined? I would use loop at screen. Then when you want to make then visible just loop again. I'm not sure what you are trying to do.

PARAMETERS : rb1 RADIOBUTTON GROUP GRP1,
             rb2 RADIOBUTTON GROUP GRP1.
data: gv_field(3).


AT SELECTION-SCREEN OUTPUT.
gv_field = 'RB1'.
LOOP AT SCREEN.
IF screen-name = 'RB1'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.



Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Michelle,

My requirement is:-

we have some programs across multiple system, in order to access those programs user has to login to multiple systems, now we are developing one generic program in a system so that user can access all programs from one system only. Since dependent tables and data can not be moved across system. I've created one RFC in System A which will fetch all input details of a program and returns to System B. Later System B will show input screen to the user. Since we are getting input fields details through RFC I'm generating input fields dynamically. In order to do the same, I've used FM FM FREE_SELECTIONS_INIT. But I'm not getting an option to create radio button in the same. Can you please help me regarding the same?

0

I see you are running this program from the calling system. The program brings back the fields. Now you want a function module that will bring back the radiobuttons. Correct?

Since you created an RFC you had to have wrapped some code around the function module. Why not use that code to select the radio buttons that can be displayed. Add another table to the function module for the radio buttons. You can put that logic after the FREE_SELECTIONS_INIT.

0
Former Member
Michelle Crapo

Hi Michelle,

My RFC will return the selection screen as follows:-

it-output.png

It'll gives me all input fields along with radio buttons too. As far as FREE_SELECTIONS_INIT is being concern, I know that you needs to pass Input Parameters and Input Text to that function module. Upon calling FREE_SELECTIONS_DIALOG, SAP will automatically creates a screen on top of our program. Once you enters input value and press execute button on the screen it'll return the values that are entered by user. You'll get values in tables tab of that FM. Since, screen is generating dynamically, we can not put logic of radio buttons after it.

Thanks,

Sourabh

it-output.png (17.6 kB)
0
Sandra Rossi Jan 10 at 07:51 AM
0

Try to do it with an ALV Grid. For starting, you could extend the code for checkboxes of Enno Wulff: Variations Of Selecting Multiple Options From A List ...

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jan 10 at 01:39 PM
0

It is not possible to create radio buttons and check buttons with function module FREE_SELECTIONS_INIT.

The technical reason is, that you can not change/convert dynamically the 'Element type' from an Input/Output field to radio button group or checkbox.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Tibor!! Is there any alternate way through which we can able to achieve this functionality?

0