<?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: Idoc in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2468592#M554654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;        &amp;#149; populates a BDC table with the IDoc info;&lt;/P&gt;&lt;P&gt;&amp;#149; calls the transaction via a BDC call; and&lt;/P&gt;&lt;P&gt;&amp;#149; updates the IDoc status according to the BDC error status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXTRACT FROM: Z_IDOC_INPUT_ZINVRV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Declaration of local variables&lt;/P&gt;&lt;P&gt;DATA: C_SEGNAM(10) TYPE C VALUE 'Z1INVRV'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-Loop through the IDOCs&lt;/P&gt;&lt;P&gt;LOOP AT IDOC_CONTRL.&lt;/P&gt;&lt;P&gt;*---Loop through the data for the IDOC&lt;/P&gt;&lt;P&gt;LOOP AT IDOC_DATA WHERE DOCNUM = IDOC_CONTRL-DOCNUM.&lt;/P&gt;&lt;P&gt;CASE IDOC_DATA-SEGNAM.&lt;/P&gt;&lt;P&gt;WHEN C_SEGNAM.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here we get the info from the idoc table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IT_Z1INVRV = IDOC_DATA-SDATA.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;PERFORM REV_INV.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;PERFORM UPDATE_IDOC_STATUS.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM REV_INV "Reverse invoice form&lt;/P&gt;&lt;P&gt;*--- Local variables &amp;amp; constants&lt;/P&gt;&lt;P&gt;DATA: C_TCODE LIKE BKPF-TCODE VALUE 'VF11'. "BDC transaction code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Now we can build the bdc table to call the reversal transaction start of screen 109&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-PROGRAM = 'SAPMV60A'.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNPRO = '109'.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;*--- Document number&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = 'KOMFK-VBELN(01)'.&lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = IT_Z1INVRV-XBLNR. "Billing document number&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;*--- OK Code for screen 109&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = 'BDC_OKCODE'.&lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = 'SICH'.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Now we can call transaction 'VF11' with the populated bdc table. The transaction is called inside the idoc-contrl loop, so a transaction will be called for every idoc (journal). the transaction is called in no-display mode ('N') because this code runs in background as it is called by ale. The update is specified to be synchronous ('S') because we have to wait for the result to update the idoc status correctly.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION C_TCODE USING BDC_TAB MODE 'N' UPDATE 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Store the return code for use in another form (status update)&lt;/P&gt;&lt;P&gt;RETURN_CODE = SY-SUBRC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Here we check the return code, if there was an error, we put the transaction in a bdc session for the user to review and correct.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_OPEN_GROUP'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;CLIENT = SY-MANDT&lt;/P&gt;&lt;P&gt;GROUP = 'ZINVRV'&lt;/P&gt;&lt;P&gt;USER = C_ALE_USER&lt;/P&gt;&lt;P&gt;KEEP = 'X'.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_INSERT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;TCODE = C_TCODE&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DYNPROTAB = BDC_TAB.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_CLOSE_GROUP'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;NOT_OPEN = 1&lt;/P&gt;&lt;P&gt;QUEUE_ERROR = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;ELSE. "No problems&lt;/P&gt;&lt;P&gt;C_EXISTS = 'N'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select from the billing document table to get sales doc number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT * FROM VBRP WHERE VBELN = IT_Z1INVRV-XBLNR.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select from the sales document table to get user status number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT SINGLE * FROM VBAP WHERE VBELN = VBRP-AUBEL AND&lt;/P&gt;&lt;P&gt;POSNR = VBRP-AUPOS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select from the status table to change the user status to pending&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT * FROM JEST WHERE OBJNR = VBAP-OBJNR AND&lt;/P&gt;&lt;P&gt;STAT LIKE C_USER_STATUS.&lt;/P&gt;&lt;P&gt;IF JEST-STAT = C_US_PENDING. "User status is pending&lt;/P&gt;&lt;P&gt;JEST-INACT = C_UNCHECKED. "Make pending the active status&lt;/P&gt;&lt;P&gt;UPDATE JEST.&lt;/P&gt;&lt;P&gt;C_EXISTS = 'Y'. "I.E. An entry is already in table&lt;/P&gt;&lt;P&gt;ELSEIF JEST-INACT = C_UNCHECKED AND JEST-STAT NE C_US_PENDING.&lt;/P&gt;&lt;P&gt;JEST-INACT = C_CHECKED. "Make everything else inactive&lt;/P&gt;&lt;P&gt;UPDATE JEST.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;IF C_EXISTS = 'N'. "I.E. Pending has never been a status before&lt;/P&gt;&lt;P&gt;JEST-OBJNR = VBAP-OBJNR.&lt;/P&gt;&lt;P&gt;JEST-STAT = C_US_PENDING.&lt;/P&gt;&lt;P&gt;JEST-INACT = C_UNCHECKED. "Make pending the active status&lt;/P&gt;&lt;P&gt;INSERT JEST.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDSELECT. "Select from VBRP (Billing document table)&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM. " REV_INV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM UPDATE_IDOC_STATUS. &lt;/P&gt;&lt;P&gt;*--- Now we check the CALL TRANSACTION return code and set IDOC status &lt;/P&gt;&lt;P&gt;CLEAR IDOC_STATUS. &lt;/P&gt;&lt;P&gt;IF RETURN_CODE = 0. &lt;/P&gt;&lt;P&gt;WORKFLOW_RESULT = '0'. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-STATUS = '53'. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-UNAME = SY-UNAME. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-REPID = SY-REPID. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGTY = SY-MSGTY. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGID = SY-MSGID. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGNO = SY-MSGNO. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV1 = SY-MSGV1. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV2 = SY-MSGV2.&lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV3 = SY-MSGV3. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV4 = SY-MSGV4. &lt;/P&gt;&lt;P&gt;RETURN_VARIABLES-WF_PARAM = 'Processed_IDOCs'. &lt;/P&gt;&lt;P&gt;RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM. &lt;/P&gt;&lt;P&gt;APPEND RETURN_VARIABLES. &lt;/P&gt;&lt;P&gt;ELSE. &lt;/P&gt;&lt;P&gt;WORKFLOW_RESULT = '99999'. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-STATUS = '51'. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-UNAME = SY-UNAME. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-REPID = SY-REPID. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGTY = SY-MSGTY. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGID = SY-MSGID. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGNO = SY-MSGNO. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV1 = SY-MSGV1.&lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV2 = SY-MSGV2. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV3 = SY-MSGV3. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV4 = SY-MSGV4. &lt;/P&gt;&lt;P&gt;RETURN_VARIABLES-WF_PARAM = 'ERROR_IDOCS'. &lt;/P&gt;&lt;P&gt;RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM. &lt;/P&gt;&lt;P&gt;APPEND RETURN_VARIABLES. &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;APPEND IDOC_STATUS. &lt;/P&gt;&lt;P&gt;ENDFORM. " UPDATE_IDOC_STATUS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jul 2007 05:58:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-06T05:58:46Z</dc:date>
    <item>
      <title>Idoc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2468590#M554652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I create the IDoc of the following structure:&lt;/P&gt;&lt;P&gt;ZINVRV01 Purchasing and Selling - Invoice receipt reversal&lt;/P&gt;&lt;P&gt;  Z1INVRV	P&amp;amp;S - Segment 1&lt;/P&gt;&lt;P&gt;	Segment fields	&lt;/P&gt;&lt;P&gt;		LIFNR	Vendor account number&lt;/P&gt;&lt;P&gt;		XBLNR	Reference document number&lt;/P&gt;&lt;P&gt;And also create the model view and distributed.&lt;/P&gt;&lt;P&gt;Now I want to populate this IDoc and send Idoc from Sender to receiver after that I want to process the Idoc from reciver side. &lt;/P&gt;&lt;P&gt;Can any one help me with the code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 05:54:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2468590#M554652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T05:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Idoc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2468591#M554653</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;&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>Fri, 06 Jul 2007 05:56:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2468591#M554653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T05:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Idoc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2468592#M554654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;        &amp;#149; populates a BDC table with the IDoc info;&lt;/P&gt;&lt;P&gt;&amp;#149; calls the transaction via a BDC call; and&lt;/P&gt;&lt;P&gt;&amp;#149; updates the IDoc status according to the BDC error status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXTRACT FROM: Z_IDOC_INPUT_ZINVRV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Declaration of local variables&lt;/P&gt;&lt;P&gt;DATA: C_SEGNAM(10) TYPE C VALUE 'Z1INVRV'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-Loop through the IDOCs&lt;/P&gt;&lt;P&gt;LOOP AT IDOC_CONTRL.&lt;/P&gt;&lt;P&gt;*---Loop through the data for the IDOC&lt;/P&gt;&lt;P&gt;LOOP AT IDOC_DATA WHERE DOCNUM = IDOC_CONTRL-DOCNUM.&lt;/P&gt;&lt;P&gt;CASE IDOC_DATA-SEGNAM.&lt;/P&gt;&lt;P&gt;WHEN C_SEGNAM.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here we get the info from the idoc table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IT_Z1INVRV = IDOC_DATA-SDATA.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;PERFORM REV_INV.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;PERFORM UPDATE_IDOC_STATUS.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM REV_INV "Reverse invoice form&lt;/P&gt;&lt;P&gt;*--- Local variables &amp;amp; constants&lt;/P&gt;&lt;P&gt;DATA: C_TCODE LIKE BKPF-TCODE VALUE 'VF11'. "BDC transaction code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Now we can build the bdc table to call the reversal transaction start of screen 109&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-PROGRAM = 'SAPMV60A'.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNPRO = '109'.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;*--- Document number&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = 'KOMFK-VBELN(01)'.&lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = IT_Z1INVRV-XBLNR. "Billing document number&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;*--- OK Code for screen 109&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = 'BDC_OKCODE'.&lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = 'SICH'.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Now we can call transaction 'VF11' with the populated bdc table. The transaction is called inside the idoc-contrl loop, so a transaction will be called for every idoc (journal). the transaction is called in no-display mode ('N') because this code runs in background as it is called by ale. The update is specified to be synchronous ('S') because we have to wait for the result to update the idoc status correctly.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION C_TCODE USING BDC_TAB MODE 'N' UPDATE 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Store the return code for use in another form (status update)&lt;/P&gt;&lt;P&gt;RETURN_CODE = SY-SUBRC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Here we check the return code, if there was an error, we put the transaction in a bdc session for the user to review and correct.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_OPEN_GROUP'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;CLIENT = SY-MANDT&lt;/P&gt;&lt;P&gt;GROUP = 'ZINVRV'&lt;/P&gt;&lt;P&gt;USER = C_ALE_USER&lt;/P&gt;&lt;P&gt;KEEP = 'X'.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_INSERT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;TCODE = C_TCODE&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DYNPROTAB = BDC_TAB.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_CLOSE_GROUP'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;NOT_OPEN = 1&lt;/P&gt;&lt;P&gt;QUEUE_ERROR = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;ELSE. "No problems&lt;/P&gt;&lt;P&gt;C_EXISTS = 'N'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select from the billing document table to get sales doc number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT * FROM VBRP WHERE VBELN = IT_Z1INVRV-XBLNR.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select from the sales document table to get user status number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT SINGLE * FROM VBAP WHERE VBELN = VBRP-AUBEL AND&lt;/P&gt;&lt;P&gt;POSNR = VBRP-AUPOS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select from the status table to change the user status to pending&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT * FROM JEST WHERE OBJNR = VBAP-OBJNR AND&lt;/P&gt;&lt;P&gt;STAT LIKE C_USER_STATUS.&lt;/P&gt;&lt;P&gt;IF JEST-STAT = C_US_PENDING. "User status is pending&lt;/P&gt;&lt;P&gt;JEST-INACT = C_UNCHECKED. "Make pending the active status&lt;/P&gt;&lt;P&gt;UPDATE JEST.&lt;/P&gt;&lt;P&gt;C_EXISTS = 'Y'. "I.E. An entry is already in table&lt;/P&gt;&lt;P&gt;ELSEIF JEST-INACT = C_UNCHECKED AND JEST-STAT NE C_US_PENDING.&lt;/P&gt;&lt;P&gt;JEST-INACT = C_CHECKED. "Make everything else inactive&lt;/P&gt;&lt;P&gt;UPDATE JEST.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;IF C_EXISTS = 'N'. "I.E. Pending has never been a status before&lt;/P&gt;&lt;P&gt;JEST-OBJNR = VBAP-OBJNR.&lt;/P&gt;&lt;P&gt;JEST-STAT = C_US_PENDING.&lt;/P&gt;&lt;P&gt;JEST-INACT = C_UNCHECKED. "Make pending the active status&lt;/P&gt;&lt;P&gt;INSERT JEST.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDSELECT. "Select from VBRP (Billing document table)&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM. " REV_INV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM UPDATE_IDOC_STATUS. &lt;/P&gt;&lt;P&gt;*--- Now we check the CALL TRANSACTION return code and set IDOC status &lt;/P&gt;&lt;P&gt;CLEAR IDOC_STATUS. &lt;/P&gt;&lt;P&gt;IF RETURN_CODE = 0. &lt;/P&gt;&lt;P&gt;WORKFLOW_RESULT = '0'. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-STATUS = '53'. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-UNAME = SY-UNAME. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-REPID = SY-REPID. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGTY = SY-MSGTY. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGID = SY-MSGID. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGNO = SY-MSGNO. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV1 = SY-MSGV1. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV2 = SY-MSGV2.&lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV3 = SY-MSGV3. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV4 = SY-MSGV4. &lt;/P&gt;&lt;P&gt;RETURN_VARIABLES-WF_PARAM = 'Processed_IDOCs'. &lt;/P&gt;&lt;P&gt;RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM. &lt;/P&gt;&lt;P&gt;APPEND RETURN_VARIABLES. &lt;/P&gt;&lt;P&gt;ELSE. &lt;/P&gt;&lt;P&gt;WORKFLOW_RESULT = '99999'. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-STATUS = '51'. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-UNAME = SY-UNAME. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-REPID = SY-REPID. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGTY = SY-MSGTY. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGID = SY-MSGID. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGNO = SY-MSGNO. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV1 = SY-MSGV1.&lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV2 = SY-MSGV2. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV3 = SY-MSGV3. &lt;/P&gt;&lt;P&gt;IDOC_STATUS-MSGV4 = SY-MSGV4. &lt;/P&gt;&lt;P&gt;RETURN_VARIABLES-WF_PARAM = 'ERROR_IDOCS'. &lt;/P&gt;&lt;P&gt;RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM. &lt;/P&gt;&lt;P&gt;APPEND RETURN_VARIABLES. &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;APPEND IDOC_STATUS. &lt;/P&gt;&lt;P&gt;ENDFORM. " UPDATE_IDOC_STATUS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 05:58:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2468592#M554654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T05:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Idoc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2468593#M554655</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;PRE&gt;&lt;CODE&gt;
