Skip to Content
author's profile photo Former Member
Former Member

BSP appraisals : Reading tableview record with incorrect Row index

Hi Experts

We are having an Appraisal BSP system,where i am having an issue with incorrect navigation of Appraisal document after selecting a filtered document from a a list.

We are using a Tableview for populating the list of records and after filtering a particular record based on first name of employee,it is showing up the right record. But however,when i click on the document name of the record,it is leading me to an incorrect record rather than the original one.

I am using a read statement to read the selected row from an internal using the following code :

data: l_event_htmlb_data type ref to if_htmlb_data,

l_event_id type string,

l_index type sy-tabix,

l_event_tableview type ref to cl_htmlb_event_tableview,

l_tabstrip type ref to cl_xhtmlb_tabstrip,

l_event type ref to cl_htmlb_event,

lw_documents type hap_s_documents,

lt_header_appraisee type hap_t_header_appraisee,

lw_header_appraisee type hap_s_header_appraisee,

l_emp_number type persno,

l_uname type syuname.

  • l_event = cl_htmlb_manager=>get_event( runtime->server->request ).*

l_event_tableview ?= l_event.

  • l_index = l_event_tableview->row_index.*

  • Read the corresponding document

clear: lw_documents.

*read table application->z_t_documents_hre

into lw_documents

index l_index.*

The l_index always returns value '1',even though the filterted record might be a 3rd or 4th record in the table, when the click on the filtered document in the portal(frontend) is performed which always pulls the first appraisal document from the list.

Since the index is being retrieved from the standard class event(cl_htmlb_manager=>get_event( runtime->server->request ), i am not really sure how to rectify this error.

Any help in this regard would be greatly appreciated.


Edited by: alan ps on Apr 11, 2008 9:07 PM

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Apr 12, 2008 at 08:53 AM

    you cannot use selectedrowindex to read the itab if you are using filter or sort options with htmlb:tableview

    you have to use keyColumn attribute of tableview.

    in the oninput processing cl_htmlb_event_tableview->selectedrowkey will have the value of the key column defined. based on this value you can then read the itab to get the other column values.

    for more on this check the following thread




    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 12, 2008 at 02:22 AM

    Hi Alan,

    it your application running "stateless".

    If so it may well be that your internal table application->z_t_documents_hre has not been populated when the onInputProcessing event handler executes.

    You can check this with the debugger.


    Graham Robbo

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.