Application Development 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: 

Native SQL -> DDIC

Former Member
0 Kudos

Hi,

With Native SQL it is possible to create a table in the SQL DB (not in DDIC).

I need to transform the tables created with native SQL from SQL DB to DDIC. Is it possible?

Thanks

Jurko

3 REPLIES 3

Former Member
0 Kudos

Hi Jurko;

Native SQL gives you access to all of the language features of your SQL database, so the answer to your first question appears to be yes. That being said, I have never done it myself but the documentation appears to indicate that you can.

As for question #2, does your database support operations that can retrieve the table layout? If I am reading your question correctly, you are trying to make a DDIC table that has the same layout as a SQL table...?

-John

0 Kudos

Hi John,

I have to do following:

from the txt-file that contains information like:

<i> 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)

)</i>

I have to create a Table in ABAP Dictionary automatic.

Thank you for your answer

0 Kudos

Hi Jurko;

To create the database at the SQL level from ABAP, wrap your code around the EXEC SQL command like this:

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.

I know that will work at the database level, but I doubt the DDIC would recognize it. It seems that Open SQL (for ABAP) can not do it. The best way I know of is either transaction SE11 or SE80.

-John