on 01-28-2009 2:33 PM
Hi All,
I my view i have one table and one button.when i am clicking on the button all the rows of the table will be selected.Can anybody give me an idea how to do this.........
Thanks in Advance.
check standard component
WDR_TEST_TABLE
under selction you can find the same functionality you required
Thanks,
Shaik Shadulla
Edited by: shaik shadulla on Jan 29, 2009 9:58 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
DATA: lr_element type ref to if_wd_context_element,
lt_elemset type WDR_CONTEXT_ELEMENT_SET.
CALL METHOD lr_node->GET_ELEMENTS "if_wd-context_node
EXPORTING
FROM =
TO =
RECEIVING
SET = lt_elemset .
loop at lt_elemset into lr_element.
CALL METHOD lr_element->SET_SELECTED
EXPORTING
FLAG = 'X'.
clear lr_element.
endloop.
This sets all the elements/rows as selected.
Regards,
Lekha.
Hi,
Set the selection property of the node to 1:N or 0:N first.
Set the selection property of the table as MULTI.
Try out this code -
DATA: lr_element type ref to if_wd_context_element,
lt_elemset type WDR_CONTEXT_ELEMENT_SET.
CALL METHOD lr_node->GET_ELEMENTS "if_wd-context_node
* EXPORTING
* FROM =
* TO =
RECEIVING
SET = lt_elemset .
loop at lt_elemset into lr_element.
CALL METHOD lr_element->SET_SELECTED
EXPORTING
FLAG = 'X'.
clear lr_element.
endloop.
This sets all the elements/rows as selected.
For More Informtation -
Create a attribute for this selection of type WDUI_TSMODE. Bind the selection property of the table to this attribute.
Then set the Selection property of the table to single initially in the WDDOINIT.
On the button click set the property of the table selection to Multi or Multi-Nolead.
Please chk out this link-
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/6e/ae0e422dfcdc2ce10000000a1550b0/frameset.htm
Check the class cl_wd_table for the selection property and use the methods BIND_SELECTION_MODE.
You will get the reference of the table in the WDDOMOIFY method.
Or use the if_wd_context_node and use the set attirbute method.
Regards,
Lekha.
Edited by: Lekha on Jan 29, 2009 8:05 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.