Bit300 en Col54 Fv Part a4 | Electronic Data Interchange | Port (Computer Networking)

BIT300

Integration Technology ALE
SAP NetWeaver

Date Training Center Instructors Education Website

Participant Handbook
Course Version: 2005 Q4 Course Duration: 3 Day(s) Material Number: 50078127

An SAP course - use it to learn, reference it for work

Copyright
Copyright © 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. Additionally this publication and its contents are provided solely for your use, this publication and its contents may not be rented, transferred or sold without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Trademarks
• • • • • • Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® are registered trademarks of Microsoft Corporation. IBM®, DB2®, OS/2®, DB2/6000®, Parallel Sysplex®, MVS/ESA®, RS/6000®, AIX®, S/390®, AS/400®, OS/390®, and OS/400® are registered trademarks of IBM Corporation. ORACLE® is a registered trademark of ORACLE Corporation. INFORMIX®-OnLine for SAP and INFORMIX® Dynamic ServerTM are registered trademarks of Informix Software Incorporated. UNIX®, X/Open®, OSF/1®, and Motif® are registered trademarks of the Open Group. Citrix®, the Citrix logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc. HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. JAVA® is a registered trademark of Sun Microsystems, Inc. JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. SAP, SAP Logo, R/2, RIVA, R/3, SAP ArchiveLink, SAP Business Workflow, WebFlow, SAP EarlyWatch, BAPI, SAPPHIRE, Management Cockpit, mySAP.com Logo and mySAP.com are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other products mentioned are trademarks or registered trademarks of their respective companies.

• • • •

Disclaimer
THESE MATERIALS ARE PROVIDED BY SAP ON AN "AS IS" BASIS, AND SAP EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR APPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THESE MATERIALS AND THE SERVICE, INFORMATION, TEXT, GRAPHICS, LINKS, OR ANY OTHER MATERIALS AND PRODUCTS CONTAINED HEREIN. IN NO EVENT SHALL SAP BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES OF ANY KIND WHATSOEVER, INCLUDING WITHOUT LIMITATION LOST REVENUES OR LOST PROFITS, WHICH MAY RESULT FROM THE USE OF THESE MATERIALS OR INCLUDED SOFTWARE COMPONENTS.

g200672943835

About This Handbook
This handbook is intended to complement the instructor-led presentation of this course, and serve as a source of reference. It is not suitable for self-study.

Typographic Conventions
American English is the standard used in this handbook. The following typographic conventions are also used. Type Style Example text Description Words or characters that appear on the screen. These include field names, screen titles, pushbuttons as well as menu names, paths, and options. Also used for cross-references to other documentation both internal (in this documentation) and external (in other locations, such as SAPNet). Example text EXAMPLE TEXT Emphasized words or phrases in body text, titles of graphics, and tables Names of elements in the system. These include report names, program names, transaction codes, table names, and individual key words of a programming language, when surrounded by body text, for example SELECT and INCLUDE. Screen output. This includes file and directory names and their paths, messages, names of variables and parameters, and passages of the source text of a program. Exact user entry. These are words and characters that you enter in the system exactly as they appear in the documentation. Variable user entry. Pointed brackets indicate that you replace these words and characters with appropriate entries.

Example text

Example text

<Example text>

2005/Q4

© 2006 SAP AG. All rights reserved.

iii

About This Handbook

BIT300

Icons in Body Text
The following icons are used in this handbook. Icon Meaning For more information, tips, or background Note or further explanation of previous point Exception or caution Procedures

Indicates that the item is displayed in the instructor’s presentation.

iv

© 2006 SAP AG. All rights reserved.

2005/Q4

Contents
Course Overview ......................................................... vii
Course Goals ...........................................................vii Course Objectives .....................................................vii

Unit 1: ALE Fundamentals ............................................... 1
Cross-System Business Processes ..................................3 The Distribution Model .................................................9 Basic ALE Customizing .............................................. 15 Intermediate Documents ............................................. 30 Synchronizing Customizing.......................................... 44 ALE and the SAP NetWeaver Exchange Infrastructure.......... 51

Unit 2: Master Data Distribution ...................................... 57
Example: Material Master ........................................... 58 Using Change Pointers............................................... 75 Data Filtering and Reducing the Scope of Data .................. 80

Unit 3: Distributing Transaction Data: Message Control ...... 103
Message Control and IDoc Generation ...........................104 Example: Purchase Order Processing ............................ 119

Unit 4: Distributing Transaction Data: BAPIs .................... 137
Business Object Types and BAPIs ................................138 The Usage of BAPIs in ALE ........................................145 Example: Travel Expenses .........................................155

Unit 5: Monitoring Data Distribution, Error-Handling and Archiving.................................................................. 177
IDoc Status Management ...........................................179 Error Analysis and Handling ........................................190 SAP Workflow in ALE Environment ...............................212 Archiving IDocs.......................................................228

Unit 6: Appendix ........................................................ 235
Renaming Logical Systems.........................................236 IDoc Recovery Following Database Error ........................241

Index ....................................................................... 249

2005/Q4

© 2006 SAP AG. All rights reserved.

v

All rights reserved. 2005/Q4 .Contents BIT300 vi © 2006 SAP AG.

vii . Target Audience This course is intended for the following audiences: • • Consultants Project team members Course Prerequisites Required Knowledge • SAPTEC (Fundamentals of SAP Web AS) Recommended Knowledge • BIT100 (SAP NetWeaver Process Integration) Course Goals This course will prepare you to: • • • Create a system landscape for using different ALE scenarios (distributing master data and transaction data) Control data exchange between systems in a distributed system landscape Correctly assess the capabilities and limitations of ALE Course Objectives After completing this course.Course Overview This course explains how to use Application Link Enabling (ALE) using predefined example scenarios. depending on its type and recipient Monitor data exchange between systems 2005/Q4 © 2006 SAP AG. All rights reserved. you will be able to: • • • • Set up a distribution model for exchanging master and transaction data between systems Create partner profiles for data exchange in enterprises and for electronic communication with business partners Determine the scope of data to be distributed. You will learn how to configure ALE scenarios and how to control data exchange between systems.

Course Overview BIT300 SAP Software Component Information The information in this course pertains to the following SAP Software Components and releases: viii © 2006 SAP AG. All rights reserved. 2005/Q4 .

.. You will then find out which basic settings you need to make in Customizing and applications to use ALE..................3 Lesson: The Distribution Model ........... Unit Objectives After completing this unit. you will be able to: • • • • • • • • • • • • • • List examples of business processes in distributed system landscapes Differentiate ALE from EDI Explain the terms “logical system” or “logical system name”.....9 2005/Q4 © 2006 SAP AG.........Unit 1 ALE Fundamentals Unit Overview In this unit....... you will first learn about the possible applications of ALE in enterprises... “master IDoc” and “communications IDoc” Determine the details of basic types Describe the process from the creation of an IDoc in the sender system through to processing in the target system Describe methods for adjusting Customizing settings in SAP system landscapes Explain how ALE scenarios are integrated into SAP XI Unit Contents Lesson: Cross-System Business Processes ..... 1 ... “message type” and “distribution model” Explain the function of the distribution model Define logical system names and assign them to clients in SAP systems.......... ports and partner profiles Explain and differentiate between the terms “basic type”... All rights reserved.............. where applicable Explain the terms “IDoc” and “basic type” Determine the assignment of message types to basic types Complete a view in a distribution model Explain the function of RFC destinations.....

............................ 30 Exercise 2: Documentation for Basic Types .......................................................................................................... 2005/Q4 ............ All rights reserved...................... 44 Lesson: ALE and the SAP NetWeaver Exchange Infrastructure ... 41 Lesson: Synchronizing Customizing . 25 Lesson: Intermediate Documents .......... 51 2 © 2006 SAP AG................... 15 Exercise 1: Basic ALE Customizing .........Unit 1: ALE Fundamentals BIT300 Lesson: Basic ALE Customizing ....

banks and public authorities. You need to clarify how the parties involved in this kind of system group exchange data with each other. you will be able to: • • List examples of business processes in distributed system landscapes Differentiate ALE from EDI Business Example Globally-active enterprises usually structure their business using multiple clients in an SAP system. such as customers. Enterprise Structure and Business Processes An enterprise's head office. New master data and changes to existing data are regularly sent to the downstream systems of the sales and distribution branch and production. Lesson Objectives After completing this lesson. Figure 1: The Enterprise as a Whole and External Parties In the example illustrated above. often also using multiple SAP systems. 3 . Each subsystem communicates not only with the other members of the system group but also with business partners. Frequently.BIT300 Lesson: Cross-System Business Processes Lesson: Cross-System Business Processes Lesson Overview This lesson introduces examples of the application and use of ALE. vendors. All rights reserved. these are joined by systems for specific applications from other providers. the master data for the overall enterprise network is created and changed in the head office only. The central purchasing department orders 2005/Q4 © 2006 SAP AG. subsidiaries and sales and distribution branches are often technically separate systems.

After the goods have been delivered. an order is generated from this data. 2005/Q4 . Preparatory Steps for Mapping Cross-System Business Processes • Analysis of the enterprise's organizational structure and the mapping of its technical systems: which SAP systems or clients make up the enterprise's system landscape? Are there any non-SAP systems involved? Listing the software products installed in each participating system Describing the business processes that need to be mapped in the system landscape Breaking these processes down into individual steps Distributing the individual steps of the overall process to the participating systems or business partners • • • • 4 © 2006 SAP AG. All rights reserved. In the production system. the sales and distribution branch receives orders from customers and sends these to production to be manufactured. The SD branch's system creates an order from the data in this purchase order and then an (internal) purchase order. Figure 2: Example: Sales Order Processing The customer sends a purchase order to the sales and distribution branch. Communication is to be electronic throughout all the processes. SD then. in turn. which it sends to production's system.Unit 1: ALE Fundamentals BIT300 from vendors. presents the customer with an invoice for the delivered goods. Depending on the agreements between the two enterprise areas. the production system confirms the order from the SD branch and announces delivery of the ordered material amounts. The SD branch can now confirm the customer's order in turn and notify the customer of a consignment of goods. production invoices sales and distribution for them.

Figure 3: Example: Centralized Material Master Administration In the scenario illustrated above. The master data is distributed from this maintenance system to the downstream systems. In this case. the master record should not be transferred in its entirety. When configuring the ALE scenario.BIT300 Lesson: Cross-System Business Processes Internal Communication: Distributing Master Data with ALE ALE can be used within an enterprise for central master data administration (among other uses): master data is created and changed in only one of the systems in the enterprise network. or there needs to be a guarantee that values changed locally cannot be overwritten if the data records are transferred again. it is therefore important to pay attention to the distribution hierarchy and also to take into account the fact that not every recipient receives all the data. the departments in the receiving system are responsible for the maintenance of certain portions of a master record. However. A typical example of this is centralized master data administration. the data records are forwarded in electronic form to each of the recipients. and when? Do all the recipients receive all the data in its entirety? 2005/Q4 © 2006 SAP AG. sales and distribution should only receive the master records for finished products. All rights reserved. Basic Questions when Planning Centralized Master Data Distribution • • • • Which master data is maintained in which system? To which systems must the master data then be distributed? How often is the data distributed. all the material masters are created in the head office and distributed from there to the downstream systems of sales and distribution and production. whereas production should receive material master data for both finished products and raw materials. In a different scenario. 5 .

2005/Q4 .Unit 1: ALE Fundamentals BIT300 Communication with External Parties: Purchase Order Handling with EDI You want to communicate electronically not only within the enterprise. The unit on “Distributing Transaction Data: Message Control” contains more information about the differences between ALE and EDI. banks. Figure 4: Example: Purchase Order Processing Generally. HR master data is managed. payroll accounting is processed and other sensitive data is retained. business partners. or government agencies) is carried out using Electronic Data Interchange (EDI). data exchange with external parties (that is. All rights reserved. sends an order confirmation. who. An electronic document is sent in an SAP-specific format from an SAP system to an EDI subsystem. the data from an order created in your own system can be electronically transferred to a vendor. The subsystem converts this document to an EDI document. called a converter. Separating Systems for Legal Reasons: Human Resources Often. a separate system is set up for human resources (HR). Unauthorized access 6 © 2006 SAP AG. in turn. but also with your business partners. to comply with data protection legislation. and sends it to the supplier. In this way. shipping confirmation and finally an invoice. not ALE. In this system.

The results from the payroll or travel expenses are transferred to head office from the HR system for posting in Accounting. All rights reserved.BIT300 Lesson: Cross-System Business Processes to this data is supposed to be prevented (or at least made difficult) by technically separating the HR system from the other systems in the enterprise network. Other possible reasons for separating human resources are: • • • Independence during technical upgrades Independence when installing Support Packages that effect (human resource-related) legal changes (known as Legal Change Patches) Better performance Figure 5: Separate System for Human Resources Since Accounting is one of the systems included in the head office system. this latter also requires HR master data for paying salaries and wages or reimbursing travel costs. Cost centers and other account assignment objects are also required in both systems. Thus even in the case of a separate Human Resources system. master data distribution is useful. 2005/Q4 © 2006 SAP AG. 7 .

All rights reserved. 2005/Q4 .Unit 1: ALE Fundamentals BIT300 Lesson Summary You should now be able to: • List examples of business processes in distributed system landscapes • Differentiate ALE from EDI 8 © 2006 SAP AG.

for all external systems (if this has not already been done). define logical system names for every client involved in the system group and. using the example of centralized master data administration as a basis. All rights reserved. If the name refers to a client. assign the name to the client in the next step. 9 . Lesson Objectives After completing this lesson. as it determines which sender transfers which data to which recipients. you will be able to: • • Explain the terms “logical system” or “logical system name”. if applicable. You want to familiarize yourself with the configuration of an ALE scenario.BIT300 Lesson: The Distribution Model Lesson: The Distribution Model Lesson Overview The distribution model is the core component of ALE. It is made up of assignments of logical system names and message types. SAP recommends using the naming 2005/Q4 © 2006 SAP AG. To guarantee that the logical system name is unique and to simplify the assignment. “message type” and “distribution model” Explain the function of the distribution model Business Example You have analyzed your business processes and the existing system landscape. Logical System Name Once you have determined which parts of the enterprise should use ALE to exchange data with each other. Figure 6: Example of a Scenario to be Mapped The logical system name uniquely identifies the client of an SAP system or a non-SAP system in the system landscape. This lesson explains all three terms and the function each one plays in ALE scenarios.

the SAP system has the key G23. sales and distribution is called SALES and production is PRODUCTION. client 800 receives the logical system name G23CLNT800. in addition to assigning logical system names. 2005/Q4 . for example. for example. Naming the systems in this way is an alternative to the SAP convention if the assignment of clients to logical system names is frequently changed. which indicate data that can be exchanged between systems in ALE or EDI scenarios. Clients 800. you also need to indicate the types of data that are to be exchanged: if. Note: The terms “logical system name” and “logical system” are used interchangeably. it could be useful not to use SAP's recommended convention for logical system names. Message Type When configuring an ALE scenario.Unit 1: ALE Fundamentals BIT300 convention <System name>CLNT<Client key>. In the example illustrated below. Figure 7: Logical System Names In certain cases. Caution: Changing the logical system name is a serious intervention. Thus. 10 © 2006 SAP AG. you want to distribute material masters with ALE in the future. comparable to logical system names. as this name is included in numerous application tables (see lesson on “Basic ALE Customizing” and appendix “Renaming Logical Systems”). 810 and 811 are used. All rights reserved. you need to name the type of data (material masters) with what is known as a message type (MATMAS). Message types are therefore essentially keys. The training clients for this course have “descriptive” names: the logical system name for head office is CORE.

2005/Q4 © 2006 SAP AG. the head office (CORE logical system) distributes material masters (MATMAS message type) to sales and distribution (SALES logical system) and production (PRODUCTION logical system). Distribution Model and Model Views If you want data to be sent from one logical system to another. you specify in the distribution model which message type is to be sent from which logical system to which logical system(s). All rights reserved.BIT300 Lesson: The Distribution Model Figure 8: Logical Systems and Message Types Both elements – the logical system name and message type – are linked to each other in the distribution model. in order to determine which sender sends which data to which recipient. In this model view. 11 . You will learn about how to use BAPIs in ALE in the unit: “Distributing Transaction Data: BAPIs”. If you set up a new ALE scenario. you normally create a new model view for this scenario in the distribution model of one of systems involved. The distribution model bundles all the assignments of senders. “Business Application Programming Interfaces” (BAPIs) are used instead of message types. Note: In some ALE scenarios. you name the sender and recipient using their logical system names and then add the message type describing the type of data that is to be sent. recipients and data to be sent. In the example illustrated above.

the model view “master data” was created in the CORE logical system. All rights reserved. You can distribute a model view to the partner systems using ALE. also possible to transport a model view to other systems. In the example shown above.Unit 1: ALE Fundamentals BIT300 Figure 9: Model View in a Distribution Model You then need to distribute the newly created model view. make it known to the other systems involved. in other words. 2005/Q4 . you should maintain the distribution model centrally in one logical system and then distribute or transport its views to the other affected logical systems. They receive copies of the new model view. subject to certain conditions (explained below). however. 12 © 2006 SAP AG. Figure 10: Distributing Model Views Note: To ensure that data remains consistent. It is. However. this also affects the logical systems SALES and PRODUCTION.

2005/Q4 © 2006 SAP AG.BIT300 Lesson: The Distribution Model You can find the distribution model in the IMG via SAP NetWeaver → SAP Web Application Server → IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Maintain Distribution Model and Distribute Views. All rights reserved. 13 .

Unit 1: ALE Fundamentals BIT300 Lesson Summary You should now be able to: • Explain the terms “logical system” or “logical system name”. 2005/Q4 . All rights reserved. “message type” and “distribution model” • Explain the function of the distribution model 14 © 2006 SAP AG.

ALE Customizing in the Implementation Guide You can find all the basic Customizing settings in an SAP system's Implementation Guide (IMG) under SAP NetWeaver → SAP Web Application Server → IDoc Interface / Application Link Enabling (ALE). you will learn where to find information about the ALE scenarios provided by SAP. In addition to this. Lesson Objectives After completing this lesson.BIT300 Lesson: Basic ALE Customizing Lesson: Basic ALE Customizing Lesson Overview This lesson introduces basic ALE Customizing. You can also call this section of the IMG directly by calling transaction SALE. You therefore want to get an overview of the Customizing settings needed to set up ALE scenarios. You also want to check if there is a standard ALE scenario that would be suited to your purposes. where applicable Explain the terms “IDoc” and “basic type” Determine the assignment of message types to basic types Complete a view in a distribution model Explain the function of RFC destinations. 15 . All rights reserved. you will be able to: • • • • • Define logical system names and assign them to clients in SAP systems. ports and partner profiles Business Example You want to use ALE to exchange data between two SAP systems. Figure 11: Transaction SALE 2005/Q4 © 2006 SAP AG.

Depending on the application. All rights reserved. choose SAP NetWeaver → SAP Web Application Server → IDoc Interface/Application Link Enabling (ALE) → Logical Systems → Define Logical System. go to Modelling and Implementing Business Processes → Configure Predefined ALE Business Processes → Human Resources.Unit 1: ALE Fundamentals BIT300 In the area Modelling and Implementing Business Processes. you will find extensive documentation about ALE scenarios. in addition to a description of the scenario and the substeps needed to configure it. you will find. using transaction code BD54. Hint: You can also call the table of logical system names directly. such as “auto-Customizing” or a program for checking the completeness and internal consistency of your settings. Defining Logical System Names and Assigning them to Clients Each system in the system landscape must have a logical system name. Figure 12: Defining Logical Systems You can define logical system names in Customizing. If. 16 © 2006 SAP AG. supporting functions. 2005/Q4 . You can then assign this name to the client of an SAP system. which you can use in many different applications (→ Configure Predefined ALE Business Processes). for example. you are interested in possible uses of ALE in human resources. This name uniquely identifies the logical system in the system landscape. In the SAP Reference IMG.

The current version of the basic type for message type MATMAS. represents material records. for example. 17 . go to Tools → ALE → ALE Development → IDoc → IDoc Type Development → IDoc Type for Message (transaction WE82). The material master data to be distributed is transported in an electronic intermediate document (IDoc) from the sender system to the recipient system. Hint: You can also call this table directly. using a transaction code (SCC4). The structure of the document is determined in a basic type. For an overview of all the message types. in the SAP Easy Access Menu. The basic type defines the formatting structure of the data record that is to be sent. Figure 13: Message Type and Basic Type To find out which version of the basic type is best suited to your SAP system's release level. All rights reserved. for example. MATMAS. Message Types and Basic Types In ALE.BIT300 Lesson: Basic ALE Customizing You can find the assignment of logical system names to clients in the IMG. go to Tools → ALE → ALE Development → Logical Messages (transaction WE81). is MATMAS05. To do this. This IDoc contains the data from the master record in an SAP-specific format. the name of the IDoc basic type is the same as the name of the message type but with a version number added to it. 2005/Q4 © 2006 SAP AG. message types indicate the data that is to be exchanged between each of two systems. see the table Output Types and Assignment to IDoc Types. Generally. via SAP NetWeaver → SAP Web Application Server → IDoc Interface/Application Link Enabling (ALE) → Logical Systems → Assign Logical System to Client. Note: The structure and use of IDocs is described in more detail in the lesson on “Intermediate Documents”.

in the IMG. All rights reserved. enter the logical system names of the sender and the recipient and a message type. 2005/Q4 . you define for each of your ALE scenarios which logical system sends what type of data to which partner system. You can create new model views in Customizing. go to SAP NetWeaver → SAP Web Application Server → IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Maintain Distribution Model and Distribute Views or call the distribution model directly via transaction BD64.Unit 1: ALE Fundamentals BIT300 Creating Model Views in the Distribution Model In the distribution model of a logical system. 18 © 2006 SAP AG. Figure 14: Distribution Model Maintenance in the IMG To create a new model view. To do this. You can assign logical systems for different message types as well as the sender and recipient roles in the same model view.

the systems involved exchange data via Remote Function Calls (RFC). From one SAP system.BIT300 Lesson: Basic ALE Customizing Figure 15: Distribution Model To ensure the consistency of the data across the system landscape and beyond. and distribute them or transport them to the partner systems (see below). 2005/Q4 © 2006 SAP AG. it is advisable to maintain the different views of a distribution model in one central system. RFC Destinations and Ports In ALE scenarios. an RFC calls a function module in another SAP system. All rights reserved. RFCs make it possible to exchange data between different SAP systems or between one SAP system and a non-SAP system. 19 . specially-programmed functions are called instead of function modules. In non-SAP systems. the interface of these functions simulates a function module.

you can also use file ports in addition to RFC ports (see lesson on “Intermediate Documents”). To do this. specify a target host. In EDI scenarios. IP addresses. You can create ports manually or – if the logical target system and the RFC destination have the same name – have the sender system create them. Thus the RFC destination contains all the technical information that the calling system needs to call the partner from within the network.Unit 1: ALE Fundamentals BIT300 Figure 16: Defining RFC Destinations For your ALE scenarios. you create RFC destinations for all the partner systems in each system involved. select in the ALE Customizing IDoc Interface / Application Link Enabling (ALE) → Communication → Create RFC Connections or use transaction SM59. In order to use ALE scenarios later on. ALE always uses RFC ports. 2005/Q4 . All rights reserved. and (if applicable) the system number and user and logon data for “remote login” in the target system. The sender uses the port to determine the communication channel to the recipient. you can have the system carry out certain settings automatically later on. 20 © 2006 SAP AG. the RFC must be assigned to a port. Note: There are different types of port in SAP systems. Hint: If you give the RFC destination the same name as the logical target system. In the RFC destinations.

BIT300 Lesson: Basic ALE Customizing Transferring IDocs Using tRFC To ensure that RFC functions can be executed reliably. In transactional RFC calls. The job starts the corresponding function module(s) in the target system at a later time. The tRFC component in the SAP system handles everything else. Note: An external tRFC client needs to repeat the calls itself at a later time. If a connection error occurs during a synchronous RFC. and independently of RFC server or RFC server system availability. The tRFC solves this problem as tRFC calls can be transferred even if the target system is not available. This ensures that the function module called is only executed once in the RFC server system. Once the processing is complete. the connection to the tRFC interface is implemented in such a way that the client or server programs must perform a number of administration functions on the RFC API basis to ensure that the function module is executed only once.0. the transactional RFC (tRFC) was introduced in SAP R/3 3. the data that belongs to an RFC function must be saved temporarily in the SAP database in the RFC client system. Figure 17: Transactional RFC As a database on an external system is not always available. In these cases. 2005/Q4 © 2006 SAP AG. All rights reserved. securely. the client repeats the call without knowing whether the processing has already taken place. the data is saved locally in the sender system and transmitted later. this must be confirmed to the calling ABAP program. 21 . In SAP R/3 or SAP ECC. automatic job scheduling is used for this purpose.

ALE scenarios require partner profiles for every combination of recipient system and message type. the sender system uses the port assigned to the partner profile to find the RFC destination that enables it to call the recipient system. the partner profile determines whether the IDoc is sent immediately or not until later. in order to identify the recipient of each message prepared in IDoc format. the recipient system reads how and when the data from the inbound IDoc is to be transferred to the relevant application. Figure 18: Partner Profiles On the one hand. 22 © 2006 SAP AG. These profiles are also necessary for processing inbound IDocs.Unit 1: ALE Fundamentals BIT300 In the SAP system. so that it can create an IDoc with the data that is to be distributed. There is always an outbound and an inbound partner profile for each message type in an ALE scenario. I) (SM59): • • • Suppress batch job in the event of communication errors (manual start with transaction SM58 required) Number of connection attempts Interval in minutes between repeated attempts to transfer data Partner Profiles In ALE scenarios. From the inbound partner profile. As a rule. On the other. 2005/Q4 . you can set tRFC parameters for the relevant connection in table RFCDES (for connection types T. what is known as a process code is used to find a function module for the inbound processing of the IDoc. 3. the sender system reads the basic type for the message type from the outbound partner profile. In addition to this. application programs check the system's distribution model when they are called. All rights reserved.

The authorization object for distributing model views is B_ALE_MODL. All rights reserved. Note: The lesson on “Intermediate Documents” explains how to create and change ports and partner profiles. This message type is used only for determining the RFC destination for the target system. 2005/Q4 © 2006 SAP AG. If the name of the logical target system and its RFC destination are the same.BIT300 Lesson: Basic ALE Customizing For a model view to be distributed to all the partner systems. 23 . the sender system can automatically create a port with the appropriate RFC destination and generate the partner profiles for the message types of a model view. the sender system must contain outbound partner profiles for message type SYNCH for all the affected recipient systems.

2005/Q4 .Unit 1: ALE Fundamentals BIT300 24 © 2006 SAP AG. All rights reserved.

BIT300

Lesson: Basic ALE Customizing

Exercise 1: Basic ALE Customizing
Exercise Objectives
After completing this exercise, you will be able to: • Find information about ALE scenarios supplied by SAP • Determine which logical system names are allocated to which clients • Check distribution model views and partner profiles

Business Example
You want to use ALE to exchange data between two SAP systems. You therefore want to get an overview of the Customizing settings needed to set up ALE scenarios. You also want to check if there is a standard ALE scenario that would be suited to your purposes.

Task:
First, look in the IMG documentation to see if there are any ALE scenarios for master data distribution between SAP systems. Next, check the assignment of the logical system names CORE, SALES and PRODUCTION to the three training clients mentioned by your instructor. Then take a look at the distribution model for the CORE logical system. 1. Search in the IMG documentation for ALE scenarios for master data distribution. To do this, use the IMG section IDoc Interface / Application Link Enabling (ALE) (transaction SALE). In one of the three clients for the mySAP ERP logistics and accounting system, check the assignment of the logical system names to the three clients. Make a note of the assignment: Logical system CORE SALES PRODUCTION 3. In the distribution model for the CORE system, select all the model views containing message type MATMAS. Hint: Use the Filter model display button. Client

2.

Continued on next page

2005/Q4

© 2006 SAP AG. All rights reserved.

25

Unit 1: ALE Fundamentals

BIT300

4.

From the distribution model, display the CORE system's partner profiles for the SALES and PRODUCTION systems. Check the detail settings for the MATMAS message type. Check the corresponding inbound partner profiles in the SALES system.

5.

26

© 2006 SAP AG. All rights reserved.

2005/Q4

BIT300

Lesson: Basic ALE Customizing

Solution 1: Basic ALE Customizing
Task:
First, look in the IMG documentation to see if there are any ALE scenarios for master data distribution between SAP systems. Next, check the assignment of the logical system names CORE, SALES and PRODUCTION to the three training clients mentioned by your instructor. Then take a look at the distribution model for the CORE logical system. 1. Search in the IMG documentation for ALE scenarios for master data distribution. To do this, use the IMG section IDoc Interface / Application Link Enabling (ALE) (transaction SALE). a) Select IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Configure Predefined ALE Business Processes → Logistics → Master Data Distribution. You will find IMG activities for setting up various master data distribution scenarios.

b) 2.

In one of the three clients for the mySAP ERP logistics and accounting system, check the assignment of the logical system names to the three clients. Make a note of the assignment: Logical system CORE SALES PRODUCTION a) b) Choose IDoc Interface Application Link Enabling (ALE) → Basic Settings → Logical Systems → Assign Logical System to Client. One by one, select the table entries for the three training clients and for each one: in the Logical system field, you will see click Details the logical system name assigned to the client in question (CORE, SALES or PRODUCTION). Client

Continued on next page

2005/Q4

© 2006 SAP AG. All rights reserved.

27

Unit 1: ALE Fundamentals

BIT300

3.

In the distribution model for the CORE system, select all the model views containing message type MATMAS. Hint: Use the Filter model display button. a) Select IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Maintain Distribution Model and Distribute Views. Click on the Filter model displays button, enter MATMAS in the Message Type field and select Execute : the system will only display model views containing message type MATMAS.

