SAP Development 4.0 to 6.

20 Delta Training

BSP Advanced Topics Release 4.0 to 6.20 Delta

Business Consulting Services

Business Server Pages – Advanced
December 2003

deeper

© Copyright IBM Corporation 2003

© Copyright IBM Corporation 2003

16.1

December 2003, v1.1

SAP Development 4.0 to 6.20 Delta Training

BSP Advanced Topics Release 4.0 to 6.20 Delta

Business Consulting Services

BSP Advanced – Topics
Introduction to BSP Extensions
– Example: HTMLB

The Model-View-Controller development model

2

ABAP | Confidential | 16_BSP Advanced Topics v1.1 .ppt | 12/11/2003

© Copyright IBM Corporation 2003

© Copyright IBM Corporation 2003

16.2

December 2003, v1.1

SAP Development 4.0 to 6.20 Delta Training

BSP Advanced Topics Release 4.0 to 6.20 Delta

Business Consulting Services

Advanced BSP topics
NEW IN 6.20: BSP Extensions
– Libraries of custom tags that offer functionality and flexibility above and beyond traditional HTML – Cleaner and more compact method of writing BSP applications

Example: HTMLB
– HTML Business for SAP – Easier to read, looks more like standard HTML rather than a mix of HTML and code – HTMLB extension code is thoroughly examined by the compiler, whereas standard HTML/BSP gets a more cursory look possibly leading to run-time errors. – Improved portability. HTMLB code potentially more “browser agnostic” than BSP. SAP controls the HTML set generated by HTMLB code – Like HTML, HTMLB tags have attributes allowing for greater control over the functionality of the tag
3 ABAP | Confidential | 16_BSP Advanced Topics v1.1 .ppt | 12/11/2003 © Copyright IBM Corporation 2003

© Copyright IBM Corporation 2003

16.3

December 2003, v1.1

SAP Development 4.0 to 6.20 Delta Training

BSP Advanced Topics Release 4.0 to 6.20 Delta

Business Consulting Services

BSP Extensions
Demo application from previous lecture using standard HTML/BSP code:

4

ABAP | Confidential | 16_BSP Advanced Topics v1.1 .ppt | 12/11/2003

© Copyright IBM Corporation 2003

© Copyright IBM Corporation 2003

16.4

December 2003, v1.1

ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.1 .0 to 6.5 December 2003.20 Delta Training BSP Advanced Topics Release 4.0 to 6. v1.20 Delta Business Consulting Services BSP Extensions A revised version of the demo using HTMLB/BSP Extensions: 5 ABAP | Confidential | 16_BSP Advanced Topics v1.1 .SAP Development 4.

ppt | 12/11/2003 © Copyright IBM Corporation 2003 • • Note the added “extension” BSP directive.1 . In this instance the flight data just being presented to give a high level example of BSP extensions For a complete listing of supported extensions.SAP Development 4.1 . click on the “Tag Browser” in SE80 and expand the “BSP Extensions” folder • • © Copyright IBM Corporation 2003 16. the prefix allows the developer to designate which tag belongs to which extension set.0 to 6. In this case “htmlb” is the prefix Gone from the previous example is the data manipulation.20 Delta Training BSP Advanced Topics Release 4.20 Delta Business Consulting Services BSP Extensions <%@page language="abap"%> <%@extension name="htmlb" prefix="htmlb"%> <htmlb:content> <htmlb:page> <htmlb:form> <htmlb:tableView id </htmlb:tableView> </htmlb:form> </htmlb:page> </htmlb:content> = "t1" table = "<%=planeflights %>" > 6 ABAP | Confidential | 16_BSP Advanced Topics v1. v1.6 December 2003.0 to 6. This signifies that the following code will be in HTMLB format You can work with several different extensions simultaneously. including more detail on HTMLB.

This is something ABAP developers may not be used to.0 to 6. This is a built in feature of htmlb:tableView Also note that tableView formats all data (such as the date) before outputting to the screen. Had the select statement been modified the developer could just as easily have chosen select fields to be included in this display Note the arrow widgets at the lower left hand side for added table browsing functionality. v1.ppt | 12/11/2003 © Copyright IBM Corporation 2003 • • • Here the entire table is being represented.1 .0 to 6.20 Delta Training BSP Advanced Topics Release 4.7 December 2003.20 Delta Business Consulting Services BSP Extensions The output: 7 ABAP | Confidential | 16_BSP Advanced Topics v1. Here HTMLB is formatting the date prior to output © Copyright IBM Corporation 2003 16.SAP Development 4.1 . Standard HTML treats data as characters and does not do type manipulation.

