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

ABAP - Performance Issue

Former Member
0 Likes
791

ISU u2013 ABAP

Our requirement is select all data from a data base table (EANL) and for each entry in EANL, populate/modify data in a table (ETTIFN) using a standard BAPI.

Now, problem is the BAPI in question can update one entry at a time so we are looping the table EANL and calling the BAPI in loop. When I executed this in background it seems taking more than 10 days to populated/update 500,000 entries in ETTIFN table.

As per current logic u2013

Select f1 into t_eanl

from EANL.

Loop at t_eanl.

Call BAPI XXX (to poplate ETTIFN table)

Commit BAPI.

Endloop.

We canu2019t find any other BAPI to update ETTIFN table in bulk. Is there any other way to make this code faster/better.

Any sort of suggestion is welcome.

Regards,

Sanjoy

1 ACCEPTED SOLUTION
Read only

paul_bakker2
Active Contributor
0 Likes
728

Hi,

That runtime seems unbelievable! Even if you found a BAPI that handled multiple entries, the runtime would likely still be unacceptable.

My advice:

- search OSS for notes that mention this BAPI and 'performance'

- search SDN (I assume you've done these)

- watch the program running via SM50 to get an idea where the bottleneck is

- if it seems to get stuck on a database table, run an ST05 trace

- if it's a problem in the code, try an SE30 trace.

hope this helps

Paul E Bakker

5 REPLIES 5
Read only

Former Member
0 Likes
728

Dear sanjoyhudait,

Maybe you can debug your program first to know in which section that spent more time when executed, so you can know why your program spent very long time when executed..

Regard's

Andri

Read only

paul_bakker2
Active Contributor
0 Likes
729

Hi,

That runtime seems unbelievable! Even if you found a BAPI that handled multiple entries, the runtime would likely still be unacceptable.

My advice:

- search OSS for notes that mention this BAPI and 'performance'

- search SDN (I assume you've done these)

- watch the program running via SM50 to get an idea where the bottleneck is

- if it seems to get stuck on a database table, run an ST05 trace

- if it's a problem in the code, try an SE30 trace.

hope this helps

Paul E Bakker

Read only

ravi_lanjewar
Contributor
0 Likes
728

Hi,

You can used the statement SET UPDATE TASK LOCAL before call BAPI inside the loop.


Loop at t_eanl.

SET UPDATE TASK LOCAL.

Call BAPI XXX (to poplate ETTIFN table)

Commit BAPI.

Endloop.

It will give better performance for run in background.

Read only

abdulbasit
SAP Mentor
SAP Mentor
0 Likes
728

Hi,

- just an idea -

instead of calling commit for each bapi call, try calling commit for each 50 or maybe 100 records.

Regards

Abdul.

Read only

Clemenss
Active Contributor
0 Likes
728

Hi Sanjoy,

do as Abdulbasit suggested. You can try much more, try 1000 Calls before committing.

You can create a couple of Jobs (4-6) with intervals and start them all together at the same time. Together with the Commmit per 1000 updates, it will be done within half a day.

Regards,

Clemens