<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Idocs in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/idocs/m-p/2470752#M555462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two type as per I know for Customized IDOCS&lt;/P&gt;&lt;P&gt;Inbound IDOC processing&lt;/P&gt;&lt;P&gt;OUTBOUND IDOC processing&lt;/P&gt;&lt;P&gt;See the document below.. It will for sure help you a lot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SECTION 2. Steps to Creating a Customised IDOC&lt;/P&gt;&lt;P&gt;(see Appendix III for Screenshots of Steps)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;2.1 Outbound Interface&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;PROCESS DIAGRAM&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Outbound Interface&lt;/P&gt;&lt;P&gt;1. Analyse Hierarchy Levels&lt;/P&gt;&lt;P&gt;2. Create New segment&lt;/P&gt;&lt;P&gt;3. Create New IDoc Type&lt;/P&gt;&lt;P&gt;4. Create New Message Type&lt;/P&gt;&lt;P&gt;5. Link Message with IDoc Type&lt;/P&gt;&lt;P&gt;6.  Create an entry in EDP13 via transactions WE20 and BD64&lt;/P&gt;&lt;P&gt;7. Populate the Custom IDoc via ABAP Program&lt;/P&gt;&lt;P&gt;   7b Error Handling&lt;/P&gt;&lt;P&gt;   7c. Send Status Email&lt;/P&gt;&lt;P&gt;8. Test the Population of the Custom IDoc&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 1 &amp;#150; Analyse Hierarchy Levels:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Analyse the data relationships being processed in the interface.  Define the appropriate hierarchical Parent-to-Child relationships.  &lt;/P&gt;&lt;P&gt;Navigate to transaction code WEDI&lt;/P&gt;&lt;P&gt;Transaction WEDI displays the IDOC main menu.  This allows navigation around the various development and control areas to create a customised IDOC.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Step 2 &amp;#150; Create a new segment:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;via wedi : Development - IDOC Segments or Transaction code WE31.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter segment name and click on Create.&lt;/P&gt;&lt;P&gt;The name of the segment type must start with Z1 , and have a maximum of eight characters.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter description and enter the relevant field names and data elements.&lt;/P&gt;&lt;P&gt;The segment should represent a structure in the program so for each field in the segment a field name and a data element must be defined.&lt;/P&gt;&lt;P&gt;&amp;#149;Save the segment and enter Person Responsible and Processing Person .&lt;/P&gt;&lt;P&gt;&amp;#149;Go to Edit and Set Release. &lt;/P&gt;&lt;P&gt;&amp;#149;Repeat this procedure for each new Segment in the IDOC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 3 &amp;#150; Create a new IDOC Type&amp;lt;/b&amp;gt;via wedi Development - IDOC Types or Transaction WE30.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter segment name (starting with Z), click on Basic Type and then Create.  &lt;/P&gt;&lt;P&gt;&amp;#149;Create as new, enter Person Responsible and Processing Person  and enter description.&lt;/P&gt;&lt;P&gt;&amp;#149;On &amp;#145;Create Basic Type&amp;#146; screen decide where segments should be inserted and go to Edit/Create Segment.&lt;/P&gt;&lt;P&gt;&amp;#149;Complete relevant fields in the Maintain Attributes screen: &lt;/P&gt;&lt;P&gt;&amp;#149;From the relevant segments created in Step 2 enter the Segment type and if mandatory segment.&lt;/P&gt;&lt;P&gt;&amp;#149;The Minimum and Maximum number of segments to be allowed in the sequence. (One minimum and one maximum if segment is mandatory).&lt;/P&gt;&lt;P&gt;&amp;#149;The Parent Segment and Hierarchy Level will be automatically created depending on where in the IDOC tree you decided to create that particular segment.&lt;/P&gt;&lt;P&gt;&amp;#149;Repeat this process for each segment needed in the IDOC type, deciding whether to add the next segments at the same level or as a &amp;#145;Child&amp;#146;.&lt;/P&gt;&lt;P&gt;&amp;#149;When IDOC created return to initial screen.  Go to Edit and Set Release.&lt;/P&gt;&lt;P&gt;&amp;#149;Go to Transaction WE60 to view the IDoc Type you have created.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Step 4 &amp;#150; Create new Message Type&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;via wedi Development - Message Types or Transaction WE81.&lt;/P&gt;&lt;P&gt;&amp;#149;Display/Change and click on New Entries&lt;/P&gt;&lt;P&gt;&amp;#149;Create a new Message Type and Save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 5 &amp;#150; Link Message Type to IDOC Type&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;via wedi Development - IDOC Type/Message or Transaction WE82.&lt;/P&gt;&lt;P&gt;&amp;#149;Display/Change and then click on New Entries.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter Message Type, Basic Type (IDOC Type) and Release (46C) and Save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 6 &amp;#150; Create an entry in EDP13 via transactions WE20 and BD64.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;The partner profile for the Idoc must be set up and generated in the transaction BD64 and transaction WE20.&lt;/P&gt;&lt;P&gt;&amp;#149;WE20 &amp;#150; Add Message Type to appropriate Partner Type, Enter Message Type, Receiver Port and Idoc Type and Save.&lt;/P&gt;&lt;P&gt;&amp;#149;BD64 &amp;#150; Create a Model View, Enter Sender and Receiver Ports, Attach Message Type.  Go to &amp;#145;Environment&amp;#146; on Menu and click on Generate Partner Profiles and generate (not save) profile. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 7 &amp;#150; Populate the custom IDOC via ABAP Program&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;See Test Program ZOUTBD_IDOC_TEMPLATE, Appendix IV.&lt;/P&gt;&lt;P&gt;&amp;#149;Create an Internal Table for each segment type, this should be exactly the same structure as the segment type.&lt;/P&gt;&lt;P&gt;&amp;#149;The control record is filled into a structure like EDIDC.  The message type and the Idoc type for the Idoc must be populated into the eddic structure.&lt;/P&gt;&lt;P&gt;- PERFORM populate_Control_structure USING  c_mestyp&lt;/P&gt;&lt;P&gt;                                                                       c_SEGMENT_type1.&lt;/P&gt;&lt;P&gt;&amp;#149;The data segments are filled into a structure like edidd-sdata; sdata and the segment name are populated into the edidd structure. &lt;/P&gt;&lt;P&gt;- PERFORM transfer_Parent_data_to_seg.&lt;/P&gt;&lt;P&gt;&amp;#149;The standard SAP function module MASTER_IDOC_DISTRIBUTE is called to pass the populated IDOC to the ALE Layer.&lt;/P&gt;&lt;P&gt;- PERFORM master_idoc_distribute.&lt;/P&gt;&lt;P&gt;&amp;#149;NOTE:  This function module is only called for stand alone programs and Shared Master Data programs (SMD).   It is not called when using extensions or output determination.&lt;/P&gt;&lt;P&gt;&amp;#149;The ALE Layer handles the sending of the IDOC to the receiving system.&lt;/P&gt;&lt;P&gt;&amp;#149;Error Handling (see  Step 7b).&lt;/P&gt;&lt;P&gt;&amp;#149;Commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Project Specific&lt;/P&gt;&lt;P&gt;Step 7b &amp;#150; Error Handling&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;#149;Analyse which fields in the interface are mandatory for the receiving system and who needs to receive error notification.&lt;/P&gt;&lt;P&gt;&amp;#149;Declare a structure of type &amp;#145;MCMAILOBJ&amp;#146; for sending instructions.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter values for the internal table based on structure &amp;#145;MCMAILOBJ&amp;#146; &lt;/P&gt;&lt;P&gt;&amp;#149;For selection processes, on SY-SUBRC checks and where fields are mandatory for the receiving system; insert Function Module  &amp;#145;MC_SEND_MAIL&amp;#146;.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter values in the following parameters: -&lt;/P&gt;&lt;P&gt;MS_MAIL_SENDMODE         =  &amp;#145;B&amp;#146; (Batch Mode)&lt;/P&gt;&lt;P&gt;MS_MAIL_TITLE                    =  'Mail Title'&lt;/P&gt;&lt;P&gt;MS_MAIL_DESCRIPTION     =  &amp;#145;Error description&amp;#146; (e.g. MATNR not given)&lt;/P&gt;&lt;P&gt;MS_MAIL_RECEIVER           =  &amp;#145;Name of Receiver&amp;#146; (To be determined)&lt;/P&gt;&lt;P&gt;MS_MAIL_EXPRESS             =  &amp;#145;E&amp;#146; (Express Delivery)&lt;/P&gt;&lt;P&gt;MS_MAIL_DLINAME            = Leave Blank&lt;/P&gt;&lt;P&gt;MS_MAIL_LANGU                =  'E'  (Language)&lt;/P&gt;&lt;P&gt;MS_MAIL_FUNKOBJ_NAME  = Leave Blank&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;           MS_MAIL_CONT           =  I_MCMAILOBJ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;It has to be determined separately for each interface how these errors and mail notifications are to be grouped &amp;#150; dependant upon the number of errors that are potentially likely. One possible approach is to send an email for each reason for rejection and include all the records that failed for that reason in the mail notification. Another possible approach is to send an email for every failure. &lt;/P&gt;&lt;P&gt;When error checking for mandatory fields it is common SAP practice to reject a record on its first failure (irrespective of subsequent errors in that record)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 7c &amp;#150; Send status mail&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;#149;Append to table I_MCMAILOBJ details of the time the interface was processed, how many Idocs were created and how many of these produced a status of 03.&lt;/P&gt;&lt;P&gt;&amp;#149;Select the user to receive the mail from ZINT_RECEIVER, using the name of the program as a key (SY-CPROG).&lt;/P&gt;&lt;P&gt;&amp;#149;Use function Module &amp;#145;MC_SEND_MAIL&amp;#146; to send a mail to the user containing the contents of I_MCMAILOBJ at the end of the interface processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 8 &amp;#150; Test the population of the custom IDOC&lt;/P&gt;&lt;P&gt;via wedi IDoc - Display IDoc or Transaction WE02.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter your message type and execute.&lt;/P&gt;&lt;P&gt;&amp;#149;Status should be green, double click on one of the Idocs you have created to view its contents.&lt;/P&gt;&lt;P&gt;&amp;#149;If a problem has occurred click on Status which will give you a description of the error.&lt;/P&gt;&lt;P&gt;&amp;#149;Drop down Data Records arrow and this should list the data in the IDoc in the correct hierarchical structure.&lt;/P&gt;&lt;P&gt;&amp;#149;Click on each individual segment and view the content to check that the correct data has been read.&lt;/P&gt;&lt;P&gt;&amp;#149;If you have UNIX access by using AL11 you can view the file that you have created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;For some interfaces it may be valid to send an empty file to SAP.  This empty file is converted to the custom IDOC format expected by SAP.  This custom IDOC will contain dummy information.  In the inbound processing code, if the dummy information is identified then the processing of the IDOC is considered to be complete and the IDOC should then be assigned a successfully processed status of 53, even though it has not been processed at all.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;2.2 Inbound Interface&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Follow steps 1 to 5 inclusive as detailed above.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Step 6&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Write a custom function module to handle custom inbound processing.  This custom function module must&lt;/P&gt;&lt;P&gt;&amp;#149;Check for the correct message type&lt;/P&gt;&lt;P&gt;&amp;#149;Read the IDoc data segment&lt;/P&gt;&lt;P&gt;&amp;#149;Perform data conversion and validate the data as appropriate&lt;/P&gt;&lt;P&gt;&amp;#149;Post the data to the database&lt;/P&gt;&lt;P&gt;&amp;#149;Handle any error situations&lt;/P&gt;&lt;P&gt;&amp;#149;Set the correct return values for the status record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that the Function Module must not make a commit to the database.  This is because the status record is not written until control returns to the ALE layer.  So if you commit work in the Function Module and an error occurs in returning to the ALE Layer, the status record must not be updated with a successful outcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The commit work is executed in the ALE Layer after the status records are updated, via the standard SAP function module IDOC_INBOUND_PROCESS. This attributes of this function module are set up in (Transaction BD51), click on &amp;#145;New Entries&amp;#146; and fill in data; the main input parameters being &amp;#145;Input Type&amp;#146; and &amp;#145;Dialog Allowed&amp;#146;.&lt;/P&gt;&lt;P&gt;Take care as some standard SAP transactions contain a Commit Work as part of their processing.  Therefore using a BDC to process inbound data to SAP may not be acceptable.  You need to check that the SAP transaction is ALE enabled.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 7&lt;/P&gt;&lt;P&gt;(Transaction WE57)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Assign the custom function module to the IDoc type and the message type.&lt;/P&gt;&lt;P&gt;Set function module to type &amp;#145;F&amp;#146; and direction &amp;#145;2&amp;#146; for inbound.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 8&lt;/P&gt;&lt;P&gt;(Transaction WE42)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Create a new process code and assign it to the function module.  The process code determines how the incoming IDoc is to be processed in SAP.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Step 9&lt;/P&gt;&lt;P&gt;(Transaction BD67)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Assign the function module to the process code created above.  Got to &amp;#145;New Entries&amp;#146; and enter the process code and the function module name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Step 10&lt;/P&gt;&lt;P&gt;(Transaction WE20 and Transaction BD64)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Create a partner profile for your message and ensure that in transaction WE20 the process code is the one that points to your function module. (See step 6 of creating Outbound Idocs).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 11&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Ensure that error handling functionality is present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If an interface is expecting a file every day, and a custom IDoc may only be output from SAP periodically, it would be necessary to create some kind of output from SAP on a daily basis to pass to Mercator to allow it to map to an empty file.  As we are dealing with custom IDoc types we can design the IDoc so that the data segments are not mandatory.  Therefore the SAP program, on finding no data to populate the custom IDoc, would only need to create the control record.  The empty IDoc containing the control record would be passed to Mercator.  Mercator will map this to an empty file format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Useful Transaction Codes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WEDI : IDoc Menu&lt;/P&gt;&lt;P&gt;WE02 : IDoc List (can enter IDoc number to select on)&lt;/P&gt;&lt;P&gt;WE05 : IDoc List&lt;/P&gt;&lt;P&gt;WE19 : Transaction WE19 can be used to test the IDoc&lt;/P&gt;&lt;P&gt;WE30 : IDoc Type Development: Initial Screen&lt;/P&gt;&lt;P&gt;WE31: Development Segments: Initial Screen&lt;/P&gt;&lt;P&gt;WE60 : Documentation for IDoc Types.  This allows you to view the IDoc you have created. &lt;/P&gt;&lt;P&gt;WE81 : Display View &amp;#145;EDI: Logical Message Types&amp;#146;: Overview&lt;/P&gt;&lt;P&gt;WE82: Display View &amp;#145;Message Types and Assignment to IDoc Types&amp;#146;: Overview &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please follow the above steps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from this if you want for developing a standard IDOC with custom segments included you can go for user-exits..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards if useful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;nazeer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jul 2007 07:00:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-02T07:00:14Z</dc:date>
    <item>
      <title>Idocs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idocs/m-p/2470749#M555459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can we process the Idocs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Pon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 06:48:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idocs/m-p/2470749#M555459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T06:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Idocs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idocs/m-p/2470750#M555460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   plz go through the following links.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc" target="test_blank"&gt;http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419" target="test_blank"&gt;http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.netweaverguru.com/EDI/HTML/IDocBook.htm" target="test_blank"&gt;http://www.netweaverguru.com/EDI/HTML/IDocBook.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/index.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/ale.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/ale.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/ale2.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/ale2.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/idoc_abap.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/idoc_abap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/idoc_sample.html" target="test_blank"&gt;http://www.allsaplinks.com/idoc_sample.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap.html" target="test_blank"&gt;http://www.sappoint.com/abap.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc" target="test_blank"&gt;http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419" target="test_blank"&gt;http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.netweaverguru.com/EDI/HTML/IDocBook.htm" target="test_blank"&gt;http://www.netweaverguru.com/EDI/HTML/IDocBook.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/index.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/idoc_sample.html" target="test_blank"&gt;http://www.allsaplinks.com/idoc_sample.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****do rewards if usefull&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 06:52:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idocs/m-p/2470750#M555460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T06:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Idocs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idocs/m-p/2470751#M555461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Data Creation in Idoc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an &lt;/P&gt;&lt;P&gt;asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IDoc is a intermediate document to exchange data between two SAP Systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*IDocs are structured ASCII files (or a virtual equivalent). &lt;/P&gt;&lt;P&gt;*Electronic Interchange Document&lt;/P&gt;&lt;P&gt;*They are the file format used by SAP R/3 to exchange data with foreign systems.&lt;/P&gt;&lt;P&gt;*Data Is transmitted in ASCII format, i.e. human readable form&lt;/P&gt;&lt;P&gt;*IDocs exchange messages&lt;/P&gt;&lt;P&gt;*IDocs are used like classical interface files&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IDOC types are templates for specific message types depending on what is the business document, you want to exchange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WE30 - you can create a IDOC type.&lt;/P&gt;&lt;P&gt;An IDOC with data, will have to be triggered by the application that is trying to send out the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOr testing you can use WE19.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to create idoc?&lt;/P&gt;&lt;P&gt;*WE30 - you can create a IDOC type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more information in details on the same along with the examples can be viewed on:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404" target="test_blank"&gt;http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/presentation.html" target="test_blank"&gt;http://www.sappoint.com/presentation.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/idoc_search.html" target="test_blank"&gt;http://www.allsaplinks.com/idoc_search.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/idoc_abap.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/idoc_abap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/sapedi/idoc_abap.htm" target="test_blank"&gt;http://www.erpgenie.com/sapedi/idoc_abap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Create Idoc we need to follow these steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create Segment ( WE31)&lt;/P&gt;&lt;P&gt;Create Idoc Type ( WE30 )&lt;/P&gt;&lt;P&gt;Create Message Type ( WE81 )&lt;/P&gt;&lt;P&gt;Assign Idoc Type to Message Type ( WE82 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creating a Segment&lt;/P&gt;&lt;P&gt;Go to transaction code WE31&lt;/P&gt;&lt;P&gt;Enter the name for your segment type and click on the Create icon&lt;/P&gt;&lt;P&gt;Type the short text&lt;/P&gt;&lt;P&gt;Enter the variable names and data elements&lt;/P&gt;&lt;P&gt;Save it and go back&lt;/P&gt;&lt;P&gt;Go to Edit -&amp;gt; Set Release&lt;/P&gt;&lt;P&gt;Follow steps to create more number of segments&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create IDOC Type&lt;/P&gt;&lt;P&gt;Go to transaction code WE30&lt;/P&gt;&lt;P&gt;Enter the Object Name, select Basic type and click Create icon&lt;/P&gt;&lt;P&gt;Select the create new option and enter a description for your basic IDOC type and press enter&lt;/P&gt;&lt;P&gt;Select the IDOC Name and click Create icon&lt;/P&gt;&lt;P&gt;The system prompts us to enter a segment type and its attributes&lt;/P&gt;&lt;P&gt;Choose the appropriate values and press Enter&lt;/P&gt;&lt;P&gt;The system transfers the name of the segment type to the IDOC editor.&lt;/P&gt;&lt;P&gt;Follow these steps to add more number of segments to Parent or as Parent-child relation&lt;/P&gt;&lt;P&gt;Save it and go back&lt;/P&gt;&lt;P&gt;Go to Edit -&amp;gt; Set release&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create Message Type&lt;/P&gt;&lt;P&gt;Go to transaction code WE81&lt;/P&gt;&lt;P&gt;Change the details from Display mode to Change mode&lt;/P&gt;&lt;P&gt;After selection, the system will give this message &amp;#147;The table is cross-client (see Help for further info)&amp;#148;. Press Enter&lt;/P&gt;&lt;P&gt;Click New Entries to create new Message Type&lt;/P&gt;&lt;P&gt;Fill details&lt;/P&gt;&lt;P&gt;Save it and go back&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assign Message Type to IDoc Type&lt;/P&gt;&lt;P&gt;Go to transaction code WE82&lt;/P&gt;&lt;P&gt;Change the details from Display mode to Change mode&lt;/P&gt;&lt;P&gt;After selection, the system will give this message &amp;#147;The table is cross-client (see Help for further info)&amp;#148;. Press Enter.&lt;/P&gt;&lt;P&gt;Click New Entries to create new Message Type.&lt;/P&gt;&lt;P&gt;Fill details&lt;/P&gt;&lt;P&gt;Save it and go back&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check these out..&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2402859"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check below link. It will give the step by step procedure for IDOC creation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.supinfo-projects.com/cn/2005/idocs_en/2/" target="test_blank"&gt;http://www.supinfo-projects.com/cn/2005/idocs_en/2/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALE/ IDOC&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc" target="test_blank"&gt;http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419" target="test_blank"&gt;http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.netweaverguru.com/EDI/HTML/IDocBook.htm" target="test_blank"&gt;http://www.netweaverguru.com/EDI/HTML/IDocBook.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/index.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/ale.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/ale.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/ale2.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/ale2.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/idoc_abap.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/idoc_abap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/idoc_sample.html" target="test_blank"&gt;http://www.allsaplinks.com/idoc_sample.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap.html" target="test_blank"&gt;http://www.sappoint.com/abap.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc" target="test_blank"&gt;http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419" target="test_blank"&gt;http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.netweaverguru.com/EDI/HTML/IDocBook.htm" target="test_blank"&gt;http://www.netweaverguru.com/EDI/HTML/IDocBook.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/index.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/idoc_sample.html" target="test_blank"&gt;http://www.allsaplinks.com/idoc_sample.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs" target="test_blank"&gt;http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go trough these links.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc" target="test_blank"&gt;http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419" target="test_blank"&gt;http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.netweaverguru.com/EDI/HTML/IDocBook.htm" target="test_blank"&gt;http://www.netweaverguru.com/EDI/HTML/IDocBook.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/index.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/ale.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/ale.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/ale2.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/ale2.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/idoc_abap.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/idoc_abap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/idoc_sample.html" target="test_blank"&gt;http://www.allsaplinks.com/idoc_sample.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap.html" target="test_blank"&gt;http://www.sappoint.com/abap.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc" target="test_blank"&gt;http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419" target="test_blank"&gt;http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.netweaverguru.com/EDI/HTML/IDocBook.htm" target="test_blank"&gt;http://www.netweaverguru.com/EDI/HTML/IDocBook.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/index.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/idoc_sample.html" target="test_blank"&gt;http://www.allsaplinks.com/idoc_sample.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm" target="test_blank"&gt;http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.IDOCs are independent of the sending and receiving systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.IDOCs are independent of the direction of data exchange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The two available process for IDOCs are&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outbound Process&lt;/P&gt;&lt;P&gt;Inbound Process&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND There are basically two types of IDOCs.&lt;/P&gt;&lt;P&gt;Basic IDOCs&lt;/P&gt;&lt;P&gt;Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extended IDOCs&lt;/P&gt;&lt;P&gt;Extending the functionality by adding more segments to existing Basic IDOCs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Create Idoc we need to follow these steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create Segment ( WE31)&lt;/P&gt;&lt;P&gt;Create Idoc Type ( WE30)&lt;/P&gt;&lt;P&gt;Create Message Type ( WE81)&lt;/P&gt;&lt;P&gt;Assign Idoc Type to Message Type ( WE82)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;imp links&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/idoc_sample.html" target="test_blank"&gt;http://www.allsaplinks.com/idoc_sample.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/idoc_abap.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/idoc_abap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sappoint.com" target="test_blank"&gt;www.sappoint.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;--here u can find the ppts and basic seetings for ALE&lt;/P&gt;&lt;P&gt;&lt;A href="http://sappoint.com/presentation.html" target="test_blank"&gt;http://sappoint.com/presentation.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sapgenie.com" target="test_blank"&gt;www.sapgenie.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/ale/index.htm" target="test_blank"&gt;http://www.sapgenie.com/ale/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; WE30 - you can create a IDOC type.&lt;/P&gt;&lt;P&gt;An IDOC with data, will have to be triggered by the application that is trying to send out the data.&lt;/P&gt;&lt;P&gt;Try this..Hope this will help.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; SAP ALE &amp;amp; IDOC&amp;lt;&amp;lt;&amp;lt;&amp;lt; &lt;/P&gt;&lt;P&gt;Steps to configuration(Basis) &amp;gt;&amp;gt; &lt;/P&gt;&lt;P&gt;1. Create Logical System (LS) for each applicable ALE-enabled client &lt;/P&gt;&lt;P&gt;2. Link client to Logical System on the respective servers &lt;/P&gt;&lt;P&gt;3. Create background user, to be used by ALE(with authorizaton for ALE postings) &lt;/P&gt;&lt;P&gt;4. Create RFC Destinations(SM59) &lt;/P&gt;&lt;P&gt;5. Ports in Idoc processing(WE21) &lt;/P&gt;&lt;P&gt;6. Generate partner profiles for sending system &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The functional configuration(Tcode: SALE) &lt;/P&gt;&lt;P&gt;&amp;#149; Create a Customer Distribution Model (CDM); &lt;/P&gt;&lt;P&gt;&amp;#149; Add appropriate message types and filters to the CDM; &lt;/P&gt;&lt;P&gt;&amp;#149; Generate outbound partner profiles; &lt;/P&gt;&lt;P&gt;&amp;#149; Distribute the CDM to the receiving systems; and &lt;/P&gt;&lt;P&gt;&amp;#149; Generate inbound partner profiles on each of the clients. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steps to customize a new IDoc &amp;gt;&amp;gt;&amp;gt; &lt;/P&gt;&lt;P&gt;1. Define IDoc Segment (WE31) &lt;/P&gt;&lt;P&gt;2. Convert Segments into an IDoc type (WE30) &lt;/P&gt;&lt;P&gt;3. Create a Message Type (WE81) &lt;/P&gt;&lt;P&gt;4. Create valid Combination of Message &amp;amp; IDoc type(WE82) &lt;/P&gt;&lt;P&gt;5. Define Processing Code(WE41 for OUT / WE42 for IN) &lt;/P&gt;&lt;P&gt;6. Define Partner Profile(WE20) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important Transaction Codes: &lt;/P&gt;&lt;P&gt;SALE - IMG ALE Configuration root &lt;/P&gt;&lt;P&gt;WE20 - Manually maintain partner profiles &lt;/P&gt;&lt;P&gt;BD64 - Maintain customer distribution model &lt;/P&gt;&lt;P&gt;BD71 - Distribute customer distribution model &lt;/P&gt;&lt;P&gt;SM59 - Create RFC Destinations &lt;/P&gt;&lt;P&gt;BDM5 - Consistency check (Transaction scenarios) &lt;/P&gt;&lt;P&gt;BD82 - Generate Partner Profiles &lt;/P&gt;&lt;P&gt;BD61 - Activate Change Pointers - Globally &lt;/P&gt;&lt;P&gt;BD50 - Activate Change Pointer for Msg Type &lt;/P&gt;&lt;P&gt;BD52 - Activate change pointer per change.doc object &lt;/P&gt;&lt;P&gt;BD59 - Allocation object type -&amp;gt; IDOC type &lt;/P&gt;&lt;P&gt;BD56 - Maintain IDOC Segment Filters &lt;/P&gt;&lt;P&gt;BD53 - Reduction of Message Types &lt;/P&gt;&lt;P&gt;BD21 - Select Change Pointer &lt;/P&gt;&lt;P&gt;BD87 - Status Monitor for ALE Messages &lt;/P&gt;&lt;P&gt;BDM5 - Consistency check (Transaction scenarios) &lt;/P&gt;&lt;P&gt;BD62 - Define rules &lt;/P&gt;&lt;P&gt;BD79 - Maintain rules &lt;/P&gt;&lt;P&gt;BD55 - Defining settings for IDoc conversion &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WEDI - ALE IDoc Administration &lt;/P&gt;&lt;P&gt;WE21 - Ports in Idoc processing &lt;/P&gt;&lt;P&gt;WE60 - IDoc documentation &lt;/P&gt;&lt;P&gt;SARA - IDoc archiving (Object type IDOC) &lt;/P&gt;&lt;P&gt;WE47 - IDoc status maintenance &lt;/P&gt;&lt;P&gt;WE07 - IDoc statistics &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BALE - ALE Distribution Administration &lt;/P&gt;&lt;P&gt;WE05 - IDoc overview &lt;/P&gt;&lt;P&gt;BD87 - Inbound IDoc reprocessing &lt;/P&gt;&lt;P&gt;BD88 - Outbound IDoc reprocessing &lt;/P&gt;&lt;P&gt;BDM2 - IDoc Trace &lt;/P&gt;&lt;P&gt;BDM7 - IDoc Audit Analysis &lt;/P&gt;&lt;P&gt;BD21 - Create IDocs from change pointers &lt;/P&gt;&lt;P&gt;SM58 - Schedule RFC Failures &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic config for Distributed data: &lt;/P&gt;&lt;P&gt;BD64: Maintain a Distributed Model &lt;/P&gt;&lt;P&gt;BD82: Generate Partner Profile &lt;/P&gt;&lt;P&gt;BD64: Distribute the distribution Model &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Programs &lt;/P&gt;&lt;P&gt;RBDMIDOC &amp;#150; Creating IDoc Type from Change Pointers &lt;/P&gt;&lt;P&gt;RSEOUT00 &amp;#150; Process all selected IDocs (EDI) &lt;/P&gt;&lt;P&gt;RBDAPP01 - Inbound Processing of IDocs Ready for Transfer &lt;/P&gt;&lt;P&gt;RSARFCEX - Execute Calls Not Yet Executed &lt;/P&gt;&lt;P&gt;RBDMOIND - Status Conversion with Successful tRFC Execution &lt;/P&gt;&lt;P&gt;RBDMANIN - Start error handling for non-posted IDocs &lt;/P&gt;&lt;P&gt;RBDSTATE - Send Audit Confirmations &lt;/P&gt;&lt;P&gt;FOr testing you can use WE19.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Check these links.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc" target="test_blank"&gt;http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419" target="test_blank"&gt;http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.netweaverguru.com/EDI/HTML/IDocBook.htm" target="test_blank"&gt;http://www.netweaverguru.com/EDI/HTML/IDocBook.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/index.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/ale.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/ale.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/ale2.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/ale2.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/idoc_abap.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/idoc_abap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/idoc_sample.html" target="test_blank"&gt;http://www.allsaplinks.com/idoc_sample.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap.html" target="test_blank"&gt;http://www.sappoint.com/abap.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc" target="test_blank"&gt;http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419" target="test_blank"&gt;http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.netweaverguru.com/EDI/HTML/IDocBook.htm" target="test_blank"&gt;http://www.netweaverguru.com/EDI/HTML/IDocBook.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapedi/index.htm" target="test_blank"&gt;http://www.sapgenie.com/sapedi/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/idoc_sample.html" target="test_blank"&gt;http://www.allsaplinks.com/idoc_sample.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs" target="test_blank"&gt;http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this PDF documents for ALE and IDoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/ale.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/ale.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/ale2.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/ale2.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check below link. It will give the step by step procedure for IDOC creation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.supinfo-projects.com/cn/2005/idocs_en/2/" target="test_blank"&gt;http://www.supinfo-projects.com/cn/2005/idocs_en/2/&lt;/A&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 06:57:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idocs/m-p/2470751#M555461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T06:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Idocs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idocs/m-p/2470752#M555462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two type as per I know for Customized IDOCS&lt;/P&gt;&lt;P&gt;Inbound IDOC processing&lt;/P&gt;&lt;P&gt;OUTBOUND IDOC processing&lt;/P&gt;&lt;P&gt;See the document below.. It will for sure help you a lot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SECTION 2. Steps to Creating a Customised IDOC&lt;/P&gt;&lt;P&gt;(see Appendix III for Screenshots of Steps)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;2.1 Outbound Interface&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;PROCESS DIAGRAM&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Outbound Interface&lt;/P&gt;&lt;P&gt;1. Analyse Hierarchy Levels&lt;/P&gt;&lt;P&gt;2. Create New segment&lt;/P&gt;&lt;P&gt;3. Create New IDoc Type&lt;/P&gt;&lt;P&gt;4. Create New Message Type&lt;/P&gt;&lt;P&gt;5. Link Message with IDoc Type&lt;/P&gt;&lt;P&gt;6.  Create an entry in EDP13 via transactions WE20 and BD64&lt;/P&gt;&lt;P&gt;7. Populate the Custom IDoc via ABAP Program&lt;/P&gt;&lt;P&gt;   7b Error Handling&lt;/P&gt;&lt;P&gt;   7c. Send Status Email&lt;/P&gt;&lt;P&gt;8. Test the Population of the Custom IDoc&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 1 &amp;#150; Analyse Hierarchy Levels:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Analyse the data relationships being processed in the interface.  Define the appropriate hierarchical Parent-to-Child relationships.  &lt;/P&gt;&lt;P&gt;Navigate to transaction code WEDI&lt;/P&gt;&lt;P&gt;Transaction WEDI displays the IDOC main menu.  This allows navigation around the various development and control areas to create a customised IDOC.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Step 2 &amp;#150; Create a new segment:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;via wedi : Development - IDOC Segments or Transaction code WE31.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter segment name and click on Create.&lt;/P&gt;&lt;P&gt;The name of the segment type must start with Z1 , and have a maximum of eight characters.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter description and enter the relevant field names and data elements.&lt;/P&gt;&lt;P&gt;The segment should represent a structure in the program so for each field in the segment a field name and a data element must be defined.&lt;/P&gt;&lt;P&gt;&amp;#149;Save the segment and enter Person Responsible and Processing Person .&lt;/P&gt;&lt;P&gt;&amp;#149;Go to Edit and Set Release. &lt;/P&gt;&lt;P&gt;&amp;#149;Repeat this procedure for each new Segment in the IDOC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 3 &amp;#150; Create a new IDOC Type&amp;lt;/b&amp;gt;via wedi Development - IDOC Types or Transaction WE30.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter segment name (starting with Z), click on Basic Type and then Create.  &lt;/P&gt;&lt;P&gt;&amp;#149;Create as new, enter Person Responsible and Processing Person  and enter description.&lt;/P&gt;&lt;P&gt;&amp;#149;On &amp;#145;Create Basic Type&amp;#146; screen decide where segments should be inserted and go to Edit/Create Segment.&lt;/P&gt;&lt;P&gt;&amp;#149;Complete relevant fields in the Maintain Attributes screen: &lt;/P&gt;&lt;P&gt;&amp;#149;From the relevant segments created in Step 2 enter the Segment type and if mandatory segment.&lt;/P&gt;&lt;P&gt;&amp;#149;The Minimum and Maximum number of segments to be allowed in the sequence. (One minimum and one maximum if segment is mandatory).&lt;/P&gt;&lt;P&gt;&amp;#149;The Parent Segment and Hierarchy Level will be automatically created depending on where in the IDOC tree you decided to create that particular segment.&lt;/P&gt;&lt;P&gt;&amp;#149;Repeat this process for each segment needed in the IDOC type, deciding whether to add the next segments at the same level or as a &amp;#145;Child&amp;#146;.&lt;/P&gt;&lt;P&gt;&amp;#149;When IDOC created return to initial screen.  Go to Edit and Set Release.&lt;/P&gt;&lt;P&gt;&amp;#149;Go to Transaction WE60 to view the IDoc Type you have created.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Step 4 &amp;#150; Create new Message Type&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;via wedi Development - Message Types or Transaction WE81.&lt;/P&gt;&lt;P&gt;&amp;#149;Display/Change and click on New Entries&lt;/P&gt;&lt;P&gt;&amp;#149;Create a new Message Type and Save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 5 &amp;#150; Link Message Type to IDOC Type&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;via wedi Development - IDOC Type/Message or Transaction WE82.&lt;/P&gt;&lt;P&gt;&amp;#149;Display/Change and then click on New Entries.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter Message Type, Basic Type (IDOC Type) and Release (46C) and Save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 6 &amp;#150; Create an entry in EDP13 via transactions WE20 and BD64.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;The partner profile for the Idoc must be set up and generated in the transaction BD64 and transaction WE20.&lt;/P&gt;&lt;P&gt;&amp;#149;WE20 &amp;#150; Add Message Type to appropriate Partner Type, Enter Message Type, Receiver Port and Idoc Type and Save.&lt;/P&gt;&lt;P&gt;&amp;#149;BD64 &amp;#150; Create a Model View, Enter Sender and Receiver Ports, Attach Message Type.  Go to &amp;#145;Environment&amp;#146; on Menu and click on Generate Partner Profiles and generate (not save) profile. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 7 &amp;#150; Populate the custom IDOC via ABAP Program&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;See Test Program ZOUTBD_IDOC_TEMPLATE, Appendix IV.&lt;/P&gt;&lt;P&gt;&amp;#149;Create an Internal Table for each segment type, this should be exactly the same structure as the segment type.&lt;/P&gt;&lt;P&gt;&amp;#149;The control record is filled into a structure like EDIDC.  The message type and the Idoc type for the Idoc must be populated into the eddic structure.&lt;/P&gt;&lt;P&gt;- PERFORM populate_Control_structure USING  c_mestyp&lt;/P&gt;&lt;P&gt;                                                                       c_SEGMENT_type1.&lt;/P&gt;&lt;P&gt;&amp;#149;The data segments are filled into a structure like edidd-sdata; sdata and the segment name are populated into the edidd structure. &lt;/P&gt;&lt;P&gt;- PERFORM transfer_Parent_data_to_seg.&lt;/P&gt;&lt;P&gt;&amp;#149;The standard SAP function module MASTER_IDOC_DISTRIBUTE is called to pass the populated IDOC to the ALE Layer.&lt;/P&gt;&lt;P&gt;- PERFORM master_idoc_distribute.&lt;/P&gt;&lt;P&gt;&amp;#149;NOTE:  This function module is only called for stand alone programs and Shared Master Data programs (SMD).   It is not called when using extensions or output determination.&lt;/P&gt;&lt;P&gt;&amp;#149;The ALE Layer handles the sending of the IDOC to the receiving system.&lt;/P&gt;&lt;P&gt;&amp;#149;Error Handling (see  Step 7b).&lt;/P&gt;&lt;P&gt;&amp;#149;Commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Project Specific&lt;/P&gt;&lt;P&gt;Step 7b &amp;#150; Error Handling&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;#149;Analyse which fields in the interface are mandatory for the receiving system and who needs to receive error notification.&lt;/P&gt;&lt;P&gt;&amp;#149;Declare a structure of type &amp;#145;MCMAILOBJ&amp;#146; for sending instructions.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter values for the internal table based on structure &amp;#145;MCMAILOBJ&amp;#146; &lt;/P&gt;&lt;P&gt;&amp;#149;For selection processes, on SY-SUBRC checks and where fields are mandatory for the receiving system; insert Function Module  &amp;#145;MC_SEND_MAIL&amp;#146;.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter values in the following parameters: -&lt;/P&gt;&lt;P&gt;MS_MAIL_SENDMODE         =  &amp;#145;B&amp;#146; (Batch Mode)&lt;/P&gt;&lt;P&gt;MS_MAIL_TITLE                    =  'Mail Title'&lt;/P&gt;&lt;P&gt;MS_MAIL_DESCRIPTION     =  &amp;#145;Error description&amp;#146; (e.g. MATNR not given)&lt;/P&gt;&lt;P&gt;MS_MAIL_RECEIVER           =  &amp;#145;Name of Receiver&amp;#146; (To be determined)&lt;/P&gt;&lt;P&gt;MS_MAIL_EXPRESS             =  &amp;#145;E&amp;#146; (Express Delivery)&lt;/P&gt;&lt;P&gt;MS_MAIL_DLINAME            = Leave Blank&lt;/P&gt;&lt;P&gt;MS_MAIL_LANGU                =  'E'  (Language)&lt;/P&gt;&lt;P&gt;MS_MAIL_FUNKOBJ_NAME  = Leave Blank&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;           MS_MAIL_CONT           =  I_MCMAILOBJ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;It has to be determined separately for each interface how these errors and mail notifications are to be grouped &amp;#150; dependant upon the number of errors that are potentially likely. One possible approach is to send an email for each reason for rejection and include all the records that failed for that reason in the mail notification. Another possible approach is to send an email for every failure. &lt;/P&gt;&lt;P&gt;When error checking for mandatory fields it is common SAP practice to reject a record on its first failure (irrespective of subsequent errors in that record)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 7c &amp;#150; Send status mail&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;#149;Append to table I_MCMAILOBJ details of the time the interface was processed, how many Idocs were created and how many of these produced a status of 03.&lt;/P&gt;&lt;P&gt;&amp;#149;Select the user to receive the mail from ZINT_RECEIVER, using the name of the program as a key (SY-CPROG).&lt;/P&gt;&lt;P&gt;&amp;#149;Use function Module &amp;#145;MC_SEND_MAIL&amp;#146; to send a mail to the user containing the contents of I_MCMAILOBJ at the end of the interface processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 8 &amp;#150; Test the population of the custom IDOC&lt;/P&gt;&lt;P&gt;via wedi IDoc - Display IDoc or Transaction WE02.&lt;/P&gt;&lt;P&gt;&amp;#149;Enter your message type and execute.&lt;/P&gt;&lt;P&gt;&amp;#149;Status should be green, double click on one of the Idocs you have created to view its contents.&lt;/P&gt;&lt;P&gt;&amp;#149;If a problem has occurred click on Status which will give you a description of the error.&lt;/P&gt;&lt;P&gt;&amp;#149;Drop down Data Records arrow and this should list the data in the IDoc in the correct hierarchical structure.&lt;/P&gt;&lt;P&gt;&amp;#149;Click on each individual segment and view the content to check that the correct data has been read.&lt;/P&gt;&lt;P&gt;&amp;#149;If you have UNIX access by using AL11 you can view the file that you have created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;For some interfaces it may be valid to send an empty file to SAP.  This empty file is converted to the custom IDOC format expected by SAP.  This custom IDOC will contain dummy information.  In the inbound processing code, if the dummy information is identified then the processing of the IDOC is considered to be complete and the IDOC should then be assigned a successfully processed status of 53, even though it has not been processed at all.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;2.2 Inbound Interface&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Follow steps 1 to 5 inclusive as detailed above.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Step 6&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Write a custom function module to handle custom inbound processing.  This custom function module must&lt;/P&gt;&lt;P&gt;&amp;#149;Check for the correct message type&lt;/P&gt;&lt;P&gt;&amp;#149;Read the IDoc data segment&lt;/P&gt;&lt;P&gt;&amp;#149;Perform data conversion and validate the data as appropriate&lt;/P&gt;&lt;P&gt;&amp;#149;Post the data to the database&lt;/P&gt;&lt;P&gt;&amp;#149;Handle any error situations&lt;/P&gt;&lt;P&gt;&amp;#149;Set the correct return values for the status record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that the Function Module must not make a commit to the database.  This is because the status record is not written until control returns to the ALE layer.  So if you commit work in the Function Module and an error occurs in returning to the ALE Layer, the status record must not be updated with a successful outcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The commit work is executed in the ALE Layer after the status records are updated, via the standard SAP function module IDOC_INBOUND_PROCESS. This attributes of this function module are set up in (Transaction BD51), click on &amp;#145;New Entries&amp;#146; and fill in data; the main input parameters being &amp;#145;Input Type&amp;#146; and &amp;#145;Dialog Allowed&amp;#146;.&lt;/P&gt;&lt;P&gt;Take care as some standard SAP transactions contain a Commit Work as part of their processing.  Therefore using a BDC to process inbound data to SAP may not be acceptable.  You need to check that the SAP transaction is ALE enabled.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 7&lt;/P&gt;&lt;P&gt;(Transaction WE57)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Assign the custom function module to the IDoc type and the message type.&lt;/P&gt;&lt;P&gt;Set function module to type &amp;#145;F&amp;#146; and direction &amp;#145;2&amp;#146; for inbound.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 8&lt;/P&gt;&lt;P&gt;(Transaction WE42)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Create a new process code and assign it to the function module.  The process code determines how the incoming IDoc is to be processed in SAP.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Step 9&lt;/P&gt;&lt;P&gt;(Transaction BD67)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Assign the function module to the process code created above.  Got to &amp;#145;New Entries&amp;#146; and enter the process code and the function module name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Step 10&lt;/P&gt;&lt;P&gt;(Transaction WE20 and Transaction BD64)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Create a partner profile for your message and ensure that in transaction WE20 the process code is the one that points to your function module. (See step 6 of creating Outbound Idocs).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Step 11&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Ensure that error handling functionality is present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If an interface is expecting a file every day, and a custom IDoc may only be output from SAP periodically, it would be necessary to create some kind of output from SAP on a daily basis to pass to Mercator to allow it to map to an empty file.  As we are dealing with custom IDoc types we can design the IDoc so that the data segments are not mandatory.  Therefore the SAP program, on finding no data to populate the custom IDoc, would only need to create the control record.  The empty IDoc containing the control record would be passed to Mercator.  Mercator will map this to an empty file format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Useful Transaction Codes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WEDI : IDoc Menu&lt;/P&gt;&lt;P&gt;WE02 : IDoc List (can enter IDoc number to select on)&lt;/P&gt;&lt;P&gt;WE05 : IDoc List&lt;/P&gt;&lt;P&gt;WE19 : Transaction WE19 can be used to test the IDoc&lt;/P&gt;&lt;P&gt;WE30 : IDoc Type Development: Initial Screen&lt;/P&gt;&lt;P&gt;WE31: Development Segments: Initial Screen&lt;/P&gt;&lt;P&gt;WE60 : Documentation for IDoc Types.  This allows you to view the IDoc you have created. &lt;/P&gt;&lt;P&gt;WE81 : Display View &amp;#145;EDI: Logical Message Types&amp;#146;: Overview&lt;/P&gt;&lt;P&gt;WE82: Display View &amp;#145;Message Types and Assignment to IDoc Types&amp;#146;: Overview &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please follow the above steps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from this if you want for developing a standard IDOC with custom segments included you can go for user-exits..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards if useful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;nazeer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 07:00:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idocs/m-p/2470752#M555462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T07:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Idocs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idocs/m-p/2470753#M555463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. In Inbound the data coming in the IDOC will be processed by the inbound function module and the data will be posted to the application (business document is created).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of outbound, data is collected from the application and is sent out in the form of a IDOC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. In terms of processing there is not much difference whether it ALE / EDI / BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IDoc's are intermediate documents which contain data that can be send out or recive in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the following link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_bw31/helpdata/en/dc/6b7e6c43d711d1893e0000e8323c4f/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_bw31/helpdata/en/dc/6b7e6c43d711d1893e0000e8323c4f/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priyanka.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IIDOC/EDIhttp://help.sap.com/printdocu/core/Print46c/en/data/pdf/SDEDI/SDEDI.pdf&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IDOC/ALE&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/whitepapers/ale.htm" target="test_blank"&gt;http://www.sapgenie.com/whitepapers/ale.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/ale/index.htm" target="test_blank"&gt;http://www.sapgenie.com/ale/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap.html" target="test_blank"&gt;http://www.sappoint.com/abap.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapbrain.com/TUTORIALS/TECHNICAL/ALE_tutorial.html" target="test_blank"&gt;http://www.sapbrain.com/TUTORIALS/TECHNICAL/ALE_tutorial.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEHR/CABFAALEHR_ALE_QS.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEHR/CABFAALEHR_ALE_QS.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/ECPCA/ECPCA_ALE_154.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/ECPCA/ECPCA_ALE_154.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 07:01:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idocs/m-p/2470753#M555463</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T07:01:42Z</dc:date>
    </item>
  </channel>
</rss>