b)

4.

From the distribution model, display the CORE system's partner profiles for the SALES and PRODUCTION systems. Check the detail settings for the MATMAS message type. a) b) c) In the distribution model's menu, select Environment → Change partner profile. Open the folder for partner type LS (logical system) and select the entry for the SALES partner. In the outbound parameters, select the entry for message type MATMAS and click on DetailScreenOutb.Parameter : the SALES port and the MATMAS05 basic type are assigned here. The IDocs should be sent immediately. Call the distribution model as in step 3 a). In the menu, select Environment → Change partner profile, open the folder for partner type LS and select the CORE partner. Select the inbound parameters for the entry for message type MATMAS and click on DetailScreenInboundParameter : process code MATM is assigned here. The IDocs should be processed immediately.

5.

Check the corresponding inbound partner profiles in the SALES system. a) b) c)

28

© 2006 SAP AG. All rights reserved.

2005/Q4

BIT300

Lesson: Basic ALE Customizing

Lesson Summary
You should now be able to: • Define logical system names and assign them to clients in SAP systems, where applicable • Explain the terms “IDoc” and “basic type” • Determine the assignment of message types to basic types • Complete a view in a distribution model • Explain the function of RFC destinations, ports and partner profiles

2005/Q4

© 2006 SAP AG. All rights reserved.

29

In the outbound partner profiles for sender and recipient. data sent between two SAP systems or between SAP systems and non-SAP systems is transported in the form of Intermediate Documents (IDocs).Unit 1: ALE Fundamentals BIT300 Lesson: Intermediate Documents Lesson Overview In ALE scenarios. Lesson Objectives After completing this lesson. 30 © 2006 SAP AG. Note: Message types specify the type of data that is to be distributed. Basic types are linked to message types. through to the processing of the data in the recipient system. presents various possible ways of generating IDocs and gives you an overview of the whole process. The example illustrated below shows a section from the structure of the basic type MATMAS05. from IDoc creation in the sender system. in the same way as the interfaces of an ABAP function module. All rights reserved. A basic type can be compatibly enhanced for a new release. find out more about the technical implementation of ALE scenarios. This lesson deals with the structure of IDocs. by doing so. This means that there are often various basic types for one message type: each basic type represents a version of the same basic pattern. 2005/Q4 . The structure of an IDoc is specified by the basic type or IDoc type. the systems involved exchange data in the form of intermediate documents (IDocs). Structure of an IDoc: The Basic Type In ALE scenarios. you will be able to: • • • Explain and differentiate between the terms “basic type”. “master IDoc” and “communications IDoc” Determine the details of basic types Describe the process from the creation of an IDoc in the sender system through to processing in the target system Business Example You want to use ALE to exchange data between two SAP systems and. They are included in distribution model views. the appropriate basic type is assigned to one message type (see the lesson on “Basic ALE Customizing”).

composed of segment fields. such as the first release of the IDoc type. it specifies which data is stored in which location (row and offset). The row structure of an IDoc segment is determined by a segment type. is determined in the IDoc type. Segment field attributes: technical and semantic properties of a field. The rows make up the segments of an IDoc. this documentation includes the following attributes: • • IDoc type attributes: information. go to Tools → ALE → ALE Administration → Services → Documentation → IDoc Types and Segments or call transaction WE60. It also determines the order in which application data belongs to a message. An IDoc does not have to contain all the segments of its segment type. the field name is stored along with the technical properties and semantics of the field. see transaction WE30 (IDoc Type Development). The structure of the basic types provided by SAP is documented in detail in SAP R/3 and mySAP ERM. Segment type attributes: this includes the information about whether a segment is “required” or “optional” and the minimum or maximum number of segments allowed for a segment type. For every segment field. Among other things. which are. To call this documentation. 31 . All rights reserved. in turn. An IDoc's data is organized in rows. and a segment type can have more than one segment. and how many segments are permitted for a segment type. IDoc segments can be hierarchically related to one another.BIT300 Lesson: Intermediate Documents Figure 19: The Basic Type The basic type structures the formatting of the application data that is to be sent. Whether an IDoc must contain a particular segment. Note: For an overview of the segment structure of a basic type. • 2005/Q4 © 2006 SAP AG. In addition to information about the IDoc segments and their hierarchical dependencies.

Unit 1: ALE Fundamentals BIT300 In addition to this. therefore. Note: The basic types provided by SAP can be enhanced to suit the customer's needs. not saved to the database. which contains the meta information for the line. this table is called a master IDoc. Internal tables are. 2005/Q4 . and the actual data part. The most important information in the control part is the name of the segment type that describes the structure of the data part. An internal table is a data object in an ABAP program that exists only during the runtime of the program. The Master IDoc The application programs that you use in ALE scenarios always begin by generating an internal table based on the IDoc basic type and using an ABAP program. All rights reserved. the documentation generally contains information about earmarking a segment field for organizational or business needs. The application data is formatted line by line according to the basic type and then inserted in this internal table. The control section of every row consists of the following fields: MANDT DOCNUM SEGNUM Client Number of the IDoc Consecutive number (line number in internal table) 32 © 2006 SAP AG. The BIT350 training course deals with enhancing IDoc basic types (ALE enhancements). Figure 20: Structure of a Master IDoc Each line in the internal table consists of a control part.

Every communications IDoc consists of exactly one control record and multiple data records and status records.BIT300 Lesson: Intermediate Documents SEGNAM PSGNUM HLEVEL Name of the segment type Line number of the parent segment Hierarchy level The data part consists of the following fields: DTINT2 SDATA Overall length of data part Long field of type CHAR. The line type of the internal table is determined by the ABAP Dictionary structure type EDIDD. they are generally referring to this communications IDoc. When the system or documentation refers to an “IDoc”. All rights reserved. The Communications IDoc Later in the application program run. which is described by the segment type. Figure 21: Structure of a Communication IDoc 2005/Q4 © 2006 SAP AG. the system uses the data from the master IDoc to generate a communications IDoc. Contains the data in the structure. 33 . an intermediate document that is saved to the database and then sent.

which is assigned internally in the system. The status records contain the processing steps of the IDoc. 2005/Q4 . and the last processing status. The data records in the communications IDoc correspond to the lines in the master IDoc. They log the stations that the IDoc has run through from when it was created to when it was sent. The figure below covers the four basic forms of IDoc creation: 34 © 2006 SAP AG. All rights reserved. this helps you to monitor data distribution between systems. The control record also contains the key fields of the partner profiles. You define the value range in each system using a number range interval. This number is unique within a logical system. Creating IDocs Application programs create IDocs in different ways.Unit 1: ALE Fundamentals BIT300 The important part of the control record is the IDoc number.

which the sender and target systems each mark with status values. Message control: some logistical applications in SAP R/3 and mySAP ERM use message control to output the data from their documents. 35 . Application programs: some application programs generate IDocs directly by filling an internal table in IDoc format and further processing it. Note: In later units. Exchanging Data with IDocs: Overview of the Process Data exchange using IDocs begins in the sender system when an intermediate document is created in IDoc format and ends when the data transported by the IDoc is posted in an application in the target system. you will become familiar with examples of IDoc generation using SMD. message control and BAPIs. Formatting the document data in IDoc format is one of the message output options. All rights reserved. 2005/Q4 © 2006 SAP AG. These transactions are brought together in the umbrella term “Shared Master Data” (SMD). you will also learn about how you can use these instruments for your ALE scenarios. In each lesson in this unit. certain stations are processed.BIT300 Lesson: Intermediate Documents Figure 22: How is an IDoc Created? • • • • Dedicated transactions: the preconfigured ALE scenarios for centralized master data administration use application transactions that were specifically programmed for creating IDocs. In the process. Business Application Programming Interfaces (BAPIs): the application program uses a BAPI with an ALE interface.

If all information about further processing is known. Exchanging Data with IDocs: Process Substeps First. the IDoc can be transferred to the application (status value 64). If all the information required for sending has been obtained from the recipient. The IDoc is saved to the target system's database (status value 50). However. it is first saved to the sender system's database (status value 01). the application program generates a master IDoc containing the application data. then the IDoc is sent and receives a corresponding status (status value 03). the IDoc receives status value 53. If the inbound processing is successful. If the inbound partner profiles specify that the IDoc is to be transferred to the application immediately. All rights reserved. Error Handling and Archiving”. If the outbound partner profiles specify that the IDoc is to be transferred immediately to the port stored in the relevant message type. Note: You will find out about other status values in the unit on “Monitoring Data Processing.Unit 1: ALE Fundamentals BIT300 Figure 23: The IDoc's Path and Status Values • • • • • • Regardless of how the IDoc was created. 2005/Q4 . 36 © 2006 SAP AG. the target system attempts to post the IDoc data (status value 62). it is also possible to send multiple IDocs bundled together at a later time. then the IDoc receives the status “ready for dispatch” (status value 30).

BIT300 Lesson: Intermediate Documents Figure 24: Generating a Master IDoc The master IDoc is transferred to what is known as the ALE layer. The ALE layer checks the distribution model to determine the recipient(s) of the message. Figure 25: Recipient Determination in the ALE Layer 2005/Q4 © 2006 SAP AG. The ALE layer is the ALE-specific part of the application program. All rights reserved. 37 .

Then it is placed in an out-tray whose contents are later put in a mailbox. Two types of port are used for sending IDocs: tRFC ports and file ports. the sender system checks the outbound partner profiles for the message type used. For each recipient. All rights reserved. The sender and recipient are noted on the envelope. the communications IDoc is like a letter that is to be sent to one or more recipients. The partner profile determines whether a communications IDoc is sent to the port immediately or not until later.Unit 1: ALE Fundamentals BIT300 Next in the program's run. 2005/Q4 . In order to be able to send the communications IDoc to the recipient. 38 © 2006 SAP AG. This part of the program is also known as the communication layer. for performance reasons. a communication IDoc is created according to the basic type and is saved to the database. the sender system uses the outbound partner profile to determine the port (in other words. Metaphorically speaking. it is often better to first save the IDocs to the database and then to process them collectively later. Then the IDoc is converted into the format suitable for the port. The letter is copied and a copy is placed in an envelope for each recipient. the communication channel) via which the IDoc is to reach the target system. However. Figure 26: Further Processing in the Communication Layer The ALE layer can pass a communications IDoc directly to the communication layer.

Not every partner system is able to interpret the RFC protocol. The technology of the transactional RFC ensures that the recipient receives the document once and once only.BIT300 Lesson: Intermediate Documents Figure 27: Port Types The port type tRFC is short for “transactional Remote Function Call”. A corresponding path in the file system is entered in the port. the system attempts to establish the connection again at regular intervals. for this reason. The document is only deleted from the tRFC queue when it has reached the target system. The IDoc is initially saved to the database in the recipient system. If the recipient cannot be reached at the time of sending. In EDI scenarios involving a converter. All rights reserved. The IDoc is stored for this file port as a sequential file at the operating system level in such a way that the target system can access it. 2005/Q4 © 2006 SAP AG. a file port is often used. In ALE scenarios. 39 . data transfer is via tRFC.

the data is transferred to the application by a function module. a workflow could also be started instead.Unit 1: ALE Fundamentals BIT300 Figure 28: Inbound Processing in the Recipient System Depending on the defaults in the partner profiles. 2005/Q4 . The ALE layer uses the partner profile to determine a transaction code that controls how the IDoc is processed further. Generally speaking. All rights reserved. the IDoc is either transferred to the ALE layer immediately or not until later by a program for background processing. However. 40 © 2006 SAP AG.

so that you can use the “Central Material Master Management” ALE scenario. in future. by doing so.BIT300 Lesson: Intermediate Documents Exercise 2: Documentation for Basic Types Exercise Objectives After completing this exercise. From the application menu. the link to the documentation for individual segment fields is displayed next to the link to the structure of the corresponding segment type. 2005/Q4 © 2006 SAP AG. you will be able to: • Display documentation about basic types in mySAP ERP Business Example You want to use ALE to exchange data between two SAP systems and. find out more about the technical implementation of ALE scenarios. All rights reserved. display the documentation for the basic type MATMAS05. Which segment type is dependent on E1MARMM? Change your user settings so that. Find segment type E1MARMM (Material master units of measure) and display the structure. 3. 1. 41 . Task: You want to learn about the structure of the MATMAS05 basic type. 2.

enter MATMAS05 and select HTML Format . in future. a) b) 2. 1. b) 3. Change your user settings so that. Check the changed setting by displaying the HTML display again: you can now access a Documentation link which you can use to call information about the individual segment fields. so that you can use the “Central Material Master Management” ALE scenario. click on Display <-> Change . a) b) Choose Back to exit the HTML display. the link to the documentation for individual segment fields is displayed next to the link to the structure of the corresponding segment type. set the Documentation Output indicator and save your changes. 2005/Q4 . Click on the Structure link below the status information about segment type E1MARMM to call a list of segment fields. Select Tools → ALE → ALE Administration → Services → Documentation → IDoc Types and Segments. select Goto → User Settings. Segment type E1MARMM (Material master EAN code) is dependent on segment type E1MARMM. Find segment type E1MARMM (Material master units of measure) and display the structure.Unit 1: ALE Fundamentals BIT300 Solution 2: Documentation for Basic Types Task: You want to learn about the structure of the MATMAS05 basic type. display the documentation for the basic type MATMAS05. From the application menu. All rights reserved. In the Basic type field. Which segment type is dependent on E1MARMM? a) Segment type E1MARMM is dependent on segment type E1MARAM (Material master general data). c) 42 © 2006 SAP AG. In the transaction's menu.

43 . All rights reserved.BIT300 Lesson: Intermediate Documents Lesson Summary You should now be able to: • Explain and differentiate between the terms “basic type”. “master IDoc” and “communications IDoc” • Determine the details of basic types • Describe the process from the creation of an IDoc in the sender system through to processing in the target system 2005/Q4 © 2006 SAP AG.

and all programs retrieve data directly from the database. you modeled your business processes in one particular system. As soon as one application is separated from the rest of the applications by being installed in another system. the programs access the same database. you want to outsource a subprocess to a second system. Consequences of Distributing Applications Across Two Systems If all applications are integrated in one system. The Customizing settings and master data must be consistent in all the communicating systems. 44 © 2006 SAP AG. In the future. you will be able to: • Describe methods for adjusting Customizing settings in SAP system landscapes Business Example Previously. In this type of system. the consistency of the data is guaranteed because every item of logical information is stored in only one database table. This lesson deals with synchronizing Customizing for the purposes of ALE. 2005/Q4 . the applications need to communicate via interfaces. All rights reserved. Lesson Objectives After completing this lesson.Unit 1: ALE Fundamentals BIT300 Lesson: Synchronizing Customizing Lesson Overview Data exchange across system boundaries requires the basic configurations of the applications involved in the sending and target systems to be aligned with each other. You want to be able to assess the consequences and give yourself an overview of the different methods for aligning the system configuration.

only the field values pre-defined in Customizing are allowed. However. However.BIT300 Lesson: Synchronizing Customizing Figure 29: Distributing Applications Across Two Systems In ALE scenarios. the newly created or changed data is saved to the database. This means that. Within a business process. before you distribute the data. and the data required for executing the next step needs to be transferred. Business Process in One System A business process often consists of multiple single steps. 2005/Q4 © 2006 SAP AG. 45 . Once a process step has been processed. you need to make sure that these catalogs of values match in both the sending and target systems. This exchange can only work if an IDoc contains only field values that are also defined in the target system. in most of the fields in the master data and documents for SAP applications. The agent for the next process step needs to be informed. deviating field values need to be replaced by values from the target system during further processing of either the outbound or the inbound IDoc. Applications in SAP can be affected by more than one partial solution. If you cannot (or do not wish to) match the systems. All rights reserved. process steps can also be carried out by different agents. IDocs are used to exchange application data between the systems involved in a process. unless these are fields for which unrestricted data entry is planned. an agent can be responsible for more than one step.

in other words. A further employee (agent 3) creates a transfer order so that the product that is to be shipped is removed from storage. In ALE scenarios. Once the product has been removed from storage. the system (agent 2) posts the goods issue so that the sales employee (agent 1) can end the process by creating the billing document. then specific data needs to be forwarded to the next agent. The system (agent 2) automatically creates the shipment for this sales order. delivery processing. the invoice for the customer. Business Processes in Multiple Systems If a business process extends across not only various subsolutions but also across different systems. 46 © 2006 SAP AG. Agent 1. records the customer's order in the system. All rights reserved. an IDoc functions as a “container” for this data. 2005/Q4 . a sales employee.Unit 1: ALE Fundamentals BIT300 Figure 30: Business Process in One System: Example The example shown above illustrates a sales order being processed in an SAP R/3 or SAP ECC system. This process therefore involves not only various agents but also various subsolutions (sales. warehouse management and inventory management).

Changes to certain Customizing tables are made in this system only. The difference to the first example is that warehouse management is outsourced to a second SAP system. The shipment data from the first system is transferred to the second system in an IDoc. use message type CONDAT instead. All rights reserved. 47 . To optimize the use of ALE for Customizing synchronization. Message type CONDA2 is available in the SAP R/3 and SAP ECC systems for this purpose (ALE: Synchronization of Customizing Data). Note: In systems released before SAP R/3 4. Synchronizing Customizing Settings with ALE In addition to distributing master data and transaction data. you can also use ALE to align the Customizing settings between systems (in preparation for distributing master and transaction data).BIT300 Lesson: Synchronizing Customizing Figure 31: Business Processes in Two Systems: Example The figure illustrates the same process as the last one.6A. After this procedure has been completed. the warehouse management system creates a second IDoc with all the data necessary for continuing the shipment process in the first system. it is processed further in the stock removal step. The core of this function is an automatic alignment of selected Customizing objects in two SAP systems: this alignment generates transport requests for all the changes. one logical system in the system landscape is identified as the central Customizing system. Note: This is a simplified representation of the “Decentralized Warehouse Management System” ALE scenario. You can 2005/Q4 © 2006 SAP AG. There.

All the Customizing settings you need for cross-system Customizing comparison and subsequent synchronization can be found with transaction SALE. You group together these objects. if required. The comparison can – as in ALE – be carried out interactively or in the background. Here you will find a program for matching Customizing tables in the sending and target systems. known as the “Customizing Cross-System Viewer” (transaction SCU0). The sending system creates IDocs of message type CONDA2 for the transport requests: these IDocs contain the core information about each request. and one only. The SAP Solution Manager includes two components for synchronizing Customizing settings between SAP systems: the Customizing Scout and Customizing distribution. All rights reserved. In the menu. you can use the SAP Solution Manager: this is an extensive set of instruments for configuring and operating SAP solutions. You then need to distribute these distribution groups to the target systems. the Customizing distribution instrument can create transport requests for each changed Customizing object in the maintenance system and 48 © 2006 SAP AG. It is now no longer possible (or only partly possible. 2005/Q4 . into distribution groups. After the settings have been matched. Note: The ALE transport request can be consolidated by a dedicated transaction (BDXL) with transport requests for exporting the changes to the quality assurance and production systems. The Customizing Scout compares the configurations of multiple SAP systems and displays the differences. depending on the particular configuration) to carry out any changes in the target system to the objects contained in the distribution groups. Each object can be assigned to one distribution group. You can call the relevant application transactions in SAP Easy Access via Tools → ALE → ALE Administration → Services → Customizing Data. and periodically. or the import is carried out automatically by a program executed in the background. select IDoc Interface/Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Synchronization of Customizing Data. Note: You can distribute all client-dependent Customizing objects of category CUST.Unit 1: ALE Fundamentals BIT300 determine exactly which objects should only be changed in the context of ALE distribution. Synchronizing Customizing Settings with the SAP Solution Manager As an alternative to distributing Customizing settings with ALE as described in the previous section. and transaction for generating and further processing ALE transport requests for Customizing synchronization. Inbound processing of these IDocs controls the importing of request data in the target system: either a workflow is sent to the responsible administrator requesting him or her to carry out the import. which are automatically assigned to the logical maintenance system. known as ALE Customizing objects.

Note: The configuration of field conversion is one of the topics covered in the BIT350 training course (ALE Enhancements). then the keys for the organizational units will normally differ. There are only a few cases where you can convert field values directly using Customizing tables before the IDoc is sent or before IDoc inbound processing. For all other field values that need to be replaced by other values. even if the company code keys are identical. the sending system replaces the company code key from the application (such as a customer master that is to be distributed) with the key for the assigned cross-system company code. 49 . The target system carries out the same operation in reverse: it replaces the cross-system company code with the “genuine” company code. This allows either the sending or the target system to change the content of IDoc segment fields during runtime of the application program in question. When creating a communications IDoc containing the field Company Code in one of its segments. All rights reserved. you can use the Field Conversion tool. If. Certain Customizing objects are predefined in the SAP Solution Manager as synchronization objects. You can find the tables for defining cross-system company codes and linking them to the company codes used in the applications under transaction SALE. It is. Caution: You need to define and assign at least one cross-system company code in the sending and target systems. however. IDoc processing fails. for example.BIT300 Lesson: Synchronizing Customizing distribute the requests automatically to the downstream systems. 2005/Q4 © 2006 SAP AG. in order to create or change the customer master. a logical system represents an enterprise's subsidiary. The outbound IDoc receives status 29 (Error in ALE Service) and the inbound IDoc receives the corresponding status 65. Field conversion is based on rules and allows for a more differentiated data changing procedure than that provided by exchanging values on the basis of Customizing table entries. also possible to distribute manually. The subsidiary will be assigned to a different company code than the parent company. at least in part. If this setting is missing. a company code used in the application. you use what are known as cross-system company codes in ALE scenarios. You need to carry out similar settings for the business areas. These are freely-definable keys that are each assigned to one “genuine” company code. Converting Field Values: Cross-System Company Codes It is not always either possible or desirable to standardize Customizing in a system landscape. in other words. via IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Global Organizational Units → Cross-System Company Codes. For this reason.

Unit 1: ALE Fundamentals BIT300 Lesson Summary You should now be able to: • Describe methods for adjusting Customizing settings in SAP system landscapes 50 © 2006 SAP AG. 2005/Q4 . All rights reserved.

A communication channel defines the rules of inbound and outbound message processing. SAP XI makes it possible to link systems from various providers in different versions and implemented in different programming languages (Java. and so on). 51 . All rights reserved. SAP XI is based on an open architecture and supports the protocols. you will be able to: • Explain how ALE scenarios are integrated into SAP XI Business Example You have already set up some ALE scenarios in your system landscape and are considering using SAP NetWeaver Exchange Infrastructure to exchange data between the systems involved and with third parties. Any systems that do not directly support this data format can be linked to XI with SAP XI adapters. Note: Adapters need to be configured for the connection to a system. The SAP NetWeaver Exchange Infrastructure The Exchange Infrastructure from SAP NetWeaver (SAP XI) enables you to realize cross-system business processes. There are a variety of adapters for this purpose. ABAP. data formats and interfaces used in SAP and non-SAP systems. thereby carrying out the necessary mapping between different data formats. 2005/Q4 © 2006 SAP AG. these are provided either by SAP itself or by SAP's partner companies. Messages are processed within SAP XI in the form of XML documents. This configuration is carried out in the form of a communication channel. receiving and forwarding (routing) messages.BIT300 Lesson: ALE and the SAP NetWeaver Exchange Infrastructure Lesson: ALE and the SAP NetWeaver Exchange Infrastructure Lesson Overview Lesson Objectives After completing this lesson. SAP XI consists of an Integration Server that acts as a central message bus.

The IDoc adapter converts IDoc data records into IDoc XML. 52 © 2006 SAP AG. The systems themselves are stored in the System Landscape Directory (SLD) in the form of business systems. The IDoc adapter also has to convert information from the sending and target systems. A logical system name can be assigned to these business systems. All rights reserved. the SLD also contains the information about the products and software used. since these are present in the Integration Server in the form of business systems that are stored in the SLD. 2005/Q4 . The mappings between the interfaces are stored here as well. SAP XI consists of a series of components with various different tasks. which is then used for processing in the Integration Server. The IDoc adapter is a part of the ABAP side of the Integration Server and communicates with the back-end system via transactional RFC (tRFC). In addition to system information. The configuration is stored in the Integration Directory. • • Figure 32: Components of SAP NetWeaver Exchange Infrastructure ALE Scenarios and SAP XI The Integration Server uses the IDoc adapter to connect back-end systems that are to send or receive IDocs. introduced briefly below: • The Integration Repository is the directory of message interfaces involved in data exchange. in other words.Unit 1: ALE Fundamentals BIT300 In addition to the Integration Server. the routing information about which message is to be sent from which system to which other system.

on the one hand. an RFC destination for sending the IDoc and. 53 . there needs to be a communications channel (of the type “Receiver IDoc”) stored in the Integration Directory. Note: After it is accessed. on the other hand. the IDoc type metadata is held in a cache which can be seen on the Integration Server via transaction IDX2. Note: No communication channel needs to be stored for IDocs sent from the back-end system to the IDoc adapter. In a scenario where IDocs are to be exchanged with the Integration Server. a reference to the IDX1 port. All rights reserved. For an IDoc to be sent from the Integration Server to the back-end system. you need to carry out the following steps on the Integration Server: • • • • • SLD: assign a logical system name to the business system assigned to the back-end system Integration Repository: import the IDoc type Integration Server (ABAP): create an RFC destination to the back-end system (transaction SM59) Integration Server (ABAP): create a port with a reference to the RFC destination (transaction IDX1) Integration Directory: create a communication channel of the type “Receiver IDoc” 2005/Q4 © 2006 SAP AG. You need to define a port in transaction IDX1 in the Integration Server to enable the IDoc adapter to access data in the backend repository: this IDX1 port references an RFC destination (type 3). IDoc types therefore need to be imported into the Integration Repository.<IDoc type>. which references an RFC destination for accessing the IDoc type metadata. an IDX1 port is also needed here to access the metadata. for example MATMAS.BIT300 Lesson: ALE and the SAP NetWeaver Exchange Infrastructure The IDoc adapter requires IDoc type metadata for conversion between IDoc and IDoc XML. containing technical information about the connection to the back-end system.MATMAS05. However. The name of the IDoc type is stored in the Integration Repository in the form: <message type>. The communication channel specifies. To do this. where it can also be manually deleted. the data for the connection to the back-end system is assigned to the software component version to which the IDoc type belongs and into which it is to be imported. Then the metadata is loaded via RFC call from back-end system into the Integration Repository. which refers to the back-end system. The interfaces for the systems involved in data exchange are stored in the Integration Repository so that they can be used for mapping and routing.

If you do not want to use any logical system names in the IDoc for the sender and recipient information in the control record. 2005/Q4 . the business system that corresponds to the back-end system needs to be assigned this partner type in the Integration Directory using what is known as a partner object as an identifier. Note: The ALE inbound function module IDOC_INBOUND_ASYNCHRONOUS checks whether it has been executed on the Integration Server and.Unit 1: ALE Fundamentals BIT300 Figure 33: XI IDoc Adapter The configuration in the back-end system consists of the usual ALE configuration objects (distribution model. if it has. 54 © 2006 SAP AG. For this to happen. All rights reserved. then it transfers the received IDoc as an XML document to XI processing and not ALE processing. The RFC destination that refers to the Integration Server in order to send IDocs there is of type 3 (“connection to R/3 system”) because the IDoc adapter is on the ABAP side of the Integration Server. RFC destination). but other partner types such as customer or vendor instead. partner profiles. then the IDoc adapter can also reassign these types into the business systems required in the Integration Server. port.

BIT300

Lesson: ALE and the SAP NetWeaver Exchange Infrastructure

Lesson Summary
You should now be able to: • Explain how ALE scenarios are integrated into SAP XI

2005/Q4

© 2006 SAP AG. All rights reserved.

55

Unit Summary

BIT300

Unit Summary
You should now be able to: • List examples of business processes in distributed system landscapes • Differentiate ALE from EDI • Explain the terms “logical system” or “logical system name”, “message type” and “distribution model” • Explain the function of the distribution model • Define logical system names and assign them to clients in SAP systems, where applicable • Explain the terms “IDoc” and “basic type” • Determine the assignment of message types to basic types • Complete a view in a distribution model • Explain the function of RFC destinations, ports and partner profiles • Explain and differentiate between the terms “basic type”, “master IDoc” and “communications IDoc” • Determine the details of basic types • Describe the process from the creation of an IDoc in the sender system through to processing in the target system • Describe methods for adjusting Customizing settings in SAP system landscapes • Explain how ALE scenarios are integrated into SAP XI

56

© 2006 SAP AG. All rights reserved.

2005/Q4

Unit 2
Master Data Distribution
Unit Overview
The decision to manage master data centrally is one of the main reasons for using ALE. In this unit you will learn about all the settings needed for setting up a central master data administration.

Unit Objectives
After completing this unit, you will be able to: • • • • • Describe the configuration of an ALE scenario for distributing material master data Distribute material masters Explain the use of change pointers in master data distribution and set them up in the system Describe different methods for filtering data in IDoc processing Create a reduced message type and use it in the distribution process

Unit Contents
Lesson: Example: Material Master ............................................ 58 Procedure: Creating and Distributing a Model View .................... 67 Exercise 3: Master Data Distribution...................................... 69 Lesson: Using Change Pointers ............................................... 75 Lesson: Data Filtering and Reducing the Scope of Data ................... 80 Exercise 4: Using a Reduced Message Type ........................... 93

2005/Q4

© 2006 SAP AG. All rights reserved.

57

Unit 2: Master Data Distribution

BIT300

Lesson: Example: Material Master
Lesson Overview
Distributing master data is one of the applications of ALE. This lesson introduces the “Shared Master Data” instrument for distributing master data, using the material master as an example.

Lesson Objectives
After completing this lesson, you will be able to: • • Describe the configuration of an ALE scenario for distributing material master data Distribute material masters

Business Example
In the future, you want all material masters for the entire corporate network to be stored in the central system only and for them to be sent from there to the downstream sales branch and production systems.

