Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALE-IDOC ?

Former Member
0 Kudos

plz explain the ALE & IDOC ?

plz forward the soft copy of or material to me ?

i will surely award the points ? plzzzzzzzzzz ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

ALE -EDI Diff



The philosophical difference between EDI and ALE can be pinned as follows: If we send data to an external partner, we generally speak of EDI, while ALE is a mechanism to reliable replicate data between trusting systems to store a redundant copy of the IDoc data. The difference is made clear, when we think of a purchase order that is sent as an IDoc. If we send the purchase order to a supplier then the supplier will store the purchase order as a sales order. However, if we send the purchase order via ALE to another R/3 system, then the receiving system will store the purchase order also as a purchase order.

This is an article posted on the site below, You Can easily check it out.
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci983331,00.html

1) ALE = Application Link Enable: Initially developed for SAP as an abstract layer to extract master and transactional data to be sent ellectronically to other SAP systems. These days is also being used to send data no non-SAP systems. ALE is not a protocol or anything like that, it's just abstract layer composed by a set of applications which are capable of extracting aplication data on a 1-time basis or periodically, by selection criteria or incrementally by deltas.

2) In contrast, EDI = Electronic data interface, this is a comunication protocol not designed by SAP but it´s an industry standard. Of course most SAP software supports EDI, but EDI it's no software but the specification of the protocol in itself.

ALE(Application Link Enabling) refers to the losely coupled systems whereas the EDI speaks about the Electronic Document Exchange. We need to enable ALE in order to use the EDI feature. ALE builds the bridge and EDI is the means by which the data moves in and out of the SAP system just like vehicles moving over the bridge. IDOC(Intermediate Documents) are the data containers which will be moving in and out of SAP carrying data.

Thus summarising we need to establish ALE between the systems in order to use EDI between them. In case we need to use EDI between SAP and some other target system then we need a EDI subsystem which understands these IDOCs and converts into the format understood by the target system.


While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system.

Check this link for more details.
http://sapabap.iespana.es/sapabap/sap/faq/ale_idocs_bapi.htm

ALE/Idoc information



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

Check these step-by-step links

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501...

https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-001...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501...


EDI information



http://www.erpgenie.com/sapedi/index.htm
Please refer to site http://edifactory.de which will give you good documentation about EDI.
Check these links for EDI
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/idoc_abap.htm
www.sapgenie.com/sapedi/edi_sap_training.htm
www.sap-img.com/basis/ difference-between-edi-and-idoc.htm
help.sap.com/saphelp_nw04/helpdata/ en/35/26b592afab52b9e10000009b38f974/content.htm
help.sap.com/saphelp_nw04/helpdata/ en/35/26b594afab52b9e10000009b38f974/content.htm
http://www.onestopsap.com/interview-Question/edi/
http://www.intelligententerprise.com/channels/applications/feature/archive/kasturi2.jhtml
http://www.sapgenie.com/sapgenie/docs/i830v3020.xls
http://help.sap.com/saphelp_46c/helpdata/en/0b/2a655d507d11d18ee90000e8366fc2/frameset.htm
http://www.hud.gov/offices/hsg/comp/edi/0306sec1.cfm
http://www.sapgenie.com/sapedi/index.htm
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.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html

http://www.sap-img.com/abap/ale-bapi.htm

http://www.sap-img.com/basis/difference-between-edi-and-idoc.htm
http://www.sappro.com/downloads/OneClientDistribution.pdf

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b828943d711d1893e0000e8323c4f/frameset.htm
http://www.sapgenie.com/ale/whitepaper.htm
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/BCSRVEDISC/CAEDISCAP_STC.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf


idoc debugging



WE19 would help but worth checking the following out:

