on 01-06-2015 6:53 AM
Hello Gurus,
As beginner in web dynpro, I would like to develop a simple web application with C.R.U.D operations using web dynpro, My question is what are things I should keep in mind while interacting with the Data base to improve the performance. In this case I'm just performing all the operations on a single db table.
Hi Nagendra,
I suggest you the below points
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rama,
thanks for your replay, the second point you've mentioned was good. I've created an assistance class for the wd component to perform all the operations.
like you said
1st.I will fetch all records from the table and I'l keep them in an internal table how can use it later while doing the operations like change, read, delte. I would feel better if u can give me a sample code
thank you
Regards,
Nagendra
Hi,
Performance tuning with database operations for WDP ABAP is as same as ABAP.You can check the below link which will help you to understand better in detail.
High performance of Web dynpro ABAP
Performance Tuning for SAP Web Dynpro ABAP
Thanks
KH
Hi Nagendra,
Go to attributes tab of assistance class and create a global attribute GT_MY_DATA ( PUBLIC instance variable ) . To reuse data for later purpose, save data into gt_my_data
inside assistance class method, the initial load / get data method looks like:
method LOAD_DATA.
select *
from DB_NAME
into table gt_my_data.
endmethod.
Inside wda :
you can access this data as below
wd_assist->gt_my_data
Similary, you can update global internal table for delete, change, etc.
Finally, save method of assistance class looks like
method save_data.
modify DB_NAME from table GT_MY_DATA
endmethod.
CALL IT IN WDA ..... ON ACTION SAVE
wd_assist->save_data( ).
Hope this helps you.
Regards,
Rama
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.