Skip to Content
author's profile photo Former Member
Former Member

Problem in BDC: Catching error messages (Urgent)

Hello Experts,

I want to catch the error message coming in the form of popup using Call Transaction in background mode.

I have used the following statement.

CALL TRANSACTION 'FBZ5' USING bdcdata MODE 'N' messages into bdcmsg.

But this statement catches only the messages which are displayed in the task bar. It doesn't catch the error message in the form of popup.

Please suggest any solution to this.

Thanks.

Radhika

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Nov 20, 2007 at 09:38 AM

    Hi,

    Use The FM: FORMAT_MESSAGE

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2007 at 10:08 AM

    Hi Radhika ,

    try this one,

    DATA : BDCMSGCOLL TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE,

    BDCDATA TYPE TABLE OF BDCDATA WITH HEADER LINE.

    <b>CALL TRANSACTION 'MM01' USING BDCDATA MODE N UPDATE S MESSAGES INTO BDCMSGCOLL.</b>

    IF SY-SUBRC <> 0.

    PERFORM ERR.

    CLEAR I_MSG.

    REFRESH I_MSG.

    ENDIF.

    &----


    *& Form ERR

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    form ERR .

    DATA V_MSG(255) TYPE C.

    READ TABLE I_MSG WITH KEY MSGTYP = 'E'.

    IF SY-SUBRC = 0.

    CALL FUNCTION 'FORMAT_MESSAGE'

    EXPORTING

    ID = I_MSG-MSGID

    LANG = 'E'

    NO = I_MSG-MSGNR

    V1 = I_MSG-MSGV1

    V2 = I_MSG-MSGV2

    V3 = I_MSG-MSGV3

    V4 = I_MSG-MSGV4

    IMPORTING

    MSG = V_MSG

    • EXCEPTIONS

    • NOT_FOUND = 1

    • OTHERS = 2

    .

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    WRITE V_MSG. " Error Message Displayed Here.

    CLEAR V_MSG.

    ENDIF.

    endform. " ERR

    Regards,

    Vijay.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2007 at 10:15 AM

    Radhika,

    The messages which are populating in the POP, are information messages. As per your coding, it should pick all the messages, irrespective of error on Task bar, as well as Pop Window. First, try with changing the mode to A. Debug and check the errors. All the errors will be captured in Structure, BDCmsg. Check while debugging. <b>Instead of BDCMSG, use an internal table</b>.......It will capture all the Errors........

    <b>DATA: Begin of tbl_bdcmsg occurs0.

    include struture bdcmsgcoll.

    DATA:End of tbl_bdcmsg.

    CALL TRANSACTION 'FBZ5' USING bdcdata MODE 'N' messages into tbl_bdcmsg.

    </b>

    Thanks

    Manju

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2007 at 10:26 AM

    Hi,

    Warning and information messages are automatically ignored in BDC.

    so u cant catch that into int table

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.