<?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: Errors in Call Transaction in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231251#M139397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again it really depends on the transaction, in this case in MM01 the message is a sucess message.  Run MM01 in dialog mode and you can see for yourself.  Not sure why its coded that way, but it is.  So for you purposes, you must check for the specific message class/number M3 307 in order to know if it is  a duplicate material or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Mar 2006 15:16:42 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-03-08T15:16:42Z</dc:date>
    <item>
      <title>Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231242#M139388</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;&lt;/P&gt;&lt;P&gt;In my program I am trying to handle errors in call transaction method using bdcmsgcoll and format_message.To check this I have given some false data like trying to create materials which are already in mara tables. The data is not updated in the mara tables but No error messages are populated into the bdcmsgcoll structure. The status of all messges is success. How do messages get populated into bdcmsgcoll ?&lt;/P&gt;&lt;P&gt;I am forwardimng my code too. Can anyone please explain me what's happening ? For what type of errors, Error messages get poplated into bdcmsgcoll ? &lt;/P&gt;&lt;P&gt;*********************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report Z_MAT_CALL&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;data : begin of material occurs 0,&lt;/P&gt;&lt;P&gt;       matnr like mara-matnr,           " Material Number&lt;/P&gt;&lt;P&gt;       mbrsh like mara-mbrsh,           " Industry sector&lt;/P&gt;&lt;P&gt;       mtart like mara-mtart,           " material Type&lt;/P&gt;&lt;P&gt;       maktx like makt-maktx,           " Material Description&lt;/P&gt;&lt;P&gt;       meins like mara-meins,           " Base Unit of Measure&lt;/P&gt;&lt;P&gt;       end of material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data fnam type string value 'C:\BW\MAT.TXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---- BDCDATA&lt;/P&gt;&lt;P&gt;data : bdcdata like bdcdata occurs 0 with header line,&lt;/P&gt;&lt;P&gt;       itab like bdcmsgcoll occurs 0 with header line,&lt;/P&gt;&lt;P&gt;       mesg(100).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---- Uploading data into internal table from flat File.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    filename                      = fnam   "'C:\BW\MAT.TXT'&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                      = material.&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;loop at material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '0060'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'RMMG1-MTART'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-MATNR'&lt;/P&gt;&lt;P&gt;                              material-matnr.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-MBRSH'&lt;/P&gt;&lt;P&gt;                              material-mbrsh.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-MTART'&lt;/P&gt;&lt;P&gt;                              material-mtart.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '0070'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MSICHTAUSW-DYTXT(02)'.&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 'MSICHTAUSW-KZSEL(01)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(02)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4004'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=BU'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              material-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MARA-MEINS'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              material-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MTPOS_MARA'&lt;/P&gt;&lt;P&gt;                              'NORM'.&lt;/P&gt;&lt;P&gt;perform bdc_transaction using 'MM01'.&lt;/P&gt;&lt;P&gt;refresh bdcdata.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;*LOOP AT iTAB.&lt;/P&gt;&lt;P&gt;*WRITE: / iTAB-TCODE,&lt;/P&gt;&lt;P&gt;*iTAB-DYNAME,&lt;/P&gt;&lt;P&gt;*iTAB-DYNUMB,&lt;/P&gt;&lt;P&gt;*iTAB-MSGTYP,&lt;/P&gt;&lt;P&gt;*iTAB-MSGSPRA,&lt;/P&gt;&lt;P&gt;*iTAB-MSGID,&lt;/P&gt;&lt;P&gt;*iTAB-MSGNR.&lt;/P&gt;&lt;P&gt;*ENDLOOP.&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;  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;  CLEAR BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.&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;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;P&gt;    CLEAR BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.&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;     Form  bdc_transaction&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_transaction  using    value(tcode).&lt;/P&gt;&lt;P&gt;call transaction tcode using bdcdata&lt;/P&gt;&lt;P&gt;                       mode   'N'&lt;/P&gt;&lt;P&gt;                       update 'S' messages into itab.&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 itab with key msgtyp = 'E'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;perform check.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&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;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;     Form  check&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 check .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;id = itab-msgid&lt;/P&gt;&lt;P&gt;lang = sy-langu&lt;/P&gt;&lt;P&gt;no = itab-msgnr&lt;/P&gt;&lt;P&gt;v1 = itab-msgv1&lt;/P&gt;&lt;P&gt;v2 = itab-msgv2&lt;/P&gt;&lt;P&gt;v3 = itab-msgv3&lt;/P&gt;&lt;P&gt;v4 = itab-msgv4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;msg = mesg&lt;/P&gt;&lt;P&gt;&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;.&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;&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;endform.                    " check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:00:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231242#M139388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T15:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231243#M139389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Varun,&lt;/P&gt;&lt;P&gt;  The BDCMSGCOLL gets updated with the last message in your call transaction,whether it is error or success.So, once you get error message then the call transaction stops &amp;amp; the itab gets updated with the error message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:04:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231243#M139389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T15:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231244#M139390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Varun,&lt;/P&gt;&lt;P&gt; After you get the message from the format_message fm, where are you writing it??&lt;/P&gt;&lt;P&gt;YOu write e write statement after the Call to the Format_message FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;id = itab-msgid&lt;/P&gt;&lt;P&gt;lang = sy-langu&lt;/P&gt;&lt;P&gt;no = itab-msgnr&lt;/P&gt;&lt;P&gt;v1 = itab-msgv1&lt;/P&gt;&lt;P&gt;v2 = itab-msgv2&lt;/P&gt;&lt;P&gt;v3 = itab-msgv3&lt;/P&gt;&lt;P&gt;v4 = itab-msgv4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;msg = mesg&lt;/P&gt;&lt;P&gt;&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;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;write:/ mesg.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S: Sometimes the messages will be of type Success only, but actually they are error messages, so , it is better if you loop around itab, instead of reading it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:05:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231244#M139390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T15:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231245#M139391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;DATA :  T_BDCMSGCOLL TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA :  WA_BDCMSGCOLL TYPE BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;DATA : ERR_LOG TYPE MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call Transaction MM01&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF W_FLAG NE 'X'.&lt;/P&gt;&lt;P&gt;    CALL TRANSACTION 'MM01' USING T_BDCDATA OPTIONS FROM WA_CTU_PARAMS&lt;/P&gt;&lt;P&gt;                                             MESSAGES INTO T_BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;    COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DESCRIBE TABLE T_BDCMSGCOLL LINES N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF N &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT T_BDCMSGCOLL INTO WA_BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CLEAR ERR_LOG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        W_MSGNO = WA_BDCMSGCOLL-MSGNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'WRITE_MESSAGE'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            MSGID = WA_BDCMSGCOLL-MSGID&lt;/P&gt;&lt;P&gt;            MSGNO = W_MSGNO&lt;/P&gt;&lt;P&gt;            MSGTY = WA_BDCMSGCOLL-MSGTYP&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;P&gt;            MESSG = ERR_LOG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Error that occurs during transactoon&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        IF ERR_LOG-MSGTY = 'E'.&lt;/P&gt;&lt;P&gt;          MOVE-CORRESPONDING T_UPLOAD TO  T_DOWNLOAD.&lt;/P&gt;&lt;P&gt;          MOVE ERR_LOG-MSGTX TO  T_DOWNLOAD-MSG.&lt;/P&gt;&lt;P&gt;          APPEND T_DOWNLOAD.&lt;/P&gt;&lt;P&gt;        ENDIF.&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;check structure declaration and code it may be useful&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:07:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231245#M139391</guid>
      <dc:creator>vinod_gunaware2</dc:creator>
      <dc:date>2006-03-08T15:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231246#M139392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In form bdc_transaction, after the call transaction, take out 'if sy-subrc NE 0.' You can never be sure what the return code will be. So the code should be:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM bdc_transaction USING value(tcode).
  CALL TRANSACTION tcode USING bdcdata
  MODE 'N'
  UPDATE 'S' MESSAGES INTO itab.

  READ TABLE itab WITH KEY msgtyp = 'E'.
  IF sy-subrc = 0.
    PERFORM check.
  ENDIF.
