Passing the name of a table to a procedure

Can anyone tell me how you can pass the name of a table to a procedure ?
I am trying to write a generic procedure that will have the table name and the fieldname passed to it :-
as in :-
Select Fieldname FROM Tablename;
null

Refere to the documentation of
built in package dbms_sql.

Similar Messages

  • How to pass the text from a table to the field label on the selection scre

    hi guru's
      i have requirement were in i have to pass the text from a table as field label for
       a input field on the selection screen.
      EX:    selection screen  
                (xxxxxxx )  __________   
                field label    
      please help 
    regards,
    vara

    hi all,
    can you please check the code, and suggest am i doing wrong any were.
    types: xtab(200).
    data : ttab type table of xtab,
    w_so type xtab.
    data: routine(32) value 'TEMP_ROUTINE',
    program(8),
    message(128),
    line type i.
    AT SELECTION-SCREEN OUTPUT.
    select field text DATA_ELEMENT from zauthgrptxt into table t_fieldlabel where STARALLOWED EQ c_asteriks.
    DESCRIBE TABLE t_fieldlabel LINES N.
    w_so = 'REPORT ZTEMP_PROGRAM.'.
    append w_so to ttab.
    w_so = 'FORM TEMP_ROUTINE.'.
    append w_so to ttab.
    loop at t_fieldlabel.
    w_field = t_fieldlabel-field.
    CONCATENATE 'SELECT-OPTIONS: ' ' P_' w_field zspace ' FOR ' ' T_FIELDLABEL-' w_field ' NO INTERVALS NO-EXTENTION.' INTO w_so.
    append w_so to ttab.
    endloop.
    w_so = 'ENDFORM.'.
    append w_so to ttab.
    generate subroutine pool ttab name program
    message message
    line line.
    if sy-subrc = 0.
    perform (routine) in program (program).
    else.
    write:/ Message.
    endif.
    The sy-subrc = 4. nothing is coming into 'program' at generate subroutine pool
    very urgent requirement please help
    thanks,
    vara

  • How to find out the name of a table?

    Hi
    How can I find out the name of a table which doesn't have a record history?
    Regards
    Rahman

    No direct way to know the tables. What you will find on the ABout this page link are the View Object (similar to record sets), Entity objects, controller and Application module. Generally EO is based on a table or the VO can be based on the query which you can find the corresponding xml file. But a button action might be calling a method in AM or CO which in turn call some wrapper method to interact with database. So nothing straight forward. You will have to analyze the all page related code objects.
    They are specific to OA framework and if you are not aware about them, better go through the initial chapters of OAF dev guide.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Obtaining the name of a table from it's data

    Hello,
    i have a strange need ... i would like to obtain the name of a table from it 's data !!!!
    Thank's in advance.

    ALTER TABLE t
    ADD (table_name VARCHAR2(30));
    then
    SELECT table_name FROM T;Though, as Martin said, I don't know how you get the data if you don't know the name of the table.

  • How can i pass the name of the file polled by the file adapter to next step

    Hi XI guru's ,
    How can i pass the name of the file polled by the file adapter to next step in a BPM..?
    regards,

    Use Adapter-Specific Message Attributes and map that value in udf to the BPM message.
    Also see this
    /people/michal.krawczyk2/blog/2005/06/11/xi-how-to-retrieve-messageid-from-a-bpm
    Regards,
    Prateek

  • Get the names of all tables

    First I want to tell you: I'm a amateur concerning Java Programming.
    My task is to write a java program - using JCO -, which retrieves the names of all tables (a user can access).
    Can anybody help me, please?

    Hi Michael,
    i can't help you because i don't know anything about JCO!
    It's simply funny and i'm happy to see a "known face" here!
    Perhaps this will help you:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/tips and tricks for sap java connector client programming.pdf
    And don't be so decent...you're not so bad in Java at all
    Greetings
    Florian

  • Who can give me all the name of system table or organization table in sap?

    Who can give me all the name of system table or organization table in sap? such as the table stores the client,company code ,plant,transaction code ,sap menu,purchase organization along with the relation between organizations such as
    the relation between company code and plant, the relation between company and purchase organization and so on.Pls supply the list of table name or the url where I can see these information.
    Thank you in advance.

    Hi YuLin
    refer this link you will get all tables in SAP with description and relation.
    http://www.erpgenie.com/abap/tables.htm
    regards
    Yogesh

  • How to pass the values from internal table to field groups

    hi all,
    how can i pass the internal  table values to field groups?
    already field groups are holding some values.. INSERT STATEMENT IS NOT WORKING as it is ovewriting the existing values..
    Use full answers will be rewared.
    Thanks.
    Moderator message - duplicate post locked
    Edited by: Rob Burbank on Jun 23, 2009 9:51 AM

    Hi,
    You can use INSERT statement to put a work area of an Internal table in Field-group
    and use Extract to get info out of it.
    Hope it helps,
    Raj

  • Pass the name of a button into existing instance of a class from actionlist

    I want to pass a name of a button from actionlistener that is associated with that button into existing instance of a class. I need to do so because I have array of buttons and I have set the name of the buttons as coordinates. Is there a way to do that?

    My buttons are declared as JButton arrayOfButtons[][] = new JButton[numberOfRows][numberOfColumns];and I labeled them inside 2 for loops as:
    arrayOfButtons[row][column].setName(Integer.toString(row) + " " + Integer.toString(column));
    arrayOfButtons[row][column].setText("Some displayed text");I also added ActionListener
    arrayOfButtons[row][column].addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            System.out.println(((JButton)e.getSource()).getName());
    });Now when I press a button it only displays the array coordinates on a command line. I want the class instance where I declared the buttons to get notified which button was clicked.

  • Find out the name of a table

    Hi Gurus,
    I would like to know the name of the table which is filled with the WPUBON Idoc types.
    The only sales data available to extract to BW is the data generated by the transaction WPUK, but the extractor MC43RK0CAS doesn't get any sales data to 2LIS_43_POSCAS.
    Best Regards,
    Patrício Silva

    Hi Cereal Cerial
    How are you. Hope everything is fine.
    I am also working on 2lis_43_poscas, 2lis_44_posrec data sources.
    I transfer these two datasources and activate thru LBWE still no success.
    I didnt find where we should generate setup tables for these data sources.
    Always 0 data records showing in RSA3.
    If u get any solutions for this, plz let me know.
    Kindly advise me on the procedure. And if you have a document about it it will be greatly appreciated.
    Advanced Thanks
    Chandra

  • About the Names of std Tables  and their list of contents

    Hi  every body ,
    can u pls give me Source of  finding the  list of standard tables and their contents
    such  that  i can refer to  those tables to determine  what should be the Mandatory  data elements .
    i need just 2 determine   what  is  required  and  what not ?
    Awaiting for a  brighter and good response .....
    reply to  [email protected]

    Hi,
    Search for SAP Tables in www.sap-img.com. You will find a Zip file, this has most of the tables used in most of the modules. Check those tables and find which are all the primary fields.
    Regards
    Subramanian

  • How I ca have the name of parameters of  an stored procedure?

    Hi,
    I have an stored procedure with a lot of parameters. I want to list them automatically by writing codes to show me the name of all parameters
    thanks,
    mandana

    Back to your original question... it's a bit hard to answer this without you saying what DB system you're using, as the answer will be different depending on the system.
    Actually one can do it with JDBC easily enough, so the solution would be DB-independent.
    Have a look at this: http://java.sun.com/javase/6/docs/api/java/sql/DatabaseMetaData.html, specifically http://java.sun.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#getProcedures(java.la ng.String,%20java.lang.String,%20java.lang.String) and http://java.sun.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#getProcedureColumns(j ava.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String).
    I did have some proof-of-concept code for this at some stage, but I cannae find it now, sorry.
    Adam

  • Two variables in the name of a table in the FROM clause.

    Hello,
    I ve got a problem making this work:
    SELECT *
    FROM tablename_YY_MM
    (This is part of the script I need to use YY and MM in various tables)
    I need to find a way so the script will ask me every time about the YY and MM
    For example the current table name is "tablename_09_08" next month it will be "tablename_09_09"
    It looks simple but I can't make it work. It seems to be a problem with concatanation || and the underscore _
    Looks like it should be done with PL/SQL ?
    If anyone can help it will be much appreciated.
    Thank you.
    Edited by: user1067236 on Aug 11, 2009 2:21 AM
    Edited by: user1067236 on Aug 11, 2009 2:23 AM

    Hi,
    That's easy to do using substitution variables in SQL*Plus:
    SELECT  *
    FROM    tablename_&year_num._&month_num;Note the . after &year_num; it is necessary to indicate that the next _ is not part of the preceding name.
    You can also use the SQL*Plus ACCEPT command to prompt the user for values, with a detailed message.
    ACCEPT  year_num  PROMPT "Please enter year number (2 digits only, such as 09): "Edited by: Frank Kulash on Aug 11, 2009 5:29 AM

  • Want To Know The Name OF Company Table

    In Administration -> Choose Company, It gives me the list of all Company Name,Database Name,Version etc .
    I Want to know the Table Name which has all information about company name and all.
    Regards

    The db version is stored in table CINF (Version). Others information gave you members already. If you want have list of all dbs on the server like in login screen, you should use select from information schemas as
    select * from information_schema.tables where table_name = 'CINF'
    and youll receive all databases, where the CINF table is, then create tmp table (dbname, company, version fields) and in cursor go through all results from select * from information_schema.tables where table_name = 'CINF'
    make insert into this tmp table. At the end make select from this tmp table.

  • How to pass the valus to z-table

    hi all
    i want to pass values to Z-table.. i hav the ALV program... now i want to pass that valus in to ztable..plz gv me ur instruction how to do it....
    regard
    nawanandana

    Hi,
    u might have got the final internal table to populate the ALV .So what u do is.
    create a internal table(ITAB) of structure of ztable.
    then.
    Loop the final internal table.
    move the corresponding fields to the ITAB.
    endloop.
    now ,
    update ztable from table ITAB.
    if sy-subrc eq 0.
    commit work.
    endif.
    regards,
    nagaraj

