<?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: Regd: BDCMSGCOLL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regd-bdcmsgcoll/m-p/1200676#M130956</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;loop at it_msg where msgtyp = 'E'.

"use format_message FM.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jan 2006 07:04:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-01-18T07:04:27Z</dc:date>
    <item>
      <title>Regd: BDCMSGCOLL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regd-bdcmsgcoll/m-p/1200675#M130955</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;Can any1 giv me a sample code of how to use the BDCMSGCOLL Internal Table and to capture the errors into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ramesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2006 07:00:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regd-bdcmsgcoll/m-p/1200675#M130955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-18T07:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Regd: BDCMSGCOLL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regd-bdcmsgcoll/m-p/1200676#M130956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;loop at it_msg where msgtyp = 'E'.

"use format_message FM.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2006 07:04:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regd-bdcmsgcoll/m-p/1200676#M130956</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-18T07:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Regd: BDCMSGCOLL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regd-bdcmsgcoll/m-p/1200677#M130957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Look at the sample code........&lt;/P&gt;&lt;P&gt;*******************&lt;/P&gt;&lt;P&gt;DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      l_errtxt(80) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        call transaction 'ZDMR01' using bdcdata&lt;/P&gt;&lt;P&gt;                              mode  w_mode&lt;/P&gt;&lt;P&gt;                             update 'S'&lt;/P&gt;&lt;P&gt;                           messages into it_bdcmsgcoll.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;          succ_it-pernr = pitab-pernr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       write icon_green_light to succ_it-light.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          succ_it-type = text-h05.&lt;/P&gt;&lt;P&gt;          succ_it-msg = text-h04.&lt;/P&gt;&lt;P&gt;          append succ_it.&lt;/P&gt;&lt;P&gt;        else.&lt;/P&gt;&lt;P&gt;          succ_it-pernr = pitab-pernr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       write icon_red_light to succ_it-light.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          succ_it-type = text-h05.&lt;/P&gt;&lt;P&gt;          loop at it_bdcmsgcoll .&lt;/P&gt;&lt;P&gt;            message id it_bdcmsgcoll-msgid type it_bdcmsgcoll-msgtyp&lt;/P&gt;&lt;P&gt;                    number it_bdcmsgcoll-msgnr&lt;/P&gt;&lt;P&gt;             into l_errtxt with it_bdcmsgcoll-msgv1 it_bdcmsgcoll-msgv2&lt;/P&gt;&lt;P&gt;                                it_bdcmsgcoll-msgv3 it_bdcmsgcoll-msgv4.&lt;/P&gt;&lt;P&gt;            succ_it-msg = l_errtxt.&lt;/P&gt;&lt;P&gt;            succ_it-msgtyp = it_bdcmsgcoll-msgtyp.&lt;/P&gt;&lt;P&gt;            append succ_it.&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;Here in the call trans all the msh will be into internal table.&lt;/P&gt;&lt;P&gt;And later we r processing it and capturing the error log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;If this helps you reward with points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2006 07:05:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regd-bdcmsgcoll/m-p/1200677#M130957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-18T07:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Regd: BDCMSGCOLL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regd-bdcmsgcoll/m-p/1200678#M130958</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;so pls. analyze the error message with...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: itab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
CALL TRANSACTION tcode USING bdcdata MODE mod MESSAGES INTO itab.

*get text to bdc-message
if sy-subrc &amp;lt;&amp;gt; 0.
...
  LOOP AT itab WHERE msgtyp = 'E'.
*fill errtab
    CLEAR errtab.
    MOVE p_kunnr TO errtab-kunnr.
    MOVE p_bukrs TO errtab-bukrs.
    MOVE p_kde   TO errtab-kde.
    MOVE p_bkz   TO errtab-bkz.
*
    MOVE itab-msgnr TO errtab-msgnr.
    MOVE itab-msgid TO errtab-msgid.
    MOVE itab-fldname TO  errtab-fieldn.
*fill protocol
    CLEAR prot.
    MOVE-CORRESPONDING itab TO prot.
    MOVE-CORRESPONDING errtab  TO prot.
    MOVE itab-fldname TO prot-feld.

    SELECT SINGLE text FROM  t100 INTO prot-text
           WHERE  sprsl  = sy-langu
           AND    arbgb  = prot-msgid
           AND    msgnr  = prot-msgnr.

    CALL FUNCTION 'TB_MESSAGE_BUILD_TEXT'
         EXPORTING
              langu = sy-langu
              msgid = itab-msgid
              msgno = prot-msgnr
              msgv1 = prot-msgv1
              msgv2 = prot-msgv2
              msgv3 = prot-msgv3
              msgv4 = prot-msgv4
         IMPORTING
              text  = prot-text.

    APPEND prot.

  ENDLOOP.
...
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2006 07:06:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regd-bdcmsgcoll/m-p/1200678#M130958</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-01-18T07:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regd: BDCMSGCOLL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regd-bdcmsgcoll/m-p/1200679#M130959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;DATA BEGIN OF message OCCURS 10.
INCLUDE STRUCTURE BDCMSGCOLL.
DATA END OF message.

CALL TRANSACTION 'MM01' USING BDCDATA MODE 'N'
MESSAGES INTO MESSage.

loop at it_msg where msgtyp = 'E'.
"use format_message FM.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2006 07:09:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regd-bdcmsgcoll/m-p/1200679#M130959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-18T07:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Regd: BDCMSGCOLL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regd-bdcmsgcoll/m-p/1200680#M130960</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;Here is the sample code.Kindly reward points by clikcing the star on the left of reply,if it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : T_BDCDATA TYPE BDCDATA OCCURS 0 WITH HEADER LINE,  &lt;/P&gt;&lt;P&gt;  T_MESSTAB TYPE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF T_ERROR OCCURS 0,&lt;/P&gt;&lt;P&gt;      PERNR TYPE P0000-PERNR,"prog. specific&lt;/P&gt;&lt;P&gt;      SPACE(2) TYPE C,&lt;/P&gt;&lt;P&gt;      W_TYPE(4) TYPE C,&lt;/P&gt;&lt;P&gt;      AMOUNT(15) TYPE C,,"prog. specific&lt;/P&gt;&lt;P&gt;      ERROR(73) TYPE C,&lt;/P&gt;&lt;P&gt;      END OF T_ERROR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH T_MESSTAB.CLEAR T_MESSTAB.&lt;/P&gt;&lt;P&gt;  REFRESH T_BDCDATA.CLEAR T_BDCDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...do coding here to perform BDC.&lt;/P&gt;&lt;P&gt;  CALL TRANSACTION TCODE USING T_BDCDATA MODE  'N'&lt;/P&gt;&lt;P&gt;                                     UPDATE 'L'&lt;/P&gt;&lt;P&gt;                                MESSAGES INTO T_MESSTAB.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    PERFORM SUB_MSGTAB.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM SUB_MSGTAB .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: W_TEXTOUT LIKE T100-TEXT.&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;"prog. specific&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;ENDFORM.                    " SUB_MSGTAB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2006 07:15:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regd-bdcmsgcoll/m-p/1200680#M130960</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2006-01-18T07:15:41Z</dc:date>
    </item>
  </channel>
</rss>

