<?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: Inbound IDOC FM - Process only error segment. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inbound-idoc-fm-process-only-error-segment/m-p/5486558#M1255833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;I also suggested the same approach. But I have been asked to follow the approach i mentioned in the first post. I was asked to follow it in the following way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;1. Sort all IDOC by ascending order &lt;/P&gt;&lt;P&gt;2.  Loop EDIDC  then Loop EDIDD data &lt;/P&gt;&lt;P&gt;      If error  in data or BAPI returns error  -&amp;gt; populate error messages with segment number : &lt;/P&gt;&lt;P&gt;IDOC_STATUS-segnum =  IDOC_DATA-segnum.( This is useful to identify which segment  having error and also mark the segment with red color) &lt;/P&gt;&lt;P&gt;IDOC_STATUS-segfld =  IDOC_DATA-field.&lt;/P&gt;&lt;P&gt;3.Reprocessing methods . &lt;/P&gt;&lt;P&gt;check IDOC is reprocessing or not -&amp;gt; if reprocessing check Segments status from table EDIDS based on IDOC Number,    Segment Name and segment number.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure how to check in a program whether the IDoc is reprocessing. ( See step 3)&lt;/P&gt;&lt;P&gt;Also , Kindly let me know how do schedulling programatically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;KG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Apr 2009 12:32:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-20T12:32:26Z</dc:date>
    <item>
      <title>Inbound IDOC FM - Process only error segment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inbound-idoc-fm-process-only-error-segment/m-p/5486556#M1255831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I m facing the following situation&lt;/P&gt;&lt;P&gt;The inbound Idoc has just 1 segment and the segment has just two fields - Old material number and wholesale price( this field will be captured through Z-STRUCTURE in MARA table). My inbound IDoc will have multiple records( say 100 materails) . If the old material number in found in MARA table then update the wholesale price (say 90 records processed in first go). If not found then mark the segment as error segment ( The remaining 10 segments). Next time when the idoc will be reprocessed then then only those segment should be processed which were marked as error segment ( The 10 segments). If found this time then update ( say 2 out of 10) and update the idoc status so that now 8 IDoc segments will be marked as error segment). An the process continues till all the records are process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Infact this interface will be scheduled to run weekly. But if the any error segment is there, It needs to be reprocessed daily until all material are posted successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me at the following points&lt;/P&gt;&lt;P&gt;1.  How to Reprocess the error segments only , if the IDoc is being reprocessed, otherwise process the whole IDoc( The first time)&lt;/P&gt;&lt;P&gt;2. How do I programatically schedule the error idoc to be reprocessed daily until successful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 12:09:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inbound-idoc-fm-process-only-error-segment/m-p/5486556#M1255831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-20T12:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound IDOC FM - Process only error segment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inbound-idoc-fm-process-only-error-segment/m-p/5486557#M1255832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gaurav,&lt;/P&gt;&lt;P&gt;   I think it is not possible to partially process an IDOC(Like processing only particular segments).&lt;/P&gt;&lt;P&gt;Instead, you should think of changing your design to create as many IDOCs as the number of records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then each of this idoc can be a sucess or a failure. YOu can reprocess only the failed IDOCs using the status field of the IDOCS using standard IDOC reprocessing programs .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 12:15:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inbound-idoc-fm-process-only-error-segment/m-p/5486557#M1255832</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-20T12:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound IDOC FM - Process only error segment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inbound-idoc-fm-process-only-error-segment/m-p/5486558#M1255833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;I also suggested the same approach. But I have been asked to follow the approach i mentioned in the first post. I was asked to follow it in the following way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;1. Sort all IDOC by ascending order &lt;/P&gt;&lt;P&gt;2.  Loop EDIDC  then Loop EDIDD data &lt;/P&gt;&lt;P&gt;      If error  in data or BAPI returns error  -&amp;gt; populate error messages with segment number : &lt;/P&gt;&lt;P&gt;IDOC_STATUS-segnum =  IDOC_DATA-segnum.( This is useful to identify which segment  having error and also mark the segment with red color) &lt;/P&gt;&lt;P&gt;IDOC_STATUS-segfld =  IDOC_DATA-field.&lt;/P&gt;&lt;P&gt;3.Reprocessing methods . &lt;/P&gt;&lt;P&gt;check IDOC is reprocessing or not -&amp;gt; if reprocessing check Segments status from table EDIDS based on IDOC Number,    Segment Name and segment number.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure how to check in a program whether the IDoc is reprocessing. ( See step 3)&lt;/P&gt;&lt;P&gt;Also , Kindly let me know how do schedulling programatically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;KG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 12:32:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inbound-idoc-fm-process-only-error-segment/m-p/5486558#M1255833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-20T12:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound IDOC FM - Process only error segment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inbound-idoc-fm-process-only-error-segment/m-p/5486559#M1255834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gaurav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By looking your Question..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write the report with following steps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select DOCNUM* from EDIDC where DIRECT = 1 "Inbound direction&lt;/P&gt;&lt;P&gt;                                      and STATUS Ne 53    "not sucess&lt;/P&gt;&lt;P&gt;                                      and  IDOCTP =  " Basic idoc type&lt;/P&gt;&lt;P&gt;                                        and UPDDAT &amp;gt;= "From last one week to todays date..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from above read all the indounb idocs and reprocess the idocs using program &lt;/P&gt;&lt;P&gt;by checking the idoc status code process the below program...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program RBDAPP01 for status 64&lt;/P&gt;&lt;P&gt;Program RBDAGAIE for status 32 and 69 (Edited IDocs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 16:14:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inbound-idoc-fm-process-only-error-segment/m-p/5486559#M1255834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-20T16:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound IDOC FM - Process only error segment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inbound-idoc-fm-process-only-error-segment/m-p/5486560#M1255835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with Ravi, from the design point of view it is the neat and clean approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing if the moment an error message is raised in the code, the processing will stop and the IDoc will fail in status 51 and the reamaining segments, the ones after the failed segment, will not be processed at all. &lt;/P&gt;&lt;P&gt;So I'm not sure if your approach will work as expected. Unless you are collecting all the error messages ane updating the status at once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But to answer your question, "How to check if the IDoc is re-processing or not" &lt;/P&gt;&lt;P&gt;The answer is to check in table EDIDS for the idoc number and see if there is a status 51 for it, if found, the IDoc is definitely being re-processed else it is a new IDoc.&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;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 17:43:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inbound-idoc-fm-process-only-error-segment/m-p/5486560#M1255835</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-20T17:43:14Z</dc:date>
    </item>
  </channel>
</rss>

