BSP
带你进入SAP BSP系列—实战部分(2)
开始我们的第一个BSP application, 当然, 还是从Hello World开始, 逐渐熟悉BSP的语法以及应用: 1. 进入SE80 2. 选择BSP application, 输入你的application名字 3. 创建一个BSP页面如下 4. OK, 你可以看到一段默认的代码如下: 1: <%@page language="abap"%> 2: <%@extension name="htmlb" prefix="htmlb"%> 3: <htmlb:content design="design2003"> 4: <htmlb:page title = "First BSP application with Hello World! "> 5: <htmlb:form> 6: ...带你进入SAP BSP系列—实战部分(1)
OK, 现在我们可以开始写些BSP的程序了,不过在此之前, 最好还是准备一些工具。 1. 开发工具: SE80 2. 网页制作工具: Dreamweaver 3. HTTP 嗅探器:HTTP Sinffer带你进入SAP BSP系列—理论部分(10)
MVC in BSP application 1. Properties View: Created as subobject of a BSP application, via controller call, it’s a HTML page or page with BSP extension Model: Created as a class, reference or derived from CL_BSP_MODEL Provide: a. The data used for views with relevant type and Dictionary information b. Input conversion c. Process input errors Controller: With the file extension .do, is a subclass of CL_BSP_CONTROLLER2 2. How-to call a view from cont...带你进入SAP BSP系列—理论部分(9)
BSP Extension 1. Main concept: Definition: BSP Extension: A collection of BSP element BSP Element: Like JSP user-defined tag for reusable purpose 2. Using BSP extension <%@extension name=”Your extension” prefix=”your prefix”%> 3. BSP extension sample for standard SAP provided Package: SBSPEXT_HTMLB 4. Three group for HTMLB: 1). First Group: Element convert to HTML source at runtime, prevent user from filling HTMLB Element Depend...带你进入SAP BSP系列—理论部分(8)
Layout and language 1. Including MIME in BSP application Definition: MIME for Multipurpose Internet Mail Extension Storage: MIME objects stored in database table SMIM* Steps: 1). Open you BSP application with SE80 2). In the context menu of your project, choose Create–>MIME objects–>Import 2. Adjusting the layout How to link CSS: <LINK REL=STYLESHEET HREF=”…/STYLE.CSS”> 3. Internationalization With ...带你进入SAP BSP系列—理论部分(7)
Stateful and Stateless BSP Applications 1. Stateful programming of a BSP application means that the application context is retained after the response and is available when you continue to work with the application. Advantage: Easy to program Disadvantage: Waste resources 2. Stateless programming of a BSP application means that a new application context is created for each new request. In addition when you work with the BSP application, the old context is no longer available. Advan...带你进入SAP BSP系列—理论部分(6)
Global Objects:带你进入SAP BSP系列—理论部分(5)
Processing user input: Statements: <Form>…….</Form> Field Type HTML Tag Note Input/Output type <input type=”text” name=”A” value=”B”> The field is filled with the value B. Password field <input type=”password” name=”A”> Checkbox <input type=”checkbox” name=”A” value=”X”> The name/value pair A=X is then sent with the HTTP request to the receiver, if the checkbox is ticked. Radio button <input type=”radio” name=”...带你进入SAP BSP系列—理论部分(4)
Layouts of a BSPs. BSP structure : Page types: –F: page with flow logic –V: View –P: page fragment BSP events: When the request coming, the process follow the below logic: 1. OnCreate: This event just execute once for stateful, otherwise once the BSP is called. 2. OnRequest: Executed each time when the BSP is called, and restore the internal data structure from the request. 3. OnInputProcessing: Used for process the user inputs an...带你进入SAP BSP系列—理论部分(3)
Components of a BSP program lists: 1. Business Server Pages: Define the Web pages that are displayed to the user. Each BSP contain two parts: static part which can use HTML or XML, dynamic part which can use ABAP or Javascripts. · Pages with flow logic: Including layout and attributes and also event handler which used to do the control work · Page fragments: Including layout, you can include this page in every common place for simple implementation, no URL...带你进入SAP BSP系列—理论部分(2)
Internet Server Cache: Purpose: Make response more faster Principle: Store HTTP objects in the server cache before they are sent to the client, and when the next request come-up, firstly check the cache whether the requested object is in cache, if yes, directly send it. ICF: Internet Communication Framework Purpose: Provides the environment for handling an HTTP request in a work process. Architecture: Process Flow: 1. HTTP request received by ICM 2. The reques...12