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

Convert Select-options into Parameter at runtime.

Former Member
0 Likes
2,097

Dear Friends,

In my selection screen, i have declared select-option, now if i choose the radio button then select option shhould be work like parameter. It means without use of no inervals and no-extension in select option, it will work like no intervals and no-extension.

Can anybody suggest me that is it possible or not???

Thanking you,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,317

Aakash,

I don't dynamically you can do that but what you can do is to have two on the screen, both SELECT OPTIONS and PARAMETERS, and then dynamically display the one you want.

However, you might want to try this, you need find the name of the screen element that gets assigned dynamically. Then what you can do is to LOOP AT SCREEN and make the HIGH field of the select option invisible.

Regards,

Ravi

Note : Please mark all the helpful answers

8 REPLIES 8
Read only

Former Member
0 Likes
1,318

Aakash,

I don't dynamically you can do that but what you can do is to have two on the screen, both SELECT OPTIONS and PARAMETERS, and then dynamically display the one you want.

However, you might want to try this, you need find the name of the screen element that gets assigned dynamically. Then what you can do is to LOOP AT SCREEN and make the HIGH field of the select option invisible.

Regards,

Ravi

Note : Please mark all the helpful answers

Read only

0 Likes
1,317

Yes, your are right that i can invisible high option, but i also want to invisible interval option.

Thanks.

Read only

0 Likes
1,317

Even the button will have a screen field name, so you should be able to hide that as well. That should restrict the user from entering the intervals.

Also, take a look at RSRESTRICTSELE* function, I think that should be useful.

Regards,

Ravi

Read only

0 Likes
1,317

Hi, I have checked the screen field name for the interval button, but i couldnt find it, even in debug mode its not shown about screen field of interval button.

if u have any idea to find out the screen field for the interval button then guide me.

thnaks.

Read only

Former Member
0 Likes
1,317

HI Aakash,

Copy and paste the following code.

PARAMETERS:

p_selopt RADIOBUTTON GROUP grp1 DEFAULT 'X' USER-COMMAND d001,

p_parm RADIOBUTTON GROUP grp1.

SELECT-OPTIONS:

s_date FOR sy-datum.

PARAMETERS :

p_date LIKE sy-datum.

INITIALIZATION.

LOOP AT SCREEN.

IF screen-name CS 'P_DATE'.

screen-invisible = '1'.

screen-active = '0'.

MODIFY SCREEN.

ELSEIF screen-name CS 'S_DATE'.

screen-invisible = '0'.

screen-active = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

*

AT SELECTION-SCREEN OUTPUT.

IF p_parm = 'X'.

LOOP AT SCREEN.

IF screen-name CS 'S_DATE'.

screen-invisible = '1'.

screen-active = '0'.

MODIFY SCREEN.

ELSEIF screen-name CS 'P_DATE'.

screen-invisible = '0'.

screen-active = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSEIF p_selopt = 'X'.

LOOP AT SCREEN.

IF screen-name CS 'P_DATE'.

screen-invisible = '1'.

screen-active = '0'.

MODIFY SCREEN.

ELSEIF screen-name CS 'S_DATE'.

screen-invisible = '0'.

screen-active = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Hope you got the required output.

Thanks,

Susmitha

Read only

pradiptakumar_mishra
Participant
0 Likes
1,317

Dear Aakash,

While defining your select-option give modif id 'Id name'.

Then use the event at selection-screen output.

At Selection-Screen Output.

if r1 = 'X'.

loop at Screen.

if screen-group1 = 'ID Name'.

screen-invisible = 1.

screen-active = 0.

modify screen.

endloop.

endif.

else u can also use it like :

if r1 = 'X'.

loop at screen.

if screen-name = 's_option-low'.

screen-invisible = 1.

screen-active = 0.

modify screen.

endloop.

ENDIF.

Hope this will solve your issue.

With Regards

Pradipta Ku. Mishra

Read only

Former Member
0 Likes
1,317

Hi Aakash,

Have you tried the Function Module <b>SELECT_OPTIONS_RESTRICT</b>??

Regards,

SP.

Read only

0 Likes
1,317

Hi Prasad,

I have tried that FM.