cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Problem

Former Member
0 Kudos

Hello,

I'd like to map the following XMLs in XI. Please tell me the correct setting (in DT, MT, MM, and IM). Thank you.

<MT_DIR>

<DIR>

<ID> (1 to unbounded)

</ID>

</DIR>

</MT_DIR>

<MT_BPM>

<BPM>

<ID> (1 to unbounded)

</ID>

</BPM>

</MT_BPM>

Also, in a Condition properties of Switch step of Integration Process, if i want to compare the ID value of MT_DIR to the multiple ID values in MT_BPM, can I just select ID of MT_DIR = ID of MT_BPM? Or there's something else?

Regards,

Steve

Message was edited by: steve peng

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Steve,

A quick question, can you just confirm that your

source is:

<MT_DIR>

<DIR>

<ID> (1 to unbounded)

</ID>

</DIR>

</MT_DIR>

and target is:

<MT_BPM>

<BPM>

<ID> (1 to unbounded)

</ID>

</BPM>

</MT_BPM>

If it is so, then, you will not be able to check for the condition your trying.... See the point is that you will have an idea of only the data in the source during mapping and not the target, so how are u planning to make a comparison between data in the source with that of the target even before the data is actually passed to the target...

Regards,

Abhy

Message was edited by: Abhy Thomas

Former Member
0 Kudos

Abhy,

The task i'm trying to accomplish in my Integration Scenario is:

<b>Receive Step to receive XML A</b>

<MT_Request>

<Request>

<ID>01</ID>

<Email>test@test.com

<request>

</MT_Request>

<b>Receive Step to receive XML B</b>

<MT_BPM>

<BPM>

<ID>01</ID>

<ID>02</ID>

<ID>03</ID>

</BPM>

</MT_BPM>

<b>Switch Step</b>

Compares MT_Request/Request/ID to all values in MT_BPM/BPM/ID

<i>If matched with one of the ID value in MT_BPM</i>

Insert MT_Request/Request/ID as a record into DB

<i>If not matched</i>

Send emali to MT_Request/Request/Email with error message attached

Regards,

Steve

Former Member
0 Kudos

Hi Steve,

As alreday suggested its just a simple one to one mapping....

<i>

Also, in a Condition properties of Switch step of Integration Process, if i want to compare the ID value of MT_DIR to the multiple ID values in MT_BPM, can I just select ID of MT_DIR = ID of MT_BPM? Or there's something else?</i>

Yes you can do this by just mapping the ID of MT_DIR with ID of MT_BPM.

and regarding the question, if the ID should be 0.....unbounded or 1.....unbounded is based on your scenario, incase you definitely have an ID assosiated with it allways, then you need to give 1...unbounded else if it is optional it should be 0.....unbounded

Regards,

Abhy

Message was edited by: Abhy Thomas

Former Member
0 Kudos

Abhy,

So sounds like the Condition of Switch step would automatically compare the <ID> value in MT_DIR (single value) against all the <ID> (multiple values) in MT_BPM?

Condition Preview:(MT_ID_Request./p1:MT_ID_Request/Request/ID = MT_FILE_BPM./p1:MT_FILE_BPM/BPM/ID)

Regards,

Steve

Former Member
0 Kudos

Hi Steve,

Your mapping seem to be a simple one to one mapping. In Message mapping, map the follwing fields.

MT_DIR --> MT_BPM

DIR --> BPM

ID --> ID

Am I missing some thing here?

Regards,

Jai Shankar.

Former Member
0 Kudos

Jai,

Yeah, that's what I did, but it didn't work. Should the ID value be set to 1:unbounded or 0:unbounded? and is there anything needs to be done in interface mapping as well?

Regards,

Steve

Former Member
0 Kudos

Hi ,

If you want multiple values you have to give occurence as 0 to unbounded or 1 to unbounded while creating data types.

Sekhar

Former Member
0 Kudos

Sekhar,

What I have now in Message Mapping is:

MT_DIR --> MT_BPM (Occurrences - 1:1)

DIR --> BPM (Occurrences - 1:1)

ID --> ID (Occurrences - 0:unbounded)

However, when I throw the message below:

<MT_DIR>

<DIR>

<ID>01</ID>

<ID>02</ID>

<DIR>

<MT_DIR>

The mapping only produced. Looks like it only captured the first one:

<MT_BPM>

<BPM>

<ID>01</ID>

<BPM>

<MT_BPM>

Regards,

Steve

Former Member
0 Kudos

Hi ,

<i>DIR --> BPM (Occurrences - 1:1)</i>

change this occurence as 0 to inbounded and then try..

sekhar

Former Member
0 Kudos

Sekhar,

I've just tried that. It didn't work.

Regards,

Steve

Former Member
0 Kudos

Steve,

Change the occurance of ID to 1..unbounded or 0..unbounded. It will produce that many ID in target msg.

Also kindly elaborate on the switch step in IP. How you are planning to use it? for what purpose?

Regards,

Jai

Message was edited by: Jai Shankar

Former Member
0 Kudos

Jai,

The following Message Mapping setting is what I have now, both MT have the same setting:

MT_DIR --> MT_BPM (Occurrences - 1:1)

DIR --> BPM (Occurrences - 1:1) (also have tried 0:unb)

ID --> ID (Occurrences - 0:unb)

which didn't work. Should I set up something else?

And the usage in switch step in IP, I'd compare the <ID> value of XML A to multiple <ID> values in MT_BPM. If there's a match, proceed to route 1. If there's not a match, proceed to route 2.

Regards,

Steve

Former Member
0 Kudos

MT_DIR --> MT_BPM (Occurrences - 1:1)

DIR --> BPM (Occurrences - 1:1)

ID --> ID (Occurrences - 0:unb)

Should work. What do you see in test tab with this setting?

Check if you have the occurance of souce and taget data type in this way?

<b>Source Data type</b>

DIR 1..1

ID 0..unbounded

<b>Target Data type</b>

BPM 1..1

ID 0..unbounded

Is this what you have?

Regards,

Jai Shankar.

Former Member
0 Kudos

Jai,

I'm sure the setting is right.

A new discovery though. After I tried to change the Message occurrence in the Message Tab of Message Mapping:

MT_DIR (1) to MT_BPM (unb)

the mapping executed to the waty I wanted. However, the source message structure was changed to:

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

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:MT_DIR xmlns:ns1="urn:bpm:poc">

<DIR>

<ID>2</ID>

<ID>3</ID>

</DIR>

</ns1:MT_DIR>

</ns0:Message1>

</ns0:Messages>

Also the target message structure was changed to:

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

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"><ns0:Message1><ns1:MT_BPM xmlns:ns1="urn:bpm:poc"><BPM><ID>2</ID><ID>3</ID></BPM></ns1:MT_BPM></ns0:Message1></ns0:Messages>

The change seems to cause in my next execution in my integration process: which would try to find <ID> in MT_BPM in a SWITCH STEP.

Regards,

Steve