process control systems interface.doc

46
Interfaces of SAP with PCS Guide © 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 1 SDN Community Contribution (This is not an official SAP document.) Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested 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 of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

Upload: srinivasa-reddy

Post on 22-Oct-2015

73 views

Category:

Documents


10 download

DESCRIPTION

Process Control Systems Interface.doc

TRANSCRIPT

Page 1: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 1

SDN Community Contribution

(This is not an official SAP document.)

Disclaimer & Liability Notice

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.

Page 2: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 2

1 Applies To:

Process Control Systems in Manufacturing.

2 Summary

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

Ensuring SupplyMM & MQ

Ensuring SupplyMaterial Handling

Company: IBM India

Date: 03 October 2005

Page 3: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 3

Table of contents

Disclaimer & Liability Notice........................................................................................................ 1

1 Applies To: .......................................................................................................................... 2

2 Summary............................................................................................................................. 2

2.1 CLIENT SAP R/3 Systems ............................................................................................. 5

2.2 Market Systems/Applications.......................................................................................... 5

3 Overview of Interface messages .......................................................................................... 6

3.1 Production Consumption and Reversal........................................................................... 6

3.2 Production Declaration and Reversal.............................................................................. 6

3.3 Transfer Order ............................................................................................................... 6

3.4 Move Storage Unit ......................................................................................................... 7

3.5 Cancel Transfer Order.................................................................................................... 7

3.6 Confirm Transfer Order .................................................................................................. 7

3.7 Local Quality Change..................................................................................................... 8

3.8 Inbound Receipt (for Purchase Order) ............................................................................ 8

3.9 Inbound Control Recipe Status Change.......................................................................... 9

3.10 Inbound Process Order Confirmation ......................................................................... 9

3.11 Control Recipe Download........................................................................................... 9

3.12 Outbound Control Recipe Status Change................................................................. 10

4 Implementation.................................................................................................................. 11

5 ALE Configuration.............................................................................................................. 12

5.1 Overview...................................................................................................................... 12

5.2 Creation of Logical systems ......................................................................................... 12

5.3 Creation/configuration of partner profiles ...................................................................... 14

6 Process Management Configuration .................................................................................. 26

6.1 Creation/configuration of control recipe destinations ..................................................... 26

6.2 Creation/configuration of process message destinations............................................... 26

Page 4: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 4

7 Master Data Prerequisites.................................................................................................. 28

7.1 Assignment of control recipe destinations to master recipes ......................................... 28

8 Middleware Routing and Mapping Customising.................................................................. 29

8.1 MQ configuration.......................................................................................................... 29

8.2 Assigning Middleware values to systems...................................................................... 30

8.3 Routing and Lookup files for each message ................................................................. 31

9 GAF Adapter ..................................................................................................................... 43

9.1 Business Connector and GAF adapter configuration......... Error! Bookmark not defined.

9.2 Idoc based interfaces .......................................................Error! Bookmark not defined.

9.3 Flat file interfaces......................................................................................................... 44

10 Technical Connectivity Testing.........................................Error! Bookmark not defined.

11 Attached Documents.................................................................................................... 45

12 Author Bio.................................................................................................................... 46

Page 5: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 5

2.1 CLIENT SAP R/3 Systems

The interfaces of this project will exchange messages with these areas

Ensuring SupplyMM & MQ

Ensuring SupplyMaterial Handling

2.2 Market Systems/Applications

The legacy application that is used in these interfaces.

MES-PCS systems Local factory systems SAM (Stoppage Analysis Module)

Page 6: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 6

3 Overview of Interface messages

3.1 Production Consumption and Reversal

3.1.1 CLIENT SAP System

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

Page 7: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 7

3.4 Move Storage Unit

3.4.1 Overview

3.4.2 CLIENT SAP System

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

Page 8: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 8

3.6.3 CLIENT Middleware

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

Page 9: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 9

3.9 Inbound Control Recipe Status Change

3.9.1 Overview

3.9.2 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_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

Page 10: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 10

Which system: SOS/COM

3.11.3 CLIENT Middleware

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

Page 11: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 11

4 Implementation

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.

.

Page 12: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 12

5 ALE Configuration

5.1 Overview

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

Character 3-6 ‘EPCS’ (External PCS)

Character 7-10 Plant Number

Name Character 1-14 ‘PCS: Plant’

Character 15-18 Plant Number

Character 20-40 Text:

Recommendation to use plantdescription

Page 13: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 13

The creation of Logical Systems occurs in transaction SALE: Sending and Receiving Systems->LogicalSystems->Define Logical System

