cancel
Showing results for 
Search instead for 
Did you mean: 

Making a User Defined Function for Mapping in XI

Jitendra_Jeswan
Contributor
0 Kudos

Hi folks..

I knw how to make User defined Function in XI,

i was wondering about can we have any room for making a function for Initializing Purpose, which intializes few fields in source Message to some Global variables, and later we can use these Global Variables to set the the Target field

My Doubt is this...

i have Source & target Structure like this Structure like this....

SOURCE TEST DATA IS...

Parentsrc

child1src a

child2src b

child3src c

child4src hi

child4src hello

child4src hey

(On the basis of instances of child4src the istance of the Parentdst will be generated)

TARGET DATA SHUD BE LIKE THIS....

Parentdst

child1dst a

child2dst b

child3dst c

child4dst hi

Parentdst

child1dst a

child2dst b

child3dst c

child4dst hello

Parentdst

child1dst a

child2dst b

child3dst c

child4dst hey

Accepted Solutions (1)

Accepted Solutions (1)

former_member187339
Active Contributor
0 Kudos

Hi

You have to modify your target structure:

<b>Source</b>

Parentsrc

child1src a

child2src b

child3src c

child4src hi

child4src hello

child4src hey

<b>Target</b>

<b>root</b>

Parentdst

child1dst a

child2dst b

child3dst c

child4dst hi

Parentdst

child1dst a

child2dst b

child3dst c

child4dst hello

Parentdst

child1dst a

child2dst b

child3dst c

child4dst hey

<b></root></b>

Now map like this:

child4src -


Parentdst

child1src--|

child4src--| UseOneAsMany -- Splitbyvalue --- child1dst

child4src--|

child2src--|

child4src--|UseOneAsMany --Splitbyvalue --- child2dst

child4src--|

child3src--|

child4src--| UseOneAsMany -- Splitbyvalue --- child3dst

child4src--|

child4src -- SplitbyValue -- child4src.

Regards

Suraj

Former Member
0 Kudos

Hi Jeet,

root root

Parentsrc <splitbyvalue><collapsecontext> Parentdst

child1src a <copy value> child1dst

child2src b <copy value> child2dst

child3src c <copy value> child3dst

child4src hi <splitbyvalue> child4dst

child4src hello parentdst

child4src hey root

parentsrc

root

This will work

Regards

vijaya

Answers (2)

Answers (2)

Jitendra_Jeswan
Contributor
0 Kudos

Hi all,

thanks to Suraj and Vijaya....

Great Job

i chosen copyValue option, which solved my problem.

but Suraj approach was also rite and quite Informative in how/when to use few Node functions.

thanks guys,

Many thanks.

Jitendra_Jeswan
Contributor
0 Kudos

I want The Given Target Structure to be generated for the given Source Structure.

thanks.

bhavesh_kantilal
Active Contributor
0 Kudos

Jeet,

take a look at this blog and see how global variables can be used and initiazlied in XI,

/people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14

Regards,

Bhavesh

Jitendra_Jeswan
Contributor
0 Kudos

hi Bhavesh...

it was Informative indded.

However it doesnt Solve My problem..!!

My Problem is to have values for the first three field in SOURCE structure to be stored Globally and then Use these values while Mapping to Target Field..!!

It wud be great if u provide the Solution or any suggestions for the Mapping i have to done.

thanks in advance.

bhavesh_kantilal
Active Contributor