Central Material Master Administration
One method of keeping the master data consistent in a system landscape is to maintain the master data in a central system, and replicate it to the downstream systems at regular intervals. It is either not at all possible, or only possible to a limited extent, to change data in these latter systems.

Figure 34: Example Scenario

58

© 2006 SAP AG. All rights reserved.

2005/Q4

BIT300

Lesson: Example: Material Master

In the example illustrated above, the material masters for the enterprise are created and changed in the head office (central system). New material masters and changes to existing data are regularly sent to the downstream systems for the sales and distribution branch and production. Note: The lesson on “Using Change Pointers” deals with distributing changes to the master data at regular intervals. There are standard ALE scenarios for distributing master data; these are documented in the SAP Library and in the IMG. You can use transaction SALE to find descriptions of how to set up certain master data distribution scenarios. To do this, go to IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Configure Predefined ALE Business Processes → Logistics → Master Data Distribution. For more information, follow menu path IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Master Data Distribution. In this section of the IMG, you can carry out the Customizing settings for your master data distribution scenarios described in this lesson. You need to answer the following questions before you configure any distribution scenario: • • • • Which system is which master data maintained in? When and how often should the master data be replicated to which downstream systems? If there is more than one target system, are all changes to the master data relevant to all target systems? Which Customizing settings need to be synchronized in the systems involved?

Configuration of the Central Material Master Administration
The figure below illustrates the most important elements in the example scenario:

2005/Q4

© 2006 SAP AG. All rights reserved.

59

The sales and distribution branch's logical system is called SALES and the logical system for production is called PRODUCTION. use this information to create a new view in the distribution model of one of the system's involved. The message type for distributing material masters is MATMAS.Unit 2: Master Data Distribution BIT300 Figure 35: Basic Settings for the ALE Scenario The head office's logical system is called CORE. you need to specify the behavior of the sender and the recipient and inform the system about what type of data is to be distributed. In the new view. Figure 36: Maintaining the Distribution Model and Distributing Views To ensure consistency. First. 60 © 2006 SAP AG. All rights reserved. In the training scenario. CORE is the maintenance system for all model views. and distribute or transport the relevant views to the other participating systems. you should maintain the distribution model centrally. 2005/Q4 .

When it generates partner profiles. the system automatically creates an entry for the message type MATMAS and also an entry for message type SYNCH for each profile (ALE:Dummy Message Type for Determination of RFC Destinations). you need to first create the entry for message type SYNCH manually and then assign the RFC destination you require using the relevant port. you can have the system generate the remaining partner profiles. After you have done this.BIT300 Lesson: Example: Material Master If RFC destinations already exist with the same names as the logical target systems. Note: If your RFC destinations have different names to the target systems to which they lead. The name of the partner is always the same as the logical system name. you can now have the system create the outbound partner profiles for the new model view. All rights reserved. The entry for message type SYNCH is a prerequisite for distributing model views. This message type is not used for generating IDocs: it is only used for determining the RFC destination of the relevant target system. Partners of the type “logical system” (LS) are always created for ALE scenarios. Figure 37: Partner Profile: Partner Type The figure below schematically represents the most important settings at the outbound partner profile level: 2005/Q4 © 2006 SAP AG. 61 .

the RFC destination of this RFC leads to the target system. This program is usually scheduled as a periodic background job. store the following information: • Receiver port: in ALE scenarios. You therefore need to use a port of the type “transactional RFC” in the outbound partner profiles for ALE scenarios. we recommended collecting between 20 and 100. the sending and target systems exchange data via RFC. As a guideline. If you choose Collect IDocs. multiple IDocs are collected in packages and sent together.Unit 2: Master Data Distribution BIT300 Figure 38: Partner Profile (Outbound) In the outbound partner profile for a message type. depending on the size of the IDocs. All rights reserved. Output mode: You can choose between Transfer IDoc Immed. Note: If you select the Collect IDocs output mode. you can distribute the new model view to these systems. and Collect IDocs. you need to execute the RSEOUT00 program to transfer the IDocs to the communication layer. • • • 62 © 2006 SAP AG. Basic type: in this field. 2005/Q4 . Package size: If you choose Transfer IDoc Immed. you need to enter the IDoc type that is compatible with the target system's release level. the partner in the profiles.. After you have created the outbound partner profiles for the target systems. the IDocs are sent individually. Collecting IDocs to send together can improve performance.

you can display the copies in their respective distribution models. you have the system generate the inbound partner profiles with the CORE sending system.BIT300 Lesson: Example: Material Master Figure 39: Distributing the Model View After you have successfully distributed the model view to the SALES and PRODUCTION systems. All rights reserved. or you can store the data manually. 63 . Figure 40: Partner Profile (Inbound) 2005/Q4 © 2006 SAP AG. In the last step.

more than one inbound function module or workflow). The process code for message type MATMAS is MATM. 64 © 2006 SAP AG. Note: There can be more than one process code for a message type (and. accordingly. All rights reserved.Unit 2: Master Data Distribution BIT300 In the inbound partner profile for a message type. If you double-click on the process code key. As a rule. • Figure 41: Processing Times You can define variants for the RSEOUT00 and RBDAP001 programs for collective background IDoc processing. 2005/Q4 . Processing mode: you can choose between Trigger by background program and Trigger immediately. by going to IDoc Interface / Application Link Enabling (ALE) → System Monitoring → IDoc Processing → Dispatch Collected IDocs or Update IDocs in Receiver System. For information about which process codes are assigned to which message types. store the following information: • Process code: the process code is a key that refers either to a function module or a workflow for processing the IDocs. see the Inbound process code table (transaction WE42). the IDocs are transferred to the ALE layer using the RBDAPP01 program. If you choose Trigger by background program. a screen appears containing the information as to which function module or which workflow is used for inbound IDoc processing. You can find both programs in the IMG via transaction SALE. function modules are used in ALE scenarios. This program is usually scheduled as a periodic background job.

You can find these transactions via menu path Tools → ALE → Master Data Distribution. vendor). the sending system might generate multiple IDocs. you can either specify a target system or get the system to determine the recipient itself from the distribution model. Note: Monitoring IDoc processing is covered along with error-handling in the unit “Monitoring Data Distribution. Error-Handling and Archiving”. Sending and Requesting Master Data The “Share Master Data” tool offers you a variety of application transactions for generating IDocs for distributing master data. 2005/Q4 © 2006 SAP AG. it is also possible to retrieve data. However. If you do not specify a target system. master data is normally sent from the maintenance system to the downstream systems. All rights reserved. for example (menu path: Tools → ALE → Master Data Distribution → Cross-Application → Material). In this transaction. Figure 42: Sending Master Data You can send material masters directly using transaction BD10. 65 .BIT300 Lesson: Example: Material Master You can check the current status of IDocs in SAP R/3 or mySAP ERM by using a status monitor. with cross-application master data (material. You can call this monitor with transaction BD87 or the menu path Tools → ALE → ALE Administration → Monitoring → IDoc Display → Status Monitor. customer. You can also call all of the SMD transactions directly using transaction BALM. In ALE scenarios.

is used for fetching material masters. All rights reserved. This message type is linked to the corresponding views in the distribution model (see figure). In the application menu.Unit 2: Master Data Distribution BIT300 Figure 43: Retrieving Master Data Message type MATFET. Message type MATMAS is used for sending the material master IDocs. for example. 66 © 2006 SAP AG. the target system can use this transaction to request material masters from the sending system. you can find transaction BD11 via Tools → ALE → Master Data Distribution → Cross-Application → Material → Get. 2005/Q4 .

add one manually by assigning a recipient port containing an entry for the RFC destination leading to the partner system. you can have the system automatically create the outbound partner profiles for message type SYNCH and for all of the model view's other message types. select SAP NetWeaver → SAP Web Application Server → IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Maintain Distribution Model and Distribute Views.BIT300 Lesson: Example: Material Master Creating and Distributing a Model View Use You want (as part of an ALE scenario) to create a new model view in your central maintenance system's distribution model or enhance an existing model view. In the folder for partner type LS. Hint: If the recipient system's logical system name is the same as the name of the RFC destination leading to it. 2005/Q4 © 2006 SAP AG. click on the Add BAPI button. 4. enter the description (not the key) of the business object type you want to use and the appropriate method. If you want to link a BAPI to the model view instead of a message type. Click on the Create model view button and. where you can save the changes. 3. Continued on next page 2. Switch from display to change mode by clicking on Display <-> Change . In the IMG. The basic type has SYNCHRON as its key. this will return you to the distribution model. the method call's target system). All rights reserved. Confirm your entries with Enter and save to create the new model view. Then confirm your entries with Enter. select (in the distribution model's menu) Environment → Generate partner profiles. there must be outbound partner profiles with the partner for message type SYNCH. To do this. select (in the distribution model's menu) Environment → Change partner profile. To distribute the model view to a partner system. Confirm these entries with Enter. To check if these exist. Add the sender's and recipient's logical system names (in other words. 67 . In the window that now appears. search for an entry for your partner system and check the outbound parameters. enter a short description of your model view and a technical name for identifying the model view. Select your new model view and click on the Add message type button. in the window that then appears. enter both the sender's and recipient's logical system names and a message type of your choice. If you do not find an entry for message type SYNCH. Procedure 1.

you need an appropriate process code for the message type. Caution: When selecting the version. If there is more than one possible recipient for the data being distributed and you only want to send the model view to one particular recipient. bear in mind the recipient system's release status. since the basic type needs to be recognized in the target system as well. All rights reserved. you can have the system generate all the partner profiles for all the other message types (Environment → Generate partner profiles). 7.Unit 2: Master Data Distribution BIT300 5. You also need to decide whether the IDocs should be sent immediately or later. You then receive a log that informs you whether the new (or changed) model view was successfully distributed or not. create the outbound partner profiles for the message types you have just added to the model view. 2005/Q4 . 6. you should check that it has assigned the right process code for your scenario. Distribute the new (or changed) model view by selecting the relevant entry in the distribution model and going in the menu to Edit → Model view → Distribute. If you have not already done so. In order to be able to use your new (or changed) model view in an ALE scenario. this code must be linked to the function model or workflow for inbound processing. you now have to create (or have the system generate) suitable inbound partner profiles in the target system. If there are outbound partner profiles for message type SYNCH (see step 4). In the inbound partner profiles. 68 © 2006 SAP AG. If you have the system generate the inbound partner profiles. If you create an outbound partner profile manually. deselect the entries for the other recipients in the Distribute Model Views window that now appears. in addition to the message type. you need to assign a recipient port with the appropriate RFC destination and a basic type.

Send your material again without specifying a target system. you will be able to: • Send a material master • Display an IDoc in the status monitor Business Example In the future. The material should belong to the Mechanical Engineering industry sector and to material type Finished product. Hint: “##” is your group number 2. How many master IDocs and how many communication IDocs were created? Master IDocs Communication IDocs 3. Create the Basic Data 1 and 2 for material MATALE-## with a description of your choice. How many master IDocs and communication IDocs were created? Master IDocs Communication IDocs Continued on next page 2005/Q4 © 2006 SAP AG. The base unit of measure is a piece (PC). 1. All rights reserved. 69 . you want all material masters for the entire corporate network to be stored in the central system only and for them to be sent from there to the downstream sales branch and production systems. Task: Create a material master in the CORE logical system and send it in IDoc format to the PRODUCTION and SALES logical systems. Check the inbound and outbound processing for each in the status monitor.BIT300 Lesson: Example: Material Master Exercise 3: Master Data Distribution Exercise Objectives After completing this exercise. First send your new material using the relevant transaction in the “Shared Master Data” instrument to the PRODUCTION logical system.

Next. 2005/Q4 . How is the number of IDocs to be sent determined? 5. 70 © 2006 SAP AG. enter the business object type StandardMaterial and your material number (MATALE-##) as the object keys on the status monitor's initial screen. Display the outbound IDocs for message type MATMAS in the status monitor in the CORE logical system. What status do these IDocs have? Also check the material masters yourself.Unit 2: Master Data Distribution BIT300 4. 6. All rights reserved. display the IDocs in the status monitors for each of the two recipient systems: PRODUCTION and SALES. What status do the IDocs have? Hint: If you want to access one specific IDoc.

Hint: “##” is your group number a) b) Select Logistics → Materials Management → Material Master → Material → Create (General) → Immediately. c) d) 2. You do not need to make any entries in the Basic Data 2 view. Save to create the material master. select the industry sector Mechanical Engineering and material type Finished product and confirm your entries with Enter. All rights reserved. Check the inbound and outbound processing for each in the status monitor. Create the Basic Data 1 and 2 for material MATALE-## with a description of your choice. 71 . The material should belong to the Mechanical Engineering industry sector and to material type Finished product. 1. Enter material number MATALE-##. How many master IDocs and how many communication IDocs were created? Continued on next page 2005/Q4 © 2006 SAP AG. First send your new material using the relevant transaction in the “Shared Master Data” instrument to the PRODUCTION logical system.BIT300 Lesson: Example: Material Master Solution 3: Master Data Distribution Task: Create a material master in the CORE logical system and send it in IDoc format to the PRODUCTION and SALES logical systems. Assign a material description of your choice and add the base unit of measure PC (piece). Select the views Basic Data 1 and Basic Data 2 and click Enter again. The base unit of measure is a piece (PC).

Send your material again without specifying a target system. How many master IDocs and communication IDocs were created? Master IDocs Communication IDocs a) b) 1 2 Select Tools → ALE → Master Data Distribution → Cross-Application → Material → Send. MATALE-## MATMAS PRODUCTION c) 3. Click on Execute . One master IDoc and one communication IDoc have been created. 2005/Q4 . If the recipient system is specified in the send transaction. then the target systems are determined from the distribution model. only one communication IDoc is created. This could mean that more than one communication IDoc is created. Continued on next page 72 © 2006 SAP AG.Unit 2: Master Data Distribution BIT300 Master IDocs Communication IDocs a) b) 1 1 Select Tools → ALE → Master Data Distribution → Cross-Application → Material → Send. The number of master IDocs always conforms to the number of master records that are to be sent. 4. All rights reserved. Enter the following data: Material Message type Logical system Then select Execute . How is the number of IDocs to be sent determined? Answer: The number of communication IDocs depends on the number of receiver systems. Re-enter your material MATALE-## and the message type MATMAS but leave the Logical System field blank. If you do not specify any recipient system.

enter the value MATMAS and choose Execute . a) b) c) d) e) Select Tools → ALE → ALE Administration → Monitoring → IDoc Display → Status Monitor. Under Outbound IDocs. Select Logistics → Materials Management → Material Master → Material → Display → Display Current. In the Message type field. What status do these IDocs have? Also check the material masters yourself. a) b) c) d) e) f) g) Select Tools → ALE → ALE Administration → Monitoring → IDoc Display → Status Monitor.BIT300 Lesson: Example: Material Master 5. Next. 73 . enter the value MATMAS and choose Execute . What status do the IDocs have? Hint: If you want to access one specific IDoc. Enter your material number (MATALE-##) and click on Enter: both views are created. In the Message type field. enter the business object type StandardMaterial and your material number (MATALE-##) as the object keys on the status monitor's initial screen. All rights reserved. Select the entry for message type MATMAS and click on the Display IDocs button: you receive a list of all the IDocs for this message type. you should see your IDocs with status 03. Select one of your IDocs and click Display IDocs again. 6. Select one of your IDocs and click Display IDocs again. Select the entry for message type MATMAS and click on the Display IDocs button: you receive a list of all the IDocs for this message type. 2005/Q4 © 2006 SAP AG. Display the outbound IDocs for message type MATMAS in the status monitor in the CORE logical system. display the IDocs in the status monitors for each of the two recipient systems: PRODUCTION and SALES. Under Inbound IDocs. you should see your IDocs with status 53.

All rights reserved. 2005/Q4 .Unit 2: Master Data Distribution BIT300 Lesson Summary You should now be able to: • Describe the configuration of an ALE scenario for distributing material master data • Distribute material masters 74 © 2006 SAP AG.

a sales and distribution branch and production: Figure 44: Example Scenario 2005/Q4 © 2006 SAP AG. you need to ensure that any changes are promptly transferred to the downstream systems. master data is created and changed in one central system. Lesson Objectives After completing this lesson. you will learn about distributing changes to the master data using change pointers. you will be able to: • Explain the use of change pointers in master data distribution and set them up in the system Business Example In your enterprise. Distributing Master Data Changes In this example. All rights reserved.BIT300 Lesson: Using Change Pointers Lesson: Using Change Pointers Lesson Overview You can always change master data at any time over its lifespan. You need to ensure that any changes are promptly forwarded to the sales and distribution and production systems. In this lesson. If you have centralized master data distribution. the system landscape is made up of the head office. 75 .

so that these system also work with up-to-date data. 76 © 2006 SAP AG. which allow the sending system to select all changed data records and send only these to the target systems. you can specify in Customizing whether a message type works with the change pointer function or not. All rights reserved. changed in the head office's logical system. Change Pointers Many application programs create change documents for each change made to their objects (master data and documents). normally specifying the person who made the change and the time of the change. where necessary. Newly created and changed master records should be distributed to sales and production logical systems at regular intervals. 2005/Q4 . These change documents record changes to the application objects.Unit 2: Master Data Distribution BIT300 All master data is created and. These change documents can be used in ALE to set what are known as change pointers. Figure 45: Change Documents and Change Pointers With master data distribution using the “Shared Master Data” instrument. The change pointer creates a connection between change documents and the corresponding message type.

BIT300 Lesson: Using Change Pointers When it creates or changes a master record. see the database table view BDCPV. first check if the change pointer function is activated in general (in other words. You can start the program for testing purposes with transaction BD21 (menu path: Tools → ALE → ALE Administration → Services → Change Pointers → Evaluate). Then activate change pointer updating for all the message types you want to use in your distribution scenarios. which it then transfers to the ALE layer. Note: To view the change documents. a change pointer is saved to the database together with the application document and the change document. If you want to distribute master data. This program is usually scheduled as a periodic background job. You can display the assignment of message type and function module for evaluating the the change pointer with transaction BD60 (menu path: Tools → ALE → ALE Development → IDoc → Engineering Change Management → Define Function Module for Evaluation). and creates a master IDoc for each modified application document relevant for distribution. You can also call the change documents from the application transaction in question. If the function is active. You can find the relevant table in the IMG via transaction 2005/Q4 © 2006 SAP AG. for the clients in your SAP system). All rights reserved. Figure 46: Generating IDocs from Change Pointers You can evaluate change pointers by using the program RBDMIDOC. 77 . use the report RSSCD100. To view the change pointers. the application program queries whether the change pointer mechanism is activated or not. The application provides a function module which selects the change pointers.

by selecting menu path IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Master Data Distribution → Replication of Modified Data → Activate Change Pointers – Generally or Activate Change Pointers for Message Types. All rights reserved.Unit 2: Master Data Distribution BIT300 SALE. 78 © 2006 SAP AG. 2005/Q4 .

BIT300 Lesson: Using Change Pointers Lesson Summary You should now be able to: • Explain the use of change pointers in master data distribution and set them up in the system 2005/Q4 © 2006 SAP AG. 79 . All rights reserved.

you want the sales area data for the customer masters (basic type DEBMAS0x) to be created in the sales 80 © 2006 SAP AG. the various departments in sales and production should be able to supplement certain sections of master data in their own systems. Lesson Objectives After completing this lesson. 2005/Q4 . Segment filtering is an application-independent ALE service which ensures that individual segments are deleted from the data part before the communications IDoc is saved to the database. Figure 47: Segment Filtering You can use segment filtering to: • • Reduce the dataset to the information that is required by the target system Ensure that detail data maintained in the target system is not overwritten If you would like to use segment filtering in an ALE scenario. If. All rights reserved. you will be able to: • • Describe different methods for filtering data in IDoc processing Create a reduced message type and use it in the distribution process Business Example In your enterprise. the sales branch and production do not always receive the same data. for example. master data is created and changed in the head office. This lesson presents various options for controlling the amount of data that is sent. not all recipient systems should always receive all of the sending system's data. Segment Filtering If you do not want a recipient to receive the complete data record in an IDoc. Furthermore. you should first check the structure of the basic type you are going to use to determine the keys for the segments you would like to delete. However.Unit 2: Master Data Distribution BIT300 Lesson: Data Filtering and Reducing the Scope of Data Lesson Overview In ALE scenarios. you can use segment filtering.

BIT300

Lesson: Data Filtering and Reducing the Scope of Data

branch system, you can use segment filtering to delete segment group E1KNVVM (Master customer master sales data) from all communications IDocs for message type DEBMAS and recipient “Sales”. The customer masters are then distributed to sales without the sales area data. Note: If you select a segment group – that is, a segment with its subsegments – for segment filtering, all the subsegments are deleted from the communications IDoc.

Figure 48: IMG: Segment Filtering

You can set up segment filtering in the IMG with transaction SALE, via IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Master Data Distribution → Scope of Data for Distribution → Filter IDoc Segments. In this table, specify the message type and the target system and the segments to be deleted. The next communications IDoc for the message type and recipient specified will be generated without these segments. The figure below schematically illustrates the process flow for IDoc outbound processing with segment filtering.

Figure 49: Outbound Processing with Segment Filtering

2005/Q4

© 2006 SAP AG. All rights reserved.

81

Unit 2: Master Data Distribution

BIT300

Filter Objects
The following sections introduce filter options that, unlike segment filtering as described above, are application-dependent. You therefore need to check in each individual case if the option is available for your ALE scenario. Many applications are designed to be used with filter objects. These objects are application data (often organizational units and groupings) whose individual characteristics can determine whether a communications IDoc is created for a recipient in the first place, or which parts of the data record being distributed are contained in the communications IDoc.

Figure 50: Filtering Using Filter Objects

If you work with filter objects in ALE scenarios, you have to define conditions that need to be fulfilled for specific application data to be included in a communications IDoc. If the filter object corresponds to a required segment of the basic type in question, then a communications IDoc is only created if the condition is fulfilled. In the example illustrated below, material masters (message type MATMAS) are distributed at regular intervals from the head office to sales and distribution and production. However, sales and distribution is only supposed to receive material masters for finished products whereas production requires the master records for the finished parts and the raw materials.

82

© 2006 SAP AG. All rights reserved.

2005/Q4

BIT300

Lesson: Data Filtering and Reducing the Scope of Data

Figure 51: Example: Distribution Depending on Material Type

The “material type” is one of the filter objects designed for material masters. The material type groups together materials according to their physical properties, such as finished products, trading goods and raw materials. In basic type MATMAS0x, the segment field for material type (MTART) is part of a segment marked as required. If you now use the material type as a filter object for IDocs of message type MATMAS in the model view for distributing the material masters to sales, and assign the finished products material type key (FERT), you are guaranteeing that only material masters of this material type will be distributed to sales. The sending system does not generate any communications IDocs for material masters of other material types, if the recipient is “Sales”. If a filter object refers to an optional segment of the basic type in question, the segment and its subsegments are deleted from the IDoc if a field value does not fulfill a condition that is maintained in the distribution model. Note: Customers can enhance the list of filter objects provided by SAP with their own filter objects. The tables required for this can be found in the application menu along the path Tools → ALE → ALE Development → IDoc → Data Filtering. The figure below schematically represents the required Customizing settings:

2005/Q4

© 2006 SAP AG. All rights reserved.

83

Unit 2: Master Data Distribution

BIT300

Figure 52: Distribution Model: Creating Filter Groups

Conditions within a filter group are linked to each other by “AND” logic. You can create more than one filter group for each message type in the distribution model. These filter groups are linked to each other by “OR” logic.

Figure 53: Outbound IDoc Processing with Filter Objects

84

© 2006 SAP AG. All rights reserved.

2005/Q4

BIT300

Lesson: Data Filtering and Reducing the Scope of Data

The filter objects are evaluated in the ALE layer. If filter values are specified for a message type in a distribution model, the system uses them to derive a condition. If the condition is met, the communications IDoc is transferred unchanged. If the condition is not met, the affected rows are deleted from the data part.

Classification
Logistics applications in SAP R/3 or SAP ECC systems can use classification, a cross-application function, independently of ALE scenarios. Classification allows you to group application data (generally master data or documents) by fairly freely-definable criteria. You can use these groupings for the targeted selection of specific data records, for example. In the ALE context, however, classification fulfills a different purpose: the membership of a data record to a specific class determines how it is distributed.

Figure 54: Filtering Using Classification

If you would like to use classification as a filter method in an ALE scenario, you first need to carry out some basic settings in the class system itself. You need to mark one class type as the “distribution class type” and create at least one class for grouping your data in this class type. Then you can add the ALE-specific settings. You can activate the use of classification in an ALE scenario in the filter object area of a model view (see above).

2005/Q4

© 2006 SAP AG. All rights reserved.

85

then you select the fields whose content you want to be transferred to a particular target system. by creating a corresponding “view”. 2005/Q4 . You assign application data to classes yourself in the application in question.Unit 2: Master Data Distribution BIT300 Figure 55: Distribution Using Classes To configure classification for ALE scenarios. To do this. it is not distributed to that system. a data screen. for example. call transaction SALE (in the IMG) and select IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Master Data Distribution → Distribution Using Object Classes. that is. You classify material masters. Figure 56: Filtering with Reduced Message Types 86 © 2006 SAP AG. you create what is known as a reduced message type in the customer namespace as a copy of a message type supplied by SAP. Reduced Message Types Some applications have such flexible programs for inbound and outbound processing that you can choose whether or not each optional segment field is to be transferred. All rights reserved. If a material master record does not belong to the distribution class specified for the target system.

Message type: the message type is marked as “reducible”. a “no-data” character (/) is entered in all fields that are not to be transferred. The incoming function module ensures that only the fields activated in the reduced message type are written to the target system's database. then the locally maintained data is protected from overwriting because the fields – contained in the segment but not selected – are filled with a “no-data” character (/). for example. on the other hand.BIT300 Lesson: Data Filtering and Reducing the Scope of Data You can use these reduced message types in all ALE scenarios where the distributed data is not processed in the sending system only. Inbound function module: each segment is checked to see which fields have a “no-data” character. If. • • 2005/Q4 © 2006 SAP AG. When the master IDoc is generated. In this kind of scenario. Segment fields that are absolutely necessary for useful processing in the target system are marked as “required” in the application. the sales branch could independently change the material masters after they had been initially transferred from head office. a reduced message type without these fields is used in this scenario. the application must have the following functions: • Outbound function module: an ALE function checks whether or not a reduced message type should be used. 87 . These fields are not written to the database. All rights reserved. This enables you to maintain specific detail data in the local systems. Sending these master records again would result in all the fields that had been changed in the sales system being overwritten: the sales personnel's work would have been wasted. Figure 57: Prerequisites for Using Reduced Message Types Before you can use reduced message types. and to ensure that data is not “accidentally” overwritten with an initial value when master data is replicated.

First the required segments are selected and then only the fields in these segments that are marked in a standard SAP system as required fields. If you would like to use the change pointer function (see the lesson on “Using Change Pointers”) for a reduced message type. In the detail view. Note: when you select a segment. then click on Select again. only fields that are defined in a standard SAP system as required fields will be selected. These segments and fields are marked with a green background. call transaction SALE and 88 © 2006 SAP AG. Optional segments or fields that have already been selected are colored white. To do this. Figure 58: Creating a Reduced Message Type When you create a new reduced message type. navigate to the detail view.Unit 2: Master Data Distribution BIT300 To create a reduced message type. To select additional fields for a selected segment. If you select fields and then click on Enter immediately. Optional segments or fields that have not yet been selected are marked with a red background. your selection is not saved. All rights reserved. first select the additional fields. 2005/Q4 . Caution: You have to click on the Select button before you can exit the detail screen by selecting Enter. you need to set the corresponding indicator for this reduced message type. Select a segment by highlighting it and clicking on the Select button. it is based on the most current IDoc type. call transaction SALE and go to IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Master Data Distribution → Scope of Data for Distribution → Message Reduction → Create Reduced Message Type.

To do this.BIT300 Lesson: Data Filtering and Reducing the Scope of Data go to IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Master Data Distribution → Message Reduction → Create Reduced Message Type. Using Reduced Message Types • • • • Create reduced message type Select required fields Save and assign a change request Activate change pointers (if applicable) Reduced message types must be recognized in all participating sending and target systems. go to Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Master Data Distribution → Scope of Data for Distribution → Message Reduction → Generate Transport Request for Message Type. You can generate a transport request for any reduced message type. 2005/Q4 © 2006 SAP AG. Figure 59: Transporting Reduced Message Types Because message types are cross-client Customizing objects. they are transported using a workbench request. 89 . All rights reserved.

the application program first determines detail information about the reduced message type being used. 90 © 2006 SAP AG. The master IDoc is then transferred to the ALE layer. 2005/Q4 . All rights reserved.Unit 2: Master Data Distribution BIT300 Figure 60: Outbound Processing with Reduced Message Types The same program is responsible for generating IDocs for a reduced message type as for generating IDocs for the template message type. When creating a master IDoc. An ALE function module is used to enter “/” in the inactive fields of the master IDoc.

The system checks all optional segments to determine if they contain “/”. 2005/Q4 © 2006 SAP AG. Only fields that do not contain “/” are written to the database.BIT300 Lesson: Data Filtering and Reducing the Scope of Data Figure 61: Inbound Processing with Reduced Message Types The same inbound function module is used for inbound processing as for an IDoc for the template message type. All rights reserved. 91 .

Unit 2: Master Data Distribution BIT300 92 © 2006 SAP AG. All rights reserved. 2005/Q4 .

AENAM (Last changed by). Task: Create a reduced message type as a copy of MATMAS and connect it to your distribution model. Continued on next page 2005/Q4 © 2006 SAP AG. which you want to protect from being overwritten when the master records are sent again. create a reduced message type ZMATMAS## with reference to message type MATMAS. the reduced message type should contain the following segments and segment fields: E1MARAM ERNAM (Created by) BISMT (Old material number) BRGEW (Gross weight) NTGEW (Net weight) GEWEI (Weight unit) E1MTXHM E1MTXLM Select all Select all Caution: In the segment E1MARAM. 93 . 1. VOLUM (Volume) and VOLEH (Volume unit) are not selected. ensure the fields LAEDA (Date of last change). material masters are created in the head office and sent to production (and elsewhere).BIT300 Lesson: Data Filtering and Reducing the Scope of Data Exercise 4: Using a Reduced Message Type Exercise Objectives After completing this exercise. you will be able to: • Create a reduced data type • Create and distribute a view in the distribution model • Create outbound and inbound partner profiles Business Example In your enterprise. All rights reserved. In the CORE logical system. Then test the configuration by sending a material master. In addition to the segments E1MARAM (Master material general data) and E1MAKTM (Master material short texts). The local business department makes changes to specific data views.

Date of last change (LAEDA). and why? 94 © 2006 SAP AG. create a new model view. Check the result in the CORE and PRODUCTION systems' status monitors. Make sure you change the volume and the volume unit. with CORE as its sender and PRODUCTION as its recipient. 4. What basic type is proposed? Basic type: ______________________ If the PRODUCTION logical system is in a different physical system than the CORE logical system. Send the changed material directly to the PRODUCTION logical system. 5. 7. All rights reserved. In the PRODUCTION system. and Last changed by (AENAM). 2005/Q4 . You want to use the change pointer function for your reduced message type in the future. 8. Did the settings you made in task 1 produce the desired effect? Hint: Use your reduced message type ZMATMAS##. ZMATMAS##. 3. from the first task. How many communications IDocs are created? 11. Use your reduced message type. Which process code is proposed? Process code: _____________ Change some values in your material MATALE-## in the CORE logical system. In the segment E1MARAM. 6. Display the material MATALE-## in the PRODUCTION system. generate the inbound partner profiles for message type ZMATMAS##. Now have the system generate the outbound partner profiles for message type ZMATMAS## in the CORE logical system. Distribute your TRAINING## model view to the PRODUCTION partner system. what is in the fields Old material number (BISMT). In the CORE logical system's distribution model. Now change the Old material number field in your MATALE-## material and then have the system evaluate the change pointers for message type ZMATMAS##.Unit 2: Master Data Distribution BIT300 2. TRAINING##. Which changes have been transferred from the CORE system? 10. 9. then you need to define the reduced message type ZMATMAS## in this system as well before you can distribute the TRAINING## model view. Hint: You can also transport the reduced message type to the target system. Display the outbound and inbound IDocs in the status monitor for each system. Set the appropriate indicator.

95 . Then test the configuration by sending a material master.BIT300 Lesson: Data Filtering and Reducing the Scope of Data Solution 4: Using a Reduced Message Type Task: Create a reduced message type as a copy of MATMAS and connect it to your distribution model. All rights reserved. In the CORE logical system. 1. create a reduced message type ZMATMAS## with reference to message type MATMAS. the reduced message type should contain the following segments and segment fields: E1MARAM ERNAM (Created by) BISMT (Old material number) BRGEW (Gross weight) NTGEW (Net weight) GEWEI (Weight unit) E1MTXHM E1MTXLM Select all Select all Continued on next page 2005/Q4 © 2006 SAP AG. In addition to the segments E1MARAM (Master material general data) and E1MAKTM (Master material short texts).

select the E1MTXHM segment (Master material long text header and click on the Select button. BISMT. b) c) d) e) f) Select the ERNAM. Display the substructure of the E1MTXHM segment. select the E1MTXLM subsegment (Master material long text line and click on the Select button again. AENAM (Last changed by). enter a short description of your choice and create the request by saving it. g) h) 2. ensure the fields LAEDA (Date of last change). Enter the template message type MATMAS and select Enter. Select the segment E1MARAM and then Choose . Save to create the reduced message type. VOLUM (Volume) and VOLEH (Volume unit) are not selected. In the Reduced message type field. You want to use the change pointer function for your reduced message type in the future. a) In the CORE logical system. A query appears for a workbench request for transporting the message type to other systems later. Display the substructure of the E1MARAM segment. BRGEW. a) b) Exit the overview of the reduced message type's segments in order to return to the maintenance transaction's initial screen. call transaction SALE and go to IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Master Data Distribution → Message Reduction → Create Reduced Message Type. Continued on next page 96 © 2006 SAP AG. Set the appropriate indicator. Choose Create Request . enter the value ZMATMAS## and choose Create .Unit 2: Master Data Distribution BIT300 Caution: In the segment E1MARAM. NTGEW and GEWEI fields. 2005/Q4 . Add a description of your choice and click on Enter again. click on the Select button and then Enter. All rights reserved. Click on the Activate change pointers button.

