cancel
Showing results for 
Search instead for 
Did you mean: 

REG : Execution of BAPI in view controller

Former Member
0 Kudos

Hi Experts,

Is this necessity to excute bapi in component controller only.I am excuting bapi once only so i am comfortable in executing bapi in view.Kindly advise me any drawbacks if there are any for executing bapi in view controller.

Regards,

Anupama

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

with respect to calling the rfc or the bapi in the view comtroller will not effect the performance ,

as there may be scenarios where on click of a button in the view you need to call the rfc ,

the execute method which gets generated should always be in the component controller and calling the rfc can be from the

view controller or the component controller , this will help to use the execute method any where in 'N' of views

rather to using execute method in view controller .

if your are new to webdynpro and exposing rfc / bapi then go with the standard document the SAP has provided

for calling and executing rfc.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

There will be no performance issue even if u execute the model in ViewController unless you dont need that model output in other Views of the same component.

It is not recommended as the MVC design of WebDynpro says, Controller layer is responsible to control the data transfer between View layer and Model layer.

If you need the same model output in multiple Views of the same component then you should execute the model in the Component controller and the context can be shared to all the other Views as Component Controller is public controller in the Component and View Controllers are private.

Regards,

Charan

former_member201361
Active Contributor
0 Kudos

Hi,

There is no problem in executing the model in Vioew controller. but according to MVC architecture, controller will interact with Model and View. the Data Presentation should not know anything about the Model, controller is responsible to get the data from Backend and give it to presentation layer.

[http://help.sap.com/saphelp_nwce711/helpdata/en/47/b467c028912972e10000000a42189b/content.htm]

Thanks and Regards