You are on page 1of 34

Session ID: CD102 SAP Java World for ABAP Programmers

Contributing Speaker(s)
Ulrich Klingels
Product Management, SAP AG

SAP AG 2005, SAP TechEd 05 / CD102 / 2

Overview Programming Model SAPs Business Development Enhancements Summary

Overview Programming Model SAPs Business Development Enhancements Summary

Learning Objectives

As a result of this workshop, you will be able to:


Get a Java and J2EE Overview See similarities in the ABAP Paradigm Understand the Java Server Architecture See the enhanced features of the Java infrastructure compared to the standard Java environment

SAP AG 2005, SAP TechEd 05 / CD102 / 5

Each is Unique But Comparable


Boston Subway London Underground

SAP AG 2005, SAP TechEd 05 / CD102 / 6

SAP Web AS Server and Cluster Architecture Reuse know-how and coding from Web AS classic
Use a central DB as configuration and application store Use enqueue service as reliable lock handler Use message service as message hub Use SDM (Software Delivery Manager) to keep track of deployed software components J supportability
Java Java

Web AS Central Host Central Instance


ABAP

ICM Java Dispatcher Server Processes SDM


J2EE Central Services

ICM Dispatcher Server Processes Gateway Enqueue Service Message Service

Enqueue Service Message Service

Database Instance
ABAP Schema Java Schema

SAP AG 2005, SAP TechEd 05 / CD102 / 7

Java Language J2EE and ABAP


Java is an object-oriented programming language
Source code is compiled into byte-code Byte-code is interpreted by a Java Virtual Machine (JVM)

Java is platform independent J2EE (Java 2 Platform Enterprise Edition)


Platform which simplifies and accelerates developing, deploying and managing n-tiered business applications using Java technologies
Java Developer Studio Compiler Compiler Web Dynpro Java Dictionary . Java language Java VM JDK J2EE JDI
SAP AG 2005, SAP TechEd 05 / CD102 / 8

ABAP ABAP language Workbench (SE80) ( Web ) Dynpro ABAP Dictionary

ABAP VM ABAP Runtime ABAP Environment

Transport Organizer

J2EE Architecture Overview


Web container
Manages the execution of JSP page and servlet components for J2EE applications

EJB container
Manages the execution of enterprise beans for J2EE applications

J2EE Services
Foundation for implementation of multi-tier enterprise applications

Client

Servlets / JSPs
Web Container

EJBs
EJB Container

Database

JNDI

JDBC JMS .....

J2EE Services J2EE Server


SAP AG 2005, SAP TechEd 05 / CD102 / 9

Local Development
Developer Workplace
SAP NetWeaver Developer Studio Local Web AS Java
Local PC

Development process
Develop Java sources in projects Java Source stored on the local file system on your PC Deploy projects to the local Java Engine Test the projects local Deploy projects to the central test system
Save File System Deploy
Web Container EJB Container

Deploy to central test system

J2EE Services

Local Web AS Java


Source files Archive that contains binary files

SAP AG 2005, SAP TechEd 05 / CD102 / 10

SAP NetWeaver Developer Studio


Extensible and open IDE based on open source framework Eclipse Graphical and easy-to-use tools to design, develop, deploy and continuously change mission critical business applications in Java / J2EE Web Services Tools for connectivity based on open standards Web Dynpro Tools for modeldriven UI design Design Time Repository Client Java Dictionary for centralized data type and data structure management
SAP AG 2005, SAP TechEd 05 / CD102 / 11

J2EE

Web Services DTR Client

Web Dynpro Java Dictionary

Java

Integration Framework Eclipse Plugin Framework

Overview Programming Model SAPs Business Development Enhancements Summary

HTTP Servlet and JavaServer Pages (JSP)


Servlet is a Java class that
Handles HTTP communication Runs on a Web server Generates dynamic Web pages

Servlets can directly access resources like Enterprise JavaBeans components, JDBC data sources JSP Page is text file that hides HTTP complexity from programmer
HTTP Request

Servlet
generate

JSP
EJB Container

HTTP Response

Web Container Browser Java ~ ABAP


Servlet ~ HTTP handler (IF_HTTP_Extension) JSP ~ Layout of BSP page
SAP AG 2005, SAP TechEd 05 / CD102 / 13

Enterprise JavaBeans Definition


An Enterprise Bean is a server-side component that encapsulates the business logic of an application EJBs always execute within an EJB container, which provides system services to EJBs These services include transaction management, persistence, pooling, clustering and other infrastructure

EJB EJB EJB


EJB Container J2EE Server

EJB EJB EJB EJB

