31
DATA EXCHANGE VIA IDOC WITH ALE OR EDI IDoc or Intermediate Document is a standard SAP document exchange format. IDocs allow different application systems to be linked via a message-based interface. The IDoc interface consists of the definition of a data structure (where the data structure is the IDoc) and a processing logic for this data structure. There are three main aims behind the use of IDocs: The structured exchange of business documents so that they can be processed automatically. The various degrees of structural complexity as displayed by different application systems can be reduced to a structure which is as simple as possible. Example: The structure of an SAP application document and the structure of the corresponding EDI message under the UN/EDIFACT standard. IDocs allow for extensive exception handling before the data is posted to the application. The following techniques use the IDoc interface to exchange business data between different systems: Electronic Data Interchange (EDI) was the first form of data transfer to use IDocs . In EDI application scenarios, the processes, by definition, involve two partners: The sender and the recipient of an EDI message. EDI is a bilateral, document-oriented form of data transfer. Application Link Enabling (ALE) enables integration of business processes that are developed across several SAP systems or non-SAP systems. Thus, ALE is oriented to connect different applications on different systems. System-wide ALE message flows are modeled in a so called 'distribution model'. A typical scenario is the system data administration, where material master records have to be distributed from one central to several satellite systems. Nowadays, pure EDI scenarios are more and more executed on the basis of ALE technology, only that the system connection is 'just' bilateral. This DOC help you to Pass Data Between two separate sap System Introduction to EDI and ALE:--- EDI (Electronic Document interchange) EDI is the electronic exchange of business documents between the computer systems of business partners, using a standard format over a communication network. EDI is also called paperless exchange. Advantages: Reduced Data entry errors Reduced processing time

Complete ALE Working_1

Embed Size (px)

DESCRIPTION

Complete ALE iDoc working

Citation preview

DATA EXCHANGE VIA IDOC WITH ALE OR EDI

IDocorIntermediateDocument is a standard SAP document exchange format. IDocs allow different application systems to be linked via a message-based interface. The IDoc interface consists of the definition of a data structure (where the data structure is the IDoc)and a processing logic for this data structure. There are three main aims behind the use of IDocs: The structured exchange of business documents so that they can be processed automatically. The various degrees of structural complexity as displayed by different application systems can be reduced to a structure which is as simple as possible.Example: The structure of an SAP application document and the structure of the corresponding EDI message under the UN/EDIFACT standard. IDocs allow for extensive exception handling before the datais posted to the application.The following techniques use the IDoc interface to exchange business data between different systems: Electronic Data Interchange (EDI)was the first form of data transfer to use IDocs . In EDI application scenarios, the processes, by definition, involvetwopartners: The sender and the recipient of an EDI message. EDI is a bilateral, document-oriented form of data transfer. Application Link Enabling (ALE)enables integration of business processes that are developed acrossseveralSAP systems or non-SAP systems. Thus, ALE is oriented to connect different applications on different systems. System-wide ALE message flows are modeled in a so called 'distribution model'.A typical scenario is the system data administration, where material master records have to be distributed from one central to several satellite systems. Nowadays, pure EDI scenarios are more and more executed on the basis of ALE technology, only that the system connection is 'just' bilateral.

This DOC help you to Pass Data Between two separate sap SystemIntroduction to EDI and ALE:---EDI (Electronic Document interchange) EDI is the electronic exchange of business documents between the computer systems of business partners, using a standard format over a communication network.EDI is also called paperless exchange.Advantages: Reduced Data entry errors Reduced processing time Availability of data in electronic form Reduced paperwork Reduced Cost Reduced inventories and better planning Standard means of communications Better business process

EDI has two process

1. Outbound process2. Inbound process

Outbound Process:

1.Application document is created.2. IDOC is generated3.Idoc is transferred from SAP to Operating system layer4.Idoc is converted into EDI standards5.Edi document is transmitted to the business partner6.The Edi Subsystem report status to SAP

Inbound Process:

1. EDI transmission received2 .EDI document is converted into an IDOC3. IDOC is transferred to the SAP layer4. The application document is created5. The application document can be viewed.

IDOC: IDOC is a container that can be used to exchange data between any two processes. Each IDOC is assigned a unique number for tracking and future reference. IDOC consists of several segments, and segments contain several fields.

IDOC contains the following three types of records...

1. One Control Record.2. One or many Data Record3. One or many Status record.

In IDOCs the following terms are to be known.

PORT:Port is used in the outbound process to determine the name of the EDI subsystem program, the directory path where the IDOC file will be created at the operating system level, the IDOC file names and the RFC destinations.

RFC Destination:Used to define the characteristics of communication links to a remote system on which a functions needs to be executed.

Partner Profile:Partner profile specified the various components used in an outbound process (Partner number, IDOC type, message type, Port, Process code), the mode in which it communicates with the subsystem (batch or immediate) and the person to be notified in case of errors.

Message ControlUsed in pricing, account determination, material determination, and output determination. The message control component enables you to encapsulate business rules without having to write ABAP programs.

To process IDOC following Tcodes are needed:---On both sides:Logical System Names :SALESetup RFC destinations :SM59Port Destinations :WE21In Source system:Segment Creation : WE31Basic IDOC Type Creation: WE30Message Type Creation : WE81Assign Message Type To Basic IDOC Type: WE82Distribution Model : BD64Writing Report Program : SE38Partner Profile : WE20Message control : NACECheck IDOCs : WE02, WE05In Destination System:If both system are separate then, we have to again do Segment Creation : WE31Basic IDOC Type Creation: WE30Message Type Creation : WE81Assign Message Type To Basic IDOC Type: WE82 , with the same name as created in Source System, otherwise if we have two instances in same R/3 system then no need to do above one , do the below one only

