Hi All,
My Requirement :
On save, if header status is changed, send the new status to Third party | Header status = ZEDUHDR | ZSD_<ThirdPary>_STATUS_UPD |
I have applied the code in the user exit USEXIT_SAVE_DOCUMENT --> fm : Z_MV45AFZZ_SAVE_DOCUMENT as below :
SELECT SINGLE estat INTO l_estat FROM tj30t
WHERE stsma = 'ZEDUHDR' AND txt04 = 'RVW' AND spras = 'EN'.
READ TABLE it_status WITH KEY stat = l_estat.
IF sy-subrc EQ 0.
status_code = 5.
return-message = 'Order status is in Review'.
APPEND return.
RETURN.
ENDIF.
SELECT SINGLE estat INTO l_estat FROM tj30t
WHERE stsma = 'ZEDUHDR' AND txt04 = 'APP' AND spras = 'EN'.
READ TABLE it_status WITH KEY stat = l_estat.
IF sy-subrc EQ 0.
status_code = 6 .
return-message = 'Order status is Approved'.
APPEND return.
RETURN.
ENDIF.
But When I am changing the status from review to approve in VA02 transactioin HEADER-->STATUS and trying to SAVE it is not triggering the above user exit
USEXIT_SAVE_DOCUMENT .
Could you please suggest which user exit will be suitable to trigger when the status is changed .
Thank you.
Regards,
Bharat