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 - Number of records

former_member188594
Active Participant
0 Kudos
495

Hi Peers,

I am using call transaction method. After executing the program and data is uploaded, i want to display i) number of records processed ii) no., of error records iii) no., of success records on the same screen. So where do i capture this no., of records field. Any help is appreciated. Thank you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
388

Every time you call the transaction, check the messages. If the call was successful, add 1 to the success counter; otherwise add 1 to the failed counter. At the end, display both.

Rob

5 REPLIES 5
Read only

Former Member
0 Kudos
389

Every time you call the transaction, check the messages. If the call was successful, add 1 to the success counter; otherwise add 1 to the failed counter. At the end, display both.

Rob

Read only

Former Member
0 Kudos
388

After Call transaction, check the sy-subrc value or check the message type in the bdc message table.

If it is a success increase the success counter with 1 otherwise increase the error counter.

Read only

former_member156446
Active Contributor
0 Kudos
388

Hi csr

Using describe statement you can get the number of records in a table.

set a counter for error records.

total - errors = success records.

Read only

0 Kudos
388

Hi Jay,

Could you please provide me with some sample code......thank you.

Read only

0 Kudos
388

Hi CSR


data: lv_error type i,
        lv_count type i,
        lv_succ type i.

loop at itab.
code....
....
...


"increment error variable when ever you have a error...
lv_error = lv_error + 1.
endloop.

describe TABLE itab LINES lv_count.
lv_succ = lv_count - lv_error.

write:/ 'total number of records:' , lv_count.
write:/' Number of errors :',lv_error.
write:. ' procdes records: ' , lv_succ.

Award points if helpful