IF lt_vbap_sto[] IS NOT INITIAL.
CALL FUNCTION 'ZSD_UPDATE_VBAP_STO' IN UPDATE TASK
TABLES
it_vbap_sto = lt_vbap_sto.
ENDIF.
ENDIF.
es_return-type = 'S'.
es_return-message = '成功创建STO:' && lv_po.
es_result-ebeln = lv_po.
es_result-lifnr = is_head-lifnr.
es_result-lifre = is_head-lifre.
es_result-submi = is_head-vbeln.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ELSE.
es_return-type = 'S'.