on 05-28-2008 4:59 PM
I have an advanced User defined Functions which is set at context.
The message comes from a proxy and if the value is null the proxy wont send the node.
In that case when i loop the array. it is giving an index out of bound exception since the node doesnot exst.
How can i handle that.
Hi,
U have to check node exits or not in udf only. check a condition as,
if(inputValue.length>0)
{
Put your recent code here.
}
inputValue is field used in recent Code.
Regards,
Rohit.
Reward points if helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check whether node is empty or exist before looping. I think it will solve the problem.
Thanks,
RamuV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your String array has been accessed with an illegal index
Check the UDF
function myudf(String a[[]],ResultList result, Container container)
{
for(int i=0;i<a.length;i++)
if (!(a[<i>].equals("")))
result.addValues(a[<i>]);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
I think your problem is with "array index out of bounds".
You are trying to implement some looping logic when the source node exists. When the node does not exist, you will get error.
To avoid it, you can check whether the node at source exists or not using an udf with exception handling. So, node in the source does not exist, you won't get the mapping error instead you can continue with processing. But the respective node will not be created at target. Thats it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sebin:
You can use "Exists" and "CreateIf" node functions before the function module to check whether the node is present or not.
Exists:
http://help.sap.com/saphelp_nw04/helpdata/en/db/83f7b88528424c9113b15d5e0fb516/content.htm
CreateIf
http://help.sap.com/saphelp_nw04/helpdata/en/d9/3033f96c79674f90e3ab8d101a595b/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.