Mastering IDoc Business Scenarios with saP NetWeaver PI · Michał Krawczyk, Michał Kowalczewski...

27
Michał Krawczyk, Michał Kowalczewski Mastering IDoc Business Scenarios with SAP ® NetWeaver PI Bonn Boston

Transcript of Mastering IDoc Business Scenarios with saP NetWeaver PI · Michał Krawczyk, Michał Kowalczewski...

Michał Krawczyk, Michał Kowalczewski

Mastering IDoc Business Scenarios withSAP® NetWeaver PI

Bonn � Boston

ch00_FM_5214.indd 3ch00_FM_5214.indd 3 29.05.2009 15:58:0529.05.2009 15:58:05

5

Contents

Preface ............................................................................................................. 9

1 IDoc Basics and Elemental Technical Configuration .................. 11

1.1 Creating Connections Between Different Systems ........................... 131.1.1 RFC Type Connection ......................................................... 131.1.2 TCP/IP Type Connection .................................................... 17

1.2 Port Definition ................................................................................ 181.3 Partner Profile Maintenance ........................................................... 21

1.3.1 Parameters ......................................................................... 221.3.2 Creating Logical Systems .................................................... 231.3.3 Customizing ....................................................................... 24

1.4 Summary ........................................................................................ 26

2 Business Scenario Configuration ............................................... 27

2.1 Purchase Orders and Purchase Order Changes in the MM Component ............................................................................. 302.1.1 Selecting the Appropriate Application and Procedure ........ 312.1.2 Creating a New Output Type .............................................. 332.1.3 Access Sequence ................................................................ 392.1.4 Creating a Condition Record .............................................. 402.1.5 Defining a Partner Profile ................................................... 422.1.6 Fine-Tuning Messages ........................................................ 452.1.7 Entering the Material Numbers from the Vendor’s Systems 462.1.8 Testing the Scenario ........................................................... 47

2.2 Receiving Purchase Order Confirmations ........................................ 502.2.1 Creating an Appropriate Partner Profile .............................. 512.2.2 Setting Up Confirmation Control in Customizing for

Purchasing ......................................................................... 512.2.3 Setting Up Confirmation Keys in Material Infotypes ........... 532.2.4 Testing the New Settings ................................................... 54

2.3 Logistic Invoice Verification ............................................................ 542.3.1 Creating Appropriate Partner Profiles ................................. 552.3.2 Allocating Company Code, Tax Code Mapping, and

“Special Program Parameters” ............................................ 56

288.book Seite 5 Dienstag, 2. Juni 2009 9:54 09

Contents

6

2.3.3 Testing the New Settings ................................................... 582.4 Processing Inbound Orders in SD .................................................... 59

2.4.1 Creating Suitable Partner Profiles with InboundParameters ......................................................................... 60

2.4.2 Converting External Partner Numbers ................................ 622.4.3 Assigning a Customer to SD Organizational Data ............... 632.4.4 Testing and Debugging Incoming IDoc Sales Orders ........... 64

2.5 Outbound Order Confirmation ....................................................... 652.5.1 Selecting or Creating a New Output Type .......................... 662.5.2 Selecting a Proper Procedure ............................................. 682.5.3 Creating Entries in Condition Record Tables ....................... 692.5.4 Configuring the Partner Profile ........................................... 702.5.5 Testing the Configuration ................................................... 71

2.6 Outbound Delivery ......................................................................... 732.6.1 Selecting or Creating Output Types .................................... 732.6.2 Adding the Output Type to the Appropriate Procedure ...... 752.6.3 Maintaining the Condition Records .................................... 762.6.4 Defining the Partner Profile ................................................ 772.6.5 Testing the Configuration ................................................... 79

2.7 Outbound Invoice .......................................................................... 802.7.1 Selecting or Creating Output Types .................................... 802.7.2 Adding Output Types to the Appropriate Procedure .......... 812.7.3 Creating a Condition Table ................................................. 822.7.4 Creating Entries in Partner Profiles ..................................... 842.7.5 Testing the Configuration ................................................... 85

2.8 Extension of Condition Tables ......................................................... 862.8.1 Creating a Condition Table ................................................. 882.8.2 Access Sequence ................................................................ 912.8.3 Output Type ...................................................................... 94

2.9 Summary ........................................................................................ 94

3 Master Data Distribution ........................................................... 95

3.1 Change Pointers ............................................................................. 973.2 Distribution Model ......................................................................... 1003.3 Partner Profile for the Distribution Model ....................................... 1033.4 Scheduling Reports ......................................................................... 1063.5 Configuring the Production System ................................................. 109

288.book Seite 6 Dienstag, 2. Juni 2009 9:54 09

