on 08-01-2011 5:43 AM
Hi all,
I have a alv table which display the list of PR, Now i want set the lead selection for the alv table. so that when i select one row and click on button it navigates to another view.
can any one suggest me how to set a lead selection in alv table?
Thanks all
hi vani,
Try following steps,
1. Double click on your table in the layout TAB, there you can see the Events under the Property.. In that there will be a event called on leadselect.
2. Write / create a event by giving your own name and then double click on that.It will navigate to methods tab. There you can write the code to call your view.. refer following code.
DATA : lo_nd_cn_table TYPE REF TO if_wd_context_node ,
lo_el_cn_table TYPE REF TO if_wd_context_element ,
ls_cn_table TYPE wd_this->element_cn_table.
* navigate from <CONTEXT> to <CN_TABLE> via lead selection
lo_nd_cn_table = wd_context->get_child_node(
name = wd_this->wdctx_cn_table ).
** get element via lead selection
lo_el_cn_table = lo_nd_cn_table->get_lead_selection( ).
lo_el_cn_table->get_static_attributes( IMPORTING
static_attributes = wa_table ).
Hope this will help.
Regards,
Renuka S.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
Set the lead selection property for node( which you binded to data node of alv controller )., then automatically table will display with lead selection row.
Regards
srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
Set the lead selection property for node( which you binded to data node of alv controller )., then automatically table will display with lead selection row.
Regards
srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vani,
Simple solution would be to set the lead selection of the context node that is passed to the ALV table. Once you set the lead selection for the context node, it will be automatically reflected in the ALV table.
BR, Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For the node in context if you check on Initialization Lead Selection then first row will be selected automatically as lead selected.
After table is displayed if you select an element ,that particular index will be set as lead selected one for the node.
ln_xxx = wd_context->get_child_node( name = xxx ).
lm_xxx is of type IF_WD_CONTEXT_NODE.And the interface has several methods for setting index like
MOVE_FIRST,MOVE_LAST,MOVE_NEXT,MOVE_PREVIOUS.SET_LEAD_SELECTION_INDEX with which you can set the lead selection programatically.
ln_xxx->SET_LEAD_SELECTION_INDEX ( index = 5).
Regards
karthiheyan M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.