How to find the dependency information for views?

Hi All,
There is reuirement where in we have to find the dependency information for all the tables which are used in particular view...along with remote database connections.. For this we have tried to use following query..
Select * from user_dependencies
start with name =’SAMPLE_VIEW’
connect by prior trim(referenced_name)=trim(name);
The view consists of three tables :
Create view sample_view as
select t1.col1,
T2.col2,
T3.col3,
From
Table1,
Table2@prd1,
Table3@prd2
Where
T1.col5=t2.col5
And T1.col5=t3.col5;
But the ouptut is :
name     Type     Reference_name     Reference_type     Reference_link_name
sample_view     View     Table1     Table     null
So what will be the magic query which will give the all the tables in the view sample_view??
Desired result:
name     Type     Reference_name     Reference_type     Reference_link_name
sample_view     View     Table1     Table     null
sample_view     View     Table2     Table     prd1
sample_view     View     Table3     Table     prd2
Thanks all in Advance!!

Thanks all for the help!!
So right now, inorder to find the dependency informations for views there is no direct query :(
As per the michaels post, i have developed some query ....just joining the table....which will give the source code of the object... :)
The query is :
select view_name,db_link,owner, substr(to_char(text),instr(to_char(text),'.',1,2),instr(to_char(db_link),'@')) as _Final_result_,
substr(to_char(text),instr(to_char(text),'.',1,2),20),text from (
select a.view_name,b.owner,a.db_link,dbms_metadata.get_ddl ('VIEW', a.view_name) text
from (
select view_name, db_link
  from (select view_name, dbms_metadata.get_ddl ('VIEW', view_name) text
          from user_views ),
       user_db_links
where upper (text) like '%@' || nvl (substr (db_link, 1, instr (db_link, '.') - 1), db_link) || '%' ) A,
all_views B
where
A.view_name=b.view_name
and b.view_name='VW_TESTING') The sampe view is :
create or replace view VW_TESTING
as select A.F_DRUG_SKEY,B.F_DRUG_ID
from dma_info.MORE_SOME_FTF_DRUG@info A,dms_prf.MORE_SOME_FTF_DRUG_FACTOR@info B
where a.F_DRUG_ID=b.F_DRUG_ID and
rownum<=5 The output of these query is :
Final_result
MORE_SOME_FTF_DRUG@info A,dms_prf.MORE_SOME_FTF_DRUG_FACTOR@info B where .F_DRUG_ID=b.F_DRUG_ID and rownum<=5 In short through source code, I am trying to find those object name which are preceding the "@' sign...please let me know if this can be workaround for finding the dependencies of objects in view... :(
Thanks!!
Edited by: user8915904 on Dec 28, 2009 11:22 PM

