on 08-06-2009 1:12 PM
If you have many functions within your function library, is there a way to reference another as to not have redundant code? Or is each function within the library completely separate?
Yes, I know i can simply copy the code out of a specific function and add it into another functions code, but I am hoping for an option that allows for easier, one location, maintenance.
Thanks in advance
Logan,
Yes you can do it. Please check this blog:
/people/william.li/blog/2008/01/02/sap-pi-71-mapping-enhancements-series-share-user-defined-functions
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That does not answer my question at all...
I know I can make functions and use them in the mapping, but I would like to make a complex function that uses the code of another function within it's own code.
I am not having an issue with using function libraries or importing shared libraries, but within a library, can i use one function as a part of another function
Dan
Hi Daniel,
To achieve You want, you need to define each function as static. Then You can cal the function of this way:
import mypackage.myFunctionclass;
public class mycomplexFunctionClass{
private void complexfunction(){
int a = myFunctionclass.function1();
/*It is not necessary to instance the class, only add the correct reference taking account the correct
and complete class name(it includes the package)*/
}
}
Regards
Ivan
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
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.