cancel
Showing results for 
Search instead for 
Did you mean: 

Data coming for first segment only in mapping

Former Member
0 Kudos

Hi,

i have proxy to web service scenario.

Source structure :

Target :

in next segment tax is not coming. The values coming in Total Line should show in each segment. I have used split by value also used context handling but no use.

Can any one please look into it urgently. I need urgent help.

Accepted Solutions (1)

Accepted Solutions (1)

former_member190624
Active Contributor
0 Kudos

Hi ,

Use node function UseOneAsMany and also please provide screen shot of message mapping (both source and target structures ).

UseOneAsMany function takes 3 parameters ,

1.CityTax - value you wanted to repeat.

2.              - How many times you wanted to repeat

3.              - This parameter will maintain context  (both 2 and 3 parameters should have same occurrence )

Thanks

Hari.

Former Member
0 Kudos

I used useoneasmany but it did not gave any output. Can you please tell for option 2 and 3 what to give?

former_member190624
Active Contributor
0 Kudos

Hi ,

2nd  and 3rd parameters will be source structure that are mapped to BillToNumber/BillType.

Thanks

Hari.

Former Member
0 Kudos

still no result. i changed to Header but still not coming. Can you please let me know what is missing

former_member190624
Active Contributor
0 Kudos

Hi ,

Can you share us sample input and output XML , so that we can provide you correct answer/ suggestion?

Thanks

Hari.

Former Member
0 Kudos

input xml :

<?xml version="1.0" encoding="utf-8"?><n0:MT_CFSS_InvoiceStatement xmlns:n0="http://www.matw.com/cfss/InvoiceStatement" xmlns:prx="urn:sap.com:proxy:RQ1:/1SAI/TAS0F4A98187FD0F76D1A30:700:2008/06/25"><Header><CustChainAcct>022</CustChainAcct><CustLocationcode>J-257</CustLocationcode><Invoice>0092511804</Invoice><InvDate>20140429</InvDate><Billto>0001002071</Billto><Order>0002258751</Order><OrderType>OR</OrderType><CustPO>jk</CustPO><Surname>jk</Surname><ShipTo>0001002071</ShipTo><ShipToName>JOHN E DAY FUNERAL HOME</ShipToName><ShipToCity>RED BANK</ShipToCity><ShipToSt>NJ</ShipToSt><ShipToZip>07701</ShipToZip><BillType>F2</BillType><StateTax>81.90 </StateTax><CountyTax>0.00 </CountyTax><CityTax>0.00 </CityTax><LocalTax>0.00 </LocalTax><InvItem>000010</InvItem><Qty>1.000 </Qty><Prod>000000000071006666</Prod><ProdGroup>10201055</ProdGroup><ProductDescr>CK,01VS57,OC,SAT WAL,2860,ADJ,15082</ProductDescr><OrderItem>000010</OrderItem><GrossPrice>1170.00 </GrossPrice><Freight>0.00 </Freight><TermsDiscounts>421.20-</TermsDiscounts><SalesDiscounts>0.00 </SalesDiscounts><NetPrice>1251.90 </NetPrice><NetDue>81.90 </NetDue><DueDate>20140429</DueDate></Header><Header><CustChainAcct>022</CustChainAcct><CustLocationcode>J-257</CustLocationcode><Invoice>0092511805</Invoice><InvDate>20140429</InvDate><Billto>0001002071</Billto><Order>0002258751</Order><OrderType>OR</OrderType><CustPO>see 92511804</CustPO><Surname>jk</Surname><ShipTo>0001002071</ShipTo><ShipToName>JOHN E DAY FUNERAL HOME</ShipToName><ShipToCity>RED BANK</ShipToCity><ShipToSt>NJ</ShipToSt><ShipToZip>07701</ShipToZip><BillType>G2</BillType><StateTax>81.90-</StateTax><CountyTax>0.00 </CountyTax><CityTax>0.00 </CityTax><LocalTax>0.00 </LocalTax><InvItem>000010</InvItem><Qty>1.000-</Qty><Prod>000000000071006666</Prod><ProdGroup>10201055</ProdGroup><ProductDescr>CK,01VS57,OC,SAT WAL,2860,ADJ,15082</ProductDescr><OrderItem>000010</OrderItem><GrossPrice>1170.00-</GrossPrice><Freight>0.00 </Freight><TermsDiscounts>421.20 </TermsDiscounts><SalesDiscounts>0.00 </SalesDiscounts><NetPrice>1251.90-</NetPrice><NetDue>81.90-</NetDue><DueDate>20140429</DueDate></Header><TotalLine><StateTax>0.00 </StateTax><CountyTax>0.00 </CountyTax><CityTax>0.00 </CityTax><LocalTax>0.00 </LocalTax><Qty>0.000 </Qty><GrossPrice>0.00 </GrossPrice><Freight>0.00 </Freight><SalesTax>0.00 </SalesTax><TermsDiscounts>0.00 </TermsDiscounts><SalesDiscounts>0.00 </SalesDiscounts><NetPrice>0.00 </NetPrice><NetDue>0.00 </NetDue><GrandTotal>TOTAL</GrandTotal></TotalLine></n0:MT_CFSS_InvoiceStatement>

