‎2014 Jul 01 2:43 AM
Hi all experts,
I have created a ZTCode for saving input data. The problem is that i want to use the standard save button not the execute button.
How can i do that?
‎2014 Jul 01 9:19 AM
Hi all,
However, when i try to use the GUI Status with the screen that have Parameters, it won't show the GUI status or the GUI status won't work.
‎2014 Jul 01 3:02 AM
Hello Vong,
Create a separate GUI status for your program in SE41.
Search SCN with keyword 'CREATE GUI STATUS' to know more.
Thanks
‎2014 Jul 01 3:55 AM
Option 1:
Try to handle sy-ucomm = 'SAVE' in the event AT USER COMMAND. If that doesn't work, try option 2.
Option 2:
You have to create your own toolbar and handle it in the program AT USER COMMAND.
1. Create application toolbar at transaction SE41. Generate and activate.
2. Modify the program to call SET PF-STATUS '<name of your menu>'.
3. Modify the program to handle button behaviour AT USER COMMAND.
‎2014 Jul 01 4:58 AM
Hi Vong,
Please follow below you may get clear idea about GUI Status.
GUI Status of A Program using Menu Painter - ABAP Development - SCN Wiki
Regards,
Thangam.P
‎2014 Jul 01 5:17 AM
Hi
AT SELECTION-SCREEN.
case sy-ucomm.
WHen 'SPOS'.
MESSAGE 'SAVE ICON Selected' TYPE 'S'.
ENDCASE.,
Regards,
Venkat.
‎2014 Jul 01 8:14 AM
Hello,
You can remove the Execute Button using FM 'RS_SET_SELSCREEN_STATUS' passing the value of execute button to it.
else.
create a new PF status using Exclude functionality to exclude the Execute button from Screen.
Thanks
Ritesh
‎2014 Jul 01 9:19 AM
Hi all,
However, when i try to use the GUI Status with the screen that have Parameters, it won't show the GUI status or the GUI status won't work.
‎2014 Jul 01 1:34 PM
Hi,
Delcare your PF Status.
Below the AT SELECTION-SCREEN OUTPUT. Syntex.
Regards,
Venkat.
‎2014 Jul 01 1:59 PM
Hi Vong,
You have to provide Status name in Program.
if your status name is status.
initialization.
set pf-status 'STATUS'.
‎2014 Jul 02 2:29 AM
i have tried everything, still it doesn't work.
if i put it under AT SELECTION-SCREEN OUTPUT: it shows the GUI status, but it won't trigger the function unless i disable the parameters for testing.
‎2014 Jul 02 2:31 AM
No, the problem is it won't trigger the function while m using parameters.
‎2014 Jul 02 2:44 AM
Hi Sophanith
As i said before declare at selection screen Syntex Below.
AT SELECTION-SCREEN.
case sy-ucomm.
WHen 'SPOS'.
MESSAGE 'SAVE ICON Selected' TYPE 'S'.
ENDCASE.,
Regards,
Venkat.
‎2014 Jul 02 3:02 AM
Hi,
If i do so, only the EXIT command working, the normal function in my Codes won't be triggered.
This is my testing codes. Please, look it.
PARAMETERS A TYPE I.
AT SELECTION-SCREEN OUTPUT.
SET PF-STATUS 'STATUS'.
AT USER-COMMAND.
AT SELECTION-SCREEN.
CASE SY-UCOMM.
WHEN 'PD'.
LEAVE PROGRAM.
WHEN 'PA'.
WRITE 'testing 001'.
* MESSAGE 'SAVE ICON Selected' TYPE 'S'.
ENDCASE.
it won't display 'testing 001' when click save which is 'PA'.
‎2014 Jul 02 5:26 AM
Hi Sophanith,
Dont Need Exit Command.
Replace 'PA' with &PA in Se41, and case Statement , it will displaying the message.
Regards,
Venkat.
‎2014 Jul 02 5:43 AM
Hi,
Although i have replaced PA with &PA in both case statement and SE41, it still won't display the 'testing 001'.
REMARK: my &PA function type in se41 is normal application function meaning it's blank.
‎2014 Jul 02 5:46 AM
Hi,
Instead to message type 'S' replace with 'E' or
Add Stop Command below the message type 'S' and check,
Debug and see ...
Regards,
Venkat.
‎2014 Jul 02 5:51 AM
Hi,
Sample Code, it will trigger the GUI status.
TABLES: MARA.
SELECT-OPTIONS: SO_MAT FOR MARA-MATNR.
at SELECTION-SCREEN.
case sy-ucomm.
WHEN '&SAV'.
message 'Save Icon Selected' TYPE 'S'.
stop.
ENDCASE.
at SELECTION-SCREEN OUTPUT.
SET PF-STATUS 'ZSTAT'.
can you Paste Your Code.
Regards,
Venkat.
‎2014 Jul 02 5:54 AM
Hi v,
I think u r mistaken my questions.
i don't want to display MESSAGE 'SAVE ICON Selected' type 's'.
i want to know whether the GUI status works with statement write 'testing 001' or not.
‎2014 Jul 02 5:58 AM
Thanks with all your reply.
Actually, besides the matter that it doesn't work with WRITE statement.
You give me an answer that use message instead and show me to use at slection-screen above case statement, which is the fine solution that i can use.
Plus, it works with the real normal function that i use in my actual ZTCode, so i'll mark as correct answer and solved.
‎2014 Jul 02 4:25 AM
Hi Sophanith,
I would recommend to Goto Transaction SE41, relating for screens where screen related operations can be performed and then after you can also create the GUI Stataus that relates to the button(s), Text(s) coming on to the screen.
Either create the new GUI Status or copy the GUI Status of the Standard program and remove the functionalities that are not required in your case, and then after for the corresponding action i.e. when you click on any button please write the code in event AT USER COMMAND and your task(s) will be fulfilled.
Please validate the same at your end as well, let me know in case any further inputs are required from my end.
BR/Thanks
Pranav Agrawal
‎2014 Jul 02 4:35 AM
ok i'll try to research more about se41 and screen. thanks for your tips and guides.
‎2014 Jul 02 12:00 PM
Hi,
data : itab type table of sy-ucomm.
append 'ONLI' to itab.
at selection-screen output.
set pf-status 'status_name' excluding itab.
This statement will not display that exicute button because ONLI is the fcode for executing button.
so in our pf-status we restrict that using excluding keyword.....
And now we can use standard save button functionality as usual.....
Hope this will get u some information...
Thanks & Regards,
Vamsilakshman.p