cancel
Showing results for 
Search instead for 
Did you mean: 

What makes a controller a subcontroller?

Former Member
0 Kudos

Hi friends,

I've been tussling with DISPATCH_INPUT() and came to the conclusion that I am not really sure if my subcontrollers are officially subcontrollers. The only description i have for DISPATCH_INPUT is:

* if input is available, dispatch this input to subcomponent.
* this call is only necessary for toplevel controllers.
* ( if this is not a toplevel controller or no input is present,
*   this call returns without any action)

Subcomponent = subcontroller?

Anyway,...

According to the following image link, between scenario 1 and 2, which one really has subcontrollers?

http://img364.imageshack.us/img364/4289/subcontrollers8wm.gif

Thanks and Regards,

Kevin Wong

Message was edited by: Kevin Wong

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hai Kevin,

Look at the following blogs.

/people/suresh.babu60/blog/2005/10/25/bsp-data-exchange-between-subcontrollers--part-i

/people/suresh.babu60/blog/2005/10/27/bsp-data-exchange-between-subcontrollers--part-ii-using-oo-design-patterns

regards,

venkatesh

Answers (3)

Answers (3)

former_member196065
Participant
0 Kudos

Hi Kevin,

As per the link http://img364.imageshack.us/img364/4289/subcontrollers8wm.gif

both the scenarios have subcontrollers.

Main point is, if we are going to crate a instance of any controller in other controller(Main Controller) created one is subcontroller.

In the case of Scenario 1 you are creating the instance of page1_sub1.do and page2_sub2.do using <bsp:call > in this case creating the instance of the controller will be taken care by <bsp:call>

In the sencond scenario manully we need to create the instance of the controller and we need to hold the same instance through out the application.

Both are same only the of implementation

is different.

And Regading DISPATCH_INPUT() it makes sure that events will be fired accoding to the Hierarchy level

Former Member
0 Kudos

Hi Kevin,

you need not write DISPATCH_INPUT() in your subcontrollers its enough to code it in main controller. From where it takes care of events.

Following links can do away your confusions.

http://help.sap.com/saphelp_erp2004/helpdata/en/9d/1ca7f91b76ad4493d62b8ecc7c83db/frameset.htm

http://help.sap.com/saphelp_erp2004/helpdata/en/ce/43473ccf20514ee10000000a114084/frameset.htm

In your fig

both scenarios are having subcontrollers.

Hope this helps,

Regards

Amit

Please reward points if you find it helpful.

shiva_suvarna
Participant
0 Kudos

Both have subcontrollers . you can assign subcontrollers for a controller in both ways .