SAP QM BAPI : Main BAPI in SAP Quality Management

SAP QM Quality Management Module e1475140606769

SAP QM BAPI : Main BAPI in SAP Quality Management.
This post will list the important SAP Standard BAPI used in SAP QM with the function of each BAPI.

The SAP QM BAPI is classified by Quality Management Topics including SAP QM BAPI for Quality Notification, Inspection Plan, Master Replication ALE and Inspection Lot QM BAPI.

The Most Used SAP QM BAPI

Before starting list the SAP Quality Management BAPI. Let’s answer this question:

What’s the most used BAPI in SAP QM ?

It covers the main business topics in SAP Quality Management including QM Characteristics, QM Inspection Lot BAPI, QM Task, Quality Notification BAPI in SAP QM …

Here the common BAPI to know when dealing with SAP Quality Management:

SAP QM BAPI Description
CP_EX_PLAN_READBAPI / Function to create / maintain QM characteristics in Task Lists
BAPI_INSPLOT_GETLISSelect Inspection lots
QIBP_INSPCHAR_SETRESULTstandard Bapi for Defect Recording
BAPI_QUALNOT_ADD_DATAFM or BAPI For task creation in quality notification
CO_QM_INSPECTION_LOT_CREATEBAPI to create inspection lot
BAPI_QUALNOT_DEL_DATABAPI or FM to delete a QM task (Q1)
BAPI_EECATIMESHEET_GETWORKLISTThis is the BAPI behind The SAP QM Tcode QE51N transaction
BAPI_QNOTIFICAT_CREATEBapi to create quality notification with inspection lot and defects of char
BAPI_INSPOPER_RECORDRESULTSQM: Copying inspection results to another lot

Next step will be listing the SAP QM BAPI classified by Topics or Business Objects.

Considering SAP QM, you may want to check also

SAP QM BAPI for Quality Notification

Here the main list of SAP BAPI for Quality Notification.

Learn more about SAP Maintenance Notification Overview.

SAP QM BAPIDescription
BAPI_QNOTIFICAT_GETMATLISTFCUSMaterials list for a customer
BAPI_QNOTIFICAT_GETLISTFORCUSTSelect quality notifications for a customer
BAPI_QNOTIFICAT_GETKEYFIGURESDetermining of related notifications
BAPI_QNOTIFICAT_GETCATALPROFILDetermine catalog profile
BAPI_QNOTIFICAT_CREATECreate quality notification

SAP BAPI for QM Inspection Plan

What’s Inspection Plan in SAP QM ?

Inspection plans help you to describe how a quality inspection of one or several materials is to take place. In the inspection plan, you define the sequence of inspection operations and the range of specifications available for inspecting inspection characteristics. (source)

List of main SAP BAPI Inspection Plan

QM Inspection Plan important BAPI are:

SAP QM BAPIDescription
BAPI_INSPECTIONPLAN_CREATE Create inspection plan
BAPI_MATINSPCTRL_SAVEREPLICA Replication of QM inspection setup
BAPI_MATINSPCTRL_REPLICATE Prepare inspection setup (inspection types) for distribution
BAPI_INSPPOINT_GETREQUIREMENTS Load insp. specifications and insp. points

BAPI_INSPECTIONPLAN_CREATE

You must enter a value for the following attributes to ensure the consistency of the header data:

  • TASK_LIST_USAGE
  • PLANT
  • TASK_LIST_STATUS
  • TASK_MEASURE_UNIT (unit of measure)

You can only specify a task list group (attributes TASK_LIST_GROUP and GROUP_COUNTER) with external number assignment. For internal number assignment, the task list group and the group counter are automatically determined during processing. (Source: SAP SE37 Info)

SAP BAPI for QM Master Replication ALE

Replication of QM Master Inspection characteristics, QM Code Groups and Inspection Methods are based on the following BAPI:

SAP QM BAPIDescription
BAPI_QPMK_SAVEREPLICAReplication of QM master inspection characteristics (ALE)
BAPI_QPMK_REPLICATE Prepare QM master inspection characteristics for distribution
BAPI_QPGR_SAVEREPLICA Replication of QM code groups
BAPI_QPGR_REPLICATE Prepare QM code group for distribution
BAPI_QMTB_SAVEREPLICAReplication of QM Inspection Methods
BAPI_QMTB_REPLICATE Prepare QM Inspection Methods for Distribution

