<?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 hi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3050987#M722311</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; pls help me how to handle error handling in session and call transaction method?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Nov 2007 06:35:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-24T06:35:55Z</dc:date>
    <item>
      <title>hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3050987#M722311</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; pls help me how to handle error handling in session and call transaction method?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Nov 2007 06:35:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3050987#M722311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-24T06:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3050988#M722312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For session you can use the Session Log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the call transaction you can use the MESSAGES INTO MESS_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL TRANSACTION 'MM01' USING BDCDATA MESSAGES INTO MESS_TAB.

READ TABLE MESS_tAB WITH MSGID = 'XX'  " &amp;lt;&amp;lt; MESSAGE ID FOR SUCCFUL GENERATED MESSAGE
MSGNR = '123'.  " &amp;lt;&amp;lt; NUMBER
IF SY-SUBRC = 0.
* DOCUMENT WAS CREATED SUCCESSFULLY
ELSE.
* ERROR 
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Nov 2007 06:40:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3050988#M722312</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-24T06:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3050989#M722313</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;    please check out this eg. code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;****/ data declaration
DATA : IT_T100 LIKE T100 OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF IMSG  OCCURS 0.
        INCLUDE STRUCTURE  BDCMSGCOLL.
DATA : END OF IMSG .

DATA : PTF_FILENAME TYPE STRING,
       U_MODE(1),
       L_MSTRING TYPE STRING.

****/ calling transaction with messages.
    CALL TRANSACTION  'MD61' USING  BDCTAB
                              MODE  U_MODE
                            UPDATE  C_UPDATE
                          MESSAGES  INTO IMSG.
    PERFORM ALL_MESSAGES .

*****/ form of above perform...
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  ALL_MESSAGES
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM ALL_MESSAGES .
  LOOP AT IMSG.
    SELECT SINGLE * FROM T100 INTO IT_T100
                             WHERE SPRSL = IMSG-MSGSPRA
                               AND ARBGB = IMSG-MSGID
                               AND MSGNR = IMSG-MSGNR.
    IF SY-SUBRC IS INITIAL.
      L_MSTRING = IT_T100-TEXT.
      IF L_MSTRING CS '&amp;amp;1'.
        REPLACE '&amp;amp;1' WITH IMSG-MSGV1 INTO L_MSTRING.
        REPLACE '&amp;amp;2' WITH IMSG-MSGV2 INTO L_MSTRING.
        REPLACE '&amp;amp;3' WITH IMSG-MSGV3 INTO L_MSTRING.
        REPLACE '&amp;amp;4' WITH IMSG-MSGV4 INTO L_MSTRING.
      ELSE.
        REPLACE '&amp;amp;' WITH IMSG-MSGV1 INTO L_MSTRING.
        REPLACE '&amp;amp;' WITH IMSG-MSGV2 INTO L_MSTRING.
        REPLACE '&amp;amp;' WITH IMSG-MSGV3 INTO L_MSTRING.
        REPLACE '&amp;amp;' WITH IMSG-MSGV4 INTO L_MSTRING.
      ENDIF.
      CONDENSE L_MSTRING.
      WRITE : /5 IMSG-MSGTYP,  L_MSTRING .
    ELSE.
      WRITE : /5 IMSG.
    ENDIF.
  ENDLOOP.
ENDFORM.                    " ALL_MESSAGES&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code will help you to handle the messages/errors...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rewards Points.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAGUN DESAI...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Nov 2007 12:23:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3050989#M722313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-24T12:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3050990#M722314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lakshmi,&lt;/P&gt;&lt;P&gt;In session method the process log is automatically created in sm35, when we process the session. Analyse the log see the transaction what are all have errors. correct those and process the session again. &lt;/P&gt;&lt;P&gt;In call transaction method we have to explicitly handle the errors. for error handling declare an internal table it_messages like bdcmsgcoll.use the extension messages in to it_messages in the call transaction. The call transaction statement will return sy-subrc. If sy-subrc &amp;lt;&amp;gt; 0,  then that transaction is errored transaction. After the call transaction check the sy-subrc. If sy-subrc &amp;lt;&amp;gt; 0.  call function format_message. This function is called to store the message given by system and to display it along with the record. Append it to the internal table. display the record and message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Nov 2007 17:50:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3050990#M722314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-24T17:50:53Z</dc:date>
    </item>
  </channel>
</rss>

