Professional Documents
Culture Documents
Contents
Introduction Mobile Client Application Development Business Object Layer Design Time Business Object Layer Runtime Authorizations Looking Ahead
The demand for mobile business solutions increased the number of mobile online and offline applications. EXAMPLE The mySAP CRM Mobile Sales Client, which was designed as a flexible complement to R/3, requires a laptop solution that meets the following criteria:
Thin Easy to maintain Easy to integrate into other PC tools and applications
Quick identification of most important information Overview and easy access to details Backward and Forward for fast navigation Hyperlinks to related information
User Interface Layer (UIL) This layer interprets data for the user.
Business Object Layer (BOL) This layer validates user input, business rules, and other standard operations such as Save, Delete, Revert, and so on. This layer provides data to the UIL.
BDoc Layer (BDL) This layer provides an abstraction over the underlying database and provides the required object oriented wrapper over relational data.
The Business Object Layer is the central place where Business Logic is stored and validation of user data against the Business Logic is performed.
UIL
The Business Object Layer has been designed in such a way that Business Logic could be written independently of the persistency layer (BDL).
BOL
The Business Object Layer has been designed to be independent of the presentation of the data (independent of the UIL). The Business Object Layer is generic enough to provide for Customization of the Business Objects to meet specific Business Requirements.
BDoc Layer
BDL
UDB
Facts
User Interface Layer Interaction Layer
UIL
COM/DCOM interface
BOL
BDoc Layer
BDL
UDB
Contents
Introduction
Mobile Client Application Development Business Object Layer Design Time Business Object Layer Runtime Authorizations Looking Ahead
Application Developer
R
1
Repository based application development
Development Environment
Designing the Mobile Client Application with the Mobile Application Studio
one tool integrates all development tasks rapid application development based on MCA metamodel stores metadata of application framework in a repository
Application Developer
R
Application Deployer
R
Development Environment
2a
Smart Client Application Generator
Smart Client
R
Runtime Components
SingleUser
2b
Generating the Runtime Components
automated template-based based on specific version of development objects in repository
Thin Client Application Generator
Thin Client
SingleUser
2c
add-on generator
Runtime Components
Other Systems
BDoc Layer
Generator
UDB
Mobile Application Repository HTML, VBA DLLs, Control Files, metafiles (arsrep.dat, msginfo.dat)
CDB
Contents
Business Object Layer Design Time Business Object Layer Runtime Authorizations Looking Ahead
owner 1
owner 1
* orders
1 owner 1 product
1 order
* addresses
0..1 default address Address Name Street House No. City Zip Code
items *
OrderItem Item No. Quantity Description Currency Net value * order items
Business Rule
Examples
SAP AG 2002, Business Object Layer, 18
Legend
Framework Collection Framework Object
Screen Elements
Business Objects
Modeling Components
Application Repository Interface
Business Objects
Business Queries Combo Engines Business Rules
Generator
Business Objects
Business Object
Represents a physical or logical entity in a business scenario,
standard methods, properties and event handlers. Generic BO is extended using VBA where new methods and properties can be added. Is characterized by :
Business
Object Type
Relations
Business
User
Rules
Exits
Can take simple values (for example, a string or number) Comprise the state of a business object during runtime
Default Address
Are operations that can be performed on a business object Define the behavior, business logic, of a business object Example: Configuration rules for a product Can be called from other business object methods or from the UI Are written in Visual Basic for Applications (VBA)
Order Items
Optional in relation
True: Business Partner
Contact Order
Relation[ship] type
Child: Order
Action if deleted
Cascaded: Order
Business Rules
You use Business Rules to implement constraints on a business objects state, in order to ensure business object model consistency. Examples
Ensure that a certain condition is true for a business object at any time, for example, the start date of an appointment must be before its end date. Prevent the deletion of a business object, for example, once an order has been uploaded to a backend system, it must not be deleted in Mobile Sales.
Business Rules:
Are assigned to a business object or business object property Are implemented as Boolean functions
Save rules (triggered when you save a business object) Delete rules (triggered when you delete a business object) Property rules (triggered when you change a business object property)
User Exits:
Are development objects that represent customer-defined code Are used to enhance the functionality of the existing code in accordance with the customer's requirement Have a name, signature, and VBA code Using SAP-defined user exits does not modify the existing application code (no collisions during upgrade)
Business Query
Business Query
Provides a mechanism for retrieving a set of Business Objects
Properties...
Characterize the business objects that result from the query to be executed Accepts simple values (for example, a string or number) Values are not stored in the database
the business object through index or its ID. The ID can be viewed as a unique key for that object. the contained objects.
List
definition required
Hierarchy
List Engine
Represents BDoc Layer record set
Contents
Introduction Mobile Client Application Development Business Object Layer Design Time
Other Systems
BDoc Layer
Synchronization
UDB
HTML, VBA DLLs, Control Files, metafiles (arsrep.dat, msginfo.dat)
CDB
Legend
Framework Collection Framework Object
BusinessRootObject
Gateway into the Business Object Layer Initializes the dependent services VBA, Application Repository, BDoc Layer Creates service components of the Business Object Layer Business Factory, UserDataDictionary, Error Storage Component, Business Object Manager
BusinessFactory
Creates the components exposed by the Business Object Layer
Business Object Business Collection Business Query Combo Engine List Engine
Step 3: Kernel Business Object asks VBA Host to create an instance of extended Business Object
MAR Runtime
R
Business Factory
VBA Host
R
Step 7: Kernel Business Objects pointer is returned as a return value to the CreateBusinessObject call
R R
Data Access Layer (BDoc Layer) Step 5: Kernel Business Object asks the Data Access Layer to fetch the record set corresponding to that instance of the BO
Step 6: Data Access Layer returns the record set corresponding to that instance of the BO
MAR Runtime
R
Business Factory
VBA Host
R R
Contents
Introduction Mobile Client Application Development Business Object Layer Design Time Business Object Layer Runtime
Basic Concepts
What is authorization?
What is a role?
The collection of activities that a person performs when participating in one or more business scenarios in an organization.
What is a user?
Users can include end users, system administrators, and content managers (that is, project teams and consultants). In the mobile scenario, the user is a business partner with the role Employee.
No coding is required; customizing is done via the Authorization Management Tool (AMT).
Authorization Levels
You can maintain authorizations at several levels:
Tile Set
Business Component
Tile
Tokens...
Define the authorization for a class of business objects regarding read, modify, delete, create new. Can be a collection of Authorization Rules which define the valid scope, that is, the authorization for a business object depending on its content, or the data it contains Are true if:
All assigned authorization rules are true (at runtime) OR No authorization rules have been assigned
Tokens
Authorization Rules
Authorization Rules:
Authorization Rules
Authorization Variables
Grant access rights based on the data contained in business objects Consist of:
Business object field Comparison type
UserDependent Data
Predefined Values
Business Object
(and Child Objects)
Set of Properties
A field group consists of a set of business object properties. You use field groups to set authorizations for fields. Field groups can be made dependent on authorization rules. In this case, the authorizations:
Depend on field values Are assigned to field group instances
Field Group
Authorization Rules
Architecture
design time
runtime
UI
ACM
R
AMT
BO Factory
BO Kernel
Auth tables
MAR
Mobile Application Repository
Token evaluation update rights (BO and Attribute rights) get rights (w/o changing BO state)
persistence
UDB
User Database
BDoc Layer
Contents
Introduction Mobile Client Application Development Business Object Layer Design Time Business Object Layer Runtime Authorizations
Looking Ahead
Appendix
A container for messages synchronized between Mobile Client Applications and the CRM Server
A BDoc message contains information about data changes and is replicated from the Mobile Client Application to the CRM Server, or vice versa The CRM Server can distribute the changes to:
Access to data is only through a BDoc type. Every time you make changes to data in the Mobile Client Application, the Mobile Client Application must generate a BDoc message and send it to the CRM Server.
BDoc Structure
For each BDoc, you must define a BDoc type.
A BDoc type defines how the data is organized. A BDoc message can be considered an instance of a BDoc type.
The data of more than one table. The data of a single table within a
BDoc is called a segment.
BDoc Types
Synchronization BDocs (sBDocs)
Used for the communication of the CRM Server with mobile clients When changes are stored in the user database, a BDoc message is produced. Changes are synchronized with the CRM Server as a whole (all or nothing) via a BDoc message Mapping of BDoc segments to CDB tables Designed to access single data records UDB Stored in the CDB Mobile Clients Communication Allows replication and realignment Station Previously called Write BDocs
UDB
Mobile Clients
To obtain exactly one data record, you must specify a filter for the primary key. This filter is set via a parameter name. Business object properties are mapped to segment fields.
Business Object
BDoc
Segment
Segment Field
BDoc Layer
Appendix
Data Binding
Screen Element
on UI Tile
UIL
Tile Set
Business Object
Business Object
BOL
Property
BDoc
Segment
Segment
Field
BDL
Database Table
DBL
Field
Application
Business Component
User Interface Layer Tile Set Tile
Screen Elements
Input Field List Box CheckIcon box
User Database
UDB
Seg. 1
BDoc
...
Seg. 2
Seg. n
Seg. Field
Properties
DB Table
BDoc Layer
BDoc Repository
(Part of CRM Server)
Business Objects