04-20-2006 6:16 PM
Is it possible to create a view in SE11 using an aggregate SQL function?
I.e., I want the generated SQL to look like:
CREATE VIEW z_tbl
(
A,
SUM_AMT
)
AS SELECT
A,
SUM(AMT)
FROM TBL
GROUP BY A
Thanks for any help.
04-20-2006 6:53 PM
Executes the Native SQLstatements enclosed between EXEC SQL and ENDEXEC statements. Unlike Open SQLNative SQL statements can address tables that are not declared in theABAP Dictionary.
Example
Creating the Table AVERI_CLNT:
EXEC SQL.
CREATE TABLE AVERI_CLNT (
CLIENT CHAR(3) NOT NULL,
ARG1 CHAR(3) NOT NULL,
ARG2 CHAR(3) NOT NULL,
FUNCTION CHAR(10) NOT NULL,
PRIMARY KEY (CLIENT, ARG1, ARG2)
)
ENDEXEC.
04-20-2006 6:59 PM
Thanks, Peluka.
But if I create a view using Native SQL, I believe that the view won't exist in the ABAP dictionary. Will that mean that I can only access the view using NATIVE SQL, rather an OPENSQL?
I think our Basis guy might frown upon it, too.