10-06-2008 4:31 AM
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
10-06-2008 4:33 AM
hi,
using bdcmsgcoll structure collect the error records,
and from that u can once again execute the program
10-06-2008 4:41 AM
10-06-2008 4:41 AM
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!!