How to view the table at the application level

Dear All,
How to view the table in the Data Dictionary at the application level, If a table is created at the database level by using CREATE statement.
code/
create table zmard as select * from sapone.mard where 1 = 2
/code
I would like to view the table above, which is created at the Oracle database level in the Data Dictionary.
can anyone guess the solution.
Best wishes
Mahesh

Hi
U should create a program using SQL native in order to select and show the data.
By SE11 or directly in the program u can define a structure like your table:
DATA: BEGIN OF W_ZMARD,
              FIELD,
          END     OF W_ZMARD.
EXEC.
   OPEN CURSO FOR SELECT * FROM ZMARD
ENDEXEC.
DO.
  EXEC.
     FETCH NEXT CURSOR INTO :W_ZMARD
  ENDEXEC.
  IF SY-SUBRC <> 0.
     EXIT.
  ENDIF.
  WRITE: / W_ZMARD-FIELD,
ENDDO.
EXEC.
  CLOSE CURSOR
ENDEXEC.
I don't know if it's possible to create a view in SE11, because it's needs a table just defined in SE11, u can create a new view ZMARD based on MARD but I don't believe it'll use your table.
Max

Similar Messages

  • How to display the actual code name on the table of the uix file?

    I have established entity object:Schoolinfo,and a view object SchoolinfoView,and registered in the application module.and I drag and drop to a uix file the Datacontrol and it works well,i can see the schoolinfo table's contents.The problem is:in schoolinfo there is an attribute schooltype code,like 1,and referenced to another table:CodeDict in the database, and I want to display the actual code name when displaying the table on the uix file,like "middle school", not just the code 1.How can I do?

    This is more of BC4J question.
    The data that is displayed (View) is a SQL query. You should be able to change the SQL query represented by the view object appropriately to get the desired output. You can see more information on view objects from Jdev help to get more information on it.
    Thanks
    Vijay V
    Team UIX

  • How to create a table in the file using java code.?

    HI,
    I should export the data from the view objects to a word document. I have done that but I should
    display the data in the form of a table.
    Kindly come up with the necessary information on how to create a table in the file using java.
    Thanks,
    Phani

    Hi, Thank you for responding to my query.
    The below are the details of my code.
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding StudentDetailsContent =
    (DCIteratorBinding)dcBindings.get("StudentView1Iterator");
    OutputStreamWriter w = new OutputStreamWriter(outputStream, "UTF-8");
    Row currentRow =
    StudentDetailsContent.getRowSetIterator().first();
    Object a[]= currentRow.getAttributeValues();
    int i;
    for(i=0 ;i<=a.length;i++){
    w.write(a.toString());
    w.write(" ");
    w.flush();
    I am usning this coding to achieve the task of exporting data to file.
    I need to display this information in the table that is where I need help from you people.
    Thanks,

  • Is it possible to create a view where table in the From clause changes name

    is it possible to create a view from a from a table like this
    create view my_view as select id, col1, col2, result from <<my_latest_cacahe_table>>;
    the table in the from clause changes the name .
    I have another table which indicates the the latest name of my cache tables. Always there are two records there. The latest one and previous one.
    select * from cache_table_def
    table_name cache_table_name refresh_date
    my_table cache_table245 1/23/2012
    my_table cache_table235 1/22/2012
    create table cache_table_def (table_name varchar2(25), cache_table_name varchar2(25), refresh_date date);
    insert into cache_table_def values( 'my_table','cache_table245','23-jan-2012');
    insert into cache_table_def values ( 'my_table','cache_table546','22-jan-2012');
    create table cache_table245 (id number, col1 varchar2(50), col2 varchar2(20), result number);
    insert into cache_table245 values(1, 'test123', 'test345',12.12);
    insert into cache_table245 values (2, 'test223', 'test245',112.12);
    create table cache_table235 (id number, col1 varchar2(50), col2 varchar2(20), result number);
    insert into cache_table235 values (1, 'test123', 'test345',92.12);
    insert into cache_table235 values (2, 'test223', 'test245',222.12);
    what I need to do is find the latest cache_table name for my_table and use that in my view defintion
    When user select from the the view it always reurns the data from the latest cache_table
    is it possible to do something like this in oracle 11g?
    I have no control on the cache tables names. that is why I need to use the latest name from the table.
    Any ideas really appreciated.

    I've worked up an example that does what you ask. It uses the SCOTT schema EMP table. Make two copies of the EMP table, EMP1 and EMP2. I deleted dept 20 from emp1 and deleted dept 30 from emp2 so I could see that the result set really came from a different table.
    -- create a context to hold an environment variable - this will be the table name we want the view to query from
    create or replace context VIEW_CTX using SET_VIEW_FLAG;
    -- create the procedure specified for the context
    - we will pass in the name of the table to query from
    create or replace procedure SET_VIEW_FLAG ( p_table_name in varchar2 default 'EMP')
      as
      begin
          dbms_session.set_context( 'VIEW_CTX', 'TABLE_NAME', upper(p_table_name));
      end;
    -- these are the three queries - one for each table - none of them will return data until you set the context variable.
    select * from emp where 'EMP' = sys_context( 'VIEW_CTX', 'TABLE_NAME' );
    select * from emp1 where 'EMP1' = sys_context( 'VIEW_CTX', 'TABLE_NAME' );
    select * from emp2 where 'EMP2' =  sys_context( 'VIEW_CTX', 'TABLE_NAME' )
    -- this is how you set the context variable depending on the table you want the view to query
    exec set_view_flag( p_table_name => 'EMP' );
    exec set_view_flag( p_table_name => 'EMP1' );
    exec set_view_flag( p_table_name => 'EMP2');
    -- this will show you the current value of the context variable
    SELECT sys_context( 'VIEW_CTX', 'TABLE_NAME' ) FROM DUAL
    -- this is the view definition - it does a UNION ALL of the three queries but only one will actually return data
    CREATE VIEW THREE_TABLE_EMP_VIEW AS
    select * from emp where 'EMP' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
    union all
    select * from emp1 where 'EMP1' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
    union all
    select * from emp2 where 'EMP2' =  sys_context( 'VIEW_CTX', 'TABLE_NAME' )
    -- first time - no data since context variable hasn't been set yet
    SELECT * FROM THREE_TABLE_EMP_VIEW
    -- get data from the EMP table
    exec set_view_flag( p_table_name => 'EMP' );
    SELECT * FROM THREE_TABLE_EMP_VIEW
    -- get data from the EMP2 table
    exec set_view_flag( p_table_name => 'EMP2');
    SELECT * FROM THREE_TABLE_EMP_VIEW
    For your use case you just have to call the context procedure whenever you want to switch tables. You can union all as many queries as you want and can even put WHERE clause conditions based on other filtering criteria if you want. I have used this approach with report views so that one view can be used to roll up report data different ways or for different regions, report periods (weekly, quarterly, etc). I usually use this in a stored procedure that returns a REF CURSOR to the client. The client requests a weekly report and provides a date, the procedure calculates the START/END date based on the one date provided and sets context variables that the view uses in the WHERE clause for filtering.
    For reporting it works great!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to display name of the table and the description and the table type

    Hi,
    Can you people tell me how to display the name of the table and the description and the table type (View, structure, etc...) used in the program.
    I want to display in a list.
    Kind Regards

    use this program
    TABLES : TSTC, tstct.
    TABLES : DD03l, DD02l.
    DATA : Program like sy-repid.
    DATA : BEGIN OF I_FINAL OCCURS 0,
    tabname LIKE dd02l-tabname,
    TABCLASS LIKE dd02l-tabCLASS,
    TEXT LIKE DD02T-DDTEXT,
    END OF I_FINAL.
    DATA : BEGIN of ITAB Occurs 0,
    name like dd02l-tabname,
    END OF ITAB.
    DATA : TCD(100) TYPE C.
    DATA : var1 LIKE dd02l-tabname.
    DATA : DESC LIKE TSTCT-TTEXT.
    selection-screen skip.
    SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS : r1 RADIOBUTTON GROUP r DEFAULT 'X'.
    Parameters : Tcode like sy-tcode.
    selection-screen skip.
    PARAMETERS : r2 RADIOBUTTON GROUP r.
    Parameters : Prog like sy-repid.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
    select-options : Type for dd02l-tabclass .
    SELECTION-SCREEN END OF BLOCK B1 .
    at selection-screen.
    if r1 = 'X' and Tcode is initial.
    message e001(00) with 'Enter Transaction Code' .
    elseif r2 = 'X' and Prog is initial.
    message e001(00) with 'Enter Program Name' .
    endif.
    START-OF-SELECTION.
    if r1 = 'X'.
    Prog = ' '.
    select single * from TSTC where tcode = tcode.
    if sy-subrc = 0.
    program = TSTC-PGMNA.
    select single TTEXT from tstct into desc where tcode = tcode and SPRSL = 'E'.
    else.
    Write :/ 'Invalid Transaction Code'.
    exit.
    endif.
    elseif r2 = 'X'.
    Tcode = ' '.
    program = Prog.
    endif.
    CALL FUNCTION 'GET_TABLES'
    EXPORTING
    PROGNAME = Program
    TABLES
    TABLES_TAB = itab.
    if itab is initial.
    skip.
    skip.
    skip.
    skip.
    skip.
    WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
    ELSE.
    PERFORM : categorize.
    endif.
    END-OF-SELECTION.
    LOOP AT I_FINAL.
    WRITE :/4 I_FINAL-tabname COLOR 2 INTENSIFIED OFF NO-GAP HOTSPOT ON, 35 I_FINAL-TABCLASS COLOR 2 INTENSIFIED OFF NO-GAP,
    50 I_FINAL-TEXT COLOR 2 INTENSIFIED OFF NO-GAP.
    ENDLOOP.
    AT LINE-SELECTION.
    TCD = SY-LISEL.
    var1 = TCD+3(30).
    set parameter id 'DTB' FIELD VAR1.
    call transaction 'SE11' and skip first screen.
    TOP-OF-PAGE.
    WRITE :/45 'TABLE DETAILS RELATED TO THE TRANSACTION CODE' COLOR 7 .
    WRITE :/2 'DATE : ' COLOR 1, SY-DATUM COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'TRANSACTION CODE : ' COLOR 1, Tcode COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'TCODE DESCRIPTION : ' COLOR 1, desc COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'PROGRAM NAME : ' COLOR 1, PROGRAM COLOR 1 INTENSIFIED OFF NO-GAP.
    SKIP 1.
    WRITE :/1(140) SY-ULINE.
    WRITE :/4 'TABLE NAME' COLOR 5 INTENSIFIED OFF NO-GAP,35 'TABLE TYPE' COLOR 5 INTENSIFIED OFF NO-GAP,
    55 'DESCRIPTION' COLOR 5 INTENSIFIED OFF NO-GAP.
    WRITE :/1(140) SY-ULINE.
    *& Form categorize
    text
    --> p1 text
    <-- p2 text
    FORM categorize .
    SELECT dd02ltabname dd02ltabCLASS DD02T~DDTEXT
    FROM dd02l INNER JOIN DD02T ON dd02ltabname = dd02Ttabname
    INTO TABLE I_FINAL
    FOR ALL ENTRIES IN itab
    WHERE DD02L~TABNAME = ITAB-NAME AND TABCLASS IN TYPE AND DDLANGUAGE = 'E'.
    if sy-subrc <> 0.
    skip.
    skip.
    skip.
    skip.
    skip.
    WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
    endif.

  • How to know which table in the database a form is accessing

    Actually Im new to oracle applications,
    Im getting an error when i open a form from system administrator responsibility saying that table doesnot exist.
    My basic doubt is, how to know which table in the database a form is accessing.
    Any response is higly appreciated.
    Thanks,
    Praveen
    Edited by: user10239520 on Sep 10, 2008 7:07 AM

    Take a look at the following thread:
    Is there a query log in EBS?
    Re: Is there a query log in EBS?

  • How get highly active TABLES in the database ?

    Oracle 11g R2 standard edition database.
    1) Is there a way to find which table in the entire database (or) schema is HIGHLY ACTIVE ?
    Highly Active in the sense which has gone through lots of SELECT,UPDATE,DELETE,INSERT
    2) Is there a way to find as how many DML's happened on table SCOTT.EMP from time A to time B ?
    INSERT,DELETE,UPDATE
    If YES please give all the steps
    Thanks in advance.

    johnpau2013 wrote:
    Oracle 11g R2 standard edition database.
    1) Is there a way to find which table in the entire database (or) schema is HIGHLY ACTIVE ?
    Highly Active in the sense which has gone through lots of SELECT,UPDATE,DELETE,INSERT I would suggest looking at the view v$segment_Statistics .
    2) Is there a way to find as how many DML's happened on table SCOTT.EMP from time A to time B ?
    INSERT,DELETE,UPDATE
    If YES please give all the stepsLook for auditing and how it is set for the tables in the documentation for your version . The doc site is http://tahiti.oracle.com .
    Aman....

  • How do you list tables within the tablespace?

    Does anyone know how to list and view the tables within the tablespace. I am new to Oracle and I would like to view the tables, but my documentation is telling me how to create everything, but not to view it. Please advise, and thanks again.

    select owner, table_name
      from user_tables  -- or all_tables, or dba_tables
    where tablespace_name = :ts_name;

  • Seeing changes to the tables in the application

    If I make changes to the tables in the database (eg. through the database connection or in SQLplus), is there a way to propagate these changes though the application? I'm asking because I made a mistake when I designed my tables - I left out a column and some constraint, as well as a comment. For some reason 'refresh' didn't seem to import those changes - I had to disconnect and reconnect to see it in the tables under the connection editor.
    And then I couldn't find an easy way to get the changes into my offline DB objects, onto the diagram, the business objects etc. In the end I started over; it seemed easier, but surely there must be a way to 'import' new features into an object from the object it was generated from? If not, I think that would be a great improvement, I can see myself using that more often than I want to admit.

    Hi,
    actually there is no end-to-end refactoring that propagates database changes up to the view layer. ADF BC for instance allows you to refresh the business service model with changes applied to the database. However, from there on you will need to manually ensure that the changes don't cause naming conflicts
    Frank

  • Creating tables on SQL studio and viewing the table in the SAP system

    i have just created a table using the SQL studio and wants to use it view it in the SAP system using the SAP logon. till now i have not found a way to create it therefore any help is much appreciated.

    Hmm... you want to see tables via SAPLogon ??
    Ok, let's assume you really want to access tables via ABAP instead.
    For that you've two options:
    1. Create the table in the ABAP dictonary (SE11) exactly like you created it in the database and activate the table.
    After that you can access the table via SE16 or any ABAP as you like.
    2. You don't create the table in the ABAP dictonary and use native SQL to access the data.
    Neither of these options is meant to be the way to do it.
    The correct way would be to design the whole table in the ABAP dictionary and create the table on the database from that.
    regards,
    Lars

  • How to increase the row height of the table in the smartform

    Hi,
    Can any one say,
    How to increase the row height of the table in the smartform.
    It is presently show the row width very small, i want to increase the row with of the table in the smartform.
    Plase say how can we increase the row height in the smartform.

    Hi Ravi,
         In Smartforms , Select the Table and you can adjust the cell hieghts in OUTPUT OPTIONs TAB.
        Reward points if that Helps.
    Manish

  • How to make the lines of the table and the template same

    Hello Abapers,
                        I have a requirement, I have made a table in which i have displayed all the values in it, and under that i have taken a template and diplayed the total of it but the lines drawn to the table and the template is different, the table line is dark and the line of the template is lite, how can i make the line of the template dark, i mean the same as the table line. i hope u understand my problem.can u  please help me in solving my problem as the requirement is very urgent.
    HOPE U UNDERSTAND MY PROBLEM
    Thank u in advance  .

    HI,
    Adjust the line width option for template and table,its there under pattern.

  • How to make a table of the user to non public privilege?

    Hi all,
    im working with an RAD program and using oracle as the database. currently im on db 10g. I am able to connect to the db but the problem is it shows other users table. It is not only showing the tables of the user i connected to.
    this is a problem since it will load other users' table which i dont need in my project.
    now i've post around the forum of the RAD program regarding this and a particular user mentioned that he had the similar problem and it's probably because the all those tables showing up is public.
    im getting tables from sys,sytem,syman and other preinstalled db user which i dont need to list out for my project.
    is there really a condition where these tables are public? if so, how can i change it to private? any appropriate query would help.
    i dont want it to show up on my RAD program all those unnecessary tables when i connect to one user for example user1.
    anyone can help me out?
    Thnx.

    T101_cyberdyne wrote:
    Balazs Papp wrote:
    in Oracle, there is a special role, called PUBLIC
    anything granted to this role will be applied to every user (obviously, its PUBLIC)
    for example SYSTEM.HELP is a "public" table, every user can read it without any permissions granted
    you can check this with a query like this:
    select * from dba_tab_privs where grantee='PUBLIC' and table_name='HELP';
    revoking such permissions from the PUBLIC role is not recommended at all, as they are required for basic operation
    disabling the PUBLIC role for a specific user is not possible as per the following note: Is it possible to exclude a user from PUBLIC scope? [ID 156303.1]So are you saying i'm stuck and there's nothing i could do to prevent these public table from showing?
    well,this is dissapointing.I guess you need to step back and ask why this is a "problem". So far you've only indicated that you consider to BE a problem, but not WHY. Perhaps you are starting from a flawed assumption.

  • How to get the column names of the table into the Dashboard prompt

    how to get the column names of the table into the Dashboard prompt
    Thanks & Regards
    Kishore P

    Hey john,
    My requirement is as follows
    I have created a Rank for Total sales by Region wise i.e RANK(SUM(Dollars By Region)) in a pivot table.
    My pivot table looks like this
    COLUMN SELECTOR: TOTAL US , REGION , DISTRICT , MARKET
    ---------------------------------------------------- JAN 2009          FEB 2009        MAR 2009
    RANK              REGION                  DOLLARS           DOLLARS        DOLLARS DOLLARS
    1 CENTRAL 10 20 30 40
    2 SOUTHERN 10 30 30 70
    3 EASTERN 20 20 20 60
    4 WESTERN 10 20 30 40
    When i select the District in column selector
    Report has to display rank based on Total Sales by District. i.e
    ------------------------------------------------- JAN 2009         FEB 2009       MAR 2009
    RANK             DISTRICT              DOLLARS           DOLLARS        DOLLARS DOLLARS
    for this i need to change the fx of rank i.e RANK(SUM(Dollars By Region)) to RANK(SUM(Dollars By District)) and fx of Region i.e Markets.Region to Markets.District dynamically.
    so , i need to capture column name of the value selected from the column selector and dynamically i need to update the fx 0f RANK & fx of region.
    do you have any solution for this?
    http://rapidshare.com/files/402337112/Presentation1.jpg.html
    Thanks & Regards
    Edited by: Kishore P on Jun 24, 2010 7:24 PM
    Edited by: Kishore P on Jun 24, 2010 7:28 PM

  • How to view code of all the custom and complex folder  folder

    How to view code of all the custom and complex folder folder in EUL?

    You do not need to run all the reports.
    Also i am not sure about why do you need to see the code of every thing, i assume you will not get much from it.
    If there is a certain folder you are interested in then this is the way.
    Any way there is no way to get the code of the complex folders since they are logical join of other folders.
    to get the code of the custom folder s you can use:
    select * from eul_us.eul5_objs t
    WHERE t.obj_type='CUO'
    AND t.obj_object_sql1 IS NOT NULL;
    you should look (and concatenate) at the obj_object_sql1,obj_object_sql2.....
    Tamir

Maybe you are looking for