cancel
Showing results for 
Search instead for 
Did you mean: 

Reading lead Selected value from dynamically created node

nila_ms
Employee
Employee
0 Kudos

Hi,

I have a context node, under which attributes are created dynamically. This node is then bound to a table which is again created dynamically. On lead selecting any of the row in a table, I need to retrieve that particular details in a field symbol.

Could anyone please help me out.

Thanks in Advance,

Regards,

Nila

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

when you have created the node , store the strcuture to a global one.

Now, using this structure declare a FS and assign to it.


  FIELD-SYMBOLS :
    <fs_table>        TYPE ANY,  
  DATA:
    lr_data           TYPE ref to data,
    lr_element type ref to if_wd_context_element.
CALL METHOD wd_comp_controller->lr_node->get_lead_selection_index
      RECEIVING
        index = lv_index.

    create data lr_data type handle wd_comp_controller->gs_strucdesc.
    assign lr_data->* to <fs_table>.
    CALL METHOD wd_comp_controller->lr_node->GET_LEAD_SELECTION
      RECEIVING
        ELEMENT = lr_element.

    if lr_element is not initial.
      CALL METHOD lr_element->GET_STATIC_ATTRIBUTES
        IMPORTING
          STATIC_ATTRIBUTES = <fs_table>.
    endif.

    if <fs_table> is assigned.
*    Move the PR_ELEM_DESC value to the PR_ELEMENT value
      ASSIGN COMPONENT wd_assist->gc_slno OF STRUCTURE <fs_table> TO <fs_temp>.
      IF sy-subrc = 0.
        lv_slno = <fs_temp>.
      ENDIF.
    endif.
  endif.

Hope this is clear.

Regards,

Lekha.

Answers (1)

Answers (1)

nila_ms
Employee
Employee
0 Kudos

Hi Lekha,

I tried implementing the solution and its working fine.

Thanks a lot for your help:)

Regards,

Nila