Standard BAPI for QM Inspection Point, Lot and Operation

When dealing in ABAP code with QM Inspection Point, Lot or Inspection Operation use the following QM BAPI:

SAP QM BAPIDescription
BAPI_INSPPOINT_GETLIST Select insp. points
BAPI_INSPPOINT_CREATEFROMDATA Create insp. point
BAPI_INSPPOINT_CHANGE Change inspection point
BAPI_INSPOPER_RECORDRESULTS Confirm inspection results
BAPI_INSPOPER_GETLIST Select inspection operations for inspection lots
BAPI_INSPOPER_GETDETAIL Read detail data for inspection operation
BAPI_INSPOPER_GETCHAR Select inspection lot characteristics
BAPI_INSPOPER_ACKNOWLEDGE Confirm receipt of handheld worklist

BAPI_INSPOPER_RECORDRESULTS

The standard BAPI BAPI_INSPOPER_RECORDRESULTS is used for Confirm Inspection Results.
Here a sample of Implementation of this Inspection Results BAPI.

CALL FUNCTION 'BAPI_INSPOPER_RECORDRESULTS'
  EXPORTING
    insplot        = pa_insp
    inspoper       = pa_inso
    insppointdata  = l_inspoint
  IMPORTING
    return         = return
  TABLES
    sample_results = l_sample_results_new
    returntable    = l_return.

For the full ABAP Code Source, check this Sample Code BAPI_INSPOPER_RECORDRESULTS.

Actually in Tx-Code QE11 we can fill input for result in inspection characteristic, this program provides us to fill result inspection characteristic based on an inspection lot, operation code and inspection point which we can fill inspection point.

  • Automatically fill Evaluation (Reject or Accept) depend on our value.
  • We can fill whatever inspection point (depend on your case).

QM BAPI for Inspection Lot

This section regroups some of important QM BAPI covering inspection lots:

SAP QM BAPIDescription
BAPI_INSPLOT_STATINTERFACE QM-STI Interface
BAPI_INSPLOT_SETUSAGEDECISIONMake automatic usage decision
BAPI_INSPLOT_GETOPERATIONS Select inspection operations for inspection lots
BAPI_INSPLOT_GETLIST Select inspection lots
BAPI_INSPLOT_GETDETAIL Load detail data for inspection lot
BAPI_INSPCHAR_SETRESULT Write insp. results
BAPI_INSPCHAR_GETRESULT Load insp. results
BAPI_INSPCHAR_GETREQUIREMENTS Load inspection specifications for an inspection lot

source: Standard BAPI for QM module

Function Modules for Quality Level

In bonus, here the list of Function quality level’s BAPI in SAP QM.
These BAPI/ FM are easily identified by QDQV* name’s pattern.

  • QDQV_COMPUTE_DELETE_DATE
  • QDQV_COMPUTE_RESET_DATE
  • QDQV_INITIALIZE
  • QDQV_INSP_STAGE_CHANGE_CHECK
  • QDQV_Q_LEVEL_CALL_FM_POST
  • QDQV_Q_LEVEL_CANCEL_CHAR
  • QDQV_Q_LEVEL_CANCEL_HEAD
  • QDQV_Q_LEVEL_CHAR_DEL
  • QDQV_Q_LEVEL_DB_READ
  • QDQV_Q_LEVEL_DELETE
  • QDQV_Q_LEVEL_LOT_CANCEL
  • QDQV_Q_LEVEL_LOT_DELETE
  • QDQV_Q_LEVEL_PT_CANCEL
  • QDQV_Q_LEVEL_PT_INS
  • QDQV_Q_LEVEL_PT_READ_ONLY
  • QDQV_Q_LEVEL_PT_UPD_W_INDEX
  • QDQV_Q_LEVEL_RESET
  • QDQV_Q_LEVEL_TIGHTEN
  • QDQV_Q_LEVEL_UD_CHAR
  • QDQV_Q_LEVEL_UD_HEAD