on 07-02-2009 10:04 AM
Hi All,
I am very new to Web Dynpro ABAP.
I am trying to store context data into database table. For this i need to write some code.
I have created one context attribute to store data and i have one database table.
Know i want to store that context attribute's data into database table.
Can anyone provide me necessary code to do this.
Thanks in Advance!
Regards,
Sreelakshmi.
Thank you. Map from Context into Wa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sreelakshmi,
i think there would be some button and when u click that, the data of the context need to get saved into the database.
For the button,create an action.
in the action handler write the following code.
DATA lo_nd_kna1 TYPE REF TO if_wd_context_node.
DATA lo_el_kna1 TYPE REF TO if_wd_context_element,
DATA lt_kna1 TYPE wd_this->elements_znode.
DATA ls_kna1 TYPE wd_this->element_znode.
lo_nd_kna1 = wd_context->get_child_node( name = wd_this->wdctx_znode ).
lo_el_kna1 = lo_nd_kna1->get_element( ).
lo_el_kna1->get_static_attributes( IMPORTING static_attributes = ls_kna1 ).
modify kna1 from ls_kna1.
Regards
Sajid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
TO_XML method of IF_WD_CONTEXT_NODE can be used to store the context node information to XML
later you can save it in DB table by other methods.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You will have to create a FM or a class method which will have the code for updating the database (normal ABAP DB update code), in your WDP appliction, read the context attribute (since you are new to WDA you can use the wizard to generate the code for reading the context attribute for you). You will be reading the context attribute into a normal structure/variable/table depending on what type of attribute it is, then call your FM or class method to actually update the data into the DB.
Hope this helps,
Wenonah
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 | |
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.