cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Help---

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

easiest way is pass all the data to Stored Proc (jdbc) and write validation in procedure itself.

Former Member
0 Kudos

Hi,

Thanks for the response. But i need to do all the validation in XI itself. My client dont want to do any validaiton on their part. Suggest me.

Regards

Mani...

Edited by: mani_sg on Jun 15, 2009 6:10 AM

Shabarish_Nair
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Shabarish Vijay...

Thanks for the resposne. the link which you have given contains the mapping for the fixed values, but for me i need to get the value dynamically and check.

Pls let me know, is there any other way to achive this.

Regards

Mani.

Shabarish_Nair
Active Contributor
0 Kudos

you can always base a check like

if(fieldA.equals(fieldB))

{

// then the logic to find the count and check .....

}

Former Member
0 Kudos

Hi,

Thanks for your tip. I will try with this, hope it will work out.

Regards

Mani...