<?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: how can i handle errors in bdc - call transaction method using tcode xk01 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733183#M634712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when i execute the program its not showing any errors log in sm37. &lt;/P&gt;&lt;P&gt;u suggest what should i do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Sep 2007 10:14:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-17T10:14:45Z</dc:date>
    <item>
      <title>how can i handle errors in bdc - call transaction method using tcode xk01</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733181#M634710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i want to know how can i handle errors in call transaction method using tcode xk01. I have written a program in se38 but its not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF itab,&lt;/P&gt;&lt;P&gt;lifnr TYPE rf02k-lifnr,&lt;/P&gt;&lt;P&gt;ktokk TYPE rf02k-ktokk,&lt;/P&gt;&lt;P&gt;END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : i_tab TYPE TABLE OF itab INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;       wa_tab TYPE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : i_bdc TYPE TABLE OF bdcdata INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;       wa_bdc TYPE bdcdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : i_message LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       wa_message TYPE bdcmsgcoll.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : fname TYPE string VALUE 'd:\manish.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: p_text(100) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename            = fname&lt;/P&gt;&lt;P&gt;      filetype            = 'ASC'&lt;/P&gt;&lt;P&gt;      has_field_separator = 'X'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab            = i_tab.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;  LOOP AT i_tab INTO wa_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM bdc_field USING 'RF02K-LIFNR' wa_tab-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM bdc_field USING 'RF02K-KTOKK' wa_tab-ktokk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM bdc_field USING 'BDC_OKCODE'  '= AUSW'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL TRANSACTION 'XK01' USING i_bdc MODE 'N'. " UPDATE 'S' MESSAGES&lt;/P&gt;&lt;P&gt;    "INTO i_message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    REFRESH i_bdc.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    READ TABLE i_message WITH KEY msgtyp = 'E'.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT i_message INTO wa_message.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          id        = i_message-msgid&lt;/P&gt;&lt;P&gt;          lang      = 'EN'&lt;/P&gt;&lt;P&gt;          no        = i_message-msgnr&lt;/P&gt;&lt;P&gt;          v1        = i_message-msgv1&lt;/P&gt;&lt;P&gt;          v2        = i_message-msgv2&lt;/P&gt;&lt;P&gt;          v3        = i_message-msgv3&lt;/P&gt;&lt;P&gt;          v4        = i_message-msgv4&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          msg       = p_text&lt;/P&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          not_found = 1&lt;/P&gt;&lt;P&gt;          OTHERS    = 2.&lt;/P&gt;&lt;P&gt;         WRITE:/ p_text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  bdc_dynpro&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;PROGRAM    text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;DYNPRO     text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM bdc_dynpro USING program dynpro.&lt;/P&gt;&lt;P&gt;  CLEAR wa_bdc.&lt;/P&gt;&lt;P&gt;  wa_bdc-program = program.&lt;/P&gt;&lt;P&gt;  wa_bdc-dynpro = dynpro.&lt;/P&gt;&lt;P&gt;  wa_bdc-dynbegin = 'X'.&lt;/P&gt;&lt;P&gt;  APPEND wa_bdc TO i_bdc.&lt;/P&gt;&lt;P&gt;ENDFORM.                    "bdc_dynpro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  bdc_field&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;FNAM       text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;FVAL       text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 09:59:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733181#M634710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T09:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: how can i handle errors in bdc - call transaction method using tcode xk01</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733182#M634711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi manish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                 you said it 's not working . What do you mean ? Please give me a detail . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Wiboon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 10:11:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733182#M634711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T10:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: how can i handle errors in bdc - call transaction method using tcode xk01</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733183#M634712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when i execute the program its not showing any errors log in sm37. &lt;/P&gt;&lt;P&gt;u suggest what should i do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 10:14:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733183#M634712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T10:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: how can i handle errors in bdc - call transaction method using tcode xk01</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733184#M634713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you should treat each  call transaction's message within the loop itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_tab INTO wa_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM bdc_field USING 'RF02K-LIFNR' wa_tab-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM bdc_field USING 'RF02K-KTOKK' wa_tab-ktokk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM bdc_field USING 'BDC_OKCODE' '= AUSW'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;CALL TRANSACTION 'XK01' &lt;/P&gt;&lt;P&gt;USING i_bdc &lt;/P&gt;&lt;P&gt;MODE 'N'&lt;/P&gt;&lt;P&gt;UPDATE 'S' MESSAGES&lt;/P&gt;&lt;P&gt;INTO i_message.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;READ TABLE i_message WITH KEY msgtyp = 'E'.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;id = i_message-msgid&lt;/P&gt;&lt;P&gt;lang = 'EN'&lt;/P&gt;&lt;P&gt;no = i_message-msgnr&lt;/P&gt;&lt;P&gt;v1 = i_message-msgv1&lt;/P&gt;&lt;P&gt;v2 = i_message-msgv2&lt;/P&gt;&lt;P&gt;v3 = i_message-msgv3&lt;/P&gt;&lt;P&gt;v4 = i_message-msgv4&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;msg = p_text&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;not_found = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;WRITE:/ p_text.&lt;/P&gt;&lt;P&gt;ENDIF.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH i_bdc.&lt;/P&gt;&lt;P&gt;REFRESH i_message..&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 10:16:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733184#M634713</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2007-09-17T10:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: how can i handle errors in bdc - call transaction method using tcode xk01</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733185#M634714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;even after making changes i cant find any result what should i do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 10:58:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733185#M634714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T10:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: how can i handle errors in bdc - call transaction method using tcode xk01</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733186#M634715</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;Check the following link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap-img.com/abap/retreive-error-message-from-bdc.htm" target="test_blank"&gt;http://sap-img.com/abap/retreive-error-message-from-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 11:03:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733186#M634715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T11:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: how can i handle errors in bdc - call transaction method using tcode xk01</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733187#M634716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi manish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop the internal table i_message.&lt;/P&gt;&lt;P&gt;and in the loop u are using FORMAT_MESSAGE fm&lt;/P&gt;&lt;P&gt;it will give some return value in p_text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each rec. whether it is succcessful/ error the info will be stored in p_text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append this info into another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop this internal table outside the loop of i_message int table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;validate the message id.&lt;/P&gt;&lt;P&gt;if msgid eq 'E'.&lt;/P&gt;&lt;P&gt;store that rec into eror internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and using that error internal table reprocess the error rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if useful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 11:09:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733187#M634716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T11:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: how can i handle errors in bdc - call transaction method using tcode xk01</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733188#M634717</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;Below is BDC using call transaction for TCode : MR21 (MAterial price chnage). Change your code exactly with this, as I used Error handling in this BDC and even it is working properly.&lt;/P&gt;&lt;P&gt;                                                                                ************************************************************************&lt;/P&gt;&lt;P&gt;*PROGRAM ID   : ZMATERIAL_PRICE_CHANGE&lt;/P&gt;&lt;P&gt;*AUTHOR       : &lt;/P&gt;&lt;P&gt;*DESCRIPTION  : BDC PROGRAM TO CHANGE THE MATERIAL EXISTING PRICE&lt;/P&gt;&lt;P&gt;*TRANSACTION  : MR21&lt;/P&gt;&lt;P&gt;*PROJECT      : &lt;/P&gt;&lt;P&gt;*VERSION      : 1.0&lt;/P&gt;&lt;P&gt;*REQUEST NO   :&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;report ZMATERIAL_PRICE_CHANGE&lt;/P&gt;&lt;P&gt;       no standard page heading line-size 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES : T100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_MATERIAL OCCURS 0,&lt;/P&gt;&lt;P&gt;            INDEX(4), "Index Number&lt;/P&gt;&lt;P&gt;            BUDAT(10), "Posting Date&lt;/P&gt;&lt;P&gt;            BUKRS(4), " Company Code&lt;/P&gt;&lt;P&gt;            WERKS(4), "Plant Number&lt;/P&gt;&lt;P&gt;            XBLNR(16), "Reference&lt;/P&gt;&lt;P&gt;            BKTXT(25), "Doc. Header Text&lt;/P&gt;&lt;P&gt;            MATNR(18), "Material Number&lt;/P&gt;&lt;P&gt;            BWTAR(10), "Valuation Type&lt;/P&gt;&lt;P&gt;            NEWVALPR(11), " Valuation New Price&lt;/P&gt;&lt;P&gt;            NEWPEINH(5), " New Price Per Unit&lt;/P&gt;&lt;P&gt;            ER_MESSAGE(100), "Error Message&lt;/P&gt;&lt;P&gt;        END OF IT_MATERIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table to get the error data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : it_error like IT_MATERIAL occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Internal table for Batch input: New table field structure&lt;/P&gt;&lt;P&gt;DATA : BDCDATA like BDCDATA occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Internal table for message&lt;/P&gt;&lt;P&gt;DATA : i_msgtab like bdcmsgcoll occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table to find the error from the legacy data                *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;DATA : begin of it_erfind occurs 0,&lt;/P&gt;&lt;P&gt;              INDEX(10), "INDEX Number&lt;/P&gt;&lt;P&gt;              er_message(100),  "For Error Message&lt;/P&gt;&lt;P&gt;       end of it_erfind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Variables declaration                                                *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;DATA : g_message(200),&lt;/P&gt;&lt;P&gt;       time(10),&lt;/P&gt;&lt;P&gt;       date(10)  ,&lt;/P&gt;&lt;P&gt;       v_error_filename like RLGRAP-FILENAME.&lt;/P&gt;&lt;P&gt;date      = sy-datum.&lt;/P&gt;&lt;P&gt;time      = sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*Initialization&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;*Generating Error file name with date and time.&lt;/P&gt;&lt;P&gt;  perform make_file_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*Selection Screen&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;  SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  parameter: p_file like IBIPPARMS-PATH obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECTION-SCREEN:END OF BLOCK B1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen ON VALUE-REQUEST FOR p_file .&lt;/P&gt;&lt;P&gt;  perform get_filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*START OF SELECTION&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform upload_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform fill_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Uploading data file to internal table.                           *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;********************************************************************&lt;/P&gt;&lt;P&gt;FORM upload_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;         FILENAME                      = p_file&lt;/P&gt;&lt;P&gt;         FILETYPE                      = 'DAT'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;          DATA_TAB                      = IT_MATERIAL&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;         CONVERSION_ERROR              = 1&lt;/P&gt;&lt;P&gt;         INVALID_TABLE_WIDTH           = 2&lt;/P&gt;&lt;P&gt;         INVALID_TYPE                  = 3&lt;/P&gt;&lt;P&gt;         NO_BATCH                      = 4&lt;/P&gt;&lt;P&gt;         UNKNOWN_ERROR                 = 5&lt;/P&gt;&lt;P&gt;         GUI_REFUSE_FILETRANSFER       = 6&lt;/P&gt;&lt;P&gt;         OTHERS                        = 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    "upload_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  fill_data&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM fill_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at IT_MATERIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    REFRESH BDCDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPRCKM_MR21' '0201'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MR21HEAD-BKTXT'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MR21HEAD-BUDAT'&lt;/P&gt;&lt;P&gt;                              IT_MATERIAL-BUDAT.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MR21HEAD-BUKRS'&lt;/P&gt;&lt;P&gt;                              IT_MATERIAL-BUKRS.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MR21HEAD-WERKS'&lt;/P&gt;&lt;P&gt;                              IT_MATERIAL-WERKS.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MR21HEAD-XBLNR'&lt;/P&gt;&lt;P&gt;                              IT_MATERIAL-XBLNR.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MR21HEAD-BKTXT'&lt;/P&gt;&lt;P&gt;                              IT_MATERIAL-XBLNR.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MR21HEAD-SCREEN_VARIANT'&lt;/P&gt;&lt;P&gt;                              'MR21_LAGERMATERIAL_0250'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPRCKM_MR21' '0201'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'CKI_MR21_0250-BWTAR(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MR21HEAD-SCREEN_VARIANT'&lt;/P&gt;&lt;P&gt;                              'MR21_LAGERMATERIAL_BWKEY_0250'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'CKI_MR21_0250-MATNR(01)'&lt;/P&gt;&lt;P&gt;                              IT_MATERIAL-MATNR.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'CKI_MR21_0250-BWTAR(01)'&lt;/P&gt;&lt;P&gt;                              IT_MATERIAL-BWTAR.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPRCKM_MR21' '0201'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'CKI_MR21_0250-NEWPEINH(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MR21HEAD-SCREEN_VARIANT'&lt;/P&gt;&lt;P&gt;                              'MR21_LAGERMATERIAL_BWKEY_0250'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'CKI_MR21_0250-NEWVALPR(01)'&lt;/P&gt;&lt;P&gt;                              IT_MATERIAL-NEWVALPR.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'CKI_MR21_0250-NEWPEINH(01)'&lt;/P&gt;&lt;P&gt;                              IT_MATERIAL-NEWPEINH.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPRCKM_MR21' '0201'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=SAVE'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'CKI_MR21_0250-MATNR(02)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MR21HEAD-SCREEN_VARIANT'&lt;/P&gt;&lt;P&gt;                              'MR21_LAGERMATERIAL_BWKEY_0250'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform bdc_transaction tables i_msgtab using 'MR21' 'A' 'L'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*To fetch the error message from the standard error table&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;    select single * from T100 where SPRSL = 'E'&lt;/P&gt;&lt;P&gt;                               and ARBGB = SY-MSGID&lt;/P&gt;&lt;P&gt;                               and MSGNR = SY-MSGNO.&lt;/P&gt;&lt;P&gt;    G_MESSAGE = T100-TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;*subroutine to change the error message for every document number&lt;/P&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform REPLACE_PARAMETERS  using SY-MSGV1&lt;/P&gt;&lt;P&gt;                                      SY-MSGV2&lt;/P&gt;&lt;P&gt;                                      SY-MSGV3&lt;/P&gt;&lt;P&gt;                                      SY-MSGV4&lt;/P&gt;&lt;P&gt;                             changing G_MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    write: / 'System variables:'.&lt;/P&gt;&lt;P&gt;    skip.&lt;/P&gt;&lt;P&gt;    write: / '        Sy-msgty:', SY-MSGTY.&lt;/P&gt;&lt;P&gt;    write: / '        Sy-msgid:', SY-MSGID.&lt;/P&gt;&lt;P&gt;    write: / '        Sy-msgno:', SY-MSGNO.&lt;/P&gt;&lt;P&gt;    write: / '        Sy-msgv1:', SY-MSGV1.&lt;/P&gt;&lt;P&gt;    write: / '        Sy-msgv2:', SY-MSGV2.&lt;/P&gt;&lt;P&gt;    write: / '        Sy-msgv3:', SY-MSGV3.&lt;/P&gt;&lt;P&gt;    write: / '        Sy-msgv4:', SY-MSGV4.&lt;/P&gt;&lt;P&gt;    skip.&lt;/P&gt;&lt;P&gt;    write: / 'Message:'.&lt;/P&gt;&lt;P&gt;    skip.&lt;/P&gt;&lt;P&gt;    write: / SY-MSGTY, G_MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*To find out the error in the legacy data if there is anything and pass&lt;/P&gt;&lt;P&gt;*the document no with error message to the seperate internal table&lt;/P&gt;&lt;P&gt;*called it_erfind&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;    if sy-msgty = 'E'.&lt;/P&gt;&lt;P&gt;      it_erfind-INDEX = IT_MATERIAL-INDEX.&lt;/P&gt;&lt;P&gt;      it_erfind-er_message = G_MESSAGE.&lt;/P&gt;&lt;P&gt;      append it_erfind.&lt;/P&gt;&lt;P&gt;      clear  it_erfind.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Finally we are segregating the error and downloading the error data.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    at last.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*To segregate the error&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      perform segregate_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*To download the error from it_error internal table with err mesg&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      perform error_download.&lt;/P&gt;&lt;P&gt;      perform display_message.&lt;/P&gt;&lt;P&gt;    endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;  clear IT_MATERIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    "fill_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Subrotine to replace the parameters&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM REPLACE_PARAMETERS USING P_PAR_1 P_PAR_2 P_PAR_3&lt;/P&gt;&lt;P&gt;                              P_PAR_4 CHANGING P_MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;erst mal pruefen, ob numerierte Parameter verwendet wurden&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    REPLACE '&amp;amp;1' WITH P_PAR_1 INTO P_MESSAGE.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    REPLACE '&amp;amp;2' WITH P_PAR_2 INTO P_MESSAGE.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    REPLACE '&amp;amp;3' WITH P_PAR_3 INTO P_MESSAGE.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    REPLACE '&amp;amp;4' WITH P_PAR_4 INTO P_MESSAGE.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;falls keine numerierten Parameter vorh., ersetzen wie gehabt&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REPLACE '&amp;amp;' WITH P_PAR_1 INTO P_MESSAGE.&lt;/P&gt;&lt;P&gt;  CONDENSE P_MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    REPLACE '&amp;amp;' WITH P_PAR_2 INTO P_MESSAGE.&lt;/P&gt;&lt;P&gt;    CONDENSE P_MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      REPLACE '&amp;amp;' WITH P_PAR_3 INTO P_MESSAGE.&lt;/P&gt;&lt;P&gt;      CONDENSE P_MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;        REPLACE '&amp;amp;' WITH P_PAR_4 INTO P_MESSAGE.&lt;/P&gt;&lt;P&gt;        CONDENSE P_MESSAGE.&lt;/P&gt;&lt;P&gt;      ENDIF.&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;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    "REPLACE_PARAMETERS&lt;/P&gt;&lt;P&gt;*Subroutine to segregate the error data from the legacy data&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM segregate_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at it_erfind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at IT_MATERIAL where INDEX = it_erfind-INDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      move-corresponding IT_MATERIAL to it_error.&lt;/P&gt;&lt;P&gt;      it_error-er_message = it_erfind-er_message.&lt;/P&gt;&lt;P&gt;      append it_error.&lt;/P&gt;&lt;P&gt;      clear  it_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    "segregate_error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************************&lt;/P&gt;&lt;P&gt;*Subroutine to download the error data from the it_error table.&lt;/P&gt;&lt;P&gt;********************************************************************&lt;/P&gt;&lt;P&gt;FORM error_download.&lt;/P&gt;&lt;P&gt;  if it_error[] is not initial.&lt;/P&gt;&lt;P&gt;    call function 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       CODEPAGE = 'IBM'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        FILENAME = v_error_filename&lt;/P&gt;&lt;P&gt;        FILETYPE = 'DAT'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        DATA_TAB = IT_ERROR.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    "error_download&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       Start new screen                                              *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BDC_DYNPRO USING PROGRAM DYNPRO.&lt;/P&gt;&lt;P&gt;  CLEAR BDCDATA.&lt;/P&gt;&lt;P&gt;  BDCDATA-PROGRAM  = PROGRAM.&lt;/P&gt;&lt;P&gt;  BDCDATA-DYNPRO   = DYNPRO.&lt;/P&gt;&lt;P&gt;  BDCDATA-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;  APPEND BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.                    "BDC_DYNPRO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       Insert field                                                  *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BDC_FIELD USING FNAM FVAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         IF FVAL &amp;lt;&amp;gt; NODATA.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR BDCDATA.&lt;/P&gt;&lt;P&gt;  BDCDATA-FNAM = FNAM.&lt;/P&gt;&lt;P&gt;  BDCDATA-FVAL = FVAL.&lt;/P&gt;&lt;P&gt;  APPEND BDCDATA.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDFORM.                    "BDC_FIELD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; FORM bdc_transaction tables MESSTAB USING  TCODE CTUMODE CUPDATE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       CALL TRANSACTION TCODE USING BDCDATA&lt;/P&gt;&lt;P&gt;                                    MODE   CTUMODE&lt;/P&gt;&lt;P&gt;                                    UPDATE CUPDATE&lt;/P&gt;&lt;P&gt;                                    MESSAGES INTO MESSTAB.&lt;/P&gt;&lt;P&gt;       REFRESH BDCDATA.&lt;/P&gt;&lt;P&gt;       clear   BDCDATA.&lt;/P&gt;&lt;P&gt;       ENDFORM.                    " bdc_transaction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  display_message&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM display_message .&lt;/P&gt;&lt;P&gt;  if it_error[] is initial.&lt;/P&gt;&lt;P&gt;    message i019(zmsg).   "Success&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    message e020(zmsg).   "Failed&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " display_message&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  get_filename&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_filename .&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;P&gt;     PROGRAM_NAME        = SYST-CPROG&lt;/P&gt;&lt;P&gt;     DYNPRO_NUMBER       = SYST-DYNNR&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FIELD_NAME          = p_file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     FILE_NAME           = p_file .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc NE 0  .&lt;/P&gt;&lt;P&gt;    write : / 'Enter File Name'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " get_filename&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  make_file_name&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM make_file_name .&lt;/P&gt;&lt;P&gt;  write sy-datum to date  MM/DD/YYYY.&lt;/P&gt;&lt;P&gt;  write sy-uzeit to time  USING EDIT MASK ' __ __ __'.&lt;/P&gt;&lt;P&gt;  concatenate Text-002 date time '.txt'&lt;/P&gt;&lt;P&gt;         into v_error_filename.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " make_file_name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 11:09:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733188#M634717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T11:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: how can i handle errors in bdc - call transaction method using tcode xk01</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733189#M634718</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;modify  the codes as mentioned above and check each loop in debug mode and verify whether each call transaction is successful or not!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 11:32:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733189#M634718</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2007-09-17T11:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: how can i handle errors in bdc - call transaction method using tcode xk01</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733190#M634719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my problem is answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 13:21:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-handle-errors-in-bdc-call-transaction-method-using-tcode-xk01/m-p/2733190#M634719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T13:21:37Z</dc:date>
    </item>
  </channel>
</rss>

