Skip to Content

CRM 2007 / 7.0 How to –3 Dynamic Column title

I came across a very interesting requirement to make the column title dynamic. It was a big challenge for me as I had not seen this in any of the SAP standard views( Though some people told me that in CRM UI if you configure the ECC Sales transaction product proposal, there you will get the dynamic column).

My requirment was to create a new columns in the Item view of Interaction center and populate it with the quantity of the product ordered in the past. The column title should be filled with the order date. Here I am not going in details about the product proposal rather I will just explain how we can change the column title with current date.

Step1: Use the Enhancement workbench tr. BSP_WD_CMPWB, Enhance your component and create a new value attribute.


Step2: Once you complete the Wizard, your newly created attribute should show in the Attribute list as shown below.


Step3: Now double click on the GET_M_ method of the attribute, System generated code will look some thing like this.


Step4: Comment out the system generated code and insert following code

DATA: p_flddescr TYPE dfies.


      tabname        = ‘ZCRMT_PROD_PROP_HIST_QTY01’
      langu          = ‘E’
      all_types      = ‘X’
      dfies_wa       = p_flddescr
      not_found      = 1
      internal_error = 2
      OTHERS         = 3.

    p_flddescr-reptext   = sy-datum.
    p_flddescr-scrtext_s = sy-datum.
    p_flddescr-scrtext_m = sy-datum.
    p_flddescr-scrtext_l = sy-datum.

      info  = p_flddescr.



Step5: Redefine the method GET_TABLE_LINE_SAMPLE of your context node and add all the attributes you have added in the context node as shown below.



Step6: make the field available in your view by changing the configuration of the view. When the field will display in the IC Web screen it will look something like this.


You can see the dynamic column title .

One thing I observed that the dynamic colunm title was loading up for the first time but after that it was keeping the value in the buffer and was not refreshing so every time I was loading the page I was getting the same date value for the column title. I found the reason after some debugging and I had to refresh the buffer for my custom variable every time by enhancing the standard class CL_BSP_DLC_VIEW_DESCRIPTOR.


Once I refreshed the the buffed for my custom fields every thing works fine as expected. 

You must be Logged on to comment or reply to a post.
  • Thanks you so much for u r blogs.

    Well I read few of u r blogs on creating component and views, navigating.

    It is very helpfull to me.

    Once again Thank you so much

  • Hi Vikash Krishna,

    Thank you very much.

    It was very helpful !

    but I have got question about the article:

    What does it mean is step 6: "make the field available in your view by changing the configuration of the view".

    We should change the attributes of the cellerator tag? or doing something else?

    Thank you very much,