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

How to retrieve a dataset a time with Native SQL?

Former Member
0 Likes
609

Hi,

I am using Native SQL to get data from a remote DB. Is there anyway to retrieve a dataset a time instead of per record a time? For Oracle, there is Array Processor mechanism to retrieve data set. Can it be used with Native SQL?

Thanks,

Frank

Hi,

I am using Native SQL to get data from a remote DB. Is there anyway to retrieve a dataset a time instead of per record a time? For Oracle, there is Array Processor mechanism to retrieve data set. Can it be used with Native SQL?

Thanks,

Frank

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
577

I would assume that the rules for the specific database would apply when writing the statement in Native SQL. So if Oracle supports it, try writing the statement in native SQL and see if it works. Let us know.

Regards,

Rich HEilman

Read only

0 Likes
577

Native SQL

Native SQL allows you to perform operations on databases over and above those in the Open SQL command set. In contrast to Open SQL, Native SQL supports not only operations on the local database active in the R/3 System, but also on any external databases.

Command set

Native SQL comprises all the static statements of the data definition language (DDL) and the data manipulation language (DML) used by the relational database system concerned. Statements for error handling and declaring host variables are not allowed (and not necessary).

In an ABAP/4 program, a Native SQL command must be introduced by EXEC SQL and concluded by ENDEXEC. To execute a Native SQL command, the database table does not have to be declared in the ABAP/4 Dictionary.

Since the DB language SQL is only partly standardized, you must always get the correct syntax for a Native SQL command from the documentation supplied by the database manufacturer. For this reason, the command set listed here is incomplete, but the following commands are always included:

Transaction management

COMMIT

ROLLBACK

Data definition

CREATE TABLE

DROP TABLE

ALTER TABLE

CREATE VIEW

DROP VIEW

CREATE INDEX

DROP INDEX

GRANT

REVOKE

Data manipulation

SELECT

INSERT

UPDATE

DELETE

DECLARE CURSOR

OPEN

FETCH

CLOSE

Note

Since the DB language SQL is only partly standardized, it is not always possible to run an ABAP/4 program that uses these commands without adjusting the other database system (see Portability). If this is unavoidable, you should use Open SQL.

For further information refer to Native SQL.

http://help.sap.com/saphelp_46c/helpdata/EN/fc/eb3b8b358411d1829f0000e829fbfe/frameset.htm

Regards,

Rich Heilman