on 01-27-2009 4:10 AM
Hi All,
I am a Java guy having knowledge in Java webdynpro, it happend for me to get into ABAP webdynpro just had a small query here.
How does models functionality work in ABAp Webdynpro.
How do we access RFC, BAPI, web services, EJBs etc in ABAP web dynpro.
Thanks in Advance,
Sai Krishna.
Hi Sai,
Model is nothing but the business logic similar to the Java webdynpro . I guess you have seen those Hook methods like WD_doinit, WD DOmodifyView some standard default methods which we get according to the requirement we write our code as and where we want . One basic thing is u must be aware of the Context which is the heart of the webdynpro abap applications the interaction between the screen and the database is done by this .
Let me take a small example of how are we going to use the RFC or Bapis.
EG:
We have a screen UI elemnets in which we have one input field and a table our aim is to fetch the data into the table depending upon the input field or say selection field . and here we will be using say RFC or it may be a BAPI.
SO step1. Intially we desing the screen UI elements , create a Node for the input field with cardinality (0:1). and create another node for the table binding with cardinality as (0:n).then bind the values of the screen .
step2: Now since after giving the value in the input filed we want to fetch the data. On action of the Button or on enter of the input filed we need to write our code.
That means here our bapi or RFC comes into picture . what we need to do is get_attribute of the input field and call that RFC in import values pass the get_attribute value and see that it returns some table
say lt_table.
Now when you debug you can see the table values which we need to bind it to the table.
lo_nd_table->bind_table( lt_table ).
This will fetch the table values depending upon the input field values you giv .
Hope it is clear and helpful.
Have A GoodDay:)
Regards,
Sana.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sai Krishna,
Misbha has stated correctly regarding Model.In WDA generally uses service call to access the BAPI/RFC and also classes with methods to write the back end logic.
Check the below article how to create a service call
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suman / Mishab,
If i could understand correctly since ABAP is an external source in JAVA web dynpro we add BAPIs as models and then use them in Componet / Custom controllers.
So in ABAP Web dynpro all the objacts are avaialable locally we can stright away call them in Component / Custom controllers and thus no need to add them as Models. Is that right.
If this the case my query is completly answered.
Thanks & Regards,
Sai Krishna
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.