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

adding function code dynamically for radio buttons

Former Member
0 Likes
2,648

Hi Experts,

I have two radio buttons in standard screen which when clicked my custom logic should be executed.

The issue here is the standard screen radio button does not have a Fcode assigned in the field properties because of this no event is triggered when the radio button is selected.

Thank You,

Anupama.

13 REPLIES 13
Read only

Former Member
0 Likes
1,731

HI Anupama

If its is not present you can go to the screen properties and assign a func code to it .

Or please update if its a different issue

Read only

0 Likes
1,731

Thank you all for ur quick reply.I don't have a issue on selection screen.Its on a sap module pool screen.Sap has not provided function code.How can I put the fcode in radio button screen field?

Thank You,

Anupama.

Read only

0 Likes
1,731

hello anupama...can you tell me in which standard tcode you are working & facing the problem???

Read only

0 Likes
1,731

Hi Anupama,

Thats what i have suggested .Please be clear in specifying whether its module pool or executable program next time

Jus go to the screen layout and select both the radio buttons u have created

Right click on it -> group -> define

now the fct code is editable ...Enetr your func code and use it .

hope it helps !

Read only

0 Likes
1,731

Hi,

In pp01 transaction,when I create vacancies it has to display the open and vacancy filled radio buttons.SAP not provided Fcodes for that radio buttons , so I want to add the Fcode for that radio buttons.

Thank You,

Anupama.

Read only

0 Likes
1,731

Hi ,

It is a standard sap screen for PP01 transaction .So I think ,editing has to be done by dynamically adding the fcode during runtime.

Thank You,

Anupama.

Read only

Former Member
0 Likes
1,731

gud morning madam,

you can do following thing

parameters:

p_1 radiobutton group gr1 user-command,

p_2 radiobutton group gr1.

now if you click on any of these

at selection-screen output will be executed.

or else you can call function module SAPGUI_SET_FUNCTIONCODE to give function code to the parameter dynamically

for any more quary you are most welcome

regards.

mohit

Edited by: Mohit Kumar on Feb 4, 2009 5:58 AM

Read only

Former Member
0 Likes
1,731

Hi anu,

Try the following procedure,

- Combine all the radio buttons into a group. T

- Create a common function code for all the radio buttons. F

- Assign all the radio buttons to the same modification group. F

- Enclose all entire radio button in a frame. F

Also check the website it help u as u need,

[http://help.sap.com/saphelp_nw04/Helpdata/EN/3d/c3b23782a9cc68e10000009b38f8cf/content.htm]

Hope it helps u....

Regards,

Annevit

Read only

Former Member
0 Likes
1,731

Hi,

Also check the link below,

[http://help.sap.com/saphelp_nw04/helpdata/en/e6/83a0375b5dd003e10000009b38f8cf/content.htm]

Regards,

Annevit.

Read only

dev_parbutteea
Active Contributor
0 Likes
1,731

Hi,

PARAMETERS : p1 TYPE c RADIOBUTTON GROUP gr1 user-command id1,

p2 TYPE c RADIOBUTTON GROUP gr1.

PARAMETERS : p3 TYPE char10.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-name = 'P3'.

IF p1 = 'X'.

screen-input = '1'.

ELSE.

screen-input = '0'.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
1,731

after u create two or more radio buttons on the screens, right click on the Radio Buttons. On the context menu, choose RadioButton Group-->Define.

press F7 and a popup will be seen. Scroll a bit to the right and give a function code to one of the radio-buttons. the radio buttons which are grouped together will get the same function code automatically.

Edited by: Kalyan Chakravarthi on Feb 4, 2009 5:57 AM

Read only

Former Member
0 Likes
1,731

Hi,

PARAMETERS:

p_rad1 RADIOBUTTON GROUP grp MODIF ID gr2 USER-COMMAND tes,

p_rad2 RADIOBUTTON GROUP grp MODIF ID gr2.

PARAMETERS:

p_air1 RADIOBUTTON GROUP grp1 USER-COMMAND tes,

p_air2 RADIOBUTTON GROUP grp1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 CS 'GR2'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Thanks and regrad,

Kalyan. b

Read only

Former Member
0 Likes
1,731

Hi Anupama,

Kindly go through this link below:

http://help.sap.com/saphelp_nw04/helpdata/en/e6/83a0375b5dd003e10000009b38f8cf/content.htm

Hoe it helps you

Regrds

Mansi