Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

1 INTRODUCTION

1.1 Document Purpose


The objectives of this document are:
• To document SAP QM Module and LIMS (Labvantage) Interfaces requirements for the
project.
• To describe the proposed design to-be automated SAP QM Module Inspection lots creation
process.
• Serves as a basis for system integraton with ESB, LIMS and technical development.

1.2 Related Documents


No. Document Category Name of Document

1.3 Terms and Acronyms


The following tables define terminology and abbreviations used in this document:

1.3.1 Terms

Terms Definition
ESB Solution Refers to the overall PIC Enterprise Service Bus Solution comprises of the
following integration components:
• ESB – Enterprise Service Bus integration hub
• MSB – Manufacturing Service Bus integration hub
• B2B – Business-to-Business Gateway for external integration
Source Data Provider

Target Data Receiver

1.3.2 Acronyms

Acronyms Definition

Internal
Internal
2 APPLICATION FUNCTIONAL OVERVIEW

2.1 Integration Requirements

Figure 1 - SAP QM Module Inspection Lot Creation Business Process Overview

The above diagram illustrated business processes of SAP QM Modules interfaces with LIMS
(SAP_164_OUT and SAP_165_IN).

Ref Name Description / Cancellation note


SAP_164_OUT QM: Inspection lot Creation to LIMS Sending inspection lot information to LIMS to proceed
with lab Testing information sending to LIMS
SAP_165_IN QM: To update result for inspection lot from LIMS Return the result of lab testing for each inspection lot
Information send to SAP
1. Inspection Lot
2. Inspection Characteristic
3. Inspection Result (Pass or Fail only)
SAP_309_IN QM: Acknowledgement of Inspection Lot From Update SAP-QM-IDI the transfer table (QIWL) of the
LIMS PRUEFSTAT

SENDSTAT =
A (Initial Transfer Performed),
B (Correction Transfer Performed),
Empty (No Transfer Performed Yet)
SAP_310_OUT QM: Acknowledgement of result of inspection lot ESB will forward the SAP Message to LIMS. The Message
updated from SAP to LIMS will have following fields:
• Inspection Lot No
• Batch No
• Status ( Success/ Failure)
• Message (Success= Success/ Failure = Error Message)

Lab Analysis covers the business process activities where sample needs to be taken and then
to be sent to the Lab for Lab Testing using specific method or machine. The scope will cover

Internal

RAPID_GNB_PIC_ICT_TMP_AB_O_130 2
Internal Date: 08/01/2018
Production related inspections for all solid products as well as Delivery inspections for all
liquid products.
If the material is subjected to the Lab Analysis, the Quality Inspection will require to be
activated at Materials Master Level. Upon Goods Receipts is carried out in ERP System by
the receiving personnel, the inspection lot will be created automatically in ERP system. For
incoming inspection lot, it will not be interfaced to LIMS. This is due to there is no fixed
sampling plan for the inspection. Hence upon Inspection Lot generated in ERP, the related
end-user will need to raise LSR in LIMS and indicate what is the inspection lot number for
this LSR and scope of the testing. This process is proposed for Hydrocarbon materials such as
Ethylene, Propylene etc.
Inspection Lot in ERP system is an inspection instruction order to inspect certain material or
product based on certain sampling rules and all the inspection information will be recorded
with respect to this inspection lot number. In LIMS, this will be called LSR (Lab Service
Request), where there will be SampleID created in LIMS to capture all the lab test results and
approval information.

2.1.1 Details of Input Data Required