Page 14: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 14

5.3 Creation/configuration of partner profiles

5.3.1 Creation of partner profiles

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.

Page 15: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 15

5.3.2.1 SAP Outbound interface 1

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.

The data has to be maintained as follows:

Field Required value Comments/Rationale

Partner Number Partner profile

Partner Type LS

Partner Function None

YINVRPT500Message Type

YINVRPT501

Message Code None

Message Function None

Page 16: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 16

Inbound Options Tab – Process Code /GLB/UGT_CONS_DECL Determines which programwill be used for processingand posting the message.

Inbound Options Tab – Processing byfunction module

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.

The data has to be maintained as follows:

IDOC: 793128 (ZRECADV01)

793097 (ZRECADV02)

793121 (ZRECADV06)

Page 17: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 17

739530 (ZRECADV07)

Field Required value Comments/Rationale

Partner Number Partner profile

Partner Type LS

Partner Function None

ZRECADV01

ZRECADV02

ZRECADV06

Message Type

ZRECADV07

Message Code None

Message Function None

Inbound Options Tab – Process Code /GLB/UGT_DEC_REV Determines which program willbe used for processing andposting the message.

Inbound Options Tab – Processing byfunction module

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.

Page 18: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 18

Post processing: permitted agent Tab To be defined by ALE team.

Telephony Tab N/A

5.3.3.3 Transfer Order

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: 782743.

Field Required value Comments/Rationale

Partner Number Partner profile

Partner Type LS

Partner Function None

Message Type WMTORD

Message Code None

Message Function None

Inbound Options Tab – Process Code WMT1 Determines which program willbe used for processing andposting the message.

Page 19: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 19

Inbound Options Tab – Processing byfunction module

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

Field Required value Comments/Rationale

Partner Number Partner profile

Partner Type LS

Partner Function None

Message Type WMSUMO

Page 20: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 20

Message Code None

Message Function None

Inbound Options Tab – Process Code WMSU Determines which program willbe used for processing andposting the message.

Inbound Options Tab – Processing byfunction module

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.

The data has to be maintained as follows:

Field Required value Comments/Rationale

Page 21: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 21

Partner Number Partner profile

Partner Type LS

Partner Function None

Message Type WMCATO

Message Code None

Message Function None

Inbound Options Tab – Process Code WMCA Determines which program willbe used for processing andposting the message.

Inbound Options Tab – Processing byfunction module

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

Page 22: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 22

5.3.3.6 Confirm Transfer Order

This message is received by SAP SOS systems from the various PCS plants through SAP BusinessConnector.

The data has to be maintained as follows:

Field Required value Comments/Rationale

Partner Number Partner profile

Partner Type LS

Partner Function None

Message Type WMTOCO

Message Code None

Message Function None

Inbound Options Tab – Process Code WMTO Determines which program willbe used for processing andposting the message.

Inbound Options Tab – Processing byfunction module

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.

Page 23: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 23

Post processing: permitted agent Tab

Telephony Tab N/A

5.3.3.7 Local Quality Change

This message is received by SAP SOS systems from the various PCS plants through SAP BusinessConnector.

The data has to be maintained as follows:

Field Required value Comments/Rationale

Partner Number Partner profile

Partner Type LS

Partner Function None

Message Type YINVRPT100

Message Code None

Message Function None

Inbound Options Tab – Process Code YINV_01 Determines which program willbe used for processing and

Page 24: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 24

posting the message.

Inbound Options Tab – Processing byfunction module

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.

The data has to be maintained as follows:

Field Required value Comments/Rationale

Partner Number Partner profile

Partner Type LS

Partner Function None

Message Type ZRECADV03

Page 25: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 25

Message Code None

Message Function None

Inbound Options Tab – Process Code ZREC_01 Determines which program willbe used for processing andposting the message.

Inbound Options Tab – Processing byfunction module

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

Page 26: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 26

6 Process Management Configuration

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.

Page 27: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 27

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.

Page 28: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 28

7 Master Data Prerequisites

For the interface to work properly, some prerequisites in terms of master data maintenance need to befulfilled.

7.1 Assignment of control recipe destinations to master recipes

In order to generate a control recipe, the master recipe must have the control recipe destination assigned atthe phase level.

Page 29: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 29

8 Middleware Routing and Mapping Customizing

8.1 MQ configuration

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.

Page 30: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 30

Script Componentaffected

Script's purpose

MQ HubBusinessConnector

Used for BC/GAF configuration

MQ HubBusinessConnector

Used for BC/GAF configuration

