0% found this document useful (0 votes)
69 views7 pages

IDOCs D

There are three main types of records used in SAP ALE IDocs: control records, data records, and status records. Control record information is stored in table EDIDC, data record information is stored in table EDIDD, and status record information is stored in table EDIDS. A Message type specifies the type of information that can be sent or received, like material master data, while an IDoc type contains all the detailed segments and fields. A partner profile in WE20 allows a system to specify which message types it can send or receive from another system.

Uploaded by

amit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views7 pages

IDOCs D

There are three main types of records used in SAP ALE IDocs: control records, data records, and status records. Control record information is stored in table EDIDC, data record information is stored in table EDIDD, and status record information is stored in table EDIDS. A Message type specifies the type of information that can be sent or received, like material master data, while an IDoc type contains all the detailed segments and fields. A partner profile in WE20 allows a system to specify which message types it can send or receive from another system.

Uploaded by

amit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

What is a IDOC?

An IDoc is simply a data container that is used to exchange information between any two processes that can understand the
syntax and semantics of the data. IDoc is not a process.
- IDocs are stored in the database.
- In the SAP system, IDocs are stored in database tables.
- IDocs are independent of the sending and receiving systems.
- IDocs are independent of the direction of data exchange.

Creation of IDOCs
Transaction code: WE30 – IDOC Basic Type

Steps of Defining Segment


Creating Segment: Tcode - WE31
Creating Message Type: Tcode - WE81
Assigning Message type to Idoc type: Tcode - WE82

Process
The two processes for IDoc are Outbound Process and Inbound Process.

Outbound Process
When the data is sent out from the system, the process is called Outbound Process and the IDoc is known as Outbound
IDoc.

Inbound Process
When the data is coming in, the process is called Inbound Process and the IDoc is known as Inbound IDoc.

BD87 - Process inbound IDoc - When you restart processing of a failed IDoc in BD87 you only deal with
this failed IDoc.
BD87 you can process any number of Idocs.
You CANNOT process a SUCCESSFUL Idoc in BD87.
WE19 - IDoc: Test tool inbound - If you open an existing IDoc in WE19 and process it again you create a
new IDoc.
You can process only one Idoc at a time.
You CAN process a successful Idoc in WE19.
Both tcodes are attached to same program RSEIDOC2. There is nothing much difference.
WE02 - Display IDoc
WE05 – Idoc List. WE05 to view the IDocs and their statuses.

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

▪ 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

Question- What are the types of records in SAP ALE Idoc and where is this information stored?
There are three types of records in SAP ALE Idoc:
Control Records : Control record information for an IDoc is stored in standard table EDIDC.
Data Records : Data record information for an IDoc is stored in standard table EDIDD.
Status Records : Status record information for an IDoc is stored in standard table EDIDS.

Question- What is a Message type and Idoc Type? What is the difference between Message type and an
IDoc type?
Answer: Message type and an IDoc type are closely related. In fact, you will find that a Message type is
always associated with an IDoc type. Whereas an IDoc type is a detailed version with all the segments and
fields, a Message type is used just to specify the kind of information that a system can send or receive to or
from another system.
So If system SAP1 has a Partner Profile where it specifies MATMAS as an outbound message type, it just
means that SAP1 can send material master data to say system SAP2.

If system SAP1 has a Partner Profile where it specifies MATMAS as an inbound message type, it just means
that SAP1 can receive material master data from say system SAP2.

What all fields can be sent and received will be specified in the IDoc type.
Some other message types: DEBMAS (Customers), CREMAS (Vendors) belong to the Master data.

The link between a message Type and an IDoc type is maintained in Tcode WE82.

Question - What is a partner profile? What are the types of partner profiles?
To be able to communicate with a partner via an IDoc interface, each system needs to maintain a partner
profile. A partner profile is a mechanism by which the system can specify what kind of messages (message
types) it can send or receive.
Partner profiles can be maintained in WE20.
ALE Configuration