20 Delta Training BSP Advanced Topics Release 4.0 to 6.8 December 2003.0 to 6.1 .20 Delta Business Consulting Services BSP Extensions The syntax check catches errors in HTMLB code in addition to ABAP code 8 ABAP | Confidential | 16_BSP Advanced Topics v1.SAP Development 4.ppt | 12/11/2003 © Copyright IBM Corporation 2003 • Syntax checks on the HTMLB code help to ensure that errors do not appear at runtime © Copyright IBM Corporation 2003 16. v1.1 .

v1.20 Delta Business Consulting Services BSP Extensions HTMLB attributes listed under their associated tag in the Tag Browser Double click on a tag name or attribute to get additional information Attributes include sizing. sorting and even event handlers Example – remove the footer at the bottom of the table <htmlb:tableView id = "t1" table = "<%=planeflights %>" footerVisible = “FALSE”> </htmlb:tableView> 9 ABAP | Confidential | 16_BSP Advanced Topics v1.20 Delta Training BSP Advanced Topics Release 4.1 .0 to 6.9 December 2003.SAP Development 4.0 to 6. display.1 .ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.

v1.SAP Development 4.1 .20 Delta Business Consulting Services BSP Extensions The navigation elements are no longer visible at the bottom of the table 10 ABAP | Confidential | 16_BSP Advanced Topics v1.0 to 6.0 to 6.20 Delta Training BSP Advanced Topics Release 4.10 December 2003.1 .ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.

ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16. v1.0 to 6.htm” and execute with F8 This application allows the user to examine each HTMLB element and all attributes associated with that element The various HTMLB tags are listed in a left-hand tree The top frame allows the user to change attributes and have these changes reflected in the example in the lower frame “HTMLB_SAMPLES” is a convenient way to quickly learn all about HTMLB 11 ABAP | Confidential | 16_BSP Advanced Topics v1.SAP Development 4.0 to 6.11 December 2003.1 .20 Delta Business Consulting Services BSP Extensions SAP includes a demo application “HTMLB_SAMPLES” which is accessible through SE80 After loading “HTMLB_SAMPLES” select the page “default.20 Delta Training BSP Advanced Topics Release 4.1 .

0 to 6.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.20 Delta Business Consulting Services BSP Extensions “HTMLB_SAMPLES” demo application: 12 ABAP | Confidential | 16_BSP Advanced Topics v1.1 .1 .0 to 6.20 Delta Training BSP Advanced Topics Release 4.12 December 2003.SAP Development 4. v1.

developers are able to create their own custom extensions Done through SE80.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.0 to 6.20 Delta Business Consulting Services BSP Extensions In addition to the pre-defined extensions such as HTMLB. similar to creating a BSP Application Useful for developers wishing to package their own work in a custom extension set Geared towards creating simple extension sets.1 . it would be difficult to create a set as complex as HTMLB for example 13 ABAP | Confidential | 16_BSP Advanced Topics v1.0 to 6.SAP Development 4.20 Delta Training BSP Advanced Topics Release 4.1 .13 December 2003. v1.

This ensures that you’ll insert both opening and closing tags where applicable and since HTMLB is case sensitive eases debugging 14 ABAP | Confidential | 16_BSP Advanced Topics v1.0 to 6.1 .20 Delta Business Consulting Services BSP Extensions (Helpful Hints) When using tableViews. developers must implement their own class that implements the IF_HTMLB_EVENT interface. but also with BSP/HTML as a whole Use the Tag Browser to add tags.ppt | 12/11/2003 © Copyright IBM Corporation 2003 • Additional hint: All HTMLB processing takes place in the OnInputProcessing event. The HTMLB manager then calls the registered event handler © Copyright IBM Corporation 2003 16. v1. To override this.14 December 2003. the headers are automatically assigned.SAP Development 4.0 to 6. however developers can register their own event handler.20 Delta Training BSP Advanced Topics Release 4. This is important not only when working with BSP Extensions. otherwise they will appear inactive Use dropdown boxes to display small amounts of data for selection and table views for larger sets Making an application as accessible as possible is important.1 . To do so. use <htmlb:tableViewColumn> and set it’s title attribute Always set the onClick or onClientClick events for buttons. Things such as adding the alt attribute to images helps to ensure that the application is accessible by the greatest number of client browsers.

