AdvancedSAP ERP / S/4HANAQM / Subsystem and LIMS Interfaces

SAP QM Integration With LIMS: How the Hand-Off Works

Question
sap qm integration with lims

Also searched as

  • sap qm and lims integration
  • lims integration with sap qm
  • sap qm lims interface qm-sti

Short answer

A LIMS connects to SAP QM by receiving the inspection lot and its characteristics, running the lab work, then returning results (and sometimes the usage decision) to SAP. The main options are the QM-STI subsystem interface, released BAPIs such as BAPI_INSPOPER_RECORDRESULT, IDocs through middleware, or modern APIs. Choose by who owns the usage decision.

Applies to: SAP ECC 6.0 and S/4HANA QM; LIMS products vary, and many ship their own SAP adapter

Planning the integration

  1. 1Decide the system of record for each object: inspection plans and lots in SAP, samples and analytical results in LIMS.
  2. 2Standardise master data first: material, plant, batch, master inspection characteristics and method IDs must map one to one between SAP and the LIMS.
  3. 3Choose the transport: QM-STI for classic subsystem exchange, BAPIs or RFC through middleware, IDocs, or an API on the SAP side.
  4. 4Pass the inspection lot, operations, characteristics, sample information and batch from SAP to the LIMS when the lot is created.
  5. 5Return results by characteristic to the inspection lot using the results recording BAPI or the subsystem interface.
  6. 6Decide where the usage decision is made. Either the LIMS proposes and SAP decides, or SAP makes it automatically from valuation.
  7. 7Test rejections, retests, re-sampling, cancelled lots and rounding or unit conversion before go-live.

The interface options

QM-STI is SAP's subsystem interface for QM. External systems register as subsystems, receive inspection tasks, and return results. It is the older, well-known path for lab and measuring systems and is still found in many plants.

The alternative is calling released function modules and BAPIs, such as BAPI_INSPLOT_GETLIST and BAPI_INSPOPER_RECORDRESULT, usually through middleware like SAP Integration Suite or an ESB, with IDocs where asynchronous exchange is preferred. Many LIMS vendors supply a connector, so check what yours supports before building one.

What flows each way

Outbound from SAP: inspection lot number, material, batch, plant, characteristics with tolerance, method and unit, sample size, and due dates. Inbound to SAP: results per characteristic (mean values or single values), valuation (accept or reject), and in some designs the proposed usage decision with a code from the catalog.

Keep units and decimals consistent. A common failure is the LIMS reporting in a different unit or precision than the master inspection characteristic, so SAP rejects the value or valuates it wrongly.

Where integrations fail

Typical problems are locked inspection lots (the result is being edited in QE51N), characteristics that do not exist in the plan, closed characteristics already confirmed, and lots whose usage decision is already made.

Treat the interface as eventually consistent: queue results, log every message, and build a visible error list so the lab does not have to guess whether a result reached SAP. Plan for reprocessing, because lab systems resend after downtime.

Try it here, free

SAP QM Usage Decision BAPI Skeleton

Open full tool

An ABAP skeleton for recording an inspection lot usage decision through the standard BAPI, with error handling and a commit only when no error is returned.

Common pitfalls

  • !Mapping characteristics by text instead of by master inspection characteristic ID.
  • !Letting both systems make the usage decision, creating conflicting stock postings.
  • !Ignoring batch determination and shelf-life data that QM and LIMS both touch.
  • !No retry or dead-letter handling when SAP is down for maintenance.
  • !Skipping unit and precision tests on real values.

How an ERP-grounded AI assistant handles this

A private AI layer can sit beside the integration rather than replace it: it can read inspection lots and results from SAP QM, explain why a lot is stuck waiting for LIMS results, and summarise out-of-spec trends. Any write to SAP still goes through the controlled interface with approval.

Frequently asked questions

What is QM-STI?

It is the SAP QM subsystem interface that lets external systems such as lab or measuring systems receive inspection requests and return results. It is a classic option for LIMS and shop-floor measuring tools connected to SAP QM.

Can LIMS make the usage decision?

It can propose or supply a valuation, but the formal usage decision and stock posting are SAP QM functions. Most designs let SAP decide automatically from valuation and have a person confirm exceptions.

Does SAP provide a LIMS?

SAP QM covers inspection planning and results but not a full laboratory system. Sample management, instruments and analytical workflows normally come from a separate LIMS product.

Which interface should I choose?

Use what your LIMS vendor supports and what your integration team can run. QM-STI suits classic subsystems, BAPIs and IDocs suit middleware designs, and newer APIs suit S/4HANA with a cloud or hybrid platform.

Related

Error fix

SAP QM: Inspection Lot Not Created at Goods Receipt

An inspection lot is created only when QM is active for the plant, the material has an active inspection type for the goods movement, and the material carries a QM control key. Check the Quality Management view in MM02, confirm inspection type 01 (purchase order) or 04 (production order) is active, then check QM activation in the plant and the goods movement used.

How-to

SAP QA11 Usage Decision: Make It and Post Stock Correctly

The usage decision (UD) in QA11 closes an inspection lot, assigns a quality score and a UD code such as accepted or rejected, and posts the lot quantity from quality inspection stock to unrestricted use, blocked stock, scrap or return to vendor. The UD is blocked until required inspection characteristics are closed and results are recorded.

How-to

How to Create a MIC (Master Inspection Characteristic) in SAP QM

A MIC is a reusable inspection characteristic in SAP QM, created in QS21 with a plant, a name and a version, then defined as quantitative (measured values with limits) or qualitative (codes from a catalog). Inspection plans (QP01) pick MICs so tolerances are maintained once. MIC data is in table QPMK, with text in QPMT.

Error fix

SAP M7 021: Deficit of SL Stock Quantity

M7 021 fires during a goods issue, delivery, or confirmation when SAP checks the unrestricted-use (SL) stock for the exact plant, storage location and batch combination and finds less than what you are trying to post out. Fix the entry (batch, storage location, quantity) first; only enable negative stock or downgrade the message to a warning if the business genuinely needs to post ahead of a receipt.

Error fix

SAP IDoc Status 51: Application Document Not Posted

Status 51 tells you the IDoc reached the application layer and failed to post, but the status text itself is not the error - the real cause sits in the status record's long text or the linked application log. Fix the underlying data or configuration, then reprocess the IDoc through BD87 rather than editing the status.

Error fix

SAP Short Dump TIME_OUT: Maximum Runtime Exceeded

A TIME_OUT runtime error means a dialog (or RFC) work process ran longer than the maximum allowed runtime, controlled by profile parameter rdisp/max_wprun_time (600 seconds by default). The fix is almost always to move the long-running work to background processing or tune the underlying program, not to raise the timeout.

AI for ERP

AI for SAP Quality Management: Notifications, 8D, and CAPA Without the Manual Drafting

AI grounded on SAP QM data that triages notifications, drafts 8D and CAPA reports, and summarizes inspection trends, deployed on-prem for full traceability.

AI for ERP

AI Agents for ERP, Running On-Prem

A practical guide to on-prem AI agents for ERP: what they can safely automate, where human approval belongs, and how to design the guardrails.

Stuck on SAP ERP / S/4HANA?

Talk to engineers who work inside SAP ERP / S/4HANA every week, and who build private AI that answers these questions from your own ERP data.

Keep exploring

Free tools

ERP fixes and how-tos

Runs with your ERP

AI on your ERP