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

Avoid INSERT in LOOP for INSERTING third party DATABASE using NATIVE SQL COMMANDS

Former Member
0 Likes
1,660
Hello Experts,

I am trying to update a database tables in a thirdparty system - with data 
which is extracted from SAP using NATIVE SQL COMMANDS.

LOOP at ITAB into WORK_AREA.
EXEC SQL.
<CODE>
<INSERT>
ENDECEC.
ENDLOOP.

The amount of data i am trying to INSERT is in MILLIONS and INSERT record byrecord is causing performance impacts. Now in order to avoid this is there
any alternate way to avoid INSERTING records between LOOP...ENDLOOP. Like
using a single INSERT statement for updating all records at once?

I came across same question in multiple thread - None of them had a respons
which would answer this? I understood that this can achieved using 
ADBC Framework(ABAP DATABASE CONNECTION), But currently we do not have 
SAP HANA system nor my client was inclined toward that at the moment.

Links which i came across:
https://archive.sap.com/discussions/thread/1833935
https://archive.sap.com/discussions/thread/1286350

CAN THIS BE DONE?

Any suggestion on this would be great. 

Greets,<br>Karthi.









1 ACCEPTED SOLUTION
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
1,143

Bulk access is available in ADBC since release 7.40, SP02. See example.

2 REPLIES 2
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
1,144

Bulk access is available in ADBC since release 7.40, SP02. See example.

Read only

matt
Active Contributor
0 Likes
1,143

" I understood that this can achieved using ADBC Framework(ABAP DATABASE CONNECTION), But currently we do not have SAP HANA system"

ADBC is not a HANA only technology. Use ADBC.