06-04-2015 7:36 AM
Hello,
when we are doing goods receipt for the inbound delivery in T code VL32n, Inbound delivery is created for a Purchase order. when GR is done, the material document is created. In the material document in header level we have the "reference number field". In this field (MKPF-XBLNR), by default, the inbound delivery number is populated.
we want to over ride the inbound delivery number in field MKBF-XBLNR with some other value from Purchase order. Issue is as follows.
material document is created by standard SAP through standard FM "MB_POST_GOODS_MOVEMENT ". we are using a BADI " LE_SHP_GOODSMOVEMENT " to fetch value from PO (purchase order). we are passing this PO value to MKPF-XBLNR but when this FM "MB_POST_GOODS_MOVEMENT " is called, this FM is again over writing our new value with the original value (i.e. inbound delivery number ).
what is to be done so that FM does not over write the old value ?
regards
Pamela
06-04-2015 1:32 PM
Pamela,
I haven't checked when/why the over write happens but if this badi does not help, you can work with the badi MB_DOCUMENT_BADI. The method MB_DOCUMENT_BEFORE_UPDATE gets called before the update happens and the method MB_DOCUMENT_UPDATE gets called after commit.
Thanks,
Vikram.M
06-04-2015 1:42 PM
Hi Pamel,
May be try not to pass the xblnr value to fm MB_POST_GOODS_MOVEMENT.
Can you show us how you have called these both fms. Then we will be able to understand your problem.
regards,
Pranav.