Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Disable creation of Orders from Notification, until notification is saved.

Hello all,

I have a peculiar requirement. I need to block / disable creation of orders from IW21. But in IW22 it should allow creation of orders. How can we achieve this?

Tags:
replied

Hello Pavan kumar,

As @Manuel very rightly pointed out the Clear possibility to still  be able to Create an Order through a Notification from Menu option, here I am providing you a fool-proof method to achieve the same,

Put this simple code in the include ZXWOCU07 of user-exit IWO10009.

IF sy-tcode = 'IW21'.

   MESSAGE: 'Order can not be created through Notification Create stage.' TYPE 'E' DISPLAY LIKE 'I'.

ENDIF.

This will throw the following error popup whenever user tries to Create an Order from IW21 screen. Please note that this error will trigger at the time of Order Save event. 

If you need to add more conditions like this should be for a particular Order type say ZM02 then the code will be:

IF sy-tcode = 'IW21' AND caufvd_imp-auart = 'ZM02'.

   MESSAGE: 'Order can not be created through Notification Create stage.' TYPE 'E' DISPLAY LIKE 'I'.

ENDIF.

Please note that it is the simplest job for an ABAPer. Posting this solution is necessary to facilitate members who go through this thread would be informed about a complete solution. For you even, there is no option other than this.

Regards

KJogeswaraRao

1 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question