Skip to Content
avatar image
-2
Former Member

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

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.









Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 29, 2017 at 06:23 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 29, 2017 at 08:18 AM

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

    Add comment
    10|10000 characters needed characters exceeded