Contents

7

3.6 The Receiving System ..................................................................... 1103.7 Summary ........................................................................................ 111

4 IDoc Monitoring ......................................................................... 113

4.1 Searching for IDocs ......................................................................... 1134.2 IDoc Reprocessing .......................................................................... 116

4.2.1 Inbound Documents .......................................................... 1164.2.2 Outbound Documents ....................................................... 117

4.3 IDoc Editing ................................................................................... 1184.4 Automated IDoc Monitoring .......................................................... 1194.5 Automated IDoc Monitoring with CCMS ........................................ 1204.6 IDoc Monitoring with Solution Manager ........................................ 126

4.6.1 Creating a Business Process ................................................ 1274.6.2 Interface Scenario Creation ................................................ 1284.6.3 Configuring Interface Scenario Monitoring ......................... 131

4.7 Summary ........................................................................................ 137

5 SAP NetWeaver PI in IDoc Scenarios ........................................ 139

5.1 SAP NetWeaver PI Introduction ..................................................... 1395.2 IDoc Exchange Basics Using SAP NetWeaver PI .............................. 143

5.2.1 IDoc Metadata Inside the Integration Repository andIntegration Engine ............................................................. 145

5.2.2 IDoc Metadata Comparison ............................................... 1465.3 Sending IDocs to SAP NetWeaver PI ............................................... 147

5.3.1 SAP Application System Configuration ............................... 1485.3.2 SAP NetWeaver PI Configuration ....................................... 1495.3.3 Running a Test procedure for Sending IDocs to

SAP NetWeaver PI ............................................................. 1535.3.4 ALE Acknowledgments as SAP NetWeaver PI Request

Messages ........................................................................... 1575.4 Sending IDocs from SAP NetWeaver PI ........................................... 1595.5 Monitoring IDocs Inside SAP NetWeaver PI ................................... 1695.6 IDoc Control Record ....................................................................... 1695.7 IDoc Packages and Event-Driven

Messages ........................................................................................ 1735.7.1 Setting Up IDoc Packages .................................................. 1745.7.2 Advanced Scheduling of Message Processing ..................... 176

288.book Seite 7 Dienstag, 2. Juni 2009 9:54 09

Contents

8

5.8 Sender IDoc Adapter Packaging – Enhancement Package 1 for SAP NetWeaver PI 7.0 .................................................................... 177

5.9 IDoc Tunneling ............................................................................... 1805.9.1 Sending IDocs Without XML Conversion ............................ 1815.9.2 Setting Up IDoc Tunneling ................................................. 181

5.10 IDoc Acknowledgments .................................................................. 1835.10.1 Sending Acknowledgments from an SAP Application

System ............................................................................... 1845.10.2 Sending Acknowledgments from SAP NetWeaver PI .......... 187

5.11 IDoc Serialization ........................................................................... 1895.11.1 Setting Up Standard IDoc Serialization ............................... 1895.11.2 Removing IDocs from the Queues ...................................... 1935.11.3 Pseudo IDoc Serialization ................................................... 194

5.12 IDoc Bundling ................................................................................ 1955.13 Turning Off IDoc Processing Within the Integration Engine ............ 1975.14 IDoc Message Mappings ................................................................. 197

5.14.1 Optimizing the IDoc’s Structure ......................................... 1975.14.2 Message Mapping Examples .............................................. 2005.14.3 Graphical Message Mapping .............................................. 2015.14.4 User-Defined Functions in Graphical Message Mapping ..... 2035.14.5 XSLT Message Mapping ..................................................... 2055.14.6 Graphical Message Mapping .............................................. 2075.14.7 XSLT Mapping ................................................................... 209

5.15 Enabling ABAP Proxies From Every Outbound IDoc ........................ 2105.16 Summary ........................................................................................ 222

6 Summary .................................................................................... 223

Appendices ....................................................................................... 225

A Tables ....................................................................................................... 225B The authors ............................................................................................... 237

Preface ............................................................................................................. 239

288.book Seite 8 Dienstag, 2. Juni 2009 9:54 09

95

3 Master Data Distribution

In Chapter 2, you learned how to configure an SAP ECC system to send and re-ceive transactional data. However, if there is a need to exchange transactional datathere is also very often a requirement of exchanging master data.

As you have seen in previous chapters, you can use MC to send transactional data.However, this tool cannot be used for exchanging master data; instead, there aretwo procedures in SAP ECC for distributing master data, as follows:

� Sending master data directly.

� Distributing master data with the Shared Master Data (SMD) tool.

Both require an ALE layer and a distribution model to produce IDocs. First, wewill focus on the differences and purposes of these two procedures. The configu-ration of the distribution model in the ALE layer will be explained later in thischapter.

