on 02-10-2013 5:43 PM
Hi Experts,
I have some 10 records in alv table,user will change two record in the alv table,And now i have to get that change required at run time.
Please Provided me Required Information.
Thanks & Regards.
Krishna.
Hi Krishna,
Refer below code,
1.Create a method in the view name it like ON_CELL_ACTION,method type is Event handler that select from drop down and select event is ON_CELL_ACTION from Interface Controller Events.
2.Now to trigger this event write the below code in WDDOMODIFYVIEW method of view.
* Data Declaration
data lo_cmp_usage type ref to if_wd_component_usage.
data lo_interfacecontroller type ref to iwci_salv_wd_table .
data lo_value type ref to cl_salv_wd_config_table.
* Instantiate ALV
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
* Call get_model of Interface Controller to get reference of ALV
lo_value = lo_interfacecontroller->get_model(
).
* Enable the ON_CELL_ACTION Event
call method lo_value->if_salv_wd_table_settings~set_cell_action_event_enabled
exporting
value = ABAP_TRUE .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krishna,
To get changed values in webdynpro ALV you need to write code in ON_CELL_ACTION event.
In methods tab you create one event like method and select event ON_CELL_ACTION. Double click and go to source code and write code.
sample code is
lo_nd_nodename type ref to if_wd_context_node,
lo_el_nodename type ref to if_wd_context_element,
lo_nd_nodename= wd_context->get_child_node( name = wd_this->wdctx_nodename).
lo_nd_nodename->get_static_attributes_table( importing table = lt_nodename).
This code will work on enter for each line item in ALV
Thanks & Regards,
Meenachi.R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krishna,
As you change the records, Those will be automatically updated in context node to which you have binded. To save this changes you have to create some user defined functions on alv toolbar such as 'save' button using standard events. Here is the useful link:
http://scn.sap.com/community/web-dynpro-abap/blog/2006/01/09/wda--user-defined-functions-in-alv
Hope it works.
Regards,
Sudhir Kothavale.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try using ON_CELL_ACTION or ON_DATA_CHECK event of ALV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
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.