97 . enter a short text of your choice and the technical name TRAINING## and confirm your entries with Enter. and then select Enter. Exit the log with Back . Create the new model view by saving it. create a new model view. from the first task. In the CORE logical system's distribution model. What basic type is proposed? Basic type: ______________________ a) b) Select your new model view and in the menu. go to Environment → Generate partner profile. Display one of the two new partner profiles via Environment → Change partner profile: select the partner PRODUCTION (partner type LS). with CORE as its sender and PRODUCTION as its recipient.Parameter : the basic type MATMAS05 is assigned here. Enter CORE as the sender. c) d) Continued on next page 2005/Q4 © 2006 SAP AG. All rights reserved. Click on the Create model view button. Select the model view and click on the Add message type button. Use your reduced message type.BIT300 Lesson: Data Filtering and Reducing the Scope of Data 3. TRAINING##. Now have the system generate the outbound partner profiles for message type ZMATMAS## in the CORE logical system. Choose Execute : you receive a log containing a message to the effect that outbound partner profiles for message type ZMATMAS## and the partner PRODUCTION have been created. a) Select IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Maintain Distribution Model and Distribute Views and switch to change mode ( ). b) c) d) 4. Select the outbound parameters for message type ZMATMAS## and click on DetailScreenOutb. PRODUCTION as the receiver and ZMATMAS## as the message type. ZMATMAS##.

Create the reduced message type ZMATMAS## as described in step 1. go to Edit → Model view → Distribute. Distribute your TRAINING## model view to the PRODUCTION partner system. then you need to define the reduced message type ZMATMAS## in this system as well before you can distribute the TRAINING## model view. a) In the PRODUCTION logical system. on the menu bar choose Environment → Generate partner profiles and then Execute . d) e) f) Continued on next page 98 © 2006 SAP AG. Confirm the system selection with Enter: you will receive a message informing you that your model view was successfully distributed. to check if the copy of your model view is available. 2005/Q4 .Unit 2: Master Data Distribution BIT300 5. If the PRODUCTION logical system is in a different physical system than the CORE logical system. Which process code is proposed? Process code: _____________ a) b) c) Select your model view and in the menu. Go back to the distribution model and select Environment → Change partner profile to check the inbound partner profile for message type ZMATMAS##. In the PRODUCTION system. select the entry ZMATMAS## and click on DetailScreenInboundParameter : the process code MATM is assigned here. in the inbound parameters. generate the inbound partner profiles for message type ZMATMAS##. All rights reserved. Switch to the PRODUCTION logical system and call the distribution model from there as well. go to IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Master Data Distribution → Message Reduction → Create Reduced Message Type. b) 6. Hint: You can also transport the reduced message type to the target system. Select the model view. Mark the partner CORE.

99 . to check that the system has placed “no-data” characters in the unselected optional fields. a) b) c) d) e) f) g) Select Tools → ALE → Master Data Distribution → Cross-Application → Material → Send. You should also be able to see this character in the fields that you did not select in your reduced message type: VOLUM (Volume) and VOLEH (Volume unit). Display the outbound and inbound IDocs in the status monitor for each system. Continued on next page 2005/Q4 © 2006 SAP AG. Enter a value in each of the fields Old material number.BIT300 Lesson: Data Filtering and Reducing the Scope of Data 7. select your IDoc and then click again on the Display IDocs button. On the next screen. Enter the message type ZMATMAS## and select Execute . Select the Basic Data 1 view and click on Enter again. Gross weight and Weight unit. message type ZMATMAS## and the logical system PRODUCTION and then select Execute . Enter T-MATALE-## as your material number and click on Enter. Make sure you change the volume and the volume unit. Send the changed material directly to the PRODUCTION logical system. Change some values in your material MATALE-## in the CORE logical system. Select the entry under ZMATMAS## and click on the Display IDocs button. 8. Select Tools → ALE → ALE Administration → Monitoring → IDoc Display → Status Monitor. Also add a volume with a suitable unit of measure. a) b) c) d) Select Logistics → Materials Management → Material Master → Material → Change → Immediately. for example. Enter the material master MATALE-##. All rights reserved. Display the data records and select the segment E1MARAM. Save your changes. Did the settings you made in task 1 produce the desired effect? Hint: Use your reduced message type ZMATMAS##.

Enter your message type ZMATMAS## and select Execute . Date of last change (LAEDA). This is because you did not select these fields when creating the reduced message type. 11. All rights reserved. display an inbound IDoc for message type ZMATMAS## in the PRODUCTION system: the Old material number field contains the changes you made. Select the Basic Data 1 view and click again on Enter: the entries in the Volume and Volume unit fields were not transferred. and Last changed by (AENAM). contain “/”. c) 100 © 2006 SAP AG. Now change the Old material number field in your MATALE-## material and then have the system evaluate the change pointers for message type ZMATMAS##. The fields Date of last change and Last changed by. 2005/Q4 . Enter T-MATALE-## as your material number and click on Enter. The change you have made is visible in the field Old material number. Select Tools → ALE → ALE Administration → Services → Change Pointers → Evaluate. Check the result in the CORE and PRODUCTION systems' status monitors. because you selected this field in your reduced message type. Check the inbound IDoc in the status monitor as described in steps 8. Enter a value in the Old material number field and save the change. To finish.Unit 2: Master Data Distribution BIT300 9. and why? a) b) First call one of the outbound IDocs for message type ZMATMAS## in the status monitor in the CORE system. In the segment E1MARAM. the Date of last change and Last changed by fields contain “/”. what is in the fields Old material number (BISMT). IDocs are generated for all materials that were changed since the change pointer function was activated for your message type. Which changes have been transferred from the CORE system? a) b) c) d) Select Logistics → Materials Management → Material Master → Material → Display → Display Current. Proceed as in step 8. 10. Display the material MATALE-## in the PRODUCTION system. c) to g). How many communications IDocs are created? a) b) c) d) e) Call the material master as described in step 7 to change it.

BIT300 Lesson: Data Filtering and Reducing the Scope of Data Lesson Summary You should now be able to: • Describe different methods for filtering data in IDoc processing • Create a reduced message type and use it in the distribution process 2005/Q4 © 2006 SAP AG. 101 . All rights reserved.

Unit Summary

BIT300

Unit Summary
You should now be able to: • Describe the configuration of an ALE scenario for distributing material master data • Distribute material masters • Explain the use of change pointers in master data distribution and set them up in the system • Describe different methods for filtering data in IDoc processing • Create a reduced message type and use it in the distribution process

102

© 2006 SAP AG. All rights reserved.

2005/Q4

Unit 3
Distributing Transaction Data: Message Control
Unit Overview
Transaction data (documents, postings) can also be distributed beyond system boundaries using ALE. Message control is one of the methods you can use to implement cross-system processes. However, you can also use it for electronic communication with business partners (suppliers, customers).

Unit Objectives
After completing this unit, you will be able to: • • • • • • Differentiate ALE and EDI Describe the basic functions of message control Explain how message control is used to generate IDocs Create a purchase order and check the events of your message determination Describe the cross-system purchase order process Explain the most important Customizing settings for this process

Unit Contents
Lesson: Message Control and IDoc Generation............................104 Exercise 5: Partner Profiles and Condition Record .................... 113 Lesson: Example: Purchase Order Processing ............................ 119 Exercise 6: Sending a Purchase Order to a Vendor ...................125 Exercise 7: Optional: ALE Scenario “Stock Transfer Between Distributed Systems” ......................................................129

2005/Q4

© 2006 SAP AG. All rights reserved.

103

Unit 3: Distributing Transaction Data: Message Control

BIT300

Lesson: Message Control and IDoc Generation
Lesson Overview
This lesson tells you about message control as an instrument for distributing transaction data in the IDoc format.

Lesson Objectives
After completing this lesson, you will be able to: • • • Differentiate ALE and EDI Describe the basic functions of message control Explain how message control is used to generate IDocs

Business Example
Up to now, your company has sent purchase orders to suppliers by post in paper form. For the future, you want to convert this process to electronic communication. In addition, you want the purchase orders of the sales branch to be automatically converted into orders after they are received by head office.

ALE and EDI: a Comparison
For ALE and EDI scenarios you always use the same instrument: the data, such as purchase orders, order confirmations or invoices, are sent to the respective recipient in the IDoc format, or are recevied by your system as IDocs and are subsequently transferred to the target applications.

Figure 62: EDI: Purchase Order at a Vendor

104

© 2006 SAP AG. All rights reserved.

2005/Q4

BIT300

Lesson: Message Control and IDoc Generation

Up to now, the purchase orders at a vendor in our example company have been processed on paper: the purchasing employees create purchase orders in the system at head office, possibly on the basis of purchase requisitions from other departments, and send them by post to the vendor. However, in the future the vendor should receive the purchase order data electronically in an EDI standard format. In many cases, the external vendors are not part of the company network. Therefore, the electronic communication with them is often by means of intermediary subsystems, known as EDI converters. SAP provides an open interface to such systems (CA-EDI). The EDI subsystems assume the responsibility for all EDI-specific tasks, such as data conversion, partner profile management and process monitoring.

Figure 63: Communication by Means of an EDI Subsystem

The SAP application sends an IDoc to the subsystem. In the case of a purchase order, the message type is ORDERS. The subsystem reads the IDoc and converts it into an EDI document. This document is sent to the vendor, whose EDI converter converts the incoming data into a format that can be processed in the vendor's ERP system. Often an order is automatically created from the data of the purchase order received.

2005/Q4

© 2006 SAP AG. All rights reserved.

105

Unit 3: Distributing Transaction Data: Message Control

BIT300

Figure 64: Port Types

Many subsystems are capable of communicating with SAP systems by means of tRFC. However, if your subsystem cannot decrypt RFC protocols, you usually use a port of the “file” type. The directory of the operating system, in which incoming and outgoing data is to be saved, is entered in the detailed settings for this port. Partner profiles for EDI scenarios must always refer to partners of the partner types LI (vendor) or KU (customer), while the partners in ALE scenarios are always logical systems (partner type LS).

Figure 65: Partner Profile: Partner Type LI

106

© 2006 SAP AG. All rights reserved.

2005/Q4

for the EDI scenario represented in the first illustration of the lesson. All rights reserved. later the invoicing party and finally the payment recipient. a vendor is first the recipient of the purchase order. logistical appliations in SAP R/3 and SAP ECC systems work with partner functions that are assigned in the partner master data and can be changed in the application documents. if necessary. then the goods supplier. During a procurement procedure.BIT300 Lesson: Message Control and IDoc Generation Thus. For this reason. 2005/Q4 © 2006 SAP AG. the EDI partner is also called T-BIL00. 107 . you always refer to the vendor master data. partner profiles of partner type LI would be required. When creating such partner profiles. Therefore. Thus a party other than the purchase order recipient can deliver the goods. if the vendor was created using the key T-BIL00. Figure 66: Partner Functions The “vendor” business partner can have various functions with regard to the company. A partner does not always carry out all the functions himself.

the application uses a cross-application function packet.specify in individual cases before the output.Unit 3: Distributing Transaction Data: Message Control BIT300 Figure 67: Partner Profile for EDI Therefore. Message Control: Introduction The application mySAP ERP Procurement already enables you to send a purchase order by means of a printed form or in IDoc format. which you define in advance or which you can depending on the default settings . 108 © 2006 SAP AG. The purchase order printed on paper or sent as an IDoc is only one of many examples of the use of message control in logistics applications. In SAP systems. The format in which the message is output is determined by the transmission medium. a message is information that is output in various formats. the message control. For this. you always have to enter the respective function in which a partner is sending or receiving a message. 2005/Q4 . in contrast to ALE. The application programs determine the recipient of the message from the respective application document. For EDI scenarios.for example. it is stored as a sequential file on the operating system level. All rights reserved. You can also send the information contained in your SAP R/3 or SAP ECC documents as a fax or an e-mail to employees or partners. the distribution model you were introduced to as an important ALE element does not play any role. The communication IDoc is then created on the basis of the parameters in the partner profiles and processed further . when creating partner profiles for EDI partners.

by means of which transmission medium . All rights reserved. is always created on the basis of a message type which is defined in the Customizing of the respective application.BIT300 Lesson: Message Control and IDoc Generation Figure 68: Transmission Medium Every time you save a new or altered purchasing document (for example. 2005/Q4 © 2006 SAP AG.that is. For example. the message type for outputting purchase document data is called NEU (new printing of purchase order).this message is to be output. The individual message. a request for quotation. Message types are keys to which the most important control parameters for determining and subsequently outputting messages are linked. and in which format . such as the IDoc with the purchase order data. the system checks whether a message has to be created for this document. a purchase order or an outline agreement). 109 .

Purchasing. a method of enabling the system to find application objects on the basis of previously defined conditions. Every application that uses the message control is indicated by a two-character key. you use transaction NACE. which is responsible for the purchase order processing. 2005/Q4 . To get an overview of all the applications that use the message control. has the key EF.Unit 3: Distributing Transaction Data: Message Control BIT300 Figure 69: Message Types Message types are application-specific. For example. Examples are the price determination in Purchasing and Sales and the batch determination in the overall logistics. All rights reserved. The illustration below shows the inner hierarchy of the condition elements using the example of message control for Purchasing: 110 © 2006 SAP AG. With this transaction (message types button) you can also call up the list of all the message types defined for an application. which are combinations of conditions under which a certain message is to be output in a certain format. which are dependent on one another. The condition type is used in many applications in SAP R/3 and SAP ECC. The system also finds messages on the basis of condition records. The condition type works with what are known as condition elements. Message Determination The message control works with the condition type.

which groups together message types on the basis of various perspectives. that is. “create purchase order”) specifies the application (for example. EF). NEU) is assigned an access sequence (for example. In this way you specify. If you now want to define conditions for the determination of the message type NEU. the system now asks you. all the document fields that are to function as conditions for determining the messages in the application document. All rights reserved. for the desired combination of fields according to the condition table. Every message type of a procedure (for example.BIT300 Lesson: Message Control and IDoc Generation Figure 70: Message Control: Condition Elements The respective application program (for example. is found by means of Customizing tables. 2005/Q4 © 2006 SAP AG. The suitable output determination procedure (for example. 0001). These condition tables contain. Depending on the selection. RMBEF1). for example. for the “key combination”. Thus. The first condition table in this sequence (27) contains the fields purchasing organization and vendor. for example. the access sequence 0001 contains three condition tables which are checked in the sequence specified in the access sequence. depending on the application. In the example shown. you then have to make certain entries. 111 . Access sequences group together condition tables. in various arrangements. the document type can decide on the procedure to be used. such as for the purchasing organization and the vendor. that the message NEU is always output in IDoc format when the purchase order is from the purchasing organization 1000 for the business partner T-BIL00 in his function as vendor (LF). on the basis of the assigned access sequence.

If the transmission medium is “EDI” or “ALE”. (If. Based on the IDoc basic type specified in the partner profiles. in addition to the partner profiles there must also be a corresponding model view in the distribution model. the program RSNAST00 creates a communication IDoc from the data of the purchase order. the application program checks in the message determination whether a message is to be created.Unit 3: Distributing Transaction Data: Message Control BIT300 Along with the transmission medium (see above). You have a choice of three processing times: • • • Immediate transmission when the document is created (4) Subsequent transmission by means of a job (1 and 2) Subsequent transmission triggered by the user by means of a dedicated transaction (3) If you select the transmission medium “EDI” in the condition record. “print output” were specified.) 112 © 2006 SAP AG. If you want to use the transmission medium “ALE”. you must create appropriate partner profiles for the partner entered there and his function. on the other hand. the system checks whether suitable partner profiles exist and which IDoc type is specified for the data output. a message is created. All rights reserved. If the message determination is successful. then the corresponding form would be filled. Figure 71: Message Determination in the Purchase Order When creating a purchase order. All messages are stored in the database table NAST. you also always have to enter a processing time in the condition record. 2005/Q4 .

2. you will be able to: • Set up partner profiles for the EDI communication with a vendor • Create a message determination record Business Example In the future. 1. The IDoc should be generated immediately after a purchase order is created. Task: Create partner profiles for the vendor and then a suitable determination record for the message type of the purchase order data output. 113 . Process code: _______________ Hint: Please also remember the partner type and the partner function. Get the system to check the partner profiles you have just created. Use the IDoc basic type ORDERS05 and the file port SUBSYSTEM. The appropriate message type has the key NEU.BIT300 Lesson: Message Control and IDoc Generation Exercise 5: Partner Profiles and Condition Record Exercise Objectives After completing this exercise. you want to send purchase orders to one of your vendors by means of EDI. Create partner profiles with the vendor T-K515D## for the message type ORDERS. 3. The IDocs should be transferred to the subsystem together. Messages of this message type should always be output if the purchasing organization 1000 orders goods from the vendor T-K515D##. All rights reserved. In the application menu of Purchasing (purchase orders). but this should not be started by the SAP system. create a determination record for the message type NEU. You work on the application level of Purchasing. Continued on next page 2005/Q4 © 2006 SAP AG. The system should output the message in IDoc format by means of EDI. Which process code is specified? Assign yourself as the agent in the case of an error.

All rights reserved.Unit 3: Distributing Transaction Data: Message Control BIT300 4. use the input help for the Message type field to look for a suitable message type using the short description “Order confirmation”. Optional: How do you proceed if you also have an agreement with your vendor T-K515D## that in future he should send you order confirmations by EDI for your purchase orders? Hint: If necessary. 2005/Q4 . You can also use the short description to determine the appropriate process code. 114 © 2006 SAP AG.

add the message type ORDERS. Select the Post Processing: Permitted Agent tab page to assign your user BIT300-## (agent type US) and a notification language of your choice. choose Collect IDocs and Do not start subsystem. Process code: _______________ Hint: Please also remember the partner type and the partner function. e) f) Enter the application EF and the message type NEU. ME10 (ORDERS: Purchase order) appears. the receiver port SUBSYSTEM and the IDoc basic type ORDERS05. The IDocs should be transferred to the subsystem together. Add the partner function LF and on the Outbound Options tab page. Choose the Message Control tab page and here choose Add row .BIT300 Lesson: Message Control and IDoc Generation Solution 5: Partner Profiles and Condition Record Task: Create partner profiles for the vendor and then a suitable determination record for the message type of the purchase order data output. Which process code is specified? Assign yourself as the agent in the case of an error. enter the partner number T-K515D## and the partner type LI and save your entries. Create partner profiles with the vendor T-K515D## for the message type ORDERS. Choose Create . If they are not already selected. g) Continued on next page 2005/Q4 © 2006 SAP AG. In the input help for the field Process Code. 1. Save these changes. choose Create output parameter . but this should not be started by the SAP system. 115 . Press Enter to accept this key. You work on the application level of Purchasing. The appropriate message type has the key NEU. Use the IDoc basic type ORDERS05 and the file port SUBSYSTEM. All rights reserved. In the output parameter area. a) b) c) d) Choose Tools → ALE → ALE Administration → Runtime Settings → Partner Profiles.

Enter the output type NEU and choose Enter. Hint: If you leave the Language field empty. Get the system to check the partner profiles you have just created. Choose Check . the medium 6 and the time 4. open the folder for the partner type LI and select your vendor T-K515D##. the vendor T-K515D##. The IDoc should be generated immediately after a purchase order is created. 2005/Q4 . create a determination record for the message type NEU.Unit 3: Distributing Transaction Data: Message Control BIT300 2. Continued on next page 116 © 2006 SAP AG. then choose Execute in the window displayed: you obtain a detailed log of the check on your settings. the partner function LF. Create the determination record by saving. a) b) If necessary. All rights reserved. Messages of this message type should always be output if the purchasing organization 1000 orders goods from the vendor T-K515D##. 3./Vendor for EDI and confirm your choice with Enter. the system uses the language of the vendor in his master record. Org. In the application menu of Purchasing (purchase orders). Choose the key combination Purchasing Output Determination: Purch. The system should output the message in IDoc format by means of EDI. a) b) c) d) Choose Logistics → Materials Management → Purchasing → Master Data → Messages → Purchase Order → Create. Enter the purchasing organization 1000.

Optional: How do you proceed if you also have an agreement with your vendor T-K515D## that in future he should send you order confirmations by EDI for your purchase orders? Hint: If necessary. In the inbound parameter area. e) f) 2005/Q4 © 2006 SAP AG. Accept it with a double-click and save your changes. the message type ORDRSP (Purchase order/Order confirmation). a) b) c) d) Choose Tools → ALE → ALE Administration → Runtime Settings → Partner Profiles. enter *Order confirmation* and press Enter to confirm: The system prompts you with. Call up the input help for the field Message type and open the details in the Restrictions tab page by clicking on the small triangle in the bar below the tab page. use the input help for the Message type field to look for a suitable message type using the short description “Order confirmation”. select Create inbound parameters and first enter the partner role LF again. Select the default and accept it with Enter. Now call up the input help for the field Process code and follow the short description of the process: The suitable process code has the key ORDR (ORDRSP Sales order confirmation). You can also use the short description to determine the appropriate process code. among other things. Open the folder for the partner type LI and select your vendor T-K515D##. In the field Short text. 117 . All rights reserved.BIT300 Lesson: Message Control and IDoc Generation 4.

All rights reserved.Unit 3: Distributing Transaction Data: Message Control BIT300 Lesson Summary You should now be able to: • Differentiate ALE and EDI • Describe the basic functions of message control • Explain how message control is used to generate IDocs 118 © 2006 SAP AG. 2005/Q4 .

using the example of a purchase order. Message Control: Transmission Media “ALE” and “EDI” Logistical applications in SAP R3 and SAP ECC systems can use the message control to generate IDocs for sending transaction data. Then the IDoc can be sent to either a business partner or another logical system within the company. In addition. 2005/Q4 © 2006 SAP AG. but by means of an EDI connection. these purchase orders should be sent to head office using ALE and be automatically converted into orders there. The purchase orders at vendors are also created electronically by head office. In the future. The system transfers the data of an application document into the fields of the IDoc on the basis of the respective IDoc basic type. The sales branch receives an electronic order confirmation by return. you will be able to: • • • Create a purchase order and check the events of your message determination Describe the cross-system purchase order process Explain the most important Customizing settings for this process Business Example The sales branch regularly orders stock replenishments at head office for processing its customer orders. head office is where the main warehouse of the company is located. Lesson Objectives After completing this lesson. 119 . you will also be introduced to one of the ALE scenarios provided (“stock transfer between distributed systems”). All rights reserved.BIT300 Lesson: Example: Purchase Order Processing Lesson: Example: Purchase Order Processing Lesson Overview This lesson tells you about IDoc generation by means of the message control.

In addition. Figure 73: Partner Profiles with an External Vendor 120 © 2006 SAP AG. there must also be partner profiles for the partner type “vendor” (LI) to which a receiver port is assigned. All rights reserved. Therefore. or which contains a directory for storing IDocs as sequential files. 2005/Q4 .Unit 3: Distributing Transaction Data: Message Control BIT300 Figure 72: Example: Sending a Message in EDI Format Here you see the transmission of an IDoc to an external vendor by means of an EDI converter. the transmission medium “EDI” (6) was entered in the message determination record. which represents a connection to the EDI converter.

For ALE scenarios in which transaction data is to be sent with the aid of message control. 2005/Q4 © 2006 SAP AG. then suitable partner profiles with a logical system (partner type LS) must be created. The field Partner role remains empty. Figure 74: Partner Profile with a Logical System If you want to use the message control to distribute transaction data. there must be a process code for the outbound processing. on the other hand. 121 . the master IDoc is transferred unchanged into the data section of the communication IDoc and stored on the database. Note: The attribute With ALE services in the process code is used to control whether you can adapt the IDoc using the ALE services “segment filtering” and “field conversion”. The port is usually a tRFC port. This process code is used to determine the function module that subsequently uses the entry created by the message determination in the table NAST (“NAST record”) to determine the relevant application data and create the master IDoc. you must create or expand corresponding views in the distribution model of the maintenance system and then distribute them to the respective receiving systems.BIT300 Lesson: Example: Purchase Order Processing If. If this attribute is not set. The settings for the generation of an IDoc (IDoc basic type and process code) are identical. All rights reserved. the transmission medium of the determination records is “ALE” (A).

Unit 3: Distributing Transaction Data: Message Control BIT300 Figure 75: Model View for the Distribution of Purchase Orders In the example shown. the system performs message determination on the basis of the application-specific Customizing settings for message control. 2005/Q4 . you can immediately call up the result from the application document (menu entry Goto → Messages or button Messages in the initial screen). the logical system SALES . 122 © 2006 SAP AG. After receiving and checking the purchase orders.that is. head office sends order confirmations (message type ORDRSP) to Sales and Distribution. Message Determination in Ordering and IDoc Generation When creating a purchase order.sends purchase orders (message type ORDERS) to head office (logical system CORE). If this determination is successful. Sales and Distribution . All rights reserved.

If the processing time 4 was entered in the determination record. 123 . The application document key is transferred from the NAST record to this application function module. sent immediately or later. ALE Scenario: Stock Transfer Between Two Systems In SAP R/3 or SAP ECC systems. In the program RSNAST00. The transaction code controls which application function module is used to generate this IDoc. the master IDoc is transferred as the data section of the communications IDoc.BIT300 Lesson: Example: Purchase Order Processing Figure 76: IDoc Generation using Message Control If the transmission medium “ALE” or “EDI” is assigned in the determination record. 2005/Q4 © 2006 SAP AG. but also in terms of the systems involved. The communication IDoc is then saved on the database and. The module reads the document data and transfers it into the segment fields of the master IDoc. If the processing time 1 is specified. and a control record and a status record are added to it. All rights reserved. The program RSNAST00 must be planned as a background job or be started manually. a master IDoc is created from the NAST record on the basis of the outbound parameters of the corresponding partner profiles. you will find support for the configuration of an ALE scenario “Stock transfer between two systems”. in order to generate an IDoc from the NAST record. the system executes the program RSNAST00 immediately after you save. You can use this scenario if sales branches or production sites are separated from one another or from the central warehouse or the central Sales and Distribution not only physically. only a NAST record is created for now. depending on the settings in the partner profiles.

The message control can be used to automatically send a shipping notification in IDoc format for this delivery (message type DESADV) to the branch. All rights reserved. Depending on the settings in the system of the branch. If the inbound processing of the IDoc at the branch is successful. if the goods are available. you can represent the following basic process: The branch orders goods from head office. or else a corresponding note is entered in the purchase order. The incoming purchase order in IDoc format (message type ORDERS) is automatically converted into a sales order by the receiving system. The logical system of head office also automatically sends an order confirmation (message type ORDRSP) to the branch. At head office. the head office can also transfer the invoice electronically (message type INVOIC). an inbound delivery . 124 © 2006 SAP AG.Unit 3: Distributing Transaction Data: Message Control BIT300 Figure 77: Scenario: Stock Transfer Between Two Systems With this scenario. 2005/Q4 .is created there during the IDoc inbound processing. a delivery is created for the sales order.an additional SAP document . After the goods are shipped to the branch. The inbound processing of the order confirmation is updated in the purchase order: The purchasing area agent usually sees the document number of the sales order of head office on the document item level of his purchase order. an incoming invoice is automatically posted.

Which message type is found. 125 . 2005/Q4 © 2006 SAP AG. All rights reserved. 1. and how is the message to be processed? Message type: _______ Transmission medium: _______ 2. you will be able to: • Send a purchase order in IDoc format to an external vendor Business Example The central purchasing department of the company orders goods from a vendor by means of an EDI connection. What status does the IDoc have now? What is the text for this status? Hint: You will find the text under the heading Error text. of the material T-M15A## for the plant 1000. You work for the purchasing organization 1000 and the purchasing group 001 in the company code 1000. Display your IDoc in the status monitor as well and send it. Check the outbound processing of the IDoc in the purchase order. Status: ____ Number: ________________ 3. create a purchase order at the vendor T-K515D## for 100 pcs.BIT300 Lesson: Example: Purchase Order Processing Exercise 6: Sending a Purchase Order to a Vendor Exercise Objectives After completing this exercise. In the CORE system. What status does the IDoc have? Also note the IDoc number. Task: Create a purchase order to an external vendor in the system at company headquarters and check whether an IDoc was generated with the data of this purchase order.

2005/Q4 . Choose Logistics → Materials Management → Purchasing → Purchase Order → Create → Vendor/Supplying Plant Known. Which message type is found. 1. of the material T-M15A## for the plant 1000. You work for the purchasing organization 1000 and the purchasing group 001 in the company code 1000. Check the outbound processing of the IDoc in the purchase order. Enter the vendor T-K515D## and confirm your entry with Enter.Unit 3: Distributing Transaction Data: Message Control BIT300 Solution 6: Sending a Purchase Order to a Vendor Task: Create a purchase order to an external vendor in the system at company headquarters and check whether an IDoc was generated with the data of this purchase order. enter the purchasing organization 1000. On the Org. the purchasing group 001 and the company code 1000. What status does the IDoc have? Also note the IDoc number.data tab page. Status: ____ Continued on next page 126 © 2006 SAP AG. enter the material T-M15A##. Choose the Output button: The output type NEU was found. create a purchase order at the vendor T-K515D## for 100 pcs. Create the purchase order by saving. In the CORE system. The message is to be output by means of EDI (transmission medium 6). Choose Item overview . All rights reserved. and how is the message to be processed? Message type: _______ Transmission medium: _______ a) b) c) d) e) f) 2. the order quantity 100 and the plant 1000 and confirm these entries with Enter.

Choose Back . Choose Logistics → Materials Management → Purchasing → Purchase Order → Display. All rights reserved. Display your IDoc in the status monitor as well and send it. Select the row under the output type ORDERS and choose the Process button. In the menu. Confirm the message on your selection with Enter: The IDoc now has the status 03 (Data passed to port OK). Choose the Messages button: The message should have the status Successfully processed. You can also find out the file path using the Error long text button. choose System → Services for Object and then Display links : The number of the outbound IDoc is displayed. Double-click the number of the IDoc to call it up for display. It has the status 30 (IDoc is ready to be sent).BIT300 Lesson: Example: Purchase Order Processing Number: ________________ a) b) c) d) 3. What status does the IDoc have now? What is the text for this status? Hint: You will find the text under the heading Error text. a) b) c) d) Choose Tools → ALE → ALE Administration → Monitoring → IDoc Display → Status Monitor. 2005/Q4 © 2006 SAP AG. The “error text” is: IDoc written to file. Enter the number from step 2 in the field IDoc number and choose Execute . 127 .

