Hi Dennis,
I have checked the possibilities.
What I understand is you do not want to sacrifice the integration between Notification Type and Order, yet you want to achieve the required effects.
If this is your case, perhaps my work can help you.
1. Remove Forbidden from Assign Order Business Function. (Change it to No Influence)
Write the following code in the User Exit IWO10009 .
DATA: LV_PHASE TYPE VIQMEL-PHASE.
IF CAUFVD_IMP-AUART = 'ZM02'. "Change your Order Type here
IF SY-TCODE = 'IW21'.
MESSAGE: 'Order Creation not allowed before Notification is saved' TYPE 'E'.
ENDIF.
IF SY-TCODE = 'IW22'.
SELECT SINGLE PHASE FROM VIQMEL INTO LV_PHASE WHERE QMNUM = CAUFVD_IMP-QMNUM.
IF LV_PHASE = '1'.
MESSAGE: 'Order Creation not allowed while the Notification is in Initial status' TYPE 'E'.
ENDIF.
ENDIF.
ENDIF.
Let me explain what this code does.
1. When you try to create a ZM02 Type Order from Notification Creation Screen (IW21),
SN | Action | Effect |
---|---|---|
1. | When you try to Create a ZM02 type of Order from Notification Create Screen (IW21), | Error Displayed 'Order Creation not allowed before Notification is saved' |
2 | When you try to Create a ZM02 type of Order from Notification Change Screen (IW22), but with Notification is in OSNO stage (means your INIT user status) | Error Displayed 'Order Creation not allowed while the Notification is in Initial status' |
3 | When you try to Create a ZM02 type of Order from Notification Change Screen (IW22), but with Notification is in NOPR stage. |
No Error, Order is created. |
Note:
For SN3 you need to put the Notification into NOPR status and Save Notification Once. Next Re-enter through IW22, then the Order is created.
I feel this is wither your rquirement OR very close to your requirement. With this idea you will be able to meet things left, if any, through minor code changes. (May be then you need Technicial help)
Best of Luck
Jogeswara Rao K