cancel
Showing results for 
Search instead for 
Did you mean: 

cl_htmlb_manager=>check_tableview_all_rows( ) not working for SELECTING

former_member184111
Active Contributor
0 Kudos

Hi,

We have a tableView that is filled on selecting a value from a dropDownListBox.

The internal table for TV is filled in the event handler OnInputProcessing for the event onSelect of DDLB.

Now when the TV is displayed , i need it to display ALL rows SELECTED . used the following method:

describe table itab_materials lines total_rows.
cl_htmlb_manager=>check_tableview_all_rows(
rowcount = total_rows
request = request
id = 'material'
check = 'X'
) .

This code is also written for onSelect of DDLB , itab_amterials is the itab for TV.

But still when the TV showup rows are not selected.

What is the problem with above code?

Thanks,

Anubhav.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I had a similar requirement in which i have used the following code:



DATA: KEYTABLE TYPE STRING_TABLE,
            LV_ROWCOUNT TYPE I.

CL_HTMLB_MANAGER=>CHECK_TABLEVIEW_ALL_ROWS( ROWCOUNT = LV_ROWCOUNT
                                                    REQUEST  = REQUEST
                                                    ID       = 'tv'
                                                    KEYTABLE = KEYTABLE
                                                    CHECK    = 'X' ).

and also ensure if the mode of selection is multiselect or multilineedit.

hope this helps..

Regards,

Sneha.

former_member184111
Active Contributor
0 Kudos

Hi,

Selection mode is multilineedit .

What should be the value of LV_ROWCOUNT ?

Thanks,

Anubhav.

Answers (1)

Answers (1)

athavanraja
Active Contributor
0 Kudos

its not working because you are trying to use cl_htmlb_manager=>check_tableview_all_rows(

even before the table is displayed.

in your case after the user selected some entries in the DDLB you are building itab for tableview. while showing the tableview use it attribute "selectedRowIndexTable" or "SelectedRowKeyTable" to preselect the rows.

Raja

former_member184111
Active Contributor
0 Kudos

Hi Raja,

While showing the tableVIew

Where exactly do i need to call the method?

Thanks,

Anubhav.

athavanraja
Active Contributor
0 Kudos

first time while the table is being displayed, if you want to get the tv rows checked you cannot use that method. instead use the one of two attributes i had mentioned earlier

Raja

former_member184111
Active Contributor
0 Kudos

Hi,

Is there any other method?

Thers no attribute selectedrowindextable or selectedrowkeytable in the class CL_HTMLB_EVENT_TABLEVIEW

but we have PREVSELECTEDROWINDEXTABLE and PREVSELECTEDROWKEYTABLE or SELECTEDROWKEY and SELECTEDROWINDEX

And i m still not getting in which event do i need to call that method?

A code snipet will be of great help!

Thanks,

Anubhav..

athavanraja
Active Contributor
0 Kudos

i am talking about the attribute of htmlb:tableView tag

former_member184111
Active Contributor
0 Kudos

Hi ,

I added

selectedRowIndex = "1"

to the code of my TV in the layout , but still the ifrst row is unchecked , when the TV is displayed for the first time.