cancel
Showing results for 
Search instead for 
Did you mean: 

Target Node Creation

Former Member
0 Kudos

Hi,

I have to check a condition of a filed in a particular node and if it satisfied need to create the a node in the target with respect to the source node.

I tried various combination but ended up in error,

please help.

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Issue solved

Former Member
0 Kudos

Hi ,

You can check the below link :-

It might be helpful...........

http://help.sap.com/saphelp_nw04/helpdata/en/1f/ea0fb12403844bbb6c4cbc8a00cda9/frameset.htm

In this link you can check the create if node function.

Regards,

Rohit

Former Member
0 Kudos

Hi,

You may use node function createif and provide your condition as input to this node.

The targer node will be created only if the condition is true.

Regards,

Beena.

rajasekhar_reddy14
Active Contributor
0 Kudos

creating node based some condition is very easy,but you have explain what is the logic.

use createif node function .

Regards,

Raj

Former Member
0 Kudos

hi,

I have provided a simple structure to check:

<Empid>

<Name>

<FirstName>demo</FirstName>

<LastName>test</LastName>

</Name>

<Empid>

Here the <Name> node has to be created in the traget if <FirstName> begins with demo... at the source side.

I used CreateIf but the FirstName field is not created in the target and if i duplicate the <Name> node more than twice im not getting the last data,.

Please help me as how to go ahead..

Thanks

Former Member
0 Kudos

As I understand you need to create Name as target node only if first name has value 'demo'.

Try this:

check if first name has demo as substring and then apply create if and map it to target node Name.

Then map other fields first name, last name as 1:1.

Why do you want to duplicate the target node Name?

Yes, you will not get all data as there is only one instance of it Name is source so it will map it to only first target node Name and second target node Name will not get all data.

Regards,

Beena.

Former Member
0 Kudos

Hi ,

in my input i have,

<Name>

<FirstName>demo</FirstName>

<LastName>test</LastName>

</Name

<Name>

<FirstName>Testdemo</FirstName>

<LastName>test</LastName>

</Name

<Name>

<FirstName>Test</FirstName>

<LastName>test</LastName>

</Name

<Name>

<FirstName>demo data</FirstName>

<LastName>test</LastName>

</Name

So i have to create Name node in target whenever FirstName is starts with demo with other values in the corrspoinding Name node.

So my target will be

<Name>

<FirstName>demo</FirstName>

<LastName>test</LastName>

</Name>

<Name>

<FirstName>demo data</FirstName>

<LastName>test</LastName>

</Name

Please tell me how to get this

Thanks

Archanaa

Former Member
0 Kudos

In this case, there is no need to create duplicate target node Name in the mapping.

Just map source and target Name nodes using createif node function as follows:

first name (remove context) - substring (demo) - equals - first name (remove context) - create if - target node Name

and map other subfields of node Name i.e. firstname , last name as one to one mapping.

Regards,

Beena.

Former Member
0 Kudos

Hi ,

substring ask for start position and character count but i want to check if FirstName begins with demo...

first name (remove context) - constand(demo) - startswith - first name (remove context) - create if - target node Name

Now on testing i can see only the emo id tag and Name tag is not created at all.

thanks

Former Member
0 Kudos

I think it should be :

first name - startswith - constand(demo) - create if - remove context - target node Name

Former Member
0 Kudos

Thanks Beena, Issue is solved