SAP BAPIObjectBAPI_INSPOPER_RECORDRESULTSModuleQM

BAPI_INSPOPER_RECORDRESULTS — Record QM Inspection Results via BAPI

BAPI_INSPOPER_RECORDRESULTS posts characteristic results against an inspection lot operation, mirroring the results recording transaction QE51N. It is the standard integration point for LIMS, MES and shop-floor systems pushing measurement data into QM without a user typing into SAPGUI. It does not create the lot, does not commit the database itself, and its success cannot be judged from sy-subrc — only from the RETURN table content.

This page covers what BAPI_INSPOPER_RECORDRESULTS acts on, its key import and export parameters, and why commit handling and RETURN table inspection are the two places integrations built on this BAPI most often go wrong. It also covers ownership split between QM functional and interface development, and what still applies to this call on S/4HANA.

Published 16 Sept 2026· 1,020 words

What it does

BAPI_INSPOPER_RECORDRESULTS acts on an existing inspection lot, specifically on one operation within that lot, and records results for the inspection characteristics assigned to it. It mirrors the results recording transaction QE51N (and the older QE01/QE02 family), posting single or summarized characteristic values, valuation codes, and follow-up data such as defect records, without a user opening the SAPGUI screen. It is the usual integration point for LIMS systems, test-bench PLCs, and MES layers that need to push measurement data into QM automatically. It assumes the inspection lot already exists and the target operation is still open for results recording; it does not create the lot and does not perform the usage decision or lot closure — those are separate steps that follow once all required characteristics carry results.

Important parameters

  • INSPECTIONLOT - the inspection lot number the results are being posted against (import)
  • INSPECTIONOPERATION - the operation number within the lot to which the characteristics being recorded are assigned (import)
  • CHARACTERISTICRESULTS - table carrying the characteristic-level result data: characteristic number, single or summarized measured values, valuation code, and associated text or defect information (import table, exact field list should be checked in the interface's type definition before mapping)
  • RETURN - standard BAPI return table, one row per message generated during processing, carrying message type, number, and text (export table); this is the only reliable indicator of success or failure

Commit behaviour

Like the great majority of BAPIs, this one does not commit the database on its own. A successful call only stages the results in the current LUW. If the caller does not issue an explicit commit afterward, the update is rolled back at the end of the session and the characteristic appears never to have received a result, even though the BAPI itself returned clean messages. This is a frequent failure mode in RFC-driven interfaces where the calling program treats the BAPI call as complete once RETURN is checked, and either omits the commit entirely or issues it in a code path that does not execute when results are pushed in a background job or through certain middleware adapters that suppress the follow-up call by default.

Return handling

RETURN is a table, not a single flag, and multiple characteristics submitted in one call can produce a mix of success and error rows in the same response. Checking sy-subrc after the call is meaningless here; the BAPI does not reliably set it to reflect a per-row failure. The common lazy bug is treating an empty RETURN as the success test and a non-empty one as failure — but a fully successful call routinely returns informational or success rows (type S), so a non-empty table does not mean anything failed. The correct pattern loops over every row and checks specifically for type E or A. A second, more damaging bug is reading only the first row of RETURN when several characteristics were submitted together: one bad characteristic generates an error row while others post cleanly, and interfaces that stop at the first message either miss the later valid postings or wrongly conclude the entire call failed and reprocess characteristics that already succeeded, creating duplicate results downstream.

ECC vs S/4HANA

This BAPI remains valid and is still commonly used for classic QM inspection lots on S/4HANA; no separately released business API or OData service has broadly replaced it for external results-recording interfaces. The Fiori-based results recording apps in S/4HANA use their own internal services rather than this BAPI, but that change affects the UI layer, not the integration layer — LIMS and MES connections built years ago on this call generally continue to work unchanged after an S/4HANA conversion, provided the underlying inspection lot processing itself was not customized around ECC-specific enhancements.

Common pitfalls

  • Lot or operation is not in a status open for results recording (already subject to usage decision, operation not released, lot blocked) — the BAPI returns an error row but the caller only logged sy-subrc and never inspected RETURN
  • Characteristic number sent by the external system does not match the master characteristic assigned in the inspection plan for that operation, so the row is rejected or silently skipped
  • Commit call omitted or not propagated through the calling middleware, so results appear posted at the moment of the call but vanish after the session ends
  • Multiple single results for the same characteristic submitted without the correct sequence handling, overwriting an earlier value instead of appending an additional reading
  • Measured value sent in a unit of measure or decimal format inconsistent with the characteristic master data, producing a conversion error that surfaces only as a low-severity message buried in RETURN

Whose problem this is

QM functional owns the inspection plan and characteristic master data: whether the characteristic is open for recording, its unit of measure, and valuation settings. Development owns the interface program: parameter mapping, the commit call, and correct RETURN table iteration. When results fail to post, functional needs the lot and operation number and the expected characteristic list; development needs the full RETURN table content and confirmation the commit was actually issued, not assumed.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Source: ERPClimb — https://erpclimb.com/sap-bapis/bapi-inspoper-recordresultsERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.