Creation of an IDoc generation program
The following code extract contains everything needed to generate an IDoc from data contained in a table.
FORM F_110_SEND_IDOC.
CONSTANTS:
  C_MESTYP TYPE EDIDC-MESTYP VALUE 'ZVISTAPM', " ur message type
  C_DOCTYP TYPE EDIDC-IDOCTP VALUE 'ZVISTAPM01', "ur idoc type
  C_SEGNAM TYPE EDIDD-SEGNAM VALUE 'Z1VISTAPM'. "ur segment name
DATA:
  I_ZVISTA_PM TYPE ZVISTA_PM_T OCCURS 6000,
  I_EDIDC TYPE EDIDC OCCURS 0,
  I_EDIDD TYPE EDIDD OCCURS 0,
  WA_ZVISTA_PM TYPE ZVISTA_PM_T,
  WA_EDIDC TYPE EDIDC,
  WA_EDIDD TYPE EDIDD,
  WA_Z1VISTAPM TYPE Z1VISTAPM,
  V_OCCMAX TYPE IDOCSYN-OCCMAX,
  V_NBSEG TYPE I.
CLEAR WA_ZVISTA_PM.
CLEAR WA_EDIDC.
* Save the message type and the basic IDoc type
* in the control segment
MOVE C_MESTYP TO WA_EDIDC-MESTYP.
MOVE C_DOCTYP TO WA_EDIDC-IDOCTP.
* Retrieve the maximum number of segments in the basic IDoc
* type
SELECT MIN( OCCMAX )
  FROM IDOCSYN
  INTO V_OCCMAX
  WHERE IDOCTYP EQ C_DOCTYP AND SEGTYP EQ C_SEGNAM.
