‎2005 Jul 29 4:42 PM - last edited on ‎2024 Feb 04 5:17 AM by postmig_api_4
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
‎2005 Jul 29 4:52 PM
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
‎2005 Jul 29 4:58 PM
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
‎2005 Jul 29 5:15 PM
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