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: 

hi friends Question on BDC

Former Member
0 Kudos

Hi friends

In BDC, if out of 10 records, 7 are successful and there are 3 records with some missing fields, how will you modify those fields?

Thanks in advance,

Sharada

3 REPLIES 3

Former Member
0 Kudos

hi,

using bdcmsgcoll structure collect the error records,

and from that u can once again execute the program

0 Kudos

Thank You.

Former Member
0 Kudos

Hi Sharada,

Hearty welcome to SCN.

Collect your Messages using FORMAT_MESSAGE function.

DATA: G_MESSAGE(70) TYPE C,

BDCDATA TYPE BDCDATA,

W_BDCMSG TYPE BDCMSGCOLL.

READ TABLE IT_BDCMSGCOLL INTO W_BDCMSG INDEX 1.

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

ID = SY-MSGID

LANG = '-D'(001)

NO = SY-MSGNO

V1 = SY-MSGV1

V2 = SY-MSGV2

V3 = SY-MSGV3

V4 = SY-MSGV4

IMPORTING

MSG = G_MESSAGE

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2

.

IF SY-SUBRC = 0.

ENDIF.

ENDLOOP.

ENDFORM.

This is how you have to collect your messages.

Cheers!!