on 01-03-2009 1:56 AM
Hi,
I am using ALV and ALV standard functions to append, delete, insert lines in a table.
Here I have 2 questions
1) When I append a line, I want to default some values in the new line.. How can I do this?
2) I could make the whole table in edit mode using column edit, but I want only one single line in edit mode. The line which is selected, should be in edit mode. How is this possible?
Can anyone suggest me with any sample code?
Thanks.
Hi Sreekanth,
Please look at the following code, it will be useful.
DATA:
lo_node_raj TYPE REF TO if_wd_context_node,
lo_elem_raj TYPE REF TO if_wd_context_element,
ls_raj TYPE if_componentcontroller=>element_raj .
*ls_raj is just the structure to hold the values
lo_elem_raj = lo_node_raj->create_element( ).
wd_this->ms_rajdefault hold the value for the current row that you can get using get_static_attributes method.
MOVE-CORRESPONDING wd_this->ms_rajdefault TO ls_raj.
lo_elem_raj->set_static_attributes( static_attributes = ls_raj ).
lo_node_raj->bind_element( new_item = lo_elem_raj
set_initial_elements = abap_false ).
lo_node_raj->set_lead_selection( lo_elem_raj ).
Thanks,
Rajkumar.S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.