Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BDC For Customer Create

Former Member
0 Kudos

Hi All,

I have a BDC function module for customer create, and I'm getting back three items in the error table none of which has any textual description.

It looks like this:

sy-subrc = 1,001


TCODE                          XD01
DYNAME                         SAPMF02D
DYNUMB                         0130
MSGTYP                         S
MSGSPRA                        EN
MSGID                          00
MSGNR                          344
MSGV1                          SAPMF02D
MSGV2                          0130
MSGV3
MSGV4
ENV                            CTU
FLDNAME

Any idea how I can look up some more details about this error message?

Thanks!

Roman

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi

use FM

<b>format_message</b>

sample code


CALL FUNCTION 'FORMAT_MESSAGE'
      EXPORTING
        ID        = IT_MSG-MSGID
        LANG      = SY-LANGU
        NO        = IT_MSG-MSGNR
        V1        = IT_MSG-MSGV1
        V2        = IT_MSG-MSGV2
        V3        = IT_MSG-MSGV3
        V4        = IT_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.

<b>plz reward helpful posts</b>

regards

ganesh

4 REPLIES 4

Former Member
0 Kudos

hi

use FM

<b>format_message</b>

sample code


CALL FUNCTION 'FORMAT_MESSAGE'
      EXPORTING
        ID        = IT_MSG-MSGID
        LANG      = SY-LANGU
        NO        = IT_MSG-MSGNR
        V1        = IT_MSG-MSGV1
        V2        = IT_MSG-MSGV2
        V3        = IT_MSG-MSGV3
        V4        = IT_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.

<b>plz reward helpful posts</b>

regards

ganesh

0 Kudos

Thanks all for such fast responses!

I found the error (missing a screen) thanks to the FORMAT_MESSAGE tool.

Roman D.

former_member181962
Active Contributor
0 Kudos

Hi Roman,

Use the function module 'FORMAT_MESSAGE' and pass these variables to it.

It will retrun a proper text for the message.

Usage:

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

ID = i_return-id

LANG = sy-langu

NO = i_return-number

V1 = i_return-MESSAGE_V1

V2 = i_return-MESSAGE_V2

V3 = i_return-MESSAGE_V3

V4 = i_return-MESSAGE_V4

IMPORTING

MSG = l_message

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2

.

check sy-subrc = 0.

write: / l_message.

Regards,

Ravi

Former Member
0 Kudos

Roman,

Message number 1001 comes in a BDC when a screen is missing in the BDCDATA table and it is encountering that when running the transaction.

You can find the details of the message in T100 table.

Regards,

Ravi

Note : Please mark the helpful answers