cancel
Showing results for 
Search instead for 
Did you mean: 

How to Solve Routed Output based on certain field.

0 Kudos

Hi,

Please help me with this routing development...

We have an input strucutre something like this

<b><File>

<Customer>

<Name>John</Name>

<Company Info>

<Number>101</Number>

<Company>Coka Cola</Company>

</Company Info>

</Customer>

<Customer>

<Name>Ron</Name>

<Company Info>

<Number>102</Number>

<Company>Nestle</Company>

</Company Info>

</Customer>

<Customer>

<Name>Harry</Name>

<Company Info>

<Number>103</Number>

<Company>Pepsi</Company>

</Company Info>

</Customer>

<Customer>

<Name>Shrek</Name>

<Company Info>

<Number>104</Number>

<Company>Nestle</Company>

</Company Info>

</Customer>

</File></b>

And the Output has to be something like this...

<b><File>

<Customer>

<Name>John</Name>

<Number>101</Number>

<Company>Coka Cola</Company>

</Customer>

</File>

<File>

<Customer>

<Name>Ron</Name>

<Number>102</Number>

<Company>Nestle</Company>

</Customer>

<Customer>

<Name>Shrek</Name>

<Number>104</Number>

<Company>Nestle</Company>

</Customer>

</File>

<File>

<Customer>

<Name>Harry</Name>

<Number>103</Number>

<Company>Pepsi</Company>

</Customer>

</File></b>

The file has to be routed based on the Company Code and different file should have different file name again based on the company code.

Accepted Solutions (0)

Answers (3)

Answers (3)

aashish_sinha
Active Contributor
0 Kudos

Hi ,

Set the conext object for the required field and then use that field to send your data.This condition based thing will be set at Receiver Determination for your BS System. Use condition there and provide your conditions and you r done.

regards

Aashish Sinha

Former Member
0 Kudos

Hi Anupam,

Different routing based on condition can be done in Receiver Determination. Just put the appropriate condition and target system.

Different target interface & mapping based on condition can be done in interface determination.

Different file name:

for each file name create separate tergat file adapter. based on condition, use different target (interface or system)

If u have further question, let me know.

Peter

prabhu_s2
Active Contributor
0 Kudos

<b>>>>The file has to be routed based on the Company Code</b>

check with xpaths.

/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers

<b>>>>different file should have different file name again based on the company code.</b>

/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii