Skip to Content
author's profile photo Former Member
Former Member

EXEC SQL & CREATE TABLE

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 15, 2005 at 12:37 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 15, 2005 at 12:05 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.