on 04-22-2009 2:42 PM
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>
That should work with useOneAsMany
It should be:
ID_OS \
PECA - useOneAsMany - ID_OS
PECA - splitbyvalue /
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.