on 03-21-2013 11:22 AM
Hello Gurus ,
There is a requirement in our company for disabling of Delete option for components in a Production Order confirmation ( CO11N ).
And there are two options available for deletion ,
1. Using Button
2. One Menu options (shft + f2)
For disabling the button option SHD0 (Screen Variant and Transaction Variant ) has been used.
Now which technique should I adopt for disabling the Menu Delete option ,
I mean can this be done through SHD0 itself
OR
I need to implement Customer Exit for the same.
Hi,
You can try with this BADI.
WORKORDER_GOODSMVT.
Method :- GM_SCREEN_OKCODE_CHECK .
Write code like this.
if i_okcode = 'DELE'.
c_error_flg = 'X'.
endif.
For Disable purpose it is good & will come back to overview screen.
Try like this.
I Am not coming to SHDO option.
Hope It helps a little.
Thanks
Gourav.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gourav ,
Very thanks for your solution.
I will give this a try for sure and revert you back.
And Regarding SHD0 option I must say it works like a marvel ,
You can enable and disable any screen field using this technique and you even don't need to assign a ZTCODE and you can assign it at user level.
Am new to SHD0 and I was not able to figure out how I can disable a menu option using SHD0.
Will revert you soon.
Hello Gourav ,
Your solution was partially correct for me.
BADI WORKORDER_GOODSMVT was correct but the correct METHOD to be implemented was IF_EX_WORKORDER_GOODSMVT~COMPLETE_GOODSMOVEMENT
when I was coding in the METHOD suggested by you though it sounds right , but it was not triggering , am astonished why.'
I did coding as below in method COMPLETE_GOODSMOVEMENT
IF SY-TCODE EQ 'CO11N'.
IF SY-UNAME EQ 'LLRPPC' OR SY-UNAME EQ 'ANCOABAP'.
IF SY-UCOMM EQ 'DELE'.
MESSAGE 'You are not authorized to Delete an item !' TYPE 'E'.
ENDIF.
ENDIF.
ENDIF.
But donno why GM_SCREEN_OKCODE_CHECK wasn't triggering.
hi,
sij, better we can do it like this.. we ll find an enhancement for that screen adn we ll try to give our custom GUI ststus instead of standard in place of standard..
first take the program name and thae status name from system --> status and customize it ( disable that deletion button) and well place our GUI status in that screen using tha Function module
RS_SET_SELSCREEN_STATUS
in the appropriate Enhancement place..
Even this may not work.. but do a try ..
hope this may solve your issue,
Mathan R.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mathanagopalan ,
Very thanks for your replies.
By referring this below thread it seems that its possible :
https://scn.sap.com/thread/1579989
But there BADI option is also mentioned which was suggested by Gaurav also .
I would like to try with BADI.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.