ENDFORM. " bdc_transaction
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:08:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231246#M139392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T15:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231247#M139393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL TRANSACTION
          MODE = 'E'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will stop if there is an error!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If none everything is ok!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is possible that some tests are not done by SAP when it is in Batch Input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Stephan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx for reward!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:09:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231247#M139393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T15:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231248#M139394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The message that you are expecting is not actually an error message.  Message class M3, number 307.  Modify your program like this, you will see the messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

form bdc_transaction using value(tcode).
  call transaction tcode using bdcdata
  mode 'N'
  update 'S' messages into itab.

  if sy-subrc ne 0.
&amp;lt;b&amp;gt;    loop at itab.
      perform check.
      write:/ itab-msgid, itab-msgnr, mesg.
    endloop.&amp;lt;/b&amp;gt;
  endif.
endform. " bdc_transaction

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:09:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231248#M139394</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-08T15:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231249#M139395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you said bdcmsgcoll gets updated with the last message of the transaction. So if the update fails it should be because of an error right ? In my case the update fails because the flat file data is duplicate. &lt;/P&gt;&lt;P&gt;sy-subrc returns 0 but bdcmsgcoll gets populated with success message. What could be the reason ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:12:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231249#M139395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T15:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231250#M139396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Varun,&lt;/P&gt;&lt;P&gt;   Even if the messages in the itab(If you can see them in debug mode), are type success, their nature is that of an error message. For example if you do not have a field in a screen and you try to populate it with a vakue in the bdc, it will give a success message only, but the sy-subrc will not be 0.&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:15:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231250#M139396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T15:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231251#M139397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again it really depends on the transaction, in this case in MM01 the message is a sucess message.  Run MM01 in dialog mode and you can see for yourself.  Not sure why its coded that way, but it is.  So for you purposes, you must check for the specific message class/number M3 307 in order to know if it is  a duplicate material or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:16:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231251#M139397</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-08T15:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231252#M139398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is solved. I got the  message I am expecting.&lt;/P&gt;&lt;P&gt;But when can I expect error message? I mean to say when bdcmsgcoll gets populated with error message ? In what scenarios ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:18:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231252#M139398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T15:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231253#M139399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Varun,&lt;/P&gt;&lt;P&gt; I suggest you run the program in the All screen mode &amp;amp; see what message you are getting.&lt;/P&gt;&lt;P&gt;Some times the messages are updated with "Success",even if it is error...&lt;/P&gt;&lt;P&gt;&amp;amp; also you messgae might be of type 'E',when there is problem in the flow of the transaction you defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Phani Kiran Nudurupati&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:19:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231253#M139399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T15:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231254#M139400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Varun, &lt;/P&gt;&lt;P&gt;   Now now..your question is more functional than technical..:)&lt;/P&gt;&lt;P&gt;For whatever reasons a manual creation fails with an error message , for all such cases you would get an error message in bdcmsgcoll.&lt;/P&gt;&lt;P&gt;And what do you mean, "My problem is solved", what did you do to get that code of yours working??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:22:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231254#M139400</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T15:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231255#M139401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It will have error messages if a true error message is issued.  Meaning that any Error message that happens in the transaction in dialog mode, that appears in RED at the bottom of the screen, will come thru as a message type E.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please remember to award points for helpful answers and mark you post as solved when solved completely.  Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 15:25:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-in-call-transaction/m-p/1231255#M139401</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-08T15:25:29Z</dc:date>
    </item>
  </channel>
</rss>

