Skip to Content

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?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 06, 2016 at 04:07 PM

    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


    error.JPG (18.9 kB)
    Add comment
    10|10000 characters needed characters exceeded

  • Apr 06, 2016 at 11:03 AM

    Hi Pavan,

    In OIAL, hide the Order icon at transaction level (IW21)

    Regards

    Terence


    Capture.JPG (51.1 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • Yes Sir, You are right. It depends on the exposure we get in SAP. I don't have much exposure in Technical part of SAP, also we spend lot of time with the Technical Consultant for these changes.

      In SCN, you are doing a great job on providing the code, but this does not happen in real time since very few functional consultant have extensive coding knowledge.

      When there is no other possibility, we need to got for User Exit.


      May be once i start coding, i might feel your way of approach is better 😊

      Regards

      Terence

  • Apr 07, 2016 at 03:58 AM

    Thanks a lot Mentors for providing more insight !

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Pawan,


      The significance of how we rate a post does not end with the closure of a thread. It will be there forever and members searching for solutions will be more attracted to towards those ratings. Often they do not go through other posts of the discussions even if they have right solutions. Because you are very fresh to SCN, I am explaining this. If you already are aware that's very good.

      Regards

      KJogeswaraRao