cancel
Showing results for 
Search instead for 
Did you mean: 

Sort a table

david_fryda2
Participant
0 Kudos

Hi everyone,

Is there a way to sort columns just by clicking on them ?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hi,

see tutorial "How to create tables in Web Dynpro?" https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/devel... with tables in web dynpro.pdf

Key features covered: sort a table (temporary), operating with detail forms, selecting multiple rows, calculated attributes

Regards, Maxim R.

david_fryda2
Participant
0 Kudos

Hi,

I should precise more the problem.

By sorting, I mean clicking on a column(like an ALV report) and sorting them.

I do not want to sort them before showing them : I want interactively.

Is it possible ?

Thanks a lot.

Former Member
0 Kudos

The table tutorial mentioned contains a utility class TableSorter that adds interactive sorting capability to a table.

Armin

david_fryda2
Participant
0 Kudos

Thanks everyone for the help.

david_fryda2
Participant
0 Kudos

Where can I get the TableSorter utility ?

Thanks ?

Former Member
0 Kudos

u will get TableSorter under java native types. this is of type com.sap.tc.webdynpro.tests.utils.TableSorter.

Former Member
0 Kudos

Hi

Create a Value Attribute and Choose type as Java Native type and there choose browse button and in the Text Field type TableSorter and click on OK thn the File is added into ur packages and u can use it.

See create an Action say OnActionSort(wdEvent)

and write the following code

wdContext.currentContextElement().get<<Value Attribute Name>>().sort(wdEvent, wdContext.node<<DataSourceNodeName>>());

With Wishes

krishna kanth

david_fryda2
Participant
0 Kudos

Hi,

I do not have this TableSorter utility.

Where can I get the jar ?

Thanks a lot.

Answers (1)

Answers (1)

Former Member
0 Kudos

TableSorter.java file from the

<Driver Name>:\Program Files\SAP\JDT\eclipse\examples

In that open the project WebDynpro_Table. And from it's src/packages copy the TableSorter.java file and paste into your project's src/packages. Then change the package name accordingly in the TableSorter.java. and then it will be available in java native types.

This is a temporary version of TableSorter.

Jaydeep

david_fryda2
Participant
0 Kudos

Thanks a lot Jaydeep.

Nice day!