Retrieve the fields name of a table

HI,
I need to write a loop to get the name of each fields in a table. I nedd something like
for each field.fieldname do something
thanks,
Mandana

select * from yourtable where 1 = 2
The resulting columnlist will give you all the field names.

Similar Messages

  • How to retrieve the Field Name of a Table

    Hi guys,
    I'm trying to retrieve the field name of a table in java, but i don't know how to do it. Could somebody help me?Let say i have a table name Itemmaster, then
    i want to retrieve its field and display to dos prompt.
    Example :
    Item No.
    Description
    Quantity
    It is possible to retrieve the fields?
    What could be the possible command in java using packages Java.sql.*?
    Thanks in advanced...
    Best regards,
    Dharry

    The ResultSet class, which is how query results are returned in JDBC, has methods to get at the metadata for the table queried, including column names:
    ResultSet resultSet=statement.executeQuery("select * from table");
    resultSetMetadata=resultSet.getMetaData();
    resultSetMetadata.getColumnLabel(column+1);

  • How to get the field names of a table

    hi all,
    i need to get all field names of a table. here i dont need any data. i need only field names.
    initially i used this query, select * from tname;
    the problem is if table have 1000 records, all records will be in memory.
    how to get this one.
    regards
    pavan.

    hi all,
    thanks a lot. the query is working.
    initially i given this query
    select column_name from user_tab_columns where table_name='mytable';
    but no rows selected.
    and i tried with this,
    select column_name from user_tab_columns where table_name='MYTABLE';
    this is working fine.
    thanks
    pavan.

  • Know the field names in 1 table

    Hi,
    i would like to know is there any way that we can know how many column inside the table in the database n what is the column names?
    for example:
    table supplier
    supplierId supplierName address
    so there are 3 columns and the names are supplierId, supplierName, address

    ResultSetMetaData lets you find out about what columns have been retrieved from a query.
    DatabaseMetaData class allows you to get a lot of info about the database in general:
    Schemas in a database
    Database Tables in a schema
    Database columns for a table
    Check out the java.sql package in the API.

  • Need a table for the texts of the field names of a table

    Hi Experts,
    I need to find out a table wchich has the following fields,
    Table name,Fieldname and fieldname Text,.
    I have tried , but not found such table.
    Thanks in advance,
    Harshit Rungta

    Hi Jay,
    Thanks for your answer ,
    But dd03l does not have field texts
    Also i have tried dd03t,
    but its not showing the expected enteries.
    I have tried searching DD* , but no luck still..
    regards,
    ]Harshit Rungta

  • Field names from which table???

    Abapers,
    I have a question regarding a table used for retrieving the field names based on the message type?? Does anybody has any idea which table is used for this purpose.
    Any solution is really appreciated.
    Thanks,
    Naren

    You going to have to give us more than that......please.
    Need more input.
    Regards,
    Rich Heilman

  • What are the field names for below mentioned

    Hello Friends
    What are the fields names for below tables
    in EKKO
    Purchase Document Date
    Net Value of the purchase document.
    In EKPO
    Item Description
    From which place We bought it. (It means in Sales Items there we can know from which plant we sold the goods, like in EKPO, there is any field like this)
    Please let we are defining the report to find out the stock availability for perticular storage location using select Options plant, company code, material no.
    How many tables involve her to build this report. and also field names, they come under which table.
    Please send me this information ASAP. PLz Plz Plz..........
    Regards
    Praveen

    You can check the fields of these tables via SE11
    Purchase Document Date  -  EKKO-BEDAT
    Item Description  -  EKPO-TXZ01
    Net price per item - EKPO-NETPR.
    Regards,
    Rich Heilman

  • Change All Field Names in a Table to have a Lowercase First Letter

    I have an SQL database with many tables.  All of the field names in each table start with an Uppercase letter. I would like to programmatically change all of the field names in each table to start with a lowercase letter.  Can this be done?
    E.g.:  "FieldName" to "fieldname"
    Thanks.

    O.K.  Just in case anyone else runs into this, I used Carl's answer to guide me in the right direction. This is my final code that created the commands I needed to run a batch (where TMaster is my schema name and the WHERE statement contains
    the datatypes in your tables):
    SELECT
    'EXEC SP_RENAME ''TMaster.'+TABLE_NAME+'.'+COLUMN_NAME+''',
    '''+LOWER(SUBSTRING(COLUMN_NAME,1,1))+SUBSTRING(COLUMN_NAME,2,255) 
    +''',
    ''COLUMN'''
    FROMINFORMATION_SCHEMA.COLUMNS
    WHEREDATA_TYPE='int'.

  • Displaying Field name in a table

    Hi,
    I want to display the field names in a table.
    Is it possible to achieve this through coding?
    Regards,
    Ram.

    Hi,
    Please explain the requirement clearly.
    Where you want to display the field names of the table.
    Regards,
    Umasankar

  • How to get the field name of an internal table during runtime?

    How to get the field name of an internal table during runtime?

    Hi  Sudhir,
    Declare and Use Get Cursor Field in Your Prm to get the field Name of the Intenal Table
    Example Code:
        <b>  DATA: v_field(60).                        " Insert this code.
         GET CURSOR FIELD v_field.        " Insert this code.</b>
         <b>CHECK v_field = 'ITAB-KUNNR'.    " Insert this code. (or)
    Write: v_field.</b>
    Regards,
    Ramganesan K.

  • Can anyone tell me the field name, table name for the following scenario?

    Hi All,
    Can anyone tell me the field name and the respective table name for the following scenario's?
    1. A report to list all the materials to which Invoice is done and delivery is pending.
    2. A report for Order tracking.
    3. A report, which gives PO(Purchase Order),  Pricing details.
    4. A report, which calculates the MATERIAL COST. It will select all the material issued for the entered service order number from  stock.
    Thanks & Regards,
    P.Gowrishanker
    Edited by: Gowrishanker pari on Jun 1, 2008 8:58 AM

    I believe that OmniVision Technologies has the contract for the 3gs.

  • How can i read the field name in the internal table

    Hi friends
    i want to read the internal table filed name.
    my requirement is like this:
    data: begin of t_header occurs 0,
           extno(12),
           priotiy(5),
           ecnumber(10).
          end of t_header.
    loop at t_header.
    if the field name is priority i want to write some other
    logic here.....
    endloop.
    Please tell me how can i do this.

    data: wf_fld_cat type slis_t_fieldcat_alv .
    data: wf_repid like sy-repid .
    data: int_tab_name type slis_tabname .
    move: sy-repid to wf_repid  ,
            'INT_OUTPUT' to int_tab_name .
      call function 'REUSE_ALV_FIELDCATALOG_MERGE'
       exporting
         i_program_name              = wf_repid
         i_internal_tabname          = int_tab_name
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
        i_inclname                   = wf_repid
        i_bypassing_buffer           = 'X'
      I_BUFFER_ACTIVE              =
        changing
          ct_fieldcat                  = wf_fld_cat[]
       exceptions
         inconsistent_interface       = 1
         program_error                = 2
         others                       = 3
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    wf_fld_cat[] will hold the itab definition.
    Regards
    Raja

  • How to capture the field name on a form when it's double-clicked?

    Hello,
    I plan to create a two field Help table that uses the thirty or so unique field names on the user form in field one. The second field is a Memo type field that contains the Help information for each field.
    Once I know the field name clicked, I will probably use a query to retrieve the help information. I'm planning to use the Double-Click event so the users can double-click any field on the form to be presented the specific field related information
    from the Help table.
    How can I capture the name of the field that was double-clicked, so I can proceed with this project? Thank you.
    Cordially,
    John
    Thank you, John Portland, Maine

    Thank you, Hans,
    How about this code:
    Dim varClickedFieldName as String
    varClickedFieldName = ScreenActiveControl.ControlSource
    Or would you recommend other code?
    Cordially,
    John
    Thank you, John Portland, Maine

  • How to return all field names in a table

    How do you write a report to return all field names in a table? I prefer the field names in a column.
    Thanks
    Wayne

    Hi,
    In Oracle it is,
    Select column_name from user_tab_cols where table_name  = 'Table_Name';
    Note: Table_Name should be in capital letters
    In MS SQL Server it is,
    SELECT Column_Name + ', '
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'Table_Name'
    Hope this helps!
    Thanks
    -Azhar

  • Script : how to change the Field name in standard program(ZM_MEDRUCK)

    Hi Experts,
    I am working with SAP SCRIPT. i need to change the Field Name that is PO NO to Document No & PO DATE to Document Date.
    These are assigned in data declaration as gv_name and gv_date.
    Can anyone help me to change this Fields.
    Regards,
    Vijayan.R

    Hi,
    You can archive this by making change in SAP script only. You don't need to touch the standard prgm.
    Debug the script and find it out which fields (In script editor) are printing these text on layout... then just replace them by creating your own text...
    You can create a text in TTDTG table,, like ZZPO_NAME = ( Document Name),, and use this filed in the script editor.
    &ZZPO_NAME&

Maybe you are looking for

  • Connecting New iPad (3) to vga projector

    Hi everyone Has anyone tried connecting a New iPad (3) to a projector using the vga adaptor? From what i've read, most projectors have a resolution of around 1028 x 768. What happens if you connect the New iPad, with it's 2048 x 1536 resolution, to a

  • Illustrator File Too Big

    I am trying to design handbags in illustrator. We have made patterns out of fabric jpegs to use as fills, and have our graphics embeded in the file. Our files are so huge we are having problems printing and saving the files. Any solutions? Will just

  • ExtJS Drag and Drop Tree Implementation

    Hello! I found this wonderful example of a drag and drop tree, with the ability to save the changes, but I'm not quite sure how to go about implementing it. Can someone point me in the right direction? Thank you, Tammy

  • Fax/send pdf in flash

    Hi, I am a moderate flash designer and mostly make animations. I don't work with actionscript too much so I really need your guys' help. I need 2 things. First: I am making an internet fax demo where I want someone to enter their email in a simple te

  • MS Explorer Image Toolbar

    Is there a way of forcing a user's browser to disable the MS Explorer Image Toolbox? I'm talking about that little pop up that prompts a user to copy (steal) the image, print or email the link. It's very annoying and it blocks the text on some of my