ALE Training Material
ALE Training Material
ALE Training Material
What is ALE?
Application layer.
This layer provides ALE with an interface to R/3 to originate or receive messages containing data
to or from external (or other R/3) systems.
01.2
Distribution layer.
The distribution layer filters and converts messages containing data based on predefined or
custom-defined rule sets. These conversions may occur to ensure compatibility between different
releases of R/3 and R/2.
01.3
Communications layer.
ALE communications are carried out both synchronously and asynchronously. Synchronous
message transmissions are typically used for the direct reading of control data, while
asynchronous message transmissions are used for transmitting or receiving application data. It is
also possible to achieve a pseudo-real-time exchange of application data using transactional
Remote Function Calls (tRFC)
ALE scenarios fall into three categories: master data, transactional data, and control data
distribution. Although the underlying principles are the same for the different categories, there are
differences in their functions and configurations. SAP delivers over 200 ALE scenarios; and by
extension there are approximately 200 application areas that can leverage ALE technology for
data distribution or communication. A subset of these scenarios is supported by R/3 for Electronic
Data Interchange (EDI).
There are several advantages to using ALE technology:
MUMBAI , SAP-ALE Training
From 04/18/2005 to 05/21/2005
ALE is SAP proprietary technology that enables data communications between two or more SAP
R/3 systems and/or R/3 and external systems. When a new enterprise resource planning (ERP)
solution such as R/3 is implemented, companies have to interface the ERP system with legacy
systems or other ERP systems. ALE provides intelligent mechanisms whereby clients can
achieve integration as well as distribution of applications and data. ALE technology facilitates
rapid application prototyping and application interface development, thus reducing
implementation time. The ALE components are inherently integrated with SAP applications and
are robust, leading to a highly reliable system.
ALE comes with application distribution/integration scenarios as well as a set of tools, programs,
data definitions, and methodologies that you can easily configure to get an interface up and
running.
02
Logical System.
A Logical System (LS) is the representation of an R/3 or external system in SAP R/3 for the
distribution of data to and from the R/3 System. Every R/3 client used for ALE or EDI has to have
a base LS associated with the client. This LS becomes the sender for outbound messages and
a receiver for inbound messages. In addition to the base LS, a second LS should be created
within that R/3 system for each R/3 or external system used for ALE interfaces. In an inbound
ALE interface, this second LS represents the sender (another R/3 or external system) with
respect to the base LS (receiver). In an outbound ALE interface, this second LS is the receiver on
behalf of the R/3 or external system with respect to the base LS (sender).
022
Message type.
A message type represents the application message exchanged between R/3 systems and R/3
and an external system. A message type characterizes the data sent across systems and relates
to the structure of the data called an IDOC type For example, MATMAS is a message type for
Material Master, and INVOIC is a message type for an Invoice (Billing Document). ALE supports
over 200 message types in R/3 and about 200 application areas.
023
An Intermediate Document (IDOC) type represents the structure of the data associated with a
message type (DEBMAS02 for message type DEBMAS
Generally, the architecture of an IDOC is independent of the message type by virtue of ALEs
ability to redefine it for any message type.
An IDOC consists of three record types: the control record, the data record, and the status record
021
024
Distribution Model.
In an R/3 system, the Customer Distribution Model is a tool that stores information about the flow
of messages across various systems. The Customer Distribution Model uses an SAP-delivered
MUMBAI , SAP-ALE Training
From 04/18/2005 to 05/21/2005
For example, the first segment of IDOC type DEBMAS02 is E1KNA1M. Its definition is contained
in structure E2KNA1M, and its documentation is in E3KNA1M. When the IDOC is externalized,
we see the segment name addressed by its E2 prefix. For all practical purposes, we will use only
the E2 prefix when referring to IDOC segments. Also, most segment names represent Data
Dictionary tables.
0242 Listings.
Listings are a special filter object type occurrence and are also used to specify a selection
criterion for distributing master data. Listings are based on the SAP Classification system
(classes and characteristics), and are applicable only to Material, Customer, and Vendor master
data. Once a list has been created, based on certain classification information using the ALE
customizing menu, it is associated with an LS. The listing is then used to create a filter object with
type LISTING, for a message type associated with that LS.
Lists are maintained and allocated to an LS from the ALE customizing guide using transaction
SALE, or Distribution Scenarios -> Master Data Distribution -> Distribution via
Listings.
026 Ports.
MUMBAI , SAP-ALE Training
From 04/18/2005 to 05/21/2005
A filter object type is used in the Customer Distribution Model to impose a selection criterion on
the message (type) flowing to a Logical System. A filter object type with a value associated with it
is called a filter object. For example, BUKRS (Company Code) is a filter object type available for
message type DEBMAS (Customer Master). To distribute Customer master data of only
Company Code 1001 to a particular Logical System, you would use filter object type BUKRS to
create a filter object with value BUKRS = 1001. You can have multiple filter objects with different
values for the same message type associated with that LS. While determining the receiver(s) of a
particular message based on the Distribution Model, ALE performs object filtering. As with the
Customer Distribution Model, filter objects are relevant only to ALE.
(Ill explain the steps to create a filter object, as well as how to create a new filter object type,.)
In R/3, message control is a mechanism by which documents are output based on certain
selection criteria, requirements, and sequences. Message control determines the type of
document, its timing, number, and medium (print, fax, ALE, or EDI.). Outbound messages in SD
(Sales and Distribution) and MM (Materials Management, Purchasing) are created and processed
by message control records. The output records are stored in the NAST table.
Message control uses the condition technique. The conditions for creating an output message are
stored in condition tables that have selection fields picked from a catalog of application
fields/tables. To determine if an application document qualifies for output, search strategies are
used through access sequences, output procedures, and requirements. Once a message
qualifies for output, message control modules use the parameters set in the condition type or
output type to determine the timing of transmission and the medium of the message. The output
type also specifies the program or module to be invoked to create the output.
Message/output determinations are concepts applicable not only to EDI and ALE, but also to
other output mediums. (Nace transaction)
03
Step 3: Creating a CPIC user on target system. To communicate and process messages in the
remote system, SAP uses a user ID on the target system. This user ID needs to be of type CPIC.
Though the user could be a normal dialog user, a user of type CPIC should be used to preclude
performance problems such as maximum number of logons exceeded. Ask your Basis
administrator to set up this user ID. Ensure that the ID has all the authorizations required to
update that systems databases for characteristics and classes.
04
Now that we have configured the system for an R/3-to-R/3 interface, lets examine the methods
for executing this interface and for understanding its results. This section will also go over
techniques for monitoring the communications and will discuss performance issues related to
R/3-R/3 ALE communications.
041
Sending data.
042
Once you have created the communication IDOCs, the next step is to dispatch them to the target
system. This is when the tRFC calls are invoked to connect and communicate to the remote
system. Using transaction SM59, test the connection for RFC destination to ensure that the
communication channels are open and working.
Go to WEDI -> Test -> Outbound from IDOCs. This is the same as program RSEOUT00 or
transaction WE14.
Enter the parameters, such as message types (CHRMAS, CLSMAS), partner number of
receiver, and date last created.
Execute.
If there is a large number of IDOCs, schedule program RSEOUT00 as a background job with an
appropriate variant. After processing, you should find all IDOCs to be in a status of 03Data
passed to port OK. Bear in mind that a status of 03 does not necessarily imply that the tRFC
communication was successful. Ill discuss a method of updating this status with the results of the
final processing later in this section.
043
Enter the class types 001 for Material and 011 for Customer in this case. Enter the names of
classes you want to distribute. Enter the name of the Logical System
Execute.
If the number of classes is large, you should schedule program RBDSECLS as a background job
with an appropriate variant. Display the created IDOCs, and browse them to understand and
verify the data.
044
When the IDOCs arrive on the target system from the host machine, they are created with a
status of 64 IDOC ready to be passed to application. This is because we chose the option of
background on the target system, rather than processing them immediately. We now need to
run a program that will process these IDOCs and post the data to the application. To do this:
Go to BALE -> Periodic Work -> ALE Inbound IDOCs. Choose the radio button for 64
IDOC ready to be passed to application. Execute. This is the same as executing program
RBDAPP01.
In the panel displayed, enter parameters such as message type (CHRMAS and CLSMAS in this
case), creation date, or IDOC numbers. Execute.
ENHANCING ALE
ALE technologies provide powerful tools for implementing standard distribution scenarios and
enhancing and building ALE interfaces by bringing together the building blocks Ive described in
this topic. By following a few logical configuration steps, it is possible to create ALE interfaces and
derive huge benefits.
An exciting development in SAPs Business Framework technologies is the availability of BAPIs
(Business Application Programming Interfaces), which have evolved from ALE technologies. BAPI
interfaces could be synchronous or asynchronous, with or without the use of IDOC types. Ill
discuss BAPIs.
In my part one on ALE, we discussed ALEs powerful mechanisms for interfacing similar or
disparate systems. We also worked through the configuration procedures required to build or
MUMBAI , SAP-ALE Training
From 04/18/2005 to 05/21/2005
IDOC EXTENSIONS
Lets first look at the concept of IDOC extension. SAP delivers Basic IDOC types such as
DEBMAS02, MATMAS02, ORDERS02, and WMMBID01. By extending the Basic IDOC type, you
are actually creating a new IDOC type. You create a new segment with the additional fields. This
new segment has to be associated with one of the existing Basic IDOC segments. Then you
create a new extension type, which is associated with the Basic IDOC type. This results in a new
IDOC type. In order for ALE function modules to relate to this new IDOC type, the IDOC type is
linked to the corresponding message type. Note that you should not add fields to existing
segments but should create a new segment and associate it with an existing segment. This, in a
nutshell, is the process of creating IDOC extensions.
In our example, the Basic IDOC type DEBMAS02 is used to communicate Customer Master data
to the SAP Customer Master application. Even though the application has a screen to enter and
store a contact persons business address, DEBMAS02 does not have a segment or fields that
communicate the contact persons business address. If your business requires that this business
address be communicated to the other system through the ALE interface for Customer Master,
then you have to extend the DEBMAS02 IDOC type, and enhance the corresponding ALE
function module.
In DEBMAS02 the contact person fields are present in segment E1KNVKM and the business
address of the contact person is stored on the SADR SAP table. You need to create a new
segment, Z1SADRX, that is associated with E1KNVKM. This will be done in the process of
creating an extension type ZDEBMASX. This extension type will then be associated with a new
IDOC type, ZDEBMASZ. IDOC type ZDEBMASZ will be linked to message type DEBMAS for
Customer Master. The final step in the IDOC extension process is to check the new objects. This
check also verifies the structural integrity of the IDOC type. Lets look at each of these steps in
more detail.
111
First, lets determine the fields on table SADR that you are going to provide for in the new
segment Z1SADRX. You need fields for name, street, city, region, and country to give the
MUMBAI , SAP-ALE Training
From 04/18/2005 to 05/21/2005
10
11
11
business address of the contact person. You also need fields for the address number. ADRNR is
a field in SAP tables such as SADR that uniquely identifies the address of an entity. This field is
cross-referenced from other tables to the SADR table to obtain the full description of the address.
Because this is an IDOC type for master data, the first field of the new segment will be MSGFN.
The message function field informs the receiving system of the action to be taken for that
particular segment. In the code that you write for populating the new segment, the value of the
message function is the same as that of the parent segment E1KNVKM. In all, you will have 12
fields in segment Z1SADRX.
To create an extension type and new segment:
Use transaction WE30 or from WEDI go to Development -> IDOC types.
Enter ZDEBMASX for Object Name.
Choose Extension Type.
Click on Create.
You will see a pop-up screen. Choose Create New, and enter a description. For version 4.x, enter
DEBMAS02 in the Linked Basic Type field. Enter.
You will see a screen with ZDEBMASX and its description in the first line. Click on this line, and
press Create. For version 4.x, expand the tree of segments, and place the cursor on E1KNVKM.
You will see a pop-up screen. Enter E1KNVKM as the reference segment. Enter.
For 4.x, press Create after placing the cursor on segment E1KNVKM.
You will see a line appear with E1KNVKM hierarchically below ZDEBMASX, with a description
"Customer Master contact person (KNVK)."
Click on this line and press Create. You will receive a message indicating that the new segment
being created will be a child segment of E1KNVKM. Enter. A pop-up box appears for the new
segment.
Enter Z1SADRX as the segment type, 1 for Minimum, 1 for Maximum. Leave Mandatory segment
unchecked. These entries imply that there is only one Z1SADRX segment for every occurrence of
the E1KNVKM segment, and also that this segment is not mandatory. Note that if the parent
segment is not mandatory, then the child segment should not be mandatory, because this could
result in a syntax error during the creation or processing of the IDOC.
For 4.x, you must first create the IDOC segment Z1SADRX (Ill explain why in a moment) from
the menu path WEDI -> IDOC -> Development -> IDOC Segment.
Click on Segment Editor.
On the next screen, click on Create.
Enter a development class for the object. Enter.
This will take you to the screen for segment definition. Enter a description for the segment. Enter
the field name, data element, and the data element documentation name. In most cases, all three
fields may have the same values. If you are using a field in the segment that is not present in the
ABAP/4 data dictionary, you must first create the domain, data element, field, and appropriate
documentation before using it in the new segment.
Enter these three columns for all 12 fields. Save.
Click on Generate/Activate, F3 to step back.
From screen Maintain Segment, go to Segment Type -> Release. A checkbox now appears
beside the segment definition Z1SADRX. Check this box. Save.
Save again to store the descriptions of the segment, F3 to step back.
Save the extension type.
It is possible to have several new segments with relevant Basic IDOC type parent segments in a
single extension type. However, you can form only one IDOC type based on a single extension
type.
12
Having extended the IDOC type to contain additional fields for an inbound or outbound
application, you now want to enhance ALE function modules for populating the additional
segment on the outbound or applying the additional segment data on the inbound application. It
may be necessary to enhance an ALE function module even in situations where an IDOC
extension has not been performed if the IDOC data being passed to and from the application
requires modifications. The following approach applies to both situations.
The core working code for ALE processes for a given application area is always encapsulated in
ABAP/4 function modules. These function modules are associated with such control information
as message types and process codes. So the ALE process checks this control information and
MUMBAI , SAP-ALE Training
From 04/18/2005 to 05/21/2005
12
The next step is to link the new IDOC type to its corresponding message type. This is important,
because this relationship is referenced in the partner profile parameters where you specify the
message type and IDOC type to be used for that particular representative system. To link the
message type:
Use transaction WE82, or from WE30, go to Environment -> IDOC Type / Message Type, or from
WEDI go to Development -> IDOC Type -> Environment IDOC Type / Message Type.
Click on Display <-> Change.
Click on New Entries.
Enter DEBMAS for message type.
Enter DEBMAS02 for Basic IDOC type.
Enter ZDEBMASX for extension type.
Enter your SAP R/3 release number for Release.
Save.
This data is stored on the EDIMSG table and is accessed by several ALE processes to relate the
message type to the IDOC type.
13
derives the name of the function module to invoke for that particular IDOC processing from
certain database tables. These function modules contain objects known as customer functions,
which can be considered SAP Enhanced user exits. A function module is called at a particular
point during the processing of the main program or function module, and it can be used to
influence data processing at that point by adding code to the customer function. The customer
function behaves like a normal function module and has import and export parameters, tables
(internal tables) statement, and exception processing. Unlike a conventional user exit, customer
functions give you the ability to modify only data available to you by the function modules
parameters and internal tables. While most ALE/EDI function modules are supported by customer
functions, there are ALE/EDI processes that still use conventional user exits. There are a few
ways to determine which function module to enhance for a given message type/process code:
For master data distribution, from SALE go to Extensions -> Master data distribution -> Setup
additional data for message types. Search for message type DEBMAS in this example. You see
an
entry
for
DEBMAS
associated
with
function
module
MASTERIDOC_CREATE_SMD_DEBMAS. This data is stored on table TBDME. The function
module
names
for
all
master
data
message
types
follow
this
pattern:
MASTERIDOC_CREATE_SMD_messagetype. This function module calls another function
module of name MASTERIDOC_CREATE_DEBMAS or MASTERIDOC_CREATE_messagetype.
Search for the words customer function, and you find several hits that can be used to add code to
the function module.
From WEDI got to Control -> Inbound process codes -> Inbound with ALE service -> Processing
by function module (transaction WE42), or from WEDI go to Control -> Outbound process codes
-> Outbound with ALE service -> With function module (transaction WE41). There will be function
modules associated with the process codes. For inbound, the function modules usually follow this
pattern: IDOC_INPUT_messagetype: for example, IDOC_INPUT_CHRMAS for inbound
characteristics master.
Use transaction WE57 or from WEDI go to Development -> Message/Application Object. The
entries list the function module, Business Object, message type, and IDOC type that are used for
inbound ALE/EDI interfaces.
Customer functions are not specific only to ALE and EDI but also to all programs/modules in SAP
R/3. Customer function is a SAP enhancement component; the other two types are menu and
screen enhancements.
All customer function exits are maintained in SAP enhancements and are found by using
transaction SMOD. After executing transaction SMOD, pull down (F4) on the enhancement name
field, and execute again. This provides you with a list of all SAP enhancements available. SAP
enhancements are grouped by development class pertaining to an application area. Choose
Application development R/3 SD master data distribution for development class VSV to lead to a
screen that lists VSV00001 as an enhancement. Press Component +/- to display its function exit
components. There are four possible components listed, all of which are function exits (and are
function modules) that are called from the ALE function modules in the form Call Customer
Function 001. This is a special occurrence of the ABAP statement Call. Go to item
Exit_SAPLVV01_ 001, which you need to enhance for the Customer Master outbound example of
an IDOC extension. In the ALE-function module MASTERIDOC_CREATE_DEBMAS, the
statement CALL Customer Function 001 is translated in the background to call component
EXIT_SAPLVV01_001. Although this function exit can be edited using transaction SE37, you will
use a simpler approach.
When you use SAP enhancements and their components, you manage them with an SAP object
known as a project, which is like an envelope containing the selected enhancements and their
components. A project can be used to control the execution of components and to transport them
to other clients and instances in SAP. Basically, the process involves creating a project, including
enhancements and components that are to be enhanced, editing the components, and then
activating the project. The following process creates a project for our example Customer Master
IDOC extension:
Execute transaction CMOD.
Enter name of project, say CSTMAST1.
Click on Create.
14
Because some function modules have several customer functions, it is critical to choose the
function exit best suited for that particular enhancement. Do not attempt to perform activities that
the function exit is not designed for. The importance of this point is illustrated by the following
description of enhancing function modules for outbound and inbound ALE interfaces.
Outbound interfaces. In an outbound ALE interface you use function exits (customer functions) to
populate additional segments created by an IDOC extension or to modify the existing IDOC data
segments as per business requirements. Previously, you identified that enhancement VSV00001
has a component EXIT_SAPLVV01_001 (function exit), which can be used for populating the
additional data segment Z1SADRX that you created in the IDOC extension ZDEBMASX (IDOC
type ZDEBMASZ, based on Basic IDOC type DEBMAS02). You also learned that the ALE
function module that calls this function exit is MASTERIDOC_CREATE_DEBMAS, which has a
statement Call Customer Function 001.
Browse the function module MASTERIDOC_CREATE_DEBMAS using transaction SE37. You will
find that this customer function is invoked for every segment of IDOC type DEBMAS02. In fact,
the function exit is called soon after the creation of an existing segment has been populated with
data and appended to the IDOC data table (internal table). Also, the function exit is exporting the
message type, IDOC type, and the segment name and is importing the IDOC extension type. It is
also passing the IDOC data internal table. This indicates that the ALE function module is allowing
you to populate additional segments for every existing segment and modify the existing
segments data.
Lets write ABAP/4 code to accomplish the task of populating IDOC segment Z1SADRX with a
contact persons business address:
From SE37, display function module MASTERIDOC_CREATE_ DEBMAS.
Find Customer Function 001.
Double-click on 001.
The function EXIT_SAPLVV01_001 will be displayed.
Double-click on INCLUDE ZXVSVU01.
You will be asked to create a new include object. Proceed as desired.
Enter code .
Be sure to perform a main program check (Function Module -> Check -> main program) and
extended program check (Function module -> Check -> Extended check).
Now that you have extended the IDOC and enhanced the ALE function module based on the
requirements for the contact persons business address on the Customer Master, lets test the
interface. You should create a logical system and define a port for this interface. You should also
configure the Customer Distribution Model to indicate that message type DEBMAS is being
Inbound interfaces.
15
The process for enhancing inbound ALE interfaces is similar for outbound, with a few exceptions;
specifically in the coding of customer functions (function exits) for the ALE/EDI function modules.
The first step is to create an IDOC extension for the specific Basic IDOC type by adding new
segments at the appropriate hierarchy level: that is, associated to the relevant existing segment.
Populate the data fields on the new segments with application data by the translator or external
system/program before importing them into the R/3 System. Then, find the ALE function module
that is invoked by the inbound processing. By browsing through the code or reading the
documentation on the function exit enhancements using the SMOD transaction, identify the
function exit in which you should place your code. The technique used in the code to post the
additional or modified IDOC data to the application can vary based on the application rules and
requirements, the data available at that point in processing, and the application function modules
available to update the application tables. It is important to search first for application modules
that process the data and see if they can be called within the function exit. If the additional data in
the extended segments in specific to a custom table or resides in nonkey fields of a single or
small set of tables, you may be able to update it directly by SQL statements in the function exit.
This approach should be carefully evaluated and is certainly not highly recommended.
Another option is to use Call Transaction from within the function exit to process the additional
data. For example, in the case of message type WMMBXY for inbound goods movements from a
warehouse management system, the standard interface creates batches for materials, but does
not update its characteristics. In such a case, you can use Call Transaction MSC1 to create the
batch and assign characteristic values to it from within the function exit provided.
Error handling is a very important consideration when making enhancements to inbound ALE/EDI
objects. In ALE and EDI inbound processing , workflow is used for handling errors at different
levels such as technical and application. If workflow has been configured for the interface, the
error messages and workflow items flow to the inbox of the named recipient(s).
It is also critical to enhance the workflow that handles notifications of the inbound ALE/EDI
process. In most scenarios this is not a very difficult task because SAP lets you influence the
workflow parameters and messages in function exits (customer functions). You typically do this
using flags and message codes to trigger certain workflow actions. If you conform to the status
codes and flags stipulated for workflow processing, the enhancement could be error-free and
seamless. In the case of an inbound IDOC with an extension, you should populate the EDIDC
fields IDOCTYP (new IDOC type) and CIMTYP (extension type) accordingly.
IDOC REDUCTIONS
16
When distributing or communicating master data to other systems, the volumes of data
transmitted over communication lines may be large, resulting in performance problems and/or
excessive usage of resources such as disk space and bandwidth. Careful scrutiny of the master
data Basic IDOC type may reveal that many of the segments are redundant or are simply not
being used. If this is true, then the basic IDOC type is a candidate for a technique known as IDOC
reduction. The R/3 System provides the ability to eliminate unused segments and irrelevant
segment fields from the Basic IDOC type. This procedure is relatively simple and easy to
implement. IDOC reduction is available for only a few message types such as DEBMAS,
CREMAS, GLMAST, MATMAS, and certain POS messages.
When performing an IDOC reduction, a new message type is created based on an existing
message type. The IDOC segments associated with that message type are proposed for editing.
Mandatory segments of the IDOC type cant be excluded. By default optional segments are
excluded, but you can choose to include an optional segment and only certain fields in the
optional segment. If you have extended the Basic IDOC type and created a new IDOC type
associated with a corresponding message type and you are creating a new message type (view)
based on it for purposes of IDOC reduction, then the enhanced IDOC type is presented for editing
along with the additional segments.
Lets use the Vendor Master IDOC type CREMAS01 as an example to demonstrate IDOC
reduction. Message type CREMAS is used for communicating Vendor Master data to other R/3 or
external systems. If you browse the IDOC type CREMAS01 youll see that it has 10 segments,
with E1LFA1M being a mandatory segment
To reduce this IDOC type:
Use transaction BD53 or from SALE go to Distribution scenarios -> Master data distribution ->
Reduce IDOC type for master data.
Enter ZCREMS for View (message type).
Click on Create.
You will see a pop-up box. Enter CREMAS in the Derived From field. Enter.
Enter a description. Enter.
You will see a list display with segment E1LFA1M in green and a * symbol. The symbols used in
IDOC reduction are: * for mandatory, 1 for selected, - for deselected, x for core selected, and the
. for core not selected. The corresponding elements are highlighted in green, white, red, violet,
and gray, respectively.
Expand all trees. You will see nine other segments in red.
Place your cursor on the E1LFB1M segment for company code data and click on Select. It turns
white with a 1 symbol.
Double-clicking on it will display a list of fields. You can select fields that you require
Note that if a child segment is selected, its parent is also selected automatically in order to
maintain the hierarchical integrity.
After youve selected the segments required and its fields, save.
From the main screen, click on Activate.
Activating the new message type ZCREMS will turn on the message type change pointer
generation on a particular client. While creating a reduced IDOC type message is a clientindependent activity, activation is client-dependent. An entry is created in table TBDA2 for a
specific message type in a specific client and is activated. To delete this message type, you need
to deactivate it from all clients on that instance. These message types are transportable.
Now that weve created a new message type for a reduced IDOC type, lets build the rest of the
ALE configuration to work the interface with the following steps:
Define a logical system to represent the other R/3 or external system.
Configure the Customer Distribution Model to send message ZCREMS to this logical system.
Define a port, if needed, for this system.
Define a partner profile based on the logical system and maintain its outbound parameters. Make
sure to use ZCREMS as the message type and CREMAS01 as the IDOC type.
17
WHAT TO REMEMBER
Create custom segment.
Create IDoc extension tying custom segment to SAP segment to be extended.
Tie extension to basic IDoc type to create new Idoc type.
Create new basic IDoc type:
Create data elements.
Create segments.
Create basic IDoc type.
Release segments and basic IDoc type.
Need ABAP programs to process custom IDocs
Outbound and outbound.
User exits available.
Create message type (WE81) and link to IDoc type (WE82).
Create new process code ( WE41) .
Configure ALE ( BD64 , WE20, BD61, BD50, BD60).
18
Codes
Outbound:
01 Created
30 IDoc ready for dispatch (ALE service)
03 Data passed to port OK
Inbound:
50 IDoc added
64 IDoc ready to be transferred to application
62 IDoc passed to application
53 Application document posted
MUMBAI , SAP-ALE Training
From 04/18/2005 to 05/21/2005
19
SALE
SALE
TBDA2
SCDO
BDCP,BDCPV
WE20
EDP21
WE42
TBDBA
WE57
SMOD, CMOD
outbound processes.
Batch Processing
RSEOUT00
RBDAPP01
RBDMANI2
RSNAST00
RBDMIDOC
RBDMOIND
RBDCPCLR
Transaction WE31
Check the segment does not already exist
Type the segment name (Z1Pxxxx with xxxx=IT number)
Validate
If nothing appears under the field then it's ok
Menu Segment, create by copying
DDIC structure PAxxxx with xxxx=IT number
The 2 first lines show:
1
MANDT
MANDT
2
PERNR
PERSNO
Replace them with:
1
PERNR
PERNR_D
2
INFTY
INFTY
For those 2 lines delete the last column (Export) which contain the length of the fields
press RETURN key, it will retrieve the correct lengths.
Save in a new Transport Request (eg: New IT9004 ALE distribution for IS)
You're back in previous screen. Menu Edit, Set Release.
2- Link the new segment to Idoc type extension HRMD_Axx (DH1.40)
.Transaction WE30
.Select 'Extension', object name ZRMD_Axx (eg xx=03 for sap release 4.5B)
.Menu Edit, cancel release (save in the same transport request)
.Menu Development object, Change
.Expand the tree E1PLOGI, E1PITYP
.Select E1PITYP by positioning cursor on it
.Menu Edit, create segment
.Validate popup saying it will be created as a child of E1PITYP
.Enter the following info:
Segm.type
Z1Pxxxx
(where xxxx=IT number)
Mandatory seg.
Minimum number 1
Maximum number 9999999999
MUMBAI , SAP-ALE Training
From 04/18/2005 to 05/21/2005
20
21
Envoyer article
Vue canal d'objets - Affichage IDocs
Contrle de la cohrence
Table de registre des sorties
Table de registre des entres
Grer la table TBD53
Srial. canal ob.: support ob. gest.
Accder article
Envoyer client
Accder client
Envoyer fournisseur
Accder au fournisseur
Envoyer centre de cots
Accder centre de cots
Envoyer compte gnral
Accder un compte gnral
Transmettre IDOC l'application
Slectionner pointeur modification
Supprimer pointeur de modification
Supprimer donnes de srialisation
Envoi de natures comptables
Envoyer type d'activit
Accder type d'activit
Envoyer px de cession ctres de cts
Envoyer donn. commande Objet/NatComp
Rpartir nomenclature article
Rpartir nomenclature document
Rpartir affec. division (nom. art.)
Rpartir variantes article (ALE)
Rpartir nomenclature cde client
Envoyer les gr. de proc. de gestion
Envoyer les processus de gestion
Envoyer les prix des proc. de gest.
Lire pointeur de modif. d'un groupe
Envoyer IDOC d'un groupe
Contrler IDOC d'un groupe
Enregistrement des IDOC d'un groupe
Affecter type msg groupe srialis.
Dpendances entre mthodes
Dpendance mthode - message
Pointeur modif. actif pour type msg
Grer modules fonction rception
WE02
WE05
WE06
WE07
WE08
WE09
WE10
WE12
WE14
WE15
WE16
WE17
WE18
WE19
WE20
WE21
WE23
WE24
WE27
WE30
WE31
WE32
WE33
WE34
WE40
WE41
WE42
WE43
WE44
WE45
WE46
WE47
WE48
WE49
WE50
WE51
WE52
WE53
WE54
WE55
WE56
WE57
Afficher IDoc
Listes d'IDocs
Monitorage actif IDoc (monitorage)
Statistiques IDoc
Statut de l'interface fichier
Rech. IDoc dans la base de donnes
Recherche IDoc dans l'archive
Test fichier d'entre modifi
Test traitement des IDocs sortants
Test traitmt IDoc sortants dep. GSM
Test fichier d'entre
Test fichier de statuts
Gnrer fichier de statuts
Outil de test
Accords d'interchange
Dfinition du port
Vrification du traitement des IDoc
Valeurs /df. pour param. mission
Valeurs /df. pour param. rception
Dveloppement type d'IDoc
Dveloppement segment d'IDoc
Dveloppement de vue d'IDoc
Tables de zone p. documentation IDoc
Objets pour affichage d'IDocs XML
Codes d'opration systme
Codes d'opration mission
Codes d'opration rception
Module fonction d'aff. enregt statut
Types de partenaires et contrles
Retransmettre rcep. (V3, EDILOGADR)
Administration IDoc
Gestion des statuts
Codes d'opration rception : textes
Codes opr. rception : modif. txtes
Codes d'opration systme : textes
Codes opr. systme : modifier txtes
Codes d'opration mission : textes
Codes opr. mission : modif. textes
MF pour modifier nom d'un fichier
Module fonction pour nom de chemin
Codes d'opration statut
Affect. des msg un obj. applicatif
22
BD10
BD100
BD101
BD102
BD103
BD104
BD105
BD11
BD12
BD13
BD14
BD15
BD16
BD17
BD18
BD19
BD20
BD21
BD22
BD23
BD24
BD25
BD26
BD27
BD28
BD30
BD31
BD32
BD33
BD34
BD35
BD36
BD37
BD40
BD41
BD42
BD43
BD44
BD47
BD48
BD50
BD51
BD66
BD67
BD68
BD69
BD70
BD71
BD72
BD73
BD75
BD77
BD78
BD79
BD81
BD82
BD83
BD84
BD85
BD86
BD87
BD89
BD91
BD92
BD93
BD95
BD96
BD97
BD98
23
BD52
BD53
BD54
BD55
BD56
BD57
BD58
BD59
BD60
BD61
BD62
BD63
BD64
BD65
CMOD Extensions
SMOD
Table1:ListoffieldsfornewsegmentZISADRX.
Field Name
Data Element
Structure
Field
Length
Data Elem.
Documentation
Data Type
MSGFN
MSGFN
MSGFN
CHAR
PARNR
PARNR
10
PARNR
NUMC
ADRNR
CADNR
10
CADNR
CHAR
NATIO
INTER
INTER
CHAR
ANRED
ANRED
15
ANRED
CHAR
NAME1
NAME1_BAS
35
NAME1_BAS
CHAR
NAME2
NAME2_BAS
35
NAME2_BAS
CHAR
STRAS
STRAS_GP
35
STRAS_GP
CHAR
ORT01
ORT01_GP
35
ORT01_GP
CHAR
10
REGIO
REGIO
REGIO
CHAR
11
LAND1
LAND1
LAND1
CHAR
12
PSTLZ
PSTLZ_BAS
10
PSTLZ_BAS
CHAR
24
25
26
27
28
29
30
31
32
33
34