Table Column Name Column Desc. Column Length O-
Type Optional
M-
Mandatory
QAICV MATNR Material Number CHAR 40 M
QAICV WERK Plant CHAR 4 M
QAICV PRUEFLOS Inspection Lot Number NUMC 12 M (Unique
Key)
QAIMV RUECKMELNR Confirmation Number for Inspection Characteristic NUMC 8 M (Unique
Key)
QAICV LOSMENGE Inspection Lot Quantity QUAN 13 M
QAICV PASTRTERM Start Date of Inspection DATS 8 M
QAICA GRUPPE1 Code Group CHAR 8 M
QAICV KUNNR Customer Number CHAR 10 O
QAICV CHARG Batch Number CHAR 10 O
QAICV LS_VBELN Delivery Order Number CHAR 10 O
QAICV LS_POSNR Delivery Item No NUMC 6 O
QAICV LS_KDAUF Sales Order Number CHAR 10 O
QAICV LS_KDPOS Sales Order Item NUMC 6 O
QAIVC PRUEFSTAT Status of Inspection for QM Subsystem CHAR 1 M

Figure 2 - SAP_164_OUT Data and Fields Information

The following are the value for field PRUEFSTAT:


PRUEFSTAT Short Description
A Release inspection
B Inspection completed
C Inspection canceled
D Inspection terminated
E Skip

Internal
F Blocked for download

SENDSTAT Short Description


A First transmission carried out
B Correction transmission carried out
“” (Blank) No transmission carried out so far

Column Name Column Desc. Column Length O - Optional Remarks


Type M - Mandatory
PRUEFLOS Inspection Lot Number NUMC 12 M
RUECKMELN Confirmation Number for Inspection NUMC 8 M (Unique This key need to
R Characteristic Key) store at LIMS and
pass back from
LIMS when update
inspection result to
SAP.
SATZART Record Types for QM Interface - CHAR 3 M (Unique Value= Q72
Subsystems Key)
KZABSCHL Close Characteristic or Sample CHAR 1 M Value = ‘X’
KZBEWEEXT Copy Valuation from External CHAR 1 M
System Value = ‘X’
GRUPPE1 Code Group CHAR 8 M
Code1 Code CHAR 8 M Pass or Fail
MBEWERTG Inspection Result Valuation CHAR 1 M If Code1=PASS
MBEWERTG = A
Else
MBEWERTG = B
Figure 3 – SAP_165_IN Inbound Fields from ESB to SAP

Definition:
Code group = A key for summarizing codes and structuring a catalog according to various
criteria.

Table = QAMR, Code Group = RESULTS, Code= FAIL or PASS

Internal
Example: SAP Transaction QE51 and information of Test Result.

Internal
2.1.2 Data Integration

Figure 4 - Inspection Lot Creation and Cancellation Flow

Figure 5 - Inspection Lot Test Result Update from LIMS to SAP

Internal
The following are the summary steps where data flow from SAP to ESB and LIMS
REF Functionality Flow of Data Description
SAP_164_OUT Inspection Lot SAP Inspection Lot Creation Request is created and entry will be added to Table for the
Creation / Transfer (Table QIWL)Log Table for the Transfer (Table QIWL) with field
Cancellation PRUEFSTAT = A (Release Inspecation) and
SENDSTAT = Empty (No Transfer Performed Yet).
SAP_164_OUT Inspection Lot SAP->ESB ESB Trigger the Inspection Lot Creation by calling SAP Function Module. The
Creation / trigger will be scheduled and one request will contain multiple Inspection Lots.
Cancellation Table for the Transfer (Table QIWL)Log field
SENDSTAT will update from Blank (No Transfer Performed Yet)
to A (Initial Transfer Performed) or B(Correction Transfer Performed).
SAP_164_OUT Inspection Lot ESB-> LIMS ESB transfers the Inspection Lot Creation trigger to LIMS.
Creation / LIMS receives the Inspeciton Lot Creation / Cancellation request.
Cancellation For each Inspection Lot Item, LabVantage will perform the following action:

For QIWL-PRUEFSTAT = ‘A’, Create SampleID at LIMS


For QIWL-PRUEFSTAT = ‘‘C’, Cancel sampleID at LIMS

SAP is the unique identifier of SAP trigerred Samples.


All the fields passed by SAP will be mapped in LIMS.