Unit 3: Distributing Transaction Data: Message Control BIT300 128 © 2006 SAP AG. 2005/Q4 . All rights reserved.

The responsible company code is 1000. check the results of the message determination. check whether a sales order was created for the purchase order of the SALES system. Also check the updating of the purchase order after the order confirmation is received. create a purchase order of the document type NB (normal order) at the vendor CORE for 100 pcs. and then display the automatically created order in the head office system. Check the results of the message determination: Which message type was found? Which transmission medium is used? Make a note of the document number of the purchase order. You belong to the purchasing group 001. In the SALES system. Make a note of the document number of the order: ______________ Continued on next page 3. In the CORE system. 129 . Task: Create a purchase order with head office in the Sales and Distribution system. Message type: ________ Transmission medium: ______ Number of the purchase order: _________________ 2. 2005/Q4 © 2006 SAP AG. All rights reserved. 1. You are ordering with the authorization of the purchasing organization 1000 for the plant 1000. Display the outbound IDoc in the status monitor of the SALES sender system. head office is where the main warehouse of the company is located. Check the content of individual segments and compare them with your purchase order. These purchase orders are sent to head office using ALE and are automatically converted into sales orders there.BIT300 Lesson: Example: Purchase Order Processing Exercise 7: Optional: ALE Scenario “Stock Transfer Between Distributed Systems” Exercise Objectives After completing this exercise. Use your purchase order number from step 1 as the search criterion. Search for the IDoc using the business object type PurchaseOrder and your document number from step 1. you will be able to: • Create a sales order from a purchase order using ALE Business Example Sales and Distribution regularly orders stock replenishments at head office for processing its customer orders. of the material DPC1002.

Unit 3: Distributing Transaction Data: Message Control BIT300 4. Was an order confirmation also created in the CORE system and sent to the SALES system? Check the results of the message determination in the order. All rights reserved. 130 © 2006 SAP AG. Then check the purchase order in the SALES system: What has changed? Hint: In the purchase order. check the Confirmations tab page on the document item level. In the CORE system. you now display the outbound IDoc for the order confirmation using the object services in the order. 5. 2005/Q4 .

check the results of the message determination. Continued on next page 2005/Q4 © 2006 SAP AG. Confirm your entries with Enter. create a purchase order of the document type NB (normal order) at the vendor CORE for 100 pcs. Check the results of the message determination: Which message type was found? Which transmission medium is used? Make a note of the document number of the purchase order. Enter the vendor CORE. Create the purchase order by saving.data tab page.BIT300 Lesson: Example: Purchase Order Processing Solution 7: Optional: ALE Scenario “Stock Transfer Between Distributed Systems” Task: Create a purchase order with head office in the Sales and Distribution system. You are ordering with the authorization of the purchasing organization 1000 for the plant 1000. Hint: If the document levels (header or item) are not visible. on the document header level. the purchasing group 001 and the company code 1000. You belong to the purchasing group 001. All rights reserved. and then display the automatically created order in the head office system. choose Header or Item overview . 1. Also check the updating of the purchase order after the order confirmation is received. The transmission medium is A. Message type: ________ Transmission medium: ______ Number of the purchase order: _________________ a) b) Choose Logistics → Materials Management → Purchasing → Purchase Order → Create → Vendor/Supplying Plant Known. c) d) On the document item level. enter the material DPC1002. enter the purchasing organization 1000. of the material DPC1002. the order quantity 100 and the plant 1000. The responsible company code is 1000. 131 . Choose the Output button: The output type NEU was found. and on the Org. In the SALES system.

In the Search criteria area. Display the outbound IDoc in the status monitor of the SALES sender system. In the field Business object. In the CORE system. Select the entry underneath the message type and choose the Display IDocs button. Make a note of the document number of the order: ______________ a) b) c) Choose Logistics → Sales and Distribution → Sales → Order → Change. a) b) In the menu of the order. 2005/Q4 . Was an order confirmation also created in the CORE system and sent to the SALES system? Check the results of the message determination in the order. c) d) 3. Open the Data records folder to display the segments of the IDoc. 4. Use your purchase order number from step 1 as the search criterion. enter PurchaseOrder. select Extras → Output → Header → Edit. All rights reserved. Select the IDoc and choose the Display IDocs button again.) and immediately processed it into an IDoc when creating the order. An IDoc for the message type ORDERS should be found under Outbound IDocs. enter your purchase order number from step 1 in the corresponding field and choose Perform search. check whether a sales order was created for the purchase order of the SALES system. and in the field Object key enter the purchase order number from step 1. a) b) Choose Tools → ALE → ALE Administration → Monitoring → IDoc Display → Status Monitor. Continued on next page 132 © 2006 SAP AG.Unit 3: Distributing Transaction Data: Message Control BIT300 2. The system found the output type BA00 (Order Acknowl. Search for the IDoc using the business object type PurchaseOrder and your document number from step 1. Check the content of individual segments and compare them with your purchase order. Select the search result and accept it with Enter: You now enter the overview screen of the order that was created from the data of the purchase order. then choose Execute .

choose Logistics → Materials Management → Purchasing → Purchase Order → Display.BIT300 Lesson: Example: Purchase Order Processing 5. you now display the outbound IDoc for the order confirmation using the object services in the order. 133 . a) b) c) d) Choose System → Services for Object and then choose Display links Double-click the number of the outbound IDoc of the message type ORDRSP to call up the IDoc for display. In the CORE system. All rights reserved. In the system SALES. check the Confirmations tab page on the document item level. 2005/Q4 © 2006 SAP AG. . Then check the purchase order in the SALES system: What has changed? Hint: In the purchase order. Select the tab page Confirmations on the document item level: In the Order confirmation field you will see the document number of the sales order from the CORE system.

2005/Q4 . All rights reserved.Unit 3: Distributing Transaction Data: Message Control BIT300 Lesson Summary You should now be able to: • Create a purchase order and check the events of your message determination • Describe the cross-system purchase order process • Explain the most important Customizing settings for this process 134 © 2006 SAP AG.

BIT300 Unit Summary Unit Summary You should now be able to: • Differentiate ALE and EDI • Describe the basic functions of message control • Explain how message control is used to generate IDocs • Create a purchase order and check the events of your message determination • Describe the cross-system purchase order process • Explain the most important Customizing settings for this process 2005/Q4 © 2006 SAP AG. All rights reserved. 135 .

Unit Summary BIT300 136 © 2006 SAP AG. All rights reserved. 2005/Q4 .

.......................Unit 4 Distributing Transaction Data: BAPIs Unit Overview This unit explains how transaction data in a system landscape can be distributed in ALE using preconfigured interfaces to business object types. All rights reserved...165 2005/Q4 © 2006 SAP AG..................145 Lesson: Example: Travel Expenses.....155 Exercise 8: Trip Cost Accounting with Two Systems ... 137 .. Unit Contents Lesson: Business Object Types and BAPIs .. and also determine detailed information on BAPIs Enter Customizing settings for synchronous BAPI calls Enter Customizing settings for asynchronous BAPI calls using the ALE interface To describe the configuration of the ALE scenario “Transferring the accounting results of the travel expenses to Accounting”.......................138 Lesson: The Usage of BAPIs in ALE......... you will be able to: • • • • • Explain the terms “business object type” and “BAPI” Determine business object types and BAPIs using the BAPI Explorer............................... Unit Objectives After completing this unit....................161 Exercise 9: ALE Scenario for Setting Up Travel Expenses ........... the Business Application Programming Interfaces (BAPIs)..

you look for corresponding inbound interfaces in receiving systems and check whether these interfaces have been used in a pre-defined ALE scenario. you will be able to: • • Explain the terms “business object type” and “BAPI” Determine business object types and BAPIs using the BAPI Explorer. 138 © 2006 SAP AG. Lesson Objectives After completing this lesson. it is necessary to have a more in-depth understanding of the underlying technology (business objects and options for accessing business objects). For this purpose. For the technical integration. You will find out how to search for and find BAPIs. 2005/Q4 . and also determine detailed information on BAPIs Business Example You want to set up a business process in a distributed system landscape. and how to recognise whether an asynchronous ALE interface exists for a BAPI. All rights reserved.Unit 4: Distributing Transaction Data: BAPIs BIT300 Lesson: Business Object Types and BAPIs Lesson Overview This lesson introduces business object types and BAPIs. What is a Business Object Type? Integration scenarios are important for the design phase of distributed business processes.

2005/Q4 © 2006 SAP AG.Representation To achieve this encapsulation. and they can be used by means of standardized methods .the BAPIs. business object types are created as entities with different layers: At the center of the business object type is the kernel.BIT300 Lesson: Business Object Types and BAPIs Figure 78: Business Object Type . Business object types cover a wide spectrum of SAP business data and processes. All rights reserved. 139 . which represents the inherent data of the object.Definition The business object types are an important part of the Internet Business Framework and are prerequisites for interoperability. The business object types and their BAPIs thus provide an object-oriented view of the business functions in SAP systems. Figure 79: Business Object Type .

For example. represents the business logic of the object. The third layer.for example. describes the implementation and structure of the business object type. and defines the object's interface to the outside world. This layer defines the technologies that can be used for external access to the data of the object type . Figure 80: Examples of SAP Business Object Types Every individual business object belongs to a specific business object type. 140 © 2006 SAP AG. COM/DCOM (Component Object Model/Distributed Component Object Model). The fourth and outermost layer of a business object type is the access layer. An employee with the employee number 4711 is an instance of the business object type “employee” and is designated a business object. all the employees of a company belong to the business object type “employee”. the interface layer. the integrity layer. depending on its properties. It comprises of the business rules for the consistent embedding in the environment and the constraints with regard to the values and areas relating to the business object type. 2005/Q4 . All rights reserved.Unit 4: Distributing Transaction Data: BAPIs BIT300 The second layer.

0. With the introduction of the BAPIs in SAP R/3 3. such as Sales and Distribution and Materials Management.BAPIs.0. In SAP R/3 3.1. What is a BAPI? External applications can access business objects in SAP systems through standardized. All rights reserved. the business object types are hierarchically assigned to the application components. The business object types and their BAPIs provide an object-oriented view of the business processes and data in an SAP System. 141 . In the BOR. The BOR was first introduced in SAP R/3 3. The BOR contains two categories of object types: • Business object types These are the business object types already discussed.BIT300 Lesson: Business Object Types and BAPIs Figure 81: Business Object Repository (BOR) All the business object types and their methods are defined in the Business Object Repository (BOR) within SAP systems. at the same time as the introduction of the business object types and the SAP Workflow. 2005/Q4 © 2006 SAP AG. the importance of BOR increased. • Technical object types These are elements such as texts. work items. as well as development and modeling objects. archived documents. platform-independent interfaces . the BOR was mainly used by the SAP Workflow. It is now the central point of access to the business object types and their BAPIs in SAP systems for external applications.

CheckAvailability”. In the application menu. All rights reserved. Figure 83: How is a BAPI implemented in an SAP system? You can use the BAPI Explorer to obtain information on business object types and their related BAPIs. the business object type “material” has a BAPI with the name “Material. 142 © 2006 SAP AG. choose Tools → Business Framework → BAPI Explorer or call the transaction BAPI directly. 2005/Q4 . For example. Therefore. the functions that are implemented with the business object type “material” include a check for the material's availability.Unit 4: Distributing Transaction Data: BAPIs BIT300 Figure 82: Interfaces of Business Object Types A BAPI is a standard interface that provides access to the business data and business processes of business object types in SAP systems.

All rights reserved. (API stands for Application Programming Interface.BIT300 Lesson: Business Object Types and BAPIs Figure 84: BAPI Explorer The display of the BAPI Explorer is divided into a hierarchy area and a detail window. If you open the directory of a business object type.) 2005/Q4 © 2006 SAP AG. 143 . you see a subtree with its key attributes and its API methods. You can open the folders of the application components and obtain the business object types belonging to each respective component. The component hierarchy is displayed in the hierarchy area.

All rights reserved. 2005/Q4 .Unit 4: Distributing Transaction Data: BAPIs BIT300 Lesson Summary You should now be able to: • Explain the terms “business object type” and “BAPI” • Determine business object types and BAPIs using the BAPI Explorer. and also determine detailed information on BAPIs 144 © 2006 SAP AG.

BIT300 Lesson: The Usage of BAPIs in ALE Lesson: The Usage of BAPIs in ALE Lesson Overview This lesson shows how BAPIs can be used in an ALE scenario to realize synchronous checks and queries and asynchronous data exchanges. 145 . 2005/Q4 © 2006 SAP AG.6. Lesson Objectives After completing this lesson. You can use the BAPI Explorer to navigate to the display of the function module for the selected BAPI in the “Function Builder”: Figure 85: BAPI Function Modules BAPIs can be used for the synchronous communication between two systems. Synchronous Communication with BAPIs Since SAP R/3 4. BAPIs are realized as function modules. you will be able to: • • Enter Customizing settings for synchronous BAPI calls Enter Customizing settings for asynchronous BAPI calls using the ALE interface Business Example You want to configure an ALE scenario in which the transaction data is distributed using BAPIs. All rights reserved.

if applicable. it is usually called up locally. Calling up the BAPI function module using RFC: The calling system transfers the application data by means of RFC by calling up the BAPI function module in the target system. Determination of the RFC destination: If the logical system in which the BAPI is to be called is known.Unit 4: Distributing Transaction Data: BAPIs BIT300 Figure 86: Synchronous call of a BAPI For the synchronous call of a BAPI within an ALE scenario. the application program of the calling system determines the RFC destination for this remote system from a table. 2005/Q4 . 3. 146 © 2006 SAP AG. 2. All rights reserved. which you can find by using the transaction BD97 or in the IMG in the Customizing of the ALE (transaction SALE) by means of the path IDoc Interface / Application Link Enabling (ALE) → Communication→ Determine RFC Destinations for Method Calls. Querying the distribution model: The application program determines the receiver and. filter values for filter objects from the distribution model. If the BAPI is not contained in the distribution model. the following steps must be realized in the application program: 1.

that is. the BAPI. you enter in the model view the name of the business object type involved and the desired method. The RFC user for the standard destination must have the appropriate application authorizations. All rights reserved. You can also maintain a destination for each method call for every target system. In this case. you can add BAPIs to the individual model views using the Add BAPIs button. you can assign the authorizations of the RFC user more precisely.BIT300 Lesson: The Usage of BAPIs in ALE Figure 87: RFC Destinations for Synchronous Method Calls You can use the transaction BD97 to assign a standard destination for BAPIs to a target system. All BAPI calls for which no specific destination has been entered use this destination. 2005/Q4 © 2006 SAP AG. In the fields Business object type and Method you enter the name from the BAPI Explorer and not the technical names of the business object types from the “Business Object Builder”. 147 . In the distribution model. Figure 88: Distribution Model: Adding BAPIs Along with the sending and receiving systems.

In the transaction BDBG. 148 © 2006 SAP AG. an IDoc is sent to the target system. you select the Display interface button to display the automatically generated elements of the ALE interface of a BAPI. 2005/Q4 . and in the case of instance methods. but can also generate new interfaces. In this way you call the transaction BDBG. This contains the interface parameters of the BAPI. Figure 90: ALE Interface of a BAPI You go to the display of the ALE interface of a BAPI by clicking on the ALE message type in the detail view of of the BAPI Explorer. the BAPI function module is called locally with the parameters from the IDoc. the key fields of the business object. with which you can display the existing ALE interfaces of BAPIs. In the target system.Unit 4: Distributing Transaction Data: BAPIs BIT300 Asynchronous Communication with BAPIs Figure 89: Asynchronous Call of a BAPI in the Target System In order to call a BAPI asynchronously in the target system. All rights reserved.

Segment types: The elementary import parameters are grouped together in a segment type. They are used exclusively in the partner profiles between sending and receiving systems. Then a function module is called that transfers this master IDoc to the ALE layer. Function module for ALE output: In the outbound function module. the interface parameters are copied into the IDoc segments and a master IDoc is created. The BAPIs themselves are assigned in the distribution model (see above). • • IDoc type: The IDoc type is the basis of the IDoc required for the asynchronous communication with BAPIs. A segment type is created for every structured import parameter. 149 . Function module for ALE input: The inbound function module copies the contents of the segment fields onto the related interface parameters and calls the BAPI function module locally in the target system.BIT300 Lesson: The Usage of BAPIs in ALE Figure 91: ALE Interface of a BAPI The following elements are part of the generated ALE interface of a BAPI: • Message type: Message types of the ALE interface of BAPIs are not directly assigned to a model view. All rights reserved. • • 2005/Q4 © 2006 SAP AG.

The communication IDoc is created in the same way as in the non-BAPI-based ALE scenarios: For the message type of the BAPI. 2005/Q4 . After the application data is determined. All rights reserved. Subsequently. and a suitable RFC port. the receiving system and any filter values for filter objects from the distribution model of the sending system are determined. are assigned. 2.Unit 4: Distributing Transaction Data: BAPIs BIT300 Figure 92: Outbound Processing of an IDoc for a BAPI Call The following steps are carried out in the application program: 1. there must be partner profiles with the recipient system in which the generated IDoc basic type of the ALE scenario of the BAPI. This module creates the master IDoc and transfers it to the ALE layer. 150 © 2006 SAP AG. the generated outbound function module of the ALE interface of the BAPI is called.

All rights reserved. 151 .BIT300 Lesson: The Usage of BAPIs in ALE Figure 93: Sending the Communication IDoc The communication IDoc is sent by means of RFC immediately or later. Figure 94: Inbound Processing of an IDoc for a BAPI Call 2005/Q4 © 2006 SAP AG. depending on the specifications in the partner profiles with the receiving system.

the ALE detects learns that the input function module of the ALE interface generated for the BAPI is to be called. generate the partner profiles of BAPI-based ALE scenarios from the distribution model. The inbound function module copies the contents of the segment fields of the IDoc onto the BAPI interface parameters and then calls the BAPI function module locally. or processed later as by the program RBDAPP01 as a background job.Unit 4: Distributing Transaction Data: BAPIs BIT300 In the receiving system. All rights reserved. 152 © 2006 SAP AG. it is either transferred to the application immediately. the IDoc is stored on the database. Figure 95: Outbound Partner Profile in the Sending System If possible. Depending on the setting in the partner profiles. 2005/Q4 . By means of the BAPI process code in the partner profiles. The system then enters the message type and IDoc type relevant to the BAPI.

153 . All rights reserved. 2005/Q4 © 2006 SAP AG.BIT300 Lesson: The Usage of BAPIs in ALE Figure 96: Inbound Partner Profile in the Receiving System Also generate the partner profile in the receiving system from the distribution model: The system assigns the process code BAPI.

Unit 4: Distributing Transaction Data: BAPIs BIT300 Lesson Summary You should now be able to: • Enter Customizing settings for synchronous BAPI calls • Enter Customizing settings for asynchronous BAPI calls using the ALE interface 154 © 2006 SAP AG. 2005/Q4 . All rights reserved.

the results of the travel expenses are to be transferred to the Accounting system using ALE. The employees enter the costs for their business trips in the Travel Management of this system. If the systems are thus separated.BIT300 Lesson: Example: Travel Expenses Lesson: Example: Travel Expenses Lesson Overview This lesson explains the configuration of the ALE scenario “Transferring the accounting results of the travel expenses to Accounting”. However. Travel Expenses: Process The Travel Management is part of the mySAP ERP Financials application. It is not absolutely necessary to systematically separate the Travel Management from the other applications of Accounting. This scenario uses BAPIs for both the synchronous and the asynchronous communication. then the results of the travel expenses must be transferred to the Accounting system (in the example: CORE) for posting and for the subsequent payout of reimbursement amounts. you will find the application transactions for using the functions of Travel Management in the reporting menus of both applications. 2005/Q4 © 2006 SAP AG. In the future. it is not infrequently assigned to the separately operated system for human resources (in the example HR_TRAVEL). 155 . For this reason. Lesson Objectives After completing this lesson. but it also affects human resources. you are provided with the pre-configured ALE scenario “Transferring the accounting results of the travel expenses to Accounting” for this process. you will be able to: • To describe the configuration of the ALE scenario “Transferring the accounting results of the travel expenses to Accounting”. All rights reserved. In SAP R/3 and SAP EEC. Business Example Your company has moved the human resources to its own system.

destination. the Travel Management system can perform additional synchronous BAPI calls.Unit 4: Distributing Transaction Data: BAPIs BIT300 Figure 97: Travel Expenses: Posting Procedure The figure illustrates the posting procedure of the process. and the vendor master records required for the reimbursement of expenses. this step takes into account the daily rates for calculating expenses stored in the system (“Settle trip”). 156 © 2006 SAP AG. among other things. transport. exist in the Accounting system for the personnel numbers of the employees on the trip. whether the accounts on which the postings are to be made. It comprises the following individual steps: • • • • • Entering the trip costs: In the Travel Management. and so on) of his business trip (“Create trip”). Authorization of trip: The supervisor or personnel department employee authorizes the reimbursement of costs (“Authorize trip”). All rights reserved. Accounting of trip: The personnel department gets the system to calculate the reimbursement amounts. 2005/Q4 . the account assignment objects of Controlling determined in the travel expenses. Checking the posting run: In order to ensure that postings are allowed to be made on the accounts and account assignment objects of Accounting at the time of the actual settlement data transfer. In this way it checks. expenses for accommodation. the trip cost management system performs synchronous BAPI calls. Among other things. the employee enters the details (start and end of trip. Creating the posting run: When creating what is known as the posting run.

Required Presettings For the ALE scenario “Transferring the accounting results of the travel expenses to Accounting” to function. a necessary prerequisite is the advance distribution of the master data required in both systems (personnel master data. the Customizing in the areas involved must be synchronized. In addition. Every posting run is given a unique. sequential number by the system. Figure 98: Master Data Distribution You will find more detailed information on these settings in IMG through transaction SALE. in the course of IDoc inbound processing. the Travel Management system transfers the results of the settlement to the Accounting system. 157 . All rights reserved. Note: A posting run is a kind of “container” for the documents in which the the results of the travel expenses are kept. Then choose IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Configure Predefined ALE Business Processes → Human Resources → HR <-> AC → Set Up Trip Costs Transfer to FI. 2005/Q4 © 2006 SAP AG.BIT300 Lesson: Example: Travel Expenses • Posting the posting run: Finally. The BAPIs used by the system in this step are called asynchronously. cost centers).

All rights reserved. you also transfer the relevant BAPIs into a view of the distribution model and assign the target system of the synchronous method call an RFC destination using the transaction BD97. 158 © 2006 SAP AG.Unit 4: Distributing Transaction Data: BAPIs BIT300 Details of the Posting Run for the Travel Expenses To be able to create a posting run in the system of the Travel Management. 2005/Q4 . Figure 99: Model View: Creating a Posting Run To check a posting run. you transfer the relevant BAPIs (see figure below) into a corresponding view of the distribution model in the maintenance system and assign the target system of these synchronous method calls an RFC destination using the transaction BD97.

159 . Figure 101: Model View: Posting a Posting Run 2005/Q4 © 2006 SAP AG.BIT300 Lesson: Example: Travel Expenses Figure 100: Model View: Checking a Posting Run To post a posting run in the Accounting system. you transfer the relevant BAPIs into a view of the distribution model and generate the partner profiles for the IDoc generation in the sending and receiving systems. All rights reserved.

All rights reserved. a traffic light will tell you whether the data transfer was successful.Unit 4: Distributing Transaction Data: BAPIs BIT300 When you display the trip transfer documents in the Travel Management system after transferring the posting run to the Accounting system. 2005/Q4 . 160 © 2006 SAP AG.

Caution: When the trip costs are being transferred to Accounting. enter the data of a business trip. Write down the settlement period: ___________ Create a posting run with the data for your trip. Therefore. 161 . a test run is performed with the model view that the instructor created. Task: In the logical system HR_TRAVEL. the system checks that the receiver is unique. settle this business trip. You can also directly access your IDoc using the transaction IDoc Search for Contents (transaction code WE09). 1. 2. select the segment E1BPACHE06. Enter the costs for accommodation and taxis. 5. 2005/Q4 © 2006 SAP AG. Then display the inbound IDoc in the status monitor of the logical system CORE. The trip was in the previous week and took two days. All rights reserved. Write down the number of the trip: ___________ Approve the reimbursement of the trip costs you have just entered and then perform the settlement. and transfer the settlement data to the logical system CORE for posting in Accounting. segment field USERNAME.BIT300 Lesson: Example: Travel Expenses Exercise 8: Trip Cost Accounting with Two Systems Exercise Objectives After completing this exercise. in which you create a new view in the distribution model with all the BAPIs required for the ALE scenario. Now transfer the settlement results to Accounting in the logical system CORE. Using the IDoc basic type ACC_EMPLOYEE_PAY01. must therefore be performed after this exercise. 3. 4. Exercise 2. In the HR_TRAVEL system. you will be able to: • Transfer trip costs from the Human Resources system to the Accounting system within the SAP Travel Management Business Example Your company has moved the human resources to its own system. Business trips are recorded in the SAP Travel Management of this system and subsequently transferred to the Accounting system for reimbursement purposes. create a new trip for the employee with the personnel number 60995##. and enter your user BIT300-## as an additional search criteria.

must therefore be performed after this exercise. Caution: When the trip costs are being transferred to Accounting. In the HR_TRAVEL system. In the Description field. in which you create a new view in the distribution model with all the BAPIs required for the ALE scenario. create a new trip for the employee with the personnel number 60995##.Unit 4: Distributing Transaction Data: BAPIs BIT300 Solution 8: Trip Cost Accounting with Two Systems Task: In the logical system HR_TRAVEL. Therefore. enter the data of a business trip. enter TAXI and in the Amount an amount of your choice. Enter the personnel number 60995## and confirm the entry with Enter. 2005/Q4 . Then choose the Settle button. Next. Enter the costs for accommodation and taxis. enter HOTL and in the Amount field the total cost of the accommodation. Enter a date in each of the fields Start and Finish. a test run is performed with the model view that the instructor created. Write down the number of the trip: ___________ a) b) c) d) Choose Human Resources → Travel Management → Travel Expenses → Travel Expense Manager. the system checks that the receiver is unique. 1. Confirm the default for the settlement period and make a note of the period. Exercise 2. Choose Create to call up the screen for entering the trip costs. in the ExpTy field. Approve the reimbursement of the trip costs you have just entered and then perform the settlement. All rights reserved. Create the trip by saving and make a note of the trip number. and transfer the settlement data to the logical system CORE for posting in Accounting. e) f) 2. Continued on next page 162 © 2006 SAP AG. Confirm these entries with Enter. Write down the settlement period: ___________ a) b) Select your trip from step 1 and choose the Approve button. in the ExpTy field. The trip was in the previous week and took two days. enter a text of your choice and select Enter again to leave the detail screen. settle this business trip. Next.

Click on the number of the IDoc to display the details. Select your posting run and choose the Post button. a) Choose Human Resources → Travel Management → Travel Expenses → Periodic Processing → Transfer to Accounting → Manage Posting Runs. b) c) 5. you will see a green traffic light with the text Posting run completely transferred to target system CORE. Leave the transaction. choose Other period and enter the period from step 2. In the field Basic type enter ACC_EMPLOYEE_PAY01. Enter the payroll area D2. you will see a green traffic light for the number of the posting run. Select Execute to display your posting run from step 3. Now transfer the settlement results to Accounting in the logical system CORE. account assignment objects and HR payee assignment for the personnel number was successful. a) Choose Human Resources → Travel Management → Travel Expenses → Periodic Processing → Transfer to Accounting → Create Posting Run. Using the IDoc basic type ACC_EMPLOYEE_PAY01. Also enter the personnel number 60995## and the number of the trip from step 1 and choose Execute . choose Tools → ALE → ALE Administration → Monitoring → IDoc Display → Status Monitor to call the status monitor.BIT300 Lesson: Example: Travel Expenses 3. Create a posting run with the data for your trip. segment field USERNAME. All rights reserved. b) c) 4. 163 . in the field Search in segment enter E1BPACHE06. Answer the query on the processing time by choosing the Post immediately button: If the transfer was successful. If the synchronous check of the accounts. a) In the CORE system. in the field Search in field enter USERNAME and in the field For value enter your user BIT300-## and choose Execute . and enter your user BIT300-## as an additional search criteria. You can also directly access your IDoc using the transaction IDoc Search for Contents (transaction code WE09). Then display the inbound IDoc in the status monitor of the logical system CORE. or Tools → ALE → ALE Administration → Services → IDoc Search for Contents to go to transaction WE09. select the segment E1BPACHE06. b) c) 2005/Q4 © 2006 SAP AG.

