cancel
Showing results for 
Search instead for 
Did you mean: 

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

pavan_kumarcs
Active Participant
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Pavan kumar,

As 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

Answers (2)

Answers (2)

pavan_kumarcs
Active Participant
0 Kudos

Thanks a lot Mentors for providing more insight !

jogeswararao_kavala
Active Contributor
0 Kudos

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

MTerence
Active Contributor
0 Kudos

Hi Pavan,

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

Regards

Terence

pavan_kumarcs
Active Participant
0 Kudos

Hello Terence,

Thanks for the quick and correct response!

Former Member
0 Kudos

Hi,

You still have the menu option Maintenance notification > Order > Create. I think you should go through authorizations.

Regards,

mr.

MTerence
Active Contributor
0 Kudos

Hi Manuel,

Yep, Thanks for the info. I missed it. I guess we have multiple approaches for this requirement. We can disable using screen variant SHD0.

Regards

Terence

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Maria,

Greetings.

  • I thought it will be beneficial to many if I record the following experience of mine.
  • In discussions these days often Screen variant is figuring as an alternative to exits.
  • Let me record this experience/opinion too of mine in this context.
  • Had SHD0 been simpler and versatile I would go for that for every such enhancement need, this way creating about LOT of  of screen variants and transaction variants for my requirements which could not be fulfilled by customizing.


In fact at the moment I just finished working on the requirement by Faisal khan to have mandatory fields for Refurbishment valuation types. Though I could succeed, I saw that this process goes through creating several screen variants  for this requirement and is in no way a substitution to simple user-exit codes. But here in his case it is the only option.


So in my view, the order of preference among these options goes this way:

  • Customizing
  • User-exits
  • SHD0


You may have a different view on this, but having both exposures I thought it is important to give this piece of opinion..


Have a Good day



Regards

KJogeswaraRao

MTerence
Active Contributor
0 Kudos

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