‎2014 Feb 24 6:37 AM
Simply put, I want one user input field, and button to continue on (as the toolbar button does).The input field needs to be variable so I can use it later in the program to display what needs to be based on the input. I can't figure for the life of me how do a pushbutton that performs that continue function and appears same line besdie the input field.
So how do I this? Please have in mind, I am still new the ABAP platform, so bare with me in undertsanding it all.
Thanks in advance.
‎2014 Feb 25 4:37 AM
Hi,
Please try the following code.
TABLES: sscrfields.
DATA: gt_exclude TYPE TABLE OF rsexfcode,
gtt_exclude TYPE rsexfcode.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_input TYPE char10.
SELECTION-SCREEN PUSHBUTTON 15(20) button USER-COMMAND BTN .
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN.
IF sy-ucomm = 'BTN'.
sscrfields-ucomm = 'ONLI'.
ENDIF.
* To deactivate the default 'Execute/Continue button'.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = '%_00'
p_program = 'RSSYSTDB'
TABLES
p_exclude = gt_exclude.
INITIALIZATION.
BUTTON = 'Execute'.
gtt_exclude-fcode = 'ONLI'.
APPEND gtt_exclude TO gt_exclude.
START-OF-SELECTION.
Write : p_input.
‎2014 Feb 24 6:56 AM
Hello James,
Can you please explain why you do not want to use the execute button?
Thanks & regards,
Praveenkumar
‎2014 Feb 24 10:47 PM
The end user may not have that button I have in the dev environment.
‎2014 Feb 24 6:57 AM
Hi James,
Please try the following code snippet to bring the button and the input field in the same line -
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_input TYPE char10.
SELECTION-SCREEN PUSHBUTTON 15(20) button USER-COMMAND btn .
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
BUTTON = 'Execute'.
START-OF-SELECTION.
"write your logic here based on the input field value
Also, can you please be a little more clear on the 'continue' functionality of the button which is need by you.
Regards,
Rachna.
‎2014 Feb 24 10:41 PM
By continue I was meaning the button that you press and whatever processing comes after the input goes ahead. That code snippet is good by the way, thats achieving the visual aspect of things.
‎2014 Feb 24 6:59 AM
Hello James Blaik,
How are you ??? , The thing you posted somewhat i understand your requirement. Please clarify whether you want to achieve this through report program or in module pool (Screen Program) ????
Regards,
Vijay SR
‎2014 Feb 24 10:53 PM
Interactive Report Program is the style of program. All processing after the input works fine, its just getting that button to execute now, as rachna's code snippet has got the button visually in the right place.
‎2014 Feb 25 4:37 AM
Hi,
Please try the following code.
TABLES: sscrfields.
DATA: gt_exclude TYPE TABLE OF rsexfcode,
gtt_exclude TYPE rsexfcode.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_input TYPE char10.
SELECTION-SCREEN PUSHBUTTON 15(20) button USER-COMMAND BTN .
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN.
IF sy-ucomm = 'BTN'.
sscrfields-ucomm = 'ONLI'.
ENDIF.
* To deactivate the default 'Execute/Continue button'.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = '%_00'
p_program = 'RSSYSTDB'
TABLES
p_exclude = gt_exclude.
INITIALIZATION.
BUTTON = 'Execute'.
gtt_exclude-fcode = 'ONLI'.
APPEND gtt_exclude TO gt_exclude.
START-OF-SELECTION.
Write : p_input.