cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a Method in Web Dynpro ABAP

Former Member
0 Kudos

Hi Experts,

I have created a class in se24 and called its methods in web dynpro by simply creating its object. It is working fine. After that i came to know that method should be called through creating a service call in WD.

What is the standard way and why?

Thanks

Ravindra.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ravindra,

As per MVC architecture of WD ABAP, you should create all your business logic (FM,Methods etc.) into your assistance class only. Later, you can use those methods in your views.

Thanks,

Ravin

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi All,

Thanks for ur reply .

Former Member
0 Kudos

Hi Ravindra,

WebDynpro is based on the MVC architecture where the model plays the role to call the business logic. View displays the UI and Controller is the entity that enables data exchange between view and model.

Based on this, in WDA when you implement a service call (basically a model), one of the controllers (component or custom) is used to make a call to the business logic. In WDA, Assistance class also can be used to call the business logic. Business logic must never be called directly from the view!

When I say business logic, it can be a FM or a class method.

Thanks.

Chitrali

Former Member
0 Kudos

Hello Ravindra ,

I think the better way is to create an assistance class ( Say A1) and create an attribute (Say AC1) as object of your class ( Say C1 ).

In the costructor of you assistance class A1 you can instanciate the object of C1 .

Now inside a method of assistance class you can call the method of C1 any time because AC1 is already instantiated .

MVC architecture recommends you should have separate method to aceess the data and you write your business logic in assitance class methods .

Hope this will help you .

Regards

Vivek