Syntax
To find a table you are looking for, you can use the sap_show_tables
function. This function returns a list of all available tables in the SAP ERP system.
The function has the following signature:
SELECT * FROM sap_show_tables([TABNAME = "<tablename>"], [TEXT = "<search string>"])
Example usage
SELECT * FROM sap_show_tables()
This will return a (long) list of tables. To find a specific table, you can supply a search string to the function. The search string is matched against the table name and the table description. For example, to find all tables starting with FLIGHT
you can use the following query:
SELECT * FROM sap_show_tables(TABNAME='*SPFL*')
If you are not familiar with the internal naming scheme of SAP tables you can also use the sap_show_tables
function to find tables by their description text. For example, to find all tables containing the words Flight Schedule
you can use the following query:
SELECT * FROM sap_show_tables(TEXT='*Flight Schedule*')