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

EXEC SQL & CREATE TABLE

Former Member
0 Likes
1,046

Hi,

I am trying to create table using EXEC SQL. But, the table that I had created using EXEC SQL is not shown in data dictionary. I can not see that table from SE11. If I run the same program again, then gives error about there is already a table that I want to create. So, How can see it? Is seeing that table possible?

EXEC SQL.
CREATE TABLE ZCOPYTABLE(
NAME CHAR(15) NOT NULL,
SURNAME CHAR(15) NOT NULL,
TEL CHAR(10) NOT NULL,
PRIMARY KEY (NAME, SURNAME)
)
ENDEXEC.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
698

Hello Huseyin,

I don't think you can use the Native SQL statements for DDL (data definition language) statements in SQL.

The reason is that the Native SQL statements by-pass the SAP Application Server and are executed directly at the Database Server. You will find more information on the SAP Online Help Documentation site.

Since the ABAP Dictionary is very much an application, it fails to recognize the tables which were not created through it.

The DDL statements in Native SQL are only for advanced database adminstration tasks.

Hope this helps.

Regards,

Anand Mandalika.

2 REPLIES 2
Read only

Former Member
0 Likes
698

Hi,

you cannot see this table, because using exec sql, you created it directly on the database, without creating dictionary entries (using se11). But anyway, your table exists on the database. If you want to see that table you need to goto your database using sql+ for example. Another option is using ms-query to connect to the database using odbc ...

Which database are you on?

regards

Siggi

Read only

Former Member
0 Likes
699

Hello Huseyin,

I don't think you can use the Native SQL statements for DDL (data definition language) statements in SQL.

The reason is that the Native SQL statements by-pass the SAP Application Server and are executed directly at the Database Server. You will find more information on the SAP Online Help Documentation site.

Since the ABAP Dictionary is very much an application, it fails to recognize the tables which were not created through it.

The DDL statements in Native SQL are only for advanced database adminstration tasks.

Hope this helps.

Regards,

Anand Mandalika.