Skip to Content
author's profile photo
Former Member

errors in BDC

Hi,

what are the errors we get normally while working with BDC. how do we handle them.

regards,

vijay.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • author's profile photo
    Former Member
    Sep 29, 2005 at 03:30 PM

    Vijay,

    If you are using call transaction method, you generally catch errors in BDCMSGCOLL structure.

    In session method an error log will be created.

    Thanks,

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 29, 2005 at 03:35 PM

    Hi naren,

    thank's for your reply. what you said i know already. what i want is what error messages we get and how solve those errors.

    regards,

    vijay.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      How can you know the problem before bdc is run?

      You can run bdc by transaction and, if it fails, create a session.

      So see the BDC by SM35 and solve the errors.

      Max

  • author's profile photo
    Former Member
    Sep 29, 2005 at 03:56 PM

    BDC errors are similar to what you get in online transaction. Suppose you enter an invalid material number in online ME21N ( create Po ) system will throw an error and you have to correct it by chnaging a valid material number . Same error you can get in BDC as well. It is very difficult to generalize types of error as errors will depend on the transacation you are doing.

    However some of the common BDC errors are ( Data for Screen Not Found, Field Not available in Screen ). These again are transaction specific and you have to analyze it by calling the transacion in display ALL mode.

    Cheers.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 29, 2005 at 04:11 PM

    Hi vijay,

    The errors you get depends upon the transaction you are

    running.

    <b> This is how you handle:</b>

    Let's consider you are recording for the transction CJ40

    (Messages table declaration )

    DATA :BEGIN of t_msg occurs 0.

    include structure BDCMSGCOLL.

    DATA END of t_msg.

    <b>Handling it :</b>

    <b>CALL TRANSACTION 'CJ40' using T_BDCDATA MODE 'N' UPDATE 'S' MESSAGES INTO t_msg</b>.

    commit work.

    If you want to display the errors in the screen you can use a function module named <b>'RPY_MESSAGE_COMPOSE'</b>

    This gives you the corresponding message for the message number that you input.

    Below is the <b>sample code</b>

    Loop at t_msg. " Messages internal table

    w_msgid = t_msg-msgid.

    w_msgno = t_msg-msgnr.

    w_msgv1 = t_msg-msgv1.

    w_msgv2 = t_msg-msgv2.

    w_msgv3 = t_msg-msgv3.

    w_msgv4 = t_msg-msgv4.

    CALL FUNCTION 'RPY_MESSAGE_COMPOSE'

    EXPORTING

    LANGUAGE = SY-LANGU

    MESSAGE_ID = w_msgid

    MESSAGE_NUMBER = w_msgno

    MESSAGE_VAR1 = w_msgv1

    MESSAGE_VAR2 = w_msgv2

    MESSAGE_VAR3 = w_msgv3

    MESSAGE_VAR4 = w_msgv4

    IMPORTING

    MESSAGE_TEXT = t_text-text.

    • TABLES

    • LONGTEXT =

    • EXCEPTIONS

    • MESSAGE_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.

    <b>MESSAGE_TEXT</b> contains the message.

    Please reward points if this explanation useful.

    Regards,

    Siva

    Add comment
    10|10000 characters needed characters exceeded