2008 Apr 17 5:40 AM
hi gurus/folks,
iam beginner can u explain me about ale idocs and edi.
hi gurus/folks,
iam beginner can u explain me about ale idocs and edi.
2008 Apr 17 5:56 AM
Hi Vinay,
Check these references :
http://abapprogramming.blogspot.com/search/label/SAP%20ABAP%20ALE%20COMPLETE
http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5bea85b11d6b28500508b5d5211/content.htm
This will give a step by step method to create an IDOC.
http://www.saptechnical.com/Tutorials/ALE/ALEMainPage.htm
Reward if helpful,
Regards,
Esha Raj
Edited by: Esha Raj on Apr 17, 2008 6:57 AM
2008 Apr 17 5:58 AM
Here are the steps for creating custom idocs.
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
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
Outbound Settings
Define Logical Systems and Assign Client to Logical System Transaction SALE
Go to Define Logical System (See the figure)
Define a new logical system to identify the local system and save it
Now, go to Assign Client to Logical System (See the figure)
Add a new entry
Specify the client, previously created logical system and other attributes
Save the entry
Define a new logical system to identify the partner system and save it
Maintain RFC Destinations Transaction SM59
Create a new RFC destination for R/3 type connection
Specify the target host on Technical settings tab
Provide the Logon credentials on the Logon/Security tab
Save the settings
To verify the settings, Click on Test connection or Remote logon
Define Ports Transaction WE21
We need to define a tRFC port for the partner system
Click on Transactional RFC node
Create a new port
Provide a description
Specify the name of the target RFC destination
Save the object
Maintain Distribution Model Transaction BD64
Click on Change
Create a new model view
Provide a Short text and Technical name to the model view
Add message type
Specify sender and receiver systems
Also, specify the message type that we created previously
Save the Distribution model
Generate/Create Partner Profile Transactions BD82/WE20
To generate Partner profiles automatically you may use BD82 or go to BD64 and use the menu path Environment -> Generate partner profiles
Otherwise, you may use transaction WE20 to create a partner profile
On selection screen, specify the model view, target system and execute
The result log will be displayed on the next screen
To verify the partner profile go to WE20
Check the partner profile for the target system
Distribute Model View Transaction BD64
Select the Model View
Go to menu path Edit -> Model View -> Distribute
Result log will be displayed on the next screen
Outbound IDoc Generation Program
Create an executable program ZRZ_ORDER_IDOC in SE38. Below, I have described the program logic:
Fetch the data from the DDic tables ZCUSTOMERS, ZSOHEADERS and ZSOITEMS as per the selection criteria
Fill the control record structure of type EDIDC
Specify message type, Basic IDoc type, tRFC Port, Partner number and Partner type of the receiver
Fill the data records
Define structures like the IDoc segments
till the structures with fetched data
Pass the segment name and the above structure to the appropriate fields of EDIDD type structure
append the EDIDD structure to the EDIDD type internal table
Now, call the function module MASTER_IDOC_DISTRIBUTE and pass the IDoc control record structure and data record table
Commit work if return code is zero
Function module returns a table of type EDIDC to provide the etails about generated IDoc
dsplay appropriate log
Inbound IDoc Posting Function Module
In the receiving system, create a function module Z_IDOC_INPUT_ZRZSO_MT using SE37. Below, I have described the logic for the same.
Add Include MBDCONWF. This include contains predefined ALE constants.
Loop at EDIDC table
Check if the message type is ZRZORDER. Otherwise raise WRONG_FUNCTION_CALLED exception
Loop at EDIDD table
Append data from the segments to appropriate internal tables
For example: append data from ZRZSEG1 segment to the internal table of type ZCUSTOMERS
Update the DDic tables from internal tables
Depending on the result of the update, fill the IDoc status record (type BDIDOCSTAT) and append it to the corresponding table.
Status 53 => Success
Status 51 => Error
Inbound Settings
Define Logical Systems Transaction SALE (Please refer to Outbound Settings discussed in previous part)
Assign Client to Logical System Transaction SALE (Please refer to Outbound Settings discussed in previous part)
Maintain RFC Destinations Transaction SM59 (Please refer to Outbound Settings discussed in previous part)
Define Ports Transaction WE21 (Please refer to Outbound Settings discussed in previous part)
Generate/Create Partner Profile Transactions BD82/WE20 (Please refer to Outbound Settings discussed in previous part)
Assign Function Module to Logical message Transaction WE57
Create a new entry
Specify name of the Function Module as Z_IDOC_INPUT_ZRZSO_MT
Also, specify Type as F, Basic IDoc type as ZRZORDER, Message type as ZRZSO_MT and Direction as 2 (Inbound)
Save the entry
Define Input method for Inbound Function Module Transaction BD51
Create a new entry
Provide Function Module name as Z_IDOC_INPUT_ZRZSO_MT
Specify the Input method as 2
Save the entry
Create a Process Code Transaction WE42
Create a new Process Code ZPCRZ
Select Processing with ALE Service
Choose Processing type as Processing by function module
Save the entry
On the next screen, select your function module from the list
Save the changes
Now you will be taken to the next screen
Double-click on Logical message
In the Assignment to logical message, specify the message type ZRZSO_MT
Save the changes
Send and receive data
On the sender system, execute the IDoc Generation Program. Check the status of IDoc using transaction WE02.
Check the status of the IDoc in the receiver system using transaction WE02. You can also check the contents of DDic tables to make sure that the records have been created in the receiver system.
ALE
http://www.sapgenie.com/whitepapers/ale.htm
http://www.sapgenie.com/ale/index.htm
http://www.sappoint.com/abap.html
http://www.sapbrain.com/TUTORIALS/TECHNICAL/ALE_tutorial.html
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEHR/CABFAALEHR_ALE_QS.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/ECPCA/ECPCA_ALE_154.pdf
EDI
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/SDEDI/SDEDI.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
IDOC
/people/kevin.wilson2/blog/2005/12/07/changing-fields-in-an-idoc-segment
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/ale/configuration.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapdevelopment.co.uk/training
http://www.sapgenie.com/ale/why_ale.htm
http://www.sapdevelopment.co.uk/training
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
ALE/ IDOC/ XML
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://www.thespot4sap.com/Articles/SAP_XML_Business_Integration.asp
http://help.sap.com/saphelp_srm30/helpdata/en/72/0fe1385bed2815e10000000a114084/content.htm
IDOC Convertion
/people/kevin.wilson2/blog/2005/12/07/changing-fields-in-an-idoc-segment
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
Reward points if helpful.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |