Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

With FM 'STATUS_CHANGE_EXTERN' update problem

Dears ,

when use this FM ' STATUS_CHANGE_EXTERN' it is update in debug mode but when use it in normal session not make update ,

for yours info i used : fm ' STATUS_UPDATE_DIALOG' after it and COMMIT WORK AND WAIT but no result .

Best Regards ,

Mostafa .

Former Member
replied

Hello Mostafa,

There is no need for Commit work for this fm while using it in exit or program. It needs only for test sequences while testing in SE37. I have just texted this fm in the exit IWO10009 and it is working perfectly.

See this code I used in include ZXWOCU07

IF caufvd_imp-equnr = '000000000050000331'.

CALL FUNCTION 'STATUS_CHANGE_EXTERN'
     EXPORTING
       objnr                     = caufvd_imp-objnr
           user_status               = 'E0006'
           set_inact                 = 'X'.

CALL FUNCTION 'STATUS_CHANGE_EXTERN'
     EXPORTING
       objnr                     = caufvd_imp-objnr
           user_status               = 'E0007'
           set_inact                 = ''.

ENDIF.

What this code does is,

  • If the Equipment number in the Order is '50000331'  (1st and  last lines of the code),
  • Then while Saving the Order it will remove the user-status with code E0006 (code lines 2 to 6)
  • And Sets the user status with code E0007 (code lines 7 to 11).

So I hope I need not explain other things like,how you will write the logic for hard-coded Equipment above and you need not use the fm twice as used above, in case you do not require to De-assign any user-status etc.

So once again: There is no need for Commit work or other things.

Also:

Ensure that the user-exit is a part of some project created through CMOD, which is a pre-requisite for any exit to function. Means all SMOD jobs would work only when that exit is mentioned in the Enhancement list of some project created through tcode CMOD.

Good luck

KJogeswaraRao

1 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question