This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
This document may discuss sample coding or other information that does not include SAP official interfacesand therefore is not supported by SAP. Changes made based on this information are not supported and canbe overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methodssuggested in this document, and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content ofthis technical article or code sample, including any liability resulting from incompatibility between the contentwithin this document and the materials and services offered by SAP. You agree that you will not hold, or seekto hold, SAP responsible or liable with respect to the content of this document.
This guide is part of the overall development of the MES-PCS developments for integration with Factoryprocess Control Systems.
Process Control System integration automates the data exchange between SAP and MES-PCS establishinga single source of Master and logistical data within the Manufacturing Execution system ( MES ) and theProcess Control Systems ( PCS).
The interfaces of this project will exchange messages with these areas
Trigger: Receipt of an inbound Idoc from middleware SAP Inbound ALE/IDOC Interface Message Type: YINVRPT500 / YINVRPT501 Idoc type/Extension: WMMBID02 Which system: SOS/COM
3.1.2 CLIENT Middleware
Message Routing: Point-to-Point Data Mapping/Translation: S95 XML format file to WMMBID02 IDOC format
3.2 Production Declaration and Reversal
3.2.1 CLIENT SAP System
Trigger: Receipt of an inbound Idoc from middleware SAP Inbound ALE/IDOC Interface Message Type: ZRECADV01 / ZRECADV02 / ZRECADV06 / ZRECADV07 Idoc type/Extension: WMMBID02 Which system: SOS/COM
3.2.2 CLIENT Middleware
Message Routing: Point-to-Point Data Mapping/Translation: S95 XML format file to WMMBID02 IDOC format
3.3 Transfer Order
3.3.1 CLIENT SAP System
Trigger: Receipt of an inbound Idoc from middleware SAP Inbound ALE/IDOC Interface Message Type: WMTORD Idoc type/Extension: WMTOID01 Which system: SOS/COM
3.3.2 CLIENT Middleware
Message Routing: Point-to-Point Data Mapping/Translation: S95 XML format file to WMTORD IDOC format
Trigger: Receipt of an inbound Idoc from middleware SAP Inbound ALE/IDOC Interface Message Type: WMSUMO Idoc type/Extension: WMSUID01 Which system: SOS/COM
3.4.3 CLIENT Middleware
Message Routing: Point-to-Point Data Mapping/Translation: S95 XML format file to WMSUMO IDOC format
3.5 Cancel Transfer Order
3.5.1 Overview
3.5.2 CLIENT SAP System
Trigger: Receipt of an inbound Idoc from middleware SAP Inbound ALE/IDOC Interface Message Type: WMCATO Idoc type/Extension: WMCAID01 Which system: SOS/COM
3.5.3 CLIENT Middleware
Message Routing: Point-to-Point Data Mapping/Translation: S95 XML format file to WMCATO IDOC format
3.6 Confirm Transfer Order
3.6.1 Overview
3.6.2 CLIENT SAP System
Trigger: Receipt of an inbound Idoc from middleware SAP Inbound ALE/IDOC Interface Message Type: WMTOCO Idoc type/Extension: WMTCID03 Which system: SOS/COM
Message Routing: Point-to-Point Data Mapping/Translation: S95 XML format file to WMTOCO IDOC format
3.7 Local Quality Change
3.7.1 Overview
3.7.2 CLIENT SAP System
Trigger: Receipt of an inbound Idoc from middleware SAP Inbound ALE/IDOC Interface Message Type: YINVRPT100 Idoc type/Extension: WMMBID02 / YWMMBID1 Which system: SOS/COM
3.7.3 CLIENT Middleware
Message Routing: Point-to-Point Data Mapping/Translation: S95 XML format file to YINVRPT100 IDOC format
3.8 Inbound Receipt (for Purchase Order)
3.8.1 CLIENT SAP System
Trigger: Receipt of an inbound Idoc from middleware SAP Inbound ALE/IDOC Interface Message Type: ZRECADV03 Idoc type/Extension: WMMBID02 / YWMMBID1 Which system: SOS/COM
3.8.2 CLIENT Middleware
Message Routing: Point-to-Point Data Mapping/Translation: S95 XML format file to ZRECADV03 IDOC format
Trigger: Receipt of an inbound Process Message from middleware SAP Inbound BAPI Interface (tRFC) Object Name: ProcessMessagePI (BUS2110) Idoc type/Extension: Not applicable Process Message: PI_CRST Which system: SOS/COM
3.9.3 CLIENT Middleware
Message Routing: Point-to-Point Data Mapping/Translation: S95 XML format file to PROCESS_MESS_UPLOAD BAPI format
3.10 Inbound Process Order Confirmation
3.10.1 CLIENT SAP System
Trigger: Receipt of an inbound Process Message from middleware SAP Inbound BAPI Interface (tRFC) Object Name: ProcessMessagePI (BUS2110) Idoc type/Extension: Not applicable Process Message: PI_PHCON Which system: SOS/COM
3.10.2 CLIENT Middleware
Message Routing: Point-to-Point Data Mapping/Translation: S95 XML format file to PROCESS_MESS_UPLOAD BAPI format
3.11 Control Recipe Download
3.11.1 Overview
3.11.2 CLIENT SAP System
Trigger: Creation & send of control recipe in SAP (COR1 -> CO53) SAP Outbound BAPI Interface (tRFC) Object Name: ControlRecipe (BUS2115) Idoc type/Extension: Not applicable Process Message: Not applicable
Message Routing: Fanning Out Data Mapping/Translation: CONTROL_RECIPE_DOWNLOAD BAPI format to S95 XML format file
3.12 Outbound Control Recipe Status Change
3.12.1 CLIENT SAP System
Trigger: Creation & send of process message in SAP (CO57 -> CO54) SAP Outbound BAPI Interface (tRFC) Object Name: ProcessMessagePI (BUS2110) Idoc type/Extension: Not applicable Process Message: Y_ST_?? (where ?? is replaced with control recipe destination key) Which system: SOS/COM
3.12.2 CLIENT Middleware
Message Routing: Fanning Out Data Mapping/Translation: PROCESS_MESS_DOWNLOAD BAPI format to S95 XML format file
Market implementation of the ‘global plug-in’ will require localization of the routing tables in the Middleware,and configuration of partner profiles, RFC destinations, control recipe destinations, etc. in SAP.
As previously stated, it is foreseen to be the responsibility of the implementation teams to define and co-ordinate any changes necessary to link to the CLIENT Template plug in point.
As the plug-in interface is based on the SAP ALE (Application Link Enabling) technology, a number of ALEcustomizing steps are required. To configure a plant for integration with MES-PCS, the following steps needto be performed, depending on the extent of messaging required.
Creation of logical systems Creation/configuration of partner profiles
Please note the actual creation will be done by the Basis Team or the Cross Apps team upon creation of aconfiguration request/MSS for ALE configuration. Attached is a template document to be used for the MSSrequest, as well as an excel-based tool to easily create these requests.
5.2 Creation of Logical systems
For each plant which requires integration with an MES-PCS, a logical system has to be created. This is thecase even with limited messaging requirements, to enable for example the batch change message(YINVRPT900) to be sent to all external systems that use the batch.
CLIENT ALE naming conventions state these logical systems have to be created as follows:
Logical System Character 1-2 Country Code for plant
For each plant, a logical system has to be created.
The partner profiles created should be of type LS ‘Logical System’ The name of the partner profile should be according to the name of the Logical System it is created
for The post-processing: permitted agent-section is used to determine who will receive workflow
messages in case processing of a message fails. No CLIENT Template decision has been taken onthis yet, and this part will hence be covered by the core ALE standards currently being revised/set up.Currently, this functionality has not been tested and is not used in Client template.
5.3.2 Configuration of outbound parameters
The outbound parameters determine which messages can be sent by the partner profile /
plant, and specify how these messages are sent (Immediately-Batch), and to which port they are sent.
Generally, assuming all plug-in messages apply for a plant, the following ‘rules’ apply.
This message will be sent by all partner profiles/plants, and hence need to be configured for all of them
5.3.3 Configuration of inbound parameters
The inbound parameters determine which messages can be received by the partner profile / plant, andspecify how these messages are processed (Immediately-Batch).
5.3.3.1 Production consumption and reversal
This message is received by SAP SOS systems from the various MES-PCS plants through SAP BusinessConnector.
This is dependent on thedecision whethermessages will betransferred ‘on-line’, atcreation, or whether theywill be sent through a batchjob. Please refer to the‘On-line vs. Batch’ chapterfor more details about this.
Post processing: permitted agent Tab To be defined by ALEteam.
Telephony Tab N/A
5.3.3.2 Production declaration and reversal
This message is received by SAP SOS systems from the various PCS plants through SAP BusinessConnector.
This is dependent on thedecision whether messages willbe transferred ‘on-line’, atcreation, or whether they will besent through a batch job. Pleaserefer to the ‘On-line vs. Batch’chapter for more details aboutthis.
This is dependent on thedecision whether messages willbe transferred ‘on-line’, atcreation, or whether they will besent through a batch job. Pleaserefer to the ‘On-line vs. Batch’chapter for more details aboutthis.
Post processing: permitted agent Tab
Telephony Tab N/A
5.3.3.4 Move Storage Unit
This message is received by SAP SOS systems from the various PCS plants through SAP BusinessConnector.
The data has to be maintained as follows: IDOC number: 739099
This is dependent on thedecision whether messages willbe transferred ‘on-line’, atcreation, or whether they will besent through a batch job. Pleaserefer to the ‘On-line vs. Batch’chapter for more details aboutthis.
Post processing: permitted agent Tab
Telephony Tab N/A
5.3.3.5 Cancel Transfer Order
This message is received by SAP SOS systems from the various PCS plants through SAP BusinessConnector.
This is dependent on thedecision whether messages willbe transferred ‘on-line’, atcreation, or whether they will besent through a batch job. Pleaserefer to the ‘On-line vs. Batch’chapter for more details aboutthis.
This is dependent on thedecision whether messages willbe transferred ‘on-line’, atcreation, or whether they will besent through a batch job. Pleaserefer to the ‘On-line vs. Batch’chapter for more details aboutthis.
This is dependent on thedecision whether messages willbe transferred ‘on-line’, atcreation, or whether they will besent through a batch job. Pleaserefer to the ‘On-line vs. Batch’chapter for more details aboutthis.
Post processing: permitted agent Tab
Telephony Tab N/A
5.3.3.8 Inbound Receipt (for Purchase Order)
This message is received by SAP SOS systems from the various PCS plants through SAP BusinessConnector.
This is dependent on thedecision whether messages willbe transferred ‘on-line’, atcreation, or whether they will besent through a batch job. Pleaserefer to the ‘On-line vs. Batch’chapter for more details aboutthis.
In addition to ALE processing, the MES-PCS interfaces make use of process management in order to sendand receive manufacturing data.
6.1 Creation/configuration of control recipe destinations
6.1.1 Creation of RFC destination
An ‘RFC destination’ in SAP should be defined for the receiving SAP Business Connector server.
Transaction: SM59
6.1.2 Creation of process instruction characteristics
The additional process instruction characteristics required for the MES-PCS control recipe are broadcast bythe BTC T&P process team. No action required for localization.
6.1.3 Creation of process instruction categories
The reference PI categories should be copied to each plant which requires the ‘Outbound ControlRecipe’ interface.
6.1.4 Creation of control recipe destination(s)
A reference control recipe has been defined in plant Z203, and transported to all SOS boxes. The referenceCRD is ‘X1’, and should be copied to each plant which requires the ‘Outbound Control Recipe’ interface. Allprocess instruction categories should be copied from the reference CRD.
The destination address should be modified to the ‘RFC destination’ of the receiving SAP Business Connectorserver.
6.2 Creation/configuration of process message destinations
6.2.1 Creation of process message destinations
The reference process message destination should be copied to each plant which requires the‘Outbound Control Recipe Status Change’ interface.
The destination address should be modified to the ‘RFC destination’ of the receiving SAP Business Connectorserver.
6.2.2 Creation of process message categories
A reference process message category has been defined in plant Z203, and transported to all SOS boxes.The reference PM Category is ‘Y_ST_X1’, and should be copied to each plant which requires the ‘OutboundControl Recipe Status Change’ interface. One PM Category should be created per CRD in the plant.
No special configuration of the MQseries objects are needed for the PCS interfaces. Theconfiguration method is described within the "Client Middleware ClientMQCreator user's guide" isstored in Documentum folder.
The Queue Manager and objects for the PCS systems are created using the CAQM sheet of"ClientMQCreator-DBc.xls
8.1.1 Create the application queues to connect PCS to the MW Hub
The ClientMQCreator tool should have been used to create the following output scripts. Thesescripts should be used to define the queues on the Gateway queue manager the Middleware hubqueue manager and the MQ Hub queue manager.
Script Componentaffected
Script's purpose
<MW_QM_name>_<Appl_name>.txt MW Hubqueuemanager
MQSC script to create the MQ objects forthe CA required on the MW Hub queuemanager
<MWH_QM_name>_<SYS>_S<SID>_C<CLIENT>_LF.txt
MW Hubqueuemanager
MQSC script to create the MQ objects onthe MW Hub queue manager.
<MQH_QM_name>_<SYS>_S<SID>_C<CLIENT>_LF.txt
MQ Hubqueuemanager
MQSC script to create the MQ objects onthe MQ Hub queue manager.
<GW_QM_name>_<Appl_name>.txt GW queuemanager
MQSC script to create the MQ objects forthe CA required on the GW queuemanager
<Appl_name> stands for <Appl>_<SourceID> where <Appl> is the short name of the application inquestion and <SourceID> is the source ID of the application.Configuration scripts should be run using the command as indicated in the header section insidethe configuration script.
8.1.2 Configuration Files
The following is a list of the configuration files for the SAP BC and the GAF. The source for these files isdelivered by the ClientMQCreator. These files should be used as input to the configuration process whichfollows.
The following is a list of the configuration files for the SAP BC and their designation. The source for thesefiles is delivered by the ClientMQCreator. These files should be used as input to the configuration processwhich follows.
The field Client_StockType in any MaterialProducedRequirement segment or MaterialProducedActualsegment should be transformed according to the Quality XRef lookup table, shown below. The transitionshould be from 'IM Quality Status' to 'S95 Quality Status'.
The inbound S95.ProductionSchedule message sends the status characteristic in a text string format. This textstring will be mapped to a numerical format (00003, 00004, 00005, 00007) for output in the Process-Messageaccording to the following table.
The structure of the lookup file is
Sap_Status Pcs_Status
00003 Ready
00004 Discarded
00005 Finished
This is a comma-separated file and each record is terminated by New Line. Comment records should startwith #.
The field Client_StockType in any MaterialProducedActual segment (in SegmentResponse level 1 and level3) should be transformed according to the Quality XRef lookup table, shown below. The transition should befrom 'S95 Quality Status' to 'IM Quality Status'.
8.3.2.9 Batch to Batch Transfer/SLOC to SLOC Transfer/Inbound Receipt/LocalQuality Change (Transaction Id: 010298)
All the four interfaces are Inbound Idoc Interfaces.
The middleware tables will be updated according to the following information:
The Transaction Id for the main map is 010298 and the transaction Id for
each message is as follows
Batchto Batch Transfer (Transaction Id:010292)
SLOC to SLOC Transfer(Transaction Id:010291)
Inbound Receipt(Transaction Id:010290)
Local Quality Change(Transaction Id: 010293)
All the four Interfaces has the same Input(S95 Transfer Performance XML) and Output (IdocWMMBID02)Structure.Only difference is the message type.
MW can receive four types of messages from the PCS systems(Batch to Batch Transfer message , SLOC toSLOC Transfer message , Inbound Receipt message and Local Quality Change message) .
For Batch to Batch Transfer message PCS will send the Transid 010292 in MIDH header. Middleware willread the MIDH and identifies the message type (YINVRPT700) from the Transid.
For SLOC to SLOC Transfer message PCS will send the Transid 010291 in MIDH header. Middleware willread the MIDH and identifies the message type (YINVRPT600) from the Transid.
For Inbound Receipt message PCS will send the Transid 010290 in MIDH header. Middleware will read theMIDH and identifies the message type (ZRECADV03) from the Transid.
For Local Quality Change message PCS will send the Transid 010293 in MIDH header. Middleware will readthe MIDH and identifies the message type (YINVRPT100) from the Transid.
There should be four different entries in the lookup file , one for each message in thelookup.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup)
PCS – Inbound control recipe status change (transaction Id 010249)
PCS – Production comsuption and reversal (transaction Id 010246)
PCS – Production declaration and reversal (Transaction Id 010247)
PCS – Transfer order (transaction Id 010289)
For these inbound interfaces entries need to be added to the shared GAF adapter inboundconfiguration file "SapBcInTransactionMap.dat". In this file the Client Delivery ID, the Delivery IDand the transaction ID is mapped to the service MQ2SAP.InboundALE, which is invoked in the SAPBusiness Connector in order to transfer the message to SAP.
# PCS Interfaces
CD|021124|010246|1|MQ2SAP.InboundALE|
CD|021124|010247|1|MQ2SAP.InboundALE|
CD|021124|010249|1|MQ2SAP.InboundBAPI
CD|021124|010289|1|MQ2SAP.InboundALE|
9.1.2 Outbound to SAP
As part of the standard Business Connector configuration, PCS specific transaction id values mustbe configured for the Idoc based outbound interfaces. The configuration file has the name/mw_Client/sapbc/packages/BAPI/config/transid/<SID>_>Client>.txt.
The following transactions exist for PCS.
PCS – Control recipe (transid 010250)
PCS – Outbound control recipe status change (transid 010126)
A sample entry of the corresponding configuration file is following:
We need to set up RFC listeners so that SAP outbound is being received in the SAPBC. For this itnecessary liase with the ALE team. The ALE team will provide a ProgramId, SAP Gateway andGateway Service.
9.2 Flat file interfaces
N/A
One Adapter serves one Market Application and is generic. The environment structure will comply with environment as normal IT development. Wherever the
application exists, it's Adapter must also exists. Each Adapter runs in a specific Environment (Adapter Environment) for a specific Market Application. (
e.g. EDI in Development, Test and production will be served by 3 different Adapters ). A specific Environment has one and only one Queue Manager.
Each Adapter has one Inbound Queue, one Outbound Queue, one TnT Queue and one Bad MessageQueue. There is only one Dead Letter Queue for each Queue Manager.
The detailed development specifications (SAP & Middleware) for every interface mentioned earlier is attachedbelow. These development specifications provide a detailed description of the activities required in theCLIENT template project to create the generic interface plug-in.
11 Author BioAveek has more than 11 years experience in software analysis and design and customdevelopment both in India and abroad. He has handled software projects U.S., Holland, UK,Switzerland and India. He has during his association with IBM, PWC & Consultancy firms in theU.S. gathered wide experience in developing leading edge technological solutions. He has beenheavily involved in developing Materials Management System, Manufacturing & Material Handlingsapplications, Process Control System Interfaces, Warehouse Control applications and Financialapplications in almost all the software projects he has undertaken. For the past 6 years, Aveek hasbeen associated with a number of SAP projects in India and abroad. Aveek has been involved inhandling Process Control Interfaces in the Manufacturing area.