Hi Preeti,
I've just worked on your requirement.
The code you need to give in the include (ZXWOCU07) of Enhancement IWO10009 is as under.
DATA: LV_VAPLZ TYPE AUFK-VAPLZ,
LV_PSPEL TYPE AUFK-PSPEL.
IF SY-TCODE = 'IW32' AND SY-UNAME <> 'XXX_XXX'.
SELECT SINGLE VAPLZ FROM AUFK INTO LV_VAPLZ WHERE AUFNR = CAUFVD_IMP-AUFNR.
SELECT SINGLE PSPEL FROM AUFK INTO LV_PSPEL WHERE AUFNR = CAUFVD_IMP-AUFNR.
IF CAUFVD_IMP-VAPLZ <> LV_VAPLZ OR CAUFVD_IMP-PSPEL <> LV_PSPEL.
MESSAGE: 'You are not authorized to change the field values of ''Main. Work Center'' OR ''WBS Element''. ' TYPE 'E'.
ENDIF.
ENDIF.
The string 'XXX_XXX' in the code represents your Authorized UserId.
When, some other UserId changes either of these fields (Main Work Center or WBS element) and tries to Save the Order, then the following error is thrown by the system.
I have checked it, it is working fine.
Now, of you want to confine this restriction to a particular order type (say ZM03), then Insert the above code between these two lines.
IF CAUFVD_IMP-AUART = 'ZM03'.
"Above code here
ENDIF.
By this, the above restriction will be applicable to only 'ZM03' type orders.
Hope you'd take benefit out of this post.
Jogeswara Rao K