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

Similar Messages

  • How to set DDL lock for a table

    OCI,how to set DDL lock for a table?

    Oracle acquires a dictionary lock automatically on behalf of any DDL transaction requiring it. Users cannot explicitly request DDL locks. Only individual schema objects that are modified or referenced are locked during DDL operations. The whole data dictionary is never locked
    DDL locks fall into three categories: exclusive DDL locks, share DDL locks, and breakable parse locks.
    see this link
    http://www.sc.ehu.es/siwebso/KZCC/Oracle_10g_Documentacion/server.101/b10743/consist.htm#i5281

  • How to set plain-text for outgoing messages?

    I just upgraded from a Pre "minus" to a Pre 2 with WebOS 2.1 . I now have mail recipients complaining that my messages are in HTML. How to I revert to plain-text for sending messages?
    Post relates to: Pre p100eww (Sprint)

    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 Highlight a text in alv table

    Hi
    i want to highlight(make BOLD) a particular text in the alv table.
    how to do this
    thanks and regards
    chythanya

    Hi chythanya ,
    Try this,
    Go to the prorpeties of the text to which yo want to dispaly as bold and set the design prorpety  as Emphasized, and now the text will display as bold.

  • Resolved:how to set default LAYOUT for ALV list display

    hey guys,
      In my alv report there are 20 cloumns.
    after display i usualy choose 12 of them from CHOOSE LAYOUT option and then give it to print...
    how to set this LAYOUT as default
    sorry guys i figured it out..
    but can we give it programiticlay?
    Edited by: kumar gaurav on May 27, 2008 8:15 AM

    hi,
    you can do it.
    after declaring the catlog table you will give as
    wa_catlog-seltext_l = 'material'.
    wa_catlog-datatype = 'char'.
    wa_catlog-outputlen = 18.
    wa_catlog-fieldname = 'matnr'.
    append wa_catlog to i_catlog.
    clear wa_catlog.
    wa_catlog-seltext_l = 'plantl'.
    wa_catlog-datatype = 'char'.
    wa_catlog-outputlen = 4.
    wa_catlog-fieldname = 'werks'.
    append wa_catlog to i_catlog.
    clear wa_catlog.
    similarly what sequence you give here i.e. material  ,  plant  etc. you get the output in the same oder you can even give only the fields you want in the output.
    rewards points if useful.
    siri

  • How to set single parameters for two tables?

    SELECT GM.GRNNO,GM.GRNDATE,SUM(GS.APPROVED),SM.ISSUENO,SM.ISSUEDATE,GS.ITEMCODE,SUM(SS.ISSUEDQTY)
    FROM IMS_GRNM GM,IMS_GRNS GS, IMS_ISSUEM SM, IMS_ISSUES SS
    WHERE GM.GRNMSERIAL=GS.GRNSSERIAL
    AND SM.ISSUEMSERIAL=SS.ISSUESSERIAL
    AND GM.POSTED='T'
    AND SM.POSTED='T'
    AND GS.ITEMCODE=SS.ITEMCODE
    AND GS.ITEMCODE='01-01-02-019'
    AND *******
    GROUP BY GM.GRNNO,SM.ISSUENO,GM.GRNDATE,SM.ISSUEDATE,
    GS.ITEMCODE ORDER BY GM.GRNDATE,SM.ISSUEDATE;
    ******* here i have to select the data from both the tables between two parameters named :P_1 and :P_2.
    the date column in IMS_GRNM is named as GRNDATE.
    the date column in IMS_ISSUEM is named as ISSUEDATE.
    how to set such parameters???

    I think all you need is
    Where table1.column1 between :p1 and :p2
    and table2.column2 between :p1 and :p2

  • How do I get text inside a table column to stretch the whole column width?

    Hi I am using JDeveloper Studio Edition Version 11.1.1.0.2.
    I have some tables where one of the columns are quite wide (700px) wide and some quite narrow 50px. It doesn´t look pretty. The input text inside the 50px column looks like it stretches out of the column and the inputtext in the 700px column leaves a big empty space in the right side of the column. What I had hoped for is columns which have the same padding to its content as a 100px column no matter the columns width. How do I do that? Do I have to use skinning?

    Well I don´t want the space on both sides of the input text to be that big either so that doesn´t solve the problem.

  • How to set primary key for a date column

    hello experts .,
    i need to set primary key for a column consists of the datatype date. how to solve this..?

    1008318 wrote:
    its my personal need..then it is a very bad personal need. DATE is not an appropriate type to be using for a primary key, as it cannot be guaranteed to be unique, especially when inserting multiple rows at once.
    You would be better working to business needs and implementing correct technical solutions to those needs, than to just do things based on your personal needs.

  • How to remove white seperators in ALV Table columns names?

    Hi,
    I am trying to remove white seperators which appeared dynamically on using ALV table on each of the column names. I checked in ALV API's but could not find anything there to remove code wise. Please help to remove this.
    Thanks
    Praveen

    Hi Praveen,
    Please use the following method.
      DATA lo_table  TYPE REF TO cl_salv_wd_config_table.
      CALL METHOD lo_table->if_salv_wd_std_functions~set_sort_headerclick_allowed( EXPORTING value  = abap_false ) .
    Regards,
    Manogna

  • Bold text in af:table column header

    Guys,
    I want to bold the text in af:column header.
    I want "label1" text to be bold.. Any suggestions welcome.
    <af:column sortProperty="test1" headerText="label1"
    inlineStyle="font-weight:bold;">
    <af:outputText value="#{row.attribute1}" id="ot129">
    </af:outputText>
    </af:column>

    Hi,
    you can use the property headerClass.
    For example:
    headerClass="myClass"
    .myClass{
    font-weight:bold;
    }or using facet:
    <af:column align="center">
                    <f:facet name="header">
                        <af:outputValue value="Text" inlineStyle="font-weight:bold;"/>
                    </f:facet>
                    <af:outputText value="#{row.attribute1}" id="ot129">
                    </af:outputText>
    </af:column>Regards,

  • How to set default layout for ALV grid ?

    Dear all,
    When execute ALV reports, the user customize the layout for their own purpose. But each time they run that report, they must choose again their layout. Is there any way to set the layout as default ?
    Thank you very much,
    Sylvecat.

    Hi,'
    After you have created a layout just follow the steps listed below for making it as default layout:
    1. Click (Save Layout).
    2. Enter a name in the Save Layout field. The name must begin with a letter.
    3. Type in a description for the layout in the Name field.
    4. Select the Default Setting check box if you want this layout to be the default layout every time you run
    the report.
    5. Click (Continue).
    Note: A warning message will appear if you are trying to save over an existing layout. Close the box by
    selecting the X in the upper right hand corner or choose Yes to overwrite the layout.
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • How to set the text for commandNavigationItem in nodeStamp facet of train?

    When I use the af:train w/o ndeStamp facet, the train displays proeprly with text next to each nod, e.g.,
    <af:train id="train" var="node" value="#{controllerContext.currentViewPort.taskFlowContext.trainModel}" layout="vertical"/>
    but when I use a nodeStamp, then my text dissappears. e.g.,
    <af:train id="train" var="node"
    value="#{controllerContext.currentViewPort.taskFlowContext.trainModel}"
    layout="vertical">
    <f:facet name="nodeStamp">
    <af:commandNavigationItem text="#{node.text}" actionListener="#{pageFlowScope.createModelFromTables.onSelectTrainStop}"/>
    </f:facet>
    </af:train>
    Also, jDeveloper complains that it Reference "#{node.text}" not found. Likewise for #{node.readOnly}, etc. Note I also tried #{node.label} as described in the code example [adf:train|http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_train.html]
    I am using jDeveloper 11.1.1.5.0 Build JDEVADF_11.1.1.5.0_GENERIC_110409.0025.6013

    These links will helpful for you.
    http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_train.html
    http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e12419/tagdoc/af_train.html

  • How to set default filepath for alv export?

    when i use the standard function of alv export, list-export-local file-spreadsheet
    the default filepath is "C:\Users\Administrator\Documents\SAP\SAP GUI\"
    may i change the default filepath to another direction?

    Anyone Help? Thanks~

  • How to set the First Line of Table UI in Web Dynpro ABAP

    Hi Team,
    I have a scenario where I'm displaying two Table controls one below the other. When a line is selected in the first(Top) table, I have a supply function(Event) and I fill the second(bottom) table. Everything works fine till here.
    The problem starts when I scroll the bottom table. Lets assume that I'm at line 20 of the second table and I press the lead selection to select another line on the first table. Here the second table is filled with new data but it is automatically scrolled to line 20. My questions:
    1) Do I have to set some specific property of the second table? If yes, which one and where should I set it (In the supply function? I already have the "visibleRowCount" set to "10")
    2) How do I dynamically get access to the Table Control properties?
    Thanks for your time

    Thank you Maksim,
    I did set the "selectionMode" to "Auto". I don't understand where In supply function I have to set lead selection of nested node to first element. Please elaborate on this. Are you talking about the context attribute bound to the second table? OR do I have to change the Importing parameters "Node" and "Parent_Element" of my supply function?
    Thanks for your time.

  • How to set Right Alignment for a JTable column

    Hi,
    I am using a JTable for displaying database records using AbstractTableModel. It works fine. But, for the numeric fields I want to make records right aligned using setHorizontalAlignment. I tested with TableColumn.setHorizontalAlignment but it ends up with an error. Is there a solution? Please help me. Thanks in advance.
    bhuvana.

    In you table cell renderer you can specify the alignment of the text.
    public class MyTableCellRenderer extends JLabel implements TableCellRenderer
    public MyTableCellRenderer
    setOpaque(true);
    setBackground(Color.white);
    public Component getTable.....(JTable table,Object value,......) //fill all these things
    setFont(table.getFont());
    if(value instanceof Float)
    setHorizontalAlignment(SwingConstants.RIGHT);
    setText(value);
    return this;
    This would set all the Floats to RIGHT alignment.
    Thanks,
    Kalyan

Maybe you are looking for

  • I tried FF4, decided to go back to IE8, but now hyperlinks in MSOutlook don't work. How do I fix this?

    Now, when I click a link in Outlook, nothing happens.

  • Fomatted Search Error on AR Invoice

    I'm having trouble with the following Formatted search: SELECT T0.[SLPCODE], T0.[SLPNAME] FROM OSLP T0 WHERE $[$20.0.0] = -1 ORDER BY T0.[SLPNAME] Any time I use the reference $[20.0.0] tot he Sales Person field instead of $[OINV.Slscode.0] it errors

  • TREX Error 9009

    Hi, does anybody know what TREX error 9009 menas exactly. I could not find a meaningful description of it. Kind Regards, Christopher

  • Task Server error on launch

    Hello, I currently had my macbook air serviced by applecare and it turns out they wiped my drive clean, and so I went to reinstall everything and now have the task server prompt show up every time I launch ARD, and then after pressing done, it keeps

  • My toolbars don't work in CS5 InDesign.

    When I open InDesign, I can't get the toolbars to work (the ones along the left as well as the varioius Type and other tool bar icons across the top. I tried removing my preferences, but that didn't work.