How can i  change the column label text in a alv table display

how can i change the column label text in a alv table display??
A similar kinda of question was posted previuosly where the requirement was the label text was needed and following below code was given as solution :
<i>*  declare column, settings, header object
DATA: lr_column TYPE REF TO cl_salv_wd_column.
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
DATA: lr_column_header type ref to CL_SALV_WD_COLUMN_HEADER.
get column by specifying column name.
lr_column = lr_column_settings->get_column( 'COLUMN_NAME1' ).
set Header Text as null
lr_column_header = lr_column->get_header( ).
lr_column_header->set_text( ' ' ).</i>
My specific requirement is i have an input field on the screen and i want reflect that value as the column label for one of the column in the alv table. I have used he above code with slight modification in the MODIFYVIEW method of the view since it is a process after input. The component gets activated without any errors but while run time i get an error stating
<i>"The following error text was processed in the system CDV : Access via 'NULL' object reference not possible."</i>
i have checked in debugging and the error occured at the statement :
<i>lr_column = lr_column_settings->get_column( 'CURRENT_YEAR' ).</i>Please can you provide me an alternative for my requirement or correct me if i have done it wrong.
Thanks,
Suri

I found it myself how to do it. The error says that it is not able to find the reference object i.e  it is asking us to refer to the table. The following piece of code will solve this problem. Have to implement this in WDDOMODIFYVIEW method of the view. This thing works comrades enjoy...
  DATA : lr_cmp_usage TYPE REF TO if_wd_component_usage,
         lr_if_controller  TYPE REF TO iwci_salv_wd_table,
         lr_cmdl   TYPE REF TO cl_salv_wd_config_table,
         lr_col    TYPE REF TO cl_salv_wd_column.
  DATA : node_year  TYPE REF TO if_wd_context_node,
         elem_year  TYPE REF TO if_wd_context_element,
         stru_year  TYPE if_alv_layout=>element_importing,
         item_year  LIKE stru_year-i_current_year,
         lf_string    TYPE char(x),
  DATA: lr_column TYPE REF TO cl_salv_wd_column.
  DATA: lr_column_header TYPE REF TO cl_salv_wd_column_header.
  DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
Get the entered value from the input field of the screen
node_year  = wd_context->get_child_node( name = 'IMPORTING_NODE' ).
elem_year  = node_year->get_element( ).
  elem_year->get_attribute(
   EXPORTING
    name = 'IMPORT_NODE-PARAMETER'
   IMPORTING
    value = L_IMPORT_PARAM ).
  WRITE L_IMPORT_PARAM TO lf_string.
Get the reference of the table
  lr_cmp_usage  =  wd_this->wd_cpuse_alv( ).
  IF lr_cmp_usage->has_active_component( ) IS INITIAL.
    lr_cmp_usage->create_component( ).
  ENDIF.
  lr_if_controller  = wd_this->wd_cpifc_alv( ).
  lr_column_settings = lr_if_controller->get_model( ).
get column by specifying column name.
  IF lr_column_settings IS BOUND.
    lr_column = lr_column_settings->get_column( 'COLUMN_NAME').
set Header Text as null
    lr_column_header = lr_column->get_header( ).
    lr_column_header->set_text( lf_string ).
endif.