* Save the whole ZVISTA_PM_T table content
* in the I_ZVISTA_PM internal table.
SELECT *
FROM ZVISTA_PM_T
INTO CORRESPONDING FIELDS OF TABLE I_ZVISTA_PM.
* Create a data segment for each line of I_ZVISTA_PM
LOOP AT I_ZVISTA_PM INTO WA_ZVISTA_PM.
  MOVE-CORRESPONDING WA_ZVISTA_PM TO WA_Z1VISTAPM.
  CLEAR WA_EDIDD.
  MOVE C_SEGNAM TO WA_EDIDD-SEGNAM.
  MOVE WA_Z1VISTAPM TO WA_EDIDD-SDATA.
  APPEND WA_EDIDD TO I_EDIDD.
  CLEAR WA_ZVISTA_PM.
  CLEAR WA_Z1VISTAPM.
ENDLOOP.
* Count the number of data segments
DESCRIBE TABLE I_EDIDD LINES V_NBSEG.
* If the number of data segments exceeds the maximum
* allowed number, then edit a message in the spool,
* then display an error message (quit the program)
IF V_NBSEG GT V_OCCMAX.
  WRITE:/ TEXT-003, V_OCCMAX.
  MESSAGE E751.
ENDIF.
* Call the IDoc creation function
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
  EXPORTING
    MASTER_IDOC_CONTROL = WA_EDIDC
  TABLES
    COMMUNICATION_IDOC_CONTROL = I_EDIDC
    MASTER_IDOC_DATA = I_EDIDD
  EXCEPTIONS
    ERROR_IN_IDOC_CONTROL = 1
    ERROR_WRITING_IDOC_STATUS = 2
    ERROR_IN_IDOC_DATA = 3
    SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
    OTHERS = 5.
* If there was an error, display a message (quit the
* program)
IF SY-SUBRC NE 0.
  MESSAGE E746.
ENDIF.
ENDFORM.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ravish&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;plz dont forget to reward points if helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 05:59:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2468593#M554655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T05:59:45Z</dc:date>
    </item>
  </channel>
</rss>