SAP AG 2005, SAP TechEd 05 / CD102 / 14

Types of Enterprise JavaBeans

Enterprise Java Bean

Session Bean

Entity Bean

Messagedriven Bean

Stateless Session Bean

Stateful Session Bean

Containermanaged persistence

Beanmanaged Persistence

Related to the user session Session bean is not persistent

Handles the persistence in a object-oriented manner Represent a business object

Message based Receive asynchronous JMS messages

SAP AG 2005, SAP TechEd 05 / CD102 / 15

Session Beans
A session EJB represents a single client inside the application server A client accesses the application by invoking the session bean's methods Shields the client from complexity by executing business tasks inside the server A session bean is not shared at a certain point of time: it may have just one client Session beans are divided into two basic types:

Client

Client

Client

Stateful SessionBean

Stateless SessionBean EJB Container J2EE Server Java ~ ABAP


Session bean ~ function group / ABAP class State ~ global memory of function group Session bean methods ~ function modules / ABAP method

Stateless Not dedicated to one client pooled amongst a number of clients. Be aware that instance is reused for clients (initialize attributes) Stateful Is created for a specific client and not used (reused) by any others

SAP AG 2005, SAP TechEd 05 / CD102 / 16

Entity Bean Persistence


Entity EJB represents a business object (e.g. customers, orders and products) Two types

Bean-Managed Beans (BMP) Container managed Beans (CMP)

Session Bean

The persistent storage mechanism is a relational database

Entity Bean

Typically, each entity bean has an underlying table in a relational database, and each instance of the bean corresponds to a row in that table

EJB Container J2EE Server

Entity beans differ from session beans in several ways


Database

Are persistent (dedicated load/store methods) Allow shared access Have primary keys May participate in relationships with other entity beans

SAP AG 2005, SAP TechEd 05 / CD102 / 17

Message-Driven Beans
MDBs were created to receive asynchronous JMS messages JMS supports Publish-andSubscribe (Topic) and Point-ToPoint (Queue) The container handles much of the setup required for JMS queues and topics The container sends all messages to the interested MDB MDB are statless No interfaces (Home/Component) Can consume and process messages concurrently
Java ~ ABAP
EJB Asynchronous (queue) ~ Call Function in update task

Queue Sender B Queue Sender A


Queue

Topic Publisher A JMS


Topic

MDB C MDB C EJB Container J2EE Server

MDB A

MDB B

ejbejb-j2eej2ee-engine.xml

Bean configuration
provider.xml

SAP AG 2005, SAP TechEd 05 / CD102 / 18

A Deployment Descriptor is a File that .


Defines EJB structural information, such as
EJB name, class, home and remote interfaces Bean type (session or entity)

Defines application assembly information, such as


Container transaction attributes Method permissions Security roles Project
ejbejb-jar.xml

SessionBean EntityBean

<enterprise-beans> <session> <ejb-name>CustomerServicesBean</ejb-name> <home>com.sap.fi.ejb.CustomerHome</home> ...... <ejb-class>com.sap.fi.ejb.CustomerBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Container</transaction-type> ...... </session> <entity> <ejb-name>CustomerEntityBean</ejb-name> <persistence-type>Container</persistence-type> ....... </entity> </enterprise-beans>

Purpose customizing the program


SAP AG 2005, SAP TechEd 05 / CD102 / 19

Deployment Descriptors

Java ~ ABAP
Deployment descriptor ~ program attributes

Project Types
Table
MyDictionaryProject MyDatabaseTable SDA

Deploy

MyWebDynproProject MyWDApplication EAR

Deploy

MyEJBModuleProject MyEntityBean
Deployment Descriptors

MySessionBean HelperClass

EJBJAR
Deployment Descriptors

MyEnterpriseApplProject

Deploy
EAR

MyDataSourceAlias MyJSP MyServlet


Deployment Descriptors

MyWebModuleProject

Web

WAR

SAP AG 2005, SAP TechEd 05 / CD102 / 20

SAP Web Application Server

EJB

Web Dynpro

Overview Programming Model SAPs Business Development Enhancements Summary

SAP provides more than J2EE!


To adopt J2EE for large business applications, SAP
extended the programming model integrated existing non-J2EE open standards provides a highly productive development infrastructure

Presentation Layer

Business Application

Web Dynpro Servlet


Business Layer

Integration Layer

Java Dictionary

JSP

Web Services

EJB

Persistence

Software Life Cycle


SQLJ Open SQL

JDBC

SAP AG 2005, SAP TechEd 05 / CD102 / 22

Web Dynpro for Java (=ABAP) Professional Browser-based User Interface