Similar Messages

  • How can i change the sequence of text element in standard driver program ?

    Hi,
    can u tell me how can i change the sequence of text element in standard  sapscript driver program.. without making a zcopy of standard driver program.
    My problem is when MEDRUCK form is getting printed for PO print , header text is coming before item. But the requirement is to come it after item.So how cani do that without making the zcopy of  SAPLMEDRUCK program..Is there any enhancement point in SAPLMEDRUCK driver program..where i can put my customise code for changing the sequence of text element ?

    Hi,
        Just copy the MEDRUCK to ZMEDRUCK. No need to copy the driver program.
    1) SE71Menu > Utilities > COpy from Client
    MEDRUCK ->>Client 000
    New formname ZMEDRUCK
    2) Now open the ZMEDRUCK in DE language in SE71
    3) Menu > Utilities > Convert original Language
    Change DE  to EN, save and activate
    4) Now open the ZMEDRUCK in EN language
    5) Goto Pagewindows > Main window,
    Look for the HEADER text Text element, copy the whole code under this Text element just after the ITEM text Text element, and comment the HEADER text above.
    Now the Header text Text element will be below ITEM text only. This will full fill your requirment.
    Now goto NACE transaction and add the copied ZMEDRUCK to the EF application.
    Regards
    Bala Krishna

  • DITA + FM: How can I change the automatically insert text for the element info?

    Hello,
    when I insert the element info in a topic, FrameMaker automatically insert the text "ADDITIONAL INFORMATION:".
    How can I change that?
    I know how to change it for the elements result, postreq and prereq. I change the text format rules for the elements in the topic.edd.
    But the element info has no text format rules and when I search in the topic.edd for the text "additional" or "info" I dont find something.
    With kind regards,
    Nina

    Hi Scott,
    thanks a lot for your reply! I've found the code in the EDD on page 65.
    "... is using the @type attribute value ..." - I have changed the values in the DTD (Structure\xml\DITA\app\dtd\commonElements.mod), but that didn't had any effect, not even after a restart of FM. I also changed the note attribute values in "dita-map.edd.fm" and "topic.edd.fm". Nothing. When I insert a note tag FM still inserts the original values.
    Did I missunderstand something? Further tips?
    Marcel

  • How can we change the column sequence from 1st to 7th position

    Hi
    I have a table in which I have a column naming DNAME and it is is on the first position I want to change its position to 7 that is the last one. The table is huge filled with data.
    Is there ant way in which I can cange the position of the column with out recreating in into another table and then renaming it.
    Thanks

    Hello,
    The sequence of a column in a table is meaningless and you should treat it as such. The column ordering you see when you run a "select * from ..." query is based on the physical implementation of the table, which is completely separate from the logical interpretation, and should not be relied on in a programmatic context. It should essentially be viewed as "random" and prone to change with the physical storage properties of the table (although this is not always the case, there is no assurance of this).
    One way to do this (which happens to be the easiest and least resource-intensive in this case) is to create a view (derived relation) of the base table, with the columns ordered in the specific sequence you desire. But really, the column ordering here is still meaningless, and the only time your application should rely on the order is when you specifically list the columns you require in a query -- but NEVER a "select *".
    cheers,
    Anthony

  • How can I change the format of text pasted into a Mail email from another document?

    I paste some text from a word document into an email in Mail.  In the word document, the text was indented .5" from the right margin.  In the Mail email document, the text also appears indented .5" from the right margin.
    But since this was the last text in the email I am composing, my text following the pasted-in part continues at the indented "style" of the pasted in text.  And thre are no controls for changing this indentation on subsequent text in that email, nor can you chage the indentation formatting of the text pasted in.
    Even when you select "decrease indentation" under the format/indentation options in the menu bar, Mail will not reduce a "pasted-in" paragraph indentation nor will it return a subsequent text paragraph you type in manually back to a left-adjusted margin.
    Am I miising something?
    Is there a way to see something in each Mail message composition window akin to what you see in a word processing document that allows you to set margins and indentations and tabs for individual paragraphs?  Just like the Formatting controls you have here in the Apple Support communities when you ar composing a message and that I used to indent this paragraph?
    And then used to return this paragraph back to the original left adjusted formatting?
    Steve

    Thanks for the reminder.  I use the formatting toolbar but forgot to go there instead of the Format menubar item for Mail to try the indent and outdent commands.
    But, alas, that indent, outdent option has no impact on text pasted into the message.  It remains stuck at the indent level of the source text.
    Might the answer lie in switching to plain text and formatting there?  Tried that and no difference.
    I did discover that if you highlight text pasted in with its "own" indentation preference "baked in" you can indent that text further and even "outdent" it back to where it was, but you cannot shake it's original indentation status to get it back to full left margins.
    Steve

  • How can I change the appearance and text on 'Continue from where you stopped last time?' dialogue

    Hi,
    I would like to change the appearance (color, header and text) of the 'Continue from where you stopped last time?' dialogue
    Could you please help me where to find the files to be edited and how to do so.
    Thanks in advance for your help!!!
    Stephanie

    Hi Stephanie,
    Unfortunately there is no way to change the text or appearance of this dialog box. You are stuck with it as is.
    www.cpguru.com - Adobe Captivate Widgets, Tutorials, Tips and Tricks and much more..

  • How can I change the ringtone for text messages (sms) at iPhone 4?

    With iPhone 3G it is not possible to change the ringtone with own sounds.
    Can I do it with iPhone 4?

    Yes, you can :-)
    Look at my homepage for ringtone!

  • How can i change the color of a field in a table depence of a value

    Hi forum
          Is this possible to change the color of a row in a specific field of a table depends of the value of this field,,, for example if the value is equal or greather than 1.
    Thnks
    Josué Cruz

    Josue,
    Yes this is possible if you use the fillColor method. It requires R,G,B value of color.
    //Sample code which highlights cell2 in my table which has two rows.
    frm1.Table1.Row2.Cell2.fillColor = "120,120,120";
    // If you want highlight complete row.
    frm1.Table1.Row2.fillColor = "120,120,120";
    So now just apply an if loop which reads the input value as greater than 1 and use the code shown above.
    Chintan

  • How to change the column name as bold in adf table

    Hi,
    How can I change the column name with bolder style and blue colour in adf Table?
    I changed the color and font weight in af:column properties, but its effecting the data in that column but not with the column Header Text property.(i have given column name in header text).
    can any one have any idea how to do this?
    and I have taken panel tabbed layout and in that i'm displaying this table.
    but this table has scroll beneath of it to show all columns.
    but i want to display all columns (for this, page should have scroll at the bottom side).
    how can I achieve this???

    Hi,
    Add the following CSS Code to the custom skin css file that is to be created as per the suggestions above.
    *af|column::column-header-cell{*
    color:Blue;
    font-weight:bold;
    This would ensure that all the table column headers are blue in color and bolder font style through-out the application.
    By the way, what version of JDeveloper are you using?
    Thanks,
    Navaneeth

  • How can I change the place of a photo in iPhoto?

    How can I change the place label of a photo in iPhoto?

    http://support.apple.com/kb/PH2381
    LN

  • How can i change the undisclosed text of Detail Disclosure in a table

    Hi.
    I have a new OAF page, with an advanced table.
    The table has a Detail Disclosure (a row-level Hide/Show in a table).
    By default, the prompt is "Show" or "Hide" for disclosed/undisclosed state.
    I need to change this text to another text, like"payment".
    How can i change the text of the table Detail Disclosure?
    Please help...

    I found this reference in the guide:
    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.
    I guess it is currently not possible.
    Regards,
    LC

  • How can i change the default text "Query by Example"

    Studio Edition Version 11.1.1.3.0
    how can i change the default text *"Query by Example"* in a Panel Collection
    Thx

    Hi thieto,
    The label you are looking for is af_panelCollection.LABEL_MENUITEM_QBE*
    I'm currently writing a blogpost on this issue. In short, you will have to create a skin resource bundle.
    In the skin definition, refer to this bundle class.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <skins xmlns="http://myfaces.apache.org/trinidad/skin">
      <skin>
        <id>mySkin.desktop</id>
        <family>MySkin</family>
        <extends>blafplus-rich.desktop</extends>
        <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
        <style-sheet-name>skins/MySkin.css</style-sheet-name>
        <bundle-name>com.blogspot.lucbors.view.bundles.MySkinBundle </bundle-name>
      </skin>
    </skins>In this class, adjust the label text to your needs.
    package com.blogspot.lucbors.view.bundles;
    import java.util.ListResourceBundle;
    public class MySkinBundle extends ListResourceBundle {
      public MySkinBundle() {
        super();
    @Override
      public Object[][] getContents() {
        return _CONTENTS;
    static private final Object[][] _CONTENTS = {
         {"af_panelCollection.LABEL_MENUITEM_QBE","the text that you want"}
    }More in the blogpost
    Good luck
    Luc Bors
    Edited by: lucbors on Jul 26, 2010 11:39 AM (blogpost finished - URL added)

  • How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)

    Hello,
    Here is the problematic:
    1° How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)
    - I've many button in a doc im creating
    - the color of the buttons is white with black stoke & black text
    - in roll over state i want them to inverse the color coding (the text white & bottom black)
    - currently the text becomes invisible as black on black cant be seen (ive stroked it white but that looks ugly)
    - i would just like to know if there is a function made for this?
    My other questions:
    2° Ive a presentation on which Ive created buttons which tigger pop-up animations
    - i have 5 buttons which trigger animations
    - the viewer can chose to Click on any of the buttons randomly
    - the problem is once the animation is open how can it be close... either:
    a) by it self after "40" seconds
    b) when ther viewer clicks another button
    3° Ive created buttons linking pages..
    - "go to page xxx"
    - when i do a preview and click on the buttons the links dont take me to the right pages
    - is that normal? (maybe in preview its suppose to be like that)
    4° I would like to intergrate YouTube videos in the presentation so they play inside the docment.. when i tried.. it said the 'link isnt a flash video'
    - what should i do?
    5° Once i export it into Swf. how how can i visualize it? or put it online?
    Thank you for your time.

    stlbbl4u wrote:
    Hello,
    Here is the problematic:
    1° How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)
    - I've many button in a doc im creating
    - the color of the buttons is white with black stoke & black text
    - in roll over state i want them to inverse the color coding (the text white & bottom black)
    - currently the text becomes invisible as black on black cant be seen (ive stroked it white but that looks ugly)
    - i would just like to know if there is a function made for this?
    You should setup Object Styles - these can also include Paragarph Styles that can be triggered when the Style is selected.
    http://help.adobe.com/en_US/indesign/cs/using/WS5CEDB81A-0011-4dc9-9DE8-AC7AD4C80076a.html
    My other questions:
    2° Ive a presentation on which Ive created buttons which tigger pop-up animations
    - i have 5 buttons which trigger animations
    - the viewer can chose to Click on any of the buttons randomly
    - the problem is once the animation is open how can it be close... either:
    a) by it self after "40" seconds
    b) when ther viewer clicks another button
    I'm not sure what you mean - I don't do files with Animations
    3° Ive created buttons linking pages..- "go to page xxx"
    - when i do a preview and click on the buttons the links dont take me to the right pages
    - is that normal? (maybe in preview its suppose to be like that)
    Does it work properly when you export it to the finished file?
    4° I would like to intergrate YouTube videos in the presentation so they play inside the docment.. when i tried.. it said the 'link isnt a flash video'- what should i do?
    InDesign won't link directly to youtube videos. I think your best bet would be to use Downloader to download the video and embed them directly in Indesign.
    5° Once i export it into Swf. how how can i visualize it? or put it online? 
    Thank you for your time.
    You can look up how to embed a SWF file into your HTML - but it depends what you mean by "online" there's a dozen ways to get a file "online".

  • How can i change the color of the text bubble and change my name instead of having verizion at the top

    how can i change the color of my background on my texting and the bobbles and instead of having verizon at the top i was told i could have my last name

    You cannot.  Customizations such as those are not available in iOS.

  • How to change the field label text in standard WD application

    Hello All,
    I have a requirement to change the filed label text in standard WebDynpro  application.
    Application Name: /SAPSRM/WDC_UI_DO_BIDDER
    View: V_DO_BIDDER_SEARCH_C
    I want to change the label text from "Last Name" to "Vendor Name".
    Can anyone please provide me the possible options to change label text?
    Thanks in Advance.
    Regards,
    Shyam

    Thread closed...Found the solution ... 

