on 03-11-2008 4:05 PM
Experts,
I have a question. We all have working in web Dynpro to create report.
I was trying to display the data in table and update the data.
When I click on Save button the data should be saved in the SAP table.
SAP table may be standard or user-defined table.
Any idea of how to do it???
Answers will b rewarded.
Thanks in Advance
Edited by: Router on Mar 11, 2008 12:06 PM
Hi,
The solution to this is very similar to the reports that we write.
1. Create a context node from the dictionary element in the view of the webdynpro component.
2. Now you may be displaying/editing this data in the form of a table in the view layout. For this create a table in the layout and bind the fields of the context to the node you created from the dictionary table in the context.
3. In the layout you also want to have a button SAVE. on the event of this button. Write the code from code wizard where in
a. Read the context of the dictionary table from the context.
b. call method
CALL METHOD lo_nd_group->get_elements
RECEIVING
set = lt_ddictable.
c. update the database table using the internal table lt_ddictable.
Hope you find this helpul.
Regards,
Kinshuk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi router.....
first read the node that is bound to the table into an internal table using... get_static_attributes_table method of interface if_wd_context_node..... then you will have it in an internal table..... then use your logic to update in database.
you can loop the internal table and load it into the database.
---regards,
alex b justin
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.