cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sorting issue

Former Member
0 Likes
383

Hi,

I sorted my tableview by SERVER. This is working fine, however when I add a row problems start. My navigationmode is BYPAGE and I want to show the added row and select it. Selection I think I can manage with the attribute selectedRowkey, however to set the visibleFirstRow is a problem.

This attribute needs to be set before the call view. However the data is not sorted yet, so the index supplied is wrong.

Anyone any suggestions besides set sort to APPLICATION and do it myself?

View Entire Topic
Former Member
0 Likes

I'm just started development of a BSP application. I'm using an HTMLB tableView and I'm going to need to sort the table. Does anyone have some sample code to do this that I could see before I go and re-invent the wheel?

former_member181879
Active Contributor
0 Likes

Please read <a href="/people/brian.mckellar/blog/2004/06/11/bsp-trouble-shooting-getting-help">BSP Trouble Shooting: Getting Help</a>. You are specifically interested in looking at the examples section. After you have taken the examples apart, should have this (easily) under control.

Former Member
0 Likes

I've looked through SBSPEXT_HTMLB and SBSPEXT_TABLE and I could not find an answer for my problem.

<b>My scenario:</b>

I Can not put my select statement inside the "onCreate" event because I need variables that are being passed from a previous page in my select statement. So I do my select statement in the "onInitialization" event. This means I can not call my select statement everytime before the "onInputProcessing" is invoked.

<b>What the User Does:</b>

After the data is on the screen the user selects a row. The user then pushes a button on the screen to delete the record. I use CL_HTMLB_EVENT_TABLEVIEW to find out what row the user has selected. This works great. The problem now is my internal tables no longer have data in them. And none of the example code shows how to pull the values out of the table that is being displayed on the screen to the user.

<b>SO How can I actually delete the record the user chose from the SAP table:</b>

Since I'm using: tableview_event->prevselectedrowindex. and that returns the Row the user selected, what can I use to get the data from that row? All the other attributes I tried that looked promising are blank

Former Member
0 Likes

<b>A little more information:</b>

I know I can use a combination of SELECTEDROWINDEX, SELECTEDROWKEY, and ALLCOLUMNNAMES to get the row the user selected and the value in the first field (key). It will also give me a list of all the avaliable column names. The only thing I'm missing is the values for the other fields I need.

<b>I could be successful:</b>

If I could Change the KEY of the display table so SELECTEDROWKEY could contain the values for the three fields I need

OR

If I could pull the values for each of the columns I need

Any thoughts here would be greatly appreciated. THanks,

Anthony