cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping "creatif"

Former Member
0 Kudos

Hi,

I want to create a node deppending on a value under the node

From:

-FNode

--Fvalue1

--Fvalue2

--Fvalue3

To:

-TNode

--Tvalue1

--Tvalue2

Mapping:

if Fvalue1 = 5 -> creatif -> TNode

but this doesn't work, it always creat only one TNode, it doesn't matter how often the if statment should return true. the TNode is only created once. i tryed splitbyvalue but didn't help.

how can i map this via graphical mapping?

regards J.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Jörg,

then - i think - your question doesn't give the full information.

Please give a better example

a) In which cases should TNode be created?

b) how often depending on ...?

c) How often can the child-elements occur?

Grüße Mario

former_member206604
Active Contributor
0 Kudos

Hi,

Hope you did what Mario told + you need to change the context and it will work for sure. Did you check the post by Bhavesh and followed by mine.

Once your mapping is done. In the mapping editor which is displayed below right click the FValue1 node and you will find the "context" menu, there you set to the next level.

Thanks,

Prakash

henrique_pinto
Active Contributor
0 Kudos

As everyone, I'm a bit confused by your scenario, but I think I understood.

If you have FValue1 = 5, then you need to create 5 TNodes, is that so?

If that's it, then you'll need to use UDF, alright.

Just create a Context type UDF, do a for loop and create a result list with the number of desired outputs. Check the following link for more details:

http://help.sap.com/saphelp_nw2004s/helpdata/en/b1/83a09f668320419dbe00a741e0fe6a/frameset.htm

Regards,

Henrique.

Former Member
0 Kudos

Hi Jörg,

I don't think you have two take a UDF.

1) Compare Fvalue1 with a Constant = 5 by using the

text function

"equals"

2) put the output of "equals" to "createif"

Regards Mario

former_member206604
Active Contributor
0 Kudos

Hi,

As Mario said there is no need for a UDF and you can just compare Fvalue1 with a constant "5" with the help of "equals" function found under Text section. Now for the Fvalue1 set the context to the message type level and then use split by value (Same as Bhavesh said but I think the Context would already be in FNODE that is default so you need to set 1 level above and I believe it is message type).

Then give output of the <b>equals</b> to <b>createif</b>.

Thanks,

Prakash

Former Member
0 Kudos

Hi Mario,

this was my first idea, but this doesn't work. then it creates only one TNode.

regards

j.

Former Member
0 Kudos

Hi,

The creatif function takes Boolean type as the parameters. U may have to write an UDF before passing the value to the creatif function.

Regards,

Divija.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Make the context of FVALUE1 to the Source Node FNODE and then use SPLIT BY VALUE.

Let me know if it works.

Regards

Bhavesh