on 05-25-2006 7:15 PM
Hi all,
I have a basic doubt in message mapping.
The requirement is, if a particular source field has value, only then the target node should get created.
If the Field has no value then the node should not be created.
I tried doing this using the exist and createif functions but couldn't do it.
The basic doubt is how to check if a field is initial or not.
Illustration of my requirement:
Source Target
-
NodeA TargetNode
Field 1 Field 1
Now the requirement is
If field1 = "Some value" only then the target node has to be created .
Regards
Venu
Hi venu,
Exists Node function should work here.
First of all make sure that you are getting source xml tag for the field .
For e.g Your Source message is
<NodeA>
(there is no value here right ?)
</NodeA>
If so you can try with Exists Function with if then logic.
For e.g
Field1->Exits->If then->TargetField1
Else Constant->TargetField1
If there is no value, you can ,map with empty tag to get the xml structure in the target message.
Are you getting any error in this ? Or how are you testing this ? You need to test by deleting the <Field1> </Field1>Tag not the value in the Field1..
Hope this helps,
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Venu,
Make sure your target node has minOccurs as 0. And try the mapping with equals, and createIf.
praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you mean
<Field1><Field1> Is this is not having value ?
In this case you are able to get the XML Tag. In this case Exists will not work. Exists is a node function
http://help.sap.com/saphelp_nw2004s/helpdata/en/1a/318c4024d26e1de10000000a1550b0/content.htm
If you want to check for the values in this case, then write small java user defined function to check for null.
Exists will work if the nodr exists or not . it will not check for the node values.
Please update .
Hope this helps,
Regards,
Moorthy
As mentioned you can check for null/length zero etc.
I have already given the standard functions link- Only that is possible.
http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/2d8c4024d26e1de10000000a1550b0/content.htm
If it answered please close the thread.
Thanks,
moorthy
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.