Web Dynpro – Overriding a Column Title in an ALV Grid

Here’s a useful little tip that I just had to overcome.  In my Renovation application, I have an ALV grid of results, and some of the columns are my own custom columns.  Instead of taking the data dictionary description, I wanted to be set it to my own description.  I had solved this issue for non-ALV tables, but it seems that ALV had me outsmarted for a while.  I finally decided to solve this little headache and thought I’d show you what I found.  First off, thanks to Thomas, the web dynpro guru and all his posts.

http://scn.sap.com/thread/1385428

This thread gave me exactly what I was looking for.  It turns out that you can’t just change the text, you first need to turn off the data dictionary binding.  It’s pretty easy to do…  For me, I just needed to add one additional method call:

 l_header->set_prop_ddic_binding_field(
    property =  if_salv_wd_c_ddic_binding=>bind_prop_text
    value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).

but if you're starting from scratch, check the link above to see full sample code.  
Thanks for reading,

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top