Skip to Content
0
Former Member
Dec 14, 2006 at 09:52 AM

Remove Tableview Selection for 'SINGLESELECT'

19 Views

I want to clear the Tableview Selection when the Selection is SINGLESELECT... I have a method called remove_tableview_selection which works fine for MULTISELECT.

REMOVE_TABLEVIEW_SELECTION

METHOD remove_tableview_selection .

DATA lv_id TYPE string.

IF iv_table_id CS '_'.

lv_id = iv_table_id.

ELSE.

lv_id = me->get_element_id( iv_table_id ).

ENDIF.

cl_htmlb_manager=>check_tableview_all_rows( rowcount = 0

request = request

id = lv_id

check = cl_dpr_co=>sc_false ).

ENDMETHOD.

METHOD check_tableview_all_rows .

DATA: name TYPE string,

value TYPE string,

key TYPE string.

  • for D2003

IF check IS NOT INITIAL.

CONCATENATE id '-' cl_htmlb_tableview=>co_event_markall into value.

request->set_form_field( name = 'htmlbevt_par1'

value = value ).

ELSE.

CONCATENATE id '-' cl_htmlb_tableview=>co_event_unmarkall INTO value.

request->set_form_field( name = 'htmlbevt_par1'

value = value ).

ENDIF.

CLEAR value.

  • for D2002

DO rowcount TIMES.

name = sy-index.

CONDENSE name NO-GAPS.

IF keytable IS NOT INITIAL.

READ TABLE keytable INDEX sy-index INTO key.

CONCATENATE name `:` key INTO name.

ENDIF.

CONCATENATE id

'-chk'

name

INTO name.

IF check IS NOT INITIAL.

value = sy-index.

CONDENSE value NO-GAPS.

IF keytable IS NOT INITIAL.

READ TABLE keytable INDEX sy-index INTO key.

CONCATENATE value `:` key INTO value.

ENDIF.

ELSE.

CLEAR value.

ENDIF.

request->set_form_field( name = name

value = value ).

ENDDO.

ENDMETHOD.

How to proceed for Singleselect?

Thanks and regards

Sukanya.