<?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 create error session in bdc call transaction method. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-error-session-in-bdc-call-transaction-method/m-p/1649215#M288613</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;In call transaction you can see the error by using message_text_build function module.&lt;/P&gt;&lt;P&gt;DATA: W_TEXTOUT LIKE T100-TEXT.&lt;/P&gt;&lt;P&gt;DATA : T_BDCDATA TYPE BDCDATA OCCURS 0 WITH HEADER LINE.  DATA:  T_MESSTAB TYPE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSACTION "VA01' USING T_BDCDATA MODE   'N'&lt;/P&gt;&lt;P&gt;                                           UPDATE 'S'&lt;/P&gt;&lt;P&gt;                                           MESSAGES INTO T_MESSTAB.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT T_MESSTAB.&lt;/P&gt;&lt;P&gt;    CLEAR T_ERROR.&lt;/P&gt;&lt;P&gt;    IF T_MESSTAB-MSGTYP = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'MESSAGE_TEXT_BUILD'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          MSGID               = T_MESSTAB-MSGID&lt;/P&gt;&lt;P&gt;          MSGNR               = T_MESSTAB-MSGNR&lt;/P&gt;&lt;P&gt;          MSGV1               = T_MESSTAB-MSGV1&lt;/P&gt;&lt;P&gt;          MSGV2               = T_MESSTAB-MSGV2&lt;/P&gt;&lt;P&gt;          MSGV3               = T_MESSTAB-MSGV3&lt;/P&gt;&lt;P&gt;          MSGV4               = T_MESSTAB-MSGV4&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          MESSAGE_TEXT_OUTPUT = W_TEXTOUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        MOVE : T_MAIN-PERNR TO T_ERROR-PERNR,&lt;/P&gt;&lt;P&gt;               T_MAIN-AMOUNT TO T_ERROR-AMOUNT,&lt;/P&gt;&lt;P&gt;               T_MAIN-W_TYPE TO T_ERROR-W_TYPE,&lt;/P&gt;&lt;P&gt;               W_TEXTOUT TO T_ERROR-ERROR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        APPEND T_ERROR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CLEAR  T_ERROR.&lt;/P&gt;&lt;P&gt;        DELETE T_MAIN.&lt;/P&gt;&lt;P&gt;        DELETE T_MESSTAB.&lt;/P&gt;&lt;P&gt;        G_ERRCOUNT = G_ERRCOUNT + 1.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Nov 2006 06:11:11 GMT</pubDate>
    <dc:creator>jayanthi_jayaraman</dc:creator>
    <dc:date>2006-11-27T06:11:11Z</dc:date>
    <item>
      <title>how to create error session in bdc call transaction method.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-error-session-in-bdc-call-transaction-method/m-p/1649214#M288612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;i have to update or create some table fields of a table depending upon the selection criteria.&lt;/P&gt;&lt;P&gt;now, if there is any error in updating or creating the record i have to generate an error session.&lt;/P&gt;&lt;P&gt;in the report output i have to display all the records which could not get updated or created.&lt;/P&gt;&lt;P&gt;i have to use bdc call transaction method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;shweta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2006 06:04:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-error-session-in-bdc-call-transaction-method/m-p/1649214#M288612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-27T06:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to create error session in bdc call transaction method.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-error-session-in-bdc-call-transaction-method/m-p/1649215#M288613</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;In call transaction you can see the error by using message_text_build function module.&lt;/P&gt;&lt;P&gt;DATA: W_TEXTOUT LIKE T100-TEXT.&lt;/P&gt;&lt;P&gt;DATA : T_BDCDATA TYPE BDCDATA OCCURS 0 WITH HEADER LINE.  DATA:  T_MESSTAB TYPE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSACTION "VA01' USING T_BDCDATA MODE   'N'&lt;/P&gt;&lt;P&gt;                                           UPDATE 'S'&lt;/P&gt;&lt;P&gt;                                           MESSAGES INTO T_MESSTAB.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT T_MESSTAB.&lt;/P&gt;&lt;P&gt;    CLEAR T_ERROR.&lt;/P&gt;&lt;P&gt;    IF T_MESSTAB-MSGTYP = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'MESSAGE_TEXT_BUILD'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          MSGID               = T_MESSTAB-MSGID&lt;/P&gt;&lt;P&gt;          MSGNR               = T_MESSTAB-MSGNR&lt;/P&gt;&lt;P&gt;          MSGV1               = T_MESSTAB-MSGV1&lt;/P&gt;&lt;P&gt;          MSGV2               = T_MESSTAB-MSGV2&lt;/P&gt;&lt;P&gt;          MSGV3               = T_MESSTAB-MSGV3&lt;/P&gt;&lt;P&gt;          MSGV4               = T_MESSTAB-MSGV4&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          MESSAGE_TEXT_OUTPUT = W_TEXTOUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        MOVE : T_MAIN-PERNR TO T_ERROR-PERNR,&lt;/P&gt;&lt;P&gt;               T_MAIN-AMOUNT TO T_ERROR-AMOUNT,&lt;/P&gt;&lt;P&gt;               T_MAIN-W_TYPE TO T_ERROR-W_TYPE,&lt;/P&gt;&lt;P&gt;               W_TEXTOUT TO T_ERROR-ERROR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        APPEND T_ERROR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CLEAR  T_ERROR.&lt;/P&gt;&lt;P&gt;        DELETE T_MAIN.&lt;/P&gt;&lt;P&gt;        DELETE T_MESSTAB.&lt;/P&gt;&lt;P&gt;        G_ERRCOUNT = G_ERRCOUNT + 1.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2006 06:11:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-error-session-in-bdc-call-transaction-method/m-p/1649215#M288613</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2006-11-27T06:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to create error session in bdc call transaction method.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-error-session-in-bdc-call-transaction-method/m-p/1649216#M288614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shweta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through this link and u can find enough info with specimen code for generating error report in BDC:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f562eb90-0201-0010-5ba8-ecdce4de4132" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f562eb90-0201-0010-5ba8-ecdce4de4132&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2006 09:04:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-error-session-in-bdc-call-transaction-method/m-p/1649216#M288614</guid>
      <dc:creator>Sandeep_Panghal</dc:creator>
      <dc:date>2006-11-27T09:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to create error session in bdc call transaction method.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-error-session-in-bdc-call-transaction-method/m-p/1649217#M288615</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;after you write ur call transaction statment check for sy-subrc. coz CTU returns sy-subrc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hence &lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;if p_flag = '  '.&lt;/P&gt;&lt;P&gt;bdc_open_group.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_flag = 'X'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;bdc_insert.&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;endif.&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;if p_flag = 'X'.&lt;/P&gt;&lt;P&gt;bdc_close_group.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_flag is to make sure u create only one session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2006 09:09:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-error-session-in-bdc-call-transaction-method/m-p/1649217#M288615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-27T09:09:30Z</dc:date>
    </item>
  </channel>
</rss>