Sending Master Data Directly

A set of standard reports is used to distribute different master data objects toother systems. These reports can be run manually or they can be scheduled andrun automatically in the background. These reports often provide selection crite-ria and it is possible to customize which object should be distributed (e.g., lower-ing the amount of data by number ranges, plant, etc.).

These reports are used mostly for initial load purposes (when the interface is atgo-live and other systems should be provided with the entire set of data) but canalso be used as a background job to periodically supply the external system withup to date data. The limitation of this method is the amount of data. For example,it is not effective to use this tool every day to exchange hundreds of thousands ofrecords when the actual changes concern only a few of the records. For this pur-pose it is more suitable to use the SMD tool, which will be described in the nextsection. You will find a list of different master data objects and the correspondingtransactions in which to send them in Table 3.1.

288.book Seite 95 Dienstag, 2. Juni 2009 9:54 09

Master Data Distribution

96

3

Shared Master Data Tool

Using the SMD tool is a more sophisticated method to build master data inter-faces. It allows for “delta” exchange. This means that the system sends only newrecords and changes to existing master data objects, not the entire data. Thismethod is the common method for building highly efficient, message-driven in-terfaces for master data.

To learn how this method works, we have to look at the SAP change document in-terface. In SAP ECC, when a master data object is created or modified, a changedocument is created. Change documents consist of a header and different posi-tions. The header consists of the document number, the type of change (creationor modification), and the date and the change number. Positions consist of fieldsthat were modified with their old and new values. Technically, change documentsare stored in CDHDR and CDPOS tables. There is also a set of standard function mod-ules that are invoked in SAP transactions to fill these tables.

The change document interface is a part of SAP ECC and is used for different pur-poses. One of the recipients is shared master data, using change pointers. Thechange pointers mechanism consists of a set of customizing steps in which youcan specify that changes in master data objects of a particular type should be dis-tributed by IDocs. The procedure is as follows:

1. A user creates or changes a master data object.

2. A change document interface is started and a change document is recorded intothe database.

3. The change document is transferred to the SMD tool. If a change pointer to aparticular master object is switched on, the change pointer is recorded into thedatabase

Technically, change pointers are stored in BDCP and BDCPS tables (with Web Appli-cation Server 6.10 and higher it could also be a BDCP2 table). To create IDocs inthe event of changes in master data, you need to periodically invoke the RBDMIDOCreport. This report reads the change pointers table and produces master IDocs.The status of processed change pointers changes to read (to avoid sending thesame changes more than once).

The master IDoc is handed over by the ALE layer, which creates regular IDocsand—because of the distribution model (see the next sections)—sends them to theappropriate receivers. The entire process is illustrated in Figure 3.1.

288.book Seite 96 Dienstag, 2. Juni 2009 9:54 09

Change Pointers

97

3.1

These two procedures (sending master data directly and using the SMD tool) areoften combined. Reports for sending master data directly are used for initial load(at go-live) and change pointers are used to distribute changes during normal sys-tem usage.

You will see in the next sections how to configure these elements. In our example,we will cover the configuration for sending customers, vendors and material mas-ter data. We will exchange data between two SAP ERP systems, but the secondsystem could also be an external, non-SAP system connected with SAP ERP viaSAP NetWeaver PI. In a real business scenario, the SAP ERP system is often a mas-ter system for master data management. In this scenario, all changes to this datatake place in the SAP ERP system and are propagated by SAP NetWeaver PI toother systems in landscape. Therefore, in this chapter, we will focus on sendingmaster data from SAP ERP. However, at the end of the chapter, you will find in-formation on how to receive master data using a distribution model to a secondSAP ERP system.

3.1 Change Pointers

As you already know, change pointers are used to inform SMD that some objectshave changed and that it is time to produce an IDoc. Change pointers are config-ured as follows:

Figure 3.1 Generating IDocs of Master Data Changes

Create/Change Master Data

Change Document Creation

Change Pointer Creation

Application Layer

Change Document Layer

Periodicallyinvoked

RBDMIDOCreport

Change Pointers

ALE Layer

Master IDoc

Distribution Model/ALE configuration

IDocs to receivers

288.book Seite 97 Dienstag, 2. Juni 2009 9:54 09

Master Data Distribution

98

3

1. First, you have to activate change pointers in general. To accomplish this, youhave to open Transaction SALE (most of the configuration in this chapter willbe performed in Transaction SALE), which can be seen in Figure 3.2.

2. Next, select Application Linking Enabling (ALE) � Modelling and Imple-

menting Business Processes � Master Data Distribution � Replication of

Modified Data � Activating Change Pointers � Generally.

