2013 Jan 31 5:38 AM
Hi Experts,
I have a selection screen with a button, when I click the button I want Start of Selection to be triggered. I dont want to use the execute button, Instead I want it to be done using a push button.
Please Help
2013 Jan 31 8:41 AM
Are you asking for SELECTION-SCREEN PUSHBUTTON, just assign user-command ONLI to the button.
TABLES: sscrfields.
SELECTION-SCREEN PUSHBUTTON 2(50) pbu1 USER-COMMAND onli VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = 'ICON_CHECKED'
text = 'Your text'
info = 'Your quick info'
IMPORTING
RESULT = pbu1
EXCEPTIONS
OTHERS = 0.
START-OF-SELECTION.
WRITE: / 'Hello World!'.
Regards,
Raymond
Thanks for your reply. But I will have to trigger Start-of -selection because i'm trying to do a database operation for which code is in start-of-selection, can you please tell me a way to trigger it.
2013 Jan 31 5:55 AM
Hi prthk,
sy-ucomm 'ONLI' means the user has pressed Execute button .using case stmt you can solve this issue.
START-OF SELECTION.
case sy-ucomm.
when 'ONLI' .
......
WHEN 'PUSHBUTTON FUNCTION CODE'
perform get_data.
perform display.
........
ENDCASE.
2013 Jan 31 6:05 AM
Hi Prthk,
Create your own PF-status and use as below in your program.
INITIALIZATION.
SET PF-STATUS 'ZTEST'.
Create a button and assign the Function code for the button as ONLI.
Regards,
Vikram
2013 Jan 31 7:00 AM
Hi,
create your own pf status at either initialization or at selection-screen output event
dont use ''ONLI' OR 'WB_EXEC'. using pfstatus means customizing pushbutton and create your own function code.
case sy-ucomm.
when 'EXECUTE'.
PERFORM GET_DATA. [jst for example].
when you press your own pushbutton then sy-ucomm hold its function code which you alrady created......
hope your problem will be solved........ if yes then close your thread according to SCN rules and engagement............
Thanks
Sabyasachi
2013 Jan 31 5:01 PM
Thanks for your reply. But I will have to trigger Start-of -selection because i'm trying to do a database operation for which code is in start-of-selection, can you please tell me a way to trigger it.
2013 Feb 01 6:05 PM
Hi Prthk,
In start of selection event also you can use sy-ucomm. Just add this code.
If sy-ucomm = 'ENTER'.
endif.
Please do let us know if your issue is not solved.
Regards
Purnand Dhingra
2013 Jan 31 8:41 AM
Are you asking for SELECTION-SCREEN PUSHBUTTON, just assign user-command ONLI to the button.
TABLES: sscrfields.
SELECTION-SCREEN PUSHBUTTON 2(50) pbu1 USER-COMMAND onli VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = 'ICON_CHECKED'
text = 'Your text'
info = 'Your quick info'
IMPORTING
RESULT = pbu1
EXCEPTIONS
OTHERS = 0.
START-OF-SELECTION.
WRITE: / 'Hello World!'.
Regards,
Raymond
2013 Jan 31 5:54 PM
2025 May 17 7:57 AM
2013 Feb 01 3:46 PM
Hi,
initialization, at selection-screen, start-of-selection etc are event blocks executed by run-time environment automatically. You cant change the sequence or jump between blocks by youself, but can try the various methods that people have mentioned in above replies.
thank you.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |