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: 

Is there a function module to display the selection options

Former Member
0 Kudos
177

Hi all,

How can I display the selection options (F2) popup, like the one in the data browser (SE11) selection screen? I have a custom report. Instead of right clicking on the selecion-options field, user want a button to click so the selection options popup appear on the screen. Is there a FM that I can use?

Thanks in advance.

7 REPLIES 7

Former Member
0 Kudos
79

Hello,

i have tried debugging the standard code.... and i could find the below code which is triggering the F2 functionality for a field.

CALL METHOD call_method

EXPORTING

method = 'SetButtonState'

p_count = 3

p1 = fcode

p2 = m_enabled

p3 = m_checked

EXCEPTIONS

OTHERS = 1.

IF sy-subrc NE 0.

RAISE cntl_error.

ENDIF.

class - CL_GUI_toolbar

method - Set_button_state.

You may try this.

Regards,

Venkatesh

0 Kudos
79

I mean is there an existing FM that can do this? Normally, it's difficult to extract the code of the standard program. It' too much things to consider.

0 Kudos
79

Hi, Alvin

Please test the following Sample Code hope this will help you to fulfill your requirements.

SELECT-OPTIONS: sodate for sy-datum no-EXTENSION no INTERVALS.
SELECTION-SCREEN PUSHBUTTON 50(10) nbutton USER-COMMAND opti VISIBLE LENGTH 3.

Thanks and Regards,

Faisal

0 Kudos
79

Thanks Faisal. Rather than creating a pushbutton, I need to create using Function Key. However, function key doesn't allow me to have the additional user-command statement. Do you have any idea?

0 Kudos
79

Hi, Alvin

Sorry, didn't get you. In fact we already have Function Key ( F2 ) for this do you want to use some else?

Please explain it bit more

Thanks and Best Regards,

Faisal

0 Kudos
79

Faisal,

In my custom report, there's no specific button for F2 (although we know we can press F2 for the select options). So, I just need to add a button just to denote that user can press on it to fire the F2 functionality. I need this button to be right next to the Execute button. Is this possible?

0 Kudos
79

Hi, Alvin

As i understand you are designing screen in Screen Painter i think for getting this functionality you will have to go for SUB Screen.

Using Sub Screen you can get this option there.

I think the only way as we use for EXTENSION Button with Select Option

Thanks and Regards,

Faisal