Skip to Content
-2

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

Mar 28, 2017 at 07:06 PM

62

avatar image
Former Member
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.









10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Horst Keller
Mar 29, 2017 at 06:23 AM
3

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

Share
10 |10000 characters needed characters left characters exceeded
Matthew Billingham
Mar 29, 2017 at 08:18 AM
0

" 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.

Share
10 |10000 characters needed characters left characters exceeded