9 hours ago
Hello Everyone,
I am working on automating the QE11 inspection result recording process through BAPI in SAP QM, and I have encountered a challenge related to formula-based MIC calculation.
**Background:**
In QE11, we have an inspection operation with multiple characteristics (MICs). One specific MIC — let's call it MIC 0020 ("AC Total Yarn Fault") — is configured with a formula in QP03 that automatically calculates the sum of all recorded defect values. This calculation is triggered when the inspection lot is unlocked (put into process) and the result is locked after computation. The field is display-only in QE11, meaning it cannot be manually entered — SAP computes and populates it internally.
**What We Are Trying to Achieve:**
We are replicating this QE11 flow programmatically using the BAPI `BAPI_INSPOPER_RECORDRESULTS`. The defect recording and result mapping for other MICs are working correctly. However, for MIC 0020, since it is formula-driven and display-only, passing the value directly via the BAPI is not possible — SAP does not accept manual input for this characteristic.
**The Core Question:**
When the unlock/lock action is performed in QE11, SAP internally triggers a formula function module (likely from the `QEFC_*` or `QEFM_*` namespace) that computes the summed result and writes it back to the characteristic. We need to replicate this same backend calculation programmatically.
Specifically, we would like to know:
1. How do we identify the exact formula function module assigned to a formula-based MIC from QP03 configuration (table `QPMA`, field `FORMELNR`)?
2. What are the standard import/export parameters for such formula FMs, and how should they be called in ABAP after recording the other MIC results?
3. Does the formula FM write the computed value directly to inspection tables (`QAMR`/`QAMV`), or does it return the value for us to pass back via BAPI?
**System Details:**
- S/4HANA (QM Module)
- BAPI Used: `BAPI_INSPOPER_RECORDRESULTS`
- MIC Type: Formula-based, display-only, result = sum of all defect characteristics
Any guidance, sample code, or pointers to relevant SAP notes would be greatly appreciated.
Thankyou
Request clarification before answering.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.