All rights reserved. 2005/Q4 .Unit 4: Distributing Transaction Data: BAPIs BIT300 164 © 2006 SAP AG.

search for the description of the ALE scenario “Transferring the accounting results of the travel expenses to Accounting” and make a note of the BAPIs required for this scenario. Which BAPIs are involved in the transfer of the trip costs to Accounting? Make a note of the BAPIs for the business object types used for the steps “Create posting run”. “Check posting run” and “Post posting run”. All rights reserved. 1. Continued on next page 2005/Q4 © 2006 SAP AG.BIT300 Lesson: Example: Travel Expenses Exercise 9: ALE Scenario for Setting Up Travel Expenses Exercise Objectives After completing this exercise. search for the description of the ALE scenario “Transferring the accounting results of the travel expenses to Accounting”. In the IMG documentation. Business trips are recorded in the SAP Travel Management of this system and subsequently transferred to the Accounting system for reimbursement purposes. Business object type AcctngServices Vendor Customer AcctngEmplyeePaybles AcctngEmplyeeRcvbles AcctngEmplyeeExpnses Method (BAPI) 2. you will be able to: • Determine BAPIs using the BAPI Explorer • Check the ALE interface belonging to a BAPI • Set up an ALE scenario with BAPIs Business Example Your company has moved the human resources to its own system. 165 . Task 1: In the IMG documentation.

check for which of the BAPIs entered in the above table there is an ALE interface. just like message types. In the distribution model of the system CORE. Hint: To be able to perform this exercise with different exercise groups. Is this logical system name now known in the logical system HR_TRAVEL? If applicable. 2. 2005/Q4 . but you enter a port to which an RFC destination of the system CORE is assigned. BAPIs may only appear in one view of the distribution model in the relationship between two logical systems. For this reason.Unit 4: Distributing Transaction Data: BAPIs BIT300 3. Add the BAPIs that you determined in the first task. BAPI Message type Task 2: In the logical system CORE. we have to use a little trick: All the groups are to set up the distribution between the systems HR_TRAVEL and CORE. but you do not assign it to any client. you define the logical system CORE##. and the receiver the system CORE##. However. In the logical system CORE. In the BAPI Explorer. create a new view with the short text BIT300BAPI## and the technical name BAPI##. All rights reserved. 1. define a new logical system CORE## and then create a model view with this logical system as the target system of the method calls determined in the first task. The sender is the system HR_TRAVEL. also create CORE## in HR_TRAVEL. 3. you use the logical system CORE## as the target system. Note the names of the assigned message types. Continued on next page 166 © 2006 SAP AG.

2. 167 . The receiving port is CORE with the RFC destination of the same name. 2005/Q4 © 2006 SAP AG. Caution: Do not distribute the view to the logical system CORE##. because this logical system is not assigned to a client.BIT300 Lesson: Example: Travel Expenses Task 3: Distribute the new model view to the system HR_TRAVEL and there you create the corresponding partner profiles. In the logical system HR_TRAVEL. 5. All rights reserved. In the HR_TRAVEL system. 4. which RFC destination do you have to assign to the logical system CORE## for synchronous method calls? Add the corresponding entry. or you create them manually. You also add an RFC destination to the system CORE## for synchronous method calls. Distribute the new model view to the logical system HR_TRAVEL and check the result. Which process code is assigned? Why do you not need any separate inbound partner profiles for the logical system CORE##? 3. you now generate the outbound partner profiles with the system CORE## for the three asynchronous method calls. In the logical system HR_TRAVEL. In the logical system CORE. 1. check the inbound partner profiles with the logical system HR_TRAVEL for the message types for asynchronous communication. create outbound partner profiles with the partner CORE## for the message type SYNCH.

5A or Later. check for which of the BAPIs entered in the above table there is an ALE interface. b) 2. “Check posting run” and “Post posting run”. search for the description of the ALE scenario “Transferring the accounting results of the travel expenses to Accounting” and make a note of the BAPIs required for this scenario. 1. Business object type AcctngServices Vendor Customer AcctngEmplyeePaybles AcctngEmplyeeRcvbles AcctngEmplyeeExpnses Method (BAPI) PreCheckPayrollAccountAssign Find Find Check Post Check Post Check Post 3. Continued on next page 168 © 2006 SAP AG. In the IMG documentation. a) Call the transaction SALE and choose IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Configure Predefined ALE Business Processes → Human Resources → HR <-> AC → Set Up Trip Costs Transfer to FI → Travel Management and Accounting are Release 4. Note the names of the assigned message types. All rights reserved. Choose Documentation for IMG activity . In the BAPI Explorer. 2005/Q4 .Unit 4: Distributing Transaction Data: BAPIs BIT300 Solution 9: ALE Scenario for Setting Up Travel Expenses Task 1: In the IMG documentation. Which BAPIs are involved in the transfer of the trip costs to Accounting? Make a note of the BAPIs for the business object types used for the steps “Create posting run”. search for the description of the ALE scenario “Transferring the accounting results of the travel expenses to Accounting”.

choose Create Request .BIT300 Lesson: Example: Travel Expenses BAPI AcctngEmplyeeExpnses. Select each respective entry for the method Post: You will find the message type on the tab page Detail in the field ALE message type. In the screen prompting the workbench request. enter the logical system name CORE## and a name of your choice and save your entry. All rights reserved. you define the logical system CORE##.Post a) b) Message type ACC_EMPLOYEE_EXP ACC_EMPLOYEE_PAY ACC_EMPLOYEE_REC Choose Tools → Business Framework → BAPI Explorer. b) c) Continued on next page 2005/Q4 © 2006 SAP AG. we have to use a little trick: All the groups are to set up the distribution between the systems HR_TRAVEL and CORE. 1. However. c) Task 2: In the logical system CORE. define a new logical system CORE## and then create a model view with this logical system as the target system of the method calls determined in the first task. BAPIs may only appear in one view of the distribution model in the relationship between two logical systems. 169 . Confirm the message about client independence with Enter. but you enter a port to which an RFC destination of the system CORE is assigned. Select the tab page Alphabetical and expand each of the entries for the business object types AcctngEmplyeeExpnses. AcctngEmplyeePaybles and AcctngEmplyeeRcvbles. but you do not assign it to any client. a) Call the transaction SALE and choose IDoc Interface / Application Link Enabling (ALE) → Basic Settings → Logical Systems → Define Logical System.Post AcctngEmplyeePaybles. In the logical system CORE. you use the logical system CORE## as the target system. just like message types. Hint: To be able to perform this exercise with different exercise groups.Post AcctngEmplyeeRcvbles. For this reason. enter a short description of your choice and choose Save . Choose the New entries button. Then choose Continue or Enter and leave the table.

Unit 4: Distributing Transaction Data: BAPIs BIT300 2. If you are only using clients of one SAP system: The logical system name CORE## is already known in the system HR_TRAVEL. In the distribution model of the system CORE. Create the new model view by saving. In this way. 2005/Q4 . the receiver CORE##. you add the remaining BAPIs that you require for the ALE scenario. 1. Continued on next page 170 © 2006 SAP AG. the object name AcctngEmplyeeExpnses and the method Check. Distribute the new model view to the logical system HR_TRAVEL and check the result. The sender is the system HR_TRAVEL. Switch to the change mode (Switching between display and edit modes ) and choose the Create model view button. create a new view with the short text BIT300BAPI## and the technical name BAPI##. You also add an RFC destination to the system CORE## for synchronous method calls. b) c) d) e) f) Task 3: Distribute the new model view to the system HR_TRAVEL and there you create the corresponding partner profiles. and confirm your entries with Enter. All rights reserved. 3. Answer: This depends on whether you are working with one or more SAP systems in the course. • • If you are using clients in two SAP systems: The logical system name CORE## must also be defined in the logical system HR_TRAVEL. also create CORE## in HR_TRAVEL. Enter the sender HR_TRAVEL. and the receiver the system CORE##. Select the view and choose the Add BAPI button. Enter the short text BIT300BAPI## and the technical name BAPI## and choose Enter. Is this logical system name now known in the logical system HR_TRAVEL? If applicable. Add the BAPIs that you determined in the first task. a) Call the transaction SALE and choose IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Maintain Distribution Model and Distribute Views. because the logical system names are saved in a cross-client table.

select the new model view and choose Edit → Model view → Distribute. Hint: If your BAPI## view has not been distributed.BIT300 Lesson: Example: Travel Expenses Caution: Do not distribute the view to the logical system CORE##. as described in task 2. The receiving port is CORE with the RFC destination of the same name. in the menu of the distribution model. because this logical system is not assigned to a client. 2. choose Environment → Change Partner Profile. You receive a log of the successful distribution of the view to the system HR_TRAVEL. enter the partner number CORE## and the partner type LS and create the new partner by saving. Leave the partner profile maintenance. Choose Create . a) b) In the distribution model of the system CORE. create outbound partner profiles with the partner CORE## for the message type SYNCH. a) b) c) In the system HR_TRAVEL. or because the RFC destination does not lead to the client of the system HR_TRAVEL. choose Create outbound parameter . In the logical system HR_TRAVEL. and in the message type SYNCH. Choose the immediate IDoc transfer and save your changes. All rights reserved. call the distribution model for display. deselect the entry for the logical system CORE## and confirm the change with Enter. In the next screen. enter the receiving port CORE and the IDoc type SYNCHRON. this could be because the message type SYNCH does not exist in the partner profiles of the system CORE with the system HR_TRAVEL. In the system HR_TRAVEL. In the outbound parameter area. c) Continued on next page 2005/Q4 © 2006 SAP AG. 171 .

Select the partner CORE## and in the outbound parameter area. a) b) c) d) e) Select your model view and in the menu of the distribution model. The corresponding IDoc types are ACC_EMPLOYEE_REC01 and ACC_EMPLOYEE_PAY01 respectively.Unit 4: Distributing Transaction Data: BAPIs BIT300 3. Which process code is assigned? Why do you not need any separate inbound partner profiles for the logical system CORE##? Answer: In the inbound partner profiles for the message types ACC_EMPLOYEE_EXP. but rather the system HR_TRAVEL actually calls the system CORE## on the basis of the assignment of the receiving port CORE in the outbound partner profiles with CORE##. 4. Then choose Environment → Change Partner Profile to check the automatically created partner profiles. 2005/Q4 . choose Environment → Generate Partner Profile. All rights reserved. no inbound partner profiles are required for CORE##. choose Create Outbound Parameter . To create the partner profiles manually. check the inbound partner profiles with the logical system HR_TRAVEL for the message types for asynchronous communication. Enter the message type ACC_EMPLOYEE_EXP. and create the partner profiles by saving. In the logical system HR_TRAVEL. ACC_EMPLOYEE_PAY and ACC_EMPLOYEE_REC. the process code BAPI is assigned. Because the logical system CORE## is not assigned to any client. the port CORE and the IDoc type ACC_EMPLOYEE_EXP01. Proceed in the same way with the message types ACC_EMPLOYEE_REC and ACC_EMPLOYEE_PAY. In the logical system CORE. or you create them manually. choose Environment → Change Partner Profile. Continued on next page 172 © 2006 SAP AG. select the immediate processing. you now generate the outbound partner profiles with the system CORE## for the three asynchronous method calls.

for BAPIs. In the HR_TRAVEL system. you must assign the RFC destination CORE to the logical system of the same name. a) Because the logical system name CORE## is not assigned to any client. In the menu of the transaction. and save the change. 173 . enter your logical system CORE## and choose Find Click on the system name to return to the system overview at the position of the corresponding entry. In the Search for or Enter.BIT300 Lesson: Example: Travel Expenses 5. All rights reserved. field. Enter the RFC destination CORE. choose Enter. b) c) d) e) 2005/Q4 © 2006 SAP AG. which RFC destination do you have to assign to the logical system CORE## for synchronous method calls? Add the corresponding entry. Call the transaction SALE and choose IDoc Interface / Application Link Enabling (ALE) → Communication → Determine RFC Destinations for Method Calls. choose Edit → Find. Select your logical system CORE## and choose the button Standard Dest.

174 © 2006 SAP AG. 2005/Q4 .Unit 4: Distributing Transaction Data: BAPIs BIT300 Lesson Summary You should now be able to: • To describe the configuration of the ALE scenario “Transferring the accounting results of the travel expenses to Accounting”. All rights reserved.

All rights reserved. 2005/Q4 © 2006 SAP AG. 175 .BIT300 Unit Summary Unit Summary You should now be able to: • Explain the terms “business object type” and “BAPI” • Determine business object types and BAPIs using the BAPI Explorer. and also determine detailed information on BAPIs • Enter Customizing settings for synchronous BAPI calls • Enter Customizing settings for asynchronous BAPI calls using the ALE interface • To describe the configuration of the ALE scenario “Transferring the accounting results of the travel expenses to Accounting”.

2005/Q4 . All rights reserved.Unit Summary BIT300 176 © 2006 SAP AG.

.............................. how to correct errors and then how to archive IDocs that are no longer needed.........................190 Procedure: Problem: The IDoc Was Not Created....196 Procedure: Problem: The IDoc was Created............................199 Procedure: Problem: The IDoc was Successfully Sent.. You will learn how to monitor the evolution of an IDoc......... but was not Sent .179 Exercise 10: Monitoring IDocs in the Status Monitor .........................................Unit 5 Monitoring Data Distribution............187 Lesson: Error Analysis and Handling . but was not Posted ...................201 2005/Q4 © 2006 SAP AG.................... Error-Handling and Archiving Unit Overview This unit handles various different tasks that arise from the implementation of ALE and EDI scenarios.....200 Procedure: Problem: The IDoc was Received by the Receiving System.... but it was not Received by the Receiving System ................ Unit Objectives After completing this unit........................ you will be able to: • • • • • • • • • • Use the status monitor efficiently Set up and use the ALE audit Perform error analysis using the ALE status monitor Resolve errors in the IDoc processing Check workflow settings for the error handling of IDocs Understand the settings for process codes Describe the notification concept Monitor the IDoc processing using the SAP Workflow Describe the IDoc archiving procedure Set the archivable statuses in the system Unit Contents Lesson: IDoc Status Management ........185 Exercise 11: ALE Audit ......... 177 .............. All rights reserved...

............ 2005/Q4 ................228 178 © 2006 SAP AG..................... All rights reserved...203 Lesson: SAP Workflow in ALE Environment .................212 Exercise 13: Processing an Incorrect IDoc from a Work Item .............223 Lesson: Archiving IDocs ........................... Error-Handling and Archiving BIT300 Exercise 12: Error Analysis and Handling..Unit 5: Monitoring Data Distribution...................

Each status value is assigned to a traffic light symbol. even those that were processed correctly. Because you usually do not want to display all the IDocs that have not been archived yet at the same time. You are also looking for options to call information in the sender system about the further processing of IDocs in the receiving system. 179 .BIT300 Lesson: IDoc Status Management Lesson: IDoc Status Management Lesson Overview This lesson provides you with more detailed information on the IDoc status monitor. All rights reserved. Errors in the IDoc outbound and inbound processing should be detected early. IDoc Status Management The status monitor provides you with an overview of the outbound and inbound IDocs from the perspective of the logical system by executing the transaction (transaction code BD87). From SAP R/3 4. the status monitor provides you with various selection criteria for displaying specific documents: • • • • • • • IDoc numbers Creation date and time Change date and time IDoc status Partner systems Message types Business object types and object keys The IDocs determined on the basis of the selection specifications are first grouped in the status monitor in terms of direction (outbound or inbound). the status monitor displays all IDocs. all the outbound IDocs for a message type that were successfully transferred to a tRFC port are grouped into status group 03. Lesson Objectives After completing this lesson. You also learn how the sender system uses the ALE audit to obtain information about the further processing of IDocs in the receiving system. They are also grouped into status groups. Successfully processed 2005/Q4 © 2006 SAP AG. For example.6C on. you will be able to: • • Use the status monitor efficiently Set up and use the ALE audit Business Example You are using various ALE scenarios and have to monitor the data distribution.

you will find these transactions with the menu path Tools → Business Communication → IDoc Basis → Control → Status. To do this. Figure 102: Status Groups The assignment of a status to a traffic light symbol can be changed. All rights reserved.7.Unit 5: Monitoring Data Distribution. Displaying and Monitoring IDocs Use the button Display IDocs to call a list of all the IDocs for a message type. you call transaction WE47. In Settings → Hierarchy in the menu of the status monitor you can choose whether to highlight the message type or the status value. 180 © 2006 SAP AG.0. Error-Handling and Archiving BIT300 IDocs are displayed with green traffic light symbols in the status monitor. not yet (completely) processed IDocs with yellow traffic light symbols and incorrectly processed IDocs with red traffic light symbols. you call the transactions from the IMG (transaction SALE) by choosing IDoc Interface / Application Link Enabling (ALE) → System Monitoring → Set IDoc Status Display → Process IDoc Status Values or Process Status Groups. In SAP ECC 5. The traffic light symbols are assigned to status groups in a table that you can call using transaction WELI. Status values are grouped together into status groups. 2005/Q4 . Note: In SAP R/3 4.

Here you can check the control record. Figure 104: Monitoring IDocs 2005/Q4 © 2006 SAP AG. Under certain conditions. This function (“Monitor IDocs”) is also available in the status monitor by pressing the corresponding button. 181 . the data records and the status records.BIT300 Lesson: IDoc Status Management Figure 103: Displaying IDocs By double-clicking on one of the IDoc numbers in this list you enter the display of the document itself. you can also call and display from the sender system an IDoc in the receiver system. All rights reserved.

The receiving system creates its own IDoc with status information on IDocs that it received for certain message types within a specific period. there must be parameters for the message type SYNCH.Unit 5: Monitoring Data Distribution. All rights reserved. but it can also be triggered directly from the status monitor. Error-Handling and Archiving BIT300 To use this function. The message type of the confirmation is ALEAUD. This audit confirmation is usually sent periodically by means of a background job. In the sending system. the following preconditions must be fulfilled: • • In the outbound partner profiles with the respective receiving system. an RFC destination for dialogs must be assigned to the receiver system. • • ALE Audit The function “ALE Audit” provides the sending system with information about the processing status of an IDoc in the receiving system. 182 © 2006 SAP AG. 2005/Q4 . The RFC user must be a dialog user in the receiving system with the corresponding authorizations for the authorization object S_IDOCMONI. The RFC user entered in the RFC destination which is assigned to the port of the outbound partner profile for the message type SYNCH must have the authorization “Execute” in the receiving system for the function group BDMT for the authorization object S_RFC. Figure 105: ALE Audit: Model View The receiving system uses the asynchronous IDoc interface in order to send back status information to the sending system of an IDoc. You can make this assignment in the IMG by calling the transaction SALE and choosing IDoc Interface / Application Link Enabling (ALE) → Communication → Determine RFC Destinations for Method Calls.

Add the message type ALEAUD to all the relevant model views.BIT300 Lesson: IDoc Status Management Setting up the ALE Audit 1. All rights reserved. whose status values are to be transferred in the audit. 2. If required. Include the program RBDSTATE for sending the audit confirmations. is the sending system for the message type ALEAUD. Figure 106: ALE Audit: Status Values 2005/Q4 © 2006 SAP AG. The receiving system of the IDocs. A corresponding filter object exists. Enter as filter values all the message types for which you want to create an audit message. 183 . 3. Distribute the changes message views again and generate the partner profiles in all the systems involved. you can filter by message type. 4.

If the IDoc was processed incorrectly in the receiving system. then the corresponding outbound IDoc in the sending system gets the status 41 (application document created in target system). and if this error cannot be corrected . You can send confirmations directly (by starting the program RBDSTATE). but the data has not been posted in the application yet. In this case.then the IDoc can be changed to status 68. depends on the status of the corresponding inbound IDoc in the receiving system at the time of execution of the program RBDSTATE: • If the inbound IDoc in the receiving system has the status 53 (application document posted). If the IDoc has reached the receiving system with the status 64 (IDoc is ready for transfer to the application) or 62 (IDoc transferred to application). Error-Handling and Archiving BIT300 The status value of an outbound IDoc in the sending system after the successful inbound processing of the confirmation IDoc for the message type ALEAUD. 2005/Q4 . 184 © 2006 SAP AG. and delete audit statistics that are no longer required. or whether an error has occurred. Therefore. Status 39 does not tell you whether the IDoc still has status 64 because the program RBDAPP01 was not started yet. then the corresponding IDoc in the sending system is given the status 39 (IDoc in target system). status 39 only means that the IDoc has reached the receiving system. the status of the related IDoc in the sending system is set to status 40 (application document in target system not created). • • You will find the functions of the ALE Audit in the menu of the status monitor through the path Goto → ALE Audit.for example. All rights reserved. create statistical evaluations. if the IDoc was sent to the wrong receiving system .Unit 5: Monitoring Data Distribution.

BIT300 Lesson: IDoc Status Management Exercise 10: Monitoring IDocs in the Status Monitor Exercise Objectives After completing this exercise. In the CORE system. Now you want to check whether the IDocs sent for test purposes have arrived in the respective receiving systems without logging on to these receiving systems. Display one of the IDocs in the PRODUCTION system. first check the assignment of an RFC destination for dialogs to the logical system PRODUCTION. However. call the status monitor and select the IDocs of the message type MATMAS that have been created since the start of the course. 1. display IDocs for the message type MATMAS and check whether they have been processed successfully in the logical system PRODUCTION. 2005/Q4 © 2006 SAP AG. Use the function “Monitor IDocs” to determine the status of these IDocs in the receiving system PRODUCTION. 185 . 2. check whether the PRODUCTION system is assigned an RFC destination for dialogs. Task: In the logical system CORE. you will be able to: • Use the status monitor to monitor IDocs in your receiving system Business Example You have set up various ALE scenarios in your system landscape. All rights reserved. In the CORE system.

enter the logical system PRODUCTION and choose Find Enter. you will find the status 53 beside the IDoc number. However. display IDocs for the message type MATMAS and check whether they have been processed successfully in the logical system PRODUCTION. In the CORE system. In the Search for or field. All rights reserved. Click on the system name to return to the system overview at the position of the corresponding entry: The logical system PRODUCTION is assigned the RFC destination for dialogs of the same name. 1. a) b) Choose Tools → ALE → ALE Administration → Monitoring → IDoc Display → Status Monitor. first check the assignment of an RFC destination for dialogs to the logical system PRODUCTION. 2005/Q4 . c) d) e) 186 © 2006 SAP AG. the partner system PRODUCTION. In the CORE system. Double-click on the number of the inbound IDoc in the PRODUCTION system: You enter the display of the IDoc in the receiving system. Error-Handling and Archiving BIT300 Solution 10: Monitoring IDocs in the Status Monitor Task: In the logical system CORE. Display one of the IDocs in the PRODUCTION system. Select the entry (or one of the entries) underneath the message type and choose the Monitor IDocs button. and as the change date. the starting date of the course. call the status monitor and select the IDocs of the message type MATMAS that have been created since the start of the course. a) Call the transaction SALE and choose IDoc Interface / Application Link Enabling (ALE) → Communication → Determine RFC Destinations for Method Calls. check whether the PRODUCTION system is assigned an RFC destination for dialogs. b) c) 2. choose Edit → Find. and choose Execute . Enter the message type MATMAS. Use the function “Monitor IDocs” to determine the status of these IDocs in the receiving system PRODUCTION.Unit 5: Monitoring Data Distribution. In the menu of the transaction. Check the status of the IDoc(s): If the inbound processing was successful.

187 . 2005/Q4 © 2006 SAP AG. Send an IDoc with the status confirmations from the system PRODUCTION to the system CORE. 1. namely. Only send confirmations for IDocs for your reduced message type ZMATMAS##. you will be able to: • Use the functions of the ALE Audit. Business Example You want to be able to detect by the status value of an ALE scenario in the sending system whether the transfer of the data to the corresponding application in the receiving system was successful. All rights reserved. 2. or whether errors occurred. Task: Test the ALE Audit using your Message Type ZMATMAS##. for all those created since the start of the course. Check the result of the confirmation in the status monitor of the CORE system and display one of the IDocs involved.BIT300 Lesson: IDoc Status Management Exercise 11: ALE Audit Exercise Objectives After completing this exercise.

which may also mean. namely. Send an IDoc with the status confirmations from the system PRODUCTION to the system CORE. 2005/Q4 . a) In the system CORE. enter CORE. Check the result of the confirmation in the status monitor of the CORE system and display one of the IDocs involved. call the status monitor as described in step 3 a). Error-Handling and Archiving BIT300 Solution 11: ALE Audit Task: Test the ALE Audit using your Message Type ZMATMAS##. and choose Execute . 1.Unit 5: Monitoring Data Distribution. you will see the status 41. Select an IDoc and choose the Display IDocs button again. If the outbound processing contained errors. b) c) 188 © 2006 SAP AG. The selection for the audit is not made until the next step. enter the message type ZMATMAS##. Select the entry underneath the message type and choose the Display IDocs button. for all those created since the start of the course. Also enter the start date of the course as the first change date and choose Execute . Enter the Message Type ZMATMAS##. Your outbound IDocs for the message type ZMATMAS## now have different status values. enter ZMATMAS##. choose Goto → ALE Audit → Send Audit Confirmations. Open the folder of the status records in order to monitor the updating of the status values. however. enter the date on which the course started and today's date. If the processing was successful in the application in the PRODUCTION system. the status is set to 40. choose Tools → ALE → ALE Administration → Monitoring → IDoc Display → Status Monitor. otherwise you see the status 39. that your IDoc has not been transferred to the application yet.) In the menu of the status monitor. Confirm the message regarding the generation of the Audit IDoc. (You may also select all the IDocs if you want. a) b) In the PRODUCTION system. go back to the initial screen of the status monitor and refresh the display by choosing Refresh IDoc Display : In the area of the IDoc outbound processing you will see an entry for the message type ALEAUD. Only send confirmations for IDocs for your reduced message type ZMATMAS##. All rights reserved. c) d) e) 2. Choose Execute. in the field Message type. . In the field Confirmations to system. and in the fields Date IDoc changed.

BIT300 Lesson: IDoc Status Management Lesson Summary You should now be able to: • Use the status monitor efficiently • Set up and use the ALE audit 2005/Q4 © 2006 SAP AG. 189 . All rights reserved.

