Skip to Content
author's profile photo
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 comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    author's profile photo
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • 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 comment
    10|10000 characters needed characters exceeded