cancel
Showing results for 
Search instead for 
Did you mean: 

How to create an array of functions

Former Member
0 Kudos

normally I use

repository.getFunctionTemplate(functionName);

to get a function object.

Is there a way to get an array of function objects for a function name.

I am trying to execute multiple functions in the same connection to reduce calls for logging on and off for each call.

Thanks,

Aditya Pandit

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hi Aditya,

From

<a href="https://media.sdn.sap.com/javadocs/NW04s/SPS7/jc/com/sap/mw/jco/IFunctionTemplate.html">JavaDoc</a>:

<i>getFunction

public JCO.Function getFunction()

<b>Creates</b> a function object from the template and returns it

Returns:

the function created from the template

</i>

So, you can reuse function template to create multiple fuctions.

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Thanks for your answer.

I was able to work around with an ArrayList to put multiple functions in it.

Then pass an Object[] got from toArray method of arraylist to my helper execute call.

Then loop and cast each Object back to Function and then execute it.

I have not checked how much savings I make in avoiding multiple xmi log on, log off for each call. will post it later after comparing.

Answers (0)