3. Then, select the checkbox Change pointers activated – generally and saveyour selection (see Figure 3.3).

Figure 3.2 Transaction SALE

Figure 3.3 Activating Change Pointers In General

288.book Seite 98 Dienstag, 2. Juni 2009 9:54 09

Change Pointers

99

3.1

4. After having activated change pointers in general, you need to turn on changepointers for particular objects. As mentioned, we have chosen customers, ven-dors and material data. From the same position in the tree in Transaction SALE,select Activate Change Pointers for Message Types. This is where you definewhich master data object changes generate IDocs.

5. From the list, select the IDoc message types CREMAS (for vendors), DEBMAS (forcustomers) and MATMAS (for material master), select the checkboxes in the Acti-

vate column, and save your changes. As shown in Figure 3.4, within the list,you can see the different IDoc message types you can activate to send IDocswith changes. Table 3.1 contains master data objects and the correspondingIDoc message types.

Figure 3.4 Activating Change Pointers for Particular Objects

Master data object IDoc message type Transaction to send

Material master MATMAS BD10

Vendor CREMAS BD14

Customer DEBMAS BD12

Product catalog PRDCAT –

Price list PRICAT –

Price conditions COND_A –

Bill of materials (BOM) BOMMAT BD30

G/L account GLMAST BD18

Cost center COSMAS BD16

Cost element COELEM BD24

Table 3.1 Different Master Data Objects and the Corresponding IDoc Message Types

288.book Seite 99 Dienstag, 2. Juni 2009 9:54 09

Master Data Distribution

100

3

The system is now configured to generate change pointers for customers, ven-dors, and materials. You can verify this making a modification in any materialmaster record (using Transaction MM02) and then opening Transaction SE16 andlooking at the last entry in table BDCP (or, depending on the system version, tableBDCP2). There should be a record related to your change. Table CDPOS (linked viathe field CHANGENR) should show the technical name of the fields you changed,with the old and new values.

The next step is configuring the distribution model. It tells you who will be a re-ceiver of the created IDocs.

3.2 Distribution Model

When change pointers are configured, the system knows that it has to registerchanges in master data because they will be sent as IDocs. But it does not knowwho will be the IDoc receiver. The main purpose of the distribution model is tospecify receivers for IDocs. It also consists of tools that simplify the entire config-uration for sending and receiving master data.

As you know, IDocs can be exchanged directly between SAP systems and non-SAPsystems using an integration server such as SAP NetWeaver PI (IDocs are trans-lated into internet standards such as Web Services).

For the direct exchange between two SAP ECC systems, the distribution model al-lows you to do configure both systems in one place. In this scenario, one systemis the sender of a set of master data and the other is the recipient.

For our example, we will assume that we have two SAP ECC systems. One is calledBCS and the other is called BE6. The logical names of these systems are BCSCLNT800and BE6CLNT100. We want to establish interfaces for master data such as materialmaster, vendors, and customers (for which we turned on change pointers in theprevious section). The BCSCLNT800 system will be the sender and the BE6CLNT100system will be the receiver (see Figure 3.5).

When we operate with system names in the distribution model, we use logicalsystems (refer to Chapter 1 for details). As you remember, logical systems are alsomanaged in Transaction SALE. For this example, you could define a system differ-ent from BE6CLNT100 in your landscape. In this case, you need to define the re-ceiver system in the logical systems via Transaction SALE and the path Applica-

288.book Seite 100 Dienstag, 2. Juni 2009 9:54 09

Distribution Model

101

3.2

tion Link Enabling (ALE) � Sending and Receiving Systems � Logical systems �

Define Logical System.

In addition, the sender system (BCSCLNT800) has to be assigned to the client viaSALE � Application Link Enabling (ALE) � Sending and Receiving Systems � Log-

ical systems � Assign Client to logical system. (This task is always performedduring the Basis system installation; therefore, you probably do not have to do itnow).

We will now start with the configuration of the distribution model:

1. Log in to BCSCLNT800 (the sender system).

2. Open Transaction SALE and select Application Link Enabling (ALE) � Model-

ling and Implementing Business Processes � Maintain Distribution Model

and Distribute Views (see Figure 3.6).

3. Switch to edit mode and click the Create model view button.

Figure 3.5 Message Flow for the Master Data Scenario

Figure 3.6 Transaction SALE and the Distribution Model

SAP ECC

BE6CLNT100

SAP ECC

BCSCLNT800

Customer

Vendor

Material Master

288.book Seite 101 Dienstag, 2. Juni 2009 9:54 09

Master Data Distribution

102

3

