<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Reverse- Re Engineering Structers or Tables to SQL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664568#M1574375</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the basic idea is to get rid of laboursome keypad hitting work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my plan is:&lt;/P&gt;&lt;P&gt;to get a basic ANSI SQL compatible Create table,&lt;/P&gt;&lt;P&gt;to throw it into a database,&lt;/P&gt;&lt;P&gt;reeingeneer the physical model with an ER Modeller,&lt;/P&gt;&lt;P&gt;and than refine it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function Modules would help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have a glue which they are ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best wishes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Feb 2011 08:10:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-02-24T08:10:52Z</dc:date>
    <item>
      <title>Reverse- Re Engineering Structers or Tables to SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664564#M1574371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for some ABAP code sniplets&lt;/P&gt;&lt;P&gt;to reverse engineer ABAP structure, tables or datatypes&lt;/P&gt;&lt;P&gt; to a SQL Create table statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Feb 2011 10:39:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664564#M1574371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-21T10:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse- Re Engineering Structers or Tables to SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664565#M1574372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you insist on ABAP?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would use database tools.&lt;/P&gt;&lt;P&gt;The main drawback though: There is no generic answer; it will depend on the database.&lt;/P&gt;&lt;P&gt;Another drawback: &lt;EM&gt;Transparent&lt;/EM&gt; tables only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of Oracle, I'm using the &lt;EM&gt;dbms_metadata&lt;/EM&gt; package. It works well for tables and indexes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Feb 2011 12:42:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664565#M1574372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-21T12:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse- Re Engineering Structers or Tables to SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664566#M1574373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the major point behind this post  is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- the &lt;STRONG&gt;Code Sniplet should be in ABAP to transform SAP structers&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The reason is:&lt;/P&gt;&lt;P&gt;- get a &lt;STRONG&gt;basic SQL ( Create Table)&lt;/STRONG&gt;  of an SAP/BI Extractstructure&lt;/P&gt;&lt;P&gt;- build SQL Tables according to the definition of this structure&lt;/P&gt;&lt;P&gt;- the SQL dialect can be Database ystem independent or does not  matter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ThanXs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Feb 2011 13:02:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664566#M1574373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-21T13:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse- Re Engineering Structers or Tables to SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664567#M1574374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SQL to create an SAP table on the DB is highly DB-specific. Some DBs offer a SQL command "CREATE TABLE ... LIKE ...". If this available for you, this would be the easiest way.&lt;/P&gt;&lt;P&gt;There are function modules written in ABAP available to create SQL commands to create tables (including primary keys), views and indexes. But as far as I know they are all not intended to be used in customer programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 21:24:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664567#M1574374</guid>
      <dc:creator>JanStallkamp</dc:creator>
      <dc:date>2011-02-23T21:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse- Re Engineering Structers or Tables to SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664568#M1574375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the basic idea is to get rid of laboursome keypad hitting work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my plan is:&lt;/P&gt;&lt;P&gt;to get a basic ANSI SQL compatible Create table,&lt;/P&gt;&lt;P&gt;to throw it into a database,&lt;/P&gt;&lt;P&gt;reeingeneer the physical model with an ER Modeller,&lt;/P&gt;&lt;P&gt;and than refine it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function Modules would help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have a glue which they are ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best wishes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 08:10:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664568#M1574375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-24T08:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse- Re Engineering Structers or Tables to SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664569#M1574376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if I fully understand your issue. And I would like to mention once again that the CREATE TABLE statements that are created from the DDIC are very different for different DBs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can use is the class CL_SQL_METADATA. There are implementations for all DBs supported by SAP and with methods like GET_COLUMNS you can get a list of all columns of a table, their order and their datatype on the database. Then you can get information about indexes, primary keys... But keep in mind that there are some special cases. Special indexes only available on some databases, pool tables, cluster tables... This class is getting the information from the DB, not from the DDIC. Please keep in mind that the DB-view might be different from the DDIC view. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another approach:&lt;/P&gt;&lt;P&gt;Use the following function modules. &lt;/P&gt;&lt;P&gt;   DD_GET_NAMETAB -&amp;gt; DD_MAP_NAMETAB_TO_DDFIELDS -&amp;gt; DB_CREATE_TABLE_S&lt;/P&gt;&lt;P&gt;The last one (use no_exec = 'X'!) will create a table with the SQL statements to create a table. unfortunately in this simple combination you don't get handling of all special cases (I think information about 'nullable' is lost, no use of DDSTORAGE...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please keep in mind that you are dealing with DDIC-internal functionality that is not intended to be used directly by customers. Inproper use may destroy your system. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 08:59:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664569#M1574376</guid>
      <dc:creator>JanStallkamp</dc:creator>
      <dc:date>2011-02-24T08:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse- Re Engineering Structers or Tables to SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664570#M1574377</link>
      <description>&lt;P&gt;Please visit &lt;A href="https://github.com/ojnc/abapcode"&gt;https://github.com/ojnc/abapcode&lt;/A&gt;&lt;BR /&gt;Download and try &lt;STRONG&gt;ymultabflds.abap&lt;/STRONG&gt;&lt;BR /&gt;SAP table names are famously cryptic; SE11 shows you 1 at a time&lt;BR /&gt;&lt;EM&gt;Run with input ymtinp.txt&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Save Output as ymtout.txt&lt;/EM&gt;&lt;BR /&gt;Not very pretty but very useful!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ymultabflds&lt;/STRONG&gt; helped me between 2004 to 2014&lt;BR /&gt;I use it for &lt;STRONG&gt;quick reference&lt;/STRONG&gt; and also for my native SQL utility in &lt;A href="https://github.com/ojnc/yes4sql"&gt;https://github.com/ojnc/yes4sql&lt;/A&gt;&lt;BR /&gt;YES4SQL being "module pool" can only be installed with &lt;STRONG&gt;abapgit&lt;/STRONG&gt;&lt;BR /&gt;Back to SAP after 8 year gap and S4/HANA aspirant&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 11:03:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-re-engineering-structers-or-tables-to-sql/m-p/7664570#M1574377</guid>
      <dc:creator>P281512</dc:creator>
      <dc:date>2022-04-15T11:03:48Z</dc:date>
    </item>
  </channel>
</rss>

