Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

MVC: Controller called twice in application

I have a situation that I am hoping is not that strange to some of you. The app that I am working on is fairly simple. A table is created using user-input from an input field and a function module in the controller class. This table is then sent to the view and used to populate a tableview. Once a user has chosen a row and clicked submit, the controller is called again. What is supposed to happen, of course, is that I use the row that was selected against the previously created internal table. My problem is that the data in the internal table is lost by the time the user clicks the submit button.

After a little debugging, I've learned that even on the original painting of the view, the controller is called a second time. When the controller is called a second time (without any user interaction yet) all data is 'refreshed.' The view reverts to intitial and my internal tables are cleared.

There is only one controller and one view in this application. and Main.htm.

Does anyone have an idea as to why the dispatch_input in would be called a second time, even after the view has been painted on screen and the user has yet to submit anything?

I appreciate any guidance you can give!

Former Member
Not what you were looking for? View more on this topic or Ask a question