<?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 to display error message ?? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-error-message/m-p/1098371#M102828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you create and run a batch input session, you won't be able to display the errors because the session is run in a separate process, generally after the program finishes. The errors are available for re-processing in the batch input log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to display messages in the program, you have to use the call transaction method, but since you can't process the errors using this method, batch input is generally used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Dec 2005 18:07:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-12-12T18:07:31Z</dc:date>
    <item>
      <title>how to display error message ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-error-message/m-p/1098369#M102826</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;I have a BDC program to upload data from an excel sheet. I could see that some records of data fail to pass and hence after my bdc run i would like to display error message for the failed records as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;costcenter:&lt;/P&gt;&lt;P&gt;cost element:&lt;/P&gt;&lt;P&gt;fiscal year:&lt;/P&gt;&lt;P&gt;etc etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible ?? how to do that ? please explain in detail. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ur reference my program is pasted below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------" /&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; Report  ZBDC_BUDGET_UPLOAD&lt;/P&gt;&lt;P&gt;*&amp;amp;&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;&lt;/P&gt;&lt;P&gt;*&amp;amp;&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;&lt;/P&gt;&lt;P&gt;REPORT  ZBDC_BUDGET_UPLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of tdata,&lt;/P&gt;&lt;P&gt;         rec(150) type c,&lt;/P&gt;&lt;P&gt;       end of tdata,&lt;/P&gt;&lt;P&gt;       begin of tmtgp,&lt;/P&gt;&lt;P&gt;         costcent LIKE CCSS-KOSTL,&lt;/P&gt;&lt;P&gt;         costelem LIKE CCSS-KSTAR,&lt;/P&gt;&lt;P&gt;         fisyear LIKE CCSS-GJAHR,&lt;/P&gt;&lt;P&gt;         jan(10),&lt;/P&gt;&lt;P&gt;         feb(10),&lt;/P&gt;&lt;P&gt;         mar(10),&lt;/P&gt;&lt;P&gt;         apr(10),&lt;/P&gt;&lt;P&gt;         may(10),&lt;/P&gt;&lt;P&gt;         jun(10),&lt;/P&gt;&lt;P&gt;         jul(10),&lt;/P&gt;&lt;P&gt;         aug(10),&lt;/P&gt;&lt;P&gt;         sep(10),&lt;/P&gt;&lt;P&gt;         oct(10),&lt;/P&gt;&lt;P&gt;         nov(10),&lt;/P&gt;&lt;P&gt;         dec(10),&lt;/P&gt;&lt;P&gt;       end of tmtgp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: idata type table of tdata with header line.&lt;/P&gt;&lt;P&gt;data: imtgp type table of tmtgp with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : fieldval(10) type c.&lt;/P&gt;&lt;P&gt;&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;parameters: p_file type localfile default 'C:\budget_data_csv.csv'.&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;include zbdcrecx1.&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;&lt;/P&gt;&lt;P&gt;call function 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;P&gt;        exporting            static    = 'X'&lt;/P&gt;&lt;P&gt;        changing            file_name = p_file.&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;&lt;/P&gt;&lt;P&gt;perform upload_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at imtgp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write imtgp-fisyear to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP0' '1000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'KPP0B-VALUE(04)'.&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 'KPP0B-VALUE(04)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;Write imtgp-costcent to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP0' '1000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'KPP0B-VALUE(06)'.&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 'KPP0B-VALUE(06)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP0' '1000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'KPP0B-VALUE(09)'.&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;Write imtgp-costelem to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'KPP0B-VALUE(09)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP0' '1000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'KPP0B-VALUE(04)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=CSPB'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP2' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'Z-BDC03(01)'.&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;Write imtgp-jan to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'Z-BDC03(01)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP2' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'Z-BDC03(02)'.&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;Write imtgp-feb to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'Z-BDC03(02)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP2' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'Z-BDC03(03)'.&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;Write imtgp-mar to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'Z-BDC03(03)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP2' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'Z-BDC03(04)'.&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;Write imtgp-apr to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'Z-BDC03(04)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP2' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'Z-BDC03(05)'.&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;Write imtgp-may to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'Z-BDC03(05)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP2' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'Z-BDC03(06)'.&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;Write imtgp-jun to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'Z-BDC03(06)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP2' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'Z-BDC03(07)'.&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;Write imtgp-jul to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'Z-BDC03(07)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP2' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'Z-BDC03(08)'.&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;Write imtgp-aug to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'Z-BDC03(08)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP2' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'Z-BDC03(09)'.&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;Write imtgp-sep to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'Z-BDC03(09)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP2' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'Z-BDC03(10)'.&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;Write imtgp-oct to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'Z-BDC03(10)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP2' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'Z-BDC03(11)'.&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;Write imtgp-nov to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'Z-BDC03(11)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP2' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'Z-BDC03(12)'.&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;Write imtgp-dec to fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'Z-BDC03(12)'&lt;/P&gt;&lt;P&gt;                              fieldval.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLKPP2' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'Z-BDC03(12)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=CBUC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_transaction using 'KP06'.&lt;/P&gt;&lt;P&gt;perform close_group.&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;form upload_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: filename type string.&lt;/P&gt;&lt;P&gt;clear idata.&lt;/P&gt;&lt;P&gt;refresh idata.&lt;/P&gt;&lt;P&gt;filename = p_file.&lt;/P&gt;&lt;P&gt;call function 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    exporting            filename        = filename&lt;/P&gt;&lt;P&gt;    filetype        = 'ASC'&lt;/P&gt;&lt;P&gt;    tables            data_tab        = idata&lt;/P&gt;&lt;P&gt;    exceptions            file_open_error = 1&lt;/P&gt;&lt;P&gt;    file_read_error = 2&lt;/P&gt;&lt;P&gt;    no_authority    = 6&lt;/P&gt;&lt;P&gt;    others          = 17.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    check sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    loop at idata.&lt;/P&gt;&lt;P&gt;    clear imtgp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    split idata at ',' into imtgp-costcent imtgp-costelem imtgp-fisyear&lt;/P&gt;&lt;P&gt;imtgp-jan imtgp-feb imtgp-mar imtgp-apr imtgp-may imtgp-jun imtgp-jul&lt;/P&gt;&lt;P&gt;imtgp-aug imtgp-sep imtgp-oct imtgp-nov imtgp-dec.&lt;/P&gt;&lt;P&gt;    append imtgp.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2005 17:57:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-error-message/m-p/1098369#M102826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-12T17:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to display error message ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-error-message/m-p/1098370#M102827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do something like this.  Here I have commented out your call to  PERFORM BDC_TRANSACTION.  It writes all of the messages for the transaction, so I didn't want that.  Here I'm calling the transaction directly, then check sy-subrc.  If 0, then it was successful, of not, then it failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


