on 04-28-2010 5:17 AM
hello,
when i am running code Inspector of my dynpro Apllication, i am getting error of DB_delect
Information for that error as follows :
Definition
Within Web Dynpros, the data model must be strictly separated from the display logic. For this reason, you must avoid accessing database tables directly.
Use
This checks Web Dynpro code for the following statements.
IMPORT FROM/ EXPORT TO (DB)
SELECT FROM (DB)
UPDATE/MODIFY/DELETE (DB)
EXEC SQL
Solution
The corresponding statements must be encased in a functional unit (model).
How to
Absolutely!
Although WD does not enforce MVC, it is still a good idea to do it. And direct DB access within the view/controller code is definately not MVC!
Put your SQL code in a method of the assistance class of the controller - then access it by calling the assistance class from your view/controller.
- Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can create a Assistance class from se24 by giving CL_WD_COMPONENT_ASSISTANCE as superclass. Once you create an assistance class you should click on WD object name in SE80 and give the assistance class name in class tab , it will create wd_assist in your controller and you can use the methods of the assistance class in your WD component by giving
WD_assist->method name.
Hope it helps you
Click on your component - type in a class name (starts with Z has some other characters) - this will generate the class including the required superclass.
Alternatively - search this forum for advise - there are lots of posts about this, look at some of the excellent tutorials.
Posting a question should not be your first reaction - no matter how experienced or new you are.
- Chris
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.