SAP ABAP - Trigger Purhcase Requisition Workflow From BADI ME_REQ_POSTED
BADI NAME : ME_REQ_POSTED
METHOD if_ex_me_req_posted~posted.
DATA: lt_pr TYPE TABLE OF eban,
ls_pr TYPE eban,
lv_objkey TYPE swr_struct-object_key,
ls_eban LIKE LINE OF im_eban.
IF im_eban_old IS INITIAL.
READ TABLE im_eban INTO ls_eban INDEX 1.
IF sy-subrc = 0.
IF ls_eban-ernam = 'ABAP01'.
lv_objkey = ls_eban-banfn.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
object_type = 'BUS2105'
object_key = lv_objkey
event = 'CREATED'
commit_work = 'X'.
ENDIF.
ENDIF.
ENDIF.
ENDMETHOD.
Comments
Post a Comment