‎2006 Dec 03 4:47 PM
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
‎2006 Dec 03 5:09 PM
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
‎2006 Dec 03 5:09 PM
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
‎2006 Dec 03 6:37 PM
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