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.
SAP standard PPF can be differentiated from Production order GR and other GR. Production Order GR default is mapped to IRM document type. PPF can set by document type level.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For EWM use the standard PPF for the GR. if you need some custom logic as like only for prouduction order , implement a custom start sequence and implement the badi in it .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Dear Chirag
It is not easy to tell by seeing code. Could analyse debug while processing with the help of abap. if possible so please post the screen shot and step.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 16 | |
| 16 | |
| 5 | |
| 2 | |
| 2 | |
| 2 | |
| 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.