cancel
Showing results for 
Search instead for 
Did you mean: 

mapping question

Former Member
0 Kudos

<b>Source_Message1</b>

<Firstname> Michael </Firstname>

<Lastname> Jordan</Lastname>

<Team> <u>Chicago</u> </Team>

<Position> guard </Position>

<b>Source_Message2</b>

<Key> Firstname</Key>

<Text> Michael </Text>

<Key> Lastname</Key>

<Text> jordan </text>

<Key> Team </Key>

<text> <u>Washington</u> </text>

<b>Target message</b>

<Firstname> Michael </Firstname>

<Lastname> Jordan</Lastname>

<Team> <u>Washington</u> </Team>

<Position> guard </Position>

In my query I want to check, if on <b>message2</b> the <Key> value is Firstname then put the <text> into <b>Target</b> <Firstname>. <u>If the Key value not exist</u> then put the value from <b>Message1</b> into Target <Firstname>.For example <Position> .

Can anyone provide me any help regarding the constrution ?

Thanks in advance,

Fth

Accepted Solutions (1)

Accepted Solutions (1)

dirk_roeckmann
Participant
0 Kudos

Hello Fatih,

you did not mention, if the the two source messages come into the XI as separate XI messages.

If not, they could be concatenated outside the XI and mapped easily with graphical mapping if construction or a simple XSLT mapping.

If yes, a bit of BPM is necessary to query the two messages

Hope this helps

Dirk

Former Member
0 Kudos

Hello ,

how do I do the graphical mapping ?

Regards,

Fatih

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi faith,

You can use IF EXISTS in the Graphical Mapping,

SOURCMESSAGE2/KEY If EXISTS , then -- TEXT --- TARGETFILE

ELSE from Source 1.

regards,

Bhavesh

Former Member
0 Kudos

Hi All,

I do the mapping in the following way:

http://photos1.blogger.com/blogger/3087/1595/1600/1.0.jpg

it works fine, but only for one <key> and <text> . If I test it with following:

http://photos1.blogger.com/blogger/3087/1595/1600/2.jpg

I don't see the values on the target fields.

Please, suggest me !

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Can you please explain in detail what the requirement is?

The Mapping test image shows the result as per the mapping you have done.

You are using the IF and not IFEXISTS.

IFEXISTS is used to check for the existence of a node.

If used to check for the value of the node.

Regards,

Bhavesh

Former Member
0 Kudos

The requirement is ;

In my query I want to check, if on <b>message2</b> the <Key> value is <u>Businessday</u> then put the <text> into <b>Target</b> <Businessday>. If the Key value not exist then put the value from <b>Message1</b> the <u>Businessday</u> into Target <Businessday>.

Regards,

Fatih

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Faith,

You can do this Using IF.

In your Image , you are using IF without Else...

DO this with If (this will have an ELSE condition on it. )

Regards,

Bhavesh

Former Member
0 Kudos

sorry, that does not work.

Regards,

Fatih

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Did you use IF with ELSE? Can you post the screen shot of the new IF with Else?

Regards,

Bhavesh

Former Member
0 Kudos

<b>Hi Bhavesh,</b>

here is a graphic with the else-condition, but it doesn't work neither

<b>http://photos1.blogger.com/blogger/3087/1595/1600/3.jpg</b>

the problem is not that the if-condition wouldn't work. while sending a single key with value, it works. but when i have several keys, it only shows the first one.

<b>http://photos1.blogger.com/blogger/3087/1595/1600/2.jpg</b>

Regards,

Fatih

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Got the problem.

Use <b>SPLIT BY VALUE.</b>

http://help.sap.com/saphelp_nw04/helpdata/en/21/3bb8c495125e4eb5969f0377885fe0/content.htm

MESSAGE 2 -KEY -


SPLITBY VALUE (KEY -- IF ELSE ... ) --

TARGET FIELD AUTHENTICATION GROUP

Regards,

Bhavesh