cancel
Showing results for 
Search instead for 
Did you mean: 

sorting a table view

Former Member
0 Kudos

hi All,

Plz tell me what is the procedure for sorting a table view before displaying it.

thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You can try using this attribute available in the table view tag:

<b>sort = "SERVER"</b>

By assigning this, the result are sorted automatically.

Regards,

Ravikiran.

Former Member
0 Kudos

actually the table being shown in the table view belong to the application class so we cant access it.

athavanraja
Active Contributor
0 Kudos

what do you pass in

<htmlb:tableView id = "TV"

table = "<%= itab_flight %>"

is it table = "<%= applicationclass->table %>"

then sort applicationclass->table by <f1> <f2> .

Regards

Raja

Former Member
0 Kudos

I am working on IC webclient.And the table which i am passing looks something like:

table = "//XYY/TABLE"

athavanraja
Active Contributor
0 Kudos

OK. this is using MVC and the table is in model class.

use the following code.

<%

data: controller2 type ref to CL_BSP_CONTROLLER2,

model type ref to CL_BSPMODEL_MODEL.

controller2 ?= controller.

model ?= controller2->get_model( model_id = 'm' ).

sort model->flights descending.

%>

Regards

Raja

athavanraja
Active Contributor
0 Kudos

sort the itab passed to the htmlb:tableview.

suppose the itab name is itab_flight

<% sort itab_flight by <field1> <field2> . %>

<htmlb:tableView id = "TV"

table = "<%= itab_flight %>"

Regards

Raja