cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Help

Former Member
0 Kudos

Hi Gurus,

I want to obtain the following using mapping techniques in SAP PI 7.11, challenge is how to map the field1 of source structure inside the target node. I know, we can directly map field2  in source to number in target. But how to insert the field1 in source structure inside the target node.

<ns1:source>

                <ns1:field1>ABC</ns1:field1>

                <ns1:field2>123</ns1:field2>

</ns1:source>

<ns1:target field1="ABC">

                 <ns1:number>123</ns1:number

</ns1:target>

Thanks in advance

-R

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi,

At first you could use the xml's and import them directly (with a namespace declared):

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

<ns1:source xmlns:ns1="http://test">

                <ns1:field1>ABC</ns1:field1>

                <ns1:field2>123</ns1:field2>

</ns1:source>

Te field1 tag in the second xml will be imported as attribute:

Now you only need to drag and drop the field1 from the source:

Regards.

Answers (1)

Answers (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

it looks field1 is attribute to ns1:target ,so create attribute and map ns1:field1 from source.

map  field2 to <ns1:number>.

Regards,

Raj