03-18-2010 3:37 PM
Hi all,
During transaction MIGO, I need to update the field MCH1-LICHA with the same value of a centair batch classification.
I've habe implementer the badi ZMB_MIGO_BADI and in the method POST_DOCUMENT I need to get the batch classification
for each material.
Does anybody know how get these values ? I've tried to use this FM CLFM_GET_AUSP_FROM_BUFFER but it seems not working.
I thank you in advance.
Regards
03-18-2010 3:41 PM
Hi,
Can you please refer to Snote:Note 373813.
detailed procedure is there for your requirement.
Regards,
Venkat.
03-18-2010 3:41 PM
Hi,
Can you please refer to Snote:Note 373813.
detailed procedure is there for your requirement.
Regards,
Venkat.
03-23-2010 12:54 PM
I have solved in this way:
Enhancement: MBCFC003
EXIT_SAPMM07M_003
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Exit per riportare nel campo MCH1-LICHA il valore della caratteristica
"Numero Colata" indicata nella classificazione.
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DATA: ls_mch1 TYPE mch1.
DATA: ls_mcha TYPE mcha.
DATA: ls_ausp TYPE ausp.
DATA: lt_ausp LIKE TABLE OF ls_ausp.
DATA: l_atinn TYPE atinn.
DATA: l_objnum TYPE objnum.
Ottengo i dati relativi alle partite del materiale
dal buffer di memoria
CALL FUNCTION 'VB_BATCH_READ_BUFFER_DB'
EXPORTING
matnr = i_mseg-matnr
charg = i_mseg-charg
werks = i_mseg-werks
read_from_buffer = 'X'
read_from_db = ' '
lock_batch = ' '
IMPORTING
mch1_buffer = ls_mch1
mcha_buffer = ls_mcha
EXCEPTIONS
no_material = 1
no_batch = 2
no_plant = 3
lock_on_batch = 4
OTHERS = 5.
Ottengo la codifica interna della caratteristica
'COLATA'.
CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
EXPORTING
input = 'COLATA'
IMPORTING
output = l_atinn.
Ottengo il valore indicato nella classificazone
dal buffer di memoria
IF sy-subrc EQ 0.
l_objnum = ls_mch1-cuobj_bm.
CALL FUNCTION 'CLFM_GET_AUSP_FROM_BUFFER'
EXPORTING
object = l_objnum
object_is_cuobj = 'X'
atinn = l_atinn
i_no_db_select = 'X'
TABLES
exp_ausp = lt_ausp.
Riporto il valore della caratteristica 'COLATA'
nel campo batch_master_data-licha.
LOOP AT lt_ausp INTO ls_ausp
WHERE atinn = l_atinn.
batch_master_data-licha = ls_ausp-atwrt.
EXIT.
ENDLOOP.
ENDIF.