cancel
Showing results for 
Search instead for 
Did you mean: 

how to pass the data to web dynpro

Former Member
0 Kudos

Hi,

Where do we write the business logic and how to pass the data to web dynpro from the backend.

Regards,

Ajay

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

->For Business Logic , You can use various methods of View Controller or Component Controller.

->You have some predefined methods like Wddoinit, wdModify in the controller.

->you can also create your own methods and write logic there.

And For fetching data from backend, you can use Functional Modules(Bapi) or you can write select queries in the methods only.

I hope it helps.

Thanx.

Former Member
0 Kudos

Hi,

Thanks for the reply.

is there any other way to get the data, apart from BAPI?

Regards,

Ajay

Former Member
0 Kudos

hi

u can use simple select queries for fetching tha data, anywhere in the methods.

Former Member
0 Kudos

is it possible to call the Function modules directly?

regards,

Ajay

Former Member
0 Kudos

hi,

you can call a Function module directly or you may also use service call for executing a BAPI.

Click on Pattern Button or Control +F6 and there you can write the name of function to be called.

Thanx.

arjun_thakur
Active Contributor
0 Kudos

Hi Ajay,

Use of select queries is not recommended in webdynpro component. So you should get the logic (to fetch the data ) in some FM or in a class and should call that FM or class to get the data.

Regards

Arjun

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks for the help..

Former Member
0 Kudos

Hi,

For all the Bussiness Logic try to Create Assistance class and call the assitance class methods in your Webdynpro component methods.

Regards,

Xavier.p

Former Member
0 Kudos

hi

use of select queries is not recommended .. u can use FMS , u can also have the concept of component usage , so that one comp can be reused in some other component

Former Member
0 Kudos

Hi,

You can call the FM's directly with in methods. You can also call class methods, select statements directly. After you store the data from either FM/Class Object/ Select Query you need to bind this to node. for example: wdContext->bind_table( 'Internal Table').

Further more please refer

help.sap.com

Best Regards

Ravi

Former Member
0 Kudos

Hi

The design pattern or paradigm followed by Webdynpro ABAP is MVC .

M-Model

V- View

C-Controller

The model forms the interface to the back end system and thus enables the Web Dynpro application access to data.View is nothing but UI layout design to show the data .The controller lies between the view and the model. The controller formats the model data to be displayed in the view, processes the user entries made by the user, and returns them to the model.

Former Member
0 Kudos

Hi Amit,

Thanks for the reply.

I know the functionalities of MVC. My doubt is where do we write this business logic code and how do we pass that data to webdynpro.

is it in the function modules or somewhere else? if it is FM, how to pass the values from there to web dynpro?

regards,

Ajay