Application Development and Automation 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: 
Read only

BDC for MC62

Former Member
0 Likes
689

Hi All,

We have a requirement for mass updation of infostructure. This is done using MC62 transaction. The data to be uploaded is available in a file which has more than 500,000 records in the file.

We have developed a BDC program to do the updation. But while executing the program in background, some the records are skipped randomly without giving any error message resulting in non updation or incorrect updation of subsequent records also.

Any inputs to solve this will be helpful.

Kindly Help.

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
581

Hi,

You can use a Structure to trace the Error Messages Using Call Transaction Method.

STRUCTURE: BDCMSGCOLL

FM : FORMAT_MESSAGE.

Example To Fetch Error Messages in BDC::

LOOP AT t_message INTO fs_bdcmsgcoll.(T_message is a type of bdcmsgcoll)

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

id = fs_bdcmsgcoll-msgid

lang = sy-langu

no = fs_bdcmsgcoll-msgnr

v1 = fs_bdcmsgcoll-msgv1

v2 = fs_bdcmsgcoll-msgv2

v3 = fs_bdcmsgcoll-msgv3

v4 = fs_bdcmsgcoll-msgv4

IMPORTING

msg = w_message

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.

ELSE.

WRITE:/ w_message.

endif.

endloop.

Regds,

Anil

Hi All,

We have a requirement for mass updation of infostructure. This is done using MC62 transaction. The data to be uploaded is available in a file which has more than 500,000 records in the file.

We have developed a BDC program to do the updation. But while executing the program in background, some the records are skipped randomly without giving any error message resulting in non updation or incorrect updation of subsequent records also.

Any inputs to solve this will be helpful.

Kindly Help.

Regards

3 REPLIES 3
Read only

Former Member
0 Likes
582

Hi,

You can use a Structure to trace the Error Messages Using Call Transaction Method.

STRUCTURE: BDCMSGCOLL

FM : FORMAT_MESSAGE.

Example To Fetch Error Messages in BDC::

LOOP AT t_message INTO fs_bdcmsgcoll.(T_message is a type of bdcmsgcoll)

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

id = fs_bdcmsgcoll-msgid

lang = sy-langu

no = fs_bdcmsgcoll-msgnr

v1 = fs_bdcmsgcoll-msgv1

v2 = fs_bdcmsgcoll-msgv2

v3 = fs_bdcmsgcoll-msgv3

v4 = fs_bdcmsgcoll-msgv4

IMPORTING

msg = w_message

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.

ELSE.

WRITE:/ w_message.

endif.

endloop.

Regds,

Anil

Read only

0 Likes
581

Hi,

Even if the records in the flat file is correct without any error, the BDC is not uploading correct records.

This is happening for the records randomly.

For eg: If 1000th record creates a problem in first BDC run, it will work properly in the second run however 1500th record may give a problem in the second run.

Also for 5000 records the BDC is working fine without any problem.

Read only

Former Member
0 Likes
581

Hi Arun,

When a bdc is used to upload huge data, as u want to upload...in background mode it normally gives such problem,

Its not because of any errors...

but because, there no enough time between 2 uploads...so when 1 record is getting updated, the another one starts,

so by the time 1 record is in process, another one piles up...and finally at some point of time it skips few records.

which u have encountered.

this happens if the mode is asynchronous...

so try making teh mode synchronous and put a commit work statement and wait statement.

so that each record will get saved and wait for few milliseconds, before updating next record.

Please try doing this...hope this helps u

Regards,

Radhika