05-18-2010 1:07 PM
Hello,
I have a requirement to modify the field plant MSEG-WERKS while doing goods issue of outbound delivery via transactiona VL02N.
Can anybody suggest me which BADI or user exit should i use.I have searched the SDN and all the previous threads on this haven't yeild any solution for this.
I have tried with below listed Badis and enhancements which wont work.
Badi
===================
MB_DOCUMENT_BADI
MB_MIGO_BADI
LE_SHP_GOODSMOVEMENT
DELIVERY_PUBLISH
Enhancements
===============
MB_CF001
MBCF0005
Thanks and Regards,
Koustubh
05-18-2010 1:11 PM
Hi kausthab,
Try this. But put sy-tcode condition b4 the code.
Write below code in exit: EXIT_SAPMM07M_001
FIELD-SYMBOLS: <WERKS> TYPE any,
<WORKS> TYPE any.
ASSIGN '(SAPMM07M)MSEG-WERKS' TO <WERKS>.
assign (<WERKS>) to <WERKS1>.
<WERKS1> = 'ur plant'.
--
Reddy
05-18-2010 1:11 PM
Hi,
You can use badi "LE_SHP_GOODSMOVEMENT". Use method "CHANGE_INPUT_HEADER_AND_ITEMS" in this Badi.
You can modify the structure field CT_XIMSEG-WERKS to update Site in MSEG.
Regards
Vinod
03-23-2011 9:47 AM
Hi,
I am facing a similar issue of updating the MSEG-DMBTR field when Post Goods reciept is done in VL02n.
I hav tried to update the value in LE_SHP_GOODSMOVEMENT BADI and tried to modify the structure .
eg in this way
method IF_EX_LE_SHP_GOODSMOVEMENT~CHANGE_INPUT_HEADER_AND_ITEMS.
data: wa1 type LINE OF shp_imsegvb_t. "IMSEGVB.
DATA: flag TYPE c.
LOOP at CT_XIMSEG INTO wa1.
wa1-dmbtr = '12345'.
MODIFY CT_XIMSEG FROM wa1.
" TRANSPORTING dmbtr.
flag = 'x'.
ENDLOOP.
endif.
endmethod.
The value gets updated in the structure but when the material document gets created then the table MSEG has the amount DMBTR field not changed.
Also, I tried doing the updation in the Function eXit : EXIT_SAPMM07M_001 by the method mentioned in different threads:
betweeb statemnet if sy-tcode = 'VL02n'
FIELD-SYMBOLS: <DMBTR> TYPE any,
<DMBTR1> TYPE any.
ASSIGN '(SAPMM07M)MSEG-DMBTR' TO <DMBTR>.
assign (<DMBTR>) to <DMBTR1>.
......
But still on save of the material document in MSEG I cannot find the new DMBTR field value.
Kindly help me on this, urgently required. I have already gone through the number of threads in the forum, but no solution.
06-14-2011 4:53 PM
Hello,
Did you find out how to change MSEG-DMBTR ? I have the same issue.
Thanks,
Tania
09-06-2016 11:23 AM
Hi.,
I am also trying to update MSEG-DMBTR while doing PGI.. if you have any idea on this, can you pls share with us.,
-Mahendran
06-15-2011 8:14 AM
Hi
Be careful always during the PGI. Read these notes:
Note 415716 - User exits in delivery processing
Note 1284654 - Caution with implementations of the BAdI: MB_DOCUMENT_BADI
Note 92550 - Stock inconsistency due to customer enhancement (exit, BAdI)
I suggest to read the first note to find the proper userexit. MB_MIGO_BADI only works with tcode MIGO.
Think also what kind of impact it will have on ATP, transfer of needs and so on.
I hope this helps you
Regards
Eduardo