cancel
Showing results for 
Search instead for 
Did you mean: 

SAP S/4 EWM ABAP Goods movement BAPI or Class or API

srujanam
Explorer
0 Kudos
1,121

Hi 

I am new to SAP EWM S/4 and wanted to know how to perform Goods receipt like a Class or API that I could use. 

It seems EWM S/4 coding is a bit different. Could you please guide me through this. 

Accepted Solutions (1)

Accepted Solutions (1)

Jayesh_Jurani
Explorer
0 Kudos

DATA: 

lt_dlv TYPE /scwm/dlv_docid_item_tab,

ls_dlv       TYPE /scwm/dlv_docid_item_str,

lo_message   TYPE REF TO /scdl/cl_dm_message.

ls_dlv-doccat = 'PDI'.
ls_dlv-docid  = iv_docid. "Header Document id of inbound delivery
APPEND ls_dlv TO lt_dlv.

/scwm/cl_goods_movement=>post_dlv(
        EXPORTING
          it_dlv      = lt_dlv
          iv_gmcat    = /scwm/if_docflow_c=>sc_gr
        IMPORTING
           eo_message = lo_message ).

Also, please ensure that you use cleanup method of the same class before calling the post_dlv method. Also, a commit work is needed if you are not executing your code under update task.

srujanam
Explorer
0 Kudos
Hi Thanks for the reply, How do we populate data into the delivery item like Qty etc, as this Class method only accepts Delivery # as input.
srujanam
Explorer
0 Kudos
We cannot enter anything in this method. So we would have to call /SCW/CL_DLV_MANAGEMENT_PRD=>ITEM_UPDATE method to update the quantity first and then post the Goods movement.

Answers (1)

Answers (1)

Muhammad_Ashraf
Explorer
0 Kudos

Dear Sujan,

you can use /scwm/cl_goods_movement => /scwm/if_gm_dlv  and call this in your program which will help you to post the GRN.

 

srujanam
Explorer
0 Kudos
Hi Thanks for the reply, How do we populate data into the delivery item like Qty etc, as this Class method only accepts Delivery # as input.