cancel
Showing results for 
Search instead for 
Did you mean: 

BSP appraisals : Reading tableview record with incorrect Row index

Former Member
0 Kudos

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.

Thanks

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

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

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

Regards

Raja

Answers (1)

Answers (1)

GrahamRobbo
Active Contributor
0 Kudos

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.

Cheers

Graham Robbo