on 09-23-2008 12:22 PM
hi
As per the below blog
I have just modified the UDFs(1.selectnodeifA 2.selectNodeifB)
1.selectnodeifA
for(int i=0;i<=n;i++)
{
if(Name<i>.equals("A"))
result.addValue(Node<i>);
}
2.selectNodeifB
for(int i=0;i<=n;i++)
{
if(Name<i>.equals("B"))
result.addValue(Node<i>);
}
while checking I am getting the following errors
Source code has syntax error:
D:/usr/sap/D10/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapdc8fa4d0896011dd907d001cc01cef0d/source/com/sap/xi/tf/_bpm_mm_.java:132: cannot resolve symbol
symbol : variable n
location: class com.sap.xi.tf._bpm_mm_
for(int i=0;i<=n;i++)
^
D:/usr/sap/D10/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapdc8fa4d0896011dd907d001cc01cef0d/source/com/sap/xi/tf/_bpm_mm_.java:140: cannot resolve symbol symbol : variable n
location: class com.sap.xi.tf._bpm_mm_
for(int i=0;i<=n;i++)
^
2 errors
The source code given in the blog is correct ? I thought for loop has not completed
pls help
manian
Hi manian,
The functions are not the same. I mean, yours and blogs functions.
Each function has two parameters, Name and node. Furtheremore, in the blogs' functions is using arrays and you don't.
So, the right code will be
1.selectnodeifA
for(int i=0;i<=node.length();i++)
{
if(Name<i>.equals("A"))
result.addValue(Node<i>);
}
However, if you don't need an advance user defined function as you want to process just one element of the node's queue, you will not need to use for sentence.
Something like:
1.selectnodeifA
// for(int i=0;i<=n;i++)
// {
if(Name.equals("A"))
result.addValue(Node);
}
Hope it is usefull for you.
Carlos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all and Carlos for your help
but Carlos
when I use the code given by you and during checking
it throws the following error
Source code has syntax error:
D:/usr/sap/D10/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapab3324d2896911ddc983001cc01cef0d/source/com/sap/xi/tf/_bpm_mm_.java:132: cannot resolve symbol
symbol : variable node
location: class com.sap.xi.tf._bpm_mm_
for(int i=0;i<=node.length();i++)
^
D:/usr/sap/D10/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapab3324d2896911ddc983001cc01cef0d/source/com/sap/xi/tf/_bpm_mm_.java:135: addValue(java.lang.String) in com.sap.aii.mappingtool.tf3.rt.ResultList cannot be applied to (java.lang.String[]) result.addValue(Node);
^
D:/usr/sap/D10/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapab3324d2896911ddc983001cc01cef0d/source/com/sap/xi/tf/_bpm_mm_.java:140: cannot resolve symbol
symbol : variable node location: class com.sap.xi.tf._bpm_mm_ for(int i=0;i<=node.length();i++)
^
D:/usr/sap/D10/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapab3324d2896911ddc983001cc01cef0d/source/com/sap/xi/tf/_bpm_mm_.java:143: addValue(java.lang.String) in com.sap.aii.mappingtool.tf3.rt.ResultList cannot be applied to (java.lang.String[]) result.addValue(Node);
^
4 errors
help pls
manian
Hi manian,
Sorry for the code, I think there were some mistakes.
The right code:
1.selectnodeifA
for(int i=0;i<=node.length;i++)
{
if(Name.equals("A"))
result.addValue(Node<i>);
}
Carlos
Edited by: Carlos Gonzalez on Sep 23, 2008 3:00 PM
Edited by: Carlos Gonzalez on Sep 23, 2008 3:01 PM
Edited by: Carlos Gonzalez on Sep 23, 2008 3:02 PM
Edited by: Carlos Gonzalez on Sep 23, 2008 3:03 PM
Hi Carlos
thanks for the code
but i am getting 2 errors while checking
Source code has syntax error:
D:/usr/sap/D10/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Map3469cce2897911ddcdbd001cc01cef0d/source/com/sap/xi/tf/_bpm_mm_.java:132: cannot resolve symbol symbol : variable node location: class com.sap.xi.tf._bpm_mm_
for(int i=0;i<=node.length;i++)
^
D:/usr/sap/D10/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Map3469cce2897911ddcdbd001cc01cef0d/source/com/sap/xi/tf/_bpm_mm_.java:143: cannot resolve symbol symbol : variable node location: class com.sap.xi.tf._bpm_mm_
for(int i=0;i<=node.length;i++)
^
2 errors
manian
Hi Carlos,
Thanks for your help
this is the code
for(int i=0;i<=Node.length;i++)
{
if(Name.equals("A"))
result.addValue(Node<i>);
}
what you have suggested is correct. I had a case-sensitive error.
Now I have solved it .
Now the processing log says
"No errors identified during check"
thank you so much for your help
manian
Hi,
Is n an input in your UDF? If not you need to declare it as integer. That will solve your prob.
Thanks and Regards,
Sanjeev.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are supposed to define 'n' in your mapping.
Edited by: parvathy sriraman on Sep 23, 2008 1:45 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you have to specify what n is in your mapping.
Regards
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.