SAP ABAP - User Exit Set Batch Characteristic Value In MIGO Goods Receipt
Customer Exit : MBCFC004 (EXIT_SAPMM07M_004)
Set Up Customer Exit for Classification of User-Defined Characteristics
You use SAP enhancement MBCFC004 EXIT_SAPMM07M_004, which contains function module exit EXIT_SAPMM07M_004 to classify user-defined characteristics automatically during goods movements in Inventory Management.
This is only possible for characteristics which are not assigned values during quality inspection.
Requirements
- 1. The class of the batch to be classified must be known. This means that a class must be assigned either to the material or at least to one batch of this material.
- 2. The exit call must be activated for the respective movement type in activity Activate batch classification during goods movements in IM using indicator 'Extended classification'.
Open tcode OMCV
ZBATCH
IF i_mseg-bwart = '101'.
*-- Data Declarations
DATA : t_characters LIKE characters OCCURS 0 WITH HEADER LINE.
DATA : t_attributes LIKE api_ch_att OCCURS 0 WITH HEADER LINE.
DATA : t_values LIKE api_val_i OCCURS 0 WITH HEADER LINE.
**-------------------GOODS MOVEMENT DETAILS FOR THE ORDER ENTERED----------
t_characters[] = characters[].
t_attributes[] = attributes[].
t_values[] = values[].
LOOP AT t_characters.
CASE t_characters-atnam.
WHEN 'ZKONTRAK'.
* v_year = w_aufk-zzsaisj.
t_values-atinn = t_characters-atinn.
t_values-atnam = t_characters-atnam.
t_values-atwtb = 'TEST-EXIT'.
APPEND t_values TO values.
CLEAR t_values.
ENDCASE.
ENDLOOP.
ENDIF.
*-- Data Declarations
DATA : t_characters LIKE characters OCCURS 0 WITH HEADER LINE.
DATA : t_attributes LIKE api_ch_att OCCURS 0 WITH HEADER LINE.
DATA : t_values LIKE api_val_i OCCURS 0 WITH HEADER LINE.
**-------------------GOODS MOVEMENT DETAILS FOR THE ORDER ENTERED----------
t_characters[] = characters[].
t_attributes[] = attributes[].
t_values[] = values[].
LOOP AT t_characters.
CASE t_characters-atnam.
WHEN 'ZKONTRAK'.
* v_year = w_aufk-zzsaisj.
t_values-atinn = t_characters-atinn.
t_values-atnam = t_characters-atnam.
t_values-atwtb = 'TEST-EXIT'.
APPEND t_values TO values.
CLEAR t_values.
ENDCASE.
ENDLOOP.
ENDIF.
Comments
Post a Comment