sap java world for abap programmers
TRANSCRIPT
-
7/28/2019 SAP Java World for ABAP Programmers
1/34
Session ID: CD102SAP Java World for
ABAP Programmers
-
7/28/2019 SAP Java World for ABAP Programmers
2/34
SAP AG 2005, SAP TechEd 05 / CD102 / 2
Contributing Speaker(s)
Ulrich KlingelsProduct Management, SAP AG
-
7/28/2019 SAP Java World for ABAP Programmers
3/34
SAPs Business Development Enhancements
Summary
Overview
Programming Model
-
7/28/2019 SAP Java World for ABAP Programmers
4/34
SAPs Business Development Enhancements
Summary
Overview
Programming Model
-
7/28/2019 SAP Java World for ABAP Programmers
5/34 SAP AG 2005, SAP TechEd 05 / CD102 / 5
Learning Objectives
As a result of this workshop, you willbe 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
-
7/28/2019 SAP Java World for ABAP Programmers
6/34 SAP AG 2005, SAP TechEd 05 / CD102 / 6
Each is Unique But Comparable
Boston Subway London Underground
-
7/28/2019 SAP Java World for ABAP Programmers
7/34
-
7/28/2019 SAP Java World for ABAP Programmers
8/34 SAP AG 2005, SAP TechEd 05 / CD102 / 8
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 andmanaging n-tiered business applications using Java technologies
Java
language
Java
VMCom
piler ABAP
language
ABAP
VMCom
piler
JDK
J2EE
ABAP Runtime
Workbench (SE80)Developer Studio
Web Dynpro
ABAP
Environment
ABAPJava
Java Dictionary
JDI
.
( Web ) Dynpro
ABAP Dictionary
Transport Organizer
.
-
7/28/2019 SAP Java World for ABAP Programmers
9/34 SAP AG 2005, SAP TechEd 05 / CD102 / 9
J2EE Architecture Overview
Web container
Manages the execution of JSP page and servlet components forJ2EE applications
EJB container
Manages the execution of enterprise beans for J2EE applications
J2EE Services
Foundation for implementation of multi-tier enterprise applications
J2EE Server
EJB Container
Client
Web Container
Database
J2EE
Services
JNDI JDBC
JMS .....
Servlets / JSPs EJBs
-
7/28/2019 SAP Java World for ABAP Programmers
10/34 SAP AG 2005, SAP TechEd 05 / CD102 / 10
Local Development
File
System
Deploy
EJB
Container
Web
Container
Local Web AS Java
Save
J2EE Services
Deploy tocentral test
system
Local PC
Source files
Archive that contains binary f iles
Developer Workplace
SAP NetWeaver DeveloperStudio
Local Web AS Java
Development process
Develop Java sourcesin projects
Java Source stored onthe local file systemon your PC
Deploy projects to thelocal Java Engine
Test the projects local
Deploy projects to thecentral test system
-
7/28/2019 SAP Java World for ABAP Programmers
11/34
SAP AG 2005, SAP TechEd 05 / CD102 / 11
SAP NetWeaver Developer Studio
Extensible and open IDE basedon open source frameworkEclipse
Graphical and easy-to-use tools
to design, develop, deploy andcontinuously change missioncritical business applicationsin Java / J2EE
Web Services Tools forconnectivity based on openstandards
Web Dynpro Tools for model-
driven UI design
Design Time Repository Client
Java Dictionary for centralized
data type and data structuremanagement
Eclipse Plugin Framework
Java
Web
Services
Web
Dynpro
DTR
Client
J2EE
JavaDictionary
Integration Framework
-
7/28/2019 SAP Java World for ABAP Programmers
12/34
SAPs Business Development Enhancements
Summary
Overview
Programming Model
HTTP S l t d J S P (JSP)
-
7/28/2019 SAP Java World for ABAP Programmers
13/34
SAP AG 2005, SAP TechEd 05 / CD102 / 13
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 RequestServlet
generateJSP
HTTP Response
Web Container EJB Container
Browser
Servlet ~ HTTP handler (IF_HTTP_Extension)
Java ~ ABAP
JSP ~ Layout of BSP page
E t i J B D fi iti
-
7/28/2019 SAP Java World for ABAP Programmers
14/34
SAP AG 2005, SAP TechEd 05 / CD102 / 14
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
J2EE Server
EJB Container
EJB
EJB
EJB
EJB
EJB
EJBEJB
T f E t i J B
-
7/28/2019 SAP Java World for ABAP Programmers
15/34
SAP AG 2005, SAP TechEd 05 / CD102 / 15
Types of Enterprise JavaBeans
EnterpriseJava Bean
Message-driven Bean
Session Bean Entity Bean
Stateless
Session BeanStateful
Session Bean
Container-
managedpersistence
Bean-
managedPersistence
Related to the usersession
Session bean is not
persistent
Handles the persistencein a object-oriented
manner
Represent a business
object
Message based
Receive
asynchronous
JMS messages
Session Beans
-
7/28/2019 SAP Java World for ABAP Programmers
16/34
SAP AG 2005, SAP TechEd 05 / CD102 / 16
Session Beans
A session EJB represents a single
client inside the application server
A client accesses the application byinvoking the session bean's methods
Shields the client from complexity byexecuting business tasks inside theserver
A session bean is not shared at acertain point of t ime: it may have just
one client
Session beans are divided into twobasic types:
Stateless
Not dedicated to one client pooledamongst a number of clients. Be awarethat instance is reused for clients(initialize attributes)
Stateful
Is created for a specif ic cl ient and notused (reused) by any others
J2EE Server
EJB Container
Client
Session bean ~ function group / ABAP class
State ~ global memory of funct ion group
Session bean methods ~ function modules/ ABAP method
Java ~ ABAP
Client Client
Stateful
SessionBean
StatelessSessionBean
Entity Bean Persistence
-
7/28/2019 SAP Java World for ABAP Programmers
17/34
SAP AG 2005, SAP TechEd 05 / CD102 / 17
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)
The persistent storage mechanism isa relational database
Typically, each enti ty bean has an underlyingtable in a relational database, and each instanceof the bean corresponds to a row in that table
Entity beans differ from session beansin several ways
Are persistent (dedicated load/store methods)
Allow shared access
Have primary keys
May participate in relationships with other entity beans
J2EE Server
EJBContainer
Session Bean
Entity Bean
Database
Message Driven Beans
-
7/28/2019 SAP Java World for ABAP Programmers
18/34
SAP AG 2005, SAP TechEd 05 / CD102 / 18
J2EE Server
EJB
Container
Message-Driven Beans
MDBs were created to receive
asynchronous JMS messages
JMS supports Publish-and-
Subscribe (Topic) and Point-To-
Point (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
JMSQueue Topic
Queue
Sender BQueue
Sender A
Topic
Publisher A
MDB
B
MDB
A
MDB
C
MDBC
No interfaces (Home/Component)
Can consume and process
messages concurrently
ejbejb --j2eej2ee--engine.xmlengine.xml
Bean
configuration
provider.xmlprovider.xml
EJB Asynchronous (queue) ~
Call Function in update task
Java ~ ABAP
A Deployment Descriptor is a File that
-
7/28/2019 SAP Java World for ABAP Programmers
19/34
SAP AG 2005, SAP TechEd 05 / CD102 / 19
A Deployment Descriptor is a File that .
Project
Deployment
Descriptors
EntityBean
SessionBean
CustomerServicesBean
com.sap.fi.ejb.CustomerHome
......
com.sap.fi.ejb.CustomerBean
Stateless
Container
......
CustomerEntityBean
Container
.......
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
Purpose
customizing the program
ejbejb--jar.xmljar.xml
Deployment descriptor ~ program attributes
Java ~ ABAP
Project Types
-
7/28/2019 SAP Java World for ABAP Programmers
20/34
SAP AG 2005, SAP TechEd 05 / CD102 / 20
Project Types
SA
PWebAp
plicationS
erver
MyWebModuleProject
Web
MyEJBModuleProject
EJB
EAREAR
MyDictionaryProject
Table
SDA
WAR
Deploy
MySessionBean
MyEntityBean
HelperClassDeployment
Descriptors
MyJSP
MyServletDeployment
Descriptors
EJB-
JAR
MyEnterpriseApplProject
MyDataSourceAliasDeployment
Desc
riptors
SDA
Deploy
MyDatabaseTableMyDatabaseTable
MyWebDynproProject
WebD
ynpro
Deploy
MyWDApplicationMyWDApplication
WAR
EJB-
JAR
EAREAR
-
7/28/2019 SAP Java World for ABAP Programmers
21/34
SAPs Business Development Enhancements
Summary
Overview
Programming Model
SAP provides more than J2EE!
-
7/28/2019 SAP Java World for ABAP Programmers
22/34
SAP AG 2005, SAP TechEd 05 / CD102 / 22
SAP provides more than J2EE!
Software
Life Cycle
Java
Dictionary
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 Layer
Busine
ssApplicatio
n
Integration
Layer
Servlet JSP
EJB
Persistence
JDBC Open SQL
Web Dynpro
Web
Services
SQLJ
Web Dynpro for Java (=ABAP)P f i l B b d U I t f
-
7/28/2019 SAP Java World for ABAP Programmers
23/34
SAP AG 2005, SAP TechEd 05 / CD102 / 23
Model-driven user interface development
Higher abstraction level that server pageapproaches (JSP, BSP)
Frontend / backend separationis straightforward
Few coding, lots of design
Graphical tools for building UIs basedon 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 cl ient technologyBrowser, Mobile devices, Smart clients, ...
Professional Browser-based User Interface
Web Dynpro Java ~ Web Dynpro ABAP
Web Services based on Open Standards
-
7/28/2019 SAP Java World for ABAP Programmers
24/34
SAP AG 2005, SAP TechEd 05 / CD102 / 24
eb Se ces based o Ope Sta da ds
StandardInterfaces
Virtual Interface
BusinessApplication
IDOC
BAPI
RFC
EJB
JavaClass
XIServer
Proxy
SAP Web Application Server
UDDIUDDI
Registry
WS
Client WSDL
SOAP
Development Environment
Web Service Consumer
Web serviceProxy
Web service ClientApplication
Web Service Runtime
Web Service Provider
SOAP
Java Dictionary (JDIC) A Light Weight Data (ABAP) Dictionary
-
7/28/2019 SAP Java World for ABAP Programmers
25/34
SAP AG 2005, SAP TechEd 05 / CD102 / 25
A Light Weight Data (ABAP) Dictionary
Create elementary types, structures, and database tables
Supported
DB index
Table buffer
Global namespace (Name Server)
Data types
Benefits
Enables database independency
SQLJ is based on JDIC
Included in Web Dynpro
Open SQL features
Not supported
Foreign keys
Same data types as ABAP
No Domain concept
No transport of content
Java Dictionary ~ Data Dictionary
Java ~ ABAP
Open SQL for JavaLarge Scale Persistency Framework
-
7/28/2019 SAP Java World for ABAP Programmers
26/34
SAP AG 2005, SAP TechEd 05 / CD102 / 26
Large-Scale Persistency Framework
Open SQL Engine
^
Open SQL / JDBC
Open SQL / SQLJ
JDO
EJB (CMP)
SQL Trace
Statement Cache
Table Buffer
Table Catalog
Native SQL
/ JDBC
Vendor A JDBC Vendor B JDBC. . .
Relational Persistence (SQL) Object Relational PersistenceDatabase
independency
Open SQL
Development support
Syntax check during
implantation
Performance
enhancements
Server side Table Buffer
SQL Statement Cache
SQL Trace
Open SQL Engine
Java ~ ABAP
Open SQL for Java
~ Open SQL for ABAP Database BDatabase A
Overview: Java Development Infrastructure (JDI)
-
7/28/2019 SAP Java World for ABAP Programmers
27/34
SAP AG 2005, SAP TechEd 05 / CD102 / 27
p ( )
< Local Installation on Developers PC >
SAP NetWeaver Developer Studio
Run
Time
JavaSystems
Deploy
Local File
System
Component
Model
Local J2EE
Engine
Component
Build Service
(CBS)
Design TimeRepository
(DTR)
Name ServerCh
angeManagementServic
e
(CM
S)
System LandscapeDirectory (SLD)Java ~ ABAP
JDI ~
Transport Organizer
ABAP and Java together
-
7/28/2019 SAP Java World for ABAP Programmers
28/34
SAP AG 2005, SAP TechEd 05 / CD102 / 28
Presentation Layer
Database Instance
Java Schema
ABAP Schema
EJB
Open
SQL
Web
Dynpro
Business Layer
Persistence
FM /
BAPI
Open
SQL
Web
Dynpro
JCo
ABAPJava recommendedConnectivity between
ABAP and Java
NOT recommendedConnectivity between
ABAP and Java
Web Service
consumer
Web Service
provider
Any Web Service
consumer can use
any Web Service
provider
-
7/28/2019 SAP Java World for ABAP Programmers
29/34
SAPs Business Development Enhancements
Summary
Overview
Programming Model
Summary
-
7/28/2019 SAP Java World for ABAP Programmers
30/34
SAP AG 2005, SAP TechEd 05 / CD102 / 30
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
Further Information
-
7/28/2019 SAP Java World for ABAP Programmers
31/34
SAP AG 2005, SAP TechEd 05 / CD102 / 31
Public Webwww.sap.com
NetWeaver Developers Guide: www.sdn.sap.com/sdn/developersguide.sdn
SAP Developer Network: www.sdn.sap.comWeb 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 Opportunitieshttp://www.sap.com/education/
Questions?
-
7/28/2019 SAP Java World for ABAP Programmers
32/34
SAP AG 2005, SAP TechEd 05 / CD102 / 32
Q&A
-
7/28/2019 SAP Java World for ABAP Programmers
33/34
-
7/28/2019 SAP Java World for ABAP Programmers
34/34