Scripts for deploying the SAP Client components

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.

Package File Name Operating Name + Location Type

<SID>_<CLIENT>_Out.ini /mw_Client/adapter/cfg/sapbc/SapBcAdapter.ini

System

/mw_Client/sapbc/packages/SAP2MQ/config/transid/<SID>_<CLIENT>.txt

Transactional

<SYS>_S<SID>_<CLIENT>_<SRCID>_In.ini /mw_Client/adapter/cfg/sapbc/<SYS>_S<SID>_<CLIENT>_<SRCID>_In.ini

System

samp.SapBcInTransactionMap.dat /mw_Client/adapter/cfg/sapbc/SapBcInTransactionMap.dat

Transactional

8.2 Assigning Middleware values to systems

If it is the first time that the MW communicates with the sending and/or receiving system, middleware teamwill have to attribute values:

Source GID for the zone and environment of the sending system (CTR, AOA, EUR or AMS/ Dev, QA,Pre-prod, Prod etc.)

Source ID to define the sending system Delivery GID for the zone and environment of the receiving system (CTR, AOA, EUR or AMS/ Dev, QA,

Pre-prod, Prod etc. ) Delivery ID for the receiving system

Page 31: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 31

8.3 Routing and Lookup files for each message

For common Lookup files , refer Generic MW Interface Implementation Guide v1.doc(Documentum path :BTC/Information Systems/2 - NSDC Phase (Design Constr.)/09 - Information Systems/06 - Custom ApplDevelopment/Reference docs/Implementation Guides/

Version 1.5)

8.3.1 SAP Outbound

8.3.1.1 Control recipe download (Transaction Id: 010250)Control recipe download is Outbound BAPI Interface.

The middleware tables will be updated according to the following information:

a.LogicalSystem_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

Refer MES-PCS_Routing Logic.doc for structure of the lookup file.

b.Quality_Cross_Reference_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

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 structure of the lookup file is

S95 QualityStatus

IM Quality Status WM QualityStatus

CommentField(optional)

Unrestricted <Blank> <Blank>

QI X S

Blocked S S

Page 32: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 32

This is a comma-separated file and each record is terminated by New Line. Comment records should startwith #.

For example,

#First record

QI,X,Q,

#Second record

Blocked,S,S,

#Third record

Unrestricted, , ,

8.3.1.2 Outbound control recipe status change (Transaction Id : 010126)Control recipe download is Outbound BAPI Interface.

The middleware tables will be updated according to the following information:

a.LogicalSystem_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

Refer MES-PCS_Routing Logic.doc for structure of the lookup file.

b.Lookup_Control_Recipe_Status_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

The outbound control recipe status change message sends the status characteristic in a numerical format(00003, 00004, 00005, 00007).

This number will be mapped to a text string for output in the S95.ProductionSchedule message according to thefollowing table.

The structure of the lookup file is

Page 33: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 33

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 #.

For example,

#First Record

00003,Ready

#Second Record

00004,Discarded

#Third Record

00005,Finished

8.3.2 SAP Inbound

8.3.2.1 Inbound control recipe status change (Transaction Id: 010249)Control recipe status change is Inbound BAPI Interface.

The middleware tables will be updated according to the following information:

a.LogicalSystem_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

Refer MES-PCS_Routing Logic.doc for structure of the lookup file.

Page 34: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 34

b.Lookup_Control_Recipe_Status_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

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 #.

For example,

#First Record

00003,Ready

#Second Record

00004,Discarded

#Third Record

00005,Finished

Page 35: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 35

8.3.2.2 Production consumption and reversal (Transaction Id: 010246)Production Consumption & Reversal is Inbound Idoc Interface.

The middleware tables will be updated according to the following information:

a.LogicalSystem_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

Refer MES-PCS_Routing Logic.doc for structure of the lookup file.

8.3.2.3 Production declaration and reversal (Transaction Id: 010247)

Production Declaration & Reversal is Inbound Idoc Interface.

The middleware tables will be updated according to the following information:

a.LogicalSystem_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

Refer MES-PCS_Routing Logic.doc for structure of the lookup file.

b.Quality_Cross_Reference_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

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'.

The structure of the lookup file is

S95 QualityStatus

IM Quality Status WM QualityStatus

CommentField(optional)

Page 36: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 36

Unrestricted <Blank> <Blank>

QI X S

Blocked S S

This is a comma-separated file and each record is terminated by New Line. Comment records should startwith #.

For example,

#First record

QI,X,Q,

#Second record

Blocked,S,S,

#Third record

Unrestricted, , ,

