<?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: Program to update idoc segments in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-idoc-segments/m-p/5734195#M1300459</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;by using the Tcode WE31&lt;/P&gt;&lt;P&gt;you can update the Segments Idoc Data in the following way:&lt;/P&gt;&lt;P&gt;Step1:Open doc to edit&lt;/P&gt;&lt;P&gt;      call function 'EDI_DOCUMENT_OPEN_FOR_EDIT'&lt;/P&gt;&lt;P&gt;Step2:Loop at itab_edidd and change data&lt;/P&gt;&lt;P&gt;Step3a:Change data segments&lt;/P&gt;&lt;P&gt;      Call function 'EDI_CHANGE_DATA_SEGMENTS'&lt;/P&gt;&lt;P&gt;Step3b:Change control record&lt;/P&gt;&lt;P&gt;      Call function 'EDI_CHANGE_CONTROL_RECORD'&lt;/P&gt;&lt;P&gt;Step4:Close Idoc&lt;/P&gt;&lt;P&gt;      *UPDATE IDOC STATUS&lt;/P&gt;&lt;P&gt;       Call function 'EDI_DOCUMENT_CLOSE_EDIT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IDOC_OUTPUT_ORDRSP will create all the segments needed as per the source data automatically. You need to populate your segment in a user exit&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;So, if you only needed half of the standard idoc's (ORDERS05) segments populated, you would need to write code in a customer exit (FM IODC_OUTPUT_ORDRSP) to filter out the unnecessary data/segments?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;the easiest place to strip out all the unwanted segments would be in your Middleware. Otherwise, you should be able to strip the segments out by creating an include in one of the Customer Functions in IDOC_OUTPUT_ORDRSP, i.e.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;EM&gt;CALL CUSTOMER-FUNCTION '004'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CALL CUSTOMER-FUNCTION '001'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CALL CUSTOMER-FUNCTION '003'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;steps to create Z IDOC and segments required for it.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;and also the sample code (program) to poplulate the data into those segemnts from a (excel/csv file )or tables.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1. Create the segments thru we31.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2. Create an idoc with the above created segments from WE30.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3. Do settings from WEDI tcode.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;4. Do partner profile settings in we20&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;5. Write a report program which reads data from spreadsheet and send the idoc withMASTER_IDOC_DISTRIBUTE FM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below links:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://help.sap.com/saphelp_sm32/helpdata/EN/52/16ae16543311d1891c0000e8322f96/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_sm32/helpdata/EN/52/16ae16543311d1891c0000e8322f96/content.htm&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://idocs.de/www5/EDI/HTML/IDocBook.htm#_Toc8400384" target="test_blank"&gt;http://idocs.de/www5/EDI/HTML/IDocBook.htm#_Toc8400384&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jun 2009 10:33:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-08T10:33:37Z</dc:date>
    <item>
      <title>Program to update idoc segments</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-idoc-segments/m-p/5734194#M1300458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any SAP program to update idoc segments? User needs to update hundreds of idocs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 06:52:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-idoc-segments/m-p/5734194#M1300458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-08T06:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Program to update idoc segments</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-idoc-segments/m-p/5734195#M1300459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;by using the Tcode WE31&lt;/P&gt;&lt;P&gt;you can update the Segments Idoc Data in the following way:&lt;/P&gt;&lt;P&gt;Step1:Open doc to edit&lt;/P&gt;&lt;P&gt;      call function 'EDI_DOCUMENT_OPEN_FOR_EDIT'&lt;/P&gt;&lt;P&gt;Step2:Loop at itab_edidd and change data&lt;/P&gt;&lt;P&gt;Step3a:Change data segments&lt;/P&gt;&lt;P&gt;      Call function 'EDI_CHANGE_DATA_SEGMENTS'&lt;/P&gt;&lt;P&gt;Step3b:Change control record&lt;/P&gt;&lt;P&gt;      Call function 'EDI_CHANGE_CONTROL_RECORD'&lt;/P&gt;&lt;P&gt;Step4:Close Idoc&lt;/P&gt;&lt;P&gt;      *UPDATE IDOC STATUS&lt;/P&gt;&lt;P&gt;       Call function 'EDI_DOCUMENT_CLOSE_EDIT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IDOC_OUTPUT_ORDRSP will create all the segments needed as per the source data automatically. You need to populate your segment in a user exit&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;So, if you only needed half of the standard idoc's (ORDERS05) segments populated, you would need to write code in a customer exit (FM IODC_OUTPUT_ORDRSP) to filter out the unnecessary data/segments?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;the easiest place to strip out all the unwanted segments would be in your Middleware. Otherwise, you should be able to strip the segments out by creating an include in one of the Customer Functions in IDOC_OUTPUT_ORDRSP, i.e.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;EM&gt;CALL CUSTOMER-FUNCTION '004'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CALL CUSTOMER-FUNCTION '001'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CALL CUSTOMER-FUNCTION '003'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;steps to create Z IDOC and segments required for it.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;and also the sample code (program) to poplulate the data into those segemnts from a (excel/csv file )or tables.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1. Create the segments thru we31.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2. Create an idoc with the above created segments from WE30.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3. Do settings from WEDI tcode.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;4. Do partner profile settings in we20&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;5. Write a report program which reads data from spreadsheet and send the idoc withMASTER_IDOC_DISTRIBUTE FM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below links:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://help.sap.com/saphelp_sm32/helpdata/EN/52/16ae16543311d1891c0000e8322f96/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_sm32/helpdata/EN/52/16ae16543311d1891c0000e8322f96/content.htm&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://idocs.de/www5/EDI/HTML/IDocBook.htm#_Toc8400384" target="test_blank"&gt;http://idocs.de/www5/EDI/HTML/IDocBook.htm#_Toc8400384&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 10:33:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-idoc-segments/m-p/5734195#M1300459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-08T10:33:37Z</dc:date>
    </item>
  </channel>
</rss>

