+ All Categories

CD101

Date post: 22-Oct-2014
Category:
Upload: shweta-tomar
View: 48 times
Download: 0 times
Share this document with a friend
Popular Tags:
55
CD101 BSP Crash Course
Transcript
Page 1: CD101

CD101 BSP Crash Course

Page 2: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Contributing Speaker

Jonathan Ziegler SAP Development Supervisor

TravelCenters of America Westlake, Ohio

Page 3: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Contributing Speaker –

Company Info

TravelCenters of AmericaA leading full-service travel center chainServing professional drivers and motorists alikeNearly 12,000 employees164 travel centers in 40 states and Canada$4.8 billion in annual revenuesGreat place to stop while traveling the interstateSAP I/S Oil users over 750, SAP I/S Retail users over 600 – some overlap and use both

Page 4: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Learning Objectives

As a result of this workshop, you will be able to:Understand the key components of a BSP applicationHighlight the key differences between BSP and “normal” ABAPCreate a simple application class and BSP applicationKnow where to go when learning BSP development

Page 5: CD101

Sample Application

Resources

What is a BSP Application?

BSP vs. ABAP

Page 6: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

What is a BSP Application?

A complete, functional application

Executed in a Web browser

Uses HTTP or HTTPS protocols

Similar to server pages technology

Consists of a user interface and business logic

Runs on SAP Web AS

Apps are developed in SE80

Uses services in SICF

Page 7: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Key Components of a BSP Application

Page 8: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Key Components of a BSP Application

ControllerControllers contain business logic and application data. Controllers assess the data of an incoming request based on a model and then select a suitable view for rendering the responseto the user, see also Model View Controller (MVC).

Business Server Pages (BSPs)BSPs are the Web sites that are displayed in the browser when the application is in use. BSPs can contain static HTML code and dynamic scripting code (ABAP or JavaScript). The scripting code is interpreted on the server.

Page 9: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Key Components of a BSP Application

Business Server Pages (BSPs) –

continued

A page can have the following versions:Page with flow logic

These are simple pages with event handlers, but without much application logic or visualization elements. It is possible to build a BSP application exclusively out of pages with flow logic and event handlers.

View–

Views are used to visualize data.

Page fragment–

These are created in the same way as normal BSPs, but are then marked as page fragments. Other BSPs can also include these fragments using the include

directive.

Page 10: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Key Components of a BSP Application

Navigation structuresThe navigation structure determines which navigation request is used to direct the navigation process from which page to which subsequent page.

Application classThe business logic of a BSP application is encapsulated in an application class. This class is realized by means of a global ABAP class which implements the access to business data using BAPI calls, for example. Every page of a BSP application can directly reference the components of this class (attributes, methods, and so on) using the predefined Object application. You can also assign several BSP applications to an application class.

Page 11: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Key Components of a BSP Application

MIME objectsIn the SAP system, all MIMEs, such as graphics, style sheets (used to define formatting properties of individual HTML tags), audio files, video files, and so on, are stored and administered in a central repository, the MIME repository. For every new BSP application, a directory of the same name is created in the MIME repository. This directory is used as a storage location for all application-specific MIMEs.

Page 12: CD101

Sample Application

Resources

What is a BSP Application?

BSP vs. ABAP

Page 13: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Differences between BSP and ABAP

HTML, CSS and JavaScriptAdditional knowledge outside of a “normal” ABAP development

Session ManagementNo longer running from the SAP GUI

Page Event HandlingNeed to learn what each event does and how it can be used

Page NavigationPassing parameters to the next page can be tricky

Extensive use of ABAP ObjectsReally can’t avoid them when using BSP technology

Page 14: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

How we used BSP

Mobile computing development

Runs through Internet Explorer on Symbol MC3090

Page 15: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

How we used BSP

Custom developments for SAP Retail StoreReports in PDF formatReprinting PO’s in PDF formatCreating and updating Suggested OrdersPrinting Shelf Labels using a MS Office mail merge

Page 16: CD101

Sample Application

Resources

What is a BSP Application?

BSP vs. ABAP

Page 17: CD101

Create BSP Application (SE80)

Sample Application

Create Application Class (SE24)

Page 18: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Create Application Class (SE24)

Page 19: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Define Class Type

Page 20: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Create Object Directory Entry for Class

Page 21: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Create Attributes

Page 22: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Create Method

Page 23: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Define Method Parameters

Page 24: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Define Method Code

Page 25: CD101

Create BSP Application (SE80)

Sample Application

Create Application Class (SE24)

Page 26: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Create BSP Application (SE80)

Page 27: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Create BSP Application

Page 28: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Create BSP Application

Page 29: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Create BSP Application

Page 30: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

BSP App Created

Page 31: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Create Page with Flow Logic

Page 32: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Create Page with Flow Logic

Page 33: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Default Page is Created

Page 34: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

<%@page language="abap"%><%@extension name="htmlb" prefix="htmlb"%><htmlb:content

design="design2003">

<htmlb:page

title = "My Default Page "><htmlb:form><htmlb:textView

text = "Hello World!"design = "EMPHASIZED" />

<htmlb:button

text = "Press Me"onClick

= "myClickHandler" />

</htmlb:form></htmlb:page>

</htmlb:content>

Default Code in Page

Page 35: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Specify Page Attributes

Page 36: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Specify Layout of the Page

Page 37: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

<%@page

language="abap"%> <%@extension