1. There is a valid outbound partner profile for the
combination of receiving partner (plus partner type/function0 and message
type (plus message function and code) and test flag?
2. The profile points to the correct port which has the correct
RFC destination attached
3. The RFC destination is OK, it has the correct address for
the receiving system and (if it is trfc destination) the userid is valid
(use SM59 then menu options for testing authorizations)
How are you generating the idoc? - that would have a bearing on potential
errors (e.g. control data values) and what are the errors you get?

u can debug or test u r idoc using we19 tool also....

Start the test tool with SAP Menu ® Tools ® IDoc Interface/ALE ® Test ® Test Tool (WE19). You can use a template for your test IDoc.
You can choose IDoc types as a template, either directly or according to a specific message type. You can use the F4 Help for IDocs used as a template, which searches for IDocs by selection criteria, in the same way, for example, to IDoc Display. When an IDoc file is used as a template, the IDocs are read from this file and are available to you for selection. A default value for the IDoc file gives you the system using your test port which you can enter in IDoc Administration . This test port must therefore be of the “file“ type. The default file is the inbound file entered there.

· You generate the IDoc using .

The IDoc is displayed as a tree structure. If you do not use a template to create the IDoc type, at least one more segment must be added.

· To create segments in the form of tree nodes (colored fields) place the cursor on an existing node (for example a control record at the top) and choose .

You can cut, paste or copy individual segments or entire segment groups by positioning the cursor on the relevant segment and selecting the required action from the Edit menu.

· Click on the white fields to change data in the segments.

In the case of the control record, only the fields which are relevant for standard inbound processing are displayed. Do not forget the required entries in the partner profiles if you want to send the IDoc for standard inbound processing! You can also change all of the control record data by choosing All fields in the edit screen.



In the All fields editor screen you must enter the non-language specific partner function (for example AG for vendor). This is the only screen in the IDoc Interface in which the partner function is not translated into your language (in English AG becomes vendor VD) - in the partner profiles or in the IDoc display the field is always translated. Thus, you see the partner functions here in the way they are saved in the database. This is a unique value in the SAP System and therefore protected against mistakes.

· The additional procedure depends on whether you want to test inbound or outbound processing.



Outbound Test Tool: Procedure

1. When you have completed your IDoc, choose Standard outbound. If you have chosen a valid port, the port and port type are displayed for you to check.

2. Decide if you want to start outbound processing immediately: The IDocs will then be transferred to the port (status 03), regardless of what is in the partner profiles. If you do not configure the test indicator, the status of the IDocs remains 30 in the database, again independent of the settings in the partner profiles. You can also send several copies of your IDoc (repetition factor).

If you want to pass the IDocs, which you stored in status 30 with the test tool in the database, on to the port, use Test: Outbound Processing from IDoc The advantage is that the settings then take effect in the partner profiles. In particular, a receiving system is also triggered when the file port is used, if that is defined in the partner profiles.

3. Choose to start the outbound processing.


Inbound Test Tool: Procedure

When you have completed your IDoc, select one of the following processing options:
Standard inbound processing:
The IDoc is treated like an IDoc which was sent by an external system. The IDoc is first saved in the database, then the corresponding control records are compared with the inbound partner profiles and finally the business process determined using the process code is triggered (see Inbound processing).

Inbound function module (inbound processing using ALE):
the IDoc is first saved in the database and can then be forwarded directly to the specified function module. The function module can be run in debugging mode. If the function module calls a transaction, it can be processed in the background, foreground or in the foreground from the point at which an error is found. To do so, however, the ABAP command CALL TRANSACTION must use the import parameter INPUT_METHOD, in conjunction with MODE. Otherwise, the transaction is always processed in the background.



Function modules called directly must have the ALE Interface (Release 3.0 onwards).

Inbound File:
Generate or extend a sequential inbound file: The IDoc is first saved in the database with status 68 ("error, no further processing") and then in a file. Specify the name explicitly. The system proposes a name determined from the test port of the IDoc administration. If you select Start IDoc inbound processing immediately, the file is processed immediately and then deleted if processing was successful. This mode corresponds exactly to standard IDoc inbound processing. If further processing is not started immediately, the file is kept and can be used for additional test purposes.

You can write the test IDoc more than once in the file and thus also send them for inbound processing more than once (repetition factor).

Choose to start inbound processing from the corresponding screen.


IDOC status codes


This appendix describes the IDOC status codes and the corresponding event severities. For more detailed information about IDOC status codes, refer to the appropriate SAP documentation.
Note:
Harmless events are generated only if the specific IDOC was in an error state in the previous polling cycle. Otherwise, no events are generated.
The following table describes outbound IDOC status codes that generate Tivoli Enterprise Console events:
Outbound IDOCs
Code Error Event Severity SAP Meaning
02 Yes Error Error passing data to port
03 No Error if transaction SM58 indicates an RFC transmission error Data pass to port OK
04 Yes Error Control information of EDI subsystem
05 Yes Error Translation
06 No Harmless Translation
07 Yes Error Syntax check
08 No Harmless Syntax check
09 Yes Error Interchange handling
10 No Harmless Interchange handling
11 Yes Error Dispatch
12, 13, 14 No Harmless OK
15 Yes Warning Interchange acknowledgement negative
16 No Harmless Functional acknowledgement
17 Yes Warning Functional acknowledgement negative
18 No Harmless Triggering EDI subsystem
20 Yes Error Triggering EDI subsystem
22 No Harmless Dispatch OK, acknowledgement still due
23 Yes Error Retransmission
24 No Harmless Control information of EDI subsystem
25 Yes Warning Processing despite syntax error
26 Yes Error Syntax check
27 Yes Error ALE error
29 Yes Error Error in ALE services
30 No Harmless Ready for dispatch (ALE)
31 No Harmless IDOC is marked for deletion
33 No Harmless Original of an IDOC which was edited
34 Yes Error Error in control record of IDOC
36 Yes Error Timeout error; electronic signature not performed
37 Yes Error IDOC added incorrectly
38 No Harmless IDOC archived
39 No Harmless Receive confirmed
40 Yes Error Application document not created in target system
41 No Harmless Application document created in target document
The following table describes the inbound IDOC status codes that generate Tivoli Enterprise Console events:
Inbound IDOCs
Code Error Event Severity SAP Meaning
51, 52 Yes Error Posting error
53 No Harmless Posting successful
54 Yes Error Error during formal application check
55 No Harmless Formal application check
56 Yes Error IDOC with error added
60 Yes Error Syntax error
61 Yes Warning Processing despite syntax error
62 No Harmless IDOC passed to application
63 Yes Error Error passing IDOC to application
64 No Harmless IDOC ready to be passed to application
65 Yes Error ALE error
68 No Harmless IDOC is marked for deletion
70 No Harmless Original of an IDOC which was edited
73 No Harmless IDOC archived

idoc extension



Enter transaction WE30 (ALE->Extension-> IDOC types->Maintain Idoc type)
- Type in your name of the extended IDOC type (usually starting with 'Z') and click on the Basic IDoc type, click the create icon.
- Click on Create new and enter a description and press enter.
- Click on ZIDOCTYPE01 and then on the Create icon.
- Enter ZIDOCTYPE as the segment type, click on Segment Editor.
- Enter a description for your segment type and create.
- Enter a description for your segment, enter each field required in your IDoc and press enter to validate.
- Save and generate, press back
- To release the segment choose Goto, Release from the menu.
- Check the box on the line of your segment.
- Save, back and enter.
- Your Idoc type structure should be displayed with your new segment.
- Save and back.
- To release the Idoc type choose Extras, Release type from the menu and Yes.


ALE FUNCTION MODULE ENHANCEMENTS

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.
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 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 moduleâs 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 (see Figure 5). 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.
• Enter a description of the project.
• Save.
• Click on SAP Enhancements.
• Enter VSV00001 for Enhancement.
• Save.
Once youâve created the project, edit the function exit components and activate the project. Remember that the code in the function exit enhancement will execute only if the project is activated. In fact, this is a convenient SAP enhancements feature, whereby the work in progress (developing code in the customer function) will not affect users of that application. When the code is completed, the project can be activated so the enhanced functionality takes effect. It can also be deactivated for maintenance.
As mentioned earlier, customer functions (function exits) are embedded in ALE function modules and can be used to influence the creation and modification of IDOC data on an outbound application or to post additional or modified IDOC data to an inbound R/3 application. Function exits are similar to regular function modules, with import/export parameters, tables (internal tables), and exceptions.
The two important factors to consider while developing the customer function are:
1. The point in the ALE function module where the function exit occurs
2. The data made available by the customer function that can be modified or posted to the R/3 application, based on the direction.
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 segmentâs data.
Letâs write ABAP/4 code to accomplish the task of populating IDOC segment Z1SADRX with a contact personâs 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 (as in Listing 1).
• 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 personâs business address on the Customer Master, letâs 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 distributed to this logical system. The only difference in configuration between a regular outbound ALE interface and an enhanced one is the partner profile definition. While maintaining the outbound parameters of the partner profile, make sure the IDOC type is ZDEBMASZ. The fields for Basic IDOC type and extension type are automatically populated with DEBMAS02 and ZDEBMASX, respectively.
To maintain the contact personâs business address of a customer:
• Use transaction BD12 or from BALE go to Master Data ->Customer -> Send and send that Customer Master record by executing the transaction after filling in the relevant fields such as customer number, message type, and logical system.
• Use transaction WE02 or WE05 to verify the IDOC created. You should see the new segment Z1SADRX populated with the correct data.
With SAP releases below 4.5B, you cannot capture changes to business address through change pointers because a change document object is not available for capturing business address changes, and also earlier releases have not been configured to write change documents for a contact personâs business address. If you would like this functionality, you can either create change document objects, generate function modules to create change documents, and perform ALE configuration to tie it in, or make a cosmetic change to the contact person screen data while changing the contact personâs business address so that it gets captured as a change to the Customer Master. Subsequently, the ALE enhancement that you performed captures the contact personâs business address.
Inbound interfaces. 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.

also refer these links

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

Check these step-by-step links

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501...

https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-001...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501...

regards,

srinivas

4 REPLIES 4

Former Member
0 Kudos

check url

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

And also u can get lots of inof from the below link.

http://www.sapgenie.com/ale/why_ale.htm

Check the following links:

http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/ALE_tutorial.html

http://www.sapmaterial.com/alematerial.html

http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/IDOC_tutorial.html

http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/user_exits_tutorial.html

http://www.sapmaterial.com/idoc_sample.html

http://www.sapmaterial.com/user_exit.html

Please check this online document for ALE and IDoc.

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/BCSRVEDISC/CAEDISCAP_STC.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf

Also check this links for additional information.

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

IDOCS

http://idocs.de/www5/books/IDocBook/IDOCS_CHAP09-11.pdf

http://idocs.de/cookbooks/idoc/cb12_idoc_20_outbound/idoc_outbound_45_rsnast00/docu.htm

IDOC / ALE Blogs

/people/raja.thangamani/blog/2007/07/19/troubleshooting-of-ale-process

/people/kevin.wilson2/blog/2006/11/13/ale-scenario-development-guide

Thanks

Seshu

Former Member
0 Kudos

Hi Akash,

<b>Application Linking Enabling - Purpose:</b>

<b>Application Link Enabling (ALE)</b> supports the distribution of business functions and processes across loosely coupled R/3 Systems. Connections from R/2 and non-SAP systems are supported.

<b>Implementation Considerations:</b>

Distributing business applications and at the same time ensuring data consistency is practical because:

The increasing globalization of markets has led to the physical division of organizational units.

Business processes are not restricted to one organization only and an increasing number of customers and vendors are involved.

The performance of an R/3 System can be improved by distributing the business applications.

<b>Features:</b>

ALE supports the configuration and operation of distributed applications. ALE supports the configuration and operation of distributed applications. ALE handles the Message Exchange

Between Distributed Applications across loosely coupled R/3-System, ensuring that data is always consistent.

Applications are integrated using a local database rather than a central one. There is no data retention. ALE ensures data is distributed and coordinated using asynchronous communication. ALE uses synchronous connections for reading data.

ALE supports:

?

Distribution of applications between different releases of R/3 Systems

Continued data exchange after a release upgrade without requiring special maintenance

Customer-specific extensions

Communication interfaces that allow connections to non-SAP systems

Coupling of R/3 and R/2 Systems

ALE has functions for controlling messages flows (Audit) and for eliminating malfunctions.

ALE and R/3 Procedure Model:

The R/3 Procedure Model provides cross-application information required for implementing R/3 software. The model is like a phase model whereby work steps are assigned to each phase and one or more Customizing works steps are associated with each phase.When implementing ALE functions you should refer to the R/3 procedure model to ensure that R/3 is implemented in a well structured way.

If ALE is to be supported in an R/3 System installation, implementation of the R/3 procedure model is affected at four points:

?Determining functions and processes

Specifying global settings

Modeling company structure

Modeling control data and master data

If ALE business processes are supported, functions and processes must be defined on a cross-system basis. The message types exchanged between the systems are described in the distribution model. When defining organizational units like company codes and plants in the R/3 System, it is important to note that these have to be unique worldwide, across all systems. For example, the plant 0001 can only exist in one R/3 System.

Message Exchange between Distributed Applications:

Purpose:

The basis for distributing application functions is asynchronous message exchange via ALE outbound and inbound processing.

Prerequisites:

Data exchange is based on IDoc. IDoc are created and dispatched by message types and by methods in distributed systems.

Process Flow:

An application creates a master IDoc containing the relevant data. The IDoc is passed to the ALE layer where it is prepared for dispatch. After the IDoc has been successfully transferred it is read by the target system and inbound processing is triggered. The data is processed either fully automatically or part manually according to the settings until is posted in the application.

Inbound and outbound processing can either be carried out for each individual IDoc or by massprocessing, whereby several IDoc are bundled together in one packet and processed in one step.

IDoc Definition:

An intermediate document (IDoc) is a container for exchanging data between R/3, R/2 and non-SAP systems.

Use:

ALE uses IDoc to exchange data between logical systems. Non SAP-systems can use IDoc as the standard interface for data transfer. IDoc are created by message types and (object) methods when data is to be distributed.

Structure:

An IDoc represents a configuration of an IDoc type that determines the IDoc structure. An IDoc consists of a header, several data segments and status records.The functions of the individual elements of an IDoc are as follows:

The contents, structure, sender, receiver and current status of the IDoc are defined in the IDoc header.

Each data segment contains a standard header consisting of a sequential segment

number, a description of the segment type and a 1000 character long string field

containing the actual data of the segment.

?The status records show the history of the processing steps applied to the IDoc so far.

The structure of the IDoc is recorded in the SAP System. The structure definition covers the

following:

The segment sequence. Hierarchical relationships between segments are possible.

The number of times a segment can occur is specified for each segment, as is

whether the segment is a mandatory segment or an optional segment.

The fields contained in a segment. In the example shown above the IDoc contains a

header segment that has to be the first segment of the message.

Thereafter there must be at least one additional item. The following conditions apply:

Each item must be followed by at least one sub-item and at most 99

Up to 9999 text segments can appear after an item's sub-items (optional)

The last segment in a message must be an accumulation segment (ACCUM)

An IDoc can only contain character fields.

Modeling Distribution:

Purpose:

To implement the distribution of business application processes and functions using ALE you need to construct a logical Distribution Model of the whole system. Within the framework of this configuration customers can specify what applications are to run on what systems and what messages are to be exchanged between the applications .

Distribution Model:

Definition: The distribution model describes the ALE message flows between logical systems.

Use:

You can specify the relationships between logical systems, message types, BAPIs and filters inthe distribution model. Applications and the ALE layer use the model to determine the receivers and to control data distribution.

Structure:

In the distribution model you can specify the messages to be sent to a logical system. You can also define requirements for message content and dispatch in the Filters. The distribution model consists of one or more views that you can define. With more complex distribution tasks you can assign business sub-areas or groups of logical systems to separate views. To ensure correct functioning the relevant views of the distribution model must be available in all the logical systems involved in ALE. You can find the functions for distributing views in Customizing for ALE.

Please go thru the below links

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

for ALE/IDOC configurations plz check the following thread:

Reward Points if useful

Former Member
0 Kudos

Hi

Creation of Custom IDOc type and message Type

First Create Partner Profile(WE20 Tcode) and Port Definition in WE19 Tcodes.

take the Basis help to create them.

1.First create segments in WE31 Tcode with the required dataelements

2.Create the Basic Idoc Type in WE30

release the Segments and IDOC type.

3.Create Message type in We81

4.Assign the message type to IDOC type in WE82 T code

5.Create the process code in We41 (for Outbound) WE42 (for Inbound)

6.Create A fun module in SE37 starting with ZIDOC_OUTPUT_.. by copying some Inbound (for Inbound) Outbound Fun module

7.Create Workflow setting if needed ..

8. Assign the fun module to Idoc Type, Message Type and WF object (if it is there0

9.Define setting for fun module in BD51

10.In BD51 Define the settings for Fun module..

10.Assign the Processs Code to Fun mod`ule

Outbound:

Step 1. Application document is created when transaction is saved.

2. Message control is invoked.

3. Messages are processed by system.

4. Messages are Edited (if desired).

5. Output (ALE / EDI) is checked

6. Validate against Message control record from Partner Profile

7. Application Document is saved.

8. Entry NAST table is created for every selected output program

along with Medium & Timing.

9. Check for Process Immediately .

If (yes)

Determine Processing Program from TNAPR Table.

ELSE

Execute RSNASTED Program.

10. Read Partner Profile to determine Process Code.

11. Process Code points to the Function Module & Invoked.

12. IDoc is generated.

13. Check for ALE Request.

if (Yes)

Perform Filters, Conversions, Version Changes etc.

Else.

IDoc is stored in DATABASE.

INBOUND:

Step 1. EDI Subsystem creates an IDoc file from EDI Messages

2. Subsystem calls Functional Module EDI_DATA_INCOMING from startRFC program.

3. Data in Control Record is validate against the Partner Profile.

4. IDoc is generated in Database and syntax check is carried out.

5. IDoc file is deleted once file read.

6. Event PROCESSSTATE REACHED is triggered in Idoc Object Workflow.

7. Check for Process Immediately.

If NO

Execute RBDAPP01 Program

Else

Read Process Code from Partner Profile

Process Code Points to Function Module

Application Document Posted.

further help:

check url

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

And also u can get lots of inof from the below link.

http://www.sapgenie.com/ale/why_ale.htm

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

http://www.allsaplinks.com/idoc_sample.html

http://www.allsaplinks.com/

http://www.sap-img.com/

http://www.sappoint.com/abap.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/BCSRVEDISC/CAEDISCAP_STC.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf

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://expertanswercenter.techtarget.com/eac/knowledgebaseCategory/0,295197,sid63_tax296858_idx0_off...

http://sap.ittoolbox.com/documents/popular-q-and-a/extending-a-basic-idoc-type-2358

http://help.sap.com/saphelp_47x200/helpdata/en/dc/6b7eee43d711d1893e0000e8323c4f/frameset.htm

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

Regards

Former Member
0 Kudos

ALE -EDI Diff



The philosophical difference between EDI and ALE can be pinned as follows: If we send data to an external partner, we generally speak of EDI, while ALE is a mechanism to reliable replicate data between trusting systems to store a redundant copy of the IDoc data. The difference is made clear, when we think of a purchase order that is sent as an IDoc. If we send the purchase order to a supplier then the supplier will store the purchase order as a sales order. However, if we send the purchase order via ALE to another R/3 system, then the receiving system will store the purchase order also as a purchase order.

This is an article posted on the site below, You Can easily check it out.
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci983331,00.html

1) ALE = Application Link Enable: Initially developed for SAP as an abstract layer to extract master and transactional data to be sent ellectronically to other SAP systems. These days is also being used to send data no non-SAP systems. ALE is not a protocol or anything like that, it's just abstract layer composed by a set of applications which are capable of extracting aplication data on a 1-time basis or periodically, by selection criteria or incrementally by deltas.

2) In contrast, EDI = Electronic data interface, this is a comunication protocol not designed by SAP but it´s an industry standard. Of course most SAP software supports EDI, but EDI it's no software but the specification of the protocol in itself.

ALE(Application Link Enabling) refers to the losely coupled systems whereas the EDI speaks about the Electronic Document Exchange. We need to enable ALE in order to use the EDI feature. ALE builds the bridge and EDI is the means by which the data moves in and out of the SAP system just like vehicles moving over the bridge. IDOC(Intermediate Documents) are the data containers which will be moving in and out of SAP carrying data.

Thus summarising we need to establish ALE between the systems in order to use EDI between them. In case we need to use EDI between SAP and some other target system then we need a EDI subsystem which understands these IDOCs and converts into the format understood by the target system.


While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system.

Check this link for more details.
http://sapabap.iespana.es/sapabap/sap/faq/ale_idocs_bapi.htm

ALE/Idoc information



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

Check these step-by-step links

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501...

https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-001...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501...


EDI information



http://www.erpgenie.com/sapedi/index.htm
Please refer to site http://edifactory.de which will give you good documentation about EDI.
Check these links for EDI
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/idoc_abap.htm
www.sapgenie.com/sapedi/edi_sap_training.htm
www.sap-img.com/basis/ difference-between-edi-and-idoc.htm
help.sap.com/saphelp_nw04/helpdata/ en/35/26b592afab52b9e10000009b38f974/content.htm
help.sap.com/saphelp_nw04/helpdata/ en/35/26b594afab52b9e10000009b38f974/content.htm
http://www.onestopsap.com/interview-Question/edi/
http://www.intelligententerprise.com/channels/applications/feature/archive/kasturi2.jhtml
http://www.sapgenie.com/sapgenie/docs/i830v3020.xls
http://help.sap.com/saphelp_46c/helpdata/en/0b/2a655d507d11d18ee90000e8366fc2/frameset.htm
http://www.hud.gov/offices/hsg/comp/edi/0306sec1.cfm
http://www.sapgenie.com/sapedi/index.htm
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.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html

http://www.sap-img.com/abap/ale-bapi.htm

http://www.sap-img.com/basis/difference-between-edi-and-idoc.htm
http://www.sappro.com/downloads/OneClientDistribution.pdf

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b828943d711d1893e0000e8323c4f/frameset.htm
http://www.sapgenie.com/ale/whitepaper.htm
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/BCSRVEDISC/CAEDISCAP_STC.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf


idoc debugging



WE19 would help but worth checking the following out:

1. There is a valid outbound partner profile for the
combination of receiving partner (plus partner type/function0 and message
type (plus message function and code) and test flag?
2. The profile points to the correct port which has the correct
RFC destination attached
3. The RFC destination is OK, it has the correct address for
the receiving system and (if it is trfc destination) the userid is valid
(use SM59 then menu options for testing authorizations)
How are you generating the idoc? - that would have a bearing on potential
errors (e.g. control data values) and what are the errors you get?

u can debug or test u r idoc using we19 tool also....

Start the test tool with SAP Menu ® Tools ® IDoc Interface/ALE ® Test ® Test Tool (WE19). You can use a template for your test IDoc.
You can choose IDoc types as a template, either directly or according to a specific message type. You can use the F4 Help for IDocs used as a template, which searches for IDocs by selection criteria, in the same way, for example, to IDoc Display. When an IDoc file is used as a template, the IDocs are read from this file and are available to you for selection. A default value for the IDoc file gives you the system using your test port which you can enter in IDoc Administration . This test port must therefore be of the “file“ type. The default file is the inbound file entered there.

· You generate the IDoc using .

The IDoc is displayed as a tree structure. If you do not use a template to create the IDoc type, at least one more segment must be added.

· To create segments in the form of tree nodes (colored fields) place the cursor on an existing node (for example a control record at the top) and choose .

You can cut, paste or copy individual segments or entire segment groups by positioning the cursor on the relevant segment and selecting the required action from the Edit menu.

· Click on the white fields to change data in the segments.

In the case of the control record, only the fields which are relevant for standard inbound processing are displayed. Do not forget the required entries in the partner profiles if you want to send the IDoc for standard inbound processing! You can also change all of the control record data by choosing All fields in the edit screen.



In the All fields editor screen you must enter the non-language specific partner function (for example AG for vendor). This is the only screen in the IDoc Interface in which the partner function is not translated into your language (in English AG becomes vendor VD) - in the partner profiles or in the IDoc display the field is always translated. Thus, you see the partner functions here in the way they are saved in the database. This is a unique value in the SAP System and therefore protected against mistakes.

· The additional procedure depends on whether you want to test inbound or outbound processing.



Outbound Test Tool: Procedure

1. When you have completed your IDoc, choose Standard outbound. If you have chosen a valid port, the port and port type are displayed for you to check.

2. Decide if you want to start outbound processing immediately: The IDocs will then be transferred to the port (status 03), regardless of what is in the partner profiles. If you do not configure the test indicator, the status of the IDocs remains 30 in the database, again independent of the settings in the partner profiles. You can also send several copies of your IDoc (repetition factor).

If you want to pass the IDocs, which you stored in status 30 with the test tool in the database, on to the port, use Test: Outbound Processing from IDoc The advantage is that the settings then take effect in the partner profiles. In particular, a receiving system is also triggered when the file port is used, if that is defined in the partner profiles.

3. Choose to start the outbound processing.


Inbound Test Tool: Procedure

When you have completed your IDoc, select one of the following processing options:
Standard inbound processing:
The IDoc is treated like an IDoc which was sent by an external system. The IDoc is first saved in the database, then the corresponding control records are compared with the inbound partner profiles and finally the business process determined using the process code is triggered (see Inbound processing).

Inbound function module (inbound processing using ALE):
the IDoc is first saved in the database and can then be forwarded directly to the specified function module. The function module can be run in debugging mode. If the function module calls a transaction, it can be processed in the background, foreground or in the foreground from the point at which an error is found. To do so, however, the ABAP command CALL TRANSACTION must use the import parameter INPUT_METHOD, in conjunction with MODE. Otherwise, the transaction is always processed in the background.



Function modules called directly must have the ALE Interface (Release 3.0 onwards).

Inbound File:
Generate or extend a sequential inbound file: The IDoc is first saved in the database with status 68 ("error, no further processing") and then in a file. Specify the name explicitly. The system proposes a name determined from the test port of the IDoc administration. If you select Start IDoc inbound processing immediately, the file is processed immediately and then deleted if processing was successful. This mode corresponds exactly to standard IDoc inbound processing. If further processing is not started immediately, the file is kept and can be used for additional test purposes.

You can write the test IDoc more than once in the file and thus also send them for inbound processing more than once (repetition factor).

Choose to start inbound processing from the corresponding screen.


IDOC status codes


This appendix describes the IDOC status codes and the corresponding event severities. For more detailed information about IDOC status codes, refer to the appropriate SAP documentation.
Note:
Harmless events are generated only if the specific IDOC was in an error state in the previous polling cycle. Otherwise, no events are generated.
The following table describes outbound IDOC status codes that generate Tivoli Enterprise Console events:
Outbound IDOCs
Code Error Event Severity SAP Meaning
02 Yes Error Error passing data to port
03 No Error if transaction SM58 indicates an RFC transmission error Data pass to port OK
04 Yes Error Control information of EDI subsystem
05 Yes Error Translation
06 No Harmless Translation
07 Yes Error Syntax check
08 No Harmless Syntax check
09 Yes Error Interchange handling
10 No Harmless Interchange handling
11 Yes Error Dispatch
12, 13, 14 No Harmless OK
15 Yes Warning Interchange acknowledgement negative
16 No Harmless Functional acknowledgement
17 Yes Warning Functional acknowledgement negative
18 No Harmless Triggering EDI subsystem
20 Yes Error Triggering EDI subsystem
22 No Harmless Dispatch OK, acknowledgement still due
23 Yes Error Retransmission
24 No Harmless Control information of EDI subsystem
25 Yes Warning Processing despite syntax error
26 Yes Error Syntax check
27 Yes Error ALE error
29 Yes Error Error in ALE services
30 No Harmless Ready for dispatch (ALE)
31 No Harmless IDOC is marked for deletion
33 No Harmless Original of an IDOC which was edited
34 Yes Error Error in control record of IDOC
36 Yes Error Timeout error; electronic signature not performed
37 Yes Error IDOC added incorrectly
38 No Harmless IDOC archived
39 No Harmless Receive confirmed
40 Yes Error Application document not created in target system
41 No Harmless Application document created in target document
The following table describes the inbound IDOC status codes that generate Tivoli Enterprise Console events:
Inbound IDOCs
Code Error Event Severity SAP Meaning
51, 52 Yes Error Posting error
53 No Harmless Posting successful
54 Yes Error Error during formal application check
55 No Harmless Formal application check
56 Yes Error IDOC with error added
60 Yes Error Syntax error
61 Yes Warning Processing despite syntax error
62 No Harmless IDOC passed to application
63 Yes Error Error passing IDOC to application
64 No Harmless IDOC ready to be passed to application
65 Yes Error ALE error
68 No Harmless IDOC is marked for deletion
70 No Harmless Original of an IDOC which was edited
73 No Harmless IDOC archived

idoc extension



Enter transaction WE30 (ALE->Extension-> IDOC types->Maintain Idoc type)
- Type in your name of the extended IDOC type (usually starting with 'Z') and click on the Basic IDoc type, click the create icon.
- Click on Create new and enter a description and press enter.
- Click on ZIDOCTYPE01 and then on the Create icon.
- Enter ZIDOCTYPE as the segment type, click on Segment Editor.
- Enter a description for your segment type and create.
- Enter a description for your segment, enter each field required in your IDoc and press enter to validate.
- Save and generate, press back
- To release the segment choose Goto, Release from the menu.
- Check the box on the line of your segment.
- Save, back and enter.
- Your Idoc type structure should be displayed with your new segment.
- Save and back.
- To release the Idoc type choose Extras, Release type from the menu and Yes.


ALE FUNCTION MODULE ENHANCEMENTS

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.
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 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 moduleâs 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 (see Figure 5). 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.
• Enter a description of the project.
• Save.
• Click on SAP Enhancements.
• Enter VSV00001 for Enhancement.
• Save.
Once youâve created the project, edit the function exit components and activate the project. Remember that the code in the function exit enhancement will execute only if the project is activated. In fact, this is a convenient SAP enhancements feature, whereby the work in progress (developing code in the customer function) will not affect users of that application. When the code is completed, the project can be activated so the enhanced functionality takes effect. It can also be deactivated for maintenance.
As mentioned earlier, customer functions (function exits) are embedded in ALE function modules and can be used to influence the creation and modification of IDOC data on an outbound application or to post additional or modified IDOC data to an inbound R/3 application. Function exits are similar to regular function modules, with import/export parameters, tables (internal tables), and exceptions.
The two important factors to consider while developing the customer function are:
1. The point in the ALE function module where the function exit occurs
2. The data made available by the customer function that can be modified or posted to the R/3 application, based on the direction.
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 segmentâs data.
Letâs write ABAP/4 code to accomplish the task of populating IDOC segment Z1SADRX with a contact personâs 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 (as in Listing 1).
• 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 personâs business address on the Customer Master, letâs 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 distributed to this logical system. The only difference in configuration between a regular outbound ALE interface and an enhanced one is the partner profile definition. While maintaining the outbound parameters of the partner profile, make sure the IDOC type is ZDEBMASZ. The fields for Basic IDOC type and extension type are automatically populated with DEBMAS02 and ZDEBMASX, respectively.
To maintain the contact personâs business address of a customer:
• Use transaction BD12 or from BALE go to Master Data ->Customer -> Send and send that Customer Master record by executing the transaction after filling in the relevant fields such as customer number, message type, and logical system.
• Use transaction WE02 or WE05 to verify the IDOC created. You should see the new segment Z1SADRX populated with the correct data.
With SAP releases below 4.5B, you cannot capture changes to business address through change pointers because a change document object is not available for capturing business address changes, and also earlier releases have not been configured to write change documents for a contact personâs business address. If you would like this functionality, you can either create change document objects, generate function modules to create change documents, and perform ALE configuration to tie it in, or make a cosmetic change to the contact person screen data while changing the contact personâs business address so that it gets captured as a change to the Customer Master. Subsequently, the ALE enhancement that you performed captures the contact personâs business address.
Inbound interfaces. 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.

also refer these links

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

Check these step-by-step links

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501...

https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-001...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501...

regards,

srinivas