Disabling the Print Option in List (System Menu)
I've a requirement to disable Print option for a custom transaction.
First, I disabled PRINT icon on Standard Tool bar.
This seems worked fine as I added the following code:
DATA itab TYPE TABLE OF sy-ucomm.
APPEND: 'PRIN' TO itab.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
p_status = sy-pfkey
p_exclude = itab.
SET PF-STATUS 'ZDISP' EXCLUDING itab.
But, still, the user can Print the list from Standard Menu bar (System -> List -> Print) option.
For this I used the menu painter to copy the system menu MENUSYST into my custom program, and modified the system menu.
This also worked fine and now the System -> List -> Print option is disabled.
Except for now when I execute my custom transaction, I see duplicate menus for System and Help on the menu of the screen
And the Print function on the second system menu is enabled!
I can't figure out how to remove this second set of menus or how to modify them.
However, any modification to system user interface will affects system wide. Is there any possibilities to remove system menu or disable list/print option from standard menu bar completely, only for this custom report?
I also tried to use the print authorization object. The issue here is, the common users usually has authorization to print other reports, but need to be restricted from printing this custom report only. Any suggestion would be greatly appreciated.
Thanks in Advance