2005/Q4 . An administrator is to take over the error handling in the future. IDoc Outbound Processing In the outbound processing. All rights reserved. This lesson will show you how to systematically analyze errors and then resolve them. You want to get an overview of the options for error analysis and error resolution. Configuration errors in the ALE area and in the affected application itself can lead to errors in the IDoc generation or the further IDoc processing.Unit 5: Monitoring Data Distribution. Lesson Objectives After completing this lesson. you will be able to: • • Perform error analysis using the ALE status monitor Resolve errors in the IDoc processing Business Example You have set up various ALE scenarios. the results of which are represented by status values. Error-Handling and Archiving BIT300 Lesson: Error Analysis and Handling Lesson Overview IDoc processing does not always work at once. Successful IDoc outbound processing involves three obligatory and three optional status values: 190 © 2006 SAP AG. an IDoc goes through various phases.

All rights reserved. status 30 is always an intermediate status. the IDocs are only transferred to the receiving port of the partner profile after the program RSEOUT00 is executed. checks whether there are still IDocs in the tRFC queue. This program is also intended for regular background processing with jobs. Therefore. You only find out whether the IDoc was actually received by the receiving system when you run the program RBDMOIND. Status 03 only informs you that the IDoc data was successfully transferred to the port. then there are also the following status values: • • 39: IDoc in target system (ALE service) 41: Application document created in receiving system For the ALE Audit. All the IDocs no longer contained in this queue are given the status 12 (Sending OK). If you have set up the ALE Audit. If the Group IDocs option is selected there. but that it has not been transferred to the application yet. which is intended for regular background processing with jobs. the IDoc can have the status 64 or 62 in the receiving 2005/Q4 © 2006 SAP AG.BIT300 Lesson: Error Analysis and Handling Figure 107: Status Values for Error-Free IDoc Outbound Processing • • • 01: IDoc created 30: IDoc is ready for sending (ALE service) 03: Data passed to port OK Whether or not the sender system sends an IDoc at once depends on the specifications in the respective outbound partner profile. 191 . Therefore. Status 39 informs you in the sending system that an IDoc has been stored on the database in the receiving system. This program. the program RBDSTATE must be executed in the receiving system.

Status 26 indicates that the IDoc is missing a segment which the IDoc basic type specifies is required. Error-Handling and Archiving BIT300 system.Unit 5: Monitoring Data Distribution. 192 © 2006 SAP AG. The IDoc first gets the status 25 and is then switched to status 02. However. or that there is some other breach of the specifications of the IDoc basic type. 2005/Q4 . the sender system sets one of the following status values: Figure 108: Status Values for Incorrect IDoc Outbound Processing • • • • 02: 26: 25: 29: Error transferring data to port Syntax error in IDoc (outbound) Further processing despite syntax error (outbound) Error in ALE service Status 02 is set instead of status 03 if an error occurs during the transfer to the port. if the indicator is set. If the indicator Terminate the processing if syntax error occurs is not set in the outbound partner profile. The sender system determines the transaction code EDIO and on the basis of the assigned workflow task. the IDoc is still transferred to status 30 and processed further. the IDoc can be transferred to the port again from this work item or from the IDoc status monitor. that there are more segments for a segment type than specified in the IDoc basic type. Status 41. sends a workflow item to the agent responsible. If errors occur in the IDoc outbound processing. the sender system determines the transaction code EDIX and sends a work item in accordance with the assigned workflow task. on the other hand. It is possible to trigger the further processing of the IDoc despite a syntax error. After the error is resolved. All rights reserved. indicates an IDoc whose data has been successfully posted in the corresponding application of the receiving system (status 53).

All rights reserved. the results of which are represented by status values. The copy is given status 30 and the original gets status 33 (Original of an IDoc that has been edited). If the IDoc is processed again after the missing settings are added. the system gives the IDoc involved the status 29. Successful IDoc inbound processing involves four obligatory status values: Figure 109: Status Values for Error-Free IDoc Inbound Processing • • • • 50: 64: 62: 53: IDoc added IDoc is ready for transfer to the application IDoc transferred to application Application document posted 2005/Q4 © 2006 SAP AG. an IDoc also goes through various phases. which is kept for documentation purposes. This status is also assigned if a global company code or a business area is missing. IDoc Inbound Processing In the inbound processing. even in its incorrect form. the system logs this as editing of the IDoc and creates a copy of the original.BIT300 Lesson: Error Analysis and Handling If outbound partner profiles are competely missing or incomplete. 193 .

Note: In scenarios such as this. Error-Handling and Archiving BIT300 Whether or not the receiving system transfers an IDoc to the application at once depends on the settings in the respective inbound partner profile.Unit 5: Monitoring Data Distribution. Required are the RFC authorizations for the function groups EDIN and ERFC (authorization object S_RFC) and the authorization for the authorization object B_ALE_RECV with the desired message types. the IDoc is only transferred to the application after the program RBDAPP01 is executed. The user for the background processing of the program RBDAPP01 must have authorizations to read the IDoc from the database (authorization object S_IDOCMONI) and the application authorizations to post the data by means of the application program. All rights reserved. If the Start in background job option is selected there. If errors occur in the IDoc inbound processing. the sender system sets one of the following status values: Figure 110: Status Values for Incorrect IDoc Inbound Processing • • • • • 56: 60: 61: 65: 51: Incorrect IDoc added Syntax error in IDoc (inbound) Further processing despite syntax error (inbound) Error in ALE service Application document not posted 194 © 2006 SAP AG. 2005/Q4 . the RFC user only requires the authorization to store IDocs on the database.

If the indicator Terminate the processing if syntax error occurs is set in the inbound partner profile. then the IDoc is given status 51 in most cases. If an IDoc with a syntax error with status 60 is processed further. an IDoc with a syntax error is given the status 60. such an IDoc can also be processed “in the foregound”. Depending on the application. The system sends the responsible agent a work item on the basis of the workflow task assigned to the process code EDIY. but they all indicate an error in the processing of the IDoc data in the application program itself. it is first given status 61 and then status 64. If the transfer of the IDoc data to the corresponding application fails. All rights reserved. then the incorrect IDoc is moved directly from status 60 to status 64. meaning interactively. A number of logistical applications have their own status (52 and 54). The system sets status 65 if a global company code or a business area is missing. The end of this lesson you will find suggestions for systematic error analysis. Missing or incorrect values can then be added or corrected manually. If the syntax check is not activated. Work items are sent to the responsible agents. 195 .BIT300 Lesson: Error Analysis and Handling Status 56 usually tells you that the inbound partner profile is missing for the message type. 2005/Q4 © 2006 SAP AG. with information on resolving errors.

In a scenario in which change pointers are to be evaluated. In all other cases. 2005/Q4 . Analyze the type of the outbound processing. All rights reserved. If the IDoc is to be created using message control. Is the scenario involved a master data distribution scenario. Check Continued on next page 196 © 2006 SAP AG. you proceed with step 3. then you proceed as follows: Choose IDoc Interface / Application Link Enabling → Modelling and Implementing Business Processes → Master Data Distribution → Scope of Data for Distribution → Message Reduction → Create Reduced Message Type (transaction BD53). Select the reduced message type and choose the button Activate change pointers.Unit 5: Monitoring Data Distribution. you can proceed directly to step 4. This program triggers the generation of IDocs from change pointers. in which change pointers are to be evaluated? You can use transaction SALE to find message types for ALE scenarios that work with change pointers by choosing IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Master Data Distribution → Replication of Modified Data. You can check the change pointers in the database table BDCPV. However. Make sure that the correct message type is selected in the selection screen. You know the message type of the scenario and the program with which the IDoc outbound processing is carried out. If you have created a reduced message type which is not in this list for a message type that is in this list. Error-Handling and Archiving BIT300 Problem: The IDoc Was Not Created Prerequisites An ALE scenario has been configured. then proceed with step 2. Is the IDoc to be created by means of the message control? You can use transaction WE64 to find the message types for IDoc scenarios that were created using the message control. no IDoc has been created in the sending system. You can view the change documents with the program RSSCD100. 2. Procedure 1. Has the program RBDMIDOC been started? The program RBDMIDOC is usually scheduled as a regular background job. there should be change documents as well as change pointers. Master data distribution using the SMD tool Has a change pointer been set for the change document whose data is to be distributed in an IDoc? If the master data has been changed since the last time IDocs were created from change pointers.

message type. Call up the document whose data should have been sent in IDoc format in the display or change mode and check the result of the message determination. the transmission medium A (ALE) or 6 (EDI) must be entered in the determination record. you can also search for determination records using transaction NACE.2 or 3. IDoc generation using message control Was the message determination and processing successful? The message determination is usually linked to an application document. always check the partner function too: Does it match the partner function of the determination record? Have outbound parameters been created for the respective message type? Is the required data entered in these parameters (application. the message is not immediately processed by the program RSNAST00. Search for the partner: In EDI scenarios. such as a purchase order. If the message was found. Check whether the message was found. The program triggers the generation of IDocs from messages in the message control. you can also start this program using transaction BD21. For test purposes. and in ALE scenarios for partner type LS (logical system). Do corresponding partner profiles exist? Call the transaction WE20 or choose Tools → ALE → Runtime Settings → Partner Profiles. Is the distribution model maintained correctly? Continued on next page 2005/Q4 © 2006 SAP AG. All rights reserved. an order or an invoice. and whether it was processed successfully (green traffic light symbol).BIT300 Lesson: Error Analysis and Handling whether the report was scheduled with the correct variant. If you are not familiar with the application involved. then the program RSNAST00 must be started in a separate step. and when it was last run. It is possible that there is no corresponding determination record for the key combination in the document. Are the condition records maintained correctly? If the expected message was not found in the document. you can call up this information with the menu entries Goto or Extras. check the transmission medium and the transmission time. If the transmission time in the condition record is not 4. check the determination record (condition record) for the message type. In most documents. but at a later date by means of a background job or an application-specific transaction. 4. 197 . In EDI scenarios. but not processed correctly. In purchasing documents. but 1. To generate IDocs. process code)? Has the program RSNAST00 been started? Often. 3. the partner must be created for partner type LI (vendor) or KU (customer). Usually you can also call up a processing log for display from the details of the message determination. there is a separate button Messages.

check whether a filter group is created in the view involved. add the missing view or the missing message type or missing BAPI in the maintenance system and transport or distribute this view to the systems involved. If necessary. then the filtering is performed by means of the classification. If the conditions for the field values are not fulfilled. Is the model view still valid? The validity of model views is limited.Unit 5: Monitoring Data Distribution. Is the filtering performed by means of classification? Is the class in the sending system assigned to the logical system of the receiver? Is the master data to be distributed assigned to the distribution class? In the distribution model. If the indicator Dependent on class membership is set. Then choose IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Master Data Distribution → Distribution Using Object Classes → Assign Classes to Receiving Logical System. no communication IDoc is created. check in the master data to be distributed whether the view Classification is created. Error-Handling and Archiving BIT300 Does the distribution model of the sending system contain a view with the required message type or BAPI? If your distribution model contains many views. then the values entered for the filter object must match the values transferred with the IDoc from the application. If necessary. All rights reserved. check whether your views can still be used at the present time. If filter objects are entered. double-click the name of the model view. and whether it refers to the correct class. you can also use the menu entry Edit → Filter Display or the button Filter model display to make a selection based on message type or business object type. To do this. It is possible that the filter object refers to a required segment in the IDoc basic type. 2005/Q4 . Are filters defined for the message by means of filter objects? Check the affected view in your distribution model. If necessary. 198 © 2006 SAP AG.

The change mode appears. the field Port provides you with the name of the port which was determined by means of the partner profile. For test purposes you can start the report manually or select the IDoc in the monitor (transaction BD87) and trigger the sending by means of the button Execute. If not. In the Technical short info area. an incorrect port is entered in the partner profile. If.BIT300 Lesson: Error Analysis and Handling Problem: The IDoc was Created. you can manually change the value of the port in the control record. Procedure 1. 3. Choose the Partner tab page and enter the correct port in the field Port. Check the attributes of this port using transaction WE21. To do this. Error in the data transfer to the port (status 02): In the control record of the IDoc. If the port has been configured incorrectly. then you correct the partner profile. In IDocs that have already been sent. 2005/Q4 © 2006 SAP AG. An IDoc has been created in the sending system. Outbound partner profile is missing (status 29): Use transaction WE20 to check whether the sending system has an outbound partner profile with the receiving system for the message type involved. Check whether this program is planned as a job for the background processing and whether the message type involved is scheduled in a variant. on the other hand. double-click the control record in the IDoc display and choose Control Record → Display -> Change. but was not Sent Prerequisites An ALE scenario has been configured. All rights reserved. generate the missing partner profile from the corresponding view of the distribution model and check the settings or create the partner profile manually. 2. but it was not sent. 199 . You can then resend the IDoc. Call up the IDoc for display. IDoc remains in status 30: Use transaction WE20 to check in the sending system the outbound partner profile with the receiving system for the message type involved. check which port it was sent through. you can correct this error here and send the IDoc again. the program RSEOUT00 must be executed first. If the output mode Group IDocs is selected there.

Error-Handling and Archiving BIT300 Problem: The IDoc was Successfully Sent.Unit 5: Monitoring Data Distribution. You can use this button to navigate directly into the tRFC queue (transaction SM58). If such an ID exists. then the IDoc was transferred to the fRFC level. There. If a Display button appears. select the entry and choose Edit → Execute LUW. 200 © 2006 SAP AG. you can use the object link to check whether a tRFC ID is entered. You can use a local setting to override this system setting in every RFC destination. then the data packet is still in the tRFC queue. Therefore. Depending on the settings. 2. Examine the error message for the corresponding entry in the fRFC queue. Choose Execute to go from the selection screen to the list and choose Information → System Setting to navigate to a dialog window with the desired information. From the IDoc display. 2005/Q4 . choose Destination → tRFC Options. by means of transaction SM59). the RFC level starts this processing automatically after a few minutes. Hint: You can check the general settings for the tRFC using transaction SM58. The IDoc has the status 03 in the sending system. you can manually trigger the processing in the tRFC queue: To do this. you must also check the RFC destination in the sending system and the authorizations of the user entered there in the receiving system. Report RBDMOIND does not result in a status change. When you have resolved the error. Hint: One cause could be authorization restrictions for the user entered in the RFC destination. Changing the properties can therefore influence other ALE scenarios. but it was not Received by the Receiving System Prerequisites An IDoc was sent to a receiving system through a tRFC port. All rights reserved. Note that usually the RFC destination and the RFC user are used by various programs. The user could possibly be blocked because of multiple incorrect logons. Navigate to the display of the RFC destination (for example. but it did not reach the receiving system. Procedure 1. or there may be an incorrect password stored in the RFC destination.

No (active) partner profile exists (status 63): Continued on next page 2005/Q4 © 2006 SAP AG.BIT300 Lesson: Error Analysis and Handling Problem: The IDoc was Received by the Receiving System. If necessary. 201 . 3. If the IDoc is always to be transferred to the application immediately. Choose System → Services → Jobs → Job Overview. then you set the indicator Start immediately in the partner profile. enter RBDAPP01. you can determine from the control record of the incorrect IDoc which logical system was the sender. This program can be scheduled as a background job. you add it manually or have it generated by the system from the distribution model. and in the field ABAP program name. then there is an incorrect process code in the partner profile. 4. then the IDoc is generally transferred to the application by the program RBDAPP01. but was not Posted Prerequisites An IDoc was received by the receiving system. In general. Inbound partner profile is missing (status 56) If the status text states that the partner profile is missing. IDoc is in status 51: Check whether there is more detailed information on the cause of the error in the long text of the error message for the status. you require knowledge of the application for the error search. IDoc remains in status 64 (the IDoc is ready to be transferred to the application): If the indicator Start through background program is set in the partner profile. Procedure 1. Then choose the button Execute: You are told when and at what intervals the program has been scheduled as a background job. Two technical errors are often the cause of incorrect IDoc processing in the application: • Incorrect process code in the partner profile: If the status text / error text is “No function module for inbound process code xy”. Authorizations missing: Does the RFC user (for immediate processing) or the batch user (for background processing) have the required authorizations? • You can have incorrect IDocs with status 51 processed after the error is resolved by executing the program RBDMANI2 (Posting incorrect IDocs). For testing purposes. All rights reserved. but it does not have status 53 yet. you can start it manually or you can transfer the IDoc from the status monitor directly to the application. 2.

All rights reserved. Error-Handling and Archiving BIT300 You have the option to set the partner profile for a partner to inactive. 2005/Q4 . In the receiving system.Unit 5: Monitoring Data Distribution. by entering transaction WE20 and calling the partner profiles for display and choosing the tab page Classification on the header level. You can change the value to A (active). If the partner status is “I”. then the partner is inactive. 202 © 2006 SAP AG. check the partner profile with the sending system.

3. The data transfer was not always successful. you will be able to: • Find the causes of errors in the IDoc processing • Correct these errors Business Example In the logical system CORE . but was not sent. All rights reserved. you have created or changed master data and distributed it to the receiving systems PRODUCTION and SALES. 203 .BIT300 Lesson: Error Analysis and Handling Exercise 12: Error Analysis and Handling Exercise Objectives After completing this exercise. 2. You check the situation in the status monitor and resolve the errors. Task 1: Analysis of the IDoc Status Values In the case of incorrect IDoc processing. Which status values belong to which (error) situation? 1. The IDoc was successfully sent. you can analyze the status values of the IDoc involved to determine in which part of the process an error occurred. but it was not received by the receiving system. The IDoc was not created. Continued on next page 2005/Q4 © 2006 SAP AG. The IDoc was created.

Call the incorrect IDoc for display. Send the changed material to the logical system PRODUCTION and display the outbound IDoc in the status monitor. switch to the change mode. All rights reserved. use the input help for the field DIVISION. The IDoc was received by the receiving system. and replace the value 99 in the field DIVISION with a value defined in the system PRODUCTION. 3. 2. What status does the outbound IDoc have? What status does the inbound IDoc have in the receiving system? Hint: Use the function “Monitor IDocs” in the system CORE to gain information about the inbound processing in the system PRODUCTION. In the logical system CORE. In this exercise you will learn how to postprocess an incorrect IDoc so that its data can be posted in the application. 1. The IDoc is given the status 51 (application document not posted). but was not processed yet. Task 2: Postprocessing of an Incorrect IDoc The IDoc inbound processing can fail because of discrepancies between the application-specific Customizing settings in the sending and receiving systems. add the division 99 to your material master MATALE-##. Hint: In doing this. In the system PRODUCTION. 2005/Q4 . Make a note of the number of the IDoc: __________ What conclusion do you draw from the error message? What options do you have for solving the problem? 4. call up and display the IDoc in the status monitor and find out the cause of the processing error. 5.Unit 5: Monitoring Data Distribution. Continued on next page 204 © 2006 SAP AG. Error-Handling and Archiving BIT300 4.

In such cases. 2. or is not desirable. you now set a deletion flag for the subsequent archiving. 1. 2005/Q4 © 2006 SAP AG. Task 3: Setting a Deletion Flag for an IDoc In some cases. Send your changed material MATALE-## from the system CORE to the system PRODUCTION again and call up the status monitor there. you can flag the IDoc for deletion so that it can be archived at the next opportunity. it is no longer possible. 205 . Instead of editing it. In the system PRODUCTION. your IDoc has the status 51 again. What happens? Check the status records of your IDoc. Now try to transfer the IDoc to the application again.BIT300 Lesson: Error Analysis and Handling 6. All rights reserved. to handle an error by correcting system settings or editing the IDoc. You want the IDoc to be archived unchanged.

All rights reserved. Answer: No status value: An IDoc only gets a status once it has been saved on the database. Answer: Both status 30 (IDoc is ready to be sent) and status 02 (Error in the data transfer to port) could apply here. Select the view Basic data 1 and choose Enter. enter 99 and save the change. The IDoc was successfully sent. In the field Division. if the program RBDMOIND was executed after it was sent. Error-Handling and Archiving BIT300 Solution 12: Error Analysis and Handling Task 1: Analysis of the IDoc Status Values In the case of incorrect IDoc processing. Continued on next page 206 © 2006 SAP AG. a) b) c) d) Choose Logistics → Materials Management → Material Master → Material → Change → Immediately. but was not sent. Answer: If the ALE Audit is set up. In this exercise you will learn how to postprocess an incorrect IDoc so that its data can be posted in the application. but was not processed yet.Unit 5: Monitoring Data Distribution. The IDoc is given the status 51 (application document not posted). 1. The IDoc was received by the receiving system. 3. you can analyze the status values of the IDoc involved to determine in which part of the process an error occurred. Answer: The IDoc has the status 03 (data passed to port OK) and also. The IDoc was not created. the status 12 (sending process OK). Which status values belong to which (error) situation? 1. In the receiving system the IDoc has the status 64 (IDoc is ready for transfer to the application). the IDoc in the sending system has the status 39 (IDoc in target system). Enter the material number MATALE-## and choose Enter. add the division 99 to your material master MATALE-##. In the logical system CORE. but it was not received by the receiving system. 2. 4. Task 2: Postprocessing of an Incorrect IDoc The IDoc inbound processing can fail because of discrepancies between the application-specific Customizing settings in the sending and receiving systems. 2005/Q4 . The IDoc was created.

Enter your message type ZMATMAS## and choose Execute IDoc has the status 03. call up and display the IDoc in the status monitor and find out the cause of the processing error. In the system PRODUCTION. Double-click on the entry with the red traffic light (Problem Class: Very Important): You will see that the value 99 is not permitted for the field MARA-SPART (division). 3. Choose Tools → ALE → ALE Administration → Monitoring → IDoc Display → Status Monitor. Make a note of the number of the IDoc: __________ a) b) c) d) Choose Tools → ALE → ALE Administration → Monitoring → IDoc Display → Status Monitor. Select the entry underneath the message type and choose the Display IDocs button. Leave the log and the display of the error long text. In the field Ext. number of the application log. : The c) d) e) Select the entry underneath the message type and choose the button Monitor IDocs: In the system PRODUCTION. Send the changed material to the logical system PRODUCTION and display the outbound IDoc in the status monitor.BIT300 Lesson: Error Analysis and Handling 2. 207 . the IDoc has the status 51. Enter your material MATALE-##. Select the IDoc and choose the button Display status long text: You will see that an application log has been written from which you can obtain more detailed information about the problem. your reduced message type ZMATMAS## and the logical system PRODUCTION and choose Execute . All rights reserved. What status does the outbound IDoc have? What status does the inbound IDoc have in the receiving system? Hint: Use the function “Monitor IDocs” in the system CORE to gain information about the inbound processing in the system PRODUCTION. Continued on next page e) f) g) 2005/Q4 © 2006 SAP AG. enter this number and choose Execute . Enter your message type ZMATMAS## and choose Execute . Copy the number of the log and click on Execute. a) b) Choose Tools → ALE → Master Data Distribution → Cross-Application → Material → Send.

What conclusion do you draw from the error message? What options do you have for solving the problem? Answer: Division 99. Open the tab page Data records and double-click on the symbol to the left of the segment E1MARAM. Navigate to the field DIVISION and call up the input help. switch to the change mode. you edit your IDoc. a) b) c) d) Choose the button Display IDocs. leave the data record editor. Error-Handling and Archiving BIT300 4. Save this change.Unit 5: Monitoring Data Distribution. which you entered in the material master in the sending system before the distribution. Use a double-click to accept one of the entries in the list of permitted values. Call the incorrect IDoc for display. Hint: In doing this. All rights reserved. the Customizing settings of the two systems are inconsistent. is not defined in the receiving system. and then leave the IDoc display. Now you can either also define division 99 in the receiving system and have the IDoc processed again. Continued on next page 208 © 2006 SAP AG. or you can edit the IDoc and have a value defined in the receiving system for the field Division transferred to the application. use the input help for the field DIVISION. Therefore. In the exercise. Choose Display Data Record -> Change and confirm the information that your changes have been saved in the database with Enter. 5. 2005/Q4 . and replace the value 99 in the field DIVISION with a value defined in the system PRODUCTION.

: The Select the entry for your edited IDoc and choose the button Process: The status of the IDoc has been changed from 69 to 53. the system keeps a copy of the incorrect IDoc as it was before the editing. it is no longer possible. Send your changed material MATALE-## from the system CORE to the system PRODUCTION again and call up the status monitor there. your IDoc has been reset to status 51 and then transferred to the application again. in order to distribute your material MATALE-##. Choose the button Display IDoc again and open the folder Status records: You see that after the editing. you can flag the IDoc for deletion so that it can be archived at the next opportunity. and which number the copy with the original data has. In such cases. select your IDoc and choose the button Display relationships: A screen appears with the two IDoc numbers. Call up the edited IDoc for display again. The long text is: “This IDoc has been stored as the original of an edited document. You want the IDoc to be archived unchanged. or is not desirable. Find the incorrect IDoc in the system PRODUCTION in the status monitor (see step 3): It has the status 51 again. What happens? Check the status records of your IDoc. Continued on next page 2005/Q4 © 2006 SAP AG. open the folder of the status records and double-click on the symbol to the left of the status long text for the status 69: You will see which user edited this IDoc in which segment. a) b) Proceed in the way described in the second task in step 2. to handle an error by correcting system settings or editing the IDoc. Now try to transfer the IDoc to the application again. 1. Leave the IDoc display. Go from the IDoc display back to the status monitor: The system has created a second IDoc and assigned to it the status 70 (original of an IDoc that has been edited).” Thus. d) e) f) Task 3: Setting a Deletion Flag for an IDoc In some cases. 209 .BIT300 Lesson: Error Analysis and Handling 6. All rights reserved. a) b) c) Go back to the status monitor and choose Refresh IDoc display system sets the status 69 (IDoc has been edited).

All rights reserved. no further processing). Check the result in the status monitor: The IDoc now has the status 68 (error. a) b) c) Select your IDoc in the status monitor and choose Edit → Restrict and process. Remove the indicator Background proc. Choose the button Deletion flag and confirm the confirmation prompt with Enter: A message appears that your IDoc has been flagged for deletion. 2005/Q4 . d) 210 © 2006 SAP AG. your IDoc has the status 51 again. Instead of editing it. Error-Handling and Archiving BIT300 2. and choose Execute . you now set a deletion flag for the subsequent archiving.Unit 5: Monitoring Data Distribution. In the system PRODUCTION.

211 . All rights reserved.BIT300 Lesson: Error Analysis and Handling Lesson Summary You should now be able to: • Perform error analysis using the ALE status monitor • Resolve errors in the IDoc processing 2005/Q4 © 2006 SAP AG.

2005/Q4 .Unit 5: Monitoring Data Distribution. If errors occur. IDoc Inbound Processing Using SAP Workflow A process code for the IDoc inbound processing can refer to a task or a workflow. an administrator or an employee of the business department should be informed by means of the SAP Workflow. It is not connected to specific applications. you will be able to: • • • • Check workflow settings for the error handling of IDocs Understand the settings for process codes Describe the notification concept Monitor the IDoc processing using the SAP Workflow Business Example You have configured ALE scenarios in your system landscape. as an alternative to inbound function modules. 212 © 2006 SAP AG. you can use the functions of the SAP Workflow for the IDoc inbound processing. for monitoring the inbound and outbound IDocs during ongoing operation. Lesson Objectives After completing this lesson. but also beyond system boundaries. Error-Handling and Archiving BIT300 Lesson: SAP Workflow in ALE Environment Lesson Overview In this lesson you learn how to use the SAP Workflow for IDoc inbound processing. error handling and active monitoring. and for processing incorrect IDocs. In ALE scenarios. The primary aim is to provide the correct agent with a task at the correct time. but functions independently in all applications. Using the SAP Workflow in ALE Scenarios The SAP Workflow is a tool for the automation of business processes within an SAP system. All rights reserved.

New (outbound) IDocs are to be sent on the basis of the inbound IDoc. the IDoc is edited. the application document is to be passed to an employee for checking. to which a function module is assigned for the transfer of data to the application. however. You can define such a workflow freely and assign it to the desired process code. Examples of the use of such workflows are: • You want to generate an application document automatically from the IDoc. the order is not to be created automatically in the receiving system. a workflow can be started by means of a process code. but can also make changes. The employee can not only check the data. In this case. The receipt of an IDoc is to trigger some other action. In this way. if necessary. Such cases use the process code ORDE_BY_WORKFLOW. the specified process code is ORDE. 2005/Q4 © 2006 SAP AG. For the usual inbound processing of IDocs with purchase order data. In certain cases. not the application document. • • • • You will find an example of a workflow-based IDoc inbound processing in the ALE scenario “Stock Transfer Between Distributed Systems”. but rather by a business department employee.BIT300 Lesson: SAP Workflow in ALE Environment Figure 111: IDoc Inbound Processing Using Workflow For the inbound IDoc. changed before the application document is created. All rights reserved. The IDoc is to be checked and. Subsequently. which refers to a workflow and not to a function module. 213 . the IDoc inbound processing can be performed interactively. The IDoc or the application document is to be forwarded to one or more agents. only after the puchase order data has been checked.

The task “ActiveIDocMonitoring” (TS4508518) is started and a work item is sent to the recipient that is determined. and they are provided with the IDoc involved.Unit 5: Monitoring Data Distribution. If an organization model is maintained in your company. 2005/Q4 . All rights reserved. In the case of an exception. You can use the program RSEIDOCA to perform the active monitoring. Error Handling with SAP Workflow The exception and error handling in the ALE environment is always realized through a workflow. If the currect status value of an IDoc corresponds to the status in the selection screen. 214 © 2006 SAP AG. If the number of critical IDocs exceeds the threshold value entered. you must define a variant (menu path: Tools → ALE → ALE Administration → Services → Periodic Processing → Schedule IDoc Monitoring with Workflow Connection). along with users you can also assign positions or organization units as agents (see below). this IDoc is evaluated as critical. For this purpose. During the selection run. the IDocs that fulfill the selection criteria are evaluated. Error-Handling and Archiving BIT300 IDoc Monitoring with Workflow Connection The active monitoring of inbound and outbound IDocs is usually scheduled as a periodic background job. then this situation is evaluated as critical and a status confirmation is triggered automatically. The monitoring evaluates whether the number of IDocs with a particular status exceeds a previously defined threshold value. Figure 112: Error Handling with Workflow The respective agents responsible are entered in the partner profiles or the settings for the IDoc administration. one or more agents are informed of the error situation by means of a work item. and the general potential agents are entered in the task definition.

