cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Editor using Multiple Structures

Former Member
0 Kudos

Hello all!

I am trying to implement complex mapping scenario in the Mapping Editor. The source structure has tree element tags, <ORDEMSERVICO>, <SERVICOS> and <PECA>, and xml root element <MT_OrdemServico_Dealer>. Translating this tags for English, we have <Service Order>, <Services> and <Parts>. So, we could be 1 or N orders, composed with services and services with parts. We need to transform this source structure into a target structure like as EDI file, repeating ID_CONC, ID_OS elements of <ORDEMSERVICO> into a <SERVICOS>, and repeating the same elements into a <PECA> and adding ID_CONC, ID_OS, ID_SERVICE. It follows below both samples Source and Target Structure.

We have tried uses Mapping Editor with a Standard functions: SplitByValue and OneAsMany in the lowest elements <SERVICOS> and <PECAS>. Because, it is possible has many services with parts, or one service with many parts. And both can have one or more Service Order. But we couldnu2019t have success.

Please see the source and target xml files?

Please somebody could help me? To solve this problem? Is there other way to do this?

Thanks for your help!

Regards!

*Source Structure*

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

<MT_OrdemServico_Dealer>

<DEALER>

<ID_CONC>ID_CONC</ID_CONC>

<ORDEMSERVICO>

<ID_OS>Service Order Number 1000</ID_OS>

<TP_OS> Type Service Order - 10</TP_OS>

<CHASSI>CHASSI Number 9090190HJJX</CHASSI>

<MODELO>Car Model Honda CRV</MODELO>

<SERVICOS>

<TP_SERV>Type Service - Inspetion</TP_SERV>

<DS_SERV>Description Service Inspetion car</DS_SERV>

<PECA>

<CD_PECA>Code Part - A</CD_PECA>

<QT_PECA>Quantity part - 1</QT_PECA>

</PECA>

<PECA>

<CD_PECA>Code Part - B</CD_PECA>

<QT_PECA>Quantity part -2 </QT_PECA>

</PECA>

</SERVICOS>

<SERVICOS>

<TP_SERV>Type Service - Revsion</TP_SERV>

<DS_SERV>Description Service RevisionCar</DS_SERV>

<PECA>

<CD_PECA>Code Part - C</CD_PECA>

<QT_PECA>Quantity part -1</QT_PECA>

</PECA>

</SERVICOS>

</ORDEMSERVICO>

</DEALER>

</MT_OrdemServico_Dealer>

*Target Structure*

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

<MT_OrdemServico_Dealer>

<ORDEMSERVICO>

<ID_CONC>ID_CONC</ID_CONC>

<ID_OS> Service Order Number 1000</ID_OS>

<TP_OS> Type Service Order - 10</TP_OS>

<CHASSI>CHASSI Number 9090190HJJX</CHASSI>

<MODELO>Car Model Honda CRV</MODELO>

<SERVICOS>

<ID_CONC>ID_CONC</ID_CONC>

<ID_OS> Service Order Number 1000</ID_OS>

<TP_SERV>Type Service - Inspetion</TP_SERV>

<DS_SERV>Description Service Inspetion car</DS_SERV>

<PECA>

<ID_CONC>ID_CONC</ID_CONC>

<ID_OS> Service Order Number 1000</ID_OS>

<TP_SERV>Type Service - Inspetion</TP_SERV>

<CD_PECA>Code Part - A</CD_PECA>

<QT_PECA>Quantity part - 1</QT_PECA>

</PECA>

<PECA>

<ID_CONC>ID_CONC</ID_CONC>

<ID_OS> Service Order Number 1000</ID_OS>

<TP_SERV>Type Service - Inspetion</TP_SERV>

<CD_PECA>Code Part - B</CD_PECA>

<QT_PECA>Quantity part -2 </QT_PECA>

</PECA>

</SERVICOS>

<SERVICOS>

<TP_SERV>Type Service - Revsion</TP_SERV>

<DS_SERV>Description Service RevisionCar</DS_SERV>

<PECA>

<CD_PECA>Code Part - C</CD_PECA>

<QT_PECA>Quantity part -1</QT_PECA>

</PECA>

</SERVICOS>

</ORDEMSERVICO>

</MT_OrdemServico_Dealer>

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

That should work with useOneAsMany

It should be:

ID_OS                     \
PECA                      - useOneAsMany - ID_OS
PECA - splitbyvalue /

Answers (2)

Answers (2)

Former Member
0 Kudos

.

Former Member
0 Kudos

Source Value - \

The occurrence on which u require the output--- - - - Concat - Split By Value->Output Field

Edited by: Sudhansukumar Behera on Sep 4, 2009 10:47 AM

Former Member
0 Kudos

Hi,

I thing its not possible using UseOneAsMany.Can you give your source and target structure with sample data?

Like,

<Source>

<Field1>

<Field2>

<Target>

<Field1>

<Field2>

Regards,

Prakasu.M