Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Change batch number field during post goods issue

Former Member
0 Kudos
483

Hello,

During one step transfer posting i want to change the batch number during goods receipt via transaction VL02N.

I have tried using the below exits and badi without success.

Exit EXIT_SAPMM07M_010

mb_document_badi

LE_SHP_GOODSMOVEMENT

Below is the code i have implemented in the exit

clear v_vbeln.

select single vbeln into v_vbeln

from likp

  • select * from likp

where vbeln = i_mkpf-le_vbeln

and vstel = c_vstel

and werks = c_werks

and lfart = c_lfart.

IF sy-subrc = 0.

e_charg = 'X'.

ENDIF.

If any body has implemented same functionality kindly help.

Regards,

Koustubh

3 REPLIES 3

Former Member
0 Kudos
87

Hello Friends,

Please help me on this.

Just to simplify my question ,How can we update batch number field in MSEG table during transfer posting.

Regrads,

Koustubh

0 Kudos
87

Hi,

In the BADI LE_SHP_GOODSMOVEMENT, inside method CHANGE_INPUT_HEADER_AND_ITEMS, loop the parameter CT_XIMSEG.

For each line in CT_XIMSEG, change the value of CT_XIMSEG-CHARG according to you logic and modify the internal table CT_XIMSEG transporting the valude of CHARG.

Check whether now it is getting updated in MSEG.

Regards,

Harish

0 Kudos
87

Hello,

Thanks for your reply but the badi LE_SHP_GOODSMOVEMENT doesnt solve my purpose as i want to change the batch number for the plant to which the stock is being transfered.Changing the value in ci_xmseg would change the value in source plant.

How ever we have resolve the issue by implementing an Enhancement spot inside the Function module MB_CREATE_GOODS_MOVEMENT by changing the value in internal table 'fuss' .

Regards,

Koustubh