on 08-20-2013 6:31 PM
Hi All,
I have a node to display my table details. This node contains another subnode which conatins the values for my dropdown. (Dropdown are disfferent for every row).
Now this works fine in a normal table where i create a droup down editor in the table group and bind the value to the value in the subnode.
But, i am not able to convert this to ALV. How do i bind my subnode values to alv dropdown?
Thanks for your help.
Regards,
Prisford Pereira.
Hi Prisford Pereira,
Please go through the link below :
It will be helpful to fix the issue!
Best Regards,
NKC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Go through the below,
method onactiond_index .
data: lo_nd_sflight type ref to if_wd_context_node,
lo_el_sflight type ref to if_wd_context_element,
"First node
lt_sflight type wd_this->elements_sflight,
ls_sflight type wd_this->element_sflight.
data: "Final Node
lt_sflight1 type wd_this->elements_sflight1,
ls_sflight1 type wd_this->element_sflight1.
data: "Drop_Down Node
lt_d_sflight type wd_this->elements_d_sflight,
ls_d_sflight type wd_this->element_d_sflight.
"Intex to find First and DD values
data: ld_tabix type sy-tabix,
ld_index type sy-index.
"If may set flag
data lv_flg type c.
"Get the First node values
*navigate from <CONTEXT> to <SFLIGHT> via lead selection
lo_nd_sflight = wd_context->get_child_node( name = wd_this->wdctx_sflight ).
*lo_el_sflight = lo_nd_sflight->get_element( ).
lo_nd_sflight->get_static_attributes_table( IMPORTING table = lt_sflight ).
loop at lt_sflight into ls_sflight.
"Internal Table index
ld_tabix = ld_tabix + 1.
lo_nd_sflight = wd_context->get_child_node( name = wd_this->wdctx_sflight ).
lo_el_sflight = lo_nd_sflight->get_element( ld_tabix ).
"Drop_Down node
lo_nd_sflight = lo_el_sflight->get_child_node( name = 'D_SFLIGHT' ).
ld_index = lo_nd_sflight->get_lead_selection_index( ).
* if ld_index = -2. "Indicator for Empty Record
* lv_flg = 'X'.
* exit.
* else.
"Get the selected value form the Drop_Down Values
CALL METHOD lo_nd_sflight->get_static_attributes
EXPORTING
index = ld_index
IMPORTING
static_attributes = ls_d_sflight.
ls_sflight1-CARRID = ls_sflight-CARRID.
ls_sflight1-CONNID = ls_sflight-CONNID.
ls_sflight1-PRICE = ls_sflight-PRICE.
ls_sflight1-SEATSMAX_F = ls_sflight-SEATSMAX_F.
ls_sflight1-SEATSOCC_F = ls_sflight-SEATSOCC_F.
ls_sflight1-RATING = ls_d_sflight-RATING.
append ls_sflight1 to lt_sflight1.
"Find the value to final Table
* navigate from <CONTEXT> to <SFLIGHT1> via lead selection
lo_nd_sflight = wd_context->get_child_node( name = wd_this->wdctx_sflight1 ).
lo_nd_sflight->bind_table( new_items = lt_sflight1 set_initial_elements = abap_true ).
*endif.
endloop.
endmethod.
Hope this will helpful to you.
Regards,
John.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prisford Pereira,
Instead of creating sub node create an attribute of type WDR_CONTEXT_ATTR_VALUE_SET and fill your values to this attribute. With the reference of drop down UI element call method set_valueset_fieldname by passing attribute name.
Regards
Aswani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.