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 in Background mode

Former Member
0 Likes
2,122

Hi

After running a BDC program in background, next day morning when you see the results, few records

are not updated(error records). So at that what we do to update the remaining error records.

Waiting for reply...

Regards.

Hi

After running a BDC program in background, next day morning when you see the results, few records

are not updated(error records). So at that what we do to update the remaining error records.

Waiting for reply...

Regards.

5 REPLIES 5
Read only

Former Member
0 Likes
1,081

remove the created records from file and coreect the error records and create a new file and upload it again.

Read only

Former Member
0 Likes
1,081

Hi,

Go to SM35 and check the log for the reason to findout the errors. And correct the values and upload it again.

Venkat

Read only

abdul_hakim
Active Contributor
0 Likes
1,081

hi

you can check the reason for failure in the session log.

once you have fixed the error you can process only the errored records.

Cheers,

Hakim

Read only

former_member206396
Active Participant
0 Likes
1,081

Sami,

its based on the procedure you have used ( you didn't mention the same)

either call trasaction or session method.

if u used session method:

u can find the error log in the session log, and u need to separate the error records from actual file manually.

if its call transaction

use the sample code :

call transaction 'XYZ' using bdcdata update 'S' mode 'N' messages into messtab.

if sy-subrc <> 0.

  • separate the error records

  • create a error itab, which is same stracture of your acutal itab.

  • append the workarea to error itab.

endif.

hope this helps.

Regards

Ram

Read only

Former Member
0 Likes
1,081

Hi,

I am also using BDC Uploads in background mode. I move the error records to separate internal table based on MSTYP in call transaction method. After execution of Recording ,that internal table has set of error records .I will get a file path from the variant saved and upload in error records in tat file path in application server . So they Can Know which records are not created.Some Sample code for moving errors.

CALL TRANSACTION 'VK11' USING it_BDCDATA MODE 'N'

MESSAGES INTO IT_MESSTAB1.

loop at IT_MESSTAB1 INTO WA_MESSTAB1 .

WA_MESSTAB-MSGTYP = WA_MESSTAB1-MSGTYP .

WA_MESSTAB-SPRAS = WA_MESSTAB1-MSGSPRA .

WA_MESSTAB-MES_ID = WA_MESSTAB1-MSGID .

WA_MESSTAB-MES_NO = WA_MESSTAB1-MSGNR .

WA_MESSTAB-MSGV1 = WA_MESSTAB1-MSGV1 .

WA_MESSTAB-MSGV2 = WA_MESSTAB1-MSGV2 .

WA_MESSTAB-MSGV3 = WA_MESSTAB1-MSGV3 .

WA_MESSTAB-MSGV4 = WA_MESSTAB1-MSGV4 .

WA_MESSTAB-e_rec1 = WA_head1-vtweg .

WA_MESSTAB-e_rec2 = WA_head1-werks .

APPEND WA_MESSTAB TO IT_MESSTAB.

endloop.

CLEAR: WA_MESSTAB, WA_MESSTAB1,idx.

REFRESH IT_MESSTAB1.

REFRESH IT_BDCDATA.

IDX = 01.

ENDLOOP.

Regards,

Manesh.R