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

push button in the selection screen

Former Member
0 Likes
680

i have a situation where i have to create a push button in the selection-screen which can be cretaed using "SELCTION-screen : push button PUSH using USER-COMMAND ucom".

now my qusetion is , whenever user clicks on this push button instead of pressing F8/EXECUTE button the report should be displayed.

how can i write this functionality to this push button?

pls help me out from this .

thanks

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
506

Here is the short program which will show how to do it. You are simply checking for the USER-COMMAND value CHK and changing it to ONLI which is the F8 button, then the START-OF-SELECTION will be fired and you can output the list.



REPORT zrich_0001.

TABLES:  sscrfields.

SELECTION-SCREEN PUSHBUTTON 2(10)  pbut1 USER-COMMAND chk.

AT SELECTION-SCREEN OUTPUT.

  pbut1 = 'Test This'.

AT SELECTION-SCREEN.

  IF sscrfields-ucomm = 'CHK'.
    sscrfields-ucomm = 'ONLI'.
  ENDIF.

START-OF-SELECTION.
  DO 10 TIMES.
    WRITE:/ sy-index.
  ENDDO.

Regards,.

RIch Heilman

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
507

Here is the short program which will show how to do it. You are simply checking for the USER-COMMAND value CHK and changing it to ONLI which is the F8 button, then the START-OF-SELECTION will be fired and you can output the list.



REPORT zrich_0001.

TABLES:  sscrfields.

SELECTION-SCREEN PUSHBUTTON 2(10)  pbut1 USER-COMMAND chk.

AT SELECTION-SCREEN OUTPUT.

  pbut1 = 'Test This'.

AT SELECTION-SCREEN.

  IF sscrfields-ucomm = 'CHK'.
    sscrfields-ucomm = 'ONLI'.
  ENDIF.

START-OF-SELECTION.
  DO 10 TIMES.
    WRITE:/ sy-index.
  ENDDO.

Regards,.

RIch Heilman

Read only

raja_thangamani
Active Contributor
0 Likes
506

Hi,

Assign the USER-COMMAND "ONLI" to your Push Button.

Here is the sample code:

SELECTION-SCREEN PUSHBUTTON 5(10)  text-001 USER-COMMAND ONLI.

Create the Text Element <b>text-001</b> with Value "Execute" to create the Button Text.

Raja T

Message was edited by:

Raja T