output xml:

<?xml version="1.0" encoding="UTF-8"?>

<ns1:PostStatements xmlns:ns1="http://tempuri.org/"><ns1:statementList><ns2:Statement xmlns:ns2="http://schemas.datacontract.org/2004/07/Carriage.CFSS.ElectronicOrdering.Matthews"><ns2:BillToNumber>0001002071</ns2:BillToNumber><ns2:BillType>F2</ns2:BillType><ns2:CityTax>0.00 </ns2:CityTax><ns2:CountyTax>0.00 </ns2:CountyTax><ns2:CustChainAcct>022</ns2:CustChainAcct><ns2:CustPO>jk</ns2:CustPO><ns2:DueDate>20140429</ns2:DueDate><ns2:Freight>0.00 </ns2:Freight><ns2:GrandTotal>TOTAL</ns2:GrandTotal><ns2:GrossPrice>0.00 </ns2:GrossPrice><ns2:InvDate>20140429</ns2:InvDate><ns2:InvItem>000010</ns2:InvItem><ns2:InvoiceNumber>0092511804</ns2:InvoiceNumber><ns2:LocalTax>0.00 </ns2:LocalTax><ns2:NetDue>0.00 </ns2:NetDue><ns2:OrderItem>000010</ns2:OrderItem><ns2:OrderNumber>0002258751</ns2:OrderNumber><ns2:OrderType>OR</ns2:OrderType><ns2:ProdGroup>10201055</ns2:ProdGroup><ns2:ProdNumber>000000000071006666</ns2:ProdNumber><ns2:ProductDesc>CK,01VS57,OC,SAT WAL,2860,ADJ,15082</ns2:ProductDesc><ns2:Qty>0.000 </ns2:Qty><ns2:SalesDiscount>0.00 </ns2:SalesDiscount><ns2:SalesTax>0.00 </ns2:SalesTax><ns2:ShipToCity>RED BANK</ns2:ShipToCity><ns2:ShipToName>JOHN E DAY FUNERAL HOME</ns2:ShipToName><ns2:ShipToNumber>0001002071</ns2:ShipToNumber><ns2:ShipToSt>NJ</ns2:ShipToSt><ns2:ShipToZip>07701</ns2:ShipToZip><ns2:StateTax>0.00 </ns2:StateTax><ns2:Surname>jk</ns2:Surname><ns2:TermsDiscounts>0.00 </ns2:TermsDiscounts></ns2:Statement><ns2:Statement xmlns:ns2="http://schemas.datacontract.org/2004/07/Carriage.CFSS.ElectronicOrdering.Matthews"><ns2:BillToNumber>0001002071</ns2:BillToNumber><ns2:BillType>G2</ns2:BillType><ns2:CustChainAcct>022</ns2:CustChainAcct><ns2:CustPO>see 92511804</ns2:CustPO><ns2:DueDate>20140429</ns2:DueDate><ns2:InvDate>20140429</ns2:InvDate><ns2:InvItem>000010</ns2:InvItem><ns2:InvoiceNumber>0092511805</ns2:InvoiceNumber><ns2:OrderItem>000010</ns2:OrderItem><ns2:OrderNumber>0002258751</ns2:OrderNumber><ns2:OrderType>OR</ns2:OrderType><ns2:ProdGroup>10201055</ns2:ProdGroup><ns2:ProdNumber>000000000071006666</ns2:ProdNumber><ns2:ProductDesc>CK,01VS57,OC,SAT WAL,2860,ADJ,15082</ns2:ProductDesc><ns2:ShipToCity>RED BANK</ns2:ShipToCity><ns2:ShipToName>JOHN E DAY FUNERAL HOME</ns2:ShipToName><ns2:ShipToNumber>0001002071</ns2:ShipToNumber><ns2:ShipToSt>NJ</ns2:ShipToSt><ns2:ShipToZip>07701</ns2:ShipToZip><ns2:Surname>jk</ns2:Surname></ns2:Statement></ns1:statementList></ns1:PostStatements>

former_member190624
Active Contributor
0 Kudos

Hi Swapnashree,

Try below logic ,

          Constant (source) -> statementList (Target)

Map  Header (source ) -> Statement (Target)

CountryTax (under TotalLine context) ->UseOneAsMany->  CountryTax (Target)


UseOneAsMany


1st Parameter - CountryTax ( TotalLine context )

2nd Parameter - Header

3rd Parameter - Header

and let me know the result

Thanks

Hari.

Message was edited by: HariKumar Vemuri

Former Member
0 Kudos

Thank you so much for this help. It worked.

Answers (0)