on 10-10-2007 9:32 PM
Hi all,
I have a UDF that makes an RFC Lookup to get some parameters from ECC. Some of these parameters are used in many different fields. So, to not call the UDF with RFC Lookup to the same parameter many times, I create a global variable at "Java Sections" and would like to load this variable on the Initialization Section, like this
myVariable = myUDF("param");
But the "myUDF" is not found using by this way.
The "natural" workaround would be to make a mapping to the root node of target message setting the value to the Global Variable, but if some of you know how to call UDF's directly at the Initialization Section I think it could help in other more complex scenarios.
regards.
roberti
You cannot call a UDF in the Java Section.
One simple and better workaround though -
1. Create a Java Class that does your RFC lookup . You would need to define method in this class that Performs the lookup and return the appropriate data to you.
2. Import this class in the imported archive.
3. In the java section call this class, by creating an object for this class and get the required output from the class.
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
a simple solution is to have a boolean parameter set with false in your java section.
Then, in your UDF, do it like this:
if (param = false) {
//do lookup and update java section variables with proper value;
param = true;
}
It will only lookup the 1st time the function is called.
Regards,
Henrique.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
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.