10-07-2008 11:19 AM
In a BDC ,
Is it feasible to capture the total number of sucess records
total number of failure records,total number of records
and the correspoding error info.
Is there any simple way to obtain the above desired results
Thanks in advance
10-07-2008 11:32 AM
Hi,
I you are using Session method you can use the log, if you are using Call transaction you can declare a structure of type BDCMSGCOL and move the error message in the structure.
e.g. Call transaction VA01.. .messages into IT_BDCMSGCOL. With the internal table you can then create a report.
Regards,
Prashant
Edited by: Prashant Kumar Upadhyay on Oct 7, 2008 12:32 PM
10-07-2008 11:32 AM
Hi,
I you are using Session method you can use the log, if you are using Call transaction you can declare a structure of type BDCMSGCOL and move the error message in the structure.
e.g. Call transaction VA01.. .messages into IT_BDCMSGCOL. With the internal table you can then create a report.
Regards,
Prashant
Edited by: Prashant Kumar Upadhyay on Oct 7, 2008 12:32 PM
10-07-2008 11:39 AM
hii
With the BDC u can capture the error message or success messages with this code:
data: i_msg type standard table of bdcmsgcoll with header line.
LOOP AT I_MSG.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = I_MSG-MSGID
LANG = SY-LANGU
NO = I_MSG-MSGNR
V1 = I_MSG-MSGV1
V2 = I_MSG-MSGV2
V3 = I_MSG-MSGV3
V4 = I_MSG-MSGV4
IMPORTING
MSG = W_STR
* 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:/ i_msg-msgnr,w_str.
endloop.
Regards,
Vishwa.
10-07-2008 1:44 PM
Hello,
After the FORMAT_MESSAGE FM is called, you can seggregate the Success & Failure Records with the Help of MSGTYP field. If it is 'E', then it is a Failure and populate the Table with Failure Records and Vice versa.
Thanks and Regards,
Venkat Phani Prasad Konduri