cancel
Showing results for 
Search instead for 
Did you mean: 

Generate the Element on target if the value exists in Source element

Former Member
0 Kudos

Hi

i have requirement where i have to generate the target element if the value exists in Source element

suppose if i have a value in <name>test</name> then generate the element on target side <name>test</name>

if i dont have value on source side <name></name> then i dont want to generate the element on target side

how i will achieve that

S V

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos
Source
                ---------> equalS ----> Not -----> IfWithoutElse   ----------------Target
Constant(blank)                                    THEN---Source

Its working for me...rather i tested the logic:)

I hope that your target element has at least 0..1 cardinality...else will give an error...

Regards,

Abhishek.

Edited by: abhishek salvi on May 6, 2009 9:30 AM

Answers (6)

Answers (6)

jyothi_anagani
Active Contributor
0 Kudos

Hi S V,


name------->equals----->not------>if------->target
constant()/                   name--->then/

dont give any thing in the constant.

Thanks.

Former Member
0 Kudos

Hi S V,

Try this...........

First change the occurance of element <name> to '0..unbounded'.

Now do the mapping,

name & -


>Equals--


>not
>createIf
--


>name

Constant

Check this link to know much about Node functions.

thanks,

Ravi.

Edited by: P.Ravi Varma on May 6, 2009 11:10 AM

Former Member
0 Kudos

Try to use the createIf functionality of Node function, make sure that min occurence should be '0'

example:

If Name(Source) exist --> createIf --> Name (target)

Former Member
0 Kudos

Kindly check this link has provided an example

[http://help.sap.com/saphelp_nw04/helpdata/en/d9/3033f96c79674f90e3ab8d101a595b/frameset.htm]

<h5>in ur mapping u should not give any value there and use not after equalS std function<h5>

Or u can use mapping like this


 name(Source Field)--------equalS------------not---------ifWithoutElse--------------name(target Field)
              constant()/                                                        Source/

for constant dont give any value
target field occurence 0....unbounded


Former Member
0 Kudos

you can use createIf function for this

make sure that the cardinality of target element/node is 0...1

Rajesh

former_member732072
Active Participant
0 Kudos

Hi ,

Please have a look at this link which might be of help to you.

Also do have a look at this blog

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

Its very helpful

Best Regards

Edited by: Prakash Bhatia on May 6, 2009 5:13 AM