name="htmlb"

prefix="htmlb"%> <htmlb:content

design="design2003"> <htmlb:page

title

=

"My

Default

Page

"> <htmlb:form>

<htmlb:textView

text

=

"Enter

Article

Number" design

=

"EMPHASIZED"

/> <htmlb:inputField

id

=

"lv_matnr" value

=

"<%=lv_matnr%>"/> <htmlb:button

text

=

"Get

Article

Description" onClick

=

"btnGetArticleDescription"

/> <%

if

lv_maktx

is

not

initial.

%> <p>

<htmlb:textView

text

=

"Article

Description:"

design

=

"EMPHASIZED"

/>

<htmlb:textView

text

=

"<%=lv_maktx%>"

/>

<%

elseif

lv_matnr

is

not

initial.

%> <%--

No

description,

but

article

was

selected

--%>

<p> <htmlb:textView

text

=

"Article

not

found!"

/> <%

endif.

%> </htmlb:form> </htmlb:page>

</htmlb:content>

Modified Layout Code

Page 38: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Add Event Handler -

OnCreate

Page 39: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Add Event Handler -

OnInputProcessing

Page 40: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Modify BSP App Properties -

Initial BSP, App Class, Stateful

Page 41: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Activate BSP App

Page 42: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Test BSP App

Page 43: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

CD101_a.avi

Page 44: CD101

Sample Application

Resources

What is a BSP Application?

BSP vs. ABAP

Page 45: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Resources

HTML, CSS, and JavaScriptwww.w3schools.comJavaScript & DHTML Cookbook: Solutions and Examples for Web Programmers

By Danny Goodman

Page 46: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Resources

SAP BooksAdvanced BSP Programming by Brian McKellar and Thomas Jung Web Programming in ABAP with the SAP Web Application Server (2nd Edition) by Frédéric Heinemann and Christian Rau http://www.sap-press.com

Page 47: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Resources

SAP Sample Applications‘system’ BSP Application

Login, logoff, session handling

‘it00’ BSP Application–

Internal Test 00(basic functions, BSP runtime)

Stateless/Stateful

tests, MIME referencing, Server-side cookies example

‘sbspext_htmlb’ BSP Application–

Test Pages for HTMLB BSP Extension

Page 48: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Resources

BSP Application Overviewhttp://help.sap.com/saphelp_nw2004s/helpdata/en/5a/f8b53a364e0e5fe10000000a11405a/frameset.htm Handling Logoffs on a Stateful Applicationhttp://help.sap.com/saphelp_nw04/helpdata/en/6b/9d91d062cc52419f23926ff1bf2ad3/content.htm

SAP Developer’s Networkhttp://sdn.sap.com

Page 49: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Resources

The Spot 4 SAPhttp://www.thespot4sap.com/Articles/SAP_WAS_BSP_Apps.asp

Step by step example for creating a BSPhttp://www.sapdevelopment.co.uk/webapps/bsp/bsp_exam.htm

Page 50: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Summary

BSPs are a useful development tool for creating web-based solutions for SAP

BSP development requires different knowledge than typical ABAP development

There are many resources and sample applications available for getting started with BSPs

Page 51: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Further Information

SAP Public Web:SAP Developer

Network

(SDN): www.sdn.sap.com

Business Process

Expert

(BPX) Community: www.bpx.sap.com

Americas’

SAP Users’

Group (ASUG)www.asug.com

Related

SAP Education

and Certification

Opportunitieshttp://www.sap.com/education/

Page 52: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

ASUG and SAP: Partners in Education

ASUG, the Americas’

SAP Users’

Group, is the world’s largest,

customer-run community of SAP professionals

and partners, with 45,000 individual members and 1,800 companies represented. ASUG delivers the highest value to member companies, allowing them to

maximize their SAP investments.

Some highlighted benefits include:–

Access to a year-round

community for SAP customers and partners–

Diverse mix of educational topics and events through a variety of formats–

Exclusive opportunity to influence SAP future product direction–

Unparalleled networking opportunities with a dynamic professional network–

Unprecedented partnership with SAP–

Access to ASUG Groups and Chapters

To learn more about ASUG, visit the ASUG booth in the SDN Clubhouse, or visit our Web site at www.asug.com.

Page 53: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

THANK YOU FOR YOUR

ATTENTION !

QUESTIONS –

SUGGESTIONS –

DISCUSSION

Q & A

Page 54: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Please complete your session evaluation.

Be courteous —

deposit your trash, and do not take the handouts for the following session.

Feedback

Thank You !

Page 55: CD101

© SAP AG 2007, SAP TechEd ’07 / CD101

Copyright 2007 SAP AG. All Rights Reserved

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, System i, System i5, System p, System p5, System x, System z, System z9, z/OS, AFP, Intelligent

Miner, WebSphere, Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, POWER5+, OpenPower

and PowerPC are trademarks or registered trademarks of IBM Corporation.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin

are trademarks or registered trademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or registered trademarks

of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

Java is a registered trademark of Sun Microsystems, Inc.

JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.

MaxDB

is a trademark of MySQL

AB, Sweden.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned

are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior written permission of SAP AG.

This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended strategies, developments, and functionalities of the SAP®

product and is not intended to be binding upon SAP to any particular course of business, product strategy, and/or development. Please note that this document is subject to change and may be changed by SAP at any time without notice.

SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the

information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.

SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence.

The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that

you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages.


Recommended