Application Development and Automation 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: 
Read only

Align components´ batch number with main material batch number in subcontracting PO´s

Former Member
0 Likes
890

Hi experts!!

We have a subcontracting PO line; that is, a PO line with position type “L”.  The material in the PO line has its structure. This material is batch managed and there are some material codes within its structure which are managed by batches too.

When making PO line´s GR we would like to enter main material´s batch number and the system to propose for the rest of the components  managed by batches the same batch number that we have entered.

I have tried with enhancement MBCFC010, exit EXIT_SAPMM07M_010 -> Include ZXMBCU10

I have added this code:

V_charg is a global variable I have defined:

if i_mseg-bwart = '101' and not i_mseg-charg is initial.
v_charg
i_mseg-charg.

  1. endif.

    if i_Mseg-bwart = '543' and i_vm07m-xchpf = 'X' and i_mseg-charg is initial.
    e_Charg
    = v_charg.
    endif.

My problem -> if user does not enter batch number for main material ->

V_charg is blank and I am not able to recover  that value.

Thanks in advance.

Hi experts!!

We have a subcontracting PO line; that is, a PO line with position type “L”.  The material in the PO line has its structure. This material is batch managed and there are some material codes within its structure which are managed by batches too.

When making PO line´s GR we would like to enter main material´s batch number and the system to propose for the rest of the components  managed by batches the same batch number that we have entered.

I have tried with enhancement MBCFC010, exit EXIT_SAPMM07M_010 -> Include ZXMBCU10

I have added this code:

V_charg is a global variable I have defined:

if i_mseg-bwart = '101' and not i_mseg-charg is initial.
v_charg
i_mseg-charg.

  1. endif.

    if i_Mseg-bwart = '543' and i_vm07m-xchpf = 'X' and i_mseg-charg is initial.
    e_Charg
    = v_charg.
    endif.

My problem -> if user does not enter batch number for main material ->

V_charg is blank and I am not able to recover  that value.

Thanks in advance.

2 REPLIES 2
Read only

muralibhat1
Explorer
0 Likes
754

"When making PO line´s GR we would like to enter main material´s batch number and the system to propose for the rest of the components  managed by batches the same batch number that we have entered." Why same batch for components as well?.


Normally we issue components to sub contractor through subcon delivery. We get component batches from PO history table. We need to assign component batches from subcon delivery while receiving main assembly.

Read only

Former Member
0 Likes
754

Hi!! It´s me again.

I have also give a try with this other way:

I have implemented badi MB_MIGO_BADI. I have written this code i method LINE_MODIFY:

method IF_EX_MB_MIGO_BADI~LINE_MODIFY.

 

if cs_goitem-bwart = '101' and not cs_goitem-charg is initial. " Si es el material padre recogemos el num.lote introducido

   v_charg = cs_goitem-charg.

endif.

if  cs_goitem-bwart = '543' and cs_goitem-charg is initial. " Si es el componente le asignamos el num.lote del padre

   cs_goitem-charg = v_charg.

endif.

endmethod.

I get message MIGO - 050-

BAdI: El campo GOITEM-CHARG no está listo para entrada (la modificación n

se toma)

No field is filled.

It would be perfect if message would´nt appear. What could I do against this message?

Thank in advance.