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

Batch update through a Function Module

shweta_walaskar2
Contributor
0 Likes
1,232

Hi,

I am required to generate output through a Function Module for specific input parameters.This Function Module takes two fields from a table as input to produce the output.I have to call this Function Module for all the records in the table(approx 5000 entries) and each record takes approx. 5-7 seconds.

Is there any efficient way to achieve the same in batches(say 100 or 10 at a time,in parallel) instead of looping through each and every record in the table.

Kindly revert with the reply.

Thanks!

Best Regards,

Shweta

5 REPLIES 5
Read only

Former Member
0 Likes
867

Hi,

Instead of looping outside the FM you can pass it as a Table into the FM and treat it "inside" your function module. It should help to reduce the processing time.

Regards,

AK

Read only

Former Member
0 Likes
867

Hi!

No, there is no parrellel processing here in ABAP within 1 program...

You have to speed up your FM. This is not "normal" to process 1 record for 5-7 seconds...

Use SE30 transaction to the runtime analysis...

The normal speed is at least 100 record/1 second...

Regards

Tamás

Message was edited by:

Tamás Nyisztor

Read only

0 Likes
867

How can you say this

'The normal speed is at least 100 record/1 second...'

It depends on what he is doing in the function module. He could have a wait statement in it for 5 seconds for all you know.

Also it will depend on the speed of the system.....

I HATE PEOPLE WHO MAKE STUPID COMMENTS LIKE THIS!!!!!!!!!!!!!

IT IS POINTLESS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Read only

Former Member
0 Likes
867

Hi Shweta,

I dont think you can pass the data in batches. Moreover, even if you find a way to pass the data in batches i dont think it would reduce your execution time because the total no of documents will remain same. Correct me if I am wrong.

Regards

Sourabh Verma

Read only

Former Member
0 Likes
867

If the FM is custom, modify it in order to pass an internal table as input in order to do everything in the FM.

If not, in the main program submit a second program more times and pass to it an internal table with about 100 records that will be the input to the FM

I mean:

Report MAIN.

fill tb_one with 100 records

fill tb_two with 100 records

.....

submit program SECONDARY using tb_one

submit program SECONDARY using tb_two

.....

Report SECONDARY.

loop at tb_X.

CALL FM

input1 = tb_X-input1

input2 = tb_X-input2

endloop.

Hope this helps