业务需求:创建内部订单后,自动审批内部订单订单(状态改为REL)
函数:I_CHANGE_STATUS
单据状态表:JEST
单据状态描述表:TJ02T
DATA lv_object TYPE char22 .
lv_object = 'OR' && p_lv_aufnr .
"修改内部订单状态为REL
CALL FUNCTION 'I_CHANGE_STATUS'
EXPORTING
objnr = lv_object
estat_inactive = 'I0001'
estat_active = 'I0002'
EXCEPTIONS
cannot_update = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.