4. Next, enter a short name, a technical name, and a start and end date for thismodel (see Figure 3.7). The start and end dates are very useful. If there areknown changes that will be made to your system landscape, you can set the enddate of the existing model to the date of the landscape changes and prepare anew model with a start date from that point.

5. Highlight the model, click the Add message type button, and specify sender

system, receiver system and message type. In our example, the settings wouldbe as follows:

� Model view: MMVENCUS

� Sender: BCSCLNT800

� Receiver: BE6CLNT100

� Message type: MATMAS (for material master exchange)

6. We also want to send vendors and customers; therefore, repeat this step forthese message types as follows:

� CREMAS (for Vendors)

� DEBMAS (for Customers)

(Provide the same sender and receiver system as specified previously.) Yourscreen should look similar to the one shown in Figure 3.8.

Figure 3.7 Creating a New Model

Figure 3.8 Example of a Distribution Model for Material Master, Vendors, and Customers

288.book Seite 102 Dienstag, 2. Juni 2009 9:54 09

Partner Profile for the Distribution Model

103

3.3

With the current configuration, all customers, vendors, and materials will be sent.However, it is possible to place filters and thus limit the data that is sent. In ourexample, we want to send only master data that fulfills filter requirements; there-fore, we will place a filter for material master. As you know, different materialtypes can be maintained in SAP ECC. For example, there are finished products(type FERT) and finished goods (type HAVA). We will use material type as a param-eter to filter materials, limiting the interface to send only master data of finishedproducts. Proceed as follows:

1. Select the No filter set field under MATMAS and double-click.

2. A new window opens and you can create filters by choosing Create filter

group. After expanding the subtree, you should see all of the possible fieldsyou can use for filtering. For our example, select Material Type and double-click. Next, by using the “+” icon, enter a FERT value. FERT is a standard mate-rial type for finished goods.

3. Return to the main screen of the distribution model. You will see that insteadof No filter set, Data filter active is displayed under MATMAS. Save yourchanges.

The distribution model is now ready. The following summarizes what we haveachieved in this section:

� We have created the distribution model and the system BCSCLNT800 will sendmaster data to BE6CLNT100.

� The set of data contains material master, vendors, and customers.

� By using a filter on material master, we limited the scope of materials to onlyfinished products (FERT material type).

In the next section, we will finish the configuration for the sending system. Themissing steps are creating the partner profiles and scheduling a report for IDocgeneration.

3.3 Partner Profile for the Distribution Model

As you know from previous chapters, sending IDocs requires an appropriate part-ner profile. A partner profile is a set of rules that specifies how an IDoc to be sentto a specific receiver should be created (e.g., which program has to be used to cre-

288.book Seite 103 Dienstag, 2. Juni 2009 9:54 09

Master Data Distribution

104

3

ate the IDoc, should it be send one by one or in packets, etc.). Refer to Chapter 1for more general information on this topic.

The advantage of creating a partner profile from the distribution model is that itis possible to generate the profile automatically.

There is a single prerequisite to automatically create partner profiles from the dis-tribution model. You need to have the same name for the sender logical systemand an R/3 connection managed in Transaction SM59. This requirement is easyto fulfill because the common naming convention for the R/3 connection is simi-lar to logical system names (refer to Chapter 1 for more information on this topic).To create a partner profile from the distribution model, proceed as follows:

1. Open Transaction SALE and go to Maintaining Distribution Model (Applica-

tion Link Enabling (ALE) � Modelling and Implementing Business Pro-

cesses � Maintain Distribution Model and Distribute Views). Alternatively,you can open Transaction BD64 directly.

2. In the main screen, select your distribution model (in our example, it is MMVEN-CUS) and choose Environment � Generate partner profiles from the menu.

3. In the next screen, you can set parameters (see Figure 3.9). The predefined val-ues are fine for our example. Click Execute to begin the creation of partner pro-files. The results should be the same as shown in Figure 3.10. The results are:

� A partner profile has been created for the logical system.

� The system found that the same R/3 connection name as the logical systemname exists (Transaction SM59; refer to Chapter 1 for more information onthis transaction) and the port was created. As you learned previously, theconnection requires the same name as the logical system to be able to cre-ate the partner profile from scratch using this tool.

� The following outbound messages were added:

– CREMAS04 for sending vendors

– DEBMAS06 for sending customers

– MATMAS05 for sending materials

– SYNCHON for technical purposes

After generating the partner profile, the scenario for sending master data is almostcomplete. From here, it is possible to test the scenario for Sending Master Data

Directly. If you want to send changes in master data automatically, there is one ad-ditional step, described in Section 3.4.

288.book Seite 104 Dienstag, 2. Juni 2009 9:54 09

Partner Profile for the Distribution Model

105

3.3

