cancel
Showing results for 
Search instead for 
Did you mean: 

Is UDF required for this?!! or Can we manage with Node Functions?!!!

Former Member
0 Kudos

HI Gurus,

I have a requirement like below desc, Is UDF required for this?!! or Can we manage with Node Functions?!!!

Source File: ( File )

a) PO_TYPE

b) Style1

c) Style2

Note: Style1 leads to Headernode and Style2 leads to ChildNode, Style1 and Style 2 are interconnected.

Target File: ( Idoc )

a) Header Node ( EHDRNDE)

b) Child NOde ( CHLDNDE)

And my question is.... I have to populate Header Node and Child Node in target side on certain conditions of the source file. they are;

I) Whenver a different style1 comes in file...I have to create a Headernode for that in target file. Style1 can contain number of Style2 nodes with the same node. like

Ex:

i) Style1 -


Style2a, Style2b, Style2c

ii) Style1 ....... Style2aa, Style2ab.

For this above requirement, I have to create corresponding target nodes for Header ( Style1 ) and as well as for Child ( Style2)

for ex1: it should be one Header node in target and 3 corresponding child nodes

for ex2 : It should be One Header Node and 2 child nodes

For this requirement...can we use node functions....if it is...could you please help me.

....Stallin

Edited by: stallin xavier on May 1, 2008 4:18 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can do it by using node function as well as UDF also.

1) If your sequence is sorted and always come in sorted order only e.g. 1st come only style1 node and child node and then come all nodes from style 2 then u can use node function.

2) for parent node use collpse context then remove context.

3) for child node 1st differntiat according to your condition and then use split by value(value change)

4) If occurance of style1 node and style2 node is not fixed then you don't have any option you have to write UDF.

I think this will help you.

Regards,

Rohit.

Reward points if helpful

Answers (2)

Answers (2)

GabrielSagaya
Active Contributor
0 Kudos

You can use node functions for your mapping.

using removecontext, splitbyvalue, and collapsecontext, createif.

Be specific in your logic before using node function.

/people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool

former_member214364
Active Contributor
0 Kudos

> I) Whenver a different style1 comes in file...I have to create a Headernode for that in target file. Style1 can contain number of Style2 nodes with the same node. like

Hi Stallin,

How do you differentiate style1s in file? is it based on some field value under the Style1 node?

if you want to create Header node for unique Style1s then you have to use UDF.

if you can give source and target structures with mapping rules and some sample payloads we can provide you the UDF code with logic if needed.

Cheers,

Jag

Edited by: jag on May 1, 2008 1:23 PM