on 07-01-2015 11:47 AM
Hi Experts
Is there any way to block the change on PM order via user status.
Requirement is, when a user status is set to block the change in PM order, user should not allow to do any change in PM order unless the user status is set to allow for change.
Regards
Saidasan
Hello Saidasan,
In my opinion user-exit solution works well for such requirements. IWO10009 is the user-exit here. In your specific case the following code in include ZXWOCU07 would fulfill your requirement.
Assuming your user status is WCNP which should stop changes in Order, then the code is:
DATA:I_STAT LIKE JSTAT OCCURS 0 WITH HEADER LINE,
L_OBJNR TYPE J_OBJNR.
SELECT SINGLE OBJNR FROM AUFK INTO L_OBJNR WHERE AUFNR = CAUFVD_IMP-AUFNR.
CALL FUNCTION 'STATUS_READ'
EXPORTING
OBJNR = L_OBJNR
ONLY_ACTIVE = 'X'
TABLES
STATUS = I_STAT.
IF SY-TCODE = 'IW32'.
LOOP AT I_STAT.
IF I_STAT-STAT = 'E0001'.
MESSAGE: 'You can not make changes in Order with ''WCNP'' status'
TYPE 'E' DISPLAY LIKE 'I'.
ENDIF.
ENDLOOP.
ENDIF.
Note: 'E0001 ' value used in the code above, is the code for WCNP status in table TJ30T.
This code throws the following pop-up where user tries to change the Order which has WCNP user status set. If the userstatus is changed then the changes can take place.
Good luck
KJogeswaraRao
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saidasan
When you define the User Statuses in OIBS, double click on the user status after defining.
You can see the Business transactions. Click on create icon, you will have business process applicable.
You can block the business transaction as required there.
Regards
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
9 | |
8 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.