Logic:
If Inspection Lot found in LIMS && PRUEFSTAT = ‘C’
{
Cancel Sample_ID in LIMS
}
Else IF Inspection Lot Not Found in LIMS && PRUEFSTAT = ‘A’
{
Create Sample_ID in LIMS
}
Else If Inspection Lot Found in LIMS && PRUEFSTAT = ‘A’
{
Activate Cancelled Sample ID OR Create new Sample ID ?? LIMS to confirm
}
Else If Inspection Lot Not Found in LIMS && PRUEFSTAT = ‘C’
{
Abort Sample ID Creation
}

SAP_309_IN Acknowledgement LIMS A field named "Transport to SAP" will be marked in LIMS as "Y" during Creation
Inspection Lot and "N" during Cancellation.
Creation / LIMS will log the transaction in Message Log SDC.
Cancellation
SAP_309_IN Acknowledgement LIMS->ESB After completion of the Process LIMS will send the response to ESB with the
Inspection Lot following fields:
Creation • Inspection Lot No
• Status ( Success/ Failure)
• Message (Success= Lims Sample Id/ Failure = Error Message)

SAP_309_IN Acknowledgement ESB->SAP ESB will update the following fields regarding the inspection lot creation in LIMS.
Inspection Lot • Inspection Lot No
Creation • Status ( Success/ Failure)

SAP_165_IN Post Test Result to LIMS The Sample will undergo Out Of Box LIMS lifecycle like Receipt, Data Entry,
SAP Review.
SAP_165_IN Post Test Result to LIMS->ESB After Reviewer Reviews the Sample, LIMS will send the Testing Result back to
SAP ESB via Web Service Call with the following fields:
• Sample ID
• Code Group
• Status ( Pass/ Fail)
The communication will be Asynchronous and will be trigerred after the review
process is complete.
SAP_165_IN Post Test Result to ESB->SAP ESB will interpert the message and send response to SAP, SAP to send
SAP acknowledgement to ESB.

Internal
ESB will call function module QIRF_GET_ALL_DATA_VALUES2 with the
following filed entry:
SATZART = Q72 (Fix Value)
RUECKMELNR = Refer to Inspection lot record pass to LIMS.
CODE1 = Success or Fail
GRUPPE1 = TEST RESULT (Fix value)
KZABSCHL = X
KZBEWEEXT = X
MBEWERTG =
If CODE 1 = PASS then MBEWERTG = A
Else IF
CODE 1 = FAIL then MBEWERTG = R
SAP_310_OUT Acknowledgement ESB->LIMS ESB will forward the SAP Message to LIMS. The Message will have following
Post Test Result to fields:
SAP • Inspection Lot No
• Status ( Success/ Failure)
• Message (Success= Lims Sample Id/ Failure = Error Message)
SAP_310_OUT Acknowledgement LIMS For "Success" message, LIMS will mark the "Transport to SAP" flag as "N".
Post Test Result to LIMS will log the transaction in Message Log SDC.
SAP

Internal
2.1.3 System Integration Diagram

SAP QM-IDI Interface Overview:


SAP QM-IDI interface ("Inspection Data Interface in Quality Management") is an open
interface designed for exchanging inspection processing data between the QM application
component and external systems. Inspection specifications defined in the QM component are
transferred to the external system. The external system independently carries out the
inspection and transfers the results back to QM.
The following graphic shows how the SAP system interacts with a subsystem.

Features
The transfer between subsystem and QM is done synchronously as direct program-to-program
communication. The subsystem starts the communication both in requesting the inspection
specifications from QM and in confirming the results. This type of processing has the
advantage that the subsystem itself can request QM inspection lots for processing and can use
comprehensive selection criteria to adjust the scope of the work list to its processing times and
capacities.
SAP provides function modules for transferring inspection specifications and confirming
inspection results. These function modules can be called by external systems and are then
processed in QM. The function modules are called using the SAP remote function call (RFC)
interface.

The following graphic shows how the SAP system interacts with ESB via SAP QM Inspection
Data Interface (QM-IDI).

