cancel
Showing results for 
Search instead for 
Did you mean: 

Sort data in BW-BPS web layout

Former Member
0 Kudos

Hi experts,

I have web layouts with ALV grid design, containing key figures in columns. Normally data set are sorted ascendingly by the first characteristics in lead columns.

The requirement: data sets in the layout should be sorted descendingly by the values of the first key figure.

It works with an additional characteristics in the first column, containing values e.g. "1000000 - key figure value". But this doesn't look nice.

Has anyone a better idea?

Thanks and regards,

Wolfgang

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There is no feature provided in BPS to sort the data in the layout based on keyfigure value.

You can try to write some function exit and sort the data in planning buffer. To trigger that function exit you can provide a button to the user in web interface.

Former Member
0 Kudos

Hi Deepti,

thank you for your fast answer. With the idea to sort by a planning function: I can insert the data sets into an internal table and sort them in this table.

But how to write back the data sets from the table into the planning buffer?

Thanks for any idea!

Regards,

Wolfgang

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks a lot for your hints!!

Former Member
0 Kudos

Hi,

Also you can add some java-script to your BSP Application for sorting or ranking any rows or columns you want and provide on-demand functionality in your web application just like Deepti said...

Please consider something like this:

// ** SORT THE COLUMN ITEMS

if (Orden=="a")

colArray.sort();

else

colArray.reverse();

// ** SORT ROWS IN TABLE

for (i=0; i< colArray.length-1; i++)

{

tableToSort.moveRow(colArray<i>[1],i+1);

if ( colArray<i>[1] != (i+1))

for (j=i1; j<colArray.length-1;j+)

if ( (colArray[j][1]>=(i+1)) && (colArray[j][1]<colArray<i>[1]) )

if ((colArray[j][1]+1)<=colArray.length)

colArray[j][1]++;

}

Hope this helps...

Former Member
0 Kudos

Hi Gerardo,

thank you very much for this proposal. At present I hesitate to modify the system-generated BSP pages. The preferred solution is by sorting with a planning function (FOX or ABAP coding). But currently I miss the idea to write sorted lines back to the planning buffer.

Regards, Wolfgang

Former Member
0 Kudos

Check the note 1101726. It explains how you can read the planning buffer.