on 2021 Sep 01 8:26 PM
Hi,
We are trying to automate some process in EWM and need to post GR for Inbound delivery for Production order. We have used following methods in the sequence but we are not able to post GR. We are also not receiving any error. If you can assist in what we may be missing here. Thanks!
/scwm/cl_goods_movement=>/scwm/if_gm_dlv~cleanup( ).
DATA(lv_gmcat) = CONV /scdl/dl_doccat( 'GR' ).
DATA(lt_dlv) = VALUE /scwm/dlv_docid_item_tab(
( docid = ls_docid-docid
doccat = ls_docid-doccat ) ).
/scwm/cl_goods_movement=>/scwm/if_gm_dlv~post_dlv(
EXPORTING
it_dlv = lt_dlv
iv_gmcat = lv_gmcat
* iv_post_part =
iv_keep_data = abap_true
IMPORTING
eo_message = DATA(lo_message) ).
IF lo_message IS BOUND.
DATA(lt_message) = lo_message->get_messages( ).
IF line_exists( lt_message[ msgty = 'S' ] ).
CLEAR lt_message.
FREE lo_message.
/scwm/cl_goods_movement=>/scwm/if_gm_dlv~save_gm(
IMPORTING
eo_message = lo_message ).
IF lo_message IS BOUND.
lt_message = lo_message->get_messages( ).
ENDIF. " IF lo_message IS BOUND
COMMIT WORK.
ENDIF. " IF line_exists( lt_message[ msgty = 'S' ] )
ENDIF. " IF lo_message IS BOUND
CATCH cx_root INTO DATA(lo_root).
ENDTRY.
Request clarification before answering.
why not use the standard PPF "/SCWM/PDI_02_GR_POST"? why custom code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.