1 .20 – Allows developer to separate user interface. View and Controller 15 ABAP | Confidential | 16_BSP Advanced Topics v1.1 . C++ development.0 to 6. business and flow logic for greater maintainability and reusability – User interface is separated into three distinct parts: Model.20 Delta Business Consulting Services Advanced BSP topics NEW IN 6.SAP Development 4.0 to 6.20: Model-View-Controller (MVC) – Popular in Java.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16. available to SAP developers as of Web AS 6.15 December 2003. v1.20 Delta Training BSP Advanced Topics Release 4.

0 to 6.1 .SAP Development 4.1 . v1.16 December 2003. – Handles user events – Responsible for executing views directly 16 ABAP | Confidential | 16_BSP Advanced Topics v1.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.0 to 6.20 Delta Business Consulting Services MVC Model: – Encapsulates business data and functionality – Data source for visualization – Single point for retrieving and updating data – The logical structure of the data underlying the application View: – Visualization of application data – Views do not have event handlers Controller: – Manages interaction between the client and the model and view.20 Delta Training BSP Advanced Topics Release 4.

SAP Development 4.17 December 2003. v1.1 .20 Delta Business Consulting Services Interaction of MVC Components Request Controller Set Model 1 Response Get View 1 Data Flow Control Flow 17 ABAP | Confidential | 16_BSP Advanced Topics v1.0 to 6.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.20 Delta Training BSP Advanced Topics Release 4.1 .0 to 6.

1 .0 to 6.SAP Development 4.20 Delta Business Consulting Services Implementing MVC Step 1: Create a page for the View 18 ABAP | Confidential | 16_BSP Advanced Topics v1.18 December 2003.20 Delta Training BSP Advanced Topics Release 4.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16. v1.1 .0 to 6.

20 Delta Training BSP Advanced Topics Release 4.0 to 6. v1.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.0 to 6.1 .1 .19 December 2003.20 Delta Business Consulting Services Implementing MVC Name the page “vdemo.htm” and ensure the page type is set to “View” 19 ABAP | Confidential | 16_BSP Advanced Topics v1.SAP Development 4.

20 Delta Business Consulting Services Implementing MVC Copy the code from “demo.1 .20 December 2003.htm” to “vdemo.SAP Development 4.htm” 20 ABAP | Confidential | 16_BSP Advanced Topics v1.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.1 .0 to 6.20 Delta Training BSP Advanced Topics Release 4.0 to 6. v1.

1 . © Copyright IBM Corporation 2003 16.20 Delta Business Consulting Services Implementing MVC Add the “planeflights” table to the attributes section of “vdemo.20 Delta Training BSP Advanced Topics Release 4.1 .0 to 6.0 to 6. That’s because it is a VIEW.ppt | 12/11/2003 © Copyright IBM Corporation 2003 • We are done creating the view.21 December 2003.SAP Development 4. v1.htm” 21 ABAP | Confidential | 16_BSP Advanced Topics v1. Note that there is no logic to select data in the view itself! There isn’t even a tab to add in an initialization event.

22 December 2003.0 to 6.20 Delta Business Consulting Services Implementing MVC Step 2: Create the Controller 22 ABAP | Confidential | 16_BSP Advanced Topics v1.20 Delta Training BSP Advanced Topics Release 4.SAP Development 4.1 . v1.1 .ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.0 to 6.

v1.1 .20 Delta Business Consulting Services Implementing MVC Name the controller “demo. © Copyright IBM Corporation 2003 16. A main controller can have subcontrollers.23 December 2003.ppt | 12/11/2003 © Copyright IBM Corporation 2003 • In this example we just have one main controller.20 Delta Training BSP Advanced Topics Release 4.0 to 6.do” 23 ABAP | Confidential | 16_BSP Advanced Topics v1.0 to 6.1 .SAP Development 4.

