Beruflich Dokumente
Kultur Dokumente
SAP AG 2007, SAP Skills Knowledge The Fast Track to SAP 2007 Conference / F4 / 2
SAP AG 2007, SAP Skills Knowledge The Fast Track to SAP 2007 Conference / F4 / 3
Model
View
Business Layer
Business Object Layer (BOL) Generic Interaction Layer (GenIL) Appl. Progr. Interfaces (APIs) Tables
Business Engine
(e.g. mySAP CRM)
Model
View
Business Layer
Business Object Layer (BOL) Generic Interaction Layer (GenIL) Appl. Progr. Interfaces (APIs) Tables
Business Engine
(e.g. mySAP CRM)
Logical Link
Main Component M
Technical ID = (Target-ID)
Display
IP IP IP
Sub component Search Window
Search
IP
OP
Window
UI Component is the logical grouping for UI implementation is assigned to a package SAP Naming conventions
Oneorder
- BT<object><type>_<speaking string> where <type> is S, H, I or M
Other components ( e.g. Business Partner, Marketing) have own naming conventions GS<speaking string> = General Services ( Reusable Components) BT<speaking string> = reusable components for Transactions
Controller:
Class
Model:
Context & Context Nodes
View: Layout
Context
Context Nodes
Attributes (Fields)
* Each UI Component has its own Runtime Repository. There is no longer one central repository.
The runtime repository editor is not only a visualization tool for the xml file, but offers a set of functionality as wizards to create e.g. navigational links.
Component Workbench (III) BOL Model Browser Access BOL Model from Component Workbench
Model
View
Business Layer
Business Object Layer (BOL) Generic Interaction Layer (GenIL) Appl. Progr. Interfaces (APIs) Tables
Business Engine
(e.g. mySAP CRM)
GenIL
IMG: Generic Interaction Layer/Object Layer Basic Settings
Business Engine
API
API
API
Layers of Business API underlying Engine Business (e.g. mySAP CRM) Application Tables
SAP AG 2007, SAP Skills 2007 Conference / F4 / 15
Definitions 1
Business Object (BO): Smallest unit of an object model with exclusively unstructured attributes. Each BO is assigned a unique name. A BO can be either an access object, a dependent object or a query object. BO instance: Instance of a BO that is uniquely identified by the name of the BO and an identifier (ID). Relation: A relationship between two BOs that is assigned a unique, crosscomponent name. The relation is assigned a cardinality value for each BO. The navigation direction is a characteristic of the relation. Object model: Number of BOs and their relations.
Definitions 2
Access Object:
An access object is a special type of BO, whose ID can be used to determine both the attributes of the access object itself and those of its dependent objects.
Dependent Object:
A dependent object is a special type of BO, whose attributes cannot be determined solely from the ID of this BO, but instead, only or together with the ID of the superior access object.
Root object:
A root object is a special element within a group of objects that are linked to one another in a hierarchy structure via aggregations. The root object is the only object within this structure that is assigned as a superior object to all other objects. Each root object is also an access object.
Search-Object:
A query object is a special type of BO whose attributes are the parameters of a search request.
A dynamic query object is a type of BO whose attributes are the parameters of a search request. It is possible to create select options for these parameters. The result object of a search request is an associated access object at the uppermost level of the hierarchy.
SAP AG 2007, SAP Skills 2007 Conference / F4 / 18
Definitions 3 Component: A component is an ABAP OO class which implements the component interface. It exposes a set of CRM business objects to the Generic IL, which form an aggregation hierarchy. Each component must have a unique root object. Component Set A component set is a collection of components that build a business context for a specific application that uses the business layer as its framework.
SAP AG 2007, SAP Skills Knowledge The Fast Track to SAP 2007 Conference / F4 / 21
Transaction service
objects may be saved individually or all together all changed/created object will be saved or reverted
Query services
New Query service for dynamic searches with CRM 2006
BOL Transaction Model The transactional behavior of BOL objects is modeled in the transaction context. A transaction context is created:
when an entity is locked, or if it is requested, but not yet existing.
Each transaction context has a defined life cycle. Once it was created it ends with either
Saving all covered entities, or Reverting all covered entities
BOL Transaction Model 2 Data is always saved synchronously. Either within the dialog process (local update), or, if this is not possible, with COMMIT WORK and WAIT After saving the BOL buffer is invalidated and refreshed on the next access After reverting data the BOL buffer is actively refreshed
CL_CRM_BOL_CORE
1
CL_CRM_GENIL_MESS_CONT_MANAGER
1 *
IF_GENIL_MESSAGE_CONTAINER
Architectural Overview
Browser Client
R
BOL
R
Cache
R
Application Model
Generic IL
Data Contai ner
R
R
R
Order API
IBAse API
Other API
Entities
Query Services
Core
Cache
API 1
API 2
API ...
API n
Database(s)
SAP AG 2007, SAP Skills Knowledge The Fast Track to SAP 2007 Conference / F4 / 29
view
view
SAP AG 2007, SAP Skills Knowledge The Fast Track to SAP 2007 Conference / F4 / 31
. mediates between the embedding and the embedded component during runtime
has the character of a view to the inside (window aspect) has the character of a simple view to the outside (interface view aspect)
Runtime Repository
Each component has its own runtime repository file
It acts a a catalogue containing views, viewsets and the composition of views within viewsets Navigational links (with target and source view) Inbound and outbound plugs definitions etc. Technically stored as .xml file
Can be displayed and maintained in the Runtime repository editor of the Component workbench
Request
Controller Class
Methods:
Before Output
* .DO _IMPL
Model
Context Context Nodes
*_ CTXT
Method CREATE_CONTEXT_NODES
View
data output
*. HTM
*_CN00 *_CN01
Layout:
ABAP/HTMLB-code
Method GET_S_STRUCT
Address Field Structure
Response
BOL
DB Tables
SAP AG 2007, SAP Skills 2007 Conference / F4 / 36
Component Workbench: Context Nodes, Attributes (II) Generic Setter Getter methods
Navigation Flow
Method: DO_HANDLE_EVENT
method DO_HANDLE_EVENT . [] WHEN 'new'. CALL METHOD eh_onNew. method EH_ONDONE. * navigate op_detailsov( ). [] method OP_DETAILSOV view_manager->navigate( SOURCE_REP_VIEW = rep_view OUTBOUND_PLUG = ToDetailsOV' ). []
[]
Button back
Method: EH_ONDONE
Target View
DetailsOV
. . . .
SAP AG 2007, SAP Skills 2007 Conference / F4 / 39
method FROMDETAILSEF
Database
SAP AG 2007, SAP Skills Knowledge The Fast Track to SAP 2007 Conference / F4 / 42
Inside perspective
A component is represented by a component controller
has a context that is partially public to the outside
A component consists of custom controllers and one or more windows that host the views
Outside perspective
A component can be (re-)used by one or more other components The embedding component defines a component usage in its runtime repository to formally declare the dependency Also at runtime the component has access to the component usage to get access to the Interface of the embedded component Each component usage gets its own component instance at runtime
Component Controller
highest level of all controllers is loaded at initial load of component can serve as data container manages binding of usages manages data transfer between components Binding of Context Node from custom controller to component controller
Component Usage(1)
Components with a component interface can be included in other components (reuse) usages are defined in the runtime repository editor
Component Usage(2)
Component controllers need to be bound against each other this is done in method WD_USAGE_INITIALIZE of the component controller class
SAP AG 2007, SAP Skills Knowledge The Fast Track to SAP 2007 Conference / F4 / 50
Navigation Bar
(as part of L-Shape)
Scenario I)
Navigation from Navigation Bar Button to a Component
(Button = Work Center)
NavBar
Component:
e.g. Service Ticket
Service ticket
Component:
e.g. Service Ticket Link/Button
NavBar
Component:
e.g. Product Details
NavBar (Profile)
0. 3.
WorkCenter
1.
Logical Link
2.
Target ID
CRMC_UI_NBLINKS
Client dependant Define NavBar Profile: Profile: DEFAULT_IC 0.
CRMC_UI_NBLINKS
Client dependant Define Logical Links LogLink ID: IC_BT_SVT Type: Work Center Target ID: IC_BT_SVT
CRMC_UI_WA_COMP_REP
Cross client Component Definition: Component Name ICCMP_BT_SVT Window Name Main 3. Inbound Plug Definition: Target ID: IC_BT_SVT IP: DEFAULT Object Type: IC_BT_SVT Object Action: Display
2.
Define Work Center Work Center: IC_BT_SVT LogicalLink ID: IC_BT_SVT Title: Service Ticket SAP AG 2007, SAP Skills 2007 Conference / F4 / 52
1.
II) Cross Component Navigation (Object Type Determined by Outbound (OP) Plug Definition)
Component A Main Window
Displ. Product 1.
NavBar
(Profile)
OP1 OP2
2.
3.
4.
2. 1. Hard coded
CRMS_UI_TLINK
Cross client Component Definition: Component Name ICCMP_BT_SVT Window Name Main Outbound Plug Definition: Source ID: OP_SVT_PRO OP: PRODUCT Object Type: IC_PRODUCT 2. Object Action: Display
CRMC_UI_NBLINKS
Client dependent Define NavBar Profile: Profile: DEFAULT_IC Define Generic OP Mapping: Object Type: IC_PRODUCT ObjAction: Display 3. Target ID: IP_PRODUCT
CRMS_UI_TLINK
Cross client Component Definition: Component Name ICCMP_PRODUCT Window Name Main Inbound Plug Definition: Target ID: IP_PRODUCT IP: DEFAULT Object Type: IC_PRODUCT Object Action: Display
4.
NavBar
(Profile) 3. 4.
OP_DEFAULT
Target ID Target ID
1.
Target ID
CRMC_UI_NBLINKS
Cross client Define NavBar Profile: Profile: DEFAULT_IC
CRMS_UI_TLINK
Cross client Component Definition: Component Name ICCMP_PRODUCT Window Name Main Inbound Plug Definition: Target ID: IP_PRODUCT IP: DEFAULT Object Type: IC_PRODUCT Object Action: Display
2.
Define Generic OP Mapping: Object Type: IC_PRODUCT ObjAction: Display Target ID: IP_PRODUCT
4.
3.
CL_CRM_UIU_BT_NAVIGATE=>prepare_col_for_navigate.
SAP AG 2007, SAP Skills 2007 Conference / F4 / 56
SAP AG 2007, SAP Skills Knowledge The Fast Track to SAP 2007 Conference / F4 / 58
a ied p Co
nd
d ifie d mo
w Vie
r nda Sta
w Vie d
Views from an existing component can be copied into a customer component The copy can be modified (new context nodes, new buttons, navigation etc.) At runtime, the standard view will be replaced by the copied and modified view This process is supported by wizards
SAP AG 2007, SAP Skills 2007 Conference / F4 / 59
SAP Component
Context
Comp. Controller
Window Main
View 1 View 2 View 3
Configure Views
Runtime Repository
Component Usages View Set Composition Navigation
SAP Component
Context
Comp. Controller
Customer Component
Context
Comp. Controller
Window Main
View 1 View 2 View 3
Window Main
View 1 View 2 View 3
Runtime Repository
Component Usages View Set Composition Navigation Element Element
SAP AG 2007, SAP Skills 2007 Conference / F4 / 61
Runtime Repository
Component Usages View Set Composition Navigation
Customer Component
Context
Comp. Controller
Window Main
View 1 View 2 View 3
Window Main
View 1 View 2 View 3
Runtime Repository
Component Usages View Set Composition Navigation Element Element Element
SAP AG 2007, SAP Skills 2007 Conference / F4 / 62
Runtime Repository
Component Usages View Set Composition Navigation Referenced Copied automatically Inherited if required
SAP AG 2007, SAP Skills Knowledge The Fast Track to SAP 2007 Conference / F4 / 64
CL_BT111H_O_ DETAILSEF_IMPL
BT111H_OPPT/
DetailsEF.htm
Create
BTAdminH
OBJECT_ID DESCRIPTION
CL_BT111H_O_ DETAILSEF_CTXT
C bin reat dt ea o B nd OL
BTHeaderOpportunityExt
BTOpportH
CL_BT111H_O_ DETAILSEF_CN01
BUDGET REVENUE
Call
Create
ZCL_ DETAILSEF_CN00
BTCustomerH attr
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.