there are individual tasks.BIT300 Lesson: SAP Workflow in ALE Environment Behind the exception handling cases of the IDoc interface that are delivered by SAP. the agents of the corresponding task immediately receive an express message on their screens when there is a new work item in their inbox. They are started by means of the process codes of the error handling. The figure below shows the exception handling in the IDoc outbound processing: Figure 113: Process Codes for Errors in the Outbound IDoc 2005/Q4 © 2006 SAP AG. If you set the express indicator in the detailed settings of a process code. These process codes are subdivided into system and status process codes. All rights reserved. 215 .

It replaces the process code EDIS. EDIX reacts to an outbound IDoc for which a syntax error has occurred. Corresponding process codes are used to start tasks for which a work item is sent to the agents that are determined. You can define additional exception handling cases for the status confirmation and identify them using process codes. EDIO reacts to an outbound IDoc for which a general processing error has occurred. EDIN is used for outbound processing by means of message control: You can use the NAST record to branch to the application document from the work item. you must explicitly perform the change to EDIR in IMG. Error-Handling and Archiving BIT300 • • • • • • The process code EDIM applies to outbound and inbound processing. The inbound exception handling corresponds to the outbound exception handling. Hint: The process code EDIR is new to SAP R/3 4. During an upgrade. All rights reserved. It applies when it has not been possible to create an IDoc yet. 216 © 2006 SAP AG. The work item sent when the corresponding task is started allows you to correct the error and trigger the processing of the IDoc stack again. 2005/Q4 . then a task for the error handling is also started by means of the status process code EDIS. EDIP reacts to an IDoc stack (batch run of the report RSEOUT00) for which a processing error has occurred which affects all the IDocs to the same degree (example: a non-existant port). With the status process code EDIR you can also trigger the outbound processing again after you have corrected the error. If an error status is confirmed by the external system.Unit 5: Monitoring Data Distribution.6A.

This technique is used. All selected agents now receive the notification as a work item (as a concrete "instance" of the workflow task) in their integrated inbox. In the exception handling. Instead of the relatively rigid reaction by means of process codes. 217 . If errors occur while the application documents are being posted (for example. MATMAS_error or ORDERS_error. For IDocs created by BAPI calls. and therefore further processing of the work item with errors. This task is also started by an event. are only possible from this inbox. for example. a different technique is used for the error handling. in the case of an error. because Customizing settings are not synchronous). If it was not possible to read a status file of the external system. 2005/Q4 © 2006 SAP AG. the task IDOC_APPL_Er (TS20000051) provided by SAP is used. the application uses the more flexible event concept. In the case of an exception. the process code EDIL becomes active. an event is triggered which can start 1 to n tasks and send corresponding work items. You can use the IDoc type TXTRAW01 to send messages of your choice in text format. Note: The tasks supplied by SAP for errors during posting in the application usually have the name suffix “error” . EDII and EDIY correspond to the outbound process codes EDIO and EDIX. if an exception has occurred in the external system and the SAP system is to be informed of this exception.for example. All rights reserved. the error message of the SAP system is displayed. the process code EDIM applies when it has not been possible to create an IDoc. "Repairs".BIT300 Lesson: SAP Workflow in ALE Environment Figure 114: Process Codes for Errors in the Inbound IDoc • • • • As in the outbound processing.

for situations in which the system cannot find any partner profiles. an inbound IDoc with a syntax error). you should nominate an agent in the general settings for the IDoc administration. For this purpose. you must assign the partner a permitted agent for the error and exception handling. the system requires two quantities of agents.Unit 5: Monitoring Data Distribution. If no specific agent exists for the message type which contains the error. call transaction SALE and choose IDoc Interface / Application Link Enabling (ALE) → Basic Settings → IDoc Administration. Figure 115: Determining the Work Item Agents In every partner profile for ALE or EDI scenarios. Therefore. the “potential” and the “permitted” agents. the system then tries to determine the IDoc administrator. then the agent assigned to the partner is notified. If there are no partner profiles with the partner. In the case of an error (for example. 218 © 2006 SAP AG. the system first tries to determine an agent for the combination of partner and message type. In order to determine the correct agent for the work item. The intersection of these quantities filters out the recipients of the work item. You can also enter for each message type a permitted agent that differs from this higher-level agent. A work item is created as an instance of this task. a task is started by means of a process code. All rights reserved. 2005/Q4 . so that an employee will be notified if an error occurs. Error-Handling and Archiving BIT300 Authorization Concept In the case of an exception.

the work item is deleted from the inboxes of the other recipients. Then the system determines the intersection of the potential and permitted agents on the basis of the partner profiles and the IDoc Administration. All rights reserved. The tasks of the IDoc error handling are classified as general tasks in SAP R/3 or SAP ECC. The item provides him with direct access to the incorrect IDoc. The use of elements of the organization management increases the flexibility for organizational changes. With this setting. If there are a number of recipients for a work item. and he can begin the error processing immediately. in the Workflow Customizing (transaction SWU3). the workflows for IDoc processing supplied by SAP which are located in the task group TG74500044.BIT300 Lesson: SAP Workflow in ALE Environment Figure 116: Agent Search in the ALE Environment When a task is started. They can thus be processed by all users. every user is a potential agent. The restriction to the relevant agents for IDoc errors is effected by an intersection with the permitted agents for the IDoc interface (see above). are declared to be “general”. You can enter users or elements of the organizational management. such as positions or organization units. on the basis of the task definition. All the permitted agents receive the work item for the task. as soon as the first agent accesses it. as permitted agents. a rule entered for the task is used to determine the group of potential agents. The work item is put into the inbox of the recipient's SAP Business Workplace. 2005/Q4 © 2006 SAP AG. 219 . Maintenance of an Organizational Structure In the automatic Workflow Customizing (transaction SWU3). and all the permitted agents receive the work item.

assign a whole group of agents to the respective level by entering a correspondingly occupied organization unit or position. There. PPOS). Processing Work Items in the SAP Business Workplace The SAP Business Workplace integrates workflow functions into general office functions.Unit 5: Monitoring Data Distribution. you assign users to the positions as position holders. along with work items. In the simple maintenance. Note: The use of such organizational models is independent of the use of the application mySAP ERP Human Capital Management. you can. The basic system provides everyone with the required tool (simple maintenance of the organizational management – transactions PPOC. The agents receive the work items intended for them in the inbox of their Business Workplace. you create the required positions and assign them to the desired organizational units. 2005/Q4 . In the last step. for example. starting with the root organizational unit. All rights reserved. you also receive mails. documents and deadline messages. 220 © 2006 SAP AG. You reach the Business Workplace through transaction SBWP. by means of a simple reassignment. In a further step. This saves you the effort of searching all the levels of the IDoc interface. Error-Handling and Archiving BIT300 Figure 117: Organizational Structure If you use elements of an organizational model to define the permitted agents. You can also switch to the organizational responsibility centrally in the maintenance of the organizational model. PPOM. you create the hierarchical structure of your organizational model.

they can then navigate directly to their Business Workplace and react quickly. Tools of the Workflow Administration When you are working with workflow support. You double-click to start the execution of the selected work item. you can also use tools of the workflow administration if required . 2005/Q4 © 2006 SAP AG. 221 . no matter where they currently are in the SAP system. You may also want to search directly for work items whose deadline has been exceeded. it is deleted from the inboxes of the other recipients. If one of the recipients has called up the work item for processing in this way. All rights reserved. you choose the folder Inbound and the area Workflow to go to the worklist display. then the recipients of the work items receive an express notification.BIT300 Lesson: SAP Workflow in ALE Environment Figure 118: SAP Business Workplace From there.for example. or if a workitem has no recipient and the administrator who finds it is to process it himself or forward it to the actual person responsible. if a work item has an incorrect status and you want to restart the workflow after removing the cause of the error. If an express indicator is set in the settings for the process codes. You will see all the active work items. From the express notification.

All rights reserved. You can then branch from the work item found to the IDoc display. The most widely-used tools are the following transactions: • • • • Transaction SWI1 (selection report for work items) for finding incorrect work items Transaction SWPR (workflow restart after error) for the restart of an incorrect work item after the error has been resolved Transaction SWI2_DEAD (work items with exceeded deadline) for finding work items with exceeded deadlines Transaction SWI2_ADM1 (work items without agent) for finding work items with no recipient The transactions listed are for finding work items for specific tasks. 2005/Q4 .Unit 5: Monitoring Data Distribution. you require tools in order to quickly detect and resolve technical or organizational errors. thus enabling you to find IDoc-relevant work items. Therefore. Error-Handling and Archiving BIT300 Work items that were created within the IDoc exception handling are critical. 222 © 2006 SAP AG.

All rights reserved. 2005/Q4 © 2006 SAP AG. Send the master record of the vendor T-K515D## from the system CORE to the system PRODUCTION. add an entry for the message type ZCREMAS##. and the receiver is PRODUCTION. If errors occur. Task: Transfer the message type ZCREMAS## into your model view TRAINING##. 3. What status does it have? Make a note of the number of the IDoc: ________________ Hint: Use the message type ZCREMAS##. What status does the IDoc have now? 2. Find the corresponding work item and remove the error by means of the work item processing. 4. 1. and add the missing settings. determine the cause of the error. The sender is the logical system CORE. Then try to start the processing of the IDoc again. Generate the outbound partner profiles for this message type and distribute your model view again to the system PRODUCTION. Check the inbound IDoc in the status monitor of the receiving system. In the logical system CORE. you will be able to: • Process an incorrect IDoc from a work item Business Example You have configured ALE scenarios in your system landscape. Display the IDoc from the attachment of the work item.BIT300 Lesson: SAP Workflow in ALE Environment Exercise 13: Processing an Incorrect IDoc from a Work Item Exercise Objectives After completing this exercise. an administrator or an employee of the business department should be quickly informed by means of a workflow. Check in the system PRODUCTION whether your inbox in the SAP Business Workplace contains a work item for this IDoc. in your model view TRAINING##. Then send a vendor master and check the inbound IDoc. generate the outbound partner profiles with the partner system PRODUCTION and distribute the model view again. 223 .

2005/Q4 . All rights reserved. and in the menu of the distribution model. in your model view TRAINING##. and the receiver is PRODUCTION. a) Call the transaction SALE and choose IDoc Interface / Application Link Enabling (ALE) → Modelling and Implementing Business Processes → Maintain Distribution Model and Distribute Views. Error-Handling and Archiving BIT300 Solution 13: Processing an Incorrect IDoc from a Work Item Task: Transfer the message type ZCREMAS## into your model view TRAINING##. b) c) d) e) Continued on next page 224 © 2006 SAP AG. Select your model view TRAINING##. Then send a vendor master and check the inbound IDoc. The sender is the logical system CORE. Enter the message type ZCREMAS## and choose Enter. add an entry for the message type ZCREMAS##. choose Execute : Outbound parameters are created for the message type ZCREMAS##. generate the outbound partner profiles with the partner system PRODUCTION and distribute the model view again. choose Edit → Model View → Distribute. choose Environment → Generate Partner Profile and in the next screen. In the logical system CORE. Find the corresponding work item and remove the error by means of the work item processing. Leave the log display. Switch to the change mode (Switching between display and change mode ) and in your model view TRAINING## select the entry for the receiving system PRODUCTION and choose the button Add message type. Deselect the entry for the logical system SALES and choose Enter.Unit 5: Monitoring Data Distribution. 1. Save your changes. Select your model view TRAINING## and in the menu of the distribution model. Generate the outbound partner profiles for this message type and distribute your model view again to the system PRODUCTION.

In the field Account number of the vendor. Check the inbound IDoc in the status monitor of the receiving system. : Your c) d) e) Select the entry and click on the Display IDocs button. A master IDoc and a communication IDoc are created. enter PRODUCTION and choose Execute .BIT300 Lesson: SAP Workflow in ALE Environment 2. enter T-K515D##. All rights reserved. 225 . Send the master record of the vendor T-K515D## from the system CORE to the system PRODUCTION. enter ZCREMAS## and in the field Target system. a) b) Choose Tools → ALE → Master Data Distribution → Cross-Application → Vendor → Send. Continued on next page 2005/Q4 © 2006 SAP AG. What status does it have? Make a note of the number of the IDoc: ________________ Hint: Use the message type ZCREMAS##. In the PRODUCTION system. Make a note of the number of the IDoc. in the field Message type. choose Tools → ALE → ALE Administration → Monitoring → IDoc Display → Status Monitor. Enter your message type ZCREMAS## and choose Execute IDoc has the status 03 (incorrect IDoc added).

Unit 5: Monitoring Data Distribution. Click on the text “Execute function”. Error-Handling and Archiving BIT300 3. close the display of the status long text and leave the IDoc display. choose Refresh IDoc display : The IDoc now has the status 53 (application document posted). and in the next screen (the status display of the IDoc) choose the button IDoc display. You will find a description of the procedure in step 2 c). If your status monitor was still open in another mode. Choose Inbox → Workflow → Grouped according to content. choose Create inbound parameter . All rights reserved. Confirm the message with Enter and choose Refresh has been deleted from your inbox. and in the inbound parameter area. The system takes you to the transaction for maintaining partner profiles. Search the list for your IDoc from step 2 e) and select it so that your work item appears in the detail window on the right half of the screen. Leave the maintenance of the partner profiles. 2005/Q4 . 226 © 2006 SAP AG. Check in the system PRODUCTION whether your inbox in the SAP Business Workplace contains a work item for this IDoc. Display the IDoc from the attachment of the work item. : The work item Call up the status monitor again. determine the cause of the error. a) b) Choose Menu → Business Workplace. What status does the IDoc have now? a) b) c) In the status record display. Choose Execute . Enter the message type ZCREMAS## and the process code CRE1 and save the change. choose the button Process: A message tells you that your IDoc was processed successfully. Select the system CORE in the folder of the partner type LS. The error analysis tells you that the inbound partner profiles with the partner PRODUCTION are missing for the message type ZCREMAS##. Then try to start the processing of the IDoc again. and add the missing settings. Open the folder Status records and double-click on the symbol beside the status long text (EDI: Inbound partner profile does not exist). c) d) e) f) g) 4.

BIT300 Lesson: SAP Workflow in ALE Environment Lesson Summary You should now be able to: • Check workflow settings for the error handling of IDocs • Understand the settings for process codes • Describe the notification concept • Monitor the IDoc processing using the SAP Workflow 2005/Q4 © 2006 SAP AG. 227 . All rights reserved.

Error-Handling and Archiving BIT300 Lesson: Archiving IDocs Lesson Overview This lesson shows you how to archive IDocs using transaction SARA. and the options for displaying archived IDocs. Additional reorganization options in the IDoc environment are also shown. The data archiving takes place in two steps: Firstly. 2005/Q4 . then the corresponding database entries are deleted. archive files are written for the IDocs selected for archiving.Unit 5: Monitoring Data Distribution. You also want to delete from the database table entries for IDoc connections and processed change pointers.First Step: Writing Archive Files 228 © 2006 SAP AG. you will be able to: • • Describe the IDoc archiving procedure Set the archivable statuses in the system Business Example You have set up various ALE scenarios and want to archive the IDocs that have been processed successfully. Archiving IDocs IDocs cannot be directly deleted from the database. but only within the data archiving process. Figure 119: Archiving IDocs . Lesson Objectives After completing this lesson. All rights reserved.

the second step of the data archiving . you can only choose archive files that have already been written. All rights reserved. you can also create user-defined archive information structures on the basis of the field catalog of the same name. which you have filled either implicitly with the deletion run. especially the necessary write and delete programs.the deletion of the corresponding database entries . From transaction SARA you can navigate directly to the job overview and view the log for the respective run there. and starting the execution. Depending on the Customizing setting. The archiving object for archiving IDocs is called IDOC. Figure 120: Archiving IDocs . Note: In an SAP R/3 or SAP ECC system you will find the archive information structure SAP_IDOC_001 for this purpose. However. you can use transaction SARA to start the data archiving with the archiving object IDOC by creating a variant of the write program with the desired selection values. or explicitly with transaction SARI. you can also call them up for display with the archive information system (transaction SARI). 229 . You can display the archived IDocs with transaction WE09. This ensures that no data is deleted from the database for which no archive files exist yet. or it is started manually with transaction SARA. A prerequisite for this is that an active archive information structure must exist.BIT300 Lesson: Archiving IDocs The archiving is realized by means of an archiving object. The actual archiving is complete when the delete run is finished.Second Step: Deleting IDocs from the Database In the selection for the deletion run. which provides all the functions required for archiving a business object. However. maintaining the start data and the spool parameters.is either carried out automatically directly after the write run. After setting the desired Customizing options. You also maintain the start date and spool parameters and start the execution here. 2005/Q4 © 2006 SAP AG.

2005/Q4 . Figure 121: Status Maintenance . All rights reserved.Archiving The following two figures provide you with an overview of the standard settings for archivable IDocs in outbound as well as inbound processing. Error-Handling and Archiving BIT300 Archivability Criterion: IDoc Status The IDoc status is the only archivability criterion which the write program checks for the archiving object IDOC. You can use transaction WE47 to display the IDoc statuses which are indicated as archivable. Figure 122: Archivable Status Values in Outbound Processing 230 © 2006 SAP AG.Unit 5: Monitoring Data Distribution.

and status 03 is therefore not a final status value. Figure 123: Archivable Status Values in Inbound Processing 2005/Q4 © 2006 SAP AG. Choose Edit → Restrict and process. To transfer an incorrect IDoc to status 31. proceed as follows: In transaction BD87. remove the indicator Background processing and in the next screen choose the button Delete flag and confirm the confirmation prompt with Enter. for example if you set ALE audit for all message types.no further processing) and then archive it. or in transaction BD87 in the input help for the field Status. All rights reserved. The following status values are indicated as archivable in outbound processing: 03 12 31 39 40 41 Data passed to port OK Dispatch OK Error. 231 . you can transfer the IDocs from any status with errors to status 31 (error . select the entry with the incorrect IDoc. If an error occurs that cannot (or should not) be corrected.BIT300 Lesson: Archiving IDocs You can determine the meanings of the individual statuses directly in transaction WE47 in the detailed view of the status. no further processing IDoc in receiving system (ALE service) Application document not created in target system Application document created in target system It is sometimes necessary to change these standard settings.

an edited IDoc or an application document. you fill the corresponding database tables. If you no longer need the links. Since SAP R/3 4. Obsolete change pointers are those created before the date and time specified by you in the selection screen. an outbound IDoc can be linked to an inbound IDoc. 232 © 2006 SAP AG. Error-Handling and Archiving BIT300 The following status values are indicated as archivable in inbound processing: 53 68 Application document posted Error. whether or not they have already been processed. Reorganizing Change Pointers If you are using the change pointer mechanism to create large numbers of IDocs. It deletes change pointer entries from the database tables. All rights reserved. it is not only the table of data records that gets big. so that obsolete entries should be deleted from them from time to time. Since SAP Web Application Server 6. The change pointers you have selected as obsolete are deleted. no further processing Deleting Links with IDocs There may be links between IDocs and other objects. Because change pointers are obsolete after they are processed. In contrast to the archiving process.6B. It is also possible to make a selection based on the date and time. Since SAP Web Application Server 6. For example. you can still delete this data with the program RSRLDREL before archiving. The tables in which the links are updated also increase in size. You can select obsolete and/or processed change pointers. the links are archived automatically along with the IDocs. it is possible to archive the links as well when archiving IDocs.20. You can call this program using transaction BD22. Processed change pointers are those processed before the date and time specified by you in the selection screen. 2005/Q4 . you should regularly delete the table entries that are no longer required. The program RBDCPCLR is provided for this purpose. Therefore.40. this results in them being lost forever. You can use this program to delete application links stored in the table IDOCREL. You can display in advance a list of the change pointer entries selected in the test mode. the program RSDLDREL has been available. As the number of IDocs increases. only the change pointers already processed are deleted. In the status monitor (transaction BD87). you can display these link relationships.Unit 5: Monitoring Data Distribution.

BIT300 Lesson: Archiving IDocs Lesson Summary You should now be able to: • Describe the IDoc archiving procedure • Set the archivable statuses in the system 2005/Q4 © 2006 SAP AG. All rights reserved. 233 .

2005/Q4 .Unit Summary BIT300 Unit Summary You should now be able to: • Use the status monitor efficiently • Set up and use the ALE audit • Perform error analysis using the ALE status monitor • Resolve errors in the IDoc processing • Check workflow settings for the error handling of IDocs • Understand the settings for process codes • Describe the notification concept • Monitor the IDoc processing using the SAP Workflow • Describe the IDoc archiving procedure • Set the archivable statuses in the system 234 © 2006 SAP AG. All rights reserved.

.........236 Lesson: IDoc Recovery Following Database Error .Unit 6 Appendix Unit Overview In this appendix........ 235 ..... All rights reserved........................ you will find information about renaming logical systems and about courses of action for identifying and resending lost IDocs after a database breakdown...... you will be able to: • • Explain the correct procedure for changing logical system names Describe the IDoc recovery procedure and the settings required for this function Unit Contents Lesson: Renaming Logical Systems ........ Unit Objectives After completing this unit.........241 2005/Q4 © 2006 SAP AG..

you used a name that no longer complies with your current naming conventions. if required. certain applications require the assignment of a logical system name to the client. Since SAP R/3 4. The definition of logical systems is a Customizing activity of ALE. and which is the best procedure to follow. Figure 124: Logical Systems 236 © 2006 SAP AG. All rights reserved. 2005/Q4 . So you want to check whether it is possible to change the logical system name now. Lesson Objectives After completing this lesson.5A. Renaming Logical Systems Logical systems have a technical name up to 10 characters long and an explanatory short text.Unit 6: Appendix BIT300 Lesson: Renaming Logical Systems Lesson Overview This lesson explains why it is problematic to rename logical systems and how logical system names can be changed. you will be able to: • Explain the correct procedure for changing logical system names Business Example When setting up an SAP system.

237 . the transaction BDLS. and can therefore often no longer be found. If users are managed centrally. ALE provides a tool for renaming logical systems in application tables. the participating logical systems must have unique names. any logical system names can be assigned. the modeling of the ALE message flow may become inconsistent. or which are saved with the current logical system name of your client.BIT300 Lesson: Renaming Logical Systems Application documents in which the field Logical system has remained empty. Caution: You are strongly advised against changing the names of logical systems in production systems. Application documents created before the logical system name was changed are classified as external documents after the change. Within an independent SAP system. All rights reserved. 2005/Q4 © 2006 SAP AG. If the logical system name of a client is changed. since this may lead to data losses and data inconsistency. are interpreted as local documents by the client. Figure 125: Conversion of Logical System Names Client and database copies are often used to set up a development and test landscape.

2005/Q4 . All rights reserved.Unit 6: Appendix BIT300 Figure 126: What is the Problem? Figure 127: How Are Logical System Names Changed? 238 © 2006 SAP AG.

239 . You must check the table in which this logical system name was found and determine whether you want to perform the conversion for these entries. the system queries whether the conversion is to be continued or not. see the SAP library or go to the Customizing in ALE and choose IDoc Interface / Application Link Enabling (ALE) → Basic Settings → Logical Systems → Convert Logical System Names in Application Tables. If you set the indicator Test run. all relevant tables will be analyzed and the number of entries contained in the tables will be determined. All rights reserved. cancel the conversion. Note: An appropriate authorization is required for the execution of the program (authorization object B_ALE_LSYS). If you do not want to convert these entries.Points to Observe 2005/Q4 © 2006 SAP AG. If the new logical system name is already available in the relevant tables. You are advised to start the conversion in test mode. Figure 128: Conversion . These will then be output in a list.BIT300 Lesson: Renaming Logical Systems For information on changing the logical system name of a client.

All rights reserved. 2005/Q4 .Unit 6: Appendix BIT300 Lesson Summary You should now be able to: • Explain the correct procedure for changing logical system names 240 © 2006 SAP AG.

you will be able to: • Describe the IDoc recovery procedure and the settings required for this function Business Example During an IDoc transfer. All rights reserved. You want to use the IDoc recovery to restart the transfer of all the IDocs which could not be saved on the database of the receiving system. Lesson Objectives After completing this lesson.BIT300 Lesson: IDoc Recovery Following Database Error Lesson: IDoc Recovery Following Database Error Lesson Overview This lesson tells you when and how to use the functions for IDoc recovery. IDoc Recovery Following Database Error Figure 129: IDoc Recovery Following Database Error The IDoc recovery uses two transactions: • • Transaction BDRC for determining the recovery objects Transaction BDRL for processing the recovery objects 2005/Q4 © 2006 SAP AG. the database of the receiving system crashed. 241 .

RCYRSP and RCYLST have been successfully posted in both systems S1 and S2. The participating system S2 is chosen. the system reports that 1 IDoc has been set up for the message type RCYFET.) S1 sends RCYFET to S2 S1 receives RCYRSP from S2 S1 sends RCYLST to S2 The model view created in the system S1 is distributed to the system S2. The partner profiles are generated in both systems. 2005/Q4 . the following entries are added to the distribution model in a model view: (S1 is the system affected by the database crash.Procedure I Before the transaction is started. Finally. the next step of “processing recovery objects” can be started. We recommend using the ALE audit technology for message type RCYFET from the partner system in order to inform the recovered system that the activity was performed in this partner system. If the check ran successfully. As soon as the IDocs for the message types RCYFET. All rights reserved.Unit 6: Appendix BIT300 Figure 130: IDoc Recovery . 242 © 2006 SAP AG. The transaction is started in system S1. the recovery objects are determined (F8). The system settings in S1 and S2 are checked.

The IDocs that are missing in this system and the further activities that are to be carried out are determined in the reset system. IDocs. This information is sent to the partner systems in IDocs for the message type RCYLST. 243 . All rights reserved.BIT300 Lesson: IDoc Recovery Following Database Error Figure 131: IDoc Recovery .Procedure II All participating systems are provided with information on the date and time of the reset system by using message type RCYFET. are selected here and confirmed with message type RCYRSP. 2005/Q4 © 2006 SAP AG. which were exchanged with the reset system. in order to derive the activities for certain objects in the partner systems.

Unit 6: Appendix BIT300 Figure 132: IDoc Recovery . All rights reserved. 2005/Q4 .Procedure III 244 © 2006 SAP AG.

All rights reserved.BIT300 Lesson: IDoc Recovery Following Database Error Lesson Summary You should now be able to: • Describe the IDoc recovery procedure and the settings required for this function 2005/Q4 © 2006 SAP AG. 245 .

2005/Q4 . All rights reserved.Unit Summary BIT300 Unit Summary You should now be able to: • Explain the correct procedure for changing logical system names • Describe the IDoc recovery procedure and the settings required for this function 246 © 2006 SAP AG.

depending on its type and recipient Monitor data exchange between systems 2005/Q4 © 2006 SAP AG. 247 . All rights reserved.BIT300 Course Summary Course Summary You should now be able to: • • • • Set up a distribution model for exchanging master and transaction data between systems Create partner profiles for data exchange in enterprises and for electronic communication with business partners Determine the scope of data to be distributed.

All rights reserved. 2005/Q4 .Course Summary BIT300 248 © 2006 SAP AG.

108 Message category. 138 Business Object Repository. 76.Index A Access sequence. 17. 195 I IDoc. 30. 120. 30. 219 Output determination procedure. 45. 145 BAPI Explorer. 20. 30. 145 Basic type. 123 Message. 60. 9. 82. 146. 111 Adapter. 32. 159. 17. 18 P Partner function. 16. 85 Communication layer. 61. 111 D Data record. 150. 45 M Master IDoc. 139. All rights reserved. 191. 18. 106 Port. 88 Business object. 47 ALE layer. 76 Change pointers. 39 Filter group. 60. 249 . 141 Business object type. 84 Filter object. 10. 108. 159. 119. 107 Partner profile. 76. 138 G Global company code. 158 Distribution Model. 229 F Field value conversion. 35. 86 Model view. 88 Classification. 34. 121 C Change documents. 111 Condition type. 51 ALE Customizing object. 80. 119 Message type. 33 Distribution group. 190 L Logical system. 120. 33 Cross-system company code. 110 Control record. 192 IDoc status. 82 B BAPI. 105 Event. 191 E EDI converter. 111 reduced. 179 IDoc basic type. 38 Communications IDoc. 60. 121. 49 File port. 49 Customizing. 148 Message control. 22. 11. 47 Distribution model. 109. 17. 60 O Organizational management. 38. 106. 106. 33 Condition table. 86. 80. 37 Archiving object. 148. 217 2005/Q4 © 2006 SAP AG. 218 Partner type.

61. 158 Segment. 120 tRFC port. 87 Status record. 33 T Transmission medium. 112 R Remote Function Call (RFC). All rights reserved. 212 W Work Item. 31. 192. 212 Processing time. 146. 106 Process code. 40. 39 S SAP Solution Manager.Index BIT300 Port type. 39 tRFC queue. 21 RFC destination. 31 Segment filtering. 214 250 © 2006 SAP AG. 64. 48 SAP Workflow. 80 Segment type. 2005/Q4 . 22. 192. 19. 19. 31. 121. 80 Segment field.

If you have any corrections or suggestions for improvement. All rights reserved.Feedback SAP AG has made every effort in the preparation of this course to ensure the accuracy and completeness of the materials. please record them in the appropriate place in the course evaluation. 251 . 2005/Q4 © 2006 SAP AG.

Sign up to vote on this title
UsefulNot useful