Model-driven user interface development
Higher abstraction level that server page approaches (JSP, BSP) Frontend / backend separation is straightforward Few coding, lots of design
Graphical

tools for building UIs based on the common meta-model

Mix & match static (declarative) and dynamic (programmatic) parts

Central implementation of user interface standards


Reuse of common structures Support for pattern-based UI development 508 Accessibility Adobe Forms integration Standardized client technology
Browser, Web Dynpro Java ~ Web Dynpro ABAP

Mobile devices, Smart clients, ...

SAP AG 2005, SAP TechEd 05 / CD102 / 23

Web Services based on Open Standards


Web Service Consumer

UDDI UDDI Registry


WSDL

Web Service Provider

WS Client

Development Environment

SOAP

SOAP

Web Service Runtime Web service Proxy


Java Class

Virtual Interface

EJB

XI Server Proxy

BAPI

IDOC

RFC

Web service Client Application

Standard Interfaces Business Application

SAP Web Application Server

SAP AG 2005, SAP TechEd 05 / CD102 / 24

Java Dictionary (JDIC) A Light Weight Data (ABAP) Dictionary


Create elementary types, structures, and database tables Supported
DB index Table buffer Global namespace (Name Server) Data types

Not supported
Foreign keys Same data types as ABAP No Domain concept No transport of content

Benefits
Enables database independency SQLJ is based on JDIC Included in Web Dynpro Open SQL features

Java ~ ABAP
Java Dictionary ~ Data Dictionary

SAP AG 2005, SAP TechEd 05 / CD102 / 25

Open SQL for Java Large-Scale Persistency Framework


Database independency
Open SQL
Relational Persistence (SQL) Open SQL / SQLJ Open SQL / JDBC Object Relational Persistence EJB (CMP) JDO

Development support
Syntax check during implantation

Open SQL Engine


Open SQL Engine Table Catalog ^ Table Buffer

Performance enhancements
Server side Table Buffer SQL Statement Cache SQL Trace
Vendor A JDBC Java ~ ABAP
Open SQL for Java ~ Open SQL for ABAP
SAP AG 2005, SAP TechEd 05 / CD102 / 26

Statement Cache SQL Trace Native SQL / JDBC

...

Vendor B JDBC Database B

Database A

Overview: Java Development Infrastructure (JDI)


< Local Installation on Developers PC > SAP NetWeaver Developer Studio <--------------- Central Infrastructure ------------------>

Change Management Service (CMS)

Component Build Service (CBS)

Component Model

Design Time Repository (DTR)

Run Time Deploy Java Systems

Name Server Local File System Local J2EE Engine

JDI ~ Java ~ ABAP Transport Organizer


SAP AG 2005, SAP TechEd 05 / CD102 / 27

System Landscape Directory (SLD)

ABAP and Java together


Presentation Layer Java ABAP

Web Dynpro

Web Dynpro

recommended Connectivity between ABAP and Java NOT recommended Connectivity between ABAP and Java Web Service consumer

Business Layer

EJB

FM / BAPI

JCo
Persistence

Open SQL

Open SQL

Web Service provider Any Web Service consumer can use any Web Service provider

Database Instance
ABAP Schema Java Schema

SAP AG 2005, SAP TechEd 05 / CD102 / 28

Overview Programming Model SAPs Business Development Enhancements Summary

Summary
The Web AS is one platform supporting two technology

stacks
In addition to J2EE SAP provides tools and technologies

developing for professional business applications based on Java


SAP provide a sophisticated Java infrastructure for

development and deployment


ABAP and Java resides together ABAP or Java it is your decision

SAP AG 2005, SAP TechEd 05 / CD102 / 30

Further Information

Public Web
www.sap.com NetWeaver Developers Guide: www.sdn.sap.com/sdn/developersguide.sdn SAP Developer Network: www.sdn.sap.com Web Application Server SAP Customer Services Network: www.sap.com/services/ http://java.sun.com/docs/overviews/java/java-overview-1.html http://java.sun.com/j2ee/tutorial/

Related SAP Education Training Opportunities


http://www.sap.com/education/

SAP AG 2005, SAP TechEd 05 / CD102 / 31

Questions?

Q&A
SAP AG 2005, SAP TechEd 05 / CD102 / 32

Feedback
Please complete your session evaluation. Be courteous deposit your trash, and do not take the handouts for the following session.

Thank You !

SAP AG 2005, SAP TechEd 05 / CD102 / 33

Copyright 2005 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, 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, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation. 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.

SAP AG 2005, SAP TechEd 05 / CD102 / 34

You might also like