*    perform bdc_transaction using 'KP06'.

    call transaction 'KP06'  using bdcdata
                 mode   ctumode
                 update cupdate
                 messages into messtab.
    if sy-subrc = 0.

      write:/ 'Cost Center:', at 20 imtgp-costcent ,
            / 'Cost Element:', at 20 imtgp-costelem ,
            / 'Fiscal Year:', at 20 imtgp-fisyear,
            / 'Transaction Completed Successfully'.

    else.

      write:/ 'Cost Center:', at 20 imtgp-costcent ,
            / 'Cost Element:', at 20 imtgp-costelem ,
            / 'Fiscal Year:', at 20 imtgp-fisyear,
            / 'Transaction Failed'.

    endif.

&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>Mon, 12 Dec 2005 18:06:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-error-message/m-p/1098370#M102827</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-12-12T18:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to display error message ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-error-message/m-p/1098371#M102828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you create and run a batch input session, you won't be able to display the errors because the session is run in a separate process, generally after the program finishes. The errors are available for re-processing in the batch input log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to display messages in the program, you have to use the call transaction method, but since you can't process the errors using this method, batch input is generally used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2005 18:07:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-error-message/m-p/1098371#M102828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-12T18:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to display error message ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-error-message/m-p/1098372#M102829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check the below code,.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : t_bdcmsgcoll TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE.
 
  CALL TRANSACTION '&amp;lt;DELIVERYTRANSACTION&amp;gt;' USING t_bdctab
                          mode 'N'
                          MESSAGES INTO t_bdcmsgcoll.
 
  DESCRIBE TABLE t_bdcmsgcoll LINES g_lines.
  READ TABLE t_bdcmsgcoll INDEX g_lines.
 
  IF t_bdcmsgcoll-msgtyp = 'S' AND
     t_bdcmsgcoll-msgid = &amp;lt;Msg id&amp;gt; AND
     t_bdcmsgcoll-msgnr = &amp;lt;Msg number&amp;gt;.
* Trap your Call Transaction messages
    t_success-deliverynumber = t_bdcmsgcoll-msgv1.
* You can format the message returned by call transaction using function 'FORMAT_MESSAGE' which will return g_mesg
    t_success-message = g_mesg.
    APPEND t_success.
    CLEAR  t_success.
  ELSE.
* If there an Error-Do this..
    READ TABLE t_bdcmsgcoll WITH KEY msgtyp = 'E'.
    IF sy-subrc = 0.
* Format your message using FORMAT_MESSAGE "FM
     CLEAR g_mesg.
     t_error-msg   = g_mesg_incl.
     APPEND t_error.
     CLEAR  t_error.
   ENDIF.
 ENDIF.
 
* Clear for next run
  CLEAR: t_bdcmsgcoll,
         t_bdctab.
  REFRESH: t_bdcmsgcoll[],
           t_bdctab[].&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2005 18:08:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-error-message/m-p/1098372#M102829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-12T18:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to display error message ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-error-message/m-p/1098373#M102830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The message tab table messtab used in the call transaction will have all the success and failure messages for the BDc run. You can display the messages looping through the BDC message table messtab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2005 18:11:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-error-message/m-p/1098373#M102830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-12T18:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to display error message ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-error-message/m-p/1098374#M102831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rich. Your solution was crystal clear and worked fine !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to all others too for giving me useful tips on handling error messages.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2005 18:19:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-error-message/m-p/1098374#M102831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-12T18:19:10Z</dc:date>
    </item>
  </channel>
</rss>

