‎2009 Oct 28 11:49 AM
Hi:
I have a problem with native sql in abap. I have next code and itu2019s working properly (see below) , but the problem occurs when abap internal table is too big, because exec sql u2026 endexec is executed one time for each internal table line, so it needs too much time.
Do you know any solution? Is it possible to insert the internal table with only one exec sql?
Thanku2019s in advance for your time.
LOOP AT i_table.
EXEC SQL.
insert into oracle_table@db
(value1,
Value2
)
values
(:i_table-val1,
:i_table-val2
)
ENDEXEC.
ENDLOOP.
‎2010 Jan 08 11:48 AM
Definately this approach will take a lot of time.
i would suggest that you create a table, fill that table with the internal table you are using for the insertion and use below mentioned code this will improve your processing time.
Exec SQL.
INSERT INTO
EXEC SQL.
insert into oracle_table@db
(value1,
Value2
)
SELECT COLUMN1, COLUMN2 FROM DUAL
FROM ZTABLE
ENDEXEC.
‎2010 Jan 08 11:48 AM
Definately this approach will take a lot of time.
i would suggest that you create a table, fill that table with the internal table you are using for the insertion and use below mentioned code this will improve your processing time.
Exec SQL.
INSERT INTO
EXEC SQL.
insert into oracle_table@db
(value1,
Value2
)
SELECT COLUMN1, COLUMN2 FROM DUAL
FROM ZTABLE
ENDEXEC.