Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Message Mapping Doubt

hello everybody,

I have a message mapping where the only thing i'm doing is setting a counter to a attribute called id to control the order in how I received the rows, now there are two structures as follows:

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

<ns0:MT_Irdoc_Archivo xmlns:ns0="http://ref.pemex.com/PI/FI/ArchivoIrdoc">

- <Cabecera>

<Transaction>HF28</Transaction>

<Header2>0809252688743401</Header2>

<Header3>1802570090PMXR2008</Header3>

<Header4>FP</Header4>

<Header5>300</Header5>

<Header6>99999</Header6>

<Header7>20/09/2008</Header7>

<Header8>3453664</Header8>

<Header9>0000104317</Header9>

<Header10>A</Header10>

<Header11>1</Header11>

<Header12>132344.74</Header12>

</Cabecera>

- <Detalle>

<Transaction>DF28</Transaction>

<Detail2>25/09/2008</Detail2>

<Detail3>N</Detail3>

<Detail4>010</Detail4>

<Detail5>010</Detail5>

<Detail6>275-01072-3</Detail6>

<Detail7>1283.60</Detail7>

<Detail8>0.00</Detail8>

</Detalle>

- <Cabecera>

<Transaction>HF28</Transaction>

<Header2>0809252688743401</Header2>

<Header3>1802570090PMXR2008</Header3>

<Header4>FP</Header4>

<Header5>300</Header5>

<Header6>99999</Header6>

<Header7>20/09/2008</Header7>

<Header8>3453664</Header8>

<Header9>0000104317</Header9>

<Header10>A</Header10>

<Header11>1</Header11>

<Header12>132344.74</Header12>

</Cabecera>

- <Detalle>

<Transaction>DF28</Transaction>

<Detail2>25/09/2008</Detail2>

<Detail3>N</Detail3>

<Detail4>010</Detail4>

<Detail5>010</Detail5>

<Detail6>275-01072-3</Detail6>

<Detail7>1283.60</Detail7>

<Detail8>0.00</Detail8>

</Detalle>

</ns0:MT_Irdoc_Archivo>

as you can see there's two structures Cabecera and Detalle, now when I execute message mapping is giving me back this:

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

<ns0:MT_Irdoc_ArchivoId xmlns:ns0="http://ref.pemex.com/PI/FI/ArchivoIrdoc">

- <Cabecera id="1">

<Transaction>HF28</Transaction>

<Header2>0809252688743401</Header2>

<Header3>1802570090PMXR2008</Header3>

<Header4>FP</Header4>

<Header5>300</Header5>

<Header6>99999</Header6>

<Header7>20/09/2008</Header7>

<Header8>3453664</Header8>

<Header9>0000104317</Header9>

<Header10>A</Header10>

<Header11>1</Header11>

<Header12>132344.74</Header12>

</Cabecera>

- - <Cabecera id="2">

<Transaction>HF28</Transaction>

<Header2>0809252688743401</Header2>

<Header3>1802570090PMXR2008</Header3>

<Header4>FP</Header4>

<Header5>300</Header5>

<Header6>99999</Header6>

<Header7>20/09/2008</Header7>

<Header8>3453664</Header8>

<Header9>0000104317</Header9>

<Header10>A</Header10>

<Header11>1</Header11>

<Header12>132344.74</Header12>

</Cabecera>

- <Detalle id="3">

<Transaction>DF28</Transaction>

<Detail2>25/09/2008</Detail2>

<Detail3>N</Detail3>

<Detail4>010</Detail4>

<Detail5>010</Detail5>

<Detail6>275-01072-3</Detail6>

<Detail7>1283.60</Detail7>

<Detail8>0.00</Detail8>

</Detalle>

- <Detalle id="4">

<Transaction>DF28</Transaction>

<Detail2>25/09/2008</Detail2>

<Detail3>N</Detail3>

<Detail4>010</Detail4>

<Detail5>010</Detail5>

<Detail6>275-01072-3</Detail6>

<Detail7>1283.60</Detail7>

<Detail8>0.00</Detail8>

</Detalle>

</ns0:MT_Irdoc_ArchivoId>

as you can see it sorted them by Cabecera and Detalle, now I don't want it to sort cause the whole purpose of setting the attribute id is to have and counter identifer on how the rows where received, any suggestiosn on how can I stop the message mapping from ordering them bye structures, thanks in advance.

Regards,

Julio

Not what you were looking for? View more on this topic or Ask a question