ALV , How to add a Field after it has been deleted

Hi,
I am formating a ABAP Webdynpro ALV: I remove a field by using :
    l_value->if_salv_wd_column_settings~delete_column( lv_field_name).
How will I be able to add the field again ?
I tried the following :
    l_value->if_salv_wd_column_settings~CREATE_COLUMN( lv_field_name).
but getting a 'null' object reference in the following standard code :
if ls_column-r_column->r_cell_editor->visible_fieldname is initial.
Regards

Hi.
After create_column method you have to create cl_salv_wd_uie_text_view object:
  data:
    " Variables para configurar los ALVs.
    lr_alv_config_table  type ref to cl_salv_wd_config_table,
    lr_lr_wd_table_usage TYPE REF TO if_wd_component_usage,
    lr_wd_table          TYPE REF TO iwci_salv_wd_table,
    lr_table_settings    TYPE REF TO if_salv_wd_table_settings,
    lr_column_settings   TYPE REF TO if_salv_wd_column_settings,
    lr_column            TYPE REF TO cl_salv_wd_column,
    lr_text              type ref to cl_salv_wd_uie_text_view,
    lr_header type ref to cl_salv_wd_column_header.
  " Initialize variables
  lr_lr_wd_table_usage = wd_this->wd_cpuse_alv_1001( ).
  if lr_lr_wd_table_usage->has_active_component( ) is initial.
    lr_lr_wd_table_usage->create_component( ).
  endif.
  lr_wd_table = wd_this->wd_cpifc_alv_1001( ).
  lr_alv_config_table = lr_wd_table->get_model( ).
  lr_column_settings ?= lr_alv_config_table.
  lr_table_settings ?= lr_alv_config_table.
  " Delete Column.
  lr_column_settings->delete_column( 'OBJID' ).
  " Create column.
  lr_column = lr_column_settings->create_column( 'OBJID' ).
  create object lr_text.
  lr_text->set_text_fieldname( 'OBJID' ).
  lr_column->set_cell_editor( lr_text ).
  " Change the header of the column.
  lr_column->GET_HEADER( receiving value = lr_header ).
  if lr_header is bound.
    lr_column->delete_HEADER( receiving value = lr_header ).
  endif.
  lr_column->create_HEADER( receiving value = lr_header ).
  lr_header->SET_TEXT( exporting value = 'Objid Field' ).