0 to 6. The next step is to create the controller class.1 . v1.24 December 2003.20 Delta Training BSP Advanced Topics Release 4.0 to 6.ppt | 12/11/2003 © Copyright IBM Corporation 2003 • The screen that has been created here represents the properties of the controller object.SAP Development 4.1 .20 Delta Business Consulting Services Implementing MVC Specify a controller class and save. 24 ABAP | Confidential | 16_BSP Advanced Topics v1. © Copyright IBM Corporation 2003 16.

create it.20 Delta Business Consulting Services Implementing MVC Double click on the class name.1 .0 to 6. v1.20 Delta Training BSP Advanced Topics Release 4.SAP Development 4.25 December 2003.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.0 to 6. assign it to a package and save 25 ABAP | Confidential | 16_BSP Advanced Topics v1.1 .

v1.1 .0 to 6.1 .SAP Development 4.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16. the system displays the class and its inherited methods 26 ABAP | Confidential | 16_BSP Advanced Topics v1.26 December 2003.0 to 6.20 Delta Training BSP Advanced Topics Release 4.20 Delta Business Consulting Services Implementing MVC Once created.

20 Delta Training BSP Advanced Topics Release 4. v1.0 to 6. DO_HANDLE_DATA. It transfers data from form fields and messages for the global messages object. then the DO_REQUEST method is called.ppt | 12/11/2003 © Copyright IBM Corporation 2003 • After the DO_INIT method and DO_INITATTRIBUTE are processed.ensures that the model class is populated in the context of data binding.20 Delta Business Consulting Services Implementing MVC Click the change icon. click on the “DO_REQUEST” method and click redefine 27 ABAP | Confidential | 16_BSP Advanced Topics v1.27 December 2003. it populates the HTMLB event object.0 to 6.SAP Development 4. This method re-directs the incoming data to the subcontrollers. and when events are triggered by BSP elements.1 .1 . DO_FINISH_INPUT • • • • © Copyright IBM Corporation 2003 16. This method also controls the following methods for input processing. DO_HANDLE_EVENT –This method outputs the GLOBAL_EVENTparameter.

its lifetime. © Copyright IBM Corporation 2003 16.SAP Development 4.1 .20 Delta Training BSP Advanced Topics Release 4.0 to 6. That functionality will be put the model. 28 ABAP | Confidential | 16_BSP Advanced Topics v1.28 December 2003.0 to 6.20 Delta Business Consulting Services Implementing MVC Add code to instantiate and call the view object already created. At this point.1 . etc. v1.ppt | 12/11/2003 © Copyright IBM Corporation 2003 • • The interface to the BSP page that is declared here (type ref to if_bsp_page) lets you access the information of a BSP such as the name. note that we still haven’t selected any of the data that will be displayed in the view.

htm' ). call_view( view1 ). Finally the view is called and presented on screen via the browser This method allows the developer to quickly and easily add more views • • © Copyright IBM Corporation 2003 16.1 .20 Delta Training BSP Advanced Topics Release 4.htm was selected as the view.0 to 6. Next the view is instantiated and attached to the view1 pointer. view1->set_attribute( name = 'planeflights' value = planeflights ).29 December 2003.20 Delta Business Consulting Services Implementing MVC method DO_REQUEST. data: view1 type ref to if_bsp_page. endmethod.SAP Development 4. In this example. v1.htm) attributes are set. vdemo. view1’s (and vicariously vdemo.ppt | 12/11/2003 © Copyright IBM Corporation 2003 Explanation: • The data element view1 is created. Planeflights is an internal table that is an attribute that must be added to the controller. which is a reference to the BSP page interface. this allows vdemo. and will be instantiated as a view. view1 = create_view( view_name = 'vdemo.htm to work with the planeflights data we will capture via the model. This attribute will be filled at the controller initiation by making a call to one of the model methods.1 . 29 ABAP | Confidential | 16_BSP Advanced Topics v1. Next.0 to 6.

