on 04-23-2008 11:02 AM
Hi,
I have a segment node in the incoming IDoc which is not mandatory. IDoc can come with this node absent.
The node has got child elements which are mapped to target structure elements.
I need an empty value in the target element, if the node itself is missing.
Means I want to check the existence of node, and if the node is absent, I want a space to goo to the target element.
How can I handle this? Please help.
Thanks,
John
Hi,
You can try this,
SourceNode->CollapsContext->target
the context of SourceNode must be at lowest level,
Regards,
Rohit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi john,
Use this screenshot and apply the same Logic present in this.But i used this for Different purpose and apply the basic logic of this
http://img208.imageshack.us/img208/6794/existsuz1.jpg
Regards
Seshagiri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the 'exists' node function and populate a blank value in the target if the required node does not exist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Source node->mapwithdefault->target
Use these for all your target mappings. Set the defult value in map wid default as blank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you have already mapped source element to complex user define function to the target node.
Here use "MapWithDefault" function between source element and user defiend fucntion and set the source context to the parent node.
Now check this existance in the user defiend fucntion.If you will get empty value return the empty message(return "" or result.addValue("") depends on type of UDF). If you get normal value it performs the normal logic what is there in the logic.
String val = " ";
int count = 0;
for(int i=0;i<a.length;i++)
{
if (c<i>.equals("FALSE"))
{ val = "value";
count = count +1;
result.addValue(val);}
else if (c<i>.equals("TRUE"))
val = b[i-count];
result.addValue(val);
}
Hi,
The above code is returning no values. What couls be the reason?
If it works, my problem may be solved.
Thanks,
John
Use "Map with default" standard function for all the child elements to the target elements in the message mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.