on 03-26-2012 11:01 AM
Hi All
I have writted UDF to check the condition it is working fine in the Eclipse but when i test it in the XI it is not working as expected
The first if condition is not working
Any suggestions
if (a.equals("F") && (b != ("03")))
{
c="test";
System.out.println(c);
}
else if(a.equals("F") && (b.equals("3")))
{System.out.println("PMI");}
else if (a.equals("E"))
{
System.out.println("FAB");
}
else if (a.equals("X"))
{
System.out.println("MIX");
}
else
{
System.out.println("NA");
}
}}
Hi Sankar,
Simply replace each occurrence of System.out.println("SOMETHING") with result.addValue("SOMETHING") or return("SOMETHING") (depending on the Execution Type of your UDF - single values or all values of context/queue) and it should work as expected.
Also make sure to avoid doubleposting your questions in multiple forums - posting a thread once is enough to receive valuable inputs.
Hope this helps,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
This is the code the problem is first if condition if i put .equals and != is not working please suggest any other way to do this
String a = BESKZ;
String b = MARC;
String c ="";
if (a.trim().equals("F") && (Integer.parseInt(b.trim())!=03))
{
c="POP";
}
if(a.equals("F") && (b.equals("03")))
{
c ="PMI";
}
else if (a.equals("E"))
{
c="FAB";
}
else if (a.equals("X"))
{
c="MIX";
}
else
{
c="NA";
}
return c;
just an update on the points system - http://scn.sap.com/docs/DOC-18475
Scroll down to the section How do I award points in Discussions? in the document (scroll down since link will not work)
Hi
if (a.equals("F") && (b != ("03")))
Just try this
If (a.equals("F") && b != "03")
Regards,
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Sankar,
Give the first if condition as
if(!("03").equals(b) && "F".equals(a))
Use return not system.out.println, it will not work here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if (a.equals("F") && (b != ("03")))
>>>
check the syntax for this line.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use return instead of system.out.pritln
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.