Skip to Content
author's profile photo Former Member
Former Member

MVC..

Hi friends,

i am working sample application with MVC.

i created a controller and view but i don't know where will i able to create model?

how can i execute controller in se80?.

cheers,

Kannan.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 05, 2005 at 04:00 AM

    hi,

    you can create a model class as a normal class only

    remember that it is a class which has CL_BSP_MODEL as its super class. so in properties tab of class formation put this class as its super class.

    now to execute controller.

    go to controller class(double click on controller class in controller you have made).

    then in its do_request method create instance of view

    as

    DATA: main_view TYPE REF TO if_bsp_page.

    dispatch_input( ).

    main_view = create_view( view_name = 'your_view_name').

    call_view( main_view ).

    save it .

    and just run your controller.

    you can check this link:

    http://help.sap.com/saphelp_erp2004/helpdata/en/a2/8c6eeb2d8911d596a000a0c94260a5/frameset.htm

    regards,

    Hemendra

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 05, 2005 at 06:44 AM

    Hi,

    check out the sample application bsp_model which shows you how to setup a model object (controller control.do -> method do_init).

    regards,

    Thomas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.