Figure 3.9 Generating a Partner Profile Directly from the Distribution Model

Figure 3.10 Creating Partner Profiles

288.book Seite 105 Dienstag, 2. Juni 2009 9:54 09

Master Data Distribution

106

3

To test the scenario Sending Master Data Directly, use Transactions BD10,BD12, and BD14 and send one material, vendor, and customer.

3.4 Scheduling Reports

To fully make use of change pointers, you have to schedule the report RBDMIDOC.This report periodically sends any changes collected. Proceed as follows:

1. In Transaction SALE, select Application Link Enabling (ALE) � Modelling

and Implementing Business Processes � Master IDoc Distribution � Replica-

tion of Modified Data � Creating IDocs from Change Pointers. In the treeyou see two options:

� Choose/Define Variants

� Schedule Report

2. The first step involves creating a variant for every message of the distributionmodel for which changes should be sent automatically. Select Define Variants

and in the next screen, select Goto � Variants from the menu.

3. Next, enter the name of the variant. It is good practice to choose a name similarto the message type for which the variant is being created. Click Create (seeFigure 3.11).

Figure 3.11 Variant Maintenance

288.book Seite 106 Dienstag, 2. Juni 2009 9:54 09

Scheduling Reports

107

3.4

4. You also have to create variants for the message types MATMAS, DEBMAS and CREMAS.

5. Enter “MATMAS” and click Create.

6. In the next screen, enter the message type “MATMAS” and click the Back icon.

7. Click Yes in the pop-up to confirm.

8. In the next screen, enter a description for the variant (for example: “SendingMATMAS IDocs”) in the field Meaning and click the Save button. Repeat thisprocedure for the message types DEBMAS and CREMAS.

After variant preparation, the second step involves scheduling the report RBDM-IDOC for each message type. Proceed as follows:

1. Go back to Transaction SALE and select Schedule Report.

2. In the first screen, enter the job name, for example “Sending MATMAS IDocs”and click Start condition.

3. In the next screen, click Immediate (see Figure 3.12) and click the Period val-

ues button.

Figure 3.12 Period Maintenance

288.book Seite 107 Dienstag, 2. Juni 2009 9:54 09

Master Data Distribution

108

3

4. You can now specify how often the job will be executed and the time whenIDocs with changes will be populated. Click Other period and then enter thetime. For our example, specify 20 minutes between two jobs.

5. Click Save and go back to the first job creation screen.

6. Next, click the Step button on the first job creation screen. This is where youwill specify the action in the system. In the Name field you should see the nameof the report RBDMIDOC.

7. Select a variant for the report from the previously created variants and saveyour changes. In our example, we will first use the MATMAS variant (see Figure3.13).

8. This completes the procedure of scheduling the job. Repeat this procedure forthe other messages, DEBMAS and CREMAS. For these, you can specify a differentstart time so that each starts after the previous job has finished.

Figure 3.13 The Step Configuration

288.book Seite 108 Dienstag, 2. Juni 2009 9:54 09

Configuring the Production System

109

3.5

It is good practice to also schedule report RBDCPCLR for deleting used change point-ers. This practice will keep the change pointer tables at a reasonable size. Themaintenance of the report is very simple; therefore, this is not explained furtherin this book.

3.5 Configuring the Production System

Unfortunately, not all of the configuration we have described is automaticallyadded to transport requests. Some of the work has to be done manually in the pro-duction system the same way it was done in the development system. We will de-scribe step by step which elements require additional effort.

The activation of the general indicator and of particular change pointers is automat-ically added to a transport request. However, with the distribution model, it is notas easy. As you know, the model is prepared for particular logical systems. There-fore, in the development system, you should build three different models for theentire landscape (development, quality assurance, and production system). It isgood practice to build the model for the development system and perform all tests.If the model fulfills all business requirements, create another one for the qualityassurance landscape, using a copy of the development landscape (change only log-ical system names). If all tests here also complete without issue, use the quality as-surance landscape as a reference for the production environment (creating a copyof the quality assurance landscape and changing only logical system names).

To build a model from an existing model, open the Maintenance of Distribu-

tion model (using a link from Transaction SALE or using Transaction BD64 di-rectly), go to edit mode, and highlight a model to copy. Then, select Edit � Model

view � Copy from the menu.

In the next screen (see Figure 3.14), enter a name and the sending and receivingsystems for the next landscape and confirm.

After creating a distribution model copy, you can add the model to the transportrequest by selecting Edit � Model View � Transport from the menu.

At each system in the landscape you also need to manually perform the following:Create partner profiles (Section 3.3) and schedule jobs (Section 3.4). Variants forreports are transportable; therefore, you can schedule reports using the same vari-ants as those you created in the development system.

