<?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/2626612#M603593</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;You need to do following -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. first create a variable for structure EDIDC which will hold the control record information, if you are putting multiple IDOC's then this can be an internal table.&lt;/P&gt;&lt;P&gt;2. Create an internal table for EDIDD, which will hold the segment data.&lt;/P&gt;&lt;P&gt;4. Open a file in text mode.&lt;/P&gt;&lt;P&gt;5. Then for each IDOC first fill the EDIDC variable and write to the file.&lt;/P&gt;&lt;P&gt;6. For each IDOC fill the EDIDDD internal table as follows -&lt;/P&gt;&lt;P&gt;i) For each segment create a variable and fill the variable (structure) with relevant data.&lt;/P&gt;&lt;P&gt;ii)For each segment fill EDIDD work area and put that into SDATA field of EDIDD.&lt;/P&gt;&lt;P&gt;7. Write all records of internal table to the file.&lt;/P&gt;&lt;P&gt;8. Repeat 5-7 if there are more IDOC's to be written.&lt;/P&gt;&lt;P&gt;9. Close the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&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, 27 Jul 2007 04:12:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-27T04:12:12Z</dc:date>
    <item>
      <title>IDOC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2626611#M603592</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;I need to write a IDOC data to a flat file. How do i do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any standard function module to read IDOC and write to file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 04:06:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2626611#M603592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T04:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: IDOC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2626612#M603593</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;You need to do following -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. first create a variable for structure EDIDC which will hold the control record information, if you are putting multiple IDOC's then this can be an internal table.&lt;/P&gt;&lt;P&gt;2. Create an internal table for EDIDD, which will hold the segment data.&lt;/P&gt;&lt;P&gt;4. Open a file in text mode.&lt;/P&gt;&lt;P&gt;5. Then for each IDOC first fill the EDIDC variable and write to the file.&lt;/P&gt;&lt;P&gt;6. For each IDOC fill the EDIDDD internal table as follows -&lt;/P&gt;&lt;P&gt;i) For each segment create a variable and fill the variable (structure) with relevant data.&lt;/P&gt;&lt;P&gt;ii)For each segment fill EDIDD work area and put that into SDATA field of EDIDD.&lt;/P&gt;&lt;P&gt;7. Write all records of internal table to the file.&lt;/P&gt;&lt;P&gt;8. Repeat 5-7 if there are more IDOC's to be written.&lt;/P&gt;&lt;P&gt;9. Close the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&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, 27 Jul 2007 04:12:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2626612#M603593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T04:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: IDOC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2626613#M603594</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;You can use the following FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IDOC_READ_COMPLETELY (Read IDoc Data)&lt;/P&gt;&lt;P&gt;IDOC_TYPE_COMPLETE_READ (Read IDoc Structure and Segments)&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;reward points if useful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Ashu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 04:13:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2626613#M603594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T04:13:37Z</dc:date>
    </item>
  </channel>
</rss>

