PricewaterhouseCoopers LLP

SAP ALE Training Program

PwC Consulting SAP ALE Training Program SAP Release 4.6C
Summary Table Of Contents
Chapter 1 – ALE Overview 1 Chapter 2 – Introduction to IDocs 11 Chapter 3 – Modeling ALE Distribution 25 Chapter 4 – Communication Parameters Chapter 5 – ALE Architecture Chapter 6 – Data Distribution Methods Chapter 7 – ALE Monitoring Chapter 8 – Error Handling Chapter 9 – Using ALE for Interfaces Chapter 10 – IDoc Processing Features Chapter 11 – ALE Performance Chapter 12 – IDoc Reduction Chapter 13 – IDoc Extension Chapter 14 – IDoc Creation Chapter 15 – IDoc Processing

This is PricewaterhouseCoopers PROPRIETARY MATERIAL

PricewaterhouseCoopers LLP

SAP ALE Training Program

1 1.1.1

Chapter 1 – ALE Overview Review of SAP System Terminology

From a System Infrastructure view, an SAP system consists of three layers: The Database Layer stores and retrieves all data. The database contains all of the data related to the SAP system, including the ABAP programs, the configuration data, the master data, and the transaction data. The Application Layer executes the SAP programs and processes requests from users. The Presentation Layer contains the SAP Graphical User Interface (GUI), and handles all user input and output. Together, the three layers make up the three-tiered client-server architecture of SAP. We can distribute the three layers over any number of physical computers. However, there may only be one database server. From a Database or Configuration view, the SAP system consists of: Client-Independent data, such as ABAP programs, client-independent tables, etc. One or more Clients. Each client contains its own client-dependent configuration (company hierarchy, process configurations, etc.), master data (customer, material, vendor, etc.), and transaction data.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL

1. the ability to define them should be restricted to as few people as possible.PricewaterhouseCoopers LLP SAP ALE Training Program 1. A logical system is a system containing applications that are coordinated to work with one set of data.2 Logical Systems We define all communication in ALE as links between logical systems. A logical system can be: A specific client on a specific SAP system A non-SAP system A file-based interface Since logical systems are the basis of all ALE configurations. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .

Contract information needs to be exchanged between systems that run central purchasing and systems that run decentral purchasing). A single SAP system that runs on top of one database often does not fulfill the needs of larger corporations. ALE enables the construction and operation of distributed applications. ALE also ties into SAP workflow to handle errors in the data transfer process This is PricewaterhouseCoopers PROPRIETARY MATERIAL . ALE allows us to distribute data between different systems and different business processes. each of the SAP systems has its own database and is essentially independent from the other systems. either from a business or a technical perspective.3 What is ALE? Application Link Enabling (ALE) is the set of tools. SAP delivers over 100 IDoc types to support its distribution scenarios. Part of ALE is a communication infrastructure. which define how different SAP systems can interact. along with the IDocs come the associated programs to generate (on the outbound side) or to process (on the inbound side) IDocs. The Basic Ideas of ALE 1.PricewaterhouseCoopers LLP SAP ALE Training Program 1. programs. The distribution of data happens at the application server level (Hence.3.1 ALE is a technology introduced by SAP with its 3. Its purpose was to overcome the limitations of a single SAP system. specifically ALE uses the “transactional RFC” technology to ensure the transaction consistency across system boundaries. or IDoc. ALE allows the implementation of loosely coupled SAP systems. and data definitions that provides the mechanism for distributing SAP functionality and data across multiple systems.0 release. Application Link Enabling). The scenarios define what messages are sent back and forth between the systems (for example. The “data container” that carries the message is the Intermediate Document.1. SAP supports a number of distribution scenarios.1.

SAP Release Coordination: Different units of the organization may require different releases of the SAP software. but why would we distribute applications in the first place? There are several technical and business reasons: System Performance: The transaction load is too heavy for a single SAP system. High Availability Requirements: The company cannot afford downtime due to backups. Maintain configuration and master data across clients: Organizations using multiple clients may wish to maintain certain data on a client-independent basis. Interfacing with non-SAP systems: The company may wish to maintain certain applications on non-SAP systems. Very Large Database: Companies with very large databases may need to distribute the data across multiple SAP systems. Business Structure: Business units may require independence and autonomy for day-to-day operations. Keep development system data in sync with production data: An organization may wish to keep the data on a development system the same as on a production system. etc.4 Why use ALE? ALE provides for the integration of distributed applications. while at the same time integrate these applications and their data with the SAP system. maintenance.PricewaterhouseCoopers LLP SAP ALE Training Program 1.1. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . upgrades. and yet still need to share some data and functionality with other units in the enterprise.

1.5 What can we distribute with ALE? We can distribute all types of data with ALE: Control or Customizing Data: Control data includes all configuration objects that define how the SAP system is organized. SAP delivers several hundred predefined distribution scenarios. global settings. etc. credit memos. Summary information is reported into the central sales information system. then we can develop a custom scenario to distribute any data required by the business. If a standard solution is not provided.1 The sales system provides only the logistics data that the warehouse requires to fill an order.PricewaterhouseCoopers LLP SAP ALE Training Program 1.5. The number of supported business scenarios increases with each SAP release. Example distribution scenario: Sales and Distribution 1. Master Data: Master data objects that can ALE can distribute include: o Material Master o Customer Master o Vendor Master o Cost Centers o Activity Types o G/L Accounts o Characteristics/Classes/Classifications o and many others Transaction Data: Transaction data is data related to specific business transactions or processes (e. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . All of the data sent references a single order document.1. invoices). This includes the enterprise structure configurations.g. sales orders.

5.1. there is a single document reference. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Summary release statistics are reported to the central purchasing information system.PricewaterhouseCoopers LLP SAP ALE Training Program 1.2 Example distribution scenario: Blanket Purchasing The central purchasing system sends the local purchasing system the data required to carry out an individual transaction. As with SD scenarios.

where EDI is primarily for data exchange between companies. etc. vendors.6 What is EDI? Electronic Data Interchange (EDI) is an industry standard for data exchange between business partners (customers. This is the distinction between EDI and ALE: ALE is primarily for data exchange between systems within the same organization.1. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .PricewaterhouseCoopers LLP SAP ALE Training Program 1. EDI functionality is layered on top of ALE functionality. Conceptually.). SAP uses the ALE services to implement EDI functions from within the R/3 system.

formats and filters the data. Distribution (or “ALE”) Services: This is where the distribution of the data and documents occurs. SAP also provides a set of tools for configuring and customizing the ALE implementation: Customizing Tools: The customizing tools provided by SAP define what is to be distributed. as well as the individual segments that make up the IDocs.500. These tools include the following. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . The ALE Services are: Application Services: This is where the SAP applications (SD. and creates the ALE Intermediate Documents (IDocs). and how the distribution is to occur. posting an invoice).7 ALE Components SAP provides ALE services for distributing applications. The three ALE services form a layered architecture. These tools allow for the maintenance of IDoc types.PricewaterhouseCoopers LLP SAP ALE Training Program 1. TCP/IP.) generate their data and documents. etc. This layer determines the recipients. and the tools to tailor these services to the organization’s specific requirements. MM. o Model Maintenance Tool: A tool used for configuring the flow of data between systems o Shared Master Data (SMD) Tools: Tools within SAP used for distributing master data o Customization parameters within SAP for IDoc filtering and conversion Development Tools: Tools for creating and modifying IDocs. Asynchronous RFC.. where each layer depends on the layers below it.1.e. Communication Services: This layer provides the vehicle for actually moving the data and documents (the ALE IDoc) from one logical system to another. etc. This is not specific to ALE. EDI. but is part of the standard processing in SAP (i. This layer employs communication techniques such as X. FI. Existing SAP programs are “ALE-enabled” to allow them to work with ALE.400/X.

Therefore ALE remains the closest thing they can offer to a distributed processing environment. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .8 The Future of ALE ALE (meant as IDocs and associated function modules for extract and update) is so completely embedded in all SAP offerings that eliminating it would be difficult. Many clients are using ALE. so the absence of ALE support would cause problems ALE is important to many processes within the R/3 system Most third party complementary software uses IDocs as the main means of communication In the future. In particular: Most mySAP.1.com components use ALE SAP is still facing major scalability issues in terms of putting tens of thousands of users on one database. SAP will continue providing more standard scenarios and enhance the customizing and development features.PricewaterhouseCoopers LLP SAP ALE Training Program 1.

defines the structure and formatting of the data contained within the message type. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .PricewaterhouseCoopers LLP SAP ALE Training Program 2 2. The IDoc. Field lengths and types are defined according to the data element definitions of the EDIFACT EDI standard and SAP’s data repository. SAP takes responsibility for compatibility of the interface standard for its own applications. Codes for coded fields are taken from international standards where the standard applies.1 Chapter 2 – Introduction to IDocs The Intermediate Document (IDoc) The Intermediate Document.1. Each interface message type has an associated IDoc type. IDocs provide support for customized development: API for development Easy to use and apply Real-time or asynchronous interface connection Independent of external system data requirements Independent of type of external system The data interface standard is standardized according to the following key rules: The documentation of the interface is published. in turn. is the main component of all interface functionality in SAP. or IDoc.

each using a different message type. SAP loosely based its IDoc structures on the EDIFACT standards. the structure is exactly the same for inbound and outbound IDocs. In fact. An IDoc is an actual instance of data based on an IDoc type.1. A message type specifies the meaning of the data. there can be many IDocs created from a single IDoc type.PricewaterhouseCoopers LLP SAP ALE Training Program 2. We also need to distinguish between an IDoc type and a message type: An IDoc type specifies the structure of the data.2 IDoc Types and Message Types We need to make a distinction between an IDoc and an IDoc type: An IDoc type is the definition of a specific data structure. The structure of IDoc types is very similar to the structure of EDI messages. For example. The IDoc structure does not change with direction. That is. the IDoc type ORDERS01 supports purchase orders. and confirmations. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . change orders. An IDoc type can support multiple message types. quotes. A given message type may not use all of the data defined in an IDoc type. Therefore.

A data segment is made up of a key section and a data section.3 IDoc Structure An IDoc consists of three record types: Control Record: Contains the data that uniquely identifies the IDoc. An IDoc may have multiple data records. and then adopted the IDoc concept and structure for its ALE interface. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .PricewaterhouseCoopers LLP SAP ALE Training Program 2. document posted. called segments. etc. Data Records: Contain the application data related to the message type.1. Status Records: Contain the information relative to the various statuses that the IDoc encounters. SAP originally developed IDocs for EDI. The IDoc is data stored in a structured format. It is a medium for data transfer. The key section uniquely identifies its respective data segment. such as IDoc created. An IDoc is not a process nor executable code.

1. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .4 The IDoc Control Record The Control Record stores the characteristics of the IDoc. This ID number is assigned by SAP for all IDocs.PricewaterhouseCoopers LLP SAP ALE Training Program 2. keyed by IDoc ID number. Some of the more important fields are: IDoc ID Number (DOCNUM) IDoc type (DOCTYP) Direction (In or Out) (DIRECT) Name of Sender (SNDPRN) Name of Receiver (RCVPRN) Processing Status (STATUS) EDI Message Type (if EDI) (STDMES) Control Records are stored in the R/3 transparent table EDIDC.

PricewaterhouseCoopers LLP

SAP ALE Training Program

2.1.5

The IDoc Data Records The Data Records contain the actual application data. Some of the more important fields are: IDoc ID Number (DOCNUM) Segment Name (SEGNAM) IDoc Data (SDATA) (structure differs with each IDoc type) The Data Records are stored in table EDID4 (EDID2 in prior versions), keyed by IDoc number and segment number. The table structure is 71 bytes of administration data (IDoc number, segment identifier, etc.) followed by 1000 bytes of free-form application data. Each segment type uses a different format for the 1000 bytes of application data. Data Record Hierarchy

2.1.6

Information that relates to the object as a whole is stored in the main segment. Hierarchical information is stored in separate segments. Each segment typically corresponds to a different database table. Attributes of a segment: The fields of the segment. Each field is assigned a length and a data element from the ABAP dictionary. Whether the segment is required or optional in a valid IDoc. The minimum and maximum number of instances of the segment.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL

PricewaterhouseCoopers LLP

SAP ALE Training Program

2.1.6.1

Example – Material Master

2.1.6.2

As an example, consider the Material Master IDoc Type (MATMAS01). Each material has information that is common throughout an SAP implementation. This data is stored in the main segment. Each material has some information that is different for each plant, which is stored in a separate plant segment. Within a plant, the material can be stored in multiple storage locations, each of which requires a storage location segment for its information. We can store several different descriptions of the material (for different languages, for example). Example – Sales Order

As another example, consider the purchase order / sales order IDoc Type (ORDERS01). Each order has information that is common throughout an SAP implementation. This data is stored in the main segment. Each order has some information that is different for various kinds of data, which is stored in a separate sub-segment (e.g. conditions, partner information and document item data). Within a document item, there are different kinds of data for an order item, each of which requires a subsequent segment for its information (e.g. terms of delivery and terms of payment).

This is PricewaterhouseCoopers PROPRIETARY MATERIAL

PricewaterhouseCoopers LLP

SAP ALE Training Program

2.1.7

IDoc Status Record The status records are stored in table EDIDS, keyed by IDoc ID Number and date/time. Some of the more important fields are: IDoc ID Number (DOCNUM) IDoc Status (STATUS) Date/Time Status was generated (CREDAT, CRETIM) Status Text (STATXT) The STATUS field is: 1 - 49 for Outbound Messages 50 - 99 for Inbound Messages The possible values for the status are stored in table TEDS2. A list is in the Appendix. As the IDoc undergoes processing (both in and out), a status record is added to it at each step.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL

1.8 IDoc Structure Utility To view the structure of a specific IDoc. use the IDoc Structure Utility.PricewaterhouseCoopers LLP SAP ALE Training Program 2. Transaction: WE60 Menu Path: Tools IDoc types Business Communication IDoc IDoc Basis Documentation This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Enter the IDoc type and execute. You can expand each segment to look at its child segments or its data fields.

9 Maximized vs. we just can’t see it all. The user needs to go into the message type to activate all the fields for transfer.PricewaterhouseCoopers LLP SAP ALE Training Program 2.1. the reduced IDoc type becomes a new IDoc type and must be treated as such. This has two implications: A reduced IDoc can be created for multiple distributed systems or specifically for one distributed system. Reduced IDocs are maximized IDocs that have been modified to only include the data that is valuable to the distributed systems. but either way. such as Mercator. Reduced IDocs cannot be used with many third-party mapping tools. the maximized and reduced IDoc types are not interchangeable. Reduced IDocs are created for a specific message type. This IDoc contains all the fields available whether those input fields are needed by the distributed systems or not. Reduced IDocs A maximized IDoc contains all the data available in the master data record. not all the fields are activated. In other words. The reduction excludes those fields that the distributed system does not need and therefore makes the IDoc easier to use. In the SAP-standard delivered maximized IDoc. Reducing an IDoc does not reduce network traffic. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . The entire maximized IDoc is still sent to the partner system.

Specify IDoc criteria such as date/time created. and message type. The resulting screen lists IDocs by direction (inbound/outbound).PricewaterhouseCoopers LLP SAP ALE Training Program 2. etc. status records. You can “drill down” into the IDoc list to see detailed information such as control records. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .10 Viewing IDocs on the System Transaction: WE05 Menu Path: Tools Business Communication IDoc IDoc Basis IDoc IDoc Lists You can display a list of IDocs in the system with the IDoc Lists transaction. status. to limit the results. message type. partner. and data records.1.

PricewaterhouseCoopers LLP SAP ALE Training Program This list depicts the drill-down on MATMAS IDocs with status 03. Note that several IDocs are listed. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .

what is the parent segment of segment E1KNVPM? List the data fields of segment E1WYTTM in IDoc type CREMAS01 (Vendor Master)? What data element is assigned to field NTGEW of segment E1EDP09 in IDoc type DESADV01 (Shipping Notification)? What is the maximum number of “Document Header Partner Information Additional Data” segments in a Purchasing/Sales IDoc (type ORDERS02)? In an ORDERS02 IDoc. what does the field DATUM represent in segment E1EDK03 if the value of the field IDDAT is ‘010’? This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Answer the following questions. and status records: Double click on "Control rec.1 Exercise: IDoc Structure This exercise will give you practice in reading and understanding the structure of an IDoc. data.PricewaterhouseCoopers LLP SAP ALE Training Program You can double-click on an individual IDoc to look at its control. What are the required segments in the IDoc type MATMAS02 (Material Master)? In IDoc type DEBMAS01 (Customer Master)." to see the control record. Run the IDoc Structure Utility (WE60). Double click on any status record to see it in detail. Single click on any data record to see its fields. but it sorts IDocs by message type before status. Transaction WE02 is similar to WE05. 2.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL .1. The ALE system will not distribute any data unless you specify the data flow in a distribution model.PricewaterhouseCoopers LLP SAP ALE Training Program 3 3.1 Chapter 3 – Modeling ALE Distribution Distribution Models The distribution model describes the flow of data between logical systems: What systems are there? What applications will run on which systems? What systems will SEND data? What systems will RECEIVE the data? Other rules for data distribution? ALE uses the model to control data distribution.

PricewaterhouseCoopers LLP

SAP ALE Training Program

3.1.2

Model Views

3.1.3

You can split the distribution model into one or more views. This lets you break down complex distribution scenarios into more manageable pieces, or to separate business areas or systems into separate views. Although you can think of the views as different models, there is really only one model on any system. This model is a union of all of the model views that are defined. SAP Support SAP delivers a large set of predefined message types, with the programming needed to use them, with the R/3 system. With each message type, SAP provides: Functionality to create outgoing messages Functionality to process incoming messages The data structures needed by the message We will look at several SAP messages in detail throughout this course. If SAP does not provide a message functionality that you need, you can create it yourself. This is the focus of the IDoc Programming part of this course.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL

PricewaterhouseCoopers LLP

SAP ALE Training Program

3.1.4

Model Ownership Each model view is owned by one logical system We maintain the model on its owner logical system, and then distribute the model view to all of the other systems. ALE provides the distribute function to send a model view to the other logical systems. The other systems then have display-only access to the model.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL

PricewaterhouseCoopers LLP

SAP ALE Training Program

3.1.5

Defining Logical Systems Transaction: BD54 Menu Path: SALE Sending and Receiving Systems Logical Systems Define Logical System Before building a distribution model, we must define the logical systems that we will be using. The Logical System Definition transaction will access the list of logical system names. Click on New entries to create new logical systems.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL

Remember that a logical system can point to a non-SAP system as well. We actually assign the logical system names to physical systems in the Client Maintenance transaction.6 Assigning a Logical System Name to the Client Transaction: SCC4 Menu Path: SALE Sending and Receiving Systems Logical Systems Assign Client to Logical System The Logical System table only stores names and descriptions of the logical system names. There is a one-to-many relationship between physical systems (or clients) and logical systems. but several logical systems can point to the same client. Simply double-click on a client. we assign each client one logical system name.1. change the field Logical system. That is. so we don’t need to allocate every logical system to a client.PricewaterhouseCoopers LLP SAP ALE Training Program 3. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . and save.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL . You can maintain the model only from its owner system. the receiving logical system name. the sending logical system name. To create a new model view. Models distributed from other systems will be grayed out on the list. The owner of a model view is set to the system on which you create it. and the name of the message type. Each model view is a part of the entire model. To define a new message flow between systems. Remember that there is really only one model. Each model view has one owner system.1. and save. Enter the model view. click on Create Model view. click on Add message type.7 Model Maintenance Transaction: BD64 Menu Path: SALE Modeling and Implementing Business Processes Maintain Distribution Model and Distribute Views We use the Model Maintenance program to define the distribution model views.PricewaterhouseCoopers LLP SAP ALE Training Program 3.

PricewaterhouseCoopers LLP

SAP ALE Training Program

3.1.8

Filter Objects You can use a filter object to limit the content of a message in the model. For example, you can configure a Customer message to be sent only if the company code is equal to 0001.[1] Multiple filter objects are linked with an OR if they are the same object, AND otherwise. For example, if you define the following filter objects: Plant 001 Plant 002 Division 01 Division 02 The resulting filter will be (Plant 001 OR Plant 002) AND (Division 01 OR Division 02).

[1]

Note: A filter object actually filters out IDoc segments, not entire IDocs. Here is how it works, for those interested: Each segment of the IDoc containing a field of the specified object type with a value different than any filter value is deleted from the IDoc, along with its child segments, if it has any. If the deleted segment is mandatory in the IDoc, then its parent segment is also deleted. If the highestlevel segment is deleted, than the entire IDoc is not sent.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL

PricewaterhouseCoopers LLP

SAP ALE Training Program

To define a filter object: Navigate to the model view/message type that you want to filter, and expand the tree to show filter groups. Double click on "No filter set", (or "Data filter active", if one exists). Click on Create filter group Select the field that you want to use in the filter. Enter the value to filter by. Save the model. 3.2 Exercise: Model Maintenance In this exercise you will create a new distribution model view and assign a message flow between two SAP systems. Goal: On the system designated as your "Sales” system set up the customer model MODEL## (where ## is the last two digits of your SAP logon ID) with the message MATMAS sent to the system designated as your "Warehouse” system. Caution: Only one person at a time can perform shaded steps. Please work quickly so that others will not be locked out for too long! A. Define a logical system Define the logical systems that you will use: 1. Log into your Sales system. You will define communication parameters between this system and your Warehouse system. Execute the ALE configuration IMG with transaction code SALE. 2. Create a logical system name for your Sales system. a. b. c. d. Execute BD54. Click New Entries. Enter your Sales system's logical system name and a short description. Click Save.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL

PricewaterhouseCoopers LLP

SAP ALE Training Program

3. Create a logical system name for your Warehouse system using the same process. 4. Log into your Warehouse system, and repeat the creation of the logical system names. Notes: 1. The logical system table is client-independent. This means that if your Sales and Warehouse systems are different clients on the same physical system, you only need to create the logical system names once. 2. Since class participants are sharing senders and receivers, one or both of your logical system names may already exist. If so, just verify that they exist and move on.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL

Click on Create Model view to create a new model view. 3. MATMAS now appears in the model hierarchy as a supported message to send to your Warehouse system. 2. 5. Go to Model maintenance on your Sales system 2. Click on Switch between display and edit mode to go into edit mode. Maintain the Communications Model The customer distribution model defines what messages are permitted between the systems. 6. 5. execute SCC4. 3. one or both of your logical systems may already be allocated. your Warehouse system as the receiver. 2. just verify that they are correct and move on. and save. so that it will know what modeled messages apply to it. 4. Log into your Sales system. D. 4. You will model a material message flow. Repeat this procedure to add the other two filter objects. Enter the sender's logical system name in the Logical system field and save. since it will interfere with This is PricewaterhouseCoopers PROPRIETARY MATERIAL . 4. 1. Enter 2000 as the Object value. If so. 1. and you should perform ALL model maintenance on this system.PricewaterhouseCoopers LLP SAP ALE Training Program B. and double click on "No filter set". Add a message type under your model view. Note: Since participants are sharing Sales and Warehouse systems. Repeat this process for your Warehouse system. This system will "own" your model view. and the message type (MATMAS). The message type you will use is MATMAS. Add the following filter constraints to your model: Plant: 2000 or 4000 Division: 01 1. Using the menu path Edit future exercises Delete. 6. Execute BD64 3. Allocate logical systems to clients Each client on a system must have a logical system name. Click on Save to save the model. From your Sales system. Select Create filter group. and save. delete your filter group. Position the cursor on the MATMAS message flow you defined earlier. Enter the model name (MODEL##) and a description and save. Expand the values and double click on Plant. Double click on the client assigned as your Sales system. Enter your Sales system as the sender. Add a filter object. C.

PricewaterhouseCoopers LLP SAP ALE Training Program 4 Chapter 1 – IDoc Processing Features There are a number of processing features in ALE that permit you to further refine what information is sent to what logical systems in the ALE constellation. These features include: Filtering out segments of an IDoc that shouldn’t be sent to a particular logical system Converting the values or formats of certain fields in the IDoc Using classes to freely define which master data records are sent to which logical system This is PricewaterhouseCoopers PROPRIETARY MATERIAL .

thus reducing unnecessary network traffic. and the segment to filter out.1. However. it is more efficient to perform filtering on the outbound side. In that case. This information must be distributed to all manufacturing facilities. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . In general. Transaction: BD56 Menu Path: SALE Master Data Distribution→Modeling and Implementing Business Processes Filter IDoc Segments Scope of Data for Distribution In transaction BD56. To use filtering. You can add multiple entries for the same sending and receiving systems to filter out multiple segments. The filtering is dependent on the message type and the receiver. SAP also provides segment-filtering capabilities on the inbound side. Note: Although the menu path for this program goes through "Master Data Distribution". Then click on New Entries. The system types will be “LS” for logical system. the accounting view may be filtered out when the IDoc is sent to the manufacturing facility. you must first determine which functional information is required on each system.1 Segment Filtering SAP ALE Training Program Segment filtering prevents pre-defined segments of an IDoc from being sent to a particular receiving system. not just those for master data. you must ensure that the segment's child segments are also filtered out. and enter the sending system. Other distributed systems that are interested in the accounting view may still receive that view. the receiving system. enter the appropriate message type. Note: If you filter out a segment. This prevents unnecessary data from being sent to a system that does not need that data. For example. but those facilities may not be interested in the accounting view of materials.PricewaterhouseCoopers LLP 4. material master records may be maintained centrally at headquarters. Then you must identify the appropriate segments to filter out. filtering will work for any message type.

2 Field Conversions SAP ALE Training Program In some cases. Enter the information onto a blank line: Name of the rule Description Segment that the rule applies to o Save your entries This is PricewaterhouseCoopers PROPRIETARY MATERIAL . For example. material master type codes for material type may be different on a legacy system than they are in SAP. along with selection criteria that govern when the rule will take effect (for example. Here are the steps for defining a field conversion: Step 1: Define the rule. A material type of “ROH” (for raw material) in SAP may correspond to a numeric code (such as “01”) in the legacy system. Transaction: BD62 Menu Path: SALE Converting Data Between Sender and→Modeling and Implementing Business Processes Receiver Define Rules for IDoc Segment Names o o Click on Change. ALE has the ability to convert field values when sending data between systems. We can convert data on either the inbound or the outbound side (or both). We specify conversion rules at the field level. We can use this capability instead of external translation programs. we may need to convert the values that belong to certain fields when sending data between systems.PricewaterhouseCoopers LLP 4. set the moving average price equal to the standard price only if the moving average field is blank).1.

Set the field to a constant.PricewaterhouseCoopers LLP Step 2: Maintain the rule. Transaction: BD79 SAP ALE Training Program Menu Path: SALE Converting Data Between Sender and→Modeling and Implementing Business Processes Receiver Maintain Rules o Enter the rule name and click on Change. Convert a field in some way. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Set the field to the value of a system variable. o o Double-click on a field you want to convert. Enter the conversion rule and save. There are several possible rules you can use: Copy a field unchanged.

PricewaterhouseCoopers LLP Step 3: Assign the rule to a message flow. Transaction: BD55 SAP ALE Training Program Menu Path: SALE Converting Data Between Sender and→Modeling and Implementing Business Processes Receiver Assign Rule to Message Type o Enter the message type and enter. o Click on New entries and enter the information: Sending system (type is “LS”) Receiving system Segment to apply the rule on Name of the rule o Save your entries. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .

PricewaterhouseCoopers LLP 4.1. unless you check the Send material in full checkbox. You select the type from the class type hierarchy. If you do this. These types are usually called ALM(material). make sure that you send the actual classes to the other systems first (or at the same time. Transaction: CL24N Menu Path: Logistics Central Functions Classification Assignment Assign Objects/Classes to Class Transaction CL24N lets you assign objects to your class. SAP permits you to create freely definable classes of master data records to be distributed together. This procedure will not send the actual classification information. To send all of the members of one or more classes. and materials.3 Distributing Master Data with Classes SAP ALE Training Program If standard filter objects are not sufficient to specify how to distribute master records to the various ALE systems. You must specify the class name and the type. You can distribute your classes as master data using ALE or by CTS. vendors. Directions for setting up distribution with classes: Transaction: CL02 Menu Path: Logistics Central Functions Classification Master Data Classes Transaction CL02 will maintain classes. ALV (vendor). specify the names of the classes in the BD10 Listing field. the meaning of the word "class" here is different from the meaning in ABAP Objects programming. You can use classes only with customers. You must use a classification type that is configured for use with ALE. We only have time here for a quick overview. etc. using serialized messages). Also. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . You implement classes using the standard classification functionality of SAP. You must send the class to each individual system that will use it. Note: Classes were called “Lists” in previous versions.

PricewaterhouseCoopers LLP 4. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . That’s it! Now if you try to send a master data record not in the specified class. This requires two steps: Transaction BD68. for a given logical system and message type. the ALE layer will not create a communication IDoc. This tells the ALE system what classes you want to enable distribution for.1. Add a filter object to the distribution model for the proper systems and messages.4 Controlling Distribution Using Classes Transaction: BD68 Menu Path: SALE Modeling and Implementing Business Processes Assign Classes to Receiving Logical System Master Data Distribution SAP ALE Training Program Distribution Using Object Classes You can limit master data distribution between two logical systems to members of a certain class. selecting Distribution via classes.

PricewaterhouseCoopers LLP 4. because later updates would be overwritten by earlier ones.1 Serialization IDoc Level SAP ALE Training Program For some IDoc types it might be a problem if one IDoc is overtaken by another IDoc.5 4. Since this is dependent on the IDoc type this serialization function is not built into the ALE layer. It must be coded within the application function module. We’ll discuss this more in the IDoc programming part of the course.1. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .5.1.

2 Message Level SAP ALE Training Program Sometimes. and must be processed in the right order. we must use two message types: MATMAS and CLFMAS. two message types are interrelated. classify it. Beginning with R/3 release 4. we need to send the vendor or material along with the PO.1. SAP provides functionality to ensure the correct processing order of messages. Schedule the programs to perform the distribution. But the receiving system cannot process the CLFMAS message until it adds the material from the MATMAS message! Purchase Orders o If we send a purchase order (ORDERS) with a new vendor (CREMAS) or a new material (MATMAS).PricewaterhouseCoopers LLP 4. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . o If we create a material. These are the steps you must follow to use the serialization functions: Create the serialization group and assign message types to it. The receiving system then needs to process the vendor and the material before the purchase order.0. and want to send it to another system with the classification information. Examples: Material Master and Classification Master.5. Maintain the proper message flow configuration in the distribution model and the partner profiles.

we define a serialization group. o o Click on New entries.PricewaterhouseCoopers LLP 4. we can specify that certain message types must be processed in a predetermined order. and save.1. o Save. group". and then double-click on "Assignment of logical messages to serial. o Click on New entries. By defining a serialization group. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Assign message types to the serialization group: Click the selection button next to your group.6 Configuring Message Serialization SAP ALE Training Program First. You must create the serialization group on both the sending and receiving systems. Transaction: BD44 Menu Path: SALE Modeling and Implementing Business Processes Master Data Distribution Receiving Data Serialization Using Message Types Define Serialization Groups Serialization for Sending and Note: Although the menu paths for the Serialization programs go through "Master Data Distribution". serialization will work for any message type. and add a line for each message type you want in the group. Indicate the proper processing order by setting the sequence number for each message. enter your group’s name and a description. There are two steps in defining a serialization group: Create the serialization group. not just those for master data.

You must also configure the message flows in the model and partner profiles correctly: Outbound: o o Inbound: o o Master data messages: Processing type Background.1. no override with express flag.1 Distribution Model and Partner Profile Configuration SAP ALE Training Program To use the serialization functions. SERDAT message: Transfer immediately. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . SERDAT message: Processing type Immediate processing. you need to configure a message type SERDAT in addition to the master data message types.PricewaterhouseCoopers LLP 4. Master data messages: Collect IDocs.6.

PricewaterhouseCoopers LLP Finally. you must define the settings for inbound processing: Transaction: BD44 Menu Path: SALE Modeling and Implementing Business Processes Master Data Distribution Receiving Data Serialization Using Message Types Define Inbound Processing SAP ALE Training Program Serialization for Sending and Click on New entries. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . We’ll discuss parallel processing and server groups in the Performance chapter. and enter the information: Your serialization group name The message types in the group The sending logical system name The packet size (number of IDocs) transferred to the application at a time. Whether parallel processing is permitted The server group to use.

Define a conversion rule RULE## for MATMAS for sending materials from your Sales system to your Warehouse system. The receiving side then processes the SERDAT message. port. b. you must schedule the following two programs to run at appropriate times: RBDSER01 o This program does the same thing as RBDMIDOC: it reads the system change pointers and creates IDocs for any master data records that have changed (or been added).6. If all IDocs were successfully sent.2 Exercise: Filtering Out an IDoc Segment Remember: Only one person at a time can perform shaded steps! 1. (Note: If you have not fully configured MATMAS message flow between your systems. Send the materials from your Sales system to your Warehouse system using your class. 3. Use the class type predefined for ALE. 4. If the drawing document number is between 255 and 300. The Material Master table has a field (in the Basic Data view) called Drawing Document. Use Material group and Industry sector as specified in the guide handed out in class. Add at least two materials to your class. Select the Basic Data 1 and the Accounting 1 views. A. 2. Create a class CLASS## for material master data.PricewaterhouseCoopers LLP 4.) Check the IDoc overview to examine the data records for your IDoc to see if the material valuation segment was filtered out. 2. Using BD56.3 Exercise: Converting a Field Value Only one person at a time can perform shaded steps. 4. It differs from RBDMIDOC in that it only creates IDocs for master data messages that are members of a specified serialization group. Leave any other drawing document number unchanged. find the segment that contains material valuation data. Activate IDoc conversion for MATMAS when sending from your Sales system to your Warehouse system. 4. 1. RFC destination. which triggers the processing of the other messages in the correct order.2 Scheduling ABAP Programs SAP ALE Training Program To use the serialization features. 4. change it to 37. Use BD10 to send your material master record to your Warehouse system. Configure your rule to effect the following conversions: a. Specify 0001 as the plant. 5. filter out the material valuation data segment for message type MATMAS for your Sales and Warehouse systems.4 Exercise: Distribution Using Classes Only one person at a time can perform shaded steps. you will have to complete that configuration (Model. Create and send enough materials to test your conversion rules thoroughly. c. On your Sales system. then it sends a message of type SERDAT to start the inbound processing. RBDSER02 o This program does two things: It sends the IDocs created by RBDSER01. The program RBDSER03 uses the program RBDMOIND (discussed in the next chapter) to check for successful IDoc dispatch for all IDocs sent by RBDSER02. It schedules program RBDSER03 at a time interval you specify in the selection screen.1. If the drawing document number is equal to 254. Determine the segment and field used for the Drawing Document in IDoc type MATMAS03. a. For IDoc type MATMAS03. c. and partner profiles) before you can complete this step. Log in to your Warehouse system to see if your material came through and if the valuation data was filtered out. create a new material master record (transaction MM01). change it to 129. b. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . 3. Create and use a class to send material master data. 6.

PricewaterhouseCoopers LLP 4. On your Sales system. Check that the correct materials were sent. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . SAP ALE Training Program B. Try to send a range of materials. 7. Restrict material master distribution to members of your class. Add “Distribution via Classes” as a filter object to your distribution model. assign your class when sending to your Warehouse system. and verify that only the materials in your class are sent. 5. some in your class and some not. 6.

on both the outbound and inbound systems. Here are some sample performance statistics (measured on a PwC project) to give an idea of the time required. This generally takes much longer than creating the outbound IDoc. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Remember that actual performance depends on all of the factors above.PricewaterhouseCoopers LLP SAP ALE Training Program 5 Chapter 2 – ALE Performance The performance of an ALE implementation depends on many factors: Programs Hardware Database Application Data volume Message type Size of the IDoc Usually if there is a performance bottleneck. it is in the processing of inbound IDocs. Outbound Processing (IDocs / second) Inbound Receiving (IDocs / second) Inbound Posting (IDocs / second) 10 5 <1 This chapter makes some suggestions for improving and controlling the performance of ALE IDoc processing. so your performance may be very different.

Schedule the master data send at a time when system load is low.1 5.1.1. then schedule program RSEOUT00 to send the IDocs at an appropriate time.1.3 Inbound IDoc Processing Specify Background processing in the partner profiles.1 Timing of IDoc Processing IDoc creation We can’t control the timing of transaction data. specify Collect IDocs in the partner profiles.1. SAP ALE Training Program Use change pointers to keep track of master data that needs to be sent. then schedule program RBDAPP01 to process the inbound IDocs at a slower time. 5. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . You can do the same thing with any transaction data that does not need to be sent immediately.PricewaterhouseCoopers LLP 5. 5.2 Transfer to Communication Layer For master data.1.1.1.

3 Processing IDocs grouped into a packet are processed in one dialog process.2 Sending The sending of IDocs with tRFC communication automatically uses all available dialog processes.1. which uses all available dialog processes. you can process IDocs in parallel. 5.1. Caution: Processing inbound IDocs in parallel is inherently asynchronous. When processing IDocs in the background. the IDoc processing will use a separate dialog process for each IDoc packet.1.PricewaterhouseCoopers LLP 5. the system will use all available dialog processes in the local server. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . The program RBDMIDOC cannot handle parallel execution. IDocs not in packets will use all available dialog processes. and runs in a single dialog process. Parallel creation only works for manual master data send. since the system uses RFC calls to communicate with other servers in the group. If you do not. using transaction RZ12.2 Processing IDocs in Parallel Transaction: RZ12 Menu Path: SM59 RFC RFC Groups SAP ALE Training Program 5.1 Creating IDocs If you have more than one application server available. If you select Parallel posting in the RBDAPP01 program. Do not use parallel processing for processing inbound IDocs in an interface that needs to be real-time. To do this. you can specify a server group for parallel processing.2. There is no reason to create transaction data IDocs in parallel.2. since transactions are single events. 5.2.1. you need to define a server group.

PricewaterhouseCoopers LLP 5. the larger the packet size can be.1. you will reduce the ability to process in parallel. You need to carefully balance packet processing and parallel processing. you must use the program RSEOUT00 to send the IDocs. You can send IDocs in packets by setting the Pack. If your packets are too large. 5. These function modules process many IDocs within one LUW. which reduces system load. which improves database performance. 5. because the system processes the IDocs within one dialog process.3. you can specify a packet size. You would normally schedule this to run at an appropriate time.3 Processing: Some processing function modules can process multiple IDocs with a single call. Grouping IDocs into packets is good even for function modules that do not support mass processing.1 Creation For a manual master data send.1.size field in the partner profiles. 5.1. The smaller the size of an IDoc. A general guideline is a packet size between 10 and 200 IDocs.3. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .2 Sending If you select Collect IDocs in the sending partner profile.3 Processing IDocs in Packets SAP ALE Training Program Processing IDocs in packets improves system performance by reducing the number of function module calls.3.1. and by using fewer dialog processes.

the object type is IDOC. the ALE developer should have a basic understanding of it. the system will start a batch job to restart a failed RFC connection. To stop this.1. You can restart unsuccessful connections with the program RSARFCEX. the system will stop writing IDocs to the database.error checkbox. Select the Suppress background job if conn. There is no message to indicate this. Using transaction SARA . select Destination→TRFC Options from SM59 (RFC Destination maintenance). 5.5 IDoc Archiving Transaction: SARA Although IDoc archiving is the responsibility of the Basis team. Once the tables have filled the space available. This can result in blocking of batch jobs.1.PricewaterhouseCoopers LLP 5.4 Managing Communication SAP ALE Training Program Normally. This creates a backup of the IDoc database tables. Program RBDOIND will check that outbound IDocs have successfully connected to the receiving system. so the Basis team needs to monitor it. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .

the entire segment is transmitted. For example.1 Steps in IDoc Reduction Here are the steps you must follow to create a reduced IDoc: Create a new message type Choose the segments and fields you want to include Activate the new message type Turn on/off change pointers Transport the new message type to other systems Configure the new message flow (Model. It can remove segments that would otherwise have been sent (as can segment filtering in the distribution model).PricewaterhouseCoopers LLP SAP ALE Training Program 6 Chapter 3 – IDoc Reduction SAP supplies “maximized” IDocs containing all segments and fields required for the basic requirements of the message type. The ALE layer will put a NODATA character – a "/" – into each field removed from the segment. The reduction excludes those fields that the receiving system does not need and therefore makes the IDoc easier to use. but for those segments still sent. Reducing an IDoc does not necessarily reduce network traffic. The receiving system will ignore fields that have this value. We can reduce the MATMAS03 IDoc to create a new message type that does not transmit the material group. Reduced IDocs are IDocs modified to only include the data that is valuable to the receiving systems. A customer implementation may use a certain message type. but may only need to populate a subset of the segments/fields. We can “reduce” this IDoc to simplify the communication. suppose that Business A and Business B each want to assign their own material group to a material.1. Note: We can only reduce IDocs for master data. Partner Profiles) This is PricewaterhouseCoopers PROPRIETARY MATERIAL . We can then transmit other changes to the material without overwriting the material group. 6.

2 Creating a Reduced Message Type Transaction: BD53 Menu Path: SALE --> Modeling and Implementing Business Processes --> Master Data Distribution Message Reduction Create Reduced Message Type. You must activate change pointers in each client in which you want to use them. This adds entries in the change pointer tables (BD50 and BD52) to configure change pointer use. SAP ALE Training Program Scope of Data for Distribution To create a reduced message type. change pointer activation is not. You must base your new reduced message type on a message type that SAP supplies.PricewaterhouseCoopers LLP 6. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . click on Activate change pointers.1. save the reduced message type. If you want to use change pointers to trigger the reduced messages. However. use transaction BD53. The new message type is client independent. After activating the required fields and segments (see the following section).

you can access the fields in the segment by double-clicking on that segment.3 Setting the Segment Structure SAP ALE Training Program In essence you are creating a copy of the SAP-supplied message type.1. click Save to save your segment structure. To select a field or fields. required fields are marked with (*). This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Once a segment is active. and selected by (+) (see key from previous slide).PricewaterhouseCoopers LLP 6. Your new message type inherits the same IDoc type as the SAP supplied message type. Segments that are required have a (*) following them. Caution: Double-clicking on a field or putting a checkmark in the box next to it and pressing enter is not sufficient to select it! If you do this and simply return to the previous screen you will lose your changes! When all segment/field selections are complete. non-selected with (-). not selected a (-). and selected a (+). use menu option Color/character→Utilities keyInitially all segments that are not required are not selected. therefore the same segments and fields. All segments possible for reduction are displayed here. To select a segment place your cursor on the segment and press the Select pushbutton. You must select a segment before selecting any fields in that segment. place a check mark beside them and press the Select button. For a complete key. As with the segments. This changes the indicator from (-) to (+) and selects the field.

Question: When you run RBDMIDOC. Which fields are being sent and which are not (the character '/' indicates an empty field)? 14. From the main BD53 screen. other systems need to recognize it.4 Transporting the Reduced Message Type Transaction: BD63 Menu Path: SALE --> Modeling and Implementing Business Processes --> Master Data Distribution Message Reduction Generate Transport Request for Message Type SAP ALE Training Program Scope of Data for Distribution After creating and activating your new message type. specify your reduced message type ZMATMASR##. On your Sales system. Why might this happen? This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Creating a Reduced Message Type. or change an existing one. Log into your Sales system and create a reduced message type named ZMATMASR## where ## is the last two digits of your logon ID. Note: Normally you would transport your newly created message type to the other systems in your ALE constellation using a CTS request. You can accomplish this by putting the message type into its own correction and transporting it. 9. 8. 17. If the transport assigned when the message type was created is valid for transporting. this is not necessary here.1. modify your customer distribution model MODEL##. 16. Choose and activate the segments and fields of your choice. Check your IDoc statistics on the Warehouse system. since reduced IDoc types are clientindependent. Base your reduced message type on the SAP supplied message type MATMAS. Add a new material. If. Return to your Sales system. Remember: Replace the message type with your ‘reduced’ message type!) 13. Run the ABAP program RBDMIDOC. Do you see your inbound IDoc (filter by your Sales partner)? Did it process successfully? C. however. However. B. and execute. (See chapter 8 exercises for step-by-step instructions. Create a material with MM01. 12. the correction that the message type is in has other data that you don’t want transported. Remember: This is an optional step. Add an entry from your Sales system to your Warehouse system for your reduced message type. Enter your reduced message.2 Exercise: IDoc Reductions Shading indicates one person per system at a time. 10. then you can skip this step. activate change pointers for your reduced message type. you can put the message type in a separate correction for transport. Go to transaction BD10 and send your material to your Warehouse system. you may create more than one master IDoc. The system will ask you for a change request number to use. Note: Make note of what segments and fields you chose for verification later! a. 6. The program should create at least one IDoc from your material.PricewaterhouseCoopers LLP 6. Check your IDoc statistics on the Sales system. Others will be "locked out"! A. Distribute the model and generate it on both systems. 11. Sending an IDoc using your Reduced Message Type. Do you see your outbound IDoc (filter by your Warehouse partner)? Look at your data records. Use transaction BD63. Using Change Pointers 15.

You can “extend” this SAP IDoc to add the needed information. You cannot add fields to existing SAP segments! This is PricewaterhouseCoopers PROPRIETARY MATERIAL .PricewaterhouseCoopers LLP SAP ALE Training Program 7 Chapter 4 – IDoc Extension Customer requirements may require more segments or fields than what an SAP supplied IDoc supplies. add customer-defined segments to existing IDocs. To extend an IDoc. and those segments are available in the extended IDoc. An extended IDoc is based on an SAP supplied IDoc. The extension type inherits the segments associated with the SAP supplied IDoc.

The data element for the segment structure must be of data type ‘CHAR’. and click on Create.PricewaterhouseCoopers LLP 7. Release the segment for transport. There are some rules that you need to follow when creating the segments: The name of each segment type must start with ‘Z1’ For each field in the segment you need to define a field name and a data element. Define the fields of your segment: o o o Field name Data Element for the field (from the ABAP dictionary). Note that the “Release’ column now has a check mark. Type your new segment name. Select Edit -->Set Release.1 Create The Extension Segment Transaction: WE31 Menu Path: Tools Business Communication IDoc IDoc Basis Development IDoc segments SAP ALE Training Program The first step in extending an IDoc is to create the new segments that will go into that IDoc. How to create new segments: Run the segment maintenance transaction WE31.1. Do not change the Export length! Save the segment Run Segment -->Check to check the segment for consistency. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .

You can only have one version of an extension type for each release.PricewaterhouseCoopers LLP 7. NOTE: A segment cannot appear more than once in an IDoc type! You must control the use of duplicate segments with the segment attributes (the next screen). enter the extension name. Execute transaction WE30. how many instances of the child segment may we have?” You can press the Segment Editor pushbutton to view or change the segment definition. You now have three options: Create new type: Does not refer to other extension types Create copy: Copies info from an extension type that already exists Create successor: Extends an extension type from a previous release of R/3. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Extension segments should not be mandatory (for future upgrades). Position the cursor on one of the segments and click Create. Enter the Basic IDoc type that this extension type will extend. The segment attribute screen appears. you can create the extension type itself.2 Create the Extension IDoc Type Transaction: WE30 Menu Path: Tools or: WE31 Business Communication IDoc type editor IDoc IDoc Basis Development IDoc types SAP ALE Training Program Goto After you create the segments to be added to the extension type. and click Create. and will need to have minimum and maximum number of instances defined. “for each instance of the parent segment. Enter the information and save. This will insert an extension segment as a child of the selected segment. This answers the question.1. The screen now shows the structure of the IDoc type you used as a reference. select Extension type.

you can restore unique allocation using transaction BD69.PricewaterhouseCoopers LLP 7. This relationship is used when IDocs are sent to or received from a partner to determine what segments are valid and what the hierarchy for those segments is. You can create a new message type for this. If a message type is no longer uniquely identified to an IDoc. so. you need a one-to-one relationship for distribution via ALE. Note: the release assignment is not valid for prior SAP releases. Extension type. First the message type itself needs to be created.1. associate it with the corresponding Basic IDoc Type and Extension Type. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . MATMAS becomes ZMATMAS). After creating the message type. Transaction: WE81 Menu Path: Tools or: WE30 Business Communication Message types IDoc IDoc Basis Development Message types Environment Create a new entry and save. however. and save your data.3 Create the new Message Type SAP ALE Training Program You can only use an extension IDoc type by assigning it to a message type. Basic IDoc type. Use SAP established customer naming conventions (good form is to start with a Z and retain the rest of the related SAP message type. and Release. Transaction: WE82 Menu Path: Tools or: WE30 Business Communication IDoc IDoc Basis Development IDoc type/message Environment IDoc type/message Create a new entry and enter the Message type. for example. One message type can be associated with many basic IDoc types.

Changes to released types are not allowed. it’s a good idea to test it. but it is fairly complicated to do. however. A segment’s release. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . The extension type can be ‘unreleased’.4 Check the Extension Type After creating a new extension type. This check will try to verify all objects related to the object you selected for validity and consistency. go to transaction WE30. except "Extension type is not released (RC =4)".PricewaterhouseCoopers LLP 7. you can release the extension. Once you have tested your extension type. SAP ALE Training Program From the main Develop IDoc Types screen select the IDoc type you want to check and select Check→Development Object. and select the menu option Set →Edit release. and everything works right.1. You have to do Edit Cancel release → to enable modifications. Do not release the extension type until you have tested it. To do that. All return codes should be zero (RC =0). can be canceled without much difficulty.

This includes: Adding your new message type to the distribution model. NOTE: You must create the inbound partner profile manually. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . More on this later. you must properly configure the ALE layer to process your new message. Since you have created a new message type.1. Creating partner profiles.PricewaterhouseCoopers LLP 7.5 Communication Parameters SAP ALE Training Program Remember that all ALE configuration is based on the message type. The generation function will not work because the system does not know how to process your new message type.

using transaction BD50.6.6 Master Data Outbound Configuration If your extension is to handle master data.2 Activate Change Document Items Transaction: BD52 Menu Path: Tools ALE ALE Development IDocs Change Define change-relevant fields For standard SAP supplied messages.1 Activate Change Pointer for Message Type If your extension type will handle master data using change pointers. the system does this automatically. you must explicitly state what field(s) will trigger the creation of change pointers when changed. then you must activate them for the extended message type. add a record with the table name and the field name KEY.1. When creating the extension. With a customer created extension message type. 7. If you want to create a change pointer when a master data item is added. When creating a reduced IDoc type. but when creating an extension you must enter it yourself. The easiest way to determine the entries is to copy them from the message type you are modeling.1. you need to activate the change pointers. all fields within the message type will create change pointers by default. there is more configuration to do: SAP ALE Training Program If distribution is to be done automatically through change pointers. The system must know which fields should trigger the creation of change pointers.1.6. See the Distribution Methods chapter for details. the system needs to know which function module to use. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .PricewaterhouseCoopers LLP 7. 7. Each row entered indicates that any modification to that field causes the creation of a change pointer.

and the message type. the IDoc type.2 Inbound Transaction: WE57 Menu Path: Tools type ALE ALE Development IDocs Inbound Processing Function module Assign IDoc type and message On the inbound side. Enter the function module name. the basic IDoc type. but not when you create an extension! You can click New Entries and enter the message type.7 7. The system uses this process code to determine which function module to use to create the IDoc.1 Assign Function Modules to Message Type Outbound Transaction: BD60 Menu Path: Tools ALE ALE Development IDocs Change Define function module for evaluation SAP ALE Training Program When you create an extension IDoc type. SAP updates this table for you automatically when you create a reduction. and the name of the function module used to populate the IDoc.7. You can click New Entries and enter the name of the function module used to populate the IDoc. you also need to specify an outbound process code in the partner profile. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . you must tell SAP how to populate it. but it’s much easier and safer to copy the entry from the message you based your extension type on.1. the SAP system must know what function module is to process that message type and extension. 7.1. but it’s much easier and safer to copy the entry from the message you based your extension type on. Transaction: WE41 Menu Path: Tools Business Communication IDoc Basis Control Outbound Process Code If you are using Message Control for transactional data.7. the extension type. It’s much easier and safer to copy the entry from the message you based your extension type on.PricewaterhouseCoopers LLP 7.1.

8 Filling and Extracting Extension Segments SAP ALE Training Program Although the segments are now defined to be sent or received. Create an extension of the SAP supplied IDoc MATMAS03. Note that most materials are not radioactive. Check and release the segment. there is no current way to manipulate the data in the segments.PricewaterhouseCoopers LLP 7. we need to find a user exit in the application code. Inc. This table stores two extra pieces of information for each material that is radioactive: the Half-Life and the Half-Life Unit. and read the data on the Warehouse system into table ZMARANUC. the supplied user exit will not work! Scenario: Springfield Nuclear Power. called ZMARANUC. 7. Others will be "locked out"! This exercise has two objectives: 18. they have created a custom table. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . but the SAP-supplied material tables do not have the proper fields for radioactive materials. We need to make some source code changes! To post and extract data to and from an IDoc extension. where ## is your user number. Therefore. We also need to write user exit code on the Sales system to populate this segment from table ZMARANUC. We'll discuss how to program IDoc segments in the next two chapters. 7. User exits are found in the function modules. 19. 2. (Use SE80 to do this. They need to configure Material Master transfer using ALE. Create a development class called ZAL##. IMPORTANT: Use the object names given in these directions! If you use different names. is implementing SAP for its three nuclear power plants. 6.2 Exercise: Creating an IDoc Extension Only one person at a time can perform shaded steps. 21. The ABAP code to process an IDoc extension is added within an INCLUDE statement in the user exit. 3. so they will not have an entry in this table. which are tied to the process codes used by ALE. 5. Create an extension segment Create an extended IDoc type to merge this segment with MATMAS03 Create and configure a new message type for your extended IDoc type Configure the creation of IDocs using change pointers Perform outbound configuration Perform inbound configuration Test the scenario Detailed instructions: Step 1: Create an extension segment (both sending and receiving systems) 20. we need to build an extension to IDoc type MATMAS03 to store the extra information.1. Summary of steps needed to build this scenario: 1. to store extra information for the few materials that are radioactive. In the segment editor (WE31) create an extension segment named Z1SEGNUC#### where #### is your logon ID. Configure the distribution of Master data using Change Pointers. It should have the following fields: Field Name MATNR HALFLIFE UNIT Data Element MATNR ZHL ZHLU 22. In order to transfer these radioactive materials using ALE. 4.) Create a new change request when prompted. This is your task.

In the IDoc type editor (WE30) create an extension type named ZEXTNUC#### where #### is your logon ID. Associate your new message type to your Extension Type and SAP supplied Basic IDoc Type MATMAS03. 24. Check and release your extended IDoc type This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Make the segment optional. Add your segment Z1SEGNUC#### to the IDoc as a child of E1MARAM.PricewaterhouseCoopers LLP SAP ALE Training Program Step 2: Create an extended IDoc type to merge this segment with MATMAS03 (both sending and receiving systems) 23. Use the SAP IDoc type MATMAS03 as your reference type. (WE82) 27. Create a new message type called ZMESNUC#### where ## is your logon ID. Step 3: Create and configure a new message type for your extended IDoc type (both sending and receiving systems) 25. (WE81) 26. with minimum and maximum number equal to 1.

Run WE57 and copy the entry for function module IDOC_INPUT_MATMAS01 / Basic IDoc MATMAS03 / Message type MATMAS. Copy the entry for message type MATMAS. table name MARA. Add an entry from your Sales system to your Warehouse system for your extended message type. 32. Configure the function module to process your extended message type. Make sure that Change Pointers are activated generally. Maintain the function module to create your extended message type. field name "KEY". c. This will cause the creation of change pointers when creating a material. a. BD61 29. Modify your customer distribution model MODEL##. Add an entry for object “MATERIAL”. b. 30. BD50. 36. BD60. Important: Set the inbound parameters to Trigger by background program! This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Replace message type MATMAS with your extended message type Enter. Configure the change document items for your extended message type. BD52. Generate the outbound partner profile.PricewaterhouseCoopers LLP SAP ALE Training Program Step 4: Configure the creation of IDocs using change pointers (sending system) 28. Enter your extension type. 33. Step 6: Perform inbound configuration (receiving system) 35. Generate the inbound partner profile. You only need to change the message type to your extended message type and enter. Step 5: Perform outbound configuration (sending system) 31. Distribute the model to your Warehouse system. 34. Activate Change Pointer creation for your new message type.

Was the extension data posted properly? Question: Why was it necessary to use RBDAPP01 to process the inbound IDocs? This is PricewaterhouseCoopers PROPRIETARY MATERIAL . If all is set up correctly. 39. you should receive a message that at least one master IDoc and communication IDoc were created. Run APAB program RBDAPP01 (or use transaction BD87) to process your IDocs. Check your IDoc statistics. Run SE16 to look at table ZMARANUC. This program creates IDocs from change pointers that have been created for the message type you specify. Run the program RBDMIDOC (or transaction BD21). Run custom transaction ZNUC to add the extension information to table ZMARANUC for this material. Be sure to write down the material number created! 38. Do you see your outbound IDoc? On your Warehouse system: 41. 40. Use any number for the Half-Life. In this case specify your extended message type. 42. and “H” (hours) for the Half-Life Unit.PricewaterhouseCoopers LLP SAP ALE Training Program Step 7: Test the scenario On your Sales system: 37. Run transaction MM01 and create a new material. Check your IDoc statistics. Do you see your inbound IDoc? Did it process successfully? 43.

PricewaterhouseCoopers LLP SAP ALE Training Program 8 Chapter 4 – Communication Parameters This chapter describes the fundamental communication configurations for ALE. The maintenance of the RFC destinations is not a part of the automatic transport and correction system. The Remote logon function allows you to logon to the remote system and start a session. RFC Destination configuration is required for SAP-to-SAP ALE distribution. The Test connection function checks the connection with the external system and allows you to check the performance times for making this connection. There are many types of RFC destination. For R/3 connections for SAP-to-SAP distribution. but is not needed for inbound distribution. configuration is easier because we can automatically generate the partner profiles (described later). if the RFC destination has the same name as its corresponding logical system. To create or maintain RFC destinations. CAUTION: The names of RFC destinations are case-sensitive! This is PricewaterhouseCoopers PROPRIETARY MATERIAL . In fact. with the most common being R/3 and TCP/IP connections. use transaction SM59. • RFC Destinations Transaction: SM59 Menu Path: Tools →Administration Administration RFC→Network destinations An RFC (Remote Function Call) destination defines the connection parameters to another system. RFC destinations should “map” to the desired logical system. or outbound distribution using a file interface (such as a legacy system interface or a file-based EDI scenario). We need to make the settings manually on all systems. indicate the target machine and instance along with necessary login information. These are the minimum configurations required to establish a simple data transfer.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL . The program can reside on the application server. a specific machine.PricewaterhouseCoopers LLP SAP ALE Training Program For TCP/IP connections. The Test connection function allows you to check the performance times for connecting to the external system. and machine that will receive and process outbound IDocs. specify the path. program. or on the workstation itself.

which must exist before creating the port. • • Transactional RFC Ports Transactional RFC ports point to an RFC destination. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . You need to create ports manually for all other system types. They also indicate if the transfer is file based or tRFC (or R/2. etc. tRFC ports merely function as a pointer to an RFC destination.PricewaterhouseCoopers LLP SAP ALE Training Program • Ports Transaction: WE21 Menu Path: Tools →Business Communication IDoc Port→IDoc Basis Definition Ports establish the linkage between the partner profiles (discussed in detail later in this chapter) and the RFC destinations for outbound transfers. Some of the more important ones are: Transactional RFC File R/2 system XML The system can automatically generate a transactional RFC port if the logical system name is the same as its corresponding RFC destination (between R/3 systems only!). use transaction WE21. To create a port. Simply create a new entry and associate it to a pre-created RFC destination (field Logical destination). We define the actual connection parameters in the RFC destination itself. Define a tRFC port for R/3 to R/3 connections and for any R/3 to external system connections that use a remote function call interface.).There are several types of port.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL .PricewaterhouseCoopers LLP SAP ALE Training Program • File Ports File ports can contain configuration for any or all of the following: Outbound file: A file to receive outbound IDocs. Status file: A file to store IDoc status records. Inbound file: A file to supply inbound IDocs.

message type. with these differences: Only outbound transmission is supported. or user id. rather than IDoc text. o Choose a function module that generates a filename from timely information. • • XML Ports An XML port is similar to a File port. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .PricewaterhouseCoopers LLP To configure a file name for one of these files you need to supply SAP ALE Training Program the following: The directory (on the application server) where the file is found. You also have the option of including a Document Type Definition (DTD) in the XML file created. You have two options: o Specify the actual file name. such as date. time. The name of the file. The file will be written in XML format. End this entry with a ‘/’ character.

We'll look at this configuration in detail in a later chapter. the Partner number is the receiving system. The partner profile configures the ALE layer. This information is different for senders and receivers. while the RFC destinations and ports configure the communication layer. Receiver of notifications is a Workflow configuration for error handling. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Message Control parameters control the sending of messages from an application that uses Message Control (also called Output Determination) . then assign parameters to it as follows. After you create the profile.Separation of Sales and Distribution. In the receiving system profiles. Partner class is a free text field that lets you classify partners. The Partner type is always “LS” (logical system) for ALE. The Partner number is the logical system name of the “other” system: In the sending system profiles. for example. the partner profile specifies information that the ALE layer needs to properly create or process the IDocs.PricewaterhouseCoopers LLP SAP ALE Training Program • Partner Profiles Transaction: WE20 Menu Path: Tools →Business Communication IDoc Partner→IDoc Basis Profile The partner profiles tell the ALE layer how to send messages between systems. the Partner number is the sending system. Given a message type and a communication partner system.

We’ll discuss the collection of IDocs for batch sending in a later chapter. The IDoc type to use for the message. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . This port can point to an RFC destination or to a file.PricewaterhouseCoopers LLP SAP ALE Training Program • Partner Profile Outbound Parameters The outbound parameters provide information for creating outbound IDocs: The receiver port to use. Whether to send the IDocs immediately or to collect them for sending in batches. If IDocs are collected for batch sending. as discussed earlier. Workflow configuration for handling errors. the package size to use.

This code points to a function module (or to a workflow) that processes the IDocs. Workflow configuration for handling errors. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . or to wait to process in the background. We’ll discuss the processing of IDocs in the background in a later chapter. Whether to process the IDocs immediately.PricewaterhouseCoopers LLP SAP ALE Training Program • Partner Profile Outbound Parameters The inbound parameters provide information for processing inbound IDocs: The process code to use.

PricewaterhouseCoopers LLP SAP ALE Training Program • Partner Profile Generation Transaction: BD82 Menu Path: BD64 Generate→Environment partner profiles Under most circumstances. and generate the partner profiles on each system from the model. you maintain the distribution model on one system. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . The receiving system will not generate a profile for any message received with a different receiving logical system name than is allocated to it. Restrictions on generation: Each receiving logical system in the model must have an RFC destination defined with the same name as the logical system. distribute it to the other systems. Normally. SAP can use your distribution model to generate partner profiles for you automatically.

or maintain the profiles manually. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . SAP ALE Training Program If you have errors. you can correct the problem and run the generation again.PricewaterhouseCoopers LLP Parameters for the program: The model view or views from which to generate profiles Workflow configuration for errors Outbound IDoc packaging options Inbound IDoc background processing options The results are color-coded: Green: The generation was successful White: The profile or parameter already exists Red: an error occurred during generation You can double-click on any line in the results to run the corresponding maintenance program.

The SYNCH message type configured in the partner profile for that system. you must have: configured an RFC destination for that system. you maintain the distribution model on the one system designated as the owner of the model.PricewaterhouseCoopers LLP SAP ALE Training Program • Model Distribution Menu Path: BD64 Edit →Model view Distribute Typically. Remember to generate the partner profiles on the other systems after distributing the model. Execute. The program will automatically check any systems that are represented in the model as sender or receiver. To distribute a model to another system. but you can add or remove systems from the list. To distribute a model: Enter the name of the model view you want to send Click the boxes of the systems you want to receive the model view. The profile generation program will automatically create this profile parameter for all systems represented in any model that you generate. The program will give you color coded messages with success (white) or failure (red) for each receiving system. Then you distribute it to the other remote SAP systems. Therefore. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . you should generate your model on its owner system before distributing it to other systems.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL .PricewaterhouseCoopers LLP SAP ALE Training Program • ALE Configuration Summary • Inbound Configuration requirements are similar for all inbound transactions. regardless of type.

If it does exist. R/3 to Legacy File based with RFC uses a TCP/IP type destination pointing to RFCEXEC and a File type port with a command file parameter pointing to a server executable that receives and processes the IDoc. below. partner profiles. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . b. create it. Define the RFC Destination In order to communicate with your Warehouse system. h. RFC destinations. Enter the information: a. c. • Exercise: ALE Communication Parameters In this exercise.PricewaterhouseCoopers LLP SAP ALE Training Program • Outbound Outbound ALE messages require configuration of all pieces (logical systems. CAUTION: Do not select the Current user checkbox. Click Save. You will distribute a material record from one client to another Caution: Only one person at a time can perform shaded steps. CAUTION: This field is case-sensitive! Connection Type: 3 Description: descriptive text Client: your Warehouse system's client number User: your logon id. R/3 to Legacy File based uses only a File type port with an outbound file parameter pointing to the path and filename the IDoc is to be written to. f. R/3 to Legacy RFC based uses a TCP/IP type destination pointing to a server program executable that receives and processes the IDoc and a RFC type port. 2. and distribution model). your Sales system must know how to reach it. 1. You can click on Test Connection to test the connection to the other system. RFC Destination: your Warehouse logical system name. 4. If the RFC Destination for your Warehouse system does not exist. g. R/3 to R/3 uses a RFC type destination and a transactional RFC type port. ports. Run SM59. Please work quickly so that others will not be locked out for too long! A. d. proceed to Partner Profile Generation. or Remote Login to log into it. e. Password: your logon password Target host: your Warehouse system's host name System number: your Warehouse system's system number 3. you will configure message flow between two SAP systems using ALE.

(Distribution Model Maintenance).) C. Model View Distribute. which combines your logical system with the message types defined and associates it with a port to the physical system. Environment Generate partner profiles from the Model Maintenance (BD64). 3. 4. 2. Go to Environment Change partner profile (or WE20) to see what the automatic generation did. If any of your messages are red. D. Highlight your distribution model and follow menu path Edit Enter your model name and enter. 1. this indicates an error. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Enter your model name (MODEL##) and click on Execute. Generate the Inbound Partner Profile 1. 3. 2. You should see a message indicating successful transfer. Note: Ignore any errors listed involving an RFC destination for your Sales system. Generate the Outbound Partner Profile You will now create a partner profile.PricewaterhouseCoopers LLP SAP ALE Training Program B. The system automatically creates the appropriate partner profile and generates colorcoded status messages about what it did. This will not affect inbound processing. (Created a port and a partner profile. 1. Distribute the Customer Model You will now distribute the distribution model you created earlier to the other system. which you should correct before proceeding. Select the proper system to receive the model and execute. Run BD64. Repeat the partner profile generation (Step B above) on your Warehouse system to create the partner profile on that system.

and your Warehouse system name. where “##” is the last two digits of your logon ID. Enter a short description. Sending System: Message Type: Your Sales system MATMAS Receiving System: Your FILE## logical system 4. Highlight File. Run WE20 to enter it manually. 5. You will not be able to generate the partner profile automatically (Why not?). 3. Run transaction MM03 to see if your material was successfully added to the receiving database. 10. and select the function module EDI_PATH_CREATE_USERNAME. 3. b. Drill down into the IDoc to look at the control. Its status should be 53 “Application document posted”. Make note of the material number assigned! 4. Partner Number: Partner Type: Message Type: Receiver Port: Output mode: FILE## LS MATMAS FILE## Transfer IDoc immediately 6. You should see message boxes saying that 1 master IDoc was set up and 1 communication IDoc was sent. B. Do not allocate this logical system to any client. Enter the number of the material you created. Use the information on the sheet handed out in class to create the material. 6. a. and then click on Create outbound parameter. b. Drill down into the IDoc to look at the control. c. Configure Outbound Processing 2. Enter the information: This is PricewaterhouseCoopers PROPRIETARY MATERIAL . 2. Log into your Warehouse system and use WE05 to look at the received message. A. Click Create and enter the information: a. Log back into your Sales system. and then click Execute. Configure Outbound File Port 1. 8. c. On the Outbound file tab. Test your configuration by sending a material from your Sales system to your Warehouse system. 5. Save. How are they different from the outbound records in the Sales system? 11. Create a new logical system (BD54) called FILE##. Change your distribution model (BD64) to add a message: a. On your Sales system. This is the ALE Material Master Data Distribution program. you will configure material output to a file port. 2. the message type to use (MATMAS). The status should be 03 “Data passed to port OK”. 9. then click on Create.PricewaterhouseCoopers LLP SAP ALE Training Program E. Save your model. change the Physical directory to “/tmp/” (note a / at both the beginning and the end). data.x record types is checked. then read input from this port. Execute transaction BD10. Name your port PORT##. Leave the Outbound file field blank. 4. Create a new material using transaction MM01. run transaction WE21. and status records. Run transaction WE05 to look at the status of your message. b. and make sure that release 4. Save. data. and status records. 7. 5. • Exercise: Using a File Port In this exercise. Send a Material 1. 6. 3.

PricewaterhouseCoopers LLP SAP ALE Training Program d. Basic Type: MATMAS03 This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Save. 7.

D. 2. (Note: The system does not put newlines into the XML file. so you will not be able to see the entire file. If you want to look at the entire file. Send a Material 1. Use BD10 to send this material to your logical system FILE##. 3. You should get one Master IDoc and one Communication IDoc. Using an XML port.PricewaterhouseCoopers LLP SAP ALE Training Program C. 4.) This is PricewaterhouseCoopers PROPRIETARY MATERIAL . 3. Create a new XML port called XML##. Change your partner profile entry for the FILE## logical system to use the XML## port instead of the FILE## port. Resend your material to the FILE## logical system. Double click on the file named with your username to look at the IDoc. 2. Run MM01 to create a new material. 1. Follow the guidelines on the sheet given out in class. Use the same outbound parameters as in step A above. 4. ask the instructor for help. Run AL11. Use AL11 to look at the resulting XML file. and double click on the /tmp directory.

o The application does not post its data yet.PricewaterhouseCoopers LLP SAP ALE Training Program 9 Chapter 5 – ALE Architecture • Outbound Processing • Application Transaction Create the application document o Outbound processing begins with the SAP application transaction. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Instead. it waits until the ALE layer creates the outbound IDocs. This transaction creates a document that needs to be sent to another system with ALE.

It also processes any filter objects (from the model) associated with the message flow. the ALE layer reads the distribution model to determine the receiver(s). o Alternatively. then it does so by calling a function module appropriate for the message type. o The application passes this Master IDoc to the Distribution Layer in an SAP internal table. o If no ALE IDoc is needed. These filters specify certain pieces of data that the receivers do not need. If the transaction does not look at the filter objects. processing stops and the application posts its data to the database. and determine which objects the application will include in the IDoc. the application can use Message Control to determine if it needs to create an IDoc. for each receiver. o If the SAP application did not specify a receiver for the message. the SAP application posts the application data in its normal manner. o If there are no receivers defined in the model. it queries the ALE distribution model to determine whether it needs to send the data somewhere with ALE. o Some transactions may also check the distribution model for filter objects. We will discuss Message Control in a later chapter. Create the Master IDoc o If the model indicates that the application program needs to create an IDoc. • Distribution (ALE) Layer Read the Distribution Model. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . then the ALE layer will do the filtering.PricewaterhouseCoopers LLP SAP ALE Training Program Read the Distribution Model o When the SAP application is ready to post the document to the database. Create the Communication IDocs o The ALE layer then creates a separate copy of the Master IDoc. called a Communication IDoc.

Examples of field value conversions might include converting a 10digit customer number to a 15-digit customer number.PricewaterhouseCoopers LLP SAP ALE Training Program ALE Layer IDoc Processing o Next. The ALE layer can also filter out specific segments. The ALE layer can convert the IDoc’s control record to a different R/3 release version. The conversion of field values is dependent on the message type and the receiver. The ALE layer can perform some simple conversion of values in the IDoc’s fields. [2] Note that there are two levels of filtering: IDoc level and segment level. This feature lets us distribute applications across multiple SAP releases. and EDIDS). This is PricewaterhouseCoopers PROPRIETARY MATERIAL .[2] Field Value Conversion. This ensures that the application document creation and the IDoc creation occur in the same logical unit of work. and is the reason SAP guarantees that ALE will work between different releases. Version Conversion. EDID4. so use it only when other methods are not appropriate. We specify the version of control record that a logical system uses in the port configuration. etc. suppressing the value of a particular data field. the ALE Layer performs a series of IDoc conversions. These segment filters are dependent on the message type and the receiver. which is what we’re talking about here. Conversion of field values will reduce the system performance. o IDoc Creation After the ALE layer completes the IDoc processing. The ALE layer can remove any segments that the receiver does not need. it stores the Communication IDocs in the sending system’s database (in EDIDC. if needed: Segment filtering. The system creates links (in the control record) to the application document and to the tRFC transaction id for the call to the other system After the call to the ALE layer completes. the application will post its data to the database and commit work. We’ll discuss this in more detail in a later chapter. The filter objects defined in the model primarily filter entire IDocs.

When the ALE IDoc is complete and Dispatch Control has determined when and how to send it. the Communications Service actually transmits the message. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . it sends it to Dispatch Control. which controls how the IDoc is sent (file interface or tRFC) and when the IDoc is sent (immediately or periodically in batches).PricewaterhouseCoopers LLP SAP ALE Training Program • Communication Layer Once the ALE layer has created the IDoc. Dispatch Control uses the technical communication parameters that we set in the partner profile. Sending the outbound IDocs in batch reduces the communications overhead.

Following this pre-processing. and passes it to the Distribution (ALE) Layer. the application posts it to the database and updates the IDoc’s status records in the same Logical Unit of Work. it may wish to avoid posting the data in the overtaken IDoc. the ALE layer writes the resulting IDoc to the SAP database. The ALE layer can provide simple data mapping and conversion. the application can determine if it has already received a more recent IDoc for the same inbound document. The ORDERS and ORDCHG IDocs are exceptions to this timing. • Distribution (ALE) Layer The ALE Layer performs the same IDoc processing as on the outbound side: Segment Filtering The segment filter removes any segments that the receiving system does not need for this message type. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Once the application document is ready for posting. Version Conversion. it reads the inbound configuration to determine: What type of input processing is required (Function Module or Workflow) When the IDoc is processed by the SAP application (immediately or periodically in batches) Which users to notify if there is an error in processing The ALE Layer then passes the IDoc data directly to the appropriate SAP application. If it has. it can check the serialization. In both cases. EDI. The ALE layer can convert the control record to the required version. the application executes a CALL TRANSACTION first. Field Value Conversion. Using the timestamp of the IDoc. When the SAP application processes the IDoc.PricewaterhouseCoopers LLP SAP ALE Training Program • Inbound Processing • Communication Layer The Communication layer receives an IDoc by tRFC. Not all of the SAP applications use this serialization capability. After the ALE layer stores the pre-processed IDoc in the database. and creates a link to the IDoc in the source system. • Application Layer The SAP application reads and processes the information in the IDoc and creates an application document for posting to the SAP database. or some other method. and then updates the status records.

RFCEXEC. EDID4. or by the running of RSEOUT00: Writes the IDocs to the file specified in the file port. this script will run the translator. but rather an SAP-supplied program that runs on the operating system. It writes these IDocs to the IDoc tables (EDIDC. and calls the Message Control system. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . based on the ALE configuration. This may include printing a hard copy or sending by ALE or EDI. This program is not an ABAP program. executes a shell script or other program that activates the EDI translator. The EDI translator vendor will generally supply the shell script that RFCEXEC uses to start the translator running. If the partner profile is set to "Collect IDocs". passing it the name of the file containing the IDocs. by IDoc) is required. which the translator then reads. whether it is directly from RSNAST00. Executes the program RFCEXEC. ABAP program RSNAST00 (which is scheduled to run on a periodic basis) reads the NAST records and creates outbound IDocs for each one. If the partner profile is set to "Send immediately". In general. An EDI scenario may or may not use all of these elements. EDIDS). then the ALE layer will send the IDocs at this time. The ALE layer does two things in sending an IDoc. Message Control (also called Output Determination) determines where to send the document. If out by ALE or EDI (that is.PricewaterhouseCoopers LLP SAP ALE Training Program • Outbound Processing for EDI This is the normal process flow for creation of outbound EDI IDocs. then Message Control writes a record to the NAST table. then the ALE layer will not send the IDocs until the ABAP program RSEOUT00 (also scheduled for periodic execution) runs. This program calls the ALE layer to send all collected IDocs of any specified message types. in turn. etc). The application program creates its document (purchase order.

and activity type information. these are: material. If the data DOES exist on the fetching system. then use the appropriate master data fetch program. Currently. You can only fetch those master data types that have a fetch message type defined. To configure a fetch. simply define a fetch message type in the direction opposite from the master data message type in the distribution model. Use a send when you create or maintain a master data record on a central system and push it out to multiple distributed systems. vendor. customer. If the data DOES exist on the receiving system. then the receiving system creates it. It only changes the information that is different from the record on the receiving system. If the data does not exist on the receiving system. then the fetching system changes the record. If the data does not exist on the fetching system. profit center. It only changes the information that is different from the record on the fetching system. You cannot fetch all master data types. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Use a fetch when you create or maintain a master data record on a distributed system and pull it in to the central system. general ledger. cost center. then the receiving system changes the record. You can send any of the types of master data available to ALE.PricewaterhouseCoopers LLP SAP ALE Training Program 10 Chapter 6 – Data Distribution Methods • Configuring Master Data Fetch We can trigger the distribution of Master Data from either the source system or the destination system. then the fetching system creates it.

you can achieve near-real-time distribution. or deletes a master record.PricewaterhouseCoopers LLP SAP ALE Training Program • Triggering Methods The methods we can use to trigger ALE distribution vary by the data type. o IDoc distribution using the SMD is generally a batch (not real-time) process. This is useful when there is one central system where the data is created and then transmitted out to multiple distributed systems via ALE. the message type. o Automatic distribution will work for all the master data types available to ALE. o If multiple changes are made to a master record between distributions. o If a user creates. and the logical system of the receiving system (send only). • Master data Manual Program o We can send data directly from an ABAP program. the system will incorporate all of the changes into one change document for that master record. Automatic Send o We can use Change Pointers to automatically distribute the data. SAP provides such programs for most kinds of master data. but rather waits for the next scheduled send. The system does not send IDocs at once. the Shared Master Data (SMD) system will send the record automatically. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . o Enter the appropriate data on the master data send/fetch screen. then any logical system that has the pertinent message type in the distribution model will be included in the ALE transmission. changes. blocks. with customization of the tool. o If you do not enter a logical system. However. which includes the master data to be sent. You can access these programs with menu path Tools ALE Master Data Distribution.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Message Control o We can use Message Control to automatically distribute the data. The message control system allows the sending of data in real-time.PricewaterhouseCoopers LLP SAP ALE Training Program • Transaction data Direct ALE Call o The transaction program may contain a call to the ALE layer to send the IDoc directly.

The ALE-relevant fields are configurable by message type. the program writes a change pointer to the database. which database table was modified). it creates a master IDoc for the object referenced by the change pointer. The ALE layer reads the distribution model and generates communication IDocs as usual. When it finds a change pointer for a particular object. including filtering. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . and also indicate which part of the master data record changed (that is. it waits until the change document and change pointers are written. If the field that is changed is one that receiving systems are interested in. The change document service examines which fields have been changed. The change pointers are message type specific. version change.PricewaterhouseCoopers LLP SAP ALE Training Program • Automatic Master Data Send with Change Pointers SMD outbound processing begins with the SAP application transaction that changes master data that needs to be sent to another system with ALE. Change pointers are the mechanism by which the SMD tool operates. Normally this program is scheduled to run periodically for different message types. ALE rules. Instead. A standalone program (RBDMIDOC) analyzes the unprocessed change pointers. The application does not post its data yet. etc.

SAP proposes a default set. This sets up data change detection for individual message types. Use BD61.Generally Activate change pointers generally. This is optional – if you want to use SAP's default set of fields. Transaction: BD52 Menu Path: Tools ALE IDocs→ALE Development Management Define Change-Relevant Fields Engineering Change Define change-relevant fields.This allows you to set which fields in the master data record should trigger the writing of a change pointer. based on the distribution model. Transaction: BD50 Menu Path: SALE Modeling and Implementing Master data Distribution→Business Processes Replication of Modified Data Activate Change Pointers for Message Types Activate change pointers for message type. but not always. This “turns on” the SMD system. This program (RBDMIDOC) will look for records that have changed.PricewaterhouseCoopers LLP SAP ALE Training Program • Configuring the SMD Tool These are the steps needed to configure an automatic master data send: Transaction: BD61 Menu Path: SALE Modeling and Implementing Master data Distribution→Business Processes Replication of Modified Data Activate Change Pointers . You must activate this flag in order for ANY change pointers to be written. and send them to the appropriate receiving systems. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . which usually. Use BD52. includes every field in the table. Use BD50. and allows the automatic change detection routines to work. Schedule IDoc creation job. you do not need to configure this.

only MM and SD applications can use it. We can configure a document to produce many kinds of output: Printed forms on a printer Fax output EDI output ALE output The methods for configuring message control differ in each functional area.PricewaterhouseCoopers LLP SAP ALE Training Program • Message Control Message Control (also called Output Determination) is a part of the functional configuration that determines what output types to use when creating a transaction document. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Specifically. and message control is not available for all functional areas.

internal order message This is PricewaterhouseCoopers PROPRIETARY MATERIAL . A requirement is a special ABAP program used to implement complex business logic. This does not mean they will all be generated. May also be called Message Type (but this is not the same as an ALE message type). o Examples: Order confirmation. Quotation Output Type -.In general. This is the set of possible outputs for an application. an order is not created unless data meets certain validations. timing. Although several can be configured. etc. May also be called Procedure. o Example: Sales Scheme -. o Examples: Order. For example.The type of message created. only one is active. Using transaction VOFM it is possible to add requirements to an output type in the scheme. the application document created. A scheme defines a set of possible output types for an application. with examples for configuration of sales orders: Application -. The output type defines the characteristics of the output. These components are as follows.The application area.PricewaterhouseCoopers LLP SAP ALE Training Program • Hierarchy of Message Control Components The configuration of Message Control involves many layers of components. Each application capable of message control has a unique twocharacter ID. such as medium.

the system proposes the output ignoring the remaining rules in the access sequence.A list of outputs to create under certain conditions. This identifies the business rules to check before proposing output. printed output for all others This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Sales org/customer Conditions -. The system will only propose an output when the values match the records in the condition table. With inclusive rules. or you can create new ones. o Examples: Order type. You can chose exclusive or inclusive rules. and the order in which to check them. These are the actual values checked in the business rule.Defines the fields used to look up condition tables.PricewaterhouseCoopers LLP SAP ALE Training Program Access Sequence -. o Example: EDI for customers in sales organization 0001. A large set of standard tables is available. It is also possible to add ABAP requirements through VOFM to check specific business rules based on the fields in the condition table. all rules must be true before the output is proposed. An exclusive rule means that when the first rule evaluates to true.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL . the IMG path for Sales Documents is: Sales and Distribution --> Basic Functions --> Output Control --> Output Determination --> Output Determination Using the Condition Technique --> Maintain Output Determination for Sales Documents Condition records are application data. as well as most schemes you will ever need. you should define these components from the bottom up. In general. output types. You find the programs to create them as part of the application menu path. SAP considers schemes. and access sequences to be configuration data. These include all of the application areas. For example. You will find the programs to maintain them in the IMG. you should create the condition tables.PricewaterhouseCoopers LLP SAP ALE Training Program • Configuring Message Control The R/3 system comes with a set of default message control configurations. That is. For example. which we can add to or change. the menu path to create condition records for Sales Documents is: Logistics --> Sales and distribution -> Master data --> Output --> Sales document --> Create. then the access sequences. and so on to finish with the scheme.

O.PricewaterhouseCoopers LLP Here are some common configuration hierarchies: Materials Management: Condition Type Procedure RMBEF1 RMBEF1 RMBEA1 SAP ALE Training Program Logical Message Type ORDERS ORDCHG REQOTE Application/Transaction EF/Purchase Order EF/P. Change EA/Request for Quote NEU NEU (with change flag) NEU Sales and Distribution: Application/Transaction V1/Sales Orders V1/Quotations V2/Delivery Notes V3/Invoicing Condition Type BA00 AN00 LAVA RD00 Procedure V10000 V06000 V10000 V10000 Logical Message Type ORDRSP QUOTES DESADV INVOIC This is PricewaterhouseCoopers PROPRIETARY MATERIAL .

a business need that must be met before triggering the output. which may differ with different partner types. Defines which Access Sequence to use for each Output Type.PricewaterhouseCoopers LLP SAP ALE Training Program • Configuring Message Control: An Example As an example of the required Message Control configuration. which represents Distributed Contracts. o The program used to process and output the data. as well as many options and parameters for the Output Type: o The medium and timing. Defines the fields of the condition tables used to determine output. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . o We use Access Sequence 0001. Associates Output Types with Schemes. The Message control system creates each output type in the sequence specified here. o We will use Output Type VNEU. although the functioning of the programs is similar. o We use scheme RMBEV1. Note: Transaction codes given here are specific for the Distributed Contract scenario. Remember that you must define new entries from the bottom of the hierarchy to the top. which represents a purchasing agreement. The local facilities can then create purchase orders referencing this contract. the output occurs. Message Schemes (M/68). Each access sequence corresponds to a different condition table. which will use condition table 26 (Purchasing by Document Type) Maintain Output Types (M/38). which in our example creates the IDocs from the application document. Define Access Sequences (M/52). Each output type may have a Requirement Routine . let’s consider the Distributed Contract scenario. Transaction codes for other scenarios will be different. As a reminder. We need the following configurations. A Requirement Routine consists of ABAP/4 code. If the routine's return code is successful. A scheme is simply a defined sequence of output types. this scenario involved the creation of a contract at a central office which then sends it to distributed offices.

and other options for the IDoc distribution. which is document type MK. Assigns a scheme to an application. Condition Records (MN07). For example. so we will define output for a quantity contract. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Partner Profiles (WE20). Define the conditions that must be true to produce the output specified by the previous configurations. Defines the message flow between logical systems. o We associate our Output Type VNEU to new contracts. o We will model the flow from our Sales system to our Warehouse system. o We assign the scheme RMBEV1 to application EV (Purchase Outline Agreement). IDoc type. Defines the message type.PricewaterhouseCoopers LLP SAP ALE Training Program Fine-Tuned Control of Output Types (OMQO). Defines which output type to use in different situations within a given scheme. o We will generate the partner profile from the distribution model. o We defined our Access Sequence to use the Document Type Condition Table. port. Assignment of Scheme to Application (OMQT). ALE Distribution Model (BD64). we can define a different Output Type for an added document than we do for a changed document.

This is PricewaterhouseCoopers PROPRIETARY MATERIAL . and click on Message Control.PricewaterhouseCoopers LLP SAP ALE Training Program • Additional ALE Configuration for Message Control There is some additional ALE configuration to enable the Output Proposal from the document to trigger an ALE message. Using transaction WE20. We need to link the output determination message type to the ALE message type in the partner profile of the system. select your ALE message. Enter the message control output type that will trigger your message and the outbound process code. You need two entries here for each output type: one for creates to the transaction document and one for changes.

The status will have one of these values: YELLOW To be processed GREEN Successfully processed RED Incorrectly processed To view how an output was proposed. When the status is RED.PricewaterhouseCoopers LLP SAP ALE Training Program • Viewing Proposed Output Most application programs allow you to determine what output was proposed for any document. if by EDI. You can see which output types were proposed and the receiving party. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . You can drill down into these screens to see more details of each step. select the line with a single click and use menu path Goto --> Processing log to see a description of the error. use menu path Goto --> Determin analysis.

it writes a record to the NAST table. you cannot resend the IDoc. 0 = awaiting output 1 = output successfully processed 2 = an error occurred during output processing Once a NAST record has a successful status (1). Re-proposing the application document will rerun the output programs and create a new IDoc. This NAST record can have one of three status values. but is usually something like Goto Messages. you must go back to the application document and repeat the output. The new IDoc will contain any changes in the application document made since the first IDoc was created. If you need to resend the IDoc.PricewaterhouseCoopers LLP SAP ALE Training Program • Re-Proposing Output from NAST When the system determines output for an application document. and the ALE layer has sent the IDoc successfully. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . by program. The menu path varies.

users can make changes to the order. A group of transactions may need to be sent out together. delivery due list). to happen immediately or in batch. the customer may expect that all invoices generated that day be sent in a single EDI interchange. all subsequent changes will result in the creation of change orders. as well as certain external systems (e. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . or a later job may depend on the successful completion of IDoc processing. Until the time the Order IDoc is created.PricewaterhouseCoopers LLP SAP ALE Training Program • Batch Processing • Reasons We can configure most of the IDoc processing. purchase orders can be created and modified on the system over the course of the day and only sent out once a night. Once the IDoc is created.g. if a billing program creates multiple invoices for the same customer. Either case requires that the processing of all IDocs as a step in a batch process that can either trigger or be triggered by another step. For example. Transaction Sequence. Transaction Volume/Load Balancing. They can overwhelm the processing capabilities of the receiving system if the interface is set up to process everything immediately. EDI. post goods issue. The processing of some IDocs may depend on the successful processing of a preceding batch job.g. There are several reasons why the batch mode is generally preferable: Time Constraints. warehouse management systems) can create a high volume of transactions in a short period of time. Some SAP processes (e. Scheduling Dependencies. both inbound and outbound. Sometimes the processing of a set of IDocs must happen within a specific window of time. For example.

PricewaterhouseCoopers LLP SAP ALE Training Program • Batch Processing Programs SAP supplies some ABAP programs to allow for batch processing of IDocs: RBDMIDOC -. Generally. creates IDocs.Sends IDocs stored in the database with partner profile entries indication Collect IDocs. After that. RSEINB00 -.Processes inbound IDocs stored in the database with partner profile entries indication Background processing.Creates Master data IDocs from change pointers.Reads inbound IDocs from a disk file. RSNAST00 -.Reads records from the NAST table. RSEOUT00 -. RBDAPP01 -. and submits the IDocs to the ALE layer for distribution. Create a variant with the following fields filled: o Output application o Output type o Transmission medium o Editing an outbound document that has been saved and posted is possible only until RSNAST00 creates the IDoc. any changes to the document will trigger a separate IDoc. You must specify a message type for which to create IDocs. •The Output mode field of this program allows you to specify when the EDI translator (or subsystem) will run. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . which triggers the subsystem only once for each batch of IDocs. you should use mode 3. whose name you specify and submits them for processing.

Please work quickly so that others will not be locked out for too long! 1. You will distribute a customer record from one system to another.6B. • Exercise: Configuring a Transactional Data Scenario In this exercise. 6. Run transaction XD03 to see if your customer was created on your Warehouse system. Create a customer (transaction V-09) on the Sales system. • How to Distribute Control Data There are two methods for configuring control data distribution: Using the CONDAT message type in a distribution model. Generate your model on both systems. From the Warehouse system. BLAORD from Sales to Warehouse This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Consult online help if you need more information. Creating a Customizing Data Distribution Group. you will configure the distributed contracts transactional data scenario described in the Overview chapter. Maintain your distribution model (on the Sales system). although the CONDAT method is still available. 5. execute transaction BD13 to fetch your customer. This is the only method available in releases earlier than 4. • Exercise: Master Data Fetch In this exercise. Since Control Data Distribution control with ALE is rarely used. The Distribution Model defines the distribution of changes to customizing data. Caution: Only one person at a time can perform shaded steps. Add the following message flows to your distribution model: a. A. certain customizing data must remain consistent across all of the systems for ALE to function properly. and a message type DEBFET from Warehouse to Sales. You cannot use both at the same time. Distribute the model to Warehouse 4. Configure a message type DEBMAS from Sales to Warehouse. ALE Configuration 1. Look at the IDocs sent on both systems and check for successful processing. On your Warehouse system. 2.6B. 3. you will configure a master data fetch between two SAP systems using ALE. In fact.PricewaterhouseCoopers LLP SAP ALE Training Program • Distributing Control and Customizing Data We can control the distribution of control or customizing data with ALE. 7. 8. This method replaces the old CONDAT method in release 4. but we use CTS (Correction and Transport System) to actually distribute the control data to the other systems. configure an RFC Destination pointing to your Sales system. we will not discuss it further.

If you encounter errors. b. If you didn’t configure vendor or material distribution in previous exercises. add these as well: a. CREMAS from Sales to Warehouse MATMAS from Sales to Warehouse 3.PricewaterhouseCoopers LLP SAP ALE Training Program b. BLAREL from Warehouse to Sales 2. fix them before proceeding! This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Distribute your model and generate it on both systems.

Execute Partner Roles per Message Type for Outline Agreements. ii. This lets us select different output for different situations (for example. a new vs. 2. a. a changed document). 5. However. Execute Access Sequences for Outline Agreements. What condition tables are available? (To find out. we would configure Message Control from the bottom of the hierarchy to the top. Follow the menu path Materials Management Control. then click on SAP Reference IMG. Note the following entries: i. Go to the IMG. since this scenario comes preconfigured with the R/3 system. Transaction SPRO. Execute Message Types for Outline Agreements. a. These are the fields we can use as keys in a condition table. 4. a. c. iii. Execute Message Determination Schema for Outline Agreements. a. The Access Sequence (list of Condition Table fields) is DocType/PurchOrg/Vendor. b. Configure Message Control Note: In this section. it will be easier to understand from top to bottom. and that the Manual only checkbox is turned OFF. The default medium (on the Default values tab) is ALE. What procedure (or schema) are we using for this scenario? Select the procedure and double click on Control data. In this case. b. This lists the ABAP program that will actually produce the output. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Check that the output type VNEU is entered. Back out to the selection box. 3. it is the FORM routine called ALE_OUTPUT_BLANK_ORD in the program RM06EALE. Purchasing Messages Output Note: Normally. select the access sequence and double click on Accesses.) Which condition table would be most appropriate for our scenario? What database field(s) does this condition table use? 6. you will be looking at existing configuration.PricewaterhouseCoopers LLP SAP ALE Training Program B. then select Maintain Message Determination Schema: Outline Agreement. Check that there is an entry for Distributed Contracts (output VNEU) for ALE Distribution (medium A). since most of the configuration comes with the installed system. Double click on Processing routines. then select Maintain Message Types. b. 1. Double click on VNEU. and then select Fine-Tuned Control.

The output type in this case is NEU.PricewaterhouseCoopers LLP SAP ALE Training Program C. Create a record as follows: i. since we are creating a purchase order. This selects the condition table we will use. c. On your Warehouse system. follow the menu path Logistics Materials Management Purchasing Master Data Messages Outline Agreement Create. From the main SAP menu (not the IMG). configure the output of purchase order (release) information: 2. Timing MK (Quantity contract) A (ALE distribution) 4 (Send immediately) b. Or you can use transaction MN04. Medium: iv. Document type: iii. Enter the output type we are using (VNEU) and click on Key combination. a. Select the Document Type condition table. Select the Document Type condition table. Or you can use transaction MN07. Create a record as follows: i. Medium: iii. Create Condition Records On your Sales system. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . From the main SAP menu (not the IMG). Partner Function: VD (Vendor) Leave the other fields blank. b. a. Document type: ii. configure the output of quantity contract information: 1. Leave the other fields blank. Timing MK (Quantity contract) A (ALE distribution) 4 (Send immediately) ii. follow the menu path Logistics Materials Management Purchasing Master Data Messages Purchase Order Create.

Select the Basic Data and Accounting 1 views. If not. Is there a BLAORD IDoc sent? Did it post successfully on your warehouse system? If not. Use BD10 to send the material to the warehouse system. 6. Create a new Distributed Contract. Make a note of the contract number. b. and put in a price in Standard price. Follow menu path Header troubleshoot and fix. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . using the guidelines distributed in class. Create a vendor. Vendor The vendor you create above MK (Quantity contract) 001 The material you created above The total contract quantity The price per unit 01 Messages to see if ALE output was created. b. using the guidelines distributed in class. Save the contract. a. 3. d. Enter. Enter data: a. c. execute transaction ME31K. Set the Valuation class to 7920. b. 4. 2. Create Master Data 1. On your Sales system. 5. Net price Matl group 3. then add a line item for your material: 4. 1. c. Create a material. with the following additions: a. Agreement Type Purchasing group Material Targ. or menu path Logistics Materials Management Purchasing Outline Agreement Contract Create 2. the Price control to S. Run WE05 on both systems. qty. E.PricewaterhouseCoopers LLP SAP ALE Training Program D. Use BD14 to send the vendor to the warehouse system. fix any errors and repost using BD87.

execute transaction ME21.PricewaterhouseCoopers LLP SAP ALE Training Program F. fix errors and repost using BD87. and click on Adopt + details. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . fill in the quantity for this order and the plant (0001). In the line item for the material. 2. On your sales system. 7. 3. 5. to contract button and enter your contract number. Create a Purchase Order against the Contract. 4. then select the material line item and click on Release documentation. or menu path Logistics Materials Management Purchasing Outline Agreement Contract Display. and quantity release statistics. 1. Click on the Ref. Is there a BLAREL IDoc sent? Did it post successfully on your sales system? If not. On your Warehouse system. Enter the order price and save. Select your agreement. execute transaction ME33K. You should see the purchase order information. Run WE05. 8.

Results are colour-coded. Consistency Check for Application Number Ranges Transaction: BD70 This consistency checks displays the number ranges in the distributed systems.2 11. When selecting this check. both of the IDoc communications between the systems and the ALE configuration itself. as well as the status history.1. We covered this function in detail in the IDoc intro chapter. Consistency Check of the Distribution Model Transaction: BDM5 This transaction performs a technical consistency check of the distribution model: Do the logical systems referenced exist? Are the partner profiles and ports correct? Are the filtering and conversion rules OK? Is the inbound processing properly configured? The program checks the configuration in both the sending and receiving systems. you can look at any IDoc on the system. You use this information to verify that the number ranges on the distributed system are consistent with the distribution scenarios. AUFTRAG) and the distributed system(s) for which the ranges are to be displayed.4 This transaction allows the manual processing of IDocs. IDoc Lists All IDocs. ALE and EDI. connecting to the other systems via RFC. Remember that each step in the processing of an IDoc produces a status record. you specify the number range object (i.1. Mass IDoc Processing Transaction: BD87 Menu Path: Tools Messages ALE ALE Administration Monitoring Status Monitor for ALE 11..1 11.PricewaterhouseCoopers LLP SAP ALE Training Program 11 Chapter 1 – ALE Monitoring SAP provides a set of tools for monitoring the ALE installation.1. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Using transaction WE05. It has a selection screen to select IDocs to process. to see the current status of an IDoc. and then displays all of the IDocs selected sorted by their status codes.1.3 11. contain status records.e.

If so. only for the successful transfer.Retry sending IDocs after fixing the problem that caused the error.1. This is the single case where an outbound IDoc may have status records with inbound status codes. EDI_STATUS_INCOMING takes two parameters: The pathname of a file (on the application server) containing IDoc status records A file port pointing to a file containing IDoc status records. The serialization functions discussed in the ALE Processing Features chapter use this program to be sure that serialized IDocs were successfully sent.Process any IDocs that were held because Background processing is set in the partner profile.Attempt to repost IDocs that encountered a logical error in the posting transaction. Using the menu path Edit Execute LUW or Edit Execute LUWs you can retry any failed calls. that is. Try posting again -. Ignoring the IDoc syntax check – Send IDocs that were not sent because of syntax errors Dispatch -.PricewaterhouseCoopers LLP SAP ALE Training Program 11.6 Program: RBDMOIND The program RBDMOIND checks to see if specified IDocs have actually been sent to the receiving systems. Note that this program does not check for successful processing of the IDocs on the receiving system.1. You can specify an IDoc creation start date and the number of IDocs to check before committing the new status records to the database. EDI_STATUS_INCOMING reads the inbound status records from the file and appends them to the corresponding outbound IDocs. Check IDoc Dispatch Transaction: BD75 Menu Path: Tools Transactional RFC ALE ALE Administration Convert IDoc status Services Communication 11.5 You can then select which specific IDocs to process. tRFC Monitoring Transaction: SM58 Menu Path: Tools Administration Monitor Transactional RFC This transaction checks the status of all transactional RFC calls according to selection criteria. it changes the IDocs’ status from 03 (Data passed to port OK) to 12 (Dispatch OK).Send any IDocs that are held because Collect IDocs is set in the partner profiles. that the tRFC call was successful.1. This allows the tracking of the IDocs’ status from SAP. The specified port must be valid. but the function doesn’t use it if you provide a pathname. Here are some situations in which this program is useful: ALE configuration error -. Posting -. The report only checks IDocs with a status of 03. You can use it to check for failed tRFC calls. 11. Resubmit an edited IDoc – Send or post IDocs you have edited manually. Status Record Import An external system that receives IDocs from an R/3 system can send status records for the IDocs back to the R/3 system.7 This is PricewaterhouseCoopers PROPRIETARY MATERIAL . The external system sends the status records by calling the RFC function module EDI_STATUS_INCOMING.

we can then submit it for processing in several ways: Standard outbound processing using normal ALE configuration Standard inbound processing using normal ALE configuration Inbound processing using a specified function module When using the IDoc test tool. 11. The Turnaround Testing Tool Transaction: WE19 Menu Path: Tools Business Communication IDoc Basis Test Test Tool The turnaround testing tool takes an outbound IDoc in a disk file and converts it to an inbound IDoc by changing the control record.PricewaterhouseCoopers LLP SAP ALE Training Program 11.1. particularly when developing inbound posting programs. Creating an IDoc from scratch to see what data is required in a particular posting routine/transaction. Posting an IDoc in foreground (running the call transaction online) to investigate why an IDoc is failing.1. and then submit it for outbound or inbound processing. always completely exit a posting transaction before creating a new IDoc. The Test Tool allows us to create an IDoc manually. Common uses of the test tool include: Taking a copy of a current IDoc. Debugging posting routines. We can create an IDoc in several ways: By copying an existing IDoc already on the system. After creating a test IDoc. as we need.9 This is PricewaterhouseCoopers PROPRIETARY MATERIAL . We can change any of the segments (including the control segment) or add or delete segments.8 The IDoc Test Tool Transaction: WE19 Menu Path: Tools Business Communication IDoc Basis Test Test Tool The IDoc Test Tool is a very powerful tool for ALE testing and development. This is because certain internal tables in the transaction are not cleared and will lead to strange and misleading results when testing your processing. and modifying the data before attempting to post it. Using an existing IDoc type or message type Using a template from a file With no starting point at all.

1.1 You can configure the receiving system to generate ALE Audit messages for all incoming ALE IDocs for certain message types. ALE Audit 11. You typically run this program as a scheduled batch job. Define a filter object in the distribution model to specify the message type that you want to audit. asynchronously). The data contained within the ALEAUD messages provides detailed status information on the IDocs in the receiving system. The audit messages contain: The current status of the inbound IDoc This is PricewaterhouseCoopers PROPRIETARY MATERIAL .e.1. Any IDoc having a status record in this date range will be confirmed. The parameters of RBDSTATE are: The sending system (of the original IDoc) The message type The date range the IDoc’s status was changed. as well as the links between the IDocs and the resulting SAP application objects on the receiving system.10 You can specify the following parameters: Input and output files Sender and receiver logical systems and ports Message type Target client After doing the conversion. using ALE (I. the program will submit the IDoc for inbound processing.10. and to send these messages to the sending system. To enable ALE Audit: Set up the ALEAUD message type in the Customer Distribution Model and Partner Profiles.PricewaterhouseCoopers LLP SAP ALE Training Program 11. Program RBDSTATE Transaction: BDM8 Menu Path: Tools confirmations ALE ALE Administration Monitoring ALE Audit Send audit Program: RBDSTATE Use the program RBDSTATE on the receiving system to send the audit messages to the sending system. where the ALE Audit toolset can use them to maintain a complete audit trail.

2 The id of the resulting SAP application object (if the IDoc was successfully posted) The system will confirm up to 500 IDocs in one ALEAUD message.10.PricewaterhouseCoopers LLP SAP ALE Training Program 11. then it will create multiple audit IDocs. “IDocs total” is the total number of IDocs audited “Queue Outbound” is the number of IDocs that have not yet been sent to the other system “Queue Inbound” is the number of IDocs that are still being processed by the receiving system This is PricewaterhouseCoopers PROPRIETARY MATERIAL . If any status record was added to an IDoc during the specified date range.1. NOTE: The RBDSTATE program looks at IDoc status records to determine which IDocs to audit. If there are more than 500 IDocs to be audited. Program RBDAUD01 Transaction: BDM7 Menu Path: Tools audit statistics ALE ALE Administration Monitoring ALE Audit Evaluate Program: RBDAUD01 Use the program RBDAUD01 on the sending system to look at the ALE Audit IDoc statistics. the program will audit the IDoc.

and cross-system links for successfully processed IDocs: 11.3 Audit IDoc Structure 11.1. You can specify which consistency checks to run. it creates a notification with Workflow.Attempts to reprocess any IDocs with a specified error status code. If the program finds any errors. RBDMANIN -.11 These are the segments in an ALEAUD01 IDoc. trying to post the IDocs again will usually work. date range.10. etc. This is useful if IDoc processing fails because of record locking issues.1. This program can This is PricewaterhouseCoopers PROPRIETARY MATERIAL .PricewaterhouseCoopers LLP SAP ALE Training Program ALE Audit records may be selected by message type. You can drill down into the report to see information on daily statistics. with the fields they contain: Segment E1ADHDR o Message type Segment E1STATE o Sender’s IDoc number o Current status o Message fields Segment E1PRTOB o Receiver’s IDoc number o Application object information Batch Processing Programs SAP supplies some ABAP programs to allow for batch monitoring of the ALE system: RBDCONCH -. detailed information on IDocs. No changes are necessary.Runs consistency checks for any message types or receiving systems.

g. The program checks the successful sending of these IDocs with the receiving system and writes a status record of 12 (Dispatch OK) to all IDocs successfully transferred. Click on Standard Outbound Processing to send the test IDoc. then use the search help to locate one of your outbound MATMAS IDocs from previous exercises. 11. After the check runs. execute the test tool (WE19). 1. (Select a segment.Creates ALE Audit messages for the specified sending systems and message types.3 Exercise: Using the IDoc Test Tool In this exercise. try to fix the problem. If you had any error IDocs in previous exercises. This means that if someone else runs the program. a. and status codes to selectively reprocess IDocs. 7. If a piece of the ALE system is not working correctly. 11. then Insert. Double click on the name of your Warehouse system to run the check. then click Delete. This program provides a way of detecting this condition. you will use the IDoc Test Tool to: create and submit an outbound material IDoc create and submit an inbound Purchasing Order Release IDoc create and process an inbound IDoc from an outbound IDoc A. Outbound Testing 1. If not. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . “D” and “DE”) and the description. including yours. Run BDM5 (on your Sales system) to check the consistency of your distribution model. Select the E1MAKTM segment and click Copy. (You may find it easier to locate this IDoc using WE05. 3. a. Select Existing IDoc. the program generates a Workflow notification. Or you can use the Create button to create a new E1MAKTM segment.) Add a new text segment. RSEIDOCM -. 3. it will check the dispatch of all IDocs. all fields should be white (Check OK). Change the language keys (e. NOTE: Specify your partner system on the BD87 selection screen to avoid reprocessing other students’ IDocs! Select today’s date and execute.PricewaterhouseCoopers LLP SAP ALE Training Program automate this process. Run BD75 (on your Sales system) to check the IDoc dispatch. 2. a. 4.Checks the tRFC dispatch for all IDocs with status 03 (Data passed to port OK). On your Sales system. try to resend or repost them with BD87. NOTE: Sending and receiving systems are not part of the BD75 selection screen. RBDSTATE -. 5. Go to your Warehouse system and see if the IDoc was received and processed successfully. b. 6. RBDMOIND -.) Click on Create. If this number exceeds a specified maximum. You can specify IDoc creation dates.Counts the number of IDocs on the system that have a specified status code. b. verify that all successful outbound IDocs now have a status of 12 (Dispatch OK). Using WE05. you will explore some of the ALE Monitoring tools. IDocs with error status will build up in the system.2 Exercise: ALE Monitoring In this exercise. 2. sending systems. message types. Delete all segments (if any) other than the required E1MARAM and E1MAKTM segments. See the discussion of ALE Audit for details. You would generally use this with error status codes to detect a failure in the IDoc processing flow.

ix. Click the green arrow to start processing. 7. and acknowledge its receipt with ALE Audit. 6. 2. you will configure ALE Audit between two SAP systems. The popup window should have a green light and a message “Partner profile found”. (You may find it easier to locate this IDoc using WE05. Caution: Only one person at a time can perform shaded steps. Set the following parameters and execute: i. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . you will read an inbound IDoc from the disk file you created in the Communication Parameters exercise. 5.PricewaterhouseCoopers LLP SAP ALE Training Program B. viii. execute the test tool (WE19). 5. Configure a message type CREMAS from Sales to Warehouse. 2. x. 3. Maintain your distribution model (on your Sales system). if you wish. Click on Standard inbound. Distribute the model to Warehouse 4. It should have a status of 64 (Ready to be transferred to application). Double click on the E1RDOCU segment. Add a filter for logical message type. Select Existing IDoc. Is the new information reflected in the item release statistics? 3. iii. C. iv. You should never do this on a production system! 11. xi.4 Exercise: ALE Audit In this exercise. You will distribute a vendor record from one system to another. ii.) Click on Create.in” your Sales Logical system LS SAPAL2 MATMAS LS Sender Partner Number: Recipient Partner Number: your Warehouse Logical system Recipient Partner Type: Direction: Client: Recipient Port 2 (inbound) your warehouse system client number SAPAL2 Run WE05 and see if your IDoc is there. Create a vendor (transaction MK01) on the Sales system. 2. Display your contract (ME33K). The Turnaround Testing Tool In this exercise. Use BD87 to submit the IDoc for processing. fix your inbound configuration and try again. Please work quickly so that others will not be locked out for too long! 1. 3. v. Inbound Testing 1. NOTE: These activities are for testing only. vi. field to a new number and. to this message. Use “/tmp/<username>. 1. On your Sales system. vii. Configure a message type ALEAUD from Warehouse to Sales. transaction WE12. If not. 4. 6. change the quantity and value fields. Execute the turnaround testing tool. Generate your model on both systems. Change the Purchasing doc. value CREMAS. send your vendor to your Warehouse system. then use the search help to locate your inbound BLAREL IDoc from the Distributed Contracts exercise. Using BD14. Source: Target: Sender Partner Type: Sender Port: Message Type: the file you created earlier (“/tmp/<username>”) the output file.

9. On your Sales system. Look at the IDocs sent on both systems and check for successful processing.PricewaterhouseCoopers LLP SAP ALE Training Program 7. message type CREMAS. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . 10. Confirm to your Sales system. and today's date. run transaction BDM7 to look at the ALE Audit statistics. Run transaction MK03 to check that your vendor was created on your Warehouse system. run transaction BDM8 to create an audit IDoc. with successful status codes. You should see a CREMAS IDoc and an ALEAUD IDoc on each system. On the Warehouse system. 8.

However. Therefore. including many that allow the processing of various errors in IDoc handling.1. materials. SAP predefines a large number of tasks.PricewaterhouseCoopers LLP SAP ALE Training Program 12 12.1. Examples of business objects include customers. Users handle the errors by executing these tasks. and does not require a full Workflow implementation.1. and G/L accounts. and very flexible. which are ways of manipulating and accessing that data.1. The functions to create and maintain organizational plans are part of the Personnel Planning 12.1 Chapter 2 – Error Handling What is Workflow? SAP Business Workflow (which we will refer to as Workflow from now on) is SAP's tool that manages business processes by sending email action items to specific people in an organization. A business object includes all of the data passed in a single ALE IDoc and predefined methods. Tasks A task is a procedure that accomplishes an action in the system by executing a method of a business object.1. instead. using Workflow for ALE error handling is comparatively simple. the users do not have to "look for" the work items.3 This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Workflow uses the standard SAPOffice email programs to deliver a required work item to the person or persons responsible for completing the work item. It is similar to a class instantiation as defined by C++ and other object-oriented programming languages. which appear as work items in their inboxes. The routing of work items is completely configurable. they simply appear in the user's inbox.2 12.1 Business Objects A business object is a formal description of a piece of data on the system. It comes delivered with the standard R/3 system. Modeling business processes with Workflow can be very complex. By using the email interface. Organizational Plan An organizational plan in SAP describes the organizational structure of a company. requiring much planning and configuration. For example. it is an excellent tool for handling ALE errors. 12. sales orders. the system can handle situations where an employee is on vacation or out sick and needs to assign another person in the organization to handle her assigned tasks.1.1.

we must assign the person to a user. etc. When one of these people executes the work item. view attachments. since a user or person can hold more than one position. that is. Each organizational unit represents a recognizable group in the organization. This may be a department. These agents are then known as selected agents. or a company unit may have multiple departments. A job is a more general description of a position. Positions. The Business Workplace Transaction: SBWP Menu Path: Office Workplace The business workplace is the SAP transaction that a user uses to view all received work items. user. It is part of the SAPoffice email system. In order for a person to be usable in a Workflow scenario. but we do not need to implement HR to use them in Workflow. and we can fill a position with more than one person. position. This is configured as part of the HR implementation. a building. Jobs. and the work item disappears from the inbox of all other selected agents. There is.PricewaterhouseCoopers LLP SAP ALE Training Program 12.1.1. a department may be made up of multiple teams. and send email to other users. When an IDoc error occurs. or shared among two or more people. or person). Agents An agent is simply a person who executes a Workflow work item. A position represents a slot in an organizational unit filled by a single person. o Generally. A person is a specific employee created in the HR module. they can contain other organizational units as subordinates.). It thus represents a single person. A single job can describe multiple positions across multiple organizational units. etc. the Workflow system turns the corresponding task into a work item and sends it to the inbox of all possible agents defined for the task. This is a many-to-many relationship. A user is an SAP logon user ID. Users. Persons.4 and Development (PD) part of the SAP HR module. job. that person is then the actual agent for the work item. Organizational units are hierarchical. with the Inbox section expanded: 12. Two examples are “H/R Manager” and “A/P Clerk”. therefore. a oneto-many relationship between jobs and positions. Any organizational plan consists of five kinds of classifications: Organizational units. since only a user has access to the SAP mail system. We can assign a task to any of the five organizational objects (organizational unit. This is the initial screen of the business workplace.1. sickness. The business workplace also has the capability of sending a work item to an alternate user if the primary user is not available (because of vacation.5 This is PricewaterhouseCoopers PROPRIETARY MATERIAL . All users and persons that belong to the specified organizational object then become possible agents of the task. From the workplace a user can directly execute work items. a team.1. one organizational unit forms the “root” of the hierarchy and contains all other organizational units as subordinates. We can assign a user or a person to any position. For example.

this will bring up the IDoc error-processing screen: This is PricewaterhouseCoopers PROPRIETARY MATERIAL .PricewaterhouseCoopers LLP SAP ALE Training Program This example shows two work items waiting in the inbox. For IDoc errors. Expanding the Workflow section brings up a list of the work items in the inbox: To execute a work item double-click on the line of the desired work item.

2. This consistency check uses a color-symbol key to show which configuration items are complete. This will not prevent successful use of the Workflow system.1. These configurations are not related to the ALE system. you have several options: Process will submit the IDoc for reprocessing Delete flag will mark the IDoc for deletion IDoc display lets you look at (and change) the data in the IDoc with the same interface used in WE02 and WE05.[3] In addition. 12.2 From here.1 Note: Some releases of R/3 are reported to have a bug in this transaction that results in a green check not being displayed for a configuration item even when the configuration was completed. the work item will disappear from your inbox. all of the items under Workflow runtime system should have a green check. [3] This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Workflow Configuration We need to make some basic configurations in order for the Workflow system to work properly. the items under Workflow development environment should have a green check.1. Configuration Consistency Check Transaction: SWU3 Men Path: SALE Error Handling Basic Workflow Settings Workflow comes with a configuration consistency check to make sure that all of the required steps are complete. The R/3 system can perform most of these steps automatically.PricewaterhouseCoopers LLP SAP ALE Training Program 12. or mark it for deletion. For ALE use. Once you successfully process the IDoc. if you are using Workflow for custom IDoc error handling.

PricewaterhouseCoopers LLP SAP ALE Training Program 12. so that if the person in the position changes. While assigning an SAP user is the easiest way.1. This check ensures that the RFC destination is correct and that the Workflow user can log on to the system properly. Building an Organizational Plan When you set up IDoc error handling with Workflow. 4. enter a name and a description. If the Automatic Customizing fails to give a green check. staff assignments. someone must manually change all 500 of his entries. Run the Organizational Plan transaction. 12. You can now build your organizational hierarchy.1. it generally means that the WF-BATCH user is not properly configured. You can test it manually with the Test RFC destination pushbutton. The organization management capabilities are far too complex to discuss here.1. you must perform the failed customizing steps manually.3 This is PricewaterhouseCoopers PROPRIETARY MATERIAL .3 12. you can assign a person.2. Enter a period of validity. For example. • The Goto button changes the screen view. In the Basic Data tab. or the login information does not match the corresponding information in the RFC destination. or an organizational unit as a possible agent. 3.2 Automatic Customizing The Automatic Customizing push-button attempts to make the Workflow configurations automatically. but will not test it. a position. Use 12/31/9999 to prevent expiration of the plan. Transaction: PPOCW Men Path: Tools Business Workflow Development Definition tools Organizational Management Organizational plan Create To build an organizational plan follow these steps: 1. Testing the RFC Destination The Automatic Customizing will set up the Workflow RFC destination. it is not the best. It is better to create a position for these entries. etc. because you will not have the flexibility to make changes to several error configurations at once.2. letting you see only organizational units. It will update the icons next to each item based on the results. If this check fails. tasks. a job. if the user designated as the Receiver of Notifications (defined later) in 500 partner profile entries leaves the company. 2. We will show how to construct a simple organizational plan suitable for use in IDoc error handling. an SAP user. you only need to make the change in one place.

you can use any of the objects you have created: User. Caution: In release 4. You can also assign more than one person to any position by setting the Staffing percentage of each.PricewaterhouseCoopers LLP SAP ALE Training Program • • The Create button lets you create new organizational objects. 6. the drag-and-drop interface is buggy.6D. To include an existing object. As explained above. You can also assign a Job to any position using the Job field. this is rarely a good idea. The work item will go to the specified SAP user. ALE Configuration This section describes the configuration specific to ALE processing. Select an object. Position. then drag-and-drop the username onto the position. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . There are five places in the message transmission process where something can go wrong in the transmission of a message with ALE: 1. Reading the outbound partner profile. find the person’s user ID in the search window. 7. then drag-and-drop onto the new structure.4 5. You may need to collapse and reopen the display to get the destinations right.1. find it in the search window on the left. Job. click the Create button. 12. Organizational Unit. The work item will go to all members of the specified organizational unit. The work item will go to all holders of all positions described by the specified job. To assign a person to a position. The work item will go the holder or holders of that position. Repeat this process until your plan is complete. When you set the possible agents for any IDoc error-handling task. and the new object will be a child of the selected object.

The first four possible errors are technical errors. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . We can configure Workflow error handling in each of these five error situations. called the EDI Administrator in earlier versions. or a job to the task.4. is the agent responsible for handling IDoc errors when no partner profile is available. The next sections describe these configurations in detail. This may be a configuration problem or an invalid received IDoc (syntax error or invalid control information) 4. job. and then submit the IDoc for reprocessing. We can set a single organizational unit.PricewaterhouseCoopers LLP SAP ALE Training Program 2.1 In each case. This is generally a logical error. we can assign all of the members of an organizational unit. We will normally send technical and functional error notifications to different people in an organization. rather than its transfer. 3. or person as the IDoc administrator. An error in posting the IDoc is a logical or functional error. involving the distribution of the IDoc without regard to its business contents. or we can assign a single user or person. 5. involving a problem with the contents of the IDoc itself. user. Calling the application function. we can define one or more possible agents to execute the corresponding error-handling task. this error probably indicates that the system received an unexpected message type. or a message from an unknown partner. That is. Posting the record to the receiving database. We can use any of the organizational objects to do this. On the outbound system.1. The administrator will typically fix the configuration error. Sending the IDoc to the receiving system. involving a problem with configuration or with a process problem (such as a customer on credit hold). a position. IDoc Administrator Transaction: OYEA Men Path: SALE Error Handling IDoc Administration The IDoc administrator. Reading the inbound partner profile. where a required partner profile is missing. On the inbound system. This table lists the areas of Workflow configuration for each possible error situation: Error situation Reading the outbound partner profile Sending the IDoc to the receiving system Reading the inbound partner profile Calling the application function Posting the document to the database Workflow configuration needed to handle the error Maintain the IDoc Administrator on the sending system Define a Receiver of Notifications in the outbound partner profile Maintain the IDoc Administrator on the receiving system Define a Receiver of Notifications in the inbound partner profile Configure processing of the corresponding Workflow task 12. position. this error generally indicates a misconfigured system.

PricewaterhouseCoopers LLP SAP ALE Training Program This is PricewaterhouseCoopers PROPRIETARY MATERIAL .

1. and the system can read it properly.4. on the Post processing: permitted agent tab. a position. The organizational object (job. You cannot use CTS to transport the settings. Receiver of Notifications A Receiver of Notifications is responsible for handling errors in using a partner profile. To designate a receiver of notifications.PricewaterhouseCoopers LLP SAP ALE Training Program The following table describes each of the error-related fields on this screen: Field Recipient type Description The type of organizational object used to identify the possible agents. The maximum number of IDoc syntax error status records to write to the IDoc. a job. In this case. If we select this checkbox. then the system will notify the receiver of notifications listed on the overview screen. the partner profile exists. the system will not trigger error handling for errors involving the IDoc’s status records. Identification Max number of syntax errors Suppress warnings for status processing 12. This can be an organizational unit. then the system will notify the receiver of notifications configured for that message type. If the individual message type entry does exist. There are four places to define a receiver of notifications: The partner profile overview screen Individual partner profile entries for Message Control Individual partner profile entries for Outbound Parameters Individual partner profile entries for Inbound Parameters If an appropriate partner profile exists for the message.) whose members we want to notify of an error. The following table describes each of the error-related fields on this screen: This is PricewaterhouseCoopers PROPRIETARY MATERIAL . position. use the partner profile maintenance transaction WE20.2 Note: You must maintain the IDoc administrator on each system involved in IDoc transfer. a person. or a user. etc. but there is a problem in sending the IDoc (outbound) or passing it to the application (inbound). but it does not have an entry for the message type in question.

) whose members we want to notify of an error. or persons. The task used will generally be a foreground input method of a particular IDoc object. The possible agents can be organizational units. Application Processing Errors An error in processing an inbound IDoc results in the creation of a work item. etc. a position.5 The screens for the individual message types (Message Control and In/Outbound Parameters) have the same fields. It uses the business object IDOCMATMAS and its method INPUTFOREGROUND. or a user. jobs. positions. users. That is. The language to use for the message sent to the receiver. To configure the error processing for this error. Lang. a job.1. called “MATMAS input error”. a person. Here is an example. There are methods defined for these objects to handle inbound processing of the corresponding IDocs. This can be an organizational unit. position. ID 12. we must activate the event linkage for the triggering event and designate the possible agents for the Workflow task.PricewaterhouseCoopers LLP SAP ALE Training Program Field Typ Description The type of organizational object used to identify the possible agents. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . each IDoc type defined on the system has a corresponding IDoc business object. using Material Master records: This is an SAP-supplied Workflow task. The organizational object (job.

For example. Execute transaction PFTC_DIS. Application error handling tasks are generally in the corresponding hierarchy section.1. Click on Display to see the task. Enter “Standard Task” under Task type. 1. while ALE-specific tasks (e. 5.PricewaterhouseCoopers LLP SAP ALE Training Program 12. 2. the material master task is "MATMAS input error". For example. 4. Double click on the task you want to copy it to the task maintenance screen. you will find the MATMAS error-handling task under Logistics – General Logistics Basic Data Material Master Standard task MATMAS input error. Find the desired task in the hierarchy. you must locate the SAP-supplied task for handling errors in the IDoc type in which you are interested. 3.1 Locating the Error Handling Task Transaction: PFTC_DIS Menu Path: Tools Business Workflow Development Definition Tools Tasks/Task Groups Change First. Put the cursor in the Task field and use the drop-down (or press F4) to activate the search.g. you can click on Structure search to bring up the Application Hierarchy.5. Type the first few letters of the name of the task and press Enter. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Most task names begin with the message type they handle. This indicates a standard single-step task (as opposed to a multi-step workflow). Fetch messages) are in the ALE section. Alternatively.

etc. and save. To do this. and specify the specific object to use. follow menu path Additional data Agent assignment Maintain. To assign possible agents.1. Select an organizational object. gray if not.5. but will allow a selected agent to forward the work item to a user not designated as an agent for the task. Repeat to assign additional possible agents to the task.PricewaterhouseCoopers LLP SAP ALE Training Program 12.. If the words “General task” appear next to the task name. the screen should look like this: That’s it! Inbound processing errors should now trigger the Workflow task. turn off the general task attribute. When done.5. put the cursor on the task name and click on Create (the left-most icon). click on Attributes. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . To assign possible agents to the task.2 Activating the Event Linkage 12. job. Assigning the Possible Agents 1. such as a position.) This activates the distribution of the work item according to the possible agents you specify. This button will be green if the event is active. 3.3 To activate the event linkage click on Triggering events.1. then click on the activation button to the left of the event. 2. change the properties to General forwarding not allowed. 4. (General forwarding allowed will also work.

1. The mapping of SAP’s data structures into the IDoc and vice versa is done by the IDoc processing programs. we must translate the data from the IDoc to these special structures. Suppose the material master interface is inbound to SAP. you could use the existing ALE functionality to extract the material master data based on changes made by the user.1 Chapter 3 – Using ALE for Interfaces Basic Idea 13. If this is the case. We can write a custom program to do this. Here is an example: SAP supports a distribution scenario that allows the distribution of material master data between SAP systems. The first program reads application data structures and puts the data into the IDoc format. the underlying data structures of the two applications are almost always different. The data elements of the source system have to be mapped to data elements on the target system. and dispatch the IDoc to the target legacy system.the IDoc.PricewaterhouseCoopers LLP SAP ALE Training Program 13 13. often load or extract programs already exist. The basic idea is to use the SAP delivered ALE functionality and to make use of the ALE infrastructure. this interface wouldn’t require any coding on the SAP side. Problem of Data Mapping Conceptually. In the ALE environment this gets even more complicated because in addition to the two different application data structures we have to deal with a third one -. building interfaces is mainly a data mapping activity. The receiving SAP system has all the functionality to process that IDoc including ALE services for user notification and exception handling. All that needs to be done if the sending partner system is a legacy system is to fill the IDoc accordingly with legacy data. and they require a certain data structure layout. On the legacy side the IDoc has to be translated into the legacy system’s application data structures.2 ALE can interface SAP with non-SAP systems. However. This is PricewaterhouseCoopers PROPRIETARY MATERIAL . The ALE infrastructure (Monitoring/Audit Trail/Exception handling) can be used for free! The same works for inbound interfaces.1. Ideally. the second reads the IDoc data format and puts the data into the application data structure. However. Each SAP delivered IDoc comes with two programs: one to create the IDoc and one to process the IDoc. put the data into an IDoc. From the sending system’s (SAP) perspective. If you want to implement an interface between SAP and legacy for material master. The ALE scenario for material master supports the processing of the inbound material master IDoc. it doesn’t matter if the partner system is another SAP system or not.

g. a third-party ALE converter must be able to: Map to and from an arbitrary IDoc into an arbitrary layout Import an IDoc type structure directly into the converter Communicate with SAP via tRFC. material number in SAP to material number in legacy).1. 13. From the R/3 system’s perspective it is transparent if the receiving system is another R/3 system or an ALE converter.1. You can specify the Control. or any combination of these. An ALE converter is therefore a data mapping tool.PricewaterhouseCoopers LLP SAP ALE Training Program 13. SAP-certified interface tools must be able to read this format to import the IDoc Type. Data. In addition to data mapping the ALE converter usually has the ability to do lookups in cross-reference tables by either keeping local lookup files or by connecting to relational databases for the lookup.1 This is PricewaterhouseCoopers PROPRIETARY MATERIAL . Exporting an IDoc Type Structure Transaction: WE63 Menu Path: Tools Business Communication IDoc IDoc Basis Documentation IDoc type (parser) Transaction WE63 will output the structure of an IDoc Type in a text format. To be certified. The communication feature (direct communication with SAP through tRFC) in conjunction with the ability to connect to legacy databases (e.3. The ALE Converter An ALE converter is an external program that bridges the gap between the SAP and the legacy systems and their different data formats by mapping SAP IDocs to the application specific format and vice versa. or Status record structure. Therefore the ALE converter partly fulfills the role of a communication middleware. ODBC connection) allows us to build interfaces that completely eliminate the need for files (if desired).g.3 There is usually some cross-referencing between the data elements in the IDoc and the legacy systems (e. SAP has a certification program for ALE converters.

or messaging middleware). while the non-SAP application communicates with other systems in its application specific format.4 ALE Interface Infrastructure 13. including: o Audit Trail/Status Management o Error Handling with Workflow o Secure Communication through tRFC Programming. The ALE converter translates the SAP IDocs to the application specific format and vice versa. Some ALE converters are able to connect to external application databases (for example via ODBC). o The timing of IDoc processing is flexible. we will need a subsystem for data transport (e. because a function module directly adds the data to the database tables without the overhead of a Batch Input process.5 An ALE infrastructure consists of 3 components: External System ALE Converter SAP system The SAP system communicates with other systems by creating and processing IDocs. communication.1. and compatibility between SAP releases is guaranteed ALE may provide better performance than other techniques.1. NFS. Data Export from ALE There are at least two ways to send outbound IDocs to a legacy system: Configure the outbound partner profile to use a file port. is minimal. if needed at all.g. The ALE converter is the centerpiece of an ALE-based interface infrastructure.PricewaterhouseCoopers LLP SAP ALE Training Program 13. because: o IDoc programs usually use Direct Update to post the data in IDocs. to a certain degree.1.6 This is PricewaterhouseCoopers PROPRIETARY MATERIAL . If files are involved. Benefits of Interfacing with ALE The benefits of using ALE for interfaces include: SAP predelivers a complete interface infrastructure. This is the fastest method available. cross-referencing and. Point the outbound port to an RFC destination that connects to a program that can handle the IDoc data with an RFC interface 13. We can schedule IDoc processing for times when the system load is low. The ALE converter communicates with SAP using tRFC or file based methods. ftp shell scripts. It does translation.

the applications are usually processed asynchronously. MOM is a system or set of systems providing the services needed to manage the execution of applications in a distributed environment. database access.e. MQ-Series.1 Using ALE with Middleware What is Middleware? The word middleware has several meanings. distributed transaction processing. 13. not passed in the call SAP provides a utility program called STARTRFC to execute RFC function modules on any R/3 system from an application or presentation server. using queues for data transfer. Once the sending process places a message on a queue. An example of a message might be “Create Sales Order” Although real-time. or Remote Procedure Call (RPC)-based communications. It calls these function modules with an RFC call. the receiving process only needs to pick up the message when it is ready to process it.1. 40% of the average IT budget is spent on systems integration.2 13. application development environments.2. then it can forget about it. Common characteristics of Message Oriented Middleware include: Real-time data transfer Messages are based on business rather than technical design considerations. object development environments.8 Data Import to ALE When a legacy system sends IDoc into an SAP system. The primary aim of middleware is to provide easy connectivity between different applications. messaging communications. For the purposes of distributed applications. and continue with other tasks. and Enterprise Application Integration (EAI) we will be talking about Message-oriented Middleware (MOM). and Mercator.PricewaterhouseCoopers LLP SAP ALE Training Program SAP provides a utility program called RFCEXEC to accept RFC calls from an R/3 system and to run programs or shell scripts on the application server. it can use one of two RFC-enabled function modules.7 13. Some examples of products in the middleware area are NEON MQSI. and that it is difficult. According to the Gartner Group. INBOUND_IDOC_PROCESS o The function module that the ALE layer itself uses o Takes IDocs as parameters and passes them in as part of the RFC call EDI_DATA_INCOMING o Takes a filename and a file port as parameters o Reads the IDocs from a file on the application server (I. This is PricewaterhouseCoopers PROPRIETARY MATERIAL .1. This has two implications: that systems integration is important. Similarly. It can be any one of a confusing array of message-queuing. 13.

to ensure each application receives messages it needs. Thus.4 This is PricewaterhouseCoopers PROPRIETARY MATERIAL . sometimes called a hub. rather than to other applications. perhaps both applications A and B should receive a Sales Order if its number begins with a 1. The RFC connection is configured in a very similar way to the RFC for a remote SAP system.PricewaterhouseCoopers LLP SAP ALE Training Program 13. All messages must be in a format that the receiving application can understand. either using the IDoc file interface or (more commonly) tRFC. we have fewer point-to-point links than we would need without the broker. For example. Therefore. perhaps Sales Order numbers created in application C need to be prefixed with a 6 before being sent to application D. and places it on a queue in a format the message broker can understand. so above this level. SAP has no knowledge of whether the IDoc sender/receiver is a SAP system or the adapter.3 Central to the middleware architecture is a message broker. the SAP system sends and receives IDocs only to and from the message broker. In order to accomplish this. the IDoc. There are commercially available adapters for common products. Middleware and ALE The communication container for ALE. but sometimes we may need to write a custom adapter. each application that interfaces with the broker will need an adapter to convert the data format. For example. normally through an adapter. These adapters accept IDocs.2. Examples of commercial SAP adapters are NEON SAPLink and IBM Link for R/3. is also a message containing a unit of business data.2. Instead of communicating with other SAP systems. Middleware Design Considerations Here are some design considerations when building an interface to a middleware system using ALE: 13. and may often use large database look-up tables. In the reverse direction. ALE & IDocs provide SAP support for messageoriented middleware. conceptually. the adapter reads the data from the message broker queue and converts it to the application-specific format.2. The adapter normally takes the data in an application specific format.to ensure that the business data contained in the message makes sense to the application. Most middleware products allow any complexity of mapping and transformation. Each application connects only to the message broker. The message broker has two primary functions: Routing . The middleware products support such complex data-based rules. Mapping/Transformation . otherwise only application B should receive it.2 EAI Using a Message Broker 13.

3. this may cause the system to create an excessive number of outbound IDocs. SAP Standard Scenarios.PricewaterhouseCoopers LLP SAP ALE Training Program Addition of new applications. Therefore. With complex transformation. other applications may not have this degree of flexibility. it is important to ensure that the middleware architecture can handle the transaction volumes. This architecture makes it easy to add new applications in the future with minimum work.rather than distribute these rules around the system Development time. Since field-by-field mappings and transformations are an essential part of a middleware development. Similar design considerations when choosing between ALE and ABAP also apply to middleware design. and routing rules.2 13. and the method used will depend on the interface. and it may be sensible to contain this information within one system . A central message broker architecture provides a robust and scalable architecture for distributed systems. Conciseness of specifications. it is easier to reformat data in the broker's adapter and send it to new systems. database look-ups. If SAP supplies needed functionality then it makes sense to use it. Description Large Custom IDoc / Multiple messages Enhanced Scenario / At most 2 messages Standard Scenario Functional Specs 10 – 12 days 8 – 10 days 6 – 8 days Construction/Testing 30 days 20 days 10 days 13.the message broker -. you should design ALE interfaces so that they can be easily turned off and on.3. There is additional overhead in the message processing time between an application creating the message and an application receiving a message. a point-to-point ABAP may be the best option. Data transformation. If the data conversion team loads a lot of data at once. This can be a serious delay. ALE rules provide some degree of data transformation and routing. Processing time and throughput. Should we use ALE or ABAP? Here are some considerations in the decision to use an ALE interface.3.1 Interface Management Development Time Estimates These estimated development times come from previous PwC projects: Complexity High Medium Low 13. most of which the receiving systems will not use. When a high volume system-specific batch interface is required. transformation. Since the message broker’s mapping. and we need to take it into account when planning interfaces. or to develop an ABAP-based interface: Existing interfaces.3 Data Conversions Data conversions into SAP can have a very large impact on interface development. It is likely that both ALE and middleware development might be needed. and routing abilities are far superior to those of the SAP system. 13. When an existing interface design is established then it makes sense to maintain the design to minimize the development needed. However.4 This is PricewaterhouseCoopers PROPRIETARY MATERIAL .3 13. There are a number of different ways of doing this. the specifications must contain the detailed information required to build the specified interface. as well as custom programming for the legacy application posting and extraction routines. Middleware development time is significant.3.

Number of senders or receivers for common sets of data. ALE is usually slower than an ABAP interface. including controlling the process between these transactions. or an ABAP-based interface. iii. Using transaction SE37 (Function Builder). ABAP is generally better understood than ALE.4 Exercise: Reading IDocs from a Disk File In this exercise. Enter the function module name and click on Single test. Click on Execute. Timeliness of data transfer to the sending or receiving application.in) in the PATHNAME field. It reads a file /tmp/<username> and writes a new file /tmp/<username>. This would suggest an ABAP approach for the interface. v. ii. If very high transaction volumes are likely. Periodic processing (once or more per day) suggests a middleware batch processing option. and then click on Execute. In these cases an ABAP solution is more appropriate in order to maintain SAP integrity for restart or error management. or sent by many sending systems. Transaction Volume. It does essentially the same thing as the turnaround test tool. When similar data is needed by many receiving systems. A need for immediate transfer suggests a real-time ALE/middleware approach. You will need to specify the client number of your warehouse system. Execute the transaction ZCONV. since the pathname field is specified. you will read an inbound IDoc from the disk file you created in the Communication Parameters exercise.PricewaterhouseCoopers LLP SAP ALE Training Program There are many standard upload programs available in SAP. Type the name of your converted file (/tmp/<username>. but it leaves the converted IDoc in a file without starting inbound processing. o 13. In some instances the interface may have to perform multiple transactions in SAP. Programmers' Skills. 2. 1. Where there is a standard ALE scenario for an interface then this suggests that a middleware solution may be best. iv. It should have a status of 64 (Ready to be transferred to application) This is PricewaterhouseCoopers PROPRIETARY MATERIAL . but it must contain a valid value. ALE supports real-time and near-real-time data distribution. SAP supports these scenarios and enhancement is quick and easy. Turn on the Upper/lower case checkbox.in. The custom transaction ZCONV converts fields in your IDoc file to values appropriate for input. The function will not use this field. Type the name of your file port (FILE##) in the PORT field. Infrequent processing (weekly or monthly) suggests an ABAP batch option. execute the function module EDI_DATA_INCOMING. Timing Requirements. 3. This function module reads IDocs from a file. Complexity of SAP processing. the use of a middleware-based architecture makes more sense. Run WE05 and see if your IDoc is there. and there are more skilled practitioners. then ABAP is probably a better choice. since the program already exists and there should be minimum effort to build the interface o There are many standard ALE scenarios provided in the SAP system. i. since the message broker can manage the distribution of data to multiple recipients.