cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue.. seems to be easy :)

Former Member
0 Kudos

Hi Gurus,

This is part of my source structure:

>Person (occurence N)

>>Name (1)

>>Surname (1)

>>Position (1)

I need to map to target field Name and Surname of person, who has position CEO.

How to achieve this?

Looks easy, but I have serious problem with it.

Thank you,

Olian

Accepted Solutions (1)

Accepted Solutions (1)

Jitendra_Jeswan
Contributor
0 Kudos

1) Position(param1),Constant("CEO")->equals(text)->IfthanWithoutelse--->Name

where

equals(text)---->If

Name(source)---Name(Target)

2) Position(param1),Constant("CEO")->equals(text)->IfthanWithoutelse--->Surname

where

equals(text)---->If

Surname(source)---Surname(Target)

3) Position(source) -


> Position(Target)

4) Position(param1),Constant("CEO")->equals(text)->createIf()---->Persons.

Regards.

Former Member
0 Kudos

Hi guys,

this is not working..

this would work, if there was only one occurence of person. But there is a lot of persons. So when I have a source structure like this:

>person

>>James

>>Hetf

>>Writer

>person

>>Nina

>>Kowaleva

>>CEO

this will produce empty string in condition if-equalsString.. it just checks the first "person" node.. I need to go through them all.

My target structure is just one element - > name + surname of CEO

Rodrigo - CEO is Chief Executive Officer

Thank you,

Olian

Former Member
0 Kudos

jeet, what you mean with "where"?

thank you,

Olian

justin_santhanam
Active Contributor
0 Kudos

Olian,

R u looking for something like this -http://www.flickr.com/photos/23855877@N07/2316767844/sizes/o/

raj.

Former Member
0 Kudos

Hi,

The input structure that i have taken is :

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

<ns0:Mt_sdn_test_send xmlns:ns0="http://www.sap-press.com/xi/training/00">

<Person>

<Name>A</Name>

<Surname>B</Surname>

<Position>CEO</Position>

</Person>

<Person>

<Name>D</Name>

<Surname>E</Surname>

<Position>Manager</Position>

</Person>

<Person>

<Name>Sam</Name>

<Surname>raj</Surname>

<Position>CEO</Position>

</Person>

<Person>

<Name>RAVI</Name>

<Surname>S</Surname>

<Position>HR</Position>

</Person>

</ns0:Mt_sdn_test_send>

The output struture is :

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

<ns0:mt_sdn_test_rec xmlns:ns0="http://www.sap-press.com/xi/training/00">

..<Person>

......</Name>

<ns0:mt_sdn_test_rec>

than i have applied the following mapping

rules specified are as follows:

the outut achieved for this mapping is as follows in the link:

http://www.flickr.com/photos/24531098@N08/

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

<ns0:mt_sdn_test_rec xmlns:ns0="http://www.sap-press.com/xi/training/00">

<Person>

<Name>AB</Name>

</Person>

<Person><Name>Samraj</Name>

</Person>

</ns0:mt_sdn_test_rec>

Please let me know if this is what u require.

Thanks,

Bhargav.

Note:Award points if found useful.

Former Member
0 Kudos

Raj,

yes, this is what I need. Unfortunately, I can't make mapping on parent node (Person) of target element (Name+Person), because this node is mapped to other element.

Is there a way how directly take this name+surname from source message of my type? That means w/o mapping of target parent node?

Thank you,

Olian

Former Member
0 Kudos

Done

Thank you, guys.

Olian

Answers (3)

Answers (3)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Whats the meaning of CEO???

Former Member
0 Kudos

Hi,

Try it this way.

surname

CEO(Constant)------->Stringequals.

The output of stingequals should be mapped to if of the ifwithoutelse standard function and in the than condition pass the Name and Surname.

Hope this would work.

Thanks,

Bhargav.

Note:Award points if found useful

justin_santhanam
Active Contributor
0 Kudos

Hello Olian,

What is ur target structure?

Did u tried this,

Position, Constant(CEO) -


>eQuals--


>If then without else--


>Surnmae

In If then give Surname

Position, Constant(CEO) -


>eQuals--


>If then without else--


>Name

In If then give Name

raj.