Get table name of a record

Hello every body,
I am trying to create a procedure in pl/sql which can takes in input a record and its output is the table name of the record....i don't know how to do this in pl/sql...can u help me?
Thanks.

Can you be more specific as to what you need? From what I understood is, you are bulding a procedure that takes input and when it matches record in any table, you want to display that table name. Am I right?

Similar Messages

  • How can I find table names for Interaction Record

    Hi
    I need the table names for Interaction Record Notes, Description Field, Reason Code & IC Agent. Please assist.

    Hi Sunglad,
    The header data of the interaction record (incl. description) is saved in table CRMD_ORDERADM_H.
    The reason code can be found in table CRMD_SRV_SUBJECT.
    The connection between CRMD_ORDERADM_H and the CRMD_SRV_SUBJECT is rather complex:
    CRMD_ORDERADM_H --> CRMD_LINK --> CRMD_SRV_OSSET --> CRMD_SRV_SUBJECT
    get transaction guid from crmd_orderadm_h.
    get guid_set from crmd_link where crmd_link-guid_hi = transaction guid and objtype_set = 29.
    select guid from crmd_srv_osset where guid_set = guid_set found above in crmd_link table.
    select * from crmd_srv_subject where guid_ref is in all guid's found above.
    The text can be found in table STXH. I guess you need a function module (READ_TEXT) to
    retrieve the text.
    Hope this helps.
    regards,
    Wim Olieman

  • Table Name for Condtion Record

    Hi,
    What is the table name for condition records which are maintained through VK11.
    regards
    Rajesh

    Hi Rajesh,
    The condition records are stored in different tables based on the condition tables given for an access sequence. First find out the access sequence and then the condition tables used for a particular condition type.
    Lets says for PR00 the access sequence is PR02 and the condition tables are 651, 652 & 653. Now the records would be stored tables A651, A652 & A653.
    Regards
    Nadarajah Pratheb

  • What is Best Way to Get Table Name in Oracle Applications : 12.1.1 (web)

    Hello Friends..
    I need your Help My Friends...
    we are working currently on Oracle Applications : 12.1.1
    i would like to know the best way to get Table name from Web Based Form..
    Regards
    Yas.

    Hi Yas;
    Please follow below 2 thread i belive you will find some hint in those thread
    table name for a jdeveloper page
    Re: EBS, 11.5.10, table name
    Hope it helps
    Regard
    Helios

  • How to compare 2 different database to get table name which are not present in second database

    How to compare 2 different database to get table name which are not present in second database

    Sorry cannot test it right now
    use db1
    go
    select * from sys.tables t where not exists
    (select * from db2.sys.tables s where t.object_id=s.object_id)
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to display table name in the Record history

    Hi,
    I have developed a new custom form. When I click on the record history, it displays details like updated_by , update_Date.
    But it doesnt show the table name ( of the data block ). Is there any coding to be done to display the table name ?
    Regards,
    Suresh

    Sounds like some custom form for the eBusines-suite. Maybe you get an answer in an eBusiness-suite related forum, maybe here OA Framework

  • Getting table name from a query

    Hi, I'm trying to get the table name from my sql query
    My code is as follows;
    ResultSetMetaData metadata = rs.getMetaData();
    for (int i = 1; i < metadata.getColumnCount(); i++)
    System.out.println(metadata.getTableName(i));
    I just get a blank output. Yet my sql query executes and I can pull down the records, and grab the column names from the result sets.
    Any ideas on how I can get the table name for the columns. The reason being is on one of my querys I'm using join statements and i need to retrieve the table name for the column i'm displaying, as some tables have similar column names.
    Thanks in advance.

    Hi,
    What db are you using?
    I also get a blank output with ResultSetMetaData.getTableName because Oracle doesn't implement this method.
    Why do you not know the table name anyway?
    regards
    Nick

  • Reg. Getting Tables name from interbase

    Hi,
    I like to get interbase database table name using a query from JDBC program .I am connecting interbase through interclient driver.
    Regrads,
    Vikki

    Once you have a Connection to the database, use its getMetaData() method to get a DatabaseMetaData object, which can give you that information.

  • From one user, how to get tables names of other user.

    hi all,
    now i connected to Oracle with one user let us assume 'pavan/pavan'. and i need to get the table names that are in user: pavan and in user: gupta (gupta/gupta).
    one way is,
    from Java, first get connection to pavan user, execute the query and store the results and disconnect to it and againg connect to user 'gupta', execute the query and add these results to first results.
    but this is very expensive and time consuming also.
    is there any query to get this one. or need to create 'Database Link' and access through that link.
    regards
    pavan.

    First you have to grant permission (like SELECT,UPDATE,DELETE....etc..) to PAVAN on objects that are belongs to GUPTA. Then you can make use the GUPTA user objects.
    Suppose you connected to PAVAN and you want see the data in table A which exist in GUPTA user.
    Connect GUPTA user first and execute following statement
    GRANT SELECT,UPDATE,DELETE ON A TO PAVAN;
    After executing the above query connect to PAVAN user and execute following statement.
    SELECT * FROM GUPTA.A;

  • Get table name

    How to get a table name based on two fields...?

    Hi,
    there are many ways.
    Goto se15 -> ABAP dictionary -> Fields -> Table Fields .
    Now enter field name in field name screen.execute
    All tables having that field will come.
    Repeat same for second field.
    Out of two results find comman tables.
    Also if u know data element of fields -> Goto se11 -> data type -> enter De name -> F7.
    Then click on where used -> table fields .
    Select from list appear.
    Hope u will find it out
    Regards

  • Select query to get table names

    Hi,
    Can i retrieve a table name from a select query if i know value of one of the columns in the table?
    Glen

    Can't you take a look at the source code and see what table those values are coming from? That's likely the easiest solution.
    Barring that, you could use dynamic SQL, but it's going to be awfully inefficient. Something like
    FOR x IN (SELECT * FROM user_tab_cols WHERE data_type = 'VARCHAR2')
    LOOP
      EXECUTE IMMEDIATE
        'SELECT COUNT(*) FROM ' || x.table_name ||
        ' WHERE ' || x.column_name || ' = <<literal value>>'
        INTO l_cnt;
      IF( l_cnt > 1 )
      THEN
        DBMS_OUTPUT.PUT_LINE( 'Found the value' );
      END IF;
    END LOOP;This assumes that you know at least what data type the value is stored in. It's also going to generate a tremendous number of full table scans, so it'll be slow as molasses on a system of any size.
    Justin

  • Table name for Info-record where i can get the last changed date and user

    Using ME12, i have changed the price of the info record i want to get the who was the user and changed date...
    I had check in EINA EINE but i couldnt find out please anybody Please help me out by providing solution for this??

    Hi
    If at the data element level the field for which you want to know the old and new fields  the option of CHANGE DOCUMENT option must be  enabled ,then you can find the old and new values in the
    CDHDR -
    Change document header
    CDPOS -
    Change document items.
    Regards
    Pavan

  • FM to get table names for a given Apllication Component.

    Hai Friends,
    I have to create a function module which functions exactly as the INFORMATION SYSTEM button in se16 table help.
    i have written something like this but this is not giving exact results as INFORMATION SYSTEM IN SE16.
    for ex.  for componet sd-bil it gives 376 records where as in se16 you get only  30 to 40 table...
    So pls help me with the tables and logic...
    SELECT
              B~DEVCLASS
              INTO CORRESPONDING FIELDS OF TABLE IT_TDEVC
              FROM DF14L AS A
              INNER JOIN TDEVC AS B
              ON A~FCTR_ID = B~COMPONENT
              WHERE A~PS_POSID = COMPONENT.
      LOOP AT IT_TDEVC.
       SELECT TABNAME TABCLASS FROM DD02L
                      appending corresponding fields of table  TABLE_LIST
                      WHERE APPLCLASS = IT_TDEVC-DEVCLASS
                      AND ( TABCLASS = 'TRANSP'
                      OR TABCLASS = 'POOL' OR TABCLASS = 'CLUSTER')
                      AND AS4LOCAL = 'A'.
    *                  append table_list.
    * endselect.
       ENDLOOP.
    This is just a test program so ignore the performance issues .
    Waiting for your help..
    Reshali.

    Hi,
    Try the below code....
    REPORT  zsen_information_system.
    PARAMETER w_comp TYPE ufps_posid.
    TYPES : BEGIN OF y_tdevc ,
              devclass TYPE devclass,
            END OF y_tdevc.
    TYPES : BEGIN OF y_table ,
              tabname  TYPE tabname,
              tabclass TYPE tabclass,
            END OF y_table.
    DATA : it_tdevc TYPE STANDARD TABLE OF y_tdevc WITH HEADER LINE
         , it_tab_list TYPE STANDARD TABLE OF y_table WITH HEADER LINE
    SELECT b~devclass
      INTO TABLE it_tdevc
      FROM df14l AS a
      INNER JOIN tdevc AS b
      ON afctr_id = bcomponent
      WHERE a~ps_posid = w_comp.
    SELECT tabname FROM info_tabl
      INTO TABLE it_tab_list
      FOR ALL ENTRIES IN it_tdevc
      WHERE as4local IN ('L','A','N')
        AND tabclass IN ('TRANSP','VIEW','CLUSTER','POOL')
        AND devclass = it_tdevc-devclass.
    IF sy-subrc EQ 0.
      LOOP AT it_tab_list.
        WRITE /: it_tab_list-tabname.
      ENDLOOP.
    ENDIF.
    Hope this will solve your problem
    Thanks and regards,
    Senthil Kumar Anantham.

  • Table Names & Record's Count

    hi all,
    i need the all the table names and their records count of a schema as output in a single SQL Query.
    Is it possible ... ?
    o/p should be like:
    TABLE_NAME CNT
    AMS_ACCOUNT 100
    AMS_USER_DETAILS 200
    thank's in advance.
    Regards,
    sri ram.

    SQL> CREATE TYPE TabRowsType AS OBJECT (
    table_name varchar2(100),
    num_rows number
    2 3 4 5
    Type created.
    SQL> CREATE TYPE TabRowsTab IS TABLE OF TabRowsType
    2
    Type created.
    SQL> CREATE OR REPLACE FUNCTION CountRows
    2 (p_table_name varchar2 default 'ALL',p_owner varchar2 default user)
    3 RETURN TabRowsTab PIPELINED AS
    4 CURSOR c1 is select owner,table_name from dba_tables where owner=p_owner and (table_name=p_table_name or p_table_name='ALL');
    5 rec c1%rowtype;
    6 v_cnt number:=0;
    7 BEGIN
    8 open c1;
    9
    10 loop
    11 fetch c1 into rec;
    12 v_cnt:=-1;
    13 execute immediate 'select count(*) from '||rec.owner||'.'||rec.table_name into v_cnt;
    14 exit when c1%notfound;
    15 PIPE ROW(TabRowsType(rec.table_name,v_cnt));
    16 END LOOP;
    17
    18 RETURN;
    19 END;
    20 /
    Function created.
    SQL> select * from table(CountRows);
    TABLE_NAME NUM_ROWS
    A 568
    B 568
    EMP 16
    PS_FAS_PRODUCTTEMP 7407896
    TEST 672173
    TEST1 672173
    TEST3 672173
    7 rows selected.

  • Get Target table name and its count

    Hi Experts,
    I have created a Procedure where I want to get the Target table name and its count of the previous Interface in a Package and insert these values into the Audit table.
    I am able to get the number of Inserts in previous step using getPrevStepLog() API, but I also want the Target table name and its total count of the previous Interface. Is there any generic way or code to bring these Information without hardcoding the table name. Kindly help to sort this issue.Thanks!
    Warm Regards,
    VBV

    Hi VBV,
    Please follow the below steps to audit ur execution.
    Please note i coded in such a way that u can use ur existing procedure to capture the table name no need to query ur repository as its not advisable to query the repository as Oracle may change the structure in future which i personally feel right.
    I created a Audit table with the below structure.
    CREATE TABLE AUDIT_TABLE
    INSERT_COUNT VARCHAR2(100 BYTE),
    TABLE_NAME VARCHAR2(4000 BYTE)
    Step 1 :
    This step needs to be added in ur existing IKM after Commit step where i am using API to capture the target table name.
    Step Name: Get Table Name
    Command On Source
    Technology: Oracle
    Schema: Any Oracle related Schema
    Command:
    SELECT '<%=odiRef.getTargetTable("RES_NAME")%>' AS TGT_NAME FROM DUAL
    Command On Target
    Technology: Jython
    Command:
    TargetTable='#TGT_NAME'
    Step 2:
    In ur existing procedure add the below or add a new procedure.
    Step Name: Audit Log
    Command on Source
    Technology : Oracle
    Schema: Whichever schema holds the audit table
    Command on Target
    Technology : Jython
    Command:
    import java.sql as sql
    import java.lang as lang
    myCon =odiRef.getJDBCConnection("SRC")
    MyStmt=myCon.createStatement()
    myRs = MyStmt.executeQuery("INSERT INTO ODITGT.AUDIT_TABLE (INSERT_COUNT,TABLE_NAME) VALUES (<%=odiRef.getPrevStepLog("INSERT_COUNT")%>,'"+TargetTable+"')")
    Thats it.
    OTN doesnt allow me to put + sign in front of any word ( its assume its a Italic) so please add + (plus) sign before and after TargetTable in the above script.
    This way u can capture the table name, insert count in to ur audit table.
    Please note u need to call this Procedure after the successful completion of the interface in a package and make sure u selected the right IKM which capture the table name as in Step 1.
    I tested in my local and its working fine. Let me know if u find any difficulties in implementation.
    Thanks,
    Guru

Maybe you are looking for

  • Can't Burn a Disc

    I can't burn a disc in my user account. I get this error: you do not have enough access priviledges to burn disc.. even though the privelledge seems to be set to allow this. Any ideas?

  • In-Process Quality Inspection in Rep Mfg

    Hi.. We have Rep Mfg scenario , and we want to chk the material while in-process. In the Mtl Mastr we have maintained Insptn type as 13 . In Rate Routing we have maintained a operation with  control key which requires Insptn characteristics n MIC is

  • IPad2 freezing (not OS5 related, I promise!)

    Hi, I'm having some troubles with my ipad2.  I, at some point, pretty much filled it up in terms of space.  That might have something to do with my issue. When I plug it in to sync/update, itunes just freezes.  It sees the device, but any attempt to

  • View Accessors

    Hi I have a task flow that have a method call ExecuteWithParam. In the View Object has an attribute that has a LOV. In this LOV query have a Bind Variable. In ViewAccessors, the value of Bind Variable I spend so: adf.context.sessionScope.client This

  • I've blocked a contact with ios7 using call blocking feature but it still manage to call through ... anyone has this similar problem?

    yeah, i've set a number to be blocked using the ios7's call block feature 2 days ago. today, the phone rang and displayed the number which i've blocked ... anyone encountered this problem?