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

Standard Save button

Former Member
0 Likes
8,325

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?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,938

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.

21 REPLIES 21
Read only

Mohamed_Mukhtar
Active Contributor
0 Likes
4,938

Hello Vong,

Create a separate GUI status for your program in SE41.

Search SCN with keyword 'CREATE GUI STATUS' to know more.

Thanks

Read only

former_member730258
Participant
0 Likes
4,938

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.

Read only

thangam_perumal
Contributor
0 Likes
4,938

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

Read only

VenkatRamesh_V
Active Contributor
0 Likes
4,938

Hi


AT SELECTION-SCREEN.

case sy-ucomm.
WHen 'SPOS'.
MESSAGE 'SAVE ICON Selected' TYPE 'S'.
ENDCASE.
,

Regards,

Venkat.

Read only

Former Member
0 Likes
4,938

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

Read only

Former Member
0 Likes
4,939

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.

Read only

0 Likes
4,938

Hi,

Delcare your PF Status.

Below the AT SELECTION-SCREEN OUTPUT. Syntex.


Regards,

Venkat.

Read only

0 Likes
4,938

Hi Vong,

            You have to provide Status name in Program.

if your status name is status.

initialization.
   set pf-status 'STATUS'.

Read only

0 Likes
4,938

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.

Read only

0 Likes
4,938

No, the problem is it won't trigger the function while m using parameters.

Read only

0 Likes
4,938

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.

Read only

0 Likes
4,938

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'.

Read only

0 Likes
4,938

Hi Sophanith,

Dont Need Exit Command.

Replace 'PA' with   &PA in Se41,   and case Statement , it will  displaying the message.

Regards,

Venkat.

Read only

0 Likes
4,938

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.

Read only

0 Likes
4,938

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.

Read only

0 Likes
4,938

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.

Read only

0 Likes
4,938

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.

Read only

0 Likes
4,938

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.

Read only

Former Member
0 Likes
4,938

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

Read only

0 Likes
4,938

ok i'll try to research more about se41 and screen. thanks for your tips and guides.

Read only

vamsilakshman_pendurti
Active Participant
0 Likes
4,938

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