288.book Seite 109 Dienstag, 2. Juni 2009 9:54 09

Master Data Distribution

110

3

3.6 The Receiving System

There is another big advantage of using the distribution model versus manual con-figuration. This book is concerned with SAP NetWeaver PI; however, when thereceiving system is another SAP ECC system (without an integration server), it ispossible to send the distribution model to the receiving system and import andcreate all of the necessary configuration for incoming IDocs on the receiving sys-tem side.

To send the distribution model, open Transaction BD64 or locate the distributionmodel in Transaction SALE. Then, select Edit � Model View � Distribute from themenu. Select the name of the model you want to distribute. In our example it isMMVENCUS. On the next screen, the system displays a list of the existing logical sys-tems and the receiving system should be highlighted. Confirm in the pop-upscreen, and the model should be sent to the second SAP ECC system.

Next, log on to the receiving system and open the distribution model there (usingTransaction SALE or directly by using Transaction BD64). The imported model

Figure 3.14 Copying an Existing Distribution Model

288.book Seite 110 Dienstag, 2. Juni 2009 9:54 09

Summary

111

3.7

should be visible. In this system, the model has the status read only because themaster version is located on the other system. However, we do not want to per-form any changes in interface logic—our purpose is to generate partner profilesfor inbound IDocs. To accomplish this, perform the same steps as those outlinedin Section 3.3. From the menu, select Environment � Generate partner profiles

and confirm the generation of the partner profiles in the next screen (see Figure3.9). As you can see, this function creates the necessary partner profiles from thedistribution model for both outgoing and incoming IDocs.

3.7 Summary

This chapter provided you with information on how to create an interface formaster data. You were provided with two approaches:

� Sending master data directly using predefined reports.

� Sending “delta” changes using change pointers.

These two methods require the definition of a distribution model and the creationof partner profiles. Sending “delta” changes also requires special report scheduling.

This as well as the previous chapter explained different ways of interfacing trans-actional documents. As such, they described the most common cases of configur-ing SAP ECC interfaces.

288.book Seite 111 Dienstag, 2. Juni 2009 9:54 09

239

Index

A

ABAP mapping 200Access sequence 35, 39, 67, 74, 86, 91Acknowledgment 183

Configuration 156Status 156

Adapter 140Engine 141Framework 188

Adapter-specific identifier 150Advanced function 204ALE

Audit message 184Logical system 166

ALE/EDI 120Parameter 122

ApplicationAcknowledgment 183Code 31Log 115Select 31

Application Link Enabling � ALEApply control record values from payload

170, 172Assign tax code 56Automation 119

B

Background job 95BAPI 27Basic type 146

ORDERS05 43Batch input 64Best Effort (BE) 192Business

Landscape 150Service 163System 149, 150

Business Application Programming Interface � BAPI

Business processEngine 141Monitoring 126

C

CCBPM 174CCMS 120Change document 96Change list 162Change pointer 96, 97, 106Client 22Communication user 15Component monitoring 167Computing Center Management System �

CCMSCondition

Record 39, 76Table 39, 69, 82, 86

ConfigurationScenario 165Wizard 163

ConfirmationControl 51Key 53

ConnectionSAP R/3 14TCP/IP 14, 17

Consolidation system 126Control record segment 11Cross-Component Business Process Manage-

ment � CCBPM

D

Delta exchange 96DEMOPROCESS scenario 135Development system 109Distribution model 100, 110, 185

Copy 109Document Header Organizational Data 63

288.book Seite 239 Dienstag, 2. Juni 2009 9:54 09

Index

240

E

EDI 28EDI partners

Configure 62Electronic Data Interchange � EDIEO 192EOIO 191, 192Error message 115Event-driven message processing 174, 176Exactly Once In Order � EOIOExcatly Once � EOExtensible Stylesheet Language Transformati-

ons � XSLTExternal definition 195

F

Field catalog 88File port 20Flat file 20Function module

IDOC_INBOUND_IN_QUEUE 190, 193IDOC_OUTPUT_ORDERS 45

G

Graphical message mapping 205, 209

H

Header 96Header mapping 166, 172HTTP (Hypertext Transfer Protocol) 13

I

IDoc 11Acknowledgments 183Adapter 143, 170Bundling 195Control record 169Debugging 115Definition 11Documentation � Transaction WE60Editing 118

IDoc (cont.)Error message 115Inbound 116Message types 99Metadata 145Monitoring 113ORDERS05 225ORDRSP 50Outbound 27, 117Package 174, 176Parameter 113Port 152Processing 197Receiver 100Receiver adapter 144Receiver channel 170Reprocessing 116Segment 114Sender 100Sender adapter 144Status 113Status description 114Type 11

