Generally, logging is required in the following areas for monitoring an interface between two systems:
For performing the retrospective entry of events that occurred during a phase when the target system was not available.
However, in the case of the PM-PCS interface, R/3 logging is not necessary.
Each event results directly in an entry in an R/3 application table, meaning that each event generates a measurement document in the R/3 System.
If a malfunction report is generated, then this should happen together with the creation of a measurement document in an R/3 transaction.
Normal Operating Situation
The only logging is in the source system (PCS/SCADA). There, the R/3 measurement document number is logged for each event that is transferred. This enables the completeness of the transfer to be checked at any time.
When the document number is returned to the source system from the R/3 System, the database has already been updated. This is also the case when a malfunction report is created in addition to the measurement document.
When the R/3 System is not Available
The source system must deal with the following scenarios of the R/3 System not being available:
In the source system log, the exception POINT_LOCKED, that is returned by the R/3 System, is logged for the event record.
The exception ZZ_SAP_NOT_AVAILABLE is written in the log.
The exception ZZ_SAP_TIME_OUT is written in the log. Confirmation from the R/3 System is no longer being waited for; the work process in the source system is released.
The PM-PCS interface enables the automatic completion of event transfer. For this, the log in the source system must be continuously monitored. Where necessary, events are transferred to the R/3 System again. The source system recognizes events that have not yet been transferred by the missing R/3 document number in the log.
Recognizing and Avoiding Duplicates (Duplicate Records)
Duplicates are not immediately recognizable in the R/3 System because usually every incoming event results in the creation of a new measurement document. For this reason, the source system must transfer each event with a customer-specific document ID. The R/3 System is able to recognize the repeated transfer of an event that has already been processed from this document ID, and can therefore avoid duplicate processing.
Therefore, the recognition of duplicates in the R/3 System is controlled on the basis of additional, customer-specific information. From Release 3.1I, the necessary enhancements for doing this are included for the PM-PCS interface.
For this, you can create a field, ZZ_CUST_ID, of any format in the Customizing include CI_IMRG that has been prepared.
When you call up the R/3 function module MEASUREM_DOCUM_RFC_SINGLE_001, set the parameter CHECK_CUSTOM_DUPREC = X.
The function module sets the indicator CUSTOM_DUPREC_OCCURED = X. The function module returns the number of the measurement document that already existed instead of a new measurement document number. This number is logged for the event in the source system as in the normal operating situation.