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

Parameter Input Field with Execute Button

Former Member
0 Likes
2,296

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.

1 ACCEPTED SOLUTION
Read only

mayur_priyan
Active Participant
0 Likes
1,911

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.

7 REPLIES 7
Read only

Former Member
0 Likes
1,911

Hello James,

   Can you please explain why you do not want to use the execute button?

Thanks & regards,

Praveenkumar

Read only

0 Likes
1,911

The end user may not have that button I have in the dev environment.

Read only

Former Member
0 Likes
1,911

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.

Read only

0 Likes
1,911

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.

Read only

Former Member
0 Likes
1,911

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

Read only

0 Likes
1,911

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.

Read only

mayur_priyan
Active Participant
0 Likes
1,912

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.