Internal
Outbound Processing:
The function module QIRF_SEND_INSP_DATA_FOR_WL2 reads the operation and
inspection lot data for the specified worklist (structure QIWLR) and transfers this data to the
subsystem in the form of a list (structure QAIVC).
Function Module QIRF_SEND_INSP_DATA_FOR_WL2 perform the following two steps:
• Transfer of inspection specifications based on a worklist
• Updating lock entries

Depending on the input control indicators of the function module, additional data from master
records can be read and added to the QAIVC structure. The inspection characteristics to be
processed are transferred to the subsystem as a list with QAIMV structure. Using input
control indicators, the subsystem specifies whether. All characteristics or only characteristics
requiring inspection are to be transferred. Transfer is to be limited to characteristics not yet
transferred or whether correction transfers are possible. If there are catalog specifications for
the characteristics to be transferred and the corresponding input indicator is set in the function
module, the quantity codes and group codes for the catalog specifications are transferred in
the form of a list with QAICA structure.
Custom development of SAP standard function module is needed to transfer the additional
two optional information:
1. Delivery Order Number
2. Delivery Order Item
The Delivery Order Number & Item Number has to be customized to be included in the FM
with user exits to Table QAIVC.
Delivery Order Number QALS-LS_VBELN will be available whenever inspection lot
generated from Delivery creation in system and thus it will be a direct fetch from table.
DO number to LIMS will serve as an information. The information will be used for quality
certificate generation from LIMS via DO number as the selection criteria.
After transfers the inspection lots, call function module QIRF_SEND_COMMIT_TO_QM.
This function module sets a COMMIT-WORK in the QM databases. As a result, the transfer
table (QIWL) and lock entries are updated.

Inbound Processing:

Internal
After Reviewer Reviews the Sample, LIMS will send the Testing Result back to ESB via
Web Service Call with the following fields:
• Inspection Lot No
• Code Group (Example value: Result)
• Code 1 ( Example Value: Pass/ Fail)

The communication will be Asynchronous and will be trigerred after the review process is
complete.
ESB will call Results Confirmation for all Record Types function module
QIRF_GET_ALL_DATA_VALUES2.
I. This function module calls up function modules
QIRF_GET_ORIGINAL_VALUES2,
II. QIRF_GET_SAMPLE_VALUES2, and
III. QIRF_GET_FEATURE_VALUES2.
This function module have user exit EXIT_SAPLQIRF_132 for programmer to add logic
and update LIMS test result accordingly.
Additionally, the transfer table (QIWL) and lock entries are updated too.

2.1.4 Solution Design – IDOC Extensions and Custom IDOCS

N/A

2.1.5 Business Object

TBC

2.1.6 IDOC Structure

TBC

2.1.7 Inbound Processing

TBC

2.1.8 Outbound Processing

TBC

Internal
2.1.9 Log Table for the Transfer (Table QIWL)

When the inspection lots are released in the QM module, an entry is made in a transfer table
for every operation to be processed in the subsystem. This log table contains the work list of
all operations to be transferred. It has the following structure:
Key:
• Client
• Subsystem
• Inspection lot
• Task list sequence
• Operation number
Data:
• Work center
• Plant of the work center
• Date when the entry was made
• Time when the entry was made
• Change date
• Change time
• Send date of the first transmission for the inspection lot
• Send time of the first transmission for the inspection lot
• Send date of the correction transmission for the inspection lot
• Send time of the correction transmission for the inspection lot
• Send status for first transmission/correction transmission
• Inspection status: released/completed/discarded/canceled

Internal
2.1.10 Application Log

In SAP QM-IDI interface, all error messages as well as changes to the worklist are written to
an application log. The exceptions, messages of the error log QIERRTAB, and the beginning
and end of a function are recorded. In Customizing, you can define the level of detail for the
application log. Use report RQEIFML1 to display the application log. Use report RQEIFML2
to delete the log.

2.1.11 How to Test

<TBC>
No Steps Remarks

<TBC>

Internal

You might also like