Find all tables used in a set of programs

I need to find a list of all tables used in all Z programs. Originally I was thinking of getting a list of programs from table TRDIR, using READ REPORT for each one and then using Regex to get a list of tables used in SQL statements. However getting the regex working appears to be more complicated than first expected so I'm looking for other possibilities.

Use SAP standard program RPR_ABAP_SOURCE_SCAN and in the selection parameters
Program Name = Z*
Find String = SELECT
and execute

Similar Messages

  • Find all tables used in a stored procedure

    Hi,
    I have a requirement where i have to find all the tables used in a stored procedures from different  databases.
    Ex: i have a stored procedure where i use few tables from MASTER database and some from STAGE database.When i have written a query to find all tables used in the stored procedure, i am getting only those database table where i run the query and procedure
    exists.
    I have stored procedure SP1 in Master database, but i use the tables from both master and stage.
    When i run this, i am getting the tables only from Master database but not from stage. i hope my requirement is clear.
    I am trying to find all the tables from all databases used by a stored proc.
    ;WITH stored_procedures AS (
    SELECT 
    o.name AS proc_name, oo.name AS table_name,
    ROW_NUMBER() OVER(partition by o.name,oo.name ORDER BY o.name,oo.name) AS row
    FROM sysdepends d 
    INNER JOIN sysobjects o ON o.id=d.id
    INNER JOIN sysobjects oo ON oo.id=d.depid
    WHERE o.xtype = 'P')
    SELECT proc_name, table_name FROM stored_procedures
    WHERE row = 1
    ORDER BY proc_name
    Please advice

    Your question is not entirely clear. You need to run the query on different databases.
    You may find this blog post helpful
    How to get information about all databases without a loop
    Check the last script in that blog post and modify to your particular purpose.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How to find all table and views in the database

    Hi,
    I want to find all table and view name form the database can u tell me syntax.
    i.e. I am able to find out table name and view name in sql server ...like
    FOR VIEW :
    select table_name from information_schema.views where table_name not like 'sys%'
    FOR TABLE :
    select table_name from information_schema.tables where table_name not like 'sys%' and table_type='Base table'
    Thanks & Regards,
    Shirish

    Hello,
    Take a look at "dba_tables" and "dba_views" both of which are documented here:
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14237/toc.htm
    - Mark

  • How to find all tables that are associated with a given domain name.

    I want to find all table, excluding the structures, of a given domain name, say, waers.
    Some of the tables are directly contains the domains while others are related with a data element which is connected to that domain.
    I want to find tables for all two case -either tables connected directly to the domain or connected via data element- and exclude the structures.
    thanks in advance.

    Hi,
    The following thing may help you.
    in se11-> search for tables having names like 'DD*'.
    From this list of tables you can find the required table to get domain, data element nad table name.
    one way of doing it:
    SELECT rollname domname
      FROM dd04l
      INTO CORRESPONDING FIELDS OF TABLE it_tab.
    SELECT rollname tabname
      FROM dd03l
      INTO CORRESPONDING FIELDS OF TABLE it_tab1
      FOR ALL ENTRIES IN it_tab
      WHERE rollname = it_tab-rollname.
    SORT it_tab1.
    DELETE ADJACENT DUPLICATES FROM it_tab1.
    LOOP AT it_tab1 INTO wa_tab.
      MODIFY it_tab FROM wa_tab
      TRANSPORTING tabname
      WHERE rollname = wa_tab-rollname.
    ENDLOOP.
    LOOP AT it_tab INTO wa_tab.
      WRITE:/ wa_tab-domname,
              wa_tab-tabname.
    ENDLOOP.
    Regards,
    Manoj Kumar P

  • How to find a dependent row in the all tables using single SQL query

    hi all,
    I have created some table with master and some dependent tables.I want to mark a (row)tuple as inactive in master so that corresponding child records also should be marked as inactive.
    So i decided to mark the master and dependent records as inactive starting from master table and traverse to child tables.
    So I need SQL query to fetch all dependend records to the row(marked row in the master ) from the master table and dependent rows from the child row and to mark as flag inactive.
    can anybody help me out to build this query or any other way to mark flag as inactive ?
    Regards
    punithan

    You can find dependant tables from ALL_CONSTRAINTS, e.g:
    SQL> CREATE TABLE m (id INT PRIMARY KEY, flag VARCHAR2(1) NOT NULL);
    Table created.
    SQL> CREATE TABLE d1 (m_id REFERENCES m, flag VARCHAR2(1) NOT NULL);
    Table created.
    SQL> CREATE TABLE d2 (m_id REFERENCES m, flag VARCHAR2(1) NOT NULL);
    Table created.
    SQL> SELECT table_name, owner, status
      2  FROM   all_constraints c
      3  WHERE  c.constraint_type = 'R'
      4  AND    ( c.r_owner, c.r_constraint_name ) IN
      5         ( SELECT owner, constraint_name
      6           FROM   user_constraints
      7           WHERE  table_name = 'M'
      8           AND    constraint_type IN ('U','P') );
    TABLE_NAME                     OWNER                          STATUS
    D2                             WILLIAMR                       ENABLED
    D1                             WILLIAMR                       ENABLED
    2 rows selected.There is no SQL command to apply all updates in one go, if that's what you were looking for.
    AFAIK the word "tuple" is for mathematics and relational theory, and does not refer to a physical row in a database.

  • Find custom table used by  which object details

    Hi we have one custom table with only one column.This table is used for value set type 'TABLE'.
    This table was created by some one else earlier than me.In this table contract id values will be stored so that in the value set these values will be appeared as all knows.
    Now the problem is in the value set some of the values(contract ids) are missing.So i need to find out how the insertion is being done like within the package or in any form.
    I have checked in toad object_name-->used by but it shows only synonym of this object.
    Can any one suggest me how to find the insertion into this table is happening.
    Thanks

    how the values are populated into this table like one time insertion or through any procedure/function/package.If you're looking for missing data you might find DELETE access to be just as fruitful a line of investigation....
    You can find out which PL/SQL programs use the table through the _DEPENDENCIES views as Dan has demonstrated.  That will not show you any dependencies on programs which are outside of the database (client or web server apps), nor will it show you access through spontaneous SQL statements.  That's why you need proper audit in place.  Unfortunately you cannot do that retrospectively, but there is always Log Miner.
    Cheers, APC
    blog: http://radiofreetooting.blogpsot.com

  • How to determine all tables used in a series of maps?

    Hi, I'd like to find out all of the tables in the source warehouse builder schemas that are actually being used during ETL. I imported the entire databases at the start of the project, and want to find out which of the 2000 tables are actually being used.
    Is there a simple query I can run against the repository owner views to determine all tables actively being queried?
    Thanks in advance for the help!
    Scott

    Scott,
    maybe the simplest way to report tables usage in mappings is extracting this info from DB dictionary view DBA_DEPENDENCIES.
    Of course this method has several limitations:
    - all mappings must be of type PLSQL
    - all mappings must be deployed to target database
    - maybe it doesn't work for non-Oracle source databases
    For example, this query (when executed in target DWH schema) shows remote databases (and number of used tables in each source DB) used by PLSQL packages (mappings, of course you need to exclude "non-mapping" packages with additional filter)
    select REFERENCED_LINK_NAME,count(distinct REFERENCED_OWNER||'.'||REFERENCED_NAME) from user_dependencies
    where REFERENCED_LINK_NAME is not null and type='PACKAGE BODY'
    group by REFERENCED_LINK_NAME;
    When source and target schemas are in the same DB this query will be different
    (in this this case source system will be identified by REFERENCED_OWNER column and REFERENCED_LINK_NAME will be NULL).
    As I know OWB repository tables/views for lineage/impact analysis are not published/documented by Oracle.
    Regards,
    Oleg

  • Generic Extractors with Fm / Finding out tables used

    Hello Gurus,
    for a requirement, i would like to find out the table used in a generic extractor with function module.
    I can see the structure with the objects used but not the tables where they are from.
    How can i find that out?
    Thank you
    Pat

    Hi Gilo ,
    The best way to find out the tables used in the function module will be to analyze the code . Check all your Select Statements in the code and see the tables being used there .
    Sometimes in the code , we use standard function modules from the ECC. Check those standard FMs also and see what table they are using .
    Hope the above reply was helpful.
    Thanks & Regards,
    Ashutosh Singh

  • How to find objects ( tables) used in SP

    Is there any query with which I can find all the tables used ( to perform Select Insert Update Delete operation) in a procedure in oracle 10g.
    I want to take back up of all the tables used in a particular. but it is becoming difficult to find by looking at line by line as the sp is of 3K + lines.

    With USER_DEPENDENCIES view :
    SELECT referenced_owner, referenced_name
    FROM user_dependencies
    WHERE type = 'PROCEDURE'
    AND name = 'YOUR_SP_NAME'
    AND referenced_type = 'TABLE'
    ;

  • Find all tables in db with column name of a particular string?

    I'm looking for all tables in a db that have a certain column name. How can I find this?

    John,
    thanks for your answer.
    John Mcginnis wrote:
    The quick search field in the schema browser is doing client-side filtering of the list of objects. This means we can only filter on things that we already have fetched from the database, like the object name. We have no current plans to extend the types of information that can filter on, although it is possible we might add the ability to filter based on a few other types of information that we generally fetch with the object name. However, filtering by column name would require pre-fetching the lists of columns for all tables and as such is not likely to be added to the schema browsers search field.
    I'm sure you guys had a Toad review to understand how things are done there.....so
    My 2 cents are: instead of pre-fetching the columns of all tables why don't you add a button below the table drop-down list which should fetch the tables based on the filter columns condition - exactly like Toad.
    Thanks,
    Dani

  • Find all tables who don't have at least one DATE column

    DB version:10gR2
    Using user_tab_cols view, How can i find the tables who don't have at least one DATE(user_tab_cols.data_Type='DATE') column?

    SELECT table_name
      FROM user_tables
    WHERE table_name NOT IN  ( SELECT DISTINCT
                                      table_name
                                 FROM user_tab_cols
                                WHERE DATA_TYPE  = 'DATE'
                             );Regards
    Arun

  • Finding all tables of a database

    hi,
    i want to find out all table of a database .
    how could i.
    thnx

    try this
    DatabaseMetaData dbmd=con.getMetaData();
    ResultSet rsTable=dbmd.getTables(null,null,"%",null);
    while (rsTable.next())
    //String tableCatalog = rsTable.getString(1);
    //String tableSchema = rsTable.getString(2);
    System.out.println("Table Name - "+rsTable.getString(3)+" - catalog  - "+rsTable.getString(1)+" - schema - "+rsTable.getString(2)+" - Type - "+rsTable.getString(4));
    rsTable.close();

  • How find all un-used/in-active ASA rules

    Hello,
    I am tasked to identify all un-used, in-active, and idle rules in Cisco ASA firewalls.
         I have access to CSM. But in CSM, I do not know how create such a report. I would be grateful if someone can help to create such a report. 
         If CSM does not support such a report, I will be grateful if someone can help to use CLI to figure out such rules.
    thanks in advance
    Bo              

    Hi,
    Do u mean the ACL rules which is inactive/idle for a long time????
    If it is ACL rules then sh access-list | in (hitcnt=0) and check. But this may not conclude that it is invalid. Because the endusers uses that flow on a rare cases also. Be sure on this one.
    for interface ACL's you can check sh access-group and check how many ACL's configured and used on interfaces.
    If it is used for VPN or NAT then you need to check NAT configurations and VPN configurations with the rule name.
    Or best way you can take the sh run and find ACL name which is used or not used. like if it is an valid ACL then apart from the ACL lines it should be mapped somewhere either in access-group/NAT/VPN configs.
    By
    Karthik

  • How to find out sites using MMS term sets

    Hi,
    We have many site collections utilizing MMS termsets and terms across libraries and lists.  Is there a way to take out an extract across the farm as to which sites/libraries/lists are using which term sets or terms?
    Shonilchi..

    Hi Shonilchi,
    You can try iterating each site and list, check if there is a managed metadata column in a list then iterate each list item to read managed metadata column value, and output to a file programmatically.
    http://sharepoint.stackexchange.com/questions/65066/how-to-programatically-tell-if-a-field-is-a-taxonomy-managed-metadata-field
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/677028e8-de4f-484a-9405-41a85f1b3071/read-taxonomy-field-value-of-a-list-item-from-sandbox-webpart
    Thanks
    Daniel Yang
    TechNet Community Support

  • Internal table used by sap in a program

    Hi,
    I want to know the list of internal tables used in a program (including sap program).
    while debugging i want to view the data stored in it.
    I know the internal tables used by me. Before loading the program sap will load some information into internal table. How to know that.
    Advance Thanks.

    Internal tables, not transparent ones.
    In the old debugger, goto->system areas->internal information and look ITAB_HEADS.  This will show you the name of the tables in the system.  SYMBDATANM will show you all variables in memory.
    In the new debugger, it's even easier.  There's a global tab in the variables area, that tells you all variables in memory.  And you can see the variable type - i.e. if it is a table.
    matt

Maybe you are looking for

  • How to open ports in Leopard?

    I need to open some ports for an application. The applet in System Preferences for this is gone since Leopard. Where do you configure ports in OS X 10.5?

  • Calibrating dual displays

    i recently was able to hook up a second display (for testing) to my power mac G4. i loved it and i now want to get a 2nd 20" cinema display. my question is when i calibrated my original display (using a pantone spyder) it created a profile for the di

  • Spelling error: Days of the week

    Hello Gurus,        I defined the character length as 9 but still the days of the week shows an error with fields like Wednesday and Saturday. It just shows as Wednesdy. Is it defined by SAP that way or where does the problem lie. I mean the custom o

  • Q10 crashing my computer

    Hello.  I recently got a Q10.  I downloaded BB Link to transfer some of my data ... as you know it won't transfer all of it.  I did this and all seemed to go as well as expected.  a Few days later when I plugged my phone back into my computer, it cra

  • Spry with AutoSuggest

    I am new to spry and I have been able to get autosuggest to work without a problem. Except that now, I want to search the same xml file using multiple searches with multiple search fields at the same time. I want to have about 6 different search fiel