‎2007 Sep 04 9:16 PM
Does anyone know if there is any significant performance difference between passing a set of export parameters back from a function module as opposed to putting the parameters in a table and passing back the table. I am working on a function that interprets barcodes and is called thousands of times daily, so performance will be critical.
‎2007 Sep 04 9:43 PM
If you mean pass parameters back and forth thousands of times a day, or pass them once in a table, I'd pass them once in the table.
Or is that what you meant?
Rob
‎2007 Sep 04 9:51 PM
Sorry for my lack of clarity. The information has to be passed immediately when the function is called. There will be thousands of calls and each time 6-10 variables need to be passed back either as parameters or as rows in a table.
‎2007 Sep 04 9:55 PM
Well, you ask is there a "significant" difference. I suspect not, but it should be pretty easy to test using the runtime analysis. Create two FMs that do it each way and execute them multiple times.
Rob
‎2007 Sep 05 5:54 AM
Hi
declaring under the table parameter , it will take lots of memory to execute
SAP advises don't use tables in table parameter use them as exporting or in importing parameters
then only it will be good in the point of performance
don't declare any tables in the table tab
declare that tables under importing or exporting
reward if usefull
‎2007 Sep 11 1:36 PM
Hi,
Is surely just a difference between some microsecos till some millisecond depending of the application server load.
The fastest way to do so is to use pointers (type ref to data) and changing parms.
Example for calling the function module:
data:
wa_1_ref type ref to data,
wa_2_ref type ref to data.
get referenence of wa_1 into wa1_ref.
get referenence of wa_2 into wa2_ref.
call function 'example_function'
changing
ch_parm1 = wa1_ref
ch_parm2 = wa2_ref.
Then your function have to do something like that:
Field-symbols:
<ch_parm1> type YOUR_EXPECTED_TYPE,
<ch_parm2> type YOUR_EXPECTED_TYPE.
assign ch_parm1->* to <ch_parm1>.
assign ch_parm2->* to <ch_parm2>.
*now you can use the field symbols normally
Doing it so, minimize the memory handling for the runtime environment.
Regards,
Gianpietro