Application Development 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: 

bapi_record_getelements way to slow

Former Member
0 Kudos

Good afternoon everybody,

I'm currently working with sap 6.0 HR. A client has documents that are scanned in from an external source and then copied to a person's dossier. However, there is no duplicate checking so what happens is records occur more than once. I'm currently writing a program to check for duplicates.

The program itself works ok, except that it selects documents that are uploaded but aren't in the dossiers yet. To counter this I check to make sure the document is linked via BAPI_RECORD_GETELEMENTS. This works great, in small values. The problem is I'm working with more than 100,000 records at any given time so performance is a real issue. Each call to BAPI_RECORD_GETELEMENTS runs for anywhere from 5 to 15 seconds, and even at best case (4,100 records) this can take up to 5 to 20 hours, and this absolutely not acceptable.

I've tried looking in the BAPI itself hoping that I can just simply recode and remove all the extra junk I don't use, but I'm not sure what's actually going on inside this function.

Can anybody perhaps help shed some light on this issue? Thank you very much!

1 ACCEPTED SOLUTION

former_member196064
Active Participant
0 Kudos

might be able to find something if you trace it through ST05.

Have you tried that yet?

4 REPLIES 4

former_member196064
Active Participant
0 Kudos

might be able to find something if you trace it through ST05.

Have you tried that yet?

0 Kudos

Hi Doug,

No, but just running the module itself through the debugger takes a huge amount of time, and usually with BAPI's it's the case that theres a lot of extra processing going on that you don't need.

former_member196064
Active Participant
0 Kudos

Trim down your dataset, if you can, then trace with ST05

Former Member
0 Kudos

There are performance notes for this BAPI. Have you read them?

Rob