Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9164

Re: Calling of "table popin" on the lead selection of table ??

$
0
0

Hi Chandra,

 

Please write the below code in event handler method of onLeadSelect action.

 

METHOD onactionload_popin.

 

  DATA lo_curr_element  TYPE REF TO if_wd_context_element.
  DATA lo_nd_test       TYPE REF TO if_wd_context_node.
  DATA lt_test          TYPE wd_this->elements_test.
  DATA lv_curr_index    TYPE i.

  FIELD-SYMBOLS: <fs_test> LIKE LINE OF lt_test.

 

  " Get Current row element from lead select event parameter
  CALL METHOD wdevent->get_context_element(
    EXPORTING
      name  = 'NEW_ROW_ELEMENT'
    RECEIVING
      value = lo_curr_element
              ).

 

  " Get data of table
  lo_nd_test = wd_context->get_child_node( name =
wd_this->wdctx_test ).

  lo_nd_test->get_static_attributes_table(
  IMPORTING table = lt_test ).


  " Get current index
  lv_curr_index = lo_curr_element->get_index( ).


  " Set the table popin key value
  LOOP AT lt_test ASSIGNING <fs_test>.
    CLEAR <fs_test>-popin_id.

 

    IF sy-tabix = lv_curr_index.
      <fs_test>-popin_id = 'TABLEPOPIN'.
    ENDIF.


  ENDLOOP.


  lo_nd_test->bind_table( new_items = lt_test ).

  lo_nd_test->set_lead_selection_index( index = lv_curr_index ).

  "==============================
*   set the content here
  wd_this->set_content( id_index = lv_curr_index ).

 

ENDMETHOD.

 

Note:

here, I have created a node TEST with attributes FIRST_NAME, LAST_NAME, POPIN_ID.

Bind, the properties of table and event handler method as below

 

popin1.PNG

 

Hope this resolves your issue.

 

Regards,

Rama


Viewing all articles
Browse latest Browse all 9164

Trending Articles