Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Execution of function module

Former Member
0 Likes
527

Hi all,

In a report Function module is inside a loop and the internal table of the loop is having 4 records

What i need is instead of running the function module 4 times for each record i want to run the function module only once for the 4 records ata time

because it will improve the performance

how can i approach do this .

Thanks in advance

Ajay

3 REPLIES 3
Read only

Former Member
0 Likes
470

Hi,

You can pass complete table to your FM. No need to keep it in loop and pass work area everytime.

Thanks,

Archana

Read only

0 Likes
470

Hi,

I cant change the code of the function module..

Thanks

Ajay

Read only

Former Member
0 Likes
470

Hi,

it is not possible to do that for all records if you are using SAP's standard function module

YOu have two option

1. if you are using your own function module , instead of passing 1 record at a time , pass full inernal table in table parametrs.modify your FM accordinly.

2. If you are using SAP's FM . Try to find out any other FM which can help you to process all the records at single call.If it is not possible the final soluton is create a new FM and pass the whole interal Table (if internal table is very big . pass it by refrence to improve the performance).

Thanks,