Creating FM SE37Assign FM to Logical Message WE57Define I/P method for Inbound FM BD51Create Process Code WE42Generate Partner Profile BD64

Idoc processing among two different R/3 server:---

NOTE:- To transfer the data between two clients the table structures and their data types should match.

Common Steps in Both Clients:--

1.Creating Logical System name and assigning them to clients:--

Goto Tcode SALE:--

IMG path IDoc Interface / Application Link Enabling (ALE) -> Basic Settings -> Logical Systems -> Define Logical System

Click on Display / Change Button. Note: - In this example , as logical system is already existing ,so no need to do new entries .Otherwise we have to click New Entries tab and enter Logical client name with naming convention CLNT.In this case it will be JEDCLNT800(sender) and JETCLNT800(receiver)

Click on Save and Back buttonsNow you will come back to the IMG path screen. Click on Assign Logical System to client.

Click on new enteries:

Click on save button and Press back a new client will be assigned .

Now new logical system is assigned to both client.2. Now 2nd step , Create RFC Connection Name:---Tcode SM59mNext screen will look like, we have to give RFC destination , in which we have to enter logical client to which we want to connect , for e.g. in JED server we will give RFC destination as JETCLNT800.

In JET client we will enter RFC destination as JEDCLNT800

To check connection press test connection (Ctrl + F3) To login to other server , click on Remote Logon(Ctrl + F7).Depends upon your settings the destination client will open. If you check the Current user option under Logon/ Security tab, then it will show the screen directly without asking the user name and password details.

Now come to 3rd step,3. Create RFC PORTS(Tcode WE21)On pressing create , in dialog box you can select either Generate port name or own port name. If you select Generate Port name system will generate automatically. Here I selected Own port name. Click on Continue.

Now common steps for both server are done, now we will concentrate on Sender client ,i.e JEDCLNT800

4.Now create a table in JED say ZJEET_STUDENTS(SE11), with some enteries.

Create a table with same structure in client JET , say ZJST.5.Now creating IDOC Segments in JEDTcode WE31.

6.After creating segment type we will create BASIC IDOC TypeTcode : WE30

Click on Save and back button , Basic Idoc type is created and segment is assigned to it.

Goto Edit->Set Release

In next dialog box click on , yes

7.Now to create Message Type(WE 81)

New Message type is created:--

8.Assign Message type(ZJSTSEGMSG) to basic Idoc Type(ZJSTIDOC):---Tcode WE82,Click on Display/Change Button , and then click New Entries

9.Creating Model View and Distributing and Generating Partner profile:Go to TCODE BD64Click on Display/ Change button

Now , generate partner profile for created Model View, i.e. ZJSTMV--

Press F8(Execute)

Now Press Back , and distribute Model View.

In display dialog box ,select partner client system i.e. JETCLNT800 and click continue, the following screen will appear.

10.To check partner profile Go to TCODE WE20In displayed screen select the partner system in left side tree under Partner Type LS.

Now execute the program, and specify the range of records to transfer to JETGo to TCODE WE02 to check the generated IDOC control records.Click on Execute

If status record is 30, run standard report RSEOUT00, give generated IDoc Number.At receiver , i.e. JET:--12. Create a FM to update the table from IDOC Segment.1. Goto SE37

Click on Save and activate.

12. Assign Fm to logical Message.

Tcode :-- WE57(Message name should be same as in sender client )

Segment creation at JET(Tcode we31)(If 2 different R/3 ,i.e. not on same instance):-

13. Define Input Method for Inbound Function Module: Go to TCODE BD51 Click on Display / Change button

14.Creating Process Code: Go to TCODE WE42 Click on Display / Change Button

Double click on Logical Message ---

15.Generating the Partner Profile:Go to TCODE BD64.Select the Model View which you distributed in client JED.

Transferring the IDOC control records from Client JED to JET:In source system, go to TCODE SE38.(In client JED)

Execute the Report program (ZJEET_IDOC)which you created.*&---------------------------------------------------------------------**& Report ZJEET_IDOC*&*&---------------------------------------------------------------------**&*&*&---------------------------------------------------------------------*

report zjeet_idoc.

tables: zjeet_students.data : s_ctrl_rec like edidc, "Idoc Control Record s_zjstseg like zjstseg. "CUSTOMER Header Datadata : t_zjeet_students like zjeet_students occurs 0 with header line.data : t_edidd like edidd occurs 0 with header line. "Data Recordsdata : t_comm_idoc like edidc occurs 0 with header line. "Generated Communication IDOcconstants :c_zjstseg like edidd-segnam value 'ZJSTSEG'.constants: c_idoctp like edidc-idoctp value 'ZJSTIDOC'.*** Selection Screenselect-options : s_stuid for zjeet_students-zpern obligatory.parameters : c_mestyp like edidc-mestyp default 'ZJSTSEGMSG', "Message Type c_rcvprt like edidc-rcvprt default 'LS', "Partner type of receiver c_logsys like edidc-rcvprn default 'JETCLNT800', c_rcvpor like edidc-rcvpor default 'PORTJT800', c_sndprn like edidc-sndprn default 'JEDCLNT800', c_sndprt like edidc-sndprt default 'LS'. "Destination System***START-OF-SELECTIONstart-of-selection. perform generate_data_records. perform generate_control_record. perform send_idoc.*&---------------------------------------------------------------------**& Form GENERATE_DATA_RECORDS*&---------------------------------------------------------------------** text*----------------------------------------------------------------------** --> p1 text* p1 text* p1 text* p1 text*