cancel
Showing results for 
Search instead for 
Did you mean: 

Disable certain changes in sales order after production order release

Jelena
Active Contributor
0 Kudos

We are in the MTO scenario and are also using variant configuration. The business requirement is that after a production order has been released (REL status) the preceding sales order item should be “locked” for certain changes. Such changes would include VC and some other fields (e.g. quantity and dates). Some minor changes like texts should still be allowed.

The best idea we could come up with is to put some validation in the sales order user exits, but there are some disadvantages. It seems kind of strange though that there would be no such functionality in standard SAP (e.g. some changes in the order can’t be made after a delivery has been created). Is there by chance anything in the configuration that we missed?

I found this old thread, but it still seems to require user exits. Unfortunately couldn't find anything specifically on the production order / SO integration.

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

H_Terras
Explorer
0 Kudos

Hi Jelena,

Try in the userexit MV45AFZZ

  (form userexit_field_modification)


Example:

  select * from afpo where kdauf = vbap-vbeln
                     and   kdpos = vbap-posnr.        
    if sy-subrc = 0.
      select single * from aufk where aufnr = afpo-aufnr.
      if aufk-loekz = ' '.                                 
        select single * from jest where objnr = aufk-objnr
                                  and   stat  = 'I0002''   
                                  and   inact = ' '.
        if sy-subrc = 0.
          screen-input = 0'.
       

endif.

endif

endif.

endselect.

.H.Terras

Answers (2)

Answers (2)

former_member182575
Contributor
0 Kudos

Would a status profile assist you?

Regards

Waza

Jelena
Active Contributor
0 Kudos

The old post that I mentioned had a suggestion to use the status profile and, from what I read there, it didn't quite work for the OP and still required user exits. So it'd be kind of a moot point for us.

Or did you have another suggestion for utilizing the status profile? I have not used it before and a not that familiar with the functionality but, from what I could see, it might work for disabling the entire transaction but not for the specific fields. Please correct me if I'm wrong.

Thank you.

jpfriends079
Active Contributor
0 Kudos

Hi Jelena,

First of all I like to understand your current configuration. And for that I have few questions.

Can you share, what is the Requirement type getting determined for the sales order? If that is custom one. Can you share the screenshot for the respective requirement class?

Further, for this MTO, whether material are produced internally or procured externally or its a mix?

Thanks, JP

Jelena
Active Contributor
0 Kudos

Thanks for a reply, JP. Yes, we have a custom requirement type. The screenshot of the class is below. For MTO everything is produced internally.