cancel
Showing results for 
Search instead for 
Did you mean: 

Function to function referencing in Function Library

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

GabrielSagaya
Active Contributor
0 Kudos

I think you are asking for functions in the way of OOPS concepts to make it reusable and effective.

For this You have to write a Java class having multiple methods and you have to import it into imported archives.

Former Member
0 Kudos

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

Former Member
0 Kudos

thanks!

Answers (0)