Similar Messages

  • How to restore Browsing History after it has been deleted.

    I need to restore the Browsing History of my computer. Once the history has been deleted, is it possible to find the information anywhere else on the computer?

    Hi.
    After create_column method you have to create cl_salv_wd_uie_text_view object:
      data:
        " Variables para configurar los ALVs.
        lr_alv_config_table  type ref to cl_salv_wd_config_table,
        lr_lr_wd_table_usage TYPE REF TO if_wd_component_usage,
        lr_wd_table          TYPE REF TO iwci_salv_wd_table,
        lr_table_settings    TYPE REF TO if_salv_wd_table_settings,
        lr_column_settings   TYPE REF TO if_salv_wd_column_settings,
        lr_column            TYPE REF TO cl_salv_wd_column,
        lr_text              type ref to cl_salv_wd_uie_text_view,
        lr_header type ref to cl_salv_wd_column_header.
      " Initialize variables
      lr_lr_wd_table_usage = wd_this->wd_cpuse_alv_1001( ).
      if lr_lr_wd_table_usage->has_active_component( ) is initial.
        lr_lr_wd_table_usage->create_component( ).
      endif.
      lr_wd_table = wd_this->wd_cpifc_alv_1001( ).
      lr_alv_config_table = lr_wd_table->get_model( ).
      lr_column_settings ?= lr_alv_config_table.
      lr_table_settings ?= lr_alv_config_table.
      " Delete Column.
      lr_column_settings->delete_column( 'OBJID' ).
      " Create column.
      lr_column = lr_column_settings->create_column( 'OBJID' ).
      create object lr_text.
      lr_text->set_text_fieldname( 'OBJID' ).
      lr_column->set_cell_editor( lr_text ).
      " Change the header of the column.
      lr_column->GET_HEADER( receiving value = lr_header ).
      if lr_header is bound.
        lr_column->delete_HEADER( receiving value = lr_header ).
      endif.
      lr_column->create_HEADER( receiving value = lr_header ).
      lr_header->SET_TEXT( exporting value = 'Objid Field' ).

  • How to add Substitution fields after prerequisite (in step)

    Hi,
    Can anybody help me how to add substituion fields after prerequisites.Any configuration steps would be helpful except sap help.com.
    Thanks&regards,

    Hi,
    I am sorry , i hope, my question was not clear to u.  In OBBH i have created Substitution, Then created prerequistites, For that prerequisites i want to add substitutions(for fulfilled requirements).
    Substitution
       step
          prerequisite
              substitution fields
      HOw to create the aboue substituion fields, or any configuration could you please provide me.
    Thanks in advance,
    Veena

  • How to enable my Ipad after it has been dissable by too many wrong attempts to enter passcode?

    How to enable my Ipad after it has been dissable by too many wrong attempts to enter passcode?

    You have to restore the iPad in order to unlock it using these instructions.
    http://support.apple.com/kb/HT1212?viewlocale=en_US&locale=en_US

  • HT1212 how to enable my iphone after it has been disenabled?

    How to enable my iphone after it has been disabled?

    You have to restore the iPad in order to unlock it using these instructions.
    http://support.apple.com/kb/HT1212?viewlocale=en_US&locale=en_US

  • How to reuse the process chain which has been deleted?

    hi
    guys
                  how to reuse the process chain which has been deleted?
    your regards
    suresh

    if you want to "recover" the deleted process chain, try to check DEV / QAS / PRD. Maybe there is a copy still available
    Or check the following tables in SE11: RSPCCHAIN / RSPCCHAINATTR
    Good luck !

  • How to settle the expenses after AUC has been capitalised.

    Hi All,
    I have a understanding that after AUC has been settled, we can edit the settlement rule in WBS element and settle directly to the capitalised assets.
    I can not see the settlement rule but investment profile since the project being a Capital comes from Investment measure and automatically created.
    Can you tell me how to create a new settlement rule in this case. It is Urgent
    Regards
    VK

    Hi Vijay,
    This requires a change in the settlement rule since the AUC is no more and it must be the settlement reveiver earlier which should be changed to the main asset after capitalisation.
    Please go to Transaction code CJ20N, select the WBS and go to settlement rule via edit > Cost and set the receiver as the fixed assets itself instead of AUCV since AUC has been transferred to main assets.
    You can then settle using CJ8G or CJ88 but CJ88 is a better option.
    I think, I have answered the same query.
    Regards
    Bharat

  • HT201274 how to erase iphone 4s after service has been terminated

    how to erase iPhone 4s content after service has been terminated

    Man I don't know what else you can do.
    you can log into icloud.com, but you can't erase the phone, because you aren't connected to wifi or cellular data.

  • Site still starred after bookmark has been deleted

    I was clearing old bookmarks and noticed that one site still shows up in autocomplete and is starred even though the associated bookmark has been deleted. Also, when I try to visit the site and go to the Edit Bookmark dialogue box by clicking on the site, it redirects to the main site which is no longer starred. Deleted the site from my browser history does not get rid of the star either so it still shows up in autocomplete after being deleted.
    Please help me get rid of this site!

    A possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.com/kb/Bookmarks+not+saved#w_places-database-file

  • How do I lock a PDF form field after it has been completed by a user?

    We have a problem with privacy on our downloadable Pdf Forms for customers, they are required to complete personal details within the Pdf Form Fields and then must be processed by our account team.
    But we would require customer completed forms to be disabled from any third party or employee tampering with the entered details.
    Once the data has been input into the form provided online and saved and sent-on it needs to be read ONLY from then on!
    Help please, Chris.

    It depends how secure they need to be. You could include a script in the form which sets the fields to be read-only when the form is submitted, but that can easily be bypassed (and may not be respected by third party PDF applications). Search this forum topic for examples, it's been asked many times before.
    If you have Acrobat you can flatten a form, turning the fields into regular page content, but that's not possible in Adobe Reader X. While the flattened page can no longer be edited in Reader, it can still be edited in Acrobat via the touchup tools, so for complete security you would need to apply encryption to the flattened PDF (via a certifying signature or DRM).

  • Maybe this question has been found already, but I have yet to find the answer. How can I restore my bookmarks after it has been deleted from my 'bookmarkbackups' folder?

    So it has been a couple months now since I last cleaned up my bookmarks toolbar. And I could remember a couple of bookmarks tabs I wish I did not delete. I found some articles saying I could try restoring previous versions of my bookmarks from the dates of recent system restore points. But the earliest date I found was of only last week's. I've checked everywhere in my Firefox profile for anything that I could restore to date back into that time, but they too only tracked back as early as last week. I believe the automatic backups Firefox had made during that time has now long been deleted from the system in order to make room for my most current ones. How am I going to be able to retrieve those bookmarks when their aren't any backups available now to restore from?

    If you do not have backups of your bookmarks, either in the bookmarkbackups folder or saved elsewhere, then you can't restore your bookmarks.
    For future prevention: http://kb.mozillazine.org/Backing_up_and_restoring_bookmarks_-_Firefox

  • App Store World of Tank Blitz 6/27/2014 keeps coming back after it has been deleted.  How can I permanently get rid of it?  I have now said to I subscribe me from App Store emails because of this.

    Have been deleting the App Store World of Tank Blitz 6/24/2014 email daily/weekly, but it keeps getting sent to me.  How can I permanently get rid of this email?

    SkyDaughter29 wrote:
    My current situation: I have soooo many texts on my iphone and I haven't deleted many because I need the information contained in them for future reference and for legal purposes.  I would really like to find a means and way to save them other than on the phone itself. I've done searches for various apps yet I'm not finding what I think I would need.  It appears Apple does not sync the texts between the iphone and my MacBook Pro.
    Try the computer apps PhoneView (Mac) or TouchCopy (Mac & PC):
    http://www.ecamm.com/mac/phoneview/
    http://www.wideanglesoftware.com/touchcopy/index.php
    Best of luck.

  • HT1040 how do I edit a calendar that has been deleted

    I made the order of a calendar and once cpmpleted the order I deleted the project but after that received an email from apple saying that my order has been called due to problems on the font
    so now I need to edit it, how do I do it?

    Restore the backup copy of the iPhoto Library from a time  just before you deleted the calendar from the library. If you don't have a backup then you'll have to recreate the calendar. 
    In the future you could do as I do and have a separate library just for calendars, each years, etc.  I use the paid version of  iPhoto Library Manager to copy albums of photos from my working library to my calendar library. I do the same for each book I create.
    OT

  • How do i re-licence music that has been deleted fr...

    I'm on a 24 month cwm sub and some of the albums i have downloaded in the past are no longer available on Ovi Music. This causes the licence check to fail when copying to my 5800
    I am entitled to this music "for life" so please can you confirm how I can get my licences back?
    (The albums play fine on the PC and I have not changed my CWM device)

    I know this is quite an old thread, but I thought it might be better to bump it rather than start a new one.
     I have a similar problem to the other users.  I downloaded quite a lot of music on a, now expired, comes with music subscription, and I have recently been trying to make sure that all the licenses are valid.  In most cases the music either played straight away, relicensed OK, or it was possible to re-download the music.  In a small number of cases however it has not been possible re-download the music, and all these cases it is clear that the album in question is no longer available on Nokia music (either because the album has been superseded by a later version, or it has gone completely).
    All but one of the missing albums are shown in my download history, but when I press the download button (using Nokia Music Player) nothing happens.  Searching the music store has verified that the albums in question have either been removed or superseded.
    Cleary, I would like to know if there is a way of getting this music back (it is, as I understand a license for life), so a response from Nokia support on this topic would be nice.

  • How do I get the music I bought from iTunes on my phone back after it has been deleted?

    After I bought all the music I tried backing it up on my computer but it didn't sync all the songs I had boughten. So when I went back to iTunes to just see if I could buy them all over again a box popped up and said that I had already purchased this song. So how do I get it back if it is not on my computer or on my phone?

    HT2519, look that up on support.apple.com in the search bar in the top right hand corner, it will teach you how to download past purchases to your iTunes library or whatever means you so chose through the article it should walk you through it. You ARE allowed to download past purchased music, but like someone previously stated, only in the USA.

Maybe you are looking for