Getting table column header names from database

Hi,
We are trying to get table headers from database. So when we query the database it returns multiple rows at the same time. How can we display specific table column headers from the returned result set at respective places.
We tried using record selection expert but that only works for one selection and not for others.
How can we do this?

Thank you Josh and Abhilash for helping us.
We are using PostgreSql.
"command_headers" has query which looks like following-
SELECT id, header  FROM labels
WHERE id='header.header_1'
OR id='header.header_2'
OR id='header.header_3'
ORDER BY id;
which will return following result set-
id                              header
header.header_1        Header1
header.header_2        Header2
header.header_3        Header3
Our Table structure is something like this-
Page Header: Header1                        |  Header2                       | Header3                    
Details:           {command_data.value1} | {command_data.value2} | {command_data.value3}
command_data is another command which generates data for the table.
All values in details section coming from command_data is in format string.
We don't need to apply grouping or sub totals. This is a simple table, showing string values for all columns.
Preview:
Header1     |     Header2     |     Header3
car              |     yello           |     abc
bike            |     black          |     xyz
plane          |     white           |     pqr
Currently, all headers are static labels. How do we use "command_headers" to display all table Headers dynamically? Can we achieve this format using cross tab?

Similar Messages

  • How to get the Portal Page name from PLSQL?

    Can anyone tell me how to get the portal page name from my dynamic page using plsql?
    Apparently you can get the page id and work it out from there, but my calls to get the page id are not returning any values anyway.
    My code for attempting to get the page id is below.
    <oracle>
    declare
    v_pageid varchar2(30);
    begin
    v_pageid := wwpro_api_parameters.get_value('_pageid', '/pls/portal30');
    htp.print('Page is '|| v_pageid);
    end;
    </oracle>
    Ideally I'd actually just like to get the page name. Is there a straightforward way to do this?
    Thanks in advance!
    Sarah

    Few clarifications -
    1. wwpro_api_parameters cannot be used to get default portal
    page parameters such as '_pageid', '_dad', '_schema' etc.,
    2. Page information can be obtained through any components which
    are available in that particular page. For example, in case of
    dynamic page, we need to publish it as a portlet and add it to the
    page. This process creates necessary packages in the DB, but we
    will not have access to the portlet methods.
    So, I would prefer creating a simple DB provider & portlet and access
    page title from its show method as follows -
    //Declare local variable l_page_id, l_page_title as varchar2
    select page_id into l_page_id from wwpob_portlet_instance$ where
    portlet_id = p_portlet_record.portlet_id and
    provider_id = p_portlet_record.provider_id;
    select name into l_page_title from wwpob_page$ where id=l_page_id;
    More information on DB provider can be found at
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/articles/understanding.database.providers.html
    Secondly, usage of wwpro_api_parameters.get_value method is
    incorrect. This method expects two arguments -
    <ul>
    <li><b>p_name : </b> The name of the parameter to be returned.</li>
    <li><b>p_reference_path : </b> An unique identifier for a portlet instance on the current page.</li>
    </ul>
    p_reference_path would be something like 99_SNOOP_PORTLET_76535103 and not some type of path as its name suggests.
    The following code fragment fetches all parameters available
    for a portlet.
    Note : Copy this code into 'show' method of your portlet.
    //Declare l_names, l_values as owa.vc_arr
    * Retreive all of the names of parameters for this portlet
    l_names := wwpro_api_parameters.get_names(
    p_reference_path=>p_portlet_record.reference_path);
    * Retreive all of the values of parameters for this portlet
    l_values := wwpro_api_parameters.get_values(p_names=>l_names,
    p_reference_path=>p_portlet_record.reference_path);
    //Loop through these arrays to get parameter information
    htp.p('<center><table BORDER COLS=2 WIDTH="90%" >');
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(wwui_api_portlet.portlet_heading('Name',1));
    htp.tableData(wwui_api_portlet.portlet_heading('Value',1));
    htp.tableRowClose;
    if l_names.count = 0 then
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.p('<td COLSPAN="2">'
    ||wwui_api_portlet.portlet_text(
    'No portlet parameters were passed on the URL.',1)
    ||'</td>');
    htp.tableRowClose;
    else
    for i in 1..l_names.count loop
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(l_names(i));
    htp.tableData(l_values(i));
    htp.tableRowClose;
    end loop;
    end if;
    htp.p('</table></center>');
    Hope it helps...
    -aMJAD.

  • How to set title/text for ALV table column header in WD ABAP

    Hello,
    I am working in WDA using SALV_WD_Table to display data in table. I need to change the column header text, the obvious way is to get the column header and call the method SET_TEXT to set new text / title. However, this method does NOT work, it does not change the column header text. I also tried the SET_TOOLTIP, this one works, but SET_TEXT does not work. Anyone has idea why this not working and do you find any go-around solution?
    My version is NW 7.0
    Thank
    Jayson

    Hi jason ,
    For setting Heder text for your ALV table
    ip_confing type ref to CL_SALV_WD_CONFIG_TABLE.
    "set alv table header
      ip_config->if_salv_wd_table_settings~r_header->set_text( 'Test ALV Header functionality' ).
    first you have to hide the DDIC text and then try to set your own text .
    "modify columns
      LOOP AT lt_columns INTO ls_column.
        lr_column = ls_column-r_column.
        CASE ls_column-id.
          WHEN 'MANDT'.
            "hide this field
            lr_column->set_visible( cl_wd_abstr_table_column=>e_visible-none ).
           WHEN 'SEQNR'.
            "set header to different string
            lr_column->r_header->set_ddic_binding_field( if_salv_wd_c_column_settings=>ddic_bind_none )." use this line to hide ddic text
            lr_column->r_header->set_text( 'Position' ).     
        endcase.
      endloop.
    Regards
    Chinnaiya P

  • How to display the sorting arrows in the table column header

    Hi
    I am doing a sorting for some columns from the click of the table column headers, In Developer studio, we are able to view the up and down arrows, I need that also to be made visible at run time, so that the user knows that there exists sorting based on that particular column. Is there any other way of doing it ? I cant place more than one control on the header or wrap the text to two lines..also. please clarify. thanks

    I assume you are using NW 04.
    The table column header contains a IWDCaption element which may display an icon and a text. See property IWDCaption.imageSource.
    The table tutorial might also be helpful.
    Armin

  • Image in table column header to the right of the text?

    Does anyone know how I can put an image on the right of the text in the table column header?
    If I do column.setGraphic it positions image on the left, how can I change the position of the image?
    For that matter how can I set alignment of the image? Like if I want it in the corner (even left corner will do) and not next to the text?
    Appreciate any help !

    You can do this with CSS (needs an external stylesheet, can't be done (easily) with an inline style).
    Something like
    .table-view .column-header-background .label {
      -fx-content-display: right ;
    }(Untested... you may need to experiment a bit.)
    The structure of the table view control from the css perspective is documented here: http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#tableview

  • JButton to simulate table column header

    is there a property on the JButton that will make it behave the same way as a table column header ? Someone showed me a property window of a swing app and they wanted to know how it was done. i suggested to juse use soem buttons, but when i looked closer it was apparent that the action of the buttons was different from what i am familiar with. the buttons moved in/out when they were clicked instead of just turning color.

    i was just playing around with it again and used an AWT button. these do the same thing that the example i saw. i wasnt aware of this difference between swing jbuttons and AWT buttons. When pressing an AWT button, it appears as if it is depressed when you click it as opposed to a swing button that just changes to a darger grey. what am i missing ?

  • Show the presentation variable on table column header

    hi, experts,
    is it possible to show the presentation variable on the table column header.
    I have created a edit box with presentation variable on the prompt.
    I would like to show the value the user entered on the column header because the values under that column are driven by the presentation variable.
    Thank you very much!

    You cannot put variables in the column headers, as they get considered as text and the same shows in the reports.
    However, you can use the session or repository variables in the alias field in the presentation layer.
    You should make sure, that in this case, all the calculations are done in the BMM layer and not in answers, for the columns where you will be using the variables.

  • ADF 10.1.3.4 - html tag in af:table column header

    Hello,
    How can I to put "&lt;br/&gt;" into af:table column header?
    I tried to put "&lt;br/&gt;" in both the headerText property of the af:column and in the VO, but it always get encoded.
    Thanks before.
    Regards,
    Rudi
    Edited by: bungrudi on Nov 24, 2008 1:50 AM -- encoding the br tag in the post, because it get rendered as is :)

    Hi,
    you can't mix and match HTML markup with JSF elements. This is only possible if the JSF component explicitly supports this (like af:formattedOutput).
    Frank

  • How to disable right click option re-size on table column header?

    Hi All,
    Please let us know how to disable right click option re-size on table column header.
    The issue is that when I right click on the column header, the column is selected and the context menu with options like Sort, Columns, Resize Columns, etc.. is popping. we want to disable column  re-size option.
    We are binding the table values programatically (not using Bc4J) and the Jdeveloper version is 11.1.2.2
    Thanks in advance,
    - Vignesh S.

    Hi Gawish,
    Thanks for the reply.
    This will make the particular column frozen and only work for that particular column.
    My use case is that to remove the resize columns option from the context menu or to disable the right click option.
    Making column selection as none will disable the right click option but we need column selection for sorting.
    Is there any other way to achieve this?
    Thanks in advance,
    -Vignesh S.

  • How to get list of file names from a directory?

    How to get list of file names from a directory?
    Please help

    In addition, this:
    String filename = files;Should be this:
    String filename = files;
    That's just because he didn't use the "code" tags, so [ i ] made everything following it become italicized.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Get clicked column header not working

    Here's what I'm trying to do:
    Have a multi-column listbox of elements.  Allow the user to select a few rows he is interrested in (and the become highlighted).  Allow sorting of the listbox by clicking on the column headers.
    I've got the listbox populating fine, if nothing is selected, the sorting works fine (event structure based on mouseup event of the multi-column listbox, calling to the "get clicked column header" invoke node method sorts the data.  The part that is not working is that If the user has elements selected, sorts the listbox, the same elements are selected (not the same rows, but those same elements in whatever row they ended up after being sorted). 
    What happens is if I select a few rows in the listbox (listbox configured for 0-N elements selectable, highlight entire row), and then click on the column header, the event structure fires off a value change event for the listbox and changes to no elements selected.  if I then click the column header again, it fires off the mouse up event and I get the sorting, but now none of the rows are selected.  Weird thing is that first time I click the column header and it fires the value change event, a call into get clickced column header returns negative value so it won't tell me which column header the user clicked to "empty" the selection.
    Bugger!!!!  doesn't work how I want it to.
    Funny thing is if I change the listbox over to a 1-N elements selectable, and then select a few rows, and then click on the column header, the event structure fires off the mouse up event and I get the sorting and re-selecting exactly as I would expect. 
    What's the deal here?? is this a bug, or expected behavior.  If it's expected, it would be nice if it were a little more consistent between the different types of listboxes.  Also, any good suggestions as to how to allow users to have 0-N selected elements, and be able to sort the listbox and keep the selected rows selected?

    Sounds annoying.  Here is a variation of my goto method for these types of problems:
    Use the MouseDown? event to catch important info like the old value.
    Restore the old value at the end of the Mouse Up event.
    Some details, like making sure that the down and up clicks are in the same cell.
    Use Defer Updates to prevent flashing.
    One of many kluges I have around for the MC Listbox....
    Attachments:
    MCListboxKluge.vi ‏20 KB

  • How to fix the table column header and resize the width of a table column?

    Hi all,
    I have the following two requirements,
    1) I need to wrap the table column header into two rows. I mean the header must be displayed in two rows.
    2) I need to to able to resize the width of the column. i.e The user should be able to drag the column width according to his requirement.
    Is this possible. Any help would be appreciated!
    Regards
    Kishan

    Hi Kishan,
    Refer to these links.They may ne useful for you.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80d81237-b780-2a10-d398-cc33af6bd75c
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/ded11778-0801-0010-258f-ac3b9408a194
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30291df2-b980-2a10-0884-839c4f7f147e
    Regards,
    Sumangala

  • Dynamically changing the Advance table column Header.

    Dear All,
    I want to change dynamically the Advance table column header.
    I tried the below code and its working process request,not in process form request when button pressing.
    Please suggest me.
             OAAdvancedTableBean tableBean =
                               (OAAdvancedTableBean)webBean.findIndexedChildRecursive("advanceTableRN");
                           if (tableBean != null) {
                           System.out.println("tableBean");
                               OAColumnBean columnBean =
                                   (OAColumnBean)tableBean.findIndexedChildRecursive("column3");
                               if (columnBean != null) {
                                   System.out.println("columnBean");
                                   OASortableHeaderBean colHeaderBean =
                                       (OASortableHeaderBean)columnBean.getColumnHeader();
                                   if (colHeaderBean != null) {
                                       System.out.println("colHeaderBean");
                                       colHeaderBean.setText("Segment3");

    You can try 2 options:
    1. Try to call pageContext.forwardImmediatlytoCurrentPage();
    2. Try yo set a vo attribute to the columnbean text property and set the vo attribute programmatically. (I have not tried this but I think it should work)
    Cheers
    AJ

  • How to Merge ADF Table Column Header in ADF Table ?

    Hi All,
    We need to have ADF Table Column header to be "Merged",
    e.g :
    There are two columns Header : | Qty (Case) | Qty (Pack) |,
    can we customize it to display like this :
    | ----- Qty -------|
    | Case | Pack |
    where there are two rows in column header, the first one is "Merged".
    How can we do that ?
    Thank you very much,
    xtanto

    Hi Kelly,
    Thank you for your reply,
    Using Column Faced, Header I can format the header of one column Only.
    My requirement is to Merge header of two colums :
    | ----- Qty -------|
    | Case | Pack |
    'Case' &'Pack' is two different column, so I need to add one row on the header of the two colums, then 'merge' them, and add the word '----Qty----'.
    Is it possible ?
    Thank you,
    xtanto

  • How to Freeze Table/Column Header "without using additional scrollbars" ?

    hi people,
    I am hoping someone can help me here. I have a large table and would like to freeze the first row. Scrolling down the table "_*using the existing scrollbars*_" in the browser while ensuring the header rows are still visible (like Excel when you freeze panes). If you scroll to the right the header rows should stay frozen and not follow.
    I know there are other threads which talk about freezing table/column header, but my requirement is to have it "without using additional scrollbar".
    Thanks in advance,
    RAKESH

    Hi,
    there is no default key for this. You will have to code your own JavaScript for this. Also, I am not sure you want the column to be selected but a field in the column for the row you are in - correct ?
    Frank

Maybe you are looking for

  • Ipod touch will no longer turn on or charge.

    Hi there, I recently restored my iPod touch and i didn't really watch the restore. I know the loading bar on ipod was nearly at end. Anyways, 10-15mins later i go to use my ipod and clicking the home button nothing displays. I then try to turn on, ye

  • Error while accessing CSadmin

    Dear Gurus, I have installed Content server 640 on SUSE Linux 10 SP2 without selecting the SAP DB option as i wanted to store all my files on FILE SYSTEM. My filesystem is as below =====================================================================

  • Error when refreshing workbook in BEx: Specific Macro CallBack not found

    One of our users is getting the following error when refreshing any BEx workbook (in BI7): Problems while calling the exit on refresh: Specified Macro 'CallBack' is not found in the workbook This error suddenly started this week, everything was fine

  • New GL Budget rate ledger

    Hello We have 2 seperate ledgers maintained for Leading ledger & Budget rate. (New GL) I am aware that 0FI_GL_14 will extract all line item from leading ledger only. Which Datasource should we use for Budget Rate? SAP suggests that we should use 3FI_

  • AQ Dequeue serially not concurrent

    I use Oracle 10gR1. I Created a multiple consumer queue. I added one subscriber to the above queue. I start to use the queue. I realize that dequeing is concurrent from the single subscriber. My program need strongly a serial dequeing. Does a single