on 04-11-2008 8:06 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.