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

Remove save button code not working?

Former Member
0 Likes
769

Hello everyone,

I am trying to remove save button but it isn't working at all. Actually i am using the same screen for two or more purposes and for one purpose i need the save button code which i can let it work easily but i tried to code to remove the save button so i can use it my other purpose.

this is my top module data code for save button:

DATA: BEGIN OF WA_PF_STATUS,

FCODE LIKE RSMPE-FUNC,

END OF WA_PF_STATUS.

DATA: IST_PF_STATUS LIKE STANDARD TABLE OF WA_PF_STATUS WITH

NON-UNIQUE DEFAULT KEY INITIAL SIZE 10.

Here is my code in one of the case so as to remove it to perform some task.

REFRESH IST_PF_STATUS.

MOVE 'SAVE' TO WA_PF_STATUS-FCODE.

APPEND WA_PF_STATUS TO IST_PF_STATUS,

SET PF_STATUS 'S200' EXCLUDING IST_PF_STATUS.

  • S200 IS THE PF STATUS OF THE SCREEN ON WHICH I WANT TO REMOVE THE CODE FOR SAVE BUTTON.

ANY IDEA WHY ISN'T IT IS WORKING?

THANKS FOR WRITING BACK.

REGARDS,

LUCKY

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
721

Ensure you are setting your GUI status in PBO of screen.


"also delcare excluding table like
DATA ist_pf_status TYPE TABLE OF sy-ucomm.

MODULE status_0100 OUTPUT.
    REFRESH IST_PF_STATUS.
    APPEND 'SAVE' TO IST_PF_STATUS.
   SET PF_STATUS 'S200' EXCLUDING IST_PF_STATUS.. 
ENDMODULE.

Regards

Marcin

6 REPLIES 6
Read only

Former Member
0 Likes
721

Hi.

Your code seems to be ok. Maybe you should try to use the exact same data types from SAP help:


DATA fcode TYPE TABLE OF sy-ucomm. 
... 
MODULE status_0100 OUTPUT. 
  APPEND 'CHANGE'  TO fcode. 
  APPEND 'SAVE' TO fcode. 
  SET PF-STATUS 'STATUS_0100' EXCLUDING fcode. 
ENDMODULE. 

See they even made the example with SAVE.

Besides, make sure everything is activated (screen, pbo modules include, forms include), check that you are actually calling the correct subroutines and check that PF_STATUS instead of PF-STATUS you wrote.

Regards,

Sergio

Read only

MarcinPciak
Active Contributor
0 Likes
722

Ensure you are setting your GUI status in PBO of screen.


"also delcare excluding table like
DATA ist_pf_status TYPE TABLE OF sy-ucomm.

MODULE status_0100 OUTPUT.
    REFRESH IST_PF_STATUS.
    APPEND 'SAVE' TO IST_PF_STATUS.
   SET PF_STATUS 'S200' EXCLUDING IST_PF_STATUS.. 
ENDMODULE.

Regards

Marcin

Read only

Former Member
0 Likes
721

HI,

The code you have written is correct except for SET PF_STATUS change it to SET PF-STATUS. Make sure the pf-staus S200 is active.

hope it helps.

Regards,

Sachin

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
721

Hi,

You cant remove the standard SAVE button, but you can disable it.

Try using:-


SET PF-STATUS 'S200' EXCLUDING 'SAVE'.

Hope this helps you.

Regards,

Tarun

Read only

Former Member
0 Likes
721

thanks a lot guys for writing back. I will try that soon.

Thanks again.

Regards,

Lucky

Read only

Former Member
0 Likes
721

hi,

u can use this

DATA: IT_EXCLUDE TYPE SLIS_T_EXTAB,

WA_EXCLUDE LIKE LINE OF IT_EXCLUDE.

WA_EXCLUDE-FCODE = 'SAVE'.

APPEND WA_EXCLUDE TO IT_EXCLUDE.

CLEAR WA_EXCLUDE.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

IT_EXCLUDING = IT_EXCLUDE

rgds

shivraj

Edited by: ShivrajSinha on Aug 4, 2009 7:07 AM