on 12-02-2009 12:21 PM
Hi,
I want to save the edited data in alv table. How to do this?
I have data populated in alv table. I make one column as editable. After editing the value in the column, i want to save it. It should be reflected in the table. Pls help.
Thanks,
Gopi.
Your ALV is bound to the context. When the user clicks SAVE or a custom button you create. You have access to the data in the table via the context. You can use simple SQL to update the table, but it would be cleaner to pass the whole table to an assitant class or some other business rules class.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Once you edit the data in ALV table you store all the table details in the DB rght?
so to reflect back the edited data.
get the data from the DB and bind it back to the table.
***SELECT * FROM ZRM_C_CV_PRJDT INTO CORRESPONDING FIELDS OF TABLE
lT_sap_prj_experience where userid = lv_userid AND LANG = LV_LANG.
***
***CALL METHOD lo_nd_sap_prj_experience->BIND_table
*** EXPORTING
*** NEW_ITEMs = lT_sap_prj_experience.
Priya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
i used the following code in method ondatacheck().
DATA: node_output TYPE REF TO if_wd_context_node,
elem_node TYPE REF TO if_wd_context_element,
lt_emp TYPE if_alv_app=>elements_output,
itab TYPE TABLE OF zemploye.
CHECK r_param->t_error_cells IS INITIAL.
node_output
= wd_context->get_child_node( name = `OUTPUT` ).
node_output->get_static_attributes_table(
IMPORTING table = lt_sflight ).
node_output->bind_elements( EXPORTING new_items = ltab ).
ON_DATA_CHECK is the event used in ondatacheck().
But data is not getting store in my table zemploye.
Wat is the problem here?
Thanks,
Gopi.
Hi,
node_output->get_static_attributes_table(
IMPORTING table = lt_sflight ).
node_output->bind_elements( EXPORTING new_items = ltab ).
Here you getting data into lt_sflight table and biding some other table contenet itab to the same sode..
Now which table data you want to have it in zemployee
if both the zemployee and node strcutre are same ther you can directl get the content into zemployee..
can you be more clear on this.
Hi,
I am trying the application which is existing in this pdf link..
See page 8
save data to database
update... => only simlate, to not change the flight data model
content!
Data is not getting stored.. Wat would be the problem here?
thanks,
gopi.
HI,
I guess you have some SAVE button right...
inthis button handler, try to read the node to which the ALV is bound(code wizard, read node) then it will
return the table of contents..now you an save them to DB table..
As the data that is already there is context node there is no need to bind the table again unless you do some changes internally through coding..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.