on 02-16-2008 2:53 PM
Dear Expert,
How to update User Status in SO via user exit?
Cheers
you can use function STATUS_CHANGE_EXTERN
OBJNR is the obj# in VBAK or VBAP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can put in EXIT MV45AFZZ
If you wan to change the status when the SO is SAVE, you can put the code in form USEREXIT_SAVE_DOCUMENT_PREPARE
The following is example for changing status at header level
CALL FUNCTION 'STATUS_CHANGE_EXTERN'
EXPORTING
OBJNR = VBAK-OBJNR
USER_STATUS = 'E0001' "Initial Status
SET_INACT = ' '
SET_CHGKZ = 'X'
EXCEPTIONS
OBJECT_NOT_FOUND = 1
STATUS_INCONSISTENT = 2
STATUS_NOT_ALLOWED = 3
OTHERS = 4.
Hi,
Based on which status you would like to update, go to the JEST Table and look for "X" flag, which says which status is currently active.
Reward if helpful
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.