Once the model is created.0 to 6.0 to 6. v1.20 Delta Business Consulting Services Implementing MVC Executing the controller object yields no results. WHY? 30 ABAP | Confidential | 16_BSP Advanced Topics v1. its methods will be accessed via the controller to route data to the views.1 . That is the job of the Model which will contain the methods and attributes used to access data and implement business logic.SAP Development 4.ppt | 12/11/2003 © Copyright IBM Corporation 2003 • The WHY is because no data has been selected. © Copyright IBM Corporation 2003 16.30 December 2003.20 Delta Training BSP Advanced Topics Release 4.1 .

v1.31 December 2003.SAP Development 4.20 Delta Business Consulting Services Implementing MVC Specify a name for the Model and click Create in SE24 31 ABAP | Confidential | 16_BSP Advanced Topics v1.1 .1 .20 Delta Training BSP Advanced Topics Release 4.0 to 6.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.0 to 6.

v1.0 to 6.0 to 6.SAP Development 4.32 December 2003.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.1 .20 Delta Business Consulting Services Implementing MVC Ensure that Class is selected and press enter 32 ABAP | Confidential | 16_BSP Advanced Topics v1.20 Delta Training BSP Advanced Topics Release 4.1 .

SAP Development 4.ppt | 12/11/2003 © Copyright IBM Corporation 2003 • Click the icon in the upper right to make all fields visible.20 Delta Training BSP Advanced Topics Release 4.0 to 6. v1.33 December 2003.20 Delta Business Consulting Services Implementing MVC Specify “CL_BSP_MODEL” for the Superclass and add a description.1 .0 to 6. if Superclass is not visible © Copyright IBM Corporation 2003 16. click Save 33 ABAP | Confidential | 16_BSP Advanced Topics v1.1 .

20 Delta Training BSP Advanced Topics Release 4.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.SAP Development 4.1 .1 . v1.20 Delta Business Consulting Services Implementing MVC The model class has now been created 34 ABAP | Confidential | 16_BSP Advanced Topics v1.34 December 2003.0 to 6.0 to 6.

35 December 2003.SAP Development 4.1 .ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16. v1.0 to 6.0 to 6.20 Delta Business Consulting Services Implementing MVC Add public instance methods z_get_username and z_get_flightdata 35 ABAP | Confidential | 16_BSP Advanced Topics v1.1 .20 Delta Training BSP Advanced Topics Release 4.

0 to 6.20 Delta Business Consulting Services Implementing MVC Double click on the z_get_username method and add code.ppt | 12/11/2003 © Copyright IBM Corporation 2003 • Username is a returning parameter of the method.1 .SAP Development 4. © Copyright IBM Corporation 2003 16. v1.20 Delta Training BSP Advanced Topics Release 4.1 .0 to 6. 36 ABAP | Confidential | 16_BSP Advanced Topics v1.36 December 2003.

37 ABAP | Confidential | 16_BSP Advanced Topics v1.37 December 2003.0 to 6.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.20 Delta Business Consulting Services Implementing MVC Double click on the z_get_planeflights method and add code.0 to 6. v1.1 .1 .SAP Development 4.20 Delta Training BSP Advanced Topics Release 4.

0 to 6.20 Delta Training BSP Advanced Topics Release 4.0 to 6.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.38 December 2003.1 .20 Delta Business Consulting Services Implementing MVC Add the return parameters for the two Z methods.SAP Development 4.1 . save and activate 38 ABAP | Confidential | 16_BSP Advanced Topics v1. v1.

0 to 6.0 to 6.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.20 Delta Training BSP Advanced Topics Release 4.1 . v1. so open the controller class 39 ABAP | Confidential | 16_BSP Advanced Topics v1.39 December 2003.1 .20 Delta Business Consulting Services Implementing MVC The model class is called from the controller class.SAP Development 4.

20 Delta Business Consulting Services Implementing MVC Select the Attributes tab and add protected attributes similar to the model parameters 40 ABAP | Confidential | 16_BSP Advanced Topics v1.1 .0 to 6.40 December 2003.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16. v1.0 to 6.SAP Development 4.20 Delta Training BSP Advanced Topics Release 4.1 .