Similar Messages

  • Is there any way to find out the dependency information for column of view?

    Does Oracle provide some view / table / pl/sql pkgs to find out the dependency information for column of view ?
    For example, there are two table mytable1 (col1 varchar2(10), col2 date) & mytable2 (col1 varchar2(10), qty int), and there is one view myView as
    select mytable1.col1, col2, qty from mytable1 inner join mytable2 on mytable1.col1 = mytable2.col
    Can I get some information such as myView.col1 is come from mytable1.col, myView.col2 is come from mytable1.col2, myView.qty is come from mytable2.qty
    ?

    I can get the information about the columns list in table/view from ALL_TAB_COLUMNS table, but I wish to know the column in the view is come from which original table's column.
    Is there any way to find it out from Oracle meta data / through any PL/SQL packages ?

  • How to find the creation date for a released requests..

    Hi friends ,
    In se09 tcode , we a date which represents the last changed date .. Now , for a particular Released request i want to find out the Creation date for it . How can i find it . I checked the tables like E070create there also we have requests that not released yet , i have also checked se03 and other tcode and a fn mo dules like TR_READ_GLOBAL_INFO_OF_REQUEST .
    So how to find the creation date for a released requests. Iam waiting for ur inputs..
    Thanks in advance..

    hi,
    Did u found the way to get the request creation date?
    I also need the same information.
    This needed for audit purpose........so it is must.
    Please help me in this.
    Best regards,
    vinod

  • How to  find the user exit for a screen..

    Hi,
    plz help me how to find the user exit for a screen..?
    Regards
    Anbu

    Hi,
    check this program this will give you the list of user-exit and BADI for the perticular Tcode.
    REPORT  zuserexit_badi.
    TABLES : tstc,
    tadir,
    modsapt,
    modact,
    trdir,
    tfdir,
    enlfdir,
    sxs_attrt ,
    tstct.
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    PARAMETERS : p_tcode LIKE tstc-tcode,
    p_pgmna LIKE tstc-pgmna .
    DATA wa_tadir TYPE tadir.
    START-OF-SELECTION.
      IF NOT p_tcode IS INITIAL.
        SELECT SINGLE * FROM tstc WHERE tcode EQ p_tcode.
      ELSEIF NOT p_pgmna IS INITIAL.
        tstc-pgmna = p_pgmna.
      ENDIF.
      IF sy-subrc EQ 0.
        SELECT SINGLE * FROM tadir
        WHERE pgmid = 'R3TR'
        AND object = 'PROG'
        AND obj_name = tstc-pgmna.
        MOVE : tadir-devclass TO v_devclass.
        IF sy-subrc NE 0.
          SELECT SINGLE * FROM trdir
          WHERE name = tstc-pgmna.
          IF trdir-subc EQ 'F'.
            SELECT SINGLE * FROM tfdir
            WHERE pname = tstc-pgmna.
            SELECT SINGLE * FROM enlfdir
            WHERE funcname = tfdir-funcname.
            SELECT SINGLE * FROM tadir
            WHERE pgmid = 'R3TR'
            AND object = 'FUGR'
            AND obj_name EQ enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
        SELECT * FROM tadir INTO TABLE jtab
        WHERE pgmid = 'R3TR'
        AND object IN ('SMOD', 'SXSD')
        AND devclass = v_devclass.
        SELECT SINGLE * FROM tstct
        WHERE sprsl EQ sy-langu
        AND tcode EQ p_tcode.
        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
        WRITE:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        SKIP.
        IF NOT jtab[] IS INITIAL.
          WRITE:/(105) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
    Sorting the internal Table
          SORT jtab BY object.
          DATA : wf_txt(60) TYPE c,
          wf_smod TYPE i ,
          wf_badi TYPE i ,
          wf_object2(30) TYPE c.
          CLEAR : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
          LOOP AT jtab INTO wa_tadir.
            AT FIRST.
              FORMAT COLOR COL_HEADING INTENSIFIED ON.
              WRITE:/1 sy-vline,
              2 'Enhancement/ Business Add-in',
              41 sy-vline ,
              42 'Description',
              105 sy-vline.
              WRITE:/(105) sy-uline.
            ENDAT.
            CLEAR wf_txt.
            AT NEW object.
              IF wa_tadir-object = 'SMOD'.
                wf_object2 = 'Enhancement' .
              ELSEIF wa_tadir-object = 'SXSD'.
                wf_object2 = ' Business Add-in'.
              ENDIF.
              FORMAT COLOR COL_GROUP INTENSIFIED ON.
              WRITE:/1 sy-vline,
              2 wf_object2,
              105 sy-vline.
            ENDAT.
            CASE wa_tadir-object.
              WHEN 'SMOD'.
                wf_smod = wf_smod + 1.
                SELECT SINGLE modtext INTO wf_txt
                FROM modsapt
                WHERE sprsl = sy-langu
                AND name = wa_tadir-obj_name.
                FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
              WHEN 'SXSD'.
    For BADis
                wf_badi = wf_badi + 1 .
                SELECT SINGLE text INTO wf_txt
                FROM sxs_attrt
                WHERE sprsl = sy-langu
                AND exit_name = wa_tadir-obj_name.
                FORMAT COLOR COL_NORMAL INTENSIFIED ON.
            ENDCASE.
            WRITE:/1 sy-vline,
            2 wa_tadir-obj_name HOTSPOT ON,
            41 sy-vline ,
            42 wf_txt,
            105 sy-vline.
            AT END OF object.
              WRITE : /(105) sy-uline.
            ENDAT.
          ENDLOOP.
          WRITE:/(105) sy-uline.
          SKIP.
          FORMAT COLOR COL_TOTAL INTENSIFIED ON.
          WRITE:/ 'No.of Exits:' , wf_smod.
          WRITE:/ 'No.of BADis:' , wf_badi.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(105) 'No userexits or BADis exist'.
        ENDIF.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(105) 'Transaction does not exist'.
      ENDIF.
    AT LINE-SELECTION.
      DATA : wf_object TYPE tadir-object.
      CLEAR wf_object.
      GET CURSOR FIELD field1.
      CHECK field1(8) EQ 'WA_TADIR'.
      READ TABLE jtab WITH KEY obj_name = sy-lisel+1(20).
      MOVE jtab-object TO wf_object.
      CASE wf_object.
        WHEN 'SMOD'.
          SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
          CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
        WHEN 'SXSD'.
          SET PARAMETER ID 'EXN' FIELD sy-lisel+1(20).
          CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
      ENDCASE.
    Reagards,
    Bharat.

  • How to find the text id for the text in the sales order

    Hi all,
    How to find the text id for the item-text in the sales order?
    There are different Text available in  the sales order under item like Warehouse instruction, CSR instruction...
    I want to know the corresponding Text id for the text ELECTRONIC ORDER COMMENT.
    Table TTXID contains the validation of the Text id.
    Please help me in knowing the way to identify the text-id from the text list..
    Thanks foryour help
    Suresh Kumar

    U can fetch the texts for the items using
    Read_text.
    Example:
        g_f_tdname = xvttp-vbeln.
        g_f_obj = p_obj.
        g_f_langu = 'DE'.
        REFRESH g_t_lines.
        CLEAR g_t_lines.
        CALL FUNCTION 'READ_TEXT'
             EXPORTING
                  id                      = p_var
                  language                = g_f_langu
                  name                    = g_f_tdname
                  object                  = g_f_obj
             TABLES
                  lines                   = g_t_lines
             EXCEPTIONS
                  id                      = 1
                  language                = 2
                  name                    = 3
                  not_found               = 4
                  object                  = 5
                  reference_check         = 6
                  wrong_access_to_archive = 7
                  OTHERS                  = 8.
        IF sy-subrc <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    The Required fields are,
    Text-id ,language,name,object.
    Let me know if you further require help.
    Regards

  • How to find the workflow admins for all costcenters ?

    Dear SRM gurus
    We are using Classic scenario with N th step workflow with BADI.
    we have a requirement.
    How to find the workflow admins for the particular costcenters.
    we used HRV1222A where ATTRIB EQ <Z attribute>(This is our own attribute to group all the costcenters)
    used table HRP1001 to find the Admins but results are not correct because it is not showing my user id(I have all authorisations).
    Is there anyway to find all the admins for a cost center(users are more than 7000+)
    can anybody send work flow related presentations or cookbook
    Thanks in Advance.
    srinu

    hi
    I have not received any thing.Please send again
    [email protected]
    [email protected]

  • Where and how to find the storage locatation for the consignment stock

    where and how to find the storage locatation for the consignment stock (customer stock )  for more than one storage location .
    table :msku
    material no    -   werks - batch
    xxx                   sg11  - 200352ac
    table : mchb
    material no    -   werks  -lgort - batch
    xxx                   sg11   sg10   200352ac
    xxx                   sg11   gs11   200352ac
    note : each stock location having same batch no in different storage and my question how to find which link for msku to mchb .

    Hi,
    Try the table MARD: Storage Location Data for Material, where in the field LABST will give the stock field, against a given material/plant/Storage Loc.
    Regards,
    JLN

  • How to find the search help for the parameters stmt in a report

    hi
    how to find the search help for the parameters stmt in a report , that is using which addition to the parameters statement

    I am not sure if I understood the question,but if you meant how to attach a search help to parameter for which a default search help is not available,you can do that by using addition  "Matchcode Object"
    Parameter: a type i matchcode object 'Search Help Name'
    Search Help name should be in single quotes.
    Regards,
    Anubhav.
    P.S: Award Points if useful.

  • How to find the supplying plant for a purchase order

    Hi Guru,
    My requirement is to dispaly the suppling plant and some other fields for the purchase orders using ALV report.
    Could any one help me how to find the supplying palnt for a purchase order.
    Suggest me any function module or with sample coding
    Regards
    Paul

    Hi Ravi,
    You are solution is right but in that table the supplying plant is not updated
    Could you suggest me any other tables
    Regards
    Paul

  • How to find the Commitment cost for a PM order using tables ?

    Hello all ,
           How to find the Commitment cost for a given PM order using table  .
    Thanks and regards ,
    Prem.

    Issue got resolved

  • How to find the print program for a sap script

    Hey Experts,
    How to find the print program for a sap script (espicially when it is a custom script(Z*))?
    Thanks a ton,

    Thanx Vijay,
    Actually when I searched for the program in both the tables it didnt show up ther.
    But when I did check in the texts of script, I found it.
    Good job.
    Thanks all.
    Vijay, a small doubt.
    But why didn't it show up in those 2 tables when all the print programs for standard scripts show up usually?
    thnx once again.
    Message was edited by: dev a

  • How to find the customer exits for a particular transaction

    hi
    how to find the customer exits for a particular transaction

    Hi jyothsna vankadari ,
    ther is a convenient way to find all BADIS called. You may know that BADIS are the newer version of EXITs.
    I would suggest you to go for BADI.
    Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any transaction.
    Regards,
    Clemens

  • How to find the WhereUsed List for a Business Object Event?

    How to find the WhereUsed List for a Business Object Event?

    Can anybody let me know how to get which
    Whereused  function will get the data from
    different Werks in multi-level?
    Any sample program please!!!

  • How to find the profile information of a icloud account user?

    How to find the profile information of a icloud account user?

    This would actually be the Apple ID information and is only available to the user.

  • How to find the materials set for forecasting in APO..?

    Dear Experts,
    Could anyone please help me out in letting me know how to find the materials set for forecasting in APO, BY either using pegid or by using matid & locid combinations...? Please help me out ASAP as Iam severly stuck at one place.
    Thanks in advance..
    Regards,
    Sanjay.

    Hi Sanjay,
         Please have a look at the table /SAPAPO/PEGKEY.
    If u have any questions in APO goto the APO forum and raise ur doubts.
    Thanks,
    Siva.