Outbound Process (Sending System) Steps:


1) Goto Tcode SALE:
Creating the logical system

Click on Sending and Receiving Systems à Select Logical Systems--Here Define the Logical Systems à Click on Execute
Button
Go for New Entries
1) System Name : LOG1:Description: Sending System
2) System Name : LOG2:Description: Receiving System
Press Enter & Save it will ask for Request if you want new request create new request or press continue for transferring the
objects.
Assigning Client to the Logical System:
Select Assign Client to Logical Systems -

Client : Sending System


Logical System : LOG1
and also
Client : Receiving System
Logical System : LOG2

Save this Data.

Step 2) For RFC Creation:


Goto Tcode SM59 and Select R/3 Connects
Click on create Button
RFC Destination Name should be same as partner's logical system name and case sensitive to create the ports
automatically while generating the partner profiles
Give the information for required fields:
RFC Destination : LOG2
Connection type :3
Target Host : sappdc.wipro.com
System No : 00
Client : 210
User : Login user name
Password :
Save this & Test it and Remote Login
Step 3) Goto Tcode BD64:

Click on the change button>Click on the create model view


Short Text: model view
Technical Name: LMOD
Save this & press ok
Select just created model view
Name: "LMOD"
Goto add message type
Model Name : LMOD
Sender : LOG1
Receiver : LOG2
Message type: ZAZHARMESS
Save and press Enter.

4) Goto Tcode BD82:

Give Model View : LMOD


Partner system : LOG2
Execute this by pressing F8
It will gives you sending system port No: A00000000089 (Like)

5) Goto Tcode BD64:


Select the model view
Goto >Edit >model view > Distribute
Press ok & Press Enter.

Run your Zprogram


REPORT ZIDOC1 .
DATA: Begin of imara occurs 0,
matnr like mara-matnr,
mtart like mara-mtart,
end of imara.
DATA: wamas_con LIKE edidc,
imas_data LIKE edidd OCCURS 0 WITH HEADER LINE,
icom_con LIKE edidc OCCURS 0 WITH HEADER LINE.
PARAMETERS: e_matnr LIKE mara-matnr,
e_msgtyp LIKE edidc-mestyp,
e_rcvprn LIKE edidc-rcvprn.
* retrive app. data from DB
SELECT matnr mtart FROM mara INTO TABLE imara WHERE
matnr = e_matnr.
*Master idoc control record
wamas_con-rcvprt = 'LS'.
wamas_con-rcvprn = e_rcvprn.
wamas_con-idoctp = 'ZAZHARIDOC'.
wamas_con-mestyp = e_msgtyp.
* master idoc data records
LOOP AT imara.
imas_data-segnam = 'ZAZHARSEG'.
move imara to imas_data-sdata .
APPEND imas_data.
ENDLOOP.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = wamas_con
TABLES
communication_idoc_control = icom_con
master_idoc_data = imas_data
COMMIT WORK.

6) Verifying Transfer of IDOCs Tcode - we05


ALE/IDOC Status Codes (outbound):
01> IDoc Added
30 > IDoc ready for dispatch
29 >Error in ALE service Layer
12 >Dispatch ok
03 > Data passed to port ok.

Inbound Process (Receiving System) Steps:


Do the same step as you did in sending system

> Creating IDoc


> Defining the Segment
> Creating Message Type
> Assigning the Message Type
> Defining the Logical System
> Assigning the Logical System
> Creating the Distribution Model
1) Goto Tcode - we57:
Assign function module to IDoc type
Module: Function module
Basic type:
Message type:
Direction: 2 (inbound)
2) Creating Inbound process code - we42
3) Verifying Idoc List Tcode - we05
4) ALE/IDOC Status Codes (Inbound):
50 > IDoc Added
51 >Application Document not posted
64 >IDoc ready to be transferred to application
62 >IDoc passed to application
53 >Application Document posted

You might also like