2010 Mar 26 1:31 AM
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.
2010 Mar 26 2:59 AM
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
2010 Mar 26 4:50 AM
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.
2010 Mar 26 5:05 AM
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
2010 Mar 26 5:32 AM
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?
2010 Mar 26 6:09 AM
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
2010 Mar 26 6:34 AM
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?
2010 Mar 26 6:43 AM
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