cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP webdynpro table control indexing / Positioning the line

Former Member
0 Kudos

I found this but it is not giving me complete picture..

http://www.sapdev.co.uk/sap-webapps/sap-webdynpro/wdp-table-row.htm

Details of what exactly I'm looking for.

I need to know how to position a searched line on the top of the table control in WEBDYNPRO.

Example: When I click on position in the sales order line item details you can fill the item number and item number should show up on the first line.

Basically I am looking for setting the line index on table control of webdynpro...

Anyhelp will be greatly appreciated.

My e-mail: skathy1231@gmail.com

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Kathy,

Can you elaborate your query?

In the think you have posted, it just displays the selected rows in the table control as a first visible rows using a Onselect or custom button even, to show the what all rows selected by user are dispayed initially in the table control then the unselected ones.

Is this your requriement?. As per my understanding of your query, if you select a row in table control automatically you want to reset the index of table control..selected row index will become 1st then 2nd...then unseleted rows...Is that so.

Former Member
0 Kudos

Hi Lekha,

I created a Web dynpro application to populate a table control with  for example Employee numbers and names 2000 records.  Now right below that I need to add a button search and Employee number input field.

When user enters employee number in the input field,  let us say 500th line in the table control element on the screen corresponds to that entered employee, when clicked on Search field that 500th record  should show up as first line in the table control . I still should have entries in table controls with 499 lines above and rest of the records below.  Basically setting line index.

Thanks,

Kathy

Former Member
0 Kudos

Hi,

In Table Propeties, there is a property, FirstVisibleRow. You can bind that property to an attribute.

After getting the index of the row, you set it to the attribute value .

This is for standard table.

Hope this helps.

Thanks,

Pris.

Former Member
0 Kudos

Kahty,

You have to write the custom code as standard filter will just list out all records with the given search criteria.

You can create a filter rules and read those filter rules where you can get the filtered conditions and thier values,

based on this information, you need to filter the reords from Main internal table and looping this prepare other internal table and bind it to the node.

When you find the particular record from Main table, prepare other table with this as 1st record.

Here every time you do a filter, you need to bind the internal table again, you have your new record as 1st index/row.

Or Subscribe to the filter event,

In this event you will get to know the filter condition and also the result set/filtered records.

Read the filtered records to other table as 1st set of records and unfiltered records as 2nd set and combine them and bind the table again, this will reset the index.

Put a debug point in this event, you can see the filtered conditions/values in event parameter list.

But there can be a performance issue in these cases.

As Per Pris comments, Check FirstVisibleRow count will only show 500th record  in visible area but will not reset the index. Please check.

Regards,

Lekha.

amy_king
Active Contributor
0 Kudos

Hi Kathy,

Prisford is correct that you can use the table's FirstVisibleRow property to scroll to the desired index. You may also want to combine this approach with a call to IF_WD_CONTEXT_NODE->MOVE_TO which sets the lead selection to a specific index.

Cheers,

Amy