<?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: Fill Idoc error status in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048066#M1351935</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
call customer-function '011'
         exporting
              dxvbak  = xvbak
              docnum  = idoc_contrl-docnum
         tables
              derrtab = errtab
              dxvbap  = xvbap
              dxvbep  = xvbep
              dxvbadr = xvbadr
              dxvbpa  = xvbpa
              dxvbuv  = xvbuv
              dedidc  = idoc_contrl
              dedidd  = idoc_data
              dxkomv  = xkomv
              dxvekp  = xvekp
              dyvekp  = yvekp.
    describe table errtab lines anzahl.
 
    if anzahl gt 0 and input_method = 'X'.
      export errtab to memory id 'idoc_test_errtab'.
    endif.
 
    if anzahl gt  0  and
       xaprau eq 'D'.
      loop at errtab where arbgb eq 'VG' and
                           msgnr eq '219'.
        anzahl = anzahl - 1.
      endloop.
      if anzahl eq 0.
        refresh errtab.
      endif.
    endif.
    if anzahl ne 0
     and input_method is initial.
      perform determine_user.
      perform statusrecord tables errtab.   " This is place in which IDOC_STATUS table get filled from
                                            " ERRTAB. Please check whether your IDOC_STATUS have
                                            " the Error record 51 that you inserted
      call customer-function '010'
           exporting
                docnum      = idoc_contrl-docnum
           tables
                derrtab     = errtab
                xbdidocstat = idoc_status.
    else.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Aug 2009 15:57:15 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2009-08-11T15:57:15Z</dc:date>
    <item>
      <title>Fill Idoc error status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048063#M1351932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to fill the IDoc error status when processing inbound ORDERS IDoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code looks OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i am not getting the IDoc in error status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pl look @ the code and let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: w_errtab like errtab occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if condition fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move derrtab to w_errtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; w_ERRTAB-ARBGB = 'IDOC_ADAPTER'.&lt;/P&gt;&lt;P&gt; w_ERRTAB-CLASS = 'E'.&lt;/P&gt;&lt;P&gt; w_ERRTAB-MSGNR = '902'.&lt;/P&gt;&lt;P&gt; w_ERRTAB-MSGV1 = xvbak-bstdk.&lt;/P&gt;&lt;P&gt; w_ERRTAB-MSGV2 = s_kunnr.&lt;/P&gt;&lt;P&gt; w_ERRTAB-MSGV3 = s_vbeln.&lt;/P&gt;&lt;P&gt;append w_ERRTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE w_errtab LINES sy-tfill.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;derrtab = w_errtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The IDoc status is still 53.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 14:50:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048063#M1351932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-11T14:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Fill Idoc error status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048064#M1351933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which Customer exit do you using for this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 15:09:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048064#M1351933</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-08-11T15:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Fill Idoc error status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048065#M1351934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EXIT_SAPLVEDA_011&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 15:31:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048065#M1351934</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-11T15:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Fill Idoc error status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048066#M1351935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
call customer-function '011'
         exporting
              dxvbak  = xvbak
              docnum  = idoc_contrl-docnum
         tables
              derrtab = errtab
              dxvbap  = xvbap
              dxvbep  = xvbep
              dxvbadr = xvbadr
              dxvbpa  = xvbpa
              dxvbuv  = xvbuv
              dedidc  = idoc_contrl
              dedidd  = idoc_data
              dxkomv  = xkomv
              dxvekp  = xvekp
              dyvekp  = yvekp.
    describe table errtab lines anzahl.
 
    if anzahl gt 0 and input_method = 'X'.
      export errtab to memory id 'idoc_test_errtab'.
    endif.
 
    if anzahl gt  0  and
       xaprau eq 'D'.
      loop at errtab where arbgb eq 'VG' and
                           msgnr eq '219'.
        anzahl = anzahl - 1.
      endloop.
      if anzahl eq 0.
        refresh errtab.
      endif.
    endif.
    if anzahl ne 0
     and input_method is initial.
      perform determine_user.
      perform statusrecord tables errtab.   " This is place in which IDOC_STATUS table get filled from
                                            " ERRTAB. Please check whether your IDOC_STATUS have
                                            " the Error record 51 that you inserted
      call customer-function '010'
           exporting
                docnum      = idoc_contrl-docnum
           tables
                derrtab     = errtab
                xbdidocstat = idoc_status.
    else.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 15:57:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048066#M1351935</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-08-11T15:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Fill Idoc error status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048067#M1351936</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;when the below line of code is executed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe table errtab lines anzahl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;even though the errtab contain a record, anzahl = 0, i don't understand why? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i debug the code, anzahl is 0, why?? at this point of time my errtab is not initial. It contains a record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you pl help me what i am doing wrong??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Creasy Matthew on Aug 11, 2009 6:08 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 16:07:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048067#M1351936</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-11T16:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Fill Idoc error status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048068#M1351937</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;This is your code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; data: w_errtab like errtab occurs 0 with header line.

if condition fails.

  move derrtab to w_errtab.

  w_ERRTAB-ARBGB = 'IDOC_ADAPTER'.
  w_ERRTAB-CLASS = 'E'. 
  w_ERRTAB-MSGNR = '902'.
  w_ERRTAB-MSGV1 = xvbak-bstdk.
  w_ERRTAB-MSGV2 = s_kunnr.
  w_ERRTAB-MSGV3 = s_vbeln.
  append w_ERRTAB.

  DESCRIBE TABLE w_errtab LINES sy-tfill.

  derrtab = w_errtab.

endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can see you append the record in a your own internal table W_ERRTAB, but I can't see where u append the record in the table parameter DERRTAB of the user-exit interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's this line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; derrtab = w_errtab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But here u're fill the headerline of DERRTAB, so any record is appended here, u should write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;APPEND DERRTAB.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 16:16:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048068#M1351937</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-11T16:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Fill Idoc error status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048069#M1351938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;change your last line in the code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
derrtab = w_errtab. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

derrtab[] = w_errtab[].

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 16:19:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048069#M1351938</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-11T16:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Fill Idoc error status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048070#M1351939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And also one more point to Max reply you need to change this line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
move derrtab to w_errtab.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
w_errtab[] = derrtab[].
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 16:20:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-idoc-error-status/m-p/6048070#M1351939</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-08-11T16:20:56Z</dc:date>
    </item>
  </channel>
</rss>

