QM Program Custom development Interface

Inspection Results Upload from Laboratory File Program

Short answer: A custom interface program that records the measured values in a CSV/XLSX file produced by laboratory instruments or a laboratory information system against inspection lot characteristics in bulk. It removes manual results entry and typing errors, checks everything in test mode and can valuate and close the characteristics.

Estimated effort
M · 5–7 working days
System
ECC and S/4HANA
Tables
4
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

Why is the standard not enough?

QE51N and QE01 expect results to be keyed in on the screen; there is no standard transaction that reads measured values from a file on a schedule. Certified laboratory interfaces need setup and licences. For laboratories that get a CSV from their instruments, a simple interface that reads the file and records the results through the standard BAPI is enough.

Who uses it? Laboratory analysts and supervisors, quality control engineers and QM consultants.

Closest standard alternatives

  • QE51N Results Recording Worklist. Expects results to be keyed in on the screen; does not read files.
  • QE01 Record Characteristic Results. Records results for one inspection lot; no scheduled bulk load.

Tables used

The tables the program reads and updates. ECC and S/4HANA differences are marked separately.

TableRoleAccessSystem
QALSInspection Lot RecordInspection lot and usage decision status (check)ReadECC + S/4
QAMVCharacteristic Specifications for Inspection ProcessingCharacteristic definition, unit and tolerance limits (check)ReadECC + S/4
QAMRCharacteristic Results During Inspection ProcessingCharacteristic result and valuationWriteECC + S/4
QASEResults Table for the Sample UnitSingle measured valuesWriteECC + S/4

BAPIs and functions used

  • BAPI_INSPOPER_GETCHARSelect Inspection Characteristics. Reads the characteristics and limits of the lot operation
  • BAPI_INSPOPER_RECORDRESULTSRecord Inspection Results. Records the results and optionally valuates and closes them
  • BAPI_TRANSACTION_ROLLBACKRoll Back BAPI Transaction. Rolls back in test mode
  • BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful results permanently

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
P_FILEResults file or folderSingle value—Yes/usr/sap/lab/in/
P_SERVERRead from application server (background)Checkbox—NoX
P_CLOSEValuate and close characteristicsCheckbox—NoX
P_TESTTest mode (check without saving)Checkbox—NoX

Input file columns

The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.

#ColumnTarget fieldRequired
1Inspection lotQALS-PRUEFLOSYes
2Operation numberBy rule Operation number from the inspection plan (e.g. 0010); passed to the BAPI as the operationYes
3Characteristic no.QAMV-MERKNRNo
4Master characteristic (instead of no.)QAMV-VERWMERKMNo
5Measured valueQASE-MESSWERTYes
6InspectorQASE-PRUEFERNo
7Inspection dateQASE-PRUEFDATUVNo

Sample upload file

1Inspection lot *Operation number *Characteristic no.Master characteristic (instead of no.)Measured value *InspectorInspection date
2040000001877001000101.04LAB0111/16/2026
30400000018770010VISKOZITE2,350LAB0111/16/2026
40400000018770010RENK-DELTAE1.80LAB0211/16/2026
A view built with fictional sample data; not real system data.

Result list columns

#ColumnSource
1RowCalculated Row number in the file
2Inspection lotQALS-PRUEFLOS
3Characteristic no.QAMV-MERKNR
4Characteristic textQAMV-KURZTEXT
5ValueCalculated Measured value from the file
6ValuationQAMR-MBEWERTG
7StatusCalculated From the BAPI return messages: checked, recorded or error
8MessageCalculated First error or success message from the BAPI return table

Sample result list

RowInspection lotCharacteristic no.Characteristic textValueValuationStatusMessage
20400000018770010Density1.04ARecordedResult recorded
30400000018770030Viscosity at 25 °C2,350ARecordedResult recorded
40400000018770040Colour difference ΔE1.80ErrorCharacteristic is already closed
A view built with fictional sample data; not real system data.

How does the program work?

  1. The file is read from the user’s PC or, in a background job, from a folder on the application server; the first row is skipped as the header.
  2. Each row is split into inspection lot, operation number, characteristic number (or master characteristic), measured value, inspector and date.
  3. BAPI_INSPOPER_GETCHAR reads the characteristics and tolerance limits of the lot. Checks: the lot exists and has no usage decision (QALS-STAT35 blank), the characteristic is open, and for quantitative characteristics the value is numeric.
  4. BAPI_INSPOPER_RECORDRESULTS records the results as single values or as a summary; with “Valuate and close” selected, the characteristic is accepted or rejected against its tolerance limits and closed.
  5. In test mode the change is rolled back with BAPI_TRANSACTION_ROLLBACK; in a real run BAPI_TRANSACTION_COMMIT follows each lot. The processed file is moved to an archive folder and failed rows are written to a separate file.

Performance notes

Group the rows by inspection lot and operation and call the BAPI once per group. For folder monitoring, schedule a background job that runs every 15–30 minutes.

Features

  • Test mode (check without posting)
  • Line-by-line result and error log
  • Download failed lines as a separate file Failed rows are written to a separate file and can be loaded again after correction.
  • Runs as a background job
  • Send the result by email Files with failed rows are reported to the laboratory supervisor by email.

Authorization objects

  • Q_INSPTYPEInspection lot authorization by inspection type
  • Q_TCODEQM transaction code authorization for results recording

Frequently asked questions

Are different instrument file formats supported?

Yes. The column mapping for each instrument or lab system can be kept in a small maintenance table, so adding a new instrument does not need a code change.

Can qualitative (coded) characteristics be loaded?

Yes. If the file holds a code group and code instead of a value, the program records it as a qualitative result.

Can this program be used on S/4HANA?

Yes. BAPI_INSPOPER_RECORDRESULTS is supported on S/4HANA and the QM tables keep the same structure.

Related reports

Let us build this program for your system

Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.

Related report: Inspection Results Upload from Laboratory File Program