on 10-14-2008 5:15 AM
Hi Experts,
I have a normal table with Delete button on each row. When it is clicked, that particular row should be deleted from the internal table which is bound to the context and that record also has to be deleted from the standard table as well.
A detailed reply would be appreciated.
Thanks in Advance,
Mirza.
Hi Mirza,
Write the below code in your onAction method of delete button.
DATA: lo_nd_flights TYPE REF TO if_wd_context_node,
lo_el_flights TYPE REF TO if_wd_context_element,
ls_flights TYPE if_main=>element_flights,
it_flights type if_main=>elements_flights.
navigate from <CONTEXT> to <FLIGHTS> via lead selection
lo_nd_flights = wd_context->get_child_node( name = wd_this->wdctx_flights ).
get element via lead selection
lo_el_flights = lo_nd_flights->get_element( ).
get all declared attributes
lo_el_flights->get_static_attributes(
IMPORTING
static_attributes = ls_flights ).
CALL METHOD LO_EL_FLIGHTS->GET_INDEX
RECEIVING
MY_INDEX = v_index.
*get the data from table
CALL METHOD
NODE_FLIGHTS->GET_STATIC_ATTRIBUTES_TABLE
IMPORTING
TABLE = it_flights.
*delete record from internal table
delete table it_flights from ls_flights index v_index.
*Delete record from table
delete zflight from ls_flights.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.