Change column header text dynamically

Hi,
I have requirement to change the column header text dynamically in sap gui programming. but couldn't see straight forward way to achieve this.
i tried following link but no success:
[Re: Dynamic header text in table control - Dialog programming;
Please share your suggestions if it can be acheived.
Thanks,
Rahul
Edited by: Rahul Yadav on Oct 25, 2010 7:29 PM

>
anmol112 wrote:
> Hi,
>   So you can try 1 thing,
> * Dont use default Column Headings
> * Create I/O and choose ouput only and fix them in place of Column headings.
> * pass the values to these I/O accordingly.
>
>
> Thanks,
> Anmol.
How is this different from the previous post?
Rob

Similar Messages

  • Change Table control Column Header text dynamically

    Hi,
    I have an requirement to change table control column header text dynamically.
    i.e. I have about 10 columns in table control, out that need to change 5 columns header text. These header texts are stored in an internal table.
    I had looked into the below link but could not get exactly how to do it.
    Dynamic headers in table control
    Could you please tell me how to do that.
    Thanks in Advance.

    Hi Saba,
    What you will need to do is this.....
    1. First replace the column Header Text box by I/O Fields and name them accordingly.
    Say for example we will consider the same example which i had explained in the link.
    there in the column header we want the header to change when some dates and entered into two fields which are out of table control say
    Start Date: 01.01.2010 to End Date: 06.01.2010
    Now we want the header to look like this,
    Column  No.    -        1               2             3                  4               5               6
    Header label   -    01/FRI       02/SAT     03/SUN       04/MON     05/TUE      06/WED
    Header name -    SPOTS1   SPOTS2    SPOTS3      SPOTS4     SPOTS5    SPOTS6
    then you go as per the instructions in the link......
    Let me know if you need further help,
    Hope this solves your problem....
    Regards,
    Abhijit G. Borkar

  • Changing Portlet header text dynamically

    I trying to change the Portlet header text depending on the value of a selected page parameter. e.g. I selected the FTSE 100 stocks link on a page and I want the portlet to display the list of stocks and the banner to say "FTSE 100" similarly if I pick the NASDAQ link I want the same portlet to list the NASDAQ stocks and the banner to say "NASDAQ". I have the stocks changing using dynamic pages and page parameters but I can't seem to get at the portlet banner title variable. I working on the latest portal release.

    Hi Lisa,
    It just so happens that the "Portlet Wizard" in JDeveloper creates the default edit view to modify the page title. Here is the code it created:
    <pre>
    // Get the PortletRenderRequest and Writer
    PortletRenderRequest pr = (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    PrintWriter out = pr.getWriter();
    // Display a greeting
    String userName = pr.getUser().getName();
    out.println("<p>Hello " + userName + ".</p>");
    out.println("<p>This is the <b><i>Edit</b></i> render mode!</p>");
    // Customize the portlet title
    String actionParam = PortletRendererUtil.getEditFormParameter(pr);
    String action = request.getParameter(actionParam);
    String title = pr.getParameter("filebrowse_title");
    NameValuePersonalizationObject data = null;
    try
    data = (NameValuePersonalizationObject)PortletRendererUtil.getEditData(pr);
    catch(AccessControlException ae)
    throw new ServletException(ae);
    catch(PortletNotFoundException pnfe)
    throw new ServletException(pnfe);
    // Cancel automatically redirects to the page, so
    // will only recieve OK or APPLY
    if (action != null)
    data.setPortletTitle(title);
    try
    PortletRendererUtil.submitEditData(pr, data);
    catch(AccessControlException ae)
    throw new ServletException(ae);
    return;
    // Otherwise just render the form
    title = data.getPortletTitle();
    out.println("<table border='0'><td width='20%'>");
    out.println("<p align='right'>Title:</p></td><td width='80%'>");
    out.println("<input type='TEXT' name='filebrowse_title' value='" + title + "'>");
    out.println("</td></table>");
    </pre>
    I hope this helps!!!
    -Sean

  • How can i change column header value dynamically in IR report

    HI,
    I have created report with the help of collections. Report query has been changing dynamically but i got problem with report header names and headers names has not been changing dynamically it is always showing like c001,c002....etc so, i have created global item(G_ITEM) in shared components--->Applications items after that
    I have created process(before headers) and assigning some value to G_ITEM and used &G_ITEM to column headres in IR Report but here &G_ITEM is not showing any value.
    How can i achieve dynamic headers names by using *&G_ITEM(global items)* Please guide me to achieve this.
    Thanks in advance.
    Regards
    Narender B

    Narender wrote:
    HI,
    I have created report with the help of collections. Report query has been changing dynamically but i got problem with report header names and headers names has not been changing dynamically it is always showing like c001,c002....etc so, i have created global item(G_ITEM) in shared components--->Applications items after thatWhy didn't you answer the questions in the other thread to see if there was a better approach than this?
    I have created process(before headers) and assigning some value to G_ITEM and used &G_ITEM to column headres in IR Report but here &G_ITEM is not showing any value.
    How can i achieve dynamic headers names by using *&G_ITEM(global items)* Please guide me to achieve this.The static text exact substitution method of referencing the value of an APEX item requires a terminating dot ("."):
    &G_ITEM.

  • Changing Column header text ol ALV: Object ref cl_salv_table

    Hi Friends,
    my code:
    TRY.
              CALL METHOD cl_salv_table=>factory(
                EXPORTING
                  r_container    = gv_custom_container
                  container_name = 'CUSTOM_300'
                IMPORTING
                  r_salv_table   = gr_table
                CHANGING
                  t_table        = gt_itab_email ).
            CATCH cx_salv_msg.                              "#EC NO_HANDLER
            CLEANUP.
          ENDTRY.
    activate ALV generic Functions
          DATA: lr_functions TYPE REF TO cl_salv_functions_list.
          TRY.
              lr_functions  = gr_table->get_functions( ).
              lr_functions->set_default( abap_true ).
              gr_columns = gr_table->get_columns( ).
             PERFORM change_columns_text USING gr_columns.
              gr_columns->set_exception_column( value = 'LIGHTS' ).
            CATCH cx_salv_data_error.
            CLEANUP.
          ENDTRY.
          CALL METHOD gr_table->display.
    Problem:
    Can someone give me tips on how to change the Column text of the return table gr_table in my code.
    I would like to change the text before CALL METHOD gr_table->display.
    Thanks
    Blacky

    You need to get the perticular column object from the COLUMNS object
    Like:
      data: lr_columns type ref to cl_salv_columns_table,
            lr_column  type ref to cl_salv_column_table.
      lr_columns = gr_table->get_columns( ).
      try.
          lr_column ?= lr_columns->get_column( 'FIELD1' ).
          lr_column->set_short_text( 'Custom Text' ).
          lr_column->set_medium_text( 'Custom Text' ).
          lr_column->set_long_text( 'Custom Text' ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
    Check report: SALV_DEMO_TABLE_COLUMNS
    Regards,
    Naimesh Patel

  • How to change "Details" column header text in AdvanceTable in AdvancedTable

    Hi All,
    i am using adavanced table in advanced table in OAF page to show the master and details ,
    my requirement is to change the header text of "Details" to some other meaning ful text .
    "Details' column will be visible at runtime ,no we cant change using process request ,
    Please help me on this ,its urgent
    Thanks & Regards
    Maheswara Raju

    You can get the handle to the Detail column by using the following:
    UINode d = outerTable.getDetail();
    However, as per OAF developer guide, it is not possible to change the label for the detail column. The devloper guide has the following:
    "In accordance with BLAF guidelines, the Detail column header text for the detail disclosure column and the Show/Hide link texts within the cells of the detail disclosure column can not be modified."
    Cheers,
    Saurabh

  • Change column header dynamically at report run time

    how to use LOV In report column definition under column attributes for display..
    If it suceeded will it dynamicaly change header name at time of running report
    my requirement is actually to change column header dynamically at time of run report
    is it possible with above mentioned way?
    Apex 4.1, Oracle 11g, PL/SQL Gateway configuration
    Please help me on this
    Thanks

    Hi,
    by making use of specific report column templates and column template conditions you can change the headers dynamically.
    See this http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/ui_templt.htm#HTMDB25708 for more info.
    regards,
    Erik-jan

  • Change Column Heading in ALV Report

    Hi,
    I have developed a ALV Report, showing correct output.
    Problem is that Column Heading is not showing correct...means it is showing as per field name. But We want to change as per our understand. i.e. One column heading is like Unrestricted Stock but we want Unrestricted Stock...(BILF is an indicator)..
    We have write in the code..
    FORM build_fieldcat10.
      CLEAR fieldcat_ln.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'MARD'.
      fieldcat_ln-fieldname   = 'LABST'.
      fieldcat_ln-seltext_m   = 'BILF Unrest.Stock'.
      fieldcat_ln-key         = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT1
    But after change the selection text...not showing correct text..How can i change Column heading???
    Please help me..

    Thanks a lot dear..
    My problem resolved by using SCRTEXT_L.

  • Table Column Header Text - Refresh Table

    Hi. A question about programmatically changing the Header Text property of a Table Component.
    I've added code, in the backing bean Setter for the Table component, to change the header text as required.
    The problem is that when the page is rendered, the header changes are not displayed initially. Only after a PPR is performed (on a different component) does the table render with my property changes displayed.
    Am I doing the header text manipulation in the wrong place? Is there a way to refresh the table programmatically prior to it rendering initially (e.g. after the RENDER_RESPONSE phase?)?
    Cheers.

    Hi Bala,
    After following your invaluable advice I now have the table displaying more or less as a I need. The labels are set correctly (from the Attribute Hint that I set in the AttrDefImpl), and the Rendered property for each column is now derived from Expression Language pointing to the same AttributeHints...
    However, I'm still struggling with the DisplayIndex for the table columns. I'm attempting to set the DisplayIndex column property using EL that gets a value from the VO binding FieldOrder control attribute (which contains a numeric value). However, this does not resolve properly and in the column Property Inspector the DisplayIndex doesn't seem to display correctly itself...
    I'm wondering if this is because the FieldOrder control attribute is a String while the DisplayIndex takes an Integer. Is there a way to perform some conversion on this in the EL itself? Or maybe that is not the problem.
    Thanks again for all your assistance!

  • How to define Column Header text table control

    Hi All,
    I have to create a function in which user will pass Field Name, Field Description.
    I have to show that field description in Table Control Columns as Text for columns.
    Like if a user pass Material , PLant etc, then first column header text will be Material and so on and in rows it will show the data.
    One more thing, is it possible to define the technical attributes like length based on field passed through function.
    Please help me to find out the solution.
    Thanks
    Piyush Mathur

    Hi Piyush,
    here are the some components of the screen . you can change tehm at run time in your code.
    components: name,input,output,required,length,active,invisible,intensified,group1,group2...etc.
    at ruin time you modify these attributes..
    your requirement is to change the name attribute.
    regards,
    sateesh

  • Report painter - Choosing column heading text

    Hi SDN
    I'm having a specific problem with getting the right column heading text into my G/L report painter report created in FGI2/FGI5. In the report painter form I have created the three texts for my column (short, medium and long text). In order for the heading to be meaningful I need the report to show the medium or long text. This is also the case when I run the report as object type Object list. Here the medium text is displayed. However, when I run the report as a Classic drilldown report or a Graphical report output the short column heading text is shown.
    Now, I know from running the standard report 0SAPBLNCE-01 in FGI0 that it is possible to have the long column header text shown in the report, so I'm not willing to give up. But can any of you guys help me on how to make the report show the correct text?
    Kind rgds
    Steen Koefoed

    Hi Anna and thanks for your suggestion. I have tried changing the header text length in the form as you suggested, but it does not seem to affect the display in neither of the three output types of the report. I assume that there must be a way to control the text header length specifically for each of the three output types. But how....

  • Restricted Key Figure Column heading text missing

    Hello,
    I created a restricted Key Figure in a BEX report and dragged this RKF into the columns tab. when i execute the report , the column header text for the restricted key figure is missing. The values are fine, but the header column text  for that KF is missing. any help?
    Thanks
    justin

    Hi Justine...
    I think u r doing something wrong..........Either u can create Global Restricted Key(Infoprovider level) or Local restricted ket figure(Query level)..........If u create Global........then  in the left pane............Right click on the Keyfigure >> New restricted Key figure...........to create in the Query level..........In the context menu>> choose Edit........... or select the heading of the Rows or Columns directory
    and use the right mouse button to choose New Structure..........In both the cases....there is a Description Field........u hav to write the description there............U can change the technical name also.........then save it........
    May be it is a temporary bug............just come out the query..and again reopen it......
    Regards,
    Debjani.....

  • How to create column header text while downloading file

    How can we create column header text while downloading file using function GUI_DOWNLOAD(in SAP Release 4.6c) because there is no FIELDNAMES parameter in
    4.6c version.

    Hii,
      Check this sample code. I have called GUI_DOWNLOAD twice. Onetime to download header of table and next time data of table
    REPORT  z_file_download.
    DATA: w_name(90) TYPE c.
    DATA:
      BEGIN OF fs_flight,
        carrid   LIKE sflight-carrid,
        connid   LIKE sflight-connid,
        fldate   LIKE sflight-fldate,
        price    LIKE sflight-price,
        currency LIKE sflight-currency,
      END OF fs_flight.
    DATA:
      BEGIN OF fs_head,
        carrid(10) TYPE c,
        connid(10) TYPE c,
        fldate(10) TYPE c,
        price(10) TYPE c,
        curr(10) TYPE c,
      END OF fs_head.
    DATA:
      t_head LIKE
       TABLE OF
             fs_head.
    DATA:
      t_flight LIKE
         TABLE OF
               fs_flight.
    fs_head-carrid = 'CARRID'.
    fs_head-connid = 'CONNID'.
    fs_head-fldate = 'FLDATE'.
    fs_head-price  = 'PRICE'.
    fs_head-curr   = 'CURRENCY'.
    APPEND fs_head TO t_head.
    SELECT-OPTIONS:
      s_carrid FOR fs_flight-carrid.
    START-OF-SELECTION.
      SELECT carrid
             connid
             fldate
             price
             currency
        FROM sflight
        INTO TABLE t_flight
       WHERE carrid IN s_carrid.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                  =
        filename                      = 'D:\flight.xls'
       FILETYPE                      = 'ASC'
    *   APPEND                        = ' '
        WRITE_FIELD_SEPARATOR         = 'X'
    *   HEADER                        = '00'
    *   TRUNC_TRAILING_BLANKS         = ' '
    *   WRITE_LF                      = 'X'
    *   COL_SELECT                    = ' '
    *   COL_SELECT_MASK               = ' '
    *   DAT_MODE                      = ' '
    *   CONFIRM_OVERWRITE             = ' '
    *   NO_AUTH_CHECK                 = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   WRITE_BOM                     = ' '
    * IMPORTING
    *   FILELENGTH                    =
      tables
        data_tab                      = t_head
    EXCEPTIONS
       FILE_WRITE_ERROR              = 1
       NO_BATCH                      = 2
       GUI_REFUSE_FILETRANSFER       = 3
       INVALID_TYPE                  = 4
       NO_AUTHORITY                  = 5
       UNKNOWN_ERROR                 = 6
       HEADER_NOT_ALLOWED            = 7
       SEPARATOR_NOT_ALLOWED         = 8
       FILESIZE_NOT_ALLOWED          = 9
       HEADER_TOO_LONG               = 10
       DP_ERROR_CREATE               = 11
       DP_ERROR_SEND                 = 12
       DP_ERROR_WRITE                = 13
       UNKNOWN_DP_ERROR              = 14
       ACCESS_DENIED                 = 15
       DP_OUT_OF_MEMORY              = 16
       DISK_FULL                     = 17
       DP_TIMEOUT                    = 18
       FILE_NOT_FOUND                = 19
       DATAPROVIDER_EXCEPTION        = 20
       CONTROL_FLUSH_ERROR           = 21
       OTHERS                        = 22
    IF sy-subrc NE 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = 'D:\flight.xls'
          filetype                = 'ASC'
          append                  = 'X'
          write_field_separator   = 'X'
        TABLES
          data_tab                = t_flight
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc EQ 0.
        MESSAGE 'Download successful' TYPE 'I'.
      ENDIF.
      IF sy-subrc NE 0.
    *  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Regards
    Abhijeet

  • To change the header text of Purchase order using BAPI

    Hi,
    I am using BAPI_PO_CHANGE to change the header text of PO. But it s not reflecting. Can anyone help me by providing solution for this.
    <i><b>Points will be rewarded for the useful answers.</b></i>

    Hi,
    I need to change the text using this BAPI alone. I am using this because i need to change many parameters of PO.
    Can u please say me solution using BAPI_PO_CHANGE. I need to know what are all the parameters need to be passed to BAPI to change the text.
    Thank you for replying.

  • User exit/BADi to change the header text in MIRO transaction

    Hi all,
    I am searching user exit or badi to change the header text in MIRO transaction.
    My requirement is, before post the invoice I need to populate the vendor name in Header text field(MIRO -> Details tab -> header text field ). I have tried all the user exits and BADi's related to MIRO. Doesn't work. If anybody knows please share.
    Thanks,
    Pranav

    Try BADI INVOICE_UPDATE.
    If you are in system version is ECC 6.0, you can find out a Enhancement SPOT (ES_SAPLMRMC) under Function module MRM_FINAL_CHECK, which can be used to perform this requirement
    Hope this helps.
    Thanks,
    Balaji
    Edited by: Balaji Ganapathiraman on Mar 14, 2008 4:43 PM

Maybe you are looking for

  • Program not behaving the same after making it a JAR

    Hello, I'm developing a program using Eclipse and wanted to export a JAR file to test out. I was able to successfully make the JAR file and it does run, but not as expected. For example, I have the following code which opens up a JFileChooser and let

  • Time Machine error- backup directory

    Yet another person with the same error: Time Machine backup has been working just fine for about 2 months to a Time Capsule. Suddenly, all I get is "Time Machine Error. Unable to complete backup. An error occurred while creating the backup directory.

  • How to import class files in Rhino shell

    Hi, i want to test some methods of ScriptEngineContext class in Microsoft_Active-Directory-and-Windows_2011.1r3 collector, so i import some class files in Rhino shell, but some errors apeared, detail steps are following: 1. steve_zeng@suse01:~/sentin

  • Flash canvas

    I have a question about flash canvas where I asked?

  • No sounds effects

    I have an iPad2 running the new ios7.  The sounds aren't working. I have the mute button in the correct position and the volume is all the way up.