cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting of a column in IC Web

Former Member
0 Kudos

Hi Expert,

We need to change the default sorting of a column in IC Web for customer account overview.

By default the sorting is taking place in asceding order but we need to make the sorting in descending order for the below column(posting date).


Please help me in finding the solution.

regards,

vicky

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vicky,

To set the default sorting order, set the field 'SORT' to 'A'(asc) or 'D'(desc).

Write the below code on your htm page to give the default sorting order.

DATA: lv_xml_inp TYPE bsp_dlc_xml,

   lv_xml    TYPE string,

   ls_config TYPE bsp_dlc_table_descr,

   lt_columns TYPE bsp_dlc_column_descr_tab.


FIELD-SYMBOLS <ls_column> TYPE bsp_dlc_column_descr.

lv_xml_inp    = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ).

ls_config = cl_bsp_dlc_table_utility=>conf_xml_to_abap( lv_xml_inp ).


READ TABLE LS_CONFIG-COLUMNDEFINITION ASSIGNING <LS_COLUMN> WITH KEY name = 'fieldname'.

if sy-subrc = 0.

   <LS_COLUMN>-SORT = 'D'.

endif.

lv_xml = cl_bsp_dlc_table_utility=>CONF_ABAP_TO_XML( ls_config ).

 

controller->configuration_descr->set_config_data(

   EXPORTING

         IV_CONFIG_DATA lv_xml

).

Regards,

Ritu

Former Member
0 Kudos

Hi Ritu,

Thanks for the info.

I have achieved the sorting in method: DO_PREPARE_OUTPUT using sort method.

regards,

vicky

former_member198180
Active Participant
0 Kudos

Hi Ritu,

iam aslo facing same similar issue..iam sorting custom field ,i want to display descending order..i have added the logic in sort method and do_prepare_output method in complaint component result view.

I have added urs logic in .html page also still it doesnt work..please help

Thanks

kalpana

Former Member
0 Kudos

Hi,

If its only date where you want to change it to descending order then it is possible to do just by configuration of the view.

Just open the appropriate view configuration in bsp_wd_Cmpwb for the component view and change the sort order as per requirement.

Sort By - Posting Date field and Select the descending radio button.

Regards,

Naresh

Former Member
0 Kudos

Hi Naresh

I tried the same with complaint search. I change the complaint id sorting by descending but still it is showing in ascending order.

Rgds,

Ankit

Former Member
0 Kudos

Hi,

Can you please let me know how to view the Sorting Definition of a field.

I could not find this option in my component view under transaction bsp_wd_Cmpwb.

regards,

Vicky

former_member158363
Active Contributor
0 Kudos

Hi Ankit,

try to reset personalization to default for the affected view - if you have done any personalization, configuration changes are usually ignored.

You can also do it by report BSP_DLC_DELETE_PERSONALIZATION, this is a good practise to run after any UI configuration changes.

Regards,

Dawood.

Former Member
0 Kudos

Hi Vicky,

Could you please share the component and view name where the sorting is required.

Certain components has got special coding to put the results in specific sort order.

Regards,

Naresh

Former Member
0 Kudos

Hi Dawood,

I executed the report but there was not any personalization data with my User Id.

Rgds,

Ankit

former_member158363
Active Contributor
0 Kudos

Hi,

now I can see that even from your screenshot, this is weird - it may be overriden by coding.

Please, can you share exact component name, to the view level?

Regards,

Dawood.

Former Member
0 Kudos

Hi,

Component Name: BT120S_CPL

View Name: BT120S_CPL/AdvSearchComplRL

Rdgs

,

Ankit

former_member158363
Active Contributor
0 Kudos

Hi,

I looked in our CRM (EhP3, SP05) and it should work as expected.

Do you have any enhancements in this component? Try to use user parameter WCF_IGNORE_ENHANCEMT with value A in you user record (transaction SU3) and run again. If you do not see the view, then temporarily unassign the enhancement set from the client you are testing (this will influence all users in the client!).

Try to put external breakpoint into event handler EH_ONSORT and request processing method DO_PREPARE_OUTPUT (the sorting is finally done there).

Regards,

Dawood.

Former Member
0 Kudos

Hi Vicky,

I checked the given component and view and found that in DO_PREPARE_OUTPUT method there is a method called SORT( ).

This method is overwriting your sorting configuration.

Redefine this method or comment it to enable sorting as per your requirement.

Regards,

Naresh

former_member158363
Active Contributor
0 Kudos

Hi Ankit,

do as Patel suggested - the coding has been brought by note 1308322 - No sort on search result list after clear.

The coding "remember" what column and which directon was selected by USER, thus overriding what you have CONFIGURED. I guess this is error in standard, because the coding does not take into account posibility of sorting set by configuration.

Regards,

Dawood.

Former Member
0 Kudos

Hi Naresh,

View name is FICACMP_ACC/FicaAccChron

regards,

Vicky

Former Member
0 Kudos

Hi Naresh,

Can you please let me if this feature is based on SAP CRM version and service pack?

regards,

Vicky

Former Member
0 Kudos

Hi Vicky,

This feature of sorting is from SAP CRM 6.0 SP 6 to 7.0 SP3.

After SAP CRM 7.0 SP3 it was a part of standard feature in all EHPs ( 1,2 & 3).

Regards,

Naresh

Former Member
0 Kudos

Hi Naresh,

We are in CRM 7.0 1 level 6 Support Package 2. But this feature is not present.

Is there any configuration activation is required to avail this service in IC-Web personalize area?

former_member158363
Active Contributor
0 Kudos

Hello Vicky,

interesting question - I did not find this in any oficial Release Notes but in an OSS note:

1855398 - Table Personalization enhancements features

The sorting order in Personalization popup is part of it. There is also a PDF document attached to this note, which describes in detail new personalization features, the sorting among others.

These improvements come with SP for the WEBCUIF package as follows:

WEBUI 701 SP11

WEBUI 731 SP08

WEBUI 747 SP01

If I understand correctly your reply, if you are on EhP2 SP6, then WEBCUIF 731 is relevant for you - and you are "only" 2 SPs far from these features then. I am afraid this feature cannot be delivered only via OSS notes but you have to apply relevant Support Package stack (I do not recommend to apply SPs for the WEBCUIF component only).

Hope this helps.

Dawood.

Former Member
0 Kudos

Hi Dawood,

Thank you. I too found the same note.

I will do the sorting by enhancing the view and code behind it.

regards,

Vicky