SAP ERP doesn’t directly capture the country of origin during a MIGO goods receipt for a newly created batch. However, you can achieve this through implementing a User Exit.
Additional batch data, such as the country of origin, region of origin, and freely available date fields, can be changed only in user exits. To create a new batch for the goods movement, use the exit EXIT_SAPMM07M_003.
MCHA-HERKL is not automatically updated based on the purchase order during a goods receipt. You must use user exit EXIT_SAPMM07M_003
The user-exit EXIT_SAPMM07M_003 is in
Enhancement: “MBCFC003” – Maintenance of batch master data for goods movements”
(Use transaction: CMOD to activate the exit and assign enhancement).
Question: Why is the user exit EXIT_SAPMM07M_003 processed for some batches but not for others?
Answer: The user exit EXIT_SAPMM07M_003 is processed only if the batch is newly created by the goods movement. This may have different consequences depending on the batch definition level.
To determine the country of origin (CoO) you can use proper setup of segmentation field. Documentation here:
SAP docs on segmentation functionality:
Segmentation (LO_SEGMENTATION) is a new SAP ERP component, integrated into:
- LO Material Master
- SD Sales
- MM Purchasing
SGT_CATS – ABAP table: Segmentation Structure Fields Table
SGT_CSEGSCON – ABAP table with segmentation rules defined
SGT_VALS – ABAP table with Segmentation-Valid Combinations
Continue reading S/4HANA material segmentation, Country of Origin (CoO) in MIGO