Skip to Content

SAP CRM WebUI : Sorting custom columns (custom attributes)

Hi to everybody,

i have a little problem on SAP CRM WebUI.

I created a whole custom view inside factsheet page, component BP_FACTSHEET.

I have already filled inside method GET_P_* the following code :

WHEN if_bsp_wd_model_setter_getter=>fp_sortable.

rv_value = 'TRUE'.

but data is NOT being sorted by custom columns.

How can i solve this problem? Someone could you help me,please?

Thanks in advance.

Best regards.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 29, 2011 at 11:45 AM

    Hi Dario

    Are the custom attributes that you have mentioned part of BOL?

    You can find the procedure here.

    [Sorting on custom fields|]



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      my Method is very similar to Leon's

      1. On sort Event


      if lv_attr_name eq 'ELAPSEDTIME'.
            iv_attr_name    = if_bol_col_sorting=>custom
            iv_sort_order   = lv_sort_order
            iv_stable       = abap_false
            iv_sort_callback  = lr_callback ).


      if for the specified column, call Custom sort

      2. Add interface if_bol_col_sorting into the class

      3. Implement if_bol_col_sorting~is_a_greater_b for custom-defined compare function

      method if_bol_col_sorting~is_a_greater_b.


           if me->gv_sort_field eq 'ELAPSEDTIME'.

                lv_s1 = .....

                lv_s2 = .......

                if lv_s1 > lv_s2.
            rv_result = abap_false.
            rv_result = abap_true.




      Hopefully, It will help you out 😊