Maybe you are looking for

  • How to change host name for management agent.

    Hi, I 've installed management agent for oracle, it's a part of Oracle Management Framework, but I have to change host name. I know how to change port number, but I've no idea how to change host name. Have you got any idea? Thank you in advance. Mati

  • Classpath error in webdynpro application

    Hi All, Currently I am using NWDS7.0.16, and I created webdypro application which connect to BI System by make use of BI-  XMLA connector. for that I added all required jar file in JavaBuild path. but when i try to build the application I am getting 

  • Passing Source Query Variables to Target query in RRI

    Hello, I Creating Jump Queries. In the source query user is entering some variable(Dates), based on these varaibles I am creating formula variable in the source query. I wanted pass the same varible values(which are entered by user) to target values(

  • BAPI/FM for WA01, WA02 and WA07

    Hi, Would anyone know if there's any existing bapi/fm for the ff. transactions in 4.6C? a. WA01 - creation of allocation table b. WA02 - creation of follow on documents (vendor PO) c. WA07 - generation of follow on documents from allocation table (wa

  • ABAP WD: Different display in Test window and enterprise portal

    Hi, I am using Table and TreeByNestingtable column in ABAP webdynpro(Basis 710 release). When I run the application using test, table captions are not in bold and there is no difference between TreeByNestingtable column and other columns in backgroun