Maybe you are looking for

  • Error message: "Could not open key..." trying to install iTunes 7.6.1.9

    I'm trying to install iTunes and keep receiving error msg: "Could not open key: HKEYLOCALMACHINES\Software\Classes\.cdda\OpenWithProgIds. Verify that you have sufficient access to that key, or contact your support personnel." I have tried to un-insta

  • Search option in status report

    Hi, I have a requirement where I need to add a search option for date range to a CRM report that is fetching a list of mails along with their statuses and associated processing time. Now, currenty the list is too long and as a result the report is ti

  • Web Gallery generation speed is unacceptable

    Machine: DP 2 Ghz G5, 2 GB RAM, 160GB disk, 250 GB disk, 20" Cinema Display Aperture has it's library on the second SATA disk to improve I/O, likewise CS2 uses that disk for it's scratch and Bridge cache. Task: Generate web gallery, Aperture(Proofs t

  • Discounts types in B2C shop

    Hello Experts I am working on CRM 7.0 I have maintained discounts for materials in the backend system (ECC). They have been downloaded to CRM.  When creating Order in B2C shop, I am not able to see the Discount condition type in the B2C shop.  The di

  • App catalog not working

    hiii i have a problem of app catalog when ever i open it  .....it shows mw a bug that (the action could not be completed ..try again later .)i cant upade my mobile also becoz it is not showing any thing on the update app.....pllz tell me i need the s