cancel
Showing results for 
Search instead for 
Did you mean: 

Removing Deletion option from CO11N from Menu Option ( Shft + f2 )

Sijin_Chandran
Active Contributor
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

gouravkumar64
Active Contributor
0 Kudos

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.

Sijin_Chandran
Active Contributor
0 Kudos

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.

Sijin_Chandran
Active Contributor
0 Kudos

Hi Everyone ,

I am giving the related screenshot.

You can see that the Button has  been disabled ( using SHD0 ) but I want to delete the above option as well .

Sijin_Chandran
Active Contributor
0 Kudos

Hi Gourav ,

I have implemented that BADI ,

But Its not triggering  during deletion .

Sijin_Chandran
Active Contributor
0 Kudos

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.

guilherme_frisoni
Contributor
0 Kudos

Hi Sijin,

I didn't understad it was in Goods Movement.

So, you can use this exit:

CCOWB001, EXIT_SAPLCOWB_001.

you just to insert DELE into this table T_FCODE_TAB.

APPEND 'DELE' to T_FCODE_TAB.

Regards,

Frisoni

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

guilherme_frisoni
Contributor
0 Kudos

Hi Sijin,

check this option:

Regards,

Frisoni

Sijin_Chandran
Active Contributor
0 Kudos

Hi Frisoni ,

Actually I want this thing done to be at user level.

And I guess this thing can be done using SHD0 / BADI / EXITS.

Very thanks for your comments.

Former Member
0 Kudos

hi,

      it's not possible to removing or doing something at menu level with SHD0 for sure..

Even we can use some Enhancement in this case..

but doing all this at user level..

i donn think it is possible..

thanks,

Mathan R.

Sijin_Chandran
Active Contributor
0 Kudos

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.