IDoc-XML � XML messageInitial load 95Integration

Builder 139Directory 140, 150, 162Engine 141Engine Configuration� Transaction

SXMB_ADMProcess 174Repository 139Server 100, 139, 141

InterfaceInbound 163Mapping 207Outbound 163

Intermediate Document � IDocInternal communication 163Invoice 80

288.book Seite 240 Dienstag, 2. Juni 2009 9:54 09

Index

241

J

Java mapping 200

L

Logical system 22, 37, 148Logical Unit of Work (LUW) 191Logistic invoice verification 55

M

Master data 95Material info record 46Materials Management � SAP MMMaximum package size 175, 176Message

Broker 183Control (MC) 25, 27

Message type 11DESADV 73INVOIC 80ORDCHG 60ORDERS 60, 61ORDRSP 66

Metadata 147Monitor for message packages 175Monitoring

Customizing 131Object 124, 131Template 120

N

Node 124

O

OrderConfirmation 65Response 50, 66

Orders IDoc 50Outbound delivery 73, 79Output type 33, 66, 73, 80, 86, 94

P

Package size, maximum 175, 176Parameter

ACK_SYSTEM_FAILURE 187XML_CONVERSION 181

Parser document 20Partner profile 21, 35, 51, 60, 70, 77, 84, 103Permanent error 188Port 18, 146

Maintaining 12Type 25

Positions 96Procedure 32, 68, 75, 81

Select 31Process code 61, 62, 84Production environment 109Properties 124Purchase order 30

Q

qRFC 190Quality assurance 109Queue processing 190Queued Registration � Transaction

SXMB_XDMQueued RFC � qRFC

R

Receiver 100, 110Agreement 172

Registered server program 17Remote Function Call Application Program-

ming Interface � RFC APIRemote Function Call � RFCReport

IDX_CHECK_METADATA 146IDX_NOALE 156IDX_RESET_METADATA 147IDX_SELECT_IDOCTYP_WITHOUT_IS 197RBDMIDOC 96, 106RBDSTATE 185Scheduling 106SXMS_UNPACK_MESSAGES 176

288.book Seite 241 Dienstag, 2. Juni 2009 9:54 09

Index

242

Requirement 68, 74RFC

Connection 148Destination 12, 148, 151, 152RFC API 17

RoleSAP_XI_CONFIGURATOR 153

Runtime Workbench (RWB) 142, 167

S

Sales and Distribution � SAP SDSales order 30, 60SAP

Application system 126Change document interface 96SAP ECC (ERP Central Component) 96, 100SAP ERP (Enterprise Resource Planning) 19SAP GUI (Graphical User Interface) 16SAP MM (Materials Management) 27SAP NetWeaver Application Server 189SAP NetWeaver PI (Process Integration) 97SAP R/3 connection 14SAP SD (Sales and Distribution) 27SAP Solution Manager 113, 119, 126

Sending master data directly 95Serialization 189, 194Shared Master Data Tool � SMDSLD 139, 141

Bridge 149SMD 27, 96SOAP payload 181Software component 160Status description 114Synchronous communication 183System

Acknowledgment 183Number 148

T

TableBDCP 96BDCP2 96BDCPS 96CDPOS 100

Table (cont.)IDXIDOCINB 197IDXQUEUE 194

Take receiver from payload 172Take sender from payload 172Target host 148TCP/IP 14, 17Technical system 149Test message 167Test tool for IDoc processing � Transaction

WE19Threshold value 124, 134Transaction

BD10 99BD12 99BD14 99BD16 99BD18 99BD24 99BD30 99BD64 104BD87 116BDMO 120BDMONIC3 120ME21N 30, 31ME22N 31ME23N 58MM02 100NACE 32RZ20 120SALE 98, 100, 104SD08 84SD09 84SM59 13SXI_MONITOR 169SXMB_ADM 181, 187SXMB_MONI 168, 169, 174VA03 30WE02 113, 115, 118WE19 64, 118WE21 18WE60 20, 211WEINBQUEUE 193WEOUTQUEUE 193

Transactional RFC � tRFC

288.book Seite 242 Dienstag, 2. Juni 2009 9:54 09

Index

243

Transmission Control Protocol/Internet Proto-col � TCP/IP

Transport request 109tRFC 19Turning off IDoc processing 197

V

Variant 106Vendor number 37

W

Web Services Description Language (WSDL) 195

X

XML messageIDOC-XML 143

XPATH expression 173XSLT 205

Editor 206Functions 206Mapping 200, 209

288.book Seite 243 Dienstag, 2. Juni 2009 9:54 09