on 06-15-2009 4:00 AM
Hi Experts,
I am doing file to jdbc interface. My file contains two types of records, like Header and Trailer records.
Header Records
DD33,0809201034,000000000000,04027S,Test,SIC
DD33,0809201034,000000000000,04028S,Test,STC
DD33,0809201034,000000000000,04029D,Test,STC
XD46,0809201034,000000000000,04027S,Test,SIC
XD46,0809201034,000000000000,04028S,Test,STC
SD56,0809201034,000000000000,04029D,Test,STC
DD33,0809201034,000000000000,04029D,Test,STC
DD33,0809201034,000000000000,04029D,Test,STC
SD56,0809201034,000000000000,04029D,Test,STC
SD56,0809201034,000000000000,04029D,Test,STC
SD56,0809201034,000000000000,04029D,Test,STC
XD46,0809201034,000000000000,04027S,Test,SIC
XD46,0809201034,000000000000,04028S,Test,STC
Trailer Records
DD33,5 - No of appearance in the header records.
XD46,4 - No of appearance in the header records
SD56,4 - No of appearance in the header records
My requirement is, i need to compare both header and trailer records. In the trailer records above DD33,5, here 5 denotes, the no of times that DD33 records appears in the header record. Both should tally, otherwise i need to skip this DD33 and move to XD46 and check for the no of appearance in the header record with the trailer value. Like this i need to compare both header and trailer.
Experts pls advise me how to execute this mapping.
Waiting for your advise......
Thanks in advance.
Regards
Mani.
easiest way is pass all the data to Stored Proc (jdbc) and write validation in procedure itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can achieve this check based on the count function.
the approach will be something similar to this wiki post - https://wiki.sdn.sap.com/wiki/display/XI/CountofRecords-%27Countontheeasiestway+through%27
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.