0 to 6.1 . Click on DO_INIT and click on Redefine 41 ABAP | Confidential | 16_BSP Advanced Topics v1.20 Delta Training BSP Advanced Topics Release 4.0 to 6.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.20 Delta Business Consulting Services Implementing MVC Bind the model class in the DO_INIT method.1 .41 December 2003.SAP Development 4. v1.

42 December 2003.20 Delta Training BSP Advanced Topics Release 4.20 Delta Business Consulting Services Implementing MVC Create an instance of the model class and call it’s methods to retrieve data 42 ABAP | Confidential | 16_BSP Advanced Topics v1.0 to 6.1 .1 .SAP Development 4.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.0 to 6. v1.

1 . • © Copyright IBM Corporation 2003 16. and call the views with CALL_VIEW method 43 ABAP | Confidential | 16_BSP Advanced Topics v1.SAP Development 4.ppt | 12/11/2003 © Copyright IBM Corporation 2003 • In this example.0 to 6. The purpose of this is to show how easy it is to generate different views of the data from the same centralized controller with only one access to the data at the backend through the model. set view attributes using the values returned in the DO_INIT method. CALL_VIEW is a method inherited from CL_BSP_CONTROLLER.0 to 6.20 Delta Business Consulting Services Implementing MVC In the DO_REQUEST method.43 December 2003.1 .20 Delta Training BSP Advanced Topics Release 4. two separate views are called in the same method. v1.

1 .0 to 6.20 Delta Business Consulting Services Implementing MVC Add the username attribute to the new view that will display it along with a slightly different view of the planeflights table 44 ABAP | Confidential | 16_BSP Advanced Topics v1.ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16. v1.20 Delta Training BSP Advanced Topics Release 4.1 .SAP Development 4.0 to 6.44 December 2003.

0 to 6.0 to 6.20 Delta Training BSP Advanced Topics Release 4.20 Delta Business Consulting Services Implementing MVC Add code to the new view layout to output the attribute value 45 ABAP | Confidential | 16_BSP Advanced Topics v1. v1.1 .SAP Development 4.45 December 2003.1 .ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.

20 Delta Training BSP Advanced Topics Release 4.0 to 6. v1.1 .1 .ppt | 12/11/2003 © Copyright IBM Corporation 2003 © Copyright IBM Corporation 2003 16.20 Delta Business Consulting Services Implementing MVC Execute the controller.46 December 2003. the data from the model class will now be displayed 46 ABAP | Confidential | 16_BSP Advanced Topics v1.0 to 6.SAP Development 4.

20 Delta Training BSP Advanced Topics Release 4. This allows views to be dynamically chosen and controlled from a central controller class Views are passive objects without events.ppt | 12/11/2003 © Copyright IBM Corporation 2003 • As an example. If MVC is used.1 . The same is true of ADDING a field. the developer would have to go into every page and modify the page to suppress that field. and a single view has to be changed to display the additional field.0 to 6.0 to 6.47 December 2003. • © Copyright IBM Corporation 2003 16. the utilization of MVC makes more sense 47 ABAP | Confidential | 16_BSP Advanced Topics v1.20 Delta Business Consulting Services MVC Conclusions MVC is more flexible than standard BSP approach in that it separates the view code from the request-handling code. imagine the following scenario: In the non MVC creation of a BSP application. v1. this forces the separation of application and display logic stored in a model Controllers themselves are callable and can be reused in other applications Controllers and views can cascade downward to other views and controllers allowing for a more component based design rather than a monolithic one Component approach leads easier manageability of the various aspects of the application As BSP applications get more complex. The model is changed in one place to pull in the additional data. a single view can be used on multiple pages to display the data.1 . Suppressing the field is then a simple matter of changing a single view.SAP Development 4. you might use many similar looking pages that contain identical views of data in multiple locations in your application. If a general decision is made to suppress a particular field across the application.

v1.48 December 2003. not XML.20 Delta Training BSP Advanced Topics Release 4. True False? ? ? © Copyright IBM Corporation 2003 48 ABAP | Confidential | 16_BSP Advanced Topics v1.ppt | 12/11/2003 © Copyright IBM Corporation 2003 16.1 .SAP Development 4.0 to 6.0 to 6.20 Delta Business Consulting Services R3E and SAP Web AS overviews Q1: BSPs output HTML.1 .

Sign up to vote on this title
UsefulNot useful