Maybe you are looking for

  • Airport X N with Linksys WRT54G

    Hello, have read/heard in the past that you shouldnt have 2 wifi enabled laptops too close to each other since they say it can damage each other. how about having 2 wifi routers? do they need to be separated? if so, by how much? Thanks

  • How to call C functions from native functions?

    Hi, I want to call a C function from a JNICALL? i wrote somthin like this: #include "ParamInput1.h" #include <jni.h> #include <stdio.h> #include "testPhase1.h" JNIEXPORT void JNICALL Java_ParamInput1_phase1(JNIEnv *env,                jobject obj,   

  • Word OLE2

    Hello, I am writing some text and a table in a word document using OLE2. I want to write some text before the table and after the table. Currently, I manage to write the text before the table and to write the table with its content, but when I try to

  • Out-of-office Email msg still running after upgrading to Server 10.8

    After upgrading from 10.6 > 10.7 >10.85 on the same day, the out-of-office email notification of one user is still on. This is currious as I understand that 10.8.5 no longer support the out-of-office notification through the GUI. Am I wrong? Does any

  • Dreamweaver CS4 and CS5 required.

    Hi all,  my course requires me to download Dreamweaver CS4 and CS5. I understand that CS4 has recently been removed fromm Adobe. Please advise what icons/links I need to download both of these in adobe, or safely elsewhere? Thanks TJ