8.3.2.4 Transfer order (Transaction Id: 010289)Transfer Order is Inbound Idoc Interface.

The middleware tables will be updated according to the following information:

a.LogicalSystem_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

Refer MES-PCS_Routing Logic.doc for structure of the lookup file.

b.Quality_Cross_Reference_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

The structure of the lookup file is

Page 37: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 37

S95 QualityStatus

IM Quality Status WM QualityStatus

CommentField(optional)

Unrestricted <Blank> <Blank>

QI X S

Blocked S S

This is a comma-separated file and each record is terminated by New Line. Comment records should startwith #.

For example,

#First record

QI,X,Q,

#Second record

Blocked,S,S,

#Third record

Unrestricted, , ,

8.3.2.5 Move storage unit (Transaction Id: 010296)Move storage unit is Inbound Idoc Interface.

The middleware tables will be updated according to the following information:

a.LogicalSystem_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

Refer MES-PCS_Routing Logic.doc for structure of the lookup file.

Page 38: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 38

8.3.2.6 Cancel Transfer Order (Transaction Id: 010295)Cancel Transfer Order is Inbound Idoc Interface.

The middleware tables will be updated according to the following information:

a.LogicalSystem_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

Refer MES-PCS_Routing Logic.doc for structure of the lookup file.

8.3.2.7 Confirm Transfer Order (Transaction Id: 010294)Confirm Transfer Order is Inbound Idoc Interface.

The middleware tables will be updated according to the following information:

a.LogicalSystem_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

Refer MES-PCS_Routing Logic.doc for structure of the lookup file.

8.3.2.8 Process Order Confirmation(Transaction Id: 010248)Process Order Confirmation is Inbound BAPI Interface.

The middleware tables will be updated according to the following information:

a.LogicalSystem_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

Refer MES-PCS_Routing Logic.doc for structure of the lookup file.

Page 39: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 39

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.

Page 40: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 40

There should be four different entries in the lookup file , one for each message in thelookup.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup)

example :

CD;011103;010290;1;MIDH;332;2; 010298;000000;MQ;T;19/02/2004;CD

CD; 011103;010291;1;MIDH;332;2; 010298;000000;MQ;T;19/02/2004;CD

CD; 011103;010292;1;MIDH;332;2; 010298;000000;MQ;T;19/02/2004;CD

CD; 011103;010293;1;MIDH;332;2; 010298;000000;MQ;T;19/02/2004;CD

There should be four mapctrl.txt files,one for each message in the respective trans lookup directories.

example :

mapctrl.txt in /mw_Client/mw_1/trans/011103/010290/lookup

mapctrl.txt in /mw_Client/mw_1/trans/011103/010291/lookup

mapctrl.txt in /mw_Client/mw_1/trans/011103/010292/lookup and

mapctrl.txt in /mw_Client/mw_1/trans/011103/010293/lookup

a.LogicalSystem_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

Refer MES-PCS_Routing Logic.doc for structure of the lookup file.

b.Quality_Cross_Reference_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

The structure of the lookup file is

S95 Quality IM Quality Status WM Quality Comment

Page 41: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 41

Status Status Field(optional)

Unrestricted <Blank> <Blank>

QI X S

Blocked S S

This is a comma-separated file and each record is terminated by New Line. Comment records should startwith #.

For example,

#First record

QI,X,Q,

#Second record

Blocked,S,S,

#Third record

Unrestricted, , ,

c.Message_Type_Lookup_UNI.txt(Location:DefaultLookupDirectory: /mw_Client/mw_1/lookup/)

This lookup is used to identify the message type from the TransId value.

The structure of the lookup file is

Trans ID Message Type CommentField(optional)

Page 42: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 42

Unrestricted <Blank>

QI X

Blocked S

This is a comma-separated file and each record is terminated by New Line. Comment records should startwith #.

For example,

First message type

010290,ZRECADV03,

#Second message typ

010292,YINVRPT700,

#Third message type

010291,YINVRPT600,

#Fourth message typ

010293,YINVRPT100,

Page 43: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 43

9 GAF Adapter

Appendix A:

9.1.1 Inbound to SAP

The following transactions exist for PCS.

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:

# PCS Interfaces

010126#1#PROCESS_MESS_DOWNLOAD#XRFC

010250#1#CONTROL_RECIPE_DOWNLOAD#XRFC

Page 44: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 44

9.1.3 RFC Listeners

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.

Page 45: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 45

10 Attached Documents

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.

Page 46: Process Control Systems Interface.doc

Interfaces of SAP with PCS Guide

© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 46

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.