cancel
Showing results for 
Search instead for 
Did you mean: 

Get the details of row in event handler.

rahul5791
Explorer
0 Kudos

Hello Experts,

I have a table view in which I have one field Repair Location.

This is a drop-down filed.

I want to get the details of Row in whenever the drop-down value is get changed.

I want these details in event handler of Drop-down list.

I am using below code but its giving me first row details only.

  lr_btadmini ?= me->typed_context->BTADMINI->collection_wrapper->GET_current( ).


please find sceenshot

Please help me to solve this.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Rahul,

I am not sure whether this will work (currently no system access for checking it), but maybe you can use the current index:

" Get current index

  CALL METHOD cl_thtmlb_util=>get_event_info

    EXPORTING

      iv_event = htmlb_event_ex

    IMPORTING

      ev_index = lv_index.

  CHECK lv_index IS NOT INITIAL.

" Get the current entity

      me->typed_context->[YourCNode]->collection_wrapper->find( iv_index = lv_index ).

      lo_current = typed_context->[YourCNode]->collection_wrapper->get_current( ).

Best regards,

Daniel

rahul5791
Explorer
0 Kudos

Thank you Daniel Büse

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rahul,

You have to write the following code snippet.

In your event handler, ' htmlb_event_ex.' will be the importing parameter. You can use that parameter to get the current row.

data:  lv_event        TYPE REF TO cl_thtmlb_table_view,

         lv_index        TYPE i,

         lr_entity       TYPE REF TO if_bol_bo_property_access.

CHECK htmlb_event_ex IS BOUND.

  lv_event ?= htmlb_event_ex.

   lv_index = lv_event->row_index.

   lr_current ?= typed_context->[Context node name]->collection_wrapper->find( iv_index = lv_index ).

Let me know in case of any help.

Thanks & Regards

Richa

rahul5791
Explorer
0 Kudos

Thank you Richa Dhamija

Former Member
0 Kudos

Hi Rahul,

If it worked for you, please mark answered/helpful.

Thanks & Regards

Richa