You are on page 1of 8

11/5/2014

Beginners Guide to ALE and IDocs a step-by-step approach

Do you like this blog? Give us a like on Facebook X


riyaz.net
Tech Tips and Tutorials for SAP Professionals and Bloggers
Home
Tech
SAP
Blogging
Social Media
Money
Explore 3
Search
Tweet

You are here: Home > SAP > Beginners Guide to ALE and IDocs a step-by-step approach
16

Beginners Guide to ALE and IDocs a step-by9


step approach
Like

January 19, 2008 By Riyaz SAP Read Print


Share
0
Email PDF
This article will
help you understand the basics of ALE and IDocs via a simple do-it-yourself example.
CentUp
We will create a custom IDoc in one SAP system and then post some business data through it to another
SAP system.GetSocial
Business data will be picked up from custom data dictionary tables.
This article will help you understand the basics of ALE and IDocs via a simple do-it-yourself example.
We will create a custom IDoc in one SAP system and then post some business data through it to another
SAP system. Business data will be picked up from custom data dictionary tables.
ALE Application Link Enabling is a mechanism by which SAP systems communicate with each other
and with non-SAP EDI subsystems. Thus it helps integration of distributed systems. It supports fail-safe
delivery which implies that sender system does not have to worry about message not reaching the source
due to unavoidable situations. ALE can be used for migration and maintenance of master data as well as
for exchanging transactional data.
The messages that are exchanged are in the form of IDocs or Intermediate Documents. IDocs act like a
container or envelope for the application data. An IDOC is created as a result of execution of an
Outbound ALE. In an Inbound ALE an IDOC serves as an input to create application document. In the
SAP system IDocs are stored in the database tables. They can be used for SAP to SAP and SAP to nonSAP process communication as long as the participating processes can understand the syntax and
semantics of the data. Complete documentation on IDOC is obtained by using transaction WE60.
Every IDoc has exactly one control record along with a number of data records and status records.
Control record has the details of sender/receiver and other control information. Data records contain the
actual business data to be exchanged while the status records are attached to IDoc throughout the process
as the IDoc moves from one step to other.
http://www.riyaz.net/sap/beginners-guide-to-ale-and-idocs-a-step-by-step-approach/18/

1/8

11/5/2014

Beginners Guide to ALE and IDocs a step-by-step approach

Now, let us understand the ALE Configuration by means of an example scenario below:
The Scenario
Data from custom tables (created in customer
namespace) is to be formatted into an IDoc and sent
from one SAP R/3 system to another using ALE service.
We need to have two instances of SAP R/3 systems or
we can simulate this on two clients of the same SAP R/3
system.
Create three tables as shown below.

Creating Custom IDoc type and Message type


All the objects created should be present on both source as well as target system(s).
1. Create segments Transaction WE31
Create a segment ZRZSEG1
Add all fields of table ZCUSTOMERS to it
Save the segment and go back
Release it using the menu path Edit -> Set Release
Similarly create two more segments given below
Seg. ZRZSEG2 to hold all fields of table ZSOHEADERS
Seg. ZRZSEG3 to hold all fields of table ZSOITEMS
2. Create Basic IDoc type Transaction WE30

http://www.riyaz.net/sap/beginners-guide-to-ale-and-idocs-a-step-by-step-approach/18/

2/8

11/5/2014

Beginners Guide to ALE and IDocs a step-by-step approach

Create a Basic type ZRZORDER


Add the created segments in the hierarchy shown
Maintain attributes for each of the segments
Save the object and go back
Release the object using the menu path Edit -> Set Release
3. Create/Assign Message type Transactions WE81/WE82
Go to WE81
Create a new Message type ZRZSO_MT
Save the object
Go to WE82 and create new entry
Assign the message type ZRZSO_MT to the basic type ZRZORDER
Also specify the Release Version
Save the object
Thus we have defined the IDoc structure which will hold the data to be transferred. In the next part of the
article we will understand the outbound settings, i.e. the settings to be done in the source system.
Like

Share

Tweet

16

Explore: SAP, SAP ABAP Print


Share
Email PDF Share

About Riyaz
Riyaz Sayyad is the founder and editor of riyaz.net Tech Blog and flipstreak - Indian Contemporary Art
Gallery. Learn more about him here and connect with him on Facebook, Twitter and Google+...
http://www.riyaz.net/sap/beginners-guide-to-ale-and-idocs-a-step-by-step-approach/18/

3/8

11/5/2014

Beginners Guide to ALE and IDocs a step-by-step approach

Related Posts

XI/PI: The XI Starter Kit

Getting Started with Web Dynpro for ABAP Part II

Beginners Guide to XSLT Mapping in SAP PI

XI/PI: Configuration using Integration Directory

Comments
Show Older Comments First

1. shailendra says:
March 15, 2013 at 1:42 PM
Referenced link for above article:
http://shafiq.us/sap/index.php?option=com_content&view=article&id=48:idoc-step-bystep&catid=47:interfaces&Itemid=65
2. Pablo Ghosh Roy says:
January 2, 2013 at 6:29 PM
Hi Riyaz,
I hope you can help me out with an issue I am facing, I need to create a Plant Maintenance Order
via IDOC from data that will be coming into SAP via a 3rd Party System (Using XI). These PM
Orders are the ones that would usually be created using IW31, but we would like to achieve this
functionality using IDOCs.
So basically the incoming IDOCS after being processed must create the Plant Maintenance Orders.
Please advise me with the following information?
Standard IDOC Type to Create Plant Maintenance Orders.
Standard Message Type (Inbound) for the above IDOC.
Thanks,
Pablo
http://www.riyaz.net/sap/beginners-guide-to-ale-and-idocs-a-step-by-step-approach/18/

4/8

11/5/2014

Beginners Guide to ALE and IDocs a step-by-step approach

3. Ram Mohan says:


December 27, 2012 at 12:20 PM
It is very usefull for a beginner like me.
4. sachn says:
December 4, 2012 at 5:03 PM
good thnks
Show All Comments
Links to this Post
Free Updates
ENTER YOUR EMAIL:

Join Us

@riyaznet:
Follow @riyaznet

2,786 followers

Popular Articles
Beginner's Guide to ALE and IDocs - a step-by-step approach
XI/PI: SAP XI Troubleshooting Guide
Beginner's Guide to ALE and IDocs - Part II
XI/PI: A Guide to Using SAP XI SOAP Adapter
XI/PI: Convert Flat File to Deeply Nested XML Structures Using Only Graphical Mapping
XI/PI: Understanding the RFC Adapter
XI/PI: Simple IDoc Communication using SAP XI
Beginner's Guide to ALE and IDocs - Part III
XI/PI: File Content Conversion for Complex Structures
XI/PI: Dealing with Errors on the Outbound side
Evergreen Picks
GetSocial WordPress Plugin
Beginner's Guide to ALE and IDocs - a step-by-step approach
XI/PI: SAP XI Troubleshooting Guide
Beginner's Guide to ALE and IDocs - Part II
XI/PI: A Guide to Using SAP XI SOAP Adapter
XI/PI: Convert Flat File to Deeply Nested XML Structures Using Only Graphical Mapping
How to Customize GetSocial with CSS3 Buttons
XI/PI: Understanding the RFC Adapter
XI/PI: Simple IDoc Communication using SAP XI
Beginner's Guide to ALE and IDocs - Part III
Recent Posts
Gamification At Work Designing Engaging Business Software
http://www.riyaz.net/sap/beginners-guide-to-ale-and-idocs-a-step-by-step-approach/18/

5/8

11/5/2014

Beginners Guide to ALE and IDocs a step-by-step approach

Effective Steps for Generating Sharable Blog Topics


Stock Market and Guaranteed NAV Never Go Together
The Role of Short Term Sensations in Long Term Investments
Why should you get Professional Financial Advice On your Investments
Recommendations
XI/PI: Simple IDoc Communication using SAP XI
3 people recommend this.
Gamification At Work - Designing Engaging Business
Software - Review
18 people recommend this.
How to Mail Merge in Gmail using Google Docs
3 people recommend this.
Beginner's Guide to ALE and IDocs - a step-by-step
approach
14 people recommend this.
How to Add Google +1 Button to GetSocial Plugin
Be the first of your friends to recommend this.
Nutrition Myths and Facts
8 people recommend this.
Remove Background from Photo without Photoshop A How to Guide
14 people recommend this.
Indian Bridal Jewelry From Head To Toe
Be the first of your friends to recommend this.
Social Metrics - Social Media Monitoring Plugin for
WordPress
27 people recommend this.
GetSocial WordPress Plugin - Free Social Media
Sharing bar
76 people recommend this.
riyaz.net - Technology Blog
9 people recommend this.
Steps to an Effective Content Marketing Strategy
3 people recommend this.
Custom CSS3 Buttons for GetSocial WordPress
Plugin
7 people recommend this.
XSLT Mapping in SAP PI An Introduction and How
to Guide
3 people recommend this.
XI/PI: Designing with Integration Repository
3 people recommend this.
XI/PI: A Step-by-Step Guide to BPM - Asynch/Sync

http://www.riyaz.net/sap/beginners-guide-to-ale-and-idocs-a-step-by-step-approach/18/

6/8

11/5/2014

Beginners Guide to ALE and IDocs a step-by-step approach

XI/PI: A Step-by-Step Guide to BPM - Asynch/Sync


Bridge
3 people recommend this.
XI/PI: Convert Flat File to Deeply Nested XML
Structures Using Only Graphical Mapping
One person recommends this.
ABAP Mapping in SAP PI - A Beginner Guide
5 people recommend this.

Facebook social plugin

About Riyaz
riyaz.net is a popular technology site with how-to guides, tips and tutorials on personal technology,
blogging, social media, web apps, personal finance and SAP.
riyaz.net was launched way back in 2005 by web designer, blogger and SAP Consultant Riyaz Sayyad
from Pune, India. Over the years the site has grown into a full featured online community with thousands
of visitors daily from around the world. Read more.
Group Sites
Social Metrics pro
FlipBuy
Indian Art Gallery
SEO Blog
Connect
Facebook
Twitter
Google+
Subscribe via RSS
Email Newsletter
Contact Us
Downloads
Social Plugins
GetSocial Social Media Sharing Plugin
WP Tweetbox WordPress Plugin
Free Social Media Monitoring Tools for WordPress
Popular Topics
WordPress
Tips & Tricks
http://www.riyaz.net/sap/beginners-guide-to-ale-and-idocs-a-step-by-step-approach/18/

7/8

11/5/2014

Beginners Guide to ALE and IDocs a step-by-step approach

Internet
Software
SAP PI
SAP ABAP
Lifestyle
Personal Finance
Health & Fitness
Travel & Leisure
Popular Guides
Dropbox Tutorial
CDN Setup Guide
Blog Design Tips
Optimize RSS Feed
Create Twitter App
Short URLs
Password Protect Folders
Time Management
ALE IDocs Tutorial
SAP PI Starter Kit
SAP PI Tips
Ergonomics
Copyright 2005-2014 riyaz.net All Rights Reserved Terms of Use Privacy Policy Disclaimer
Designed by Riyaz Contact Us
Back to Top

http://www.riyaz.net/sap/beginners-guide-to-ale-and-idocs-a-step-by-step-approach/18/

8/8

You might also like