Application Development 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: 

BDC Program

Former Member
0 Kudos

Hi I have a BDc program which has 3 records in that file i.e header , detail , trailer. the text file will be sending to update the data every week. In the Detail record there are some fields where i need to do the calculations and make sure the totals are in the trailer are correct or not. for example in Check count against Total number of Detail records received on file, If not matched issue warning message Like that there is one more calculation i.e Check total against Total dollars received on file, If not matched, issue a warning message.

My question would be how to do the calculation that total no.of records from detail is equal to trailer record count and total no. of dollar amount from detail record is equal to the trailer record if not i should show message. i need a code or psuedocode how to do it.

for example

detail record

1 2.00

2 3.00

3 3.00

4 2.00

5 1.00

Trailer record

5 $11:00

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi I have a BDc program which has 3 records in that file i.e header , detail , trailer. the text file will be sending to update the data every week. In the Detail record there are some fields where i need to do the calculations and make sure the totals are in the trailer are correct or not. for example in Check count against Total number of Detail records received on file, If not matched issue warning message Like that there is one more calculation i.e Check total against Total dollars received on file, If not matched, issue a warning message.

My question would be how to do the calculation that total no.of records from detail is equal to trailer record count and total no. of dollar amount from detail record is equal to the trailer record if not i should show message. i need a code or psuedocode how to do it.

for example

detail record

1 2.00

2 3.00

3 3.00

4 2.00

5 1.00

Trailer record

5 $11:00

Using control break statments u can get total of detail records

loop at detail record...

at last.

sum.

endat.

endloop.

now comapre and issue a message.

2 REPLIES 2

Former Member
0 Kudos

Hi I have a BDc program which has 3 records in that file i.e header , detail , trailer. the text file will be sending to update the data every week. In the Detail record there are some fields where i need to do the calculations and make sure the totals are in the trailer are correct or not. for example in Check count against Total number of Detail records received on file, If not matched issue warning message Like that there is one more calculation i.e Check total against Total dollars received on file, If not matched, issue a warning message.

My question would be how to do the calculation that total no.of records from detail is equal to trailer record count and total no. of dollar amount from detail record is equal to the trailer record if not i should show message. i need a code or psuedocode how to do it.

for example

detail record

1 2.00

2 3.00

3 3.00

4 2.00

5 1.00

Trailer record

5 $11:00

Using control break statments u can get total of detail records

loop at detail record...

at last.

sum.

endat.

endloop.

now comapre and issue a message.

0 Kudos

Hi Thanks for the answer.

actually in the detail table there are couple of fields like dollar amount, record count.

But in the trailer record there are total no.of amount , total no.of records will be there. Now i have to check with the detail table and trailer table if the no.of dollar amount from the details table for the dollar field is equal to the total amount of trailer table field or not.

For example there is a i_detail table and it has one field tax and for the employees there will be so many records so i need to check if the total no.of employee all tax amount is equal to the i_ trailer record amount or not.

pls help me ...