Sapskills Wcui PDF
Sapskills Wcui PDF
Agenda
2. Presentation Layer
2.1. UI Components 2.2. Component Usage
3. Component Enhancement
3.1. Basics 3.2. Enhancement Examples
Web Browser
Model
Business Layer
Business Engine
view
view
F2
Naming Conventions Example: 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
Naming Conventions GS<speaking string> = General Services ( Reusable Components) BT<speaking string> = reusable components for Transactions
Component Workbench
Browser Component Structure BOL Model Browser Runtime Repository Editor
Favorites Component Component Controller Windows Custom Controllers Views Pages with Flow Logic Repository.xml WebDynpro.dtd Page Fragments MIMEs
A UI Component is a bundle of views, viewsets, etc. that logically belong together UI Components can be edited in the Component Workbench: Transaction BSP_WD_CMPWB Browser Component Structure Inventory of Component Creation of Component Controller, Windows, Custom Controllers, Views is supported by wizards
Models Windows View Sets Navigational Links Component Interface Component Usage
SAP 2008 / SAP Skills 2008 Conference / F2 / Page 7
Runtime Repository Editor Visualization of xml coding Easy maintenance Assignment of component set (Models) Assignment of views/view sets to window Assignment of views to view sets Creation of navigational links Definition of component interface Definition of embedded components (component usage) Save button generates xml code
Controller
set
Model
get Response
Defines Definesapplication applicationdata data Usually Usuallyconnected connectedto to business functionality business functionality
View
.DO _IMPL
Instantiation of Model
Request
set
Model
Context _CTXT Context Nodes
_CN00 _CN01
data output
View
Response
get
Controller
View: Layout
SAP 2008 / SAP Skills 2008 Conference / F2 / Page 10
Attributes
Agenda
2. Presentation Layer
2.1. UI Components 2.2. Component Usage
3. Component Enhancement
3.1. Basics 3.2. Enhancement Examples
Web Browser
Model
Business Layer
Business Engine
Business Layer
User Interface BOL
BOL works with the data at runtime. Data that are changed in the user interface are first changed in the BOL and then transferred to the Generic Interaction Layer Generic Interaction Layer contains mapping components to communicate with the existing APIs
GenIL
Existing Business Logic has not been changed for the Web Client User Interface
GenIL Components
BOL
GenIL
get model
modify
search
GenIL Component
create
save
Interface Methods
map
The GenIL Component is a class that acts as a link between the existing CRM Business Logic and the UI Framework. It communicates with the Generic Interaction Layer via a specific Interface. Each component defines a hierarchical data model that it publishes to the Generic Interaction Layer. These so called Business Objects are used within all layers of the framework and in the Presentation Layer. The Genil Component does the mapping between the data model that it has defined and the actual data interfaces of the APIs
Component Sets
BOL
Order
GenIL
BP
Ibase
Order
BP
Ibase
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 All components in the set are handled by the framework in the same way as each component communicates with the framework via the same methods.
API Tables
DEMO
SAP 2008 / SAP Skills 2008 Conference / F2 / Page 18
Business Object with unique name Name of dictionary structure List of attributes in structure
2. Enter Parameter
Agenda
2. Presentation Layer
2.1. UI Components 2.2. Component Usage
3. Component Enhancement
3.1. Basics 3.2. Enhancement Examples
Enhancement Tools
Requirement
Layout change e.g. move field UI Configuration Tool
Tool
Software Layer
Presentation Layer (BSP) Business Layer (BOL) Interaction Layer (GenIL)
Layers of UI Framework
Business Engine
API
Tables
SAP 2007 2008 / Page SAP Skills 23 2008 Conference / F2 / Page 23
Project
Business Object Extension Type Business Object Extension Type Business Object Extension Type
Transaction: Configuration:
Position fields on the screen & set attributes with the UI Config Tool Fields are available in the field set of the UI Configuration Tool (*)
Model Context Node ZZNewField
ZZField1 ZZField2
Fields are available in BOL (within the EEWBinclude of the corresponding object) Tables/APIs are enhanced
ZZNewField
ZZField1 ZZField2
API
Data Base
e.g. CI_EEW_ACTIVITY_H
Simple objects
Integration of customer tables You may implement new unstructured BOL objects as simple objects Generic table object available as example in package CRM_GENIL_SAMPLE
BOL
ZZNewField
ZZField1 ZZField2
GenIL Component
API
Data Base
DEMO
SAP 2008 / SAP Skills 2008 Conference / F2 / Page 29
Agenda
2. Presentation Layer
2.1. UI Components 2.2. Component Usage
3. Component Enhancement
3.1. Basics 3.2. Enhancement Examples
UI Component Overview
Display
IP
OP View OP
ViewSets
Create
IP
View
Context Nodes
user input
Request
set
Model
Method: create_context_nodes
Context Nodes
Layout data output
Input1 Input2 Input3
get
Page Attributes:
Response
BOL
Page attributes: Structural setters / getters in the context nodes transfer all fields from the BOL structure to the layout
SAP 2008 / SAP Skills 2008 Conference / F2 / Page 33
DetailsOV DetailsEF
ToDetailsOV
Response
data output
Controller Class
Custom Controller
UI Component
Lifespan
Controller 1 View1 Model Context Node
Custom Controller
Controller
Lifespan Lifespan
Controller 2 View2
BOL
Genil
Tables
Component Controller
Controller Hierarchy
Component Controller
Custom Controller
Controller Model Context Node
Controller View
Window
Model
IP View IP View
View
ViewSets
OP
OP
A Window is part of a component and defines a root for a hierarchy of view sets and views in the runtime repository. A view set or view can only be part of exactly one window technically a window is a special type of view has a context that contained views and viewsets can bind to can trigger navigation inside the window. Navigation between views is only possible within a single window
DEMO
SAP 2008 / SAP Skills 2008 Conference / F2 / Page 39
Agenda
2. Presentation Layer
2.1. UI Components 2.2. Component Usage
3. Component Enhancement
3.1. Basics 3.2. Enhancement Examples
Component Interface
Each component can be looked at from the inside as well as from the outside, but what can be seen is different. Inside View
Logical bundle of views, view set and windows Data are shared between views via custom controllers Window acts a container for view sets and views Inventory of component is defined in the runtime repository
Outside View
Component Controller publishes context nodes as data interface Window acts as view interface Defined inbound and outbound plugs Component Interface is defined in runtime repository
Component Controller Window Sub component Search Inbound Plug Outbound Plug
Component Usage
Window
OP
Sub component Search
View OP
IP
View
ViewSets
Runtime Repository
Components that have defined an interface can be re-used by other components. The usage of components is defined in the runtime repository of the embedding component The embedded window behaves like a view in the embedding component and can therefore be integrated in the navigation via the inbound and outbound plugs Data can be passed to the embedded component via the component controller which is linked to the component controller of the embedding component
Agenda
2. Presentation Layer
2.1. UI Components 2.2. Component usage
3. Component Enhancement
3.1. Basics 3.2. Enhancement Examples
UI Enhancements
Requirement
Layout change e.g. move field
Tool
UI Configuration Tool
Component Workbench
nd a ed i p Co
ed i f i d mo
w Vie
r a d n Sta
iew V d
Views from an existing component can be copied into a customer own 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 2007 2008 / Page SAP Skills 45 2008 Conference / F2 / Page 45
Enhancement Set
Enhancement Set
Component1 Component3 Component2 Component4
2) Assign Enhancement to Client 1) Create Enhancement Set Transaction: SM34 Transaction: SM30 View Cluster: BSPWDVC_CMP_EXT View: BSPWDV_EHSET_ASG
Client
No 1
Enhancement Set
ZCUSTOPP
800
Create Enhancement
Transaction: BSP_WD_CMPWB
Open Input Field for Enhancement Set Choose Enhancement Set and Component to be enhanced. Press Display
Enter name of Customer BSP Application (will be created if not yet existing) Enter Package for Development
Customizing Generation
Enhancement Set
Component Name BT111H_OPPT
ZCUSTOPP
BSP Runtime Repository ZCUSTOPPH Runtime Rep Page Repository.xml
* Entries will be created by wizard during creation of enhancements Transaction: SM34 View Cluster: BSPWDVC_CMP_EXT
SAP 2007 2008 / Page SAP Skills 48 2008 Conference / F2 / Page 48
Enhancement Result
Runtime Repository copied to customer specific BSP Application. Runtime repository only contains references to objects in the original components (objects greyed out)
Enhancement of Objects
BT111H_OPPT/DetailsEF
Controller 1 View1 Model Context Node
Enhancement Steps Copy Layout Copy Controller Create new controller class in customer namespace* Create new context class in customer namespace* Re-use context nodes *classes inherit from standard classes
SAP 2007 2008 / Page SAP Skills 50 2008 Conference / F2 / Page 50
Controller Substitution
Transaction: SM34 View Cluster: BSPWDVC_CMP_EXT
Per object enhancement, en entry in customizing is generated by the wizard Enhancement Set Component
BSP Application BT111H_OPPT
ZCUSTOPP BT111H_OPPT
Controller to be replaced DetailsEF BSP Application ZCUSTOPPH Replacement Controller DetailsEF
Customer Component View that will be used at runtime instead of standard view
Object Changes
Creation of new context node completely supported by wizard Creation of event handler, inbound and outbound plugs supported by wizard, additional coding needed
Client
Client
Agenda
2. Presentation Layer
2.1. UI Components 2.2. Component usage
3. Component Enhancement
3.1. Basics 3.2. Enhancement Examples
DEMO
SAP 2008 / SAP Skills 2008 Conference / F2 / Page 55
Contact
CRM Center of Expertise: Ines Kutne Senior Development Consultant ines@[email protected] +49 160 3603169
Weitergabe und Vervielfltigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrckliche schriftliche Genehmigung durch SAP AG nicht gestattet. In dieser Publikation enthaltene Informationen knnen ohne vorherige Ankndigung gendert werden. Einige von der SAP AG und deren Vertriebspartnern vertriebene Softwareprodukte knnen Softwarekomponenten umfassen, die Eigentum anderer Softwarehersteller sind. SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, SAP Business ByDesign, ByDesign, PartnerEdge und andere in diesem Dokument erwhnte SAP-Produkte und Services sowie die dazugehrigen Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und in mehreren anderen Lndern weltweit. Alle anderen in diesem Dokument erwhnten Namen von Produkten und Services sowie die damit verbundenen Firmenlogos sind Marken der jeweiligen Unternehmen. Die Angaben im Text sind unverbindlich und dienen lediglich zu Informationszwecken. Produkte knnen lnderspezifische Unterschiede aufweisen. Die in diesem Dokument enthaltenen Informationen sind Eigentum von SAP. Dieses Dokument ist eine Vorabversion und unterliegt nicht Ihrer Lizenzvereinbarung oder einer anderen Vereinbarung mit SAP. Dieses Dokument enthlt nur vorgesehene Strategien, Entwicklungen und Funktionen des SAP-Produkts und ist fr SAP nicht bindend, einen bestimmten Geschftsweg, eine Produktstrategie bzw. -entwicklung einzuschlagen. SAP bernimmt keine Verantwortung fr Fehler oder Auslassungen in diesen Materialien. SAP garantiert nicht die Richtigkeit oder Vollstndigkeit der Informationen, Texte, Grafiken, Links oder anderer in diesen Materialien enthaltenen Elemente. Diese Publikation wird ohne jegliche Gewhr, weder ausdrcklich noch stillschweigend, bereitgestellt. Dies gilt u. a., aber nicht ausschlielich, hinsichtlich der Gewhrleistung der Marktgngigkeit und der Eignung fr einen bestimmten Zweck sowie fr die Gewhrleistung der Nichtverletzung geltenden Rechts. SAP bernimmt keine Haftung fr Schden jeglicher Art, einschlielich und ohne Einschrnkung fr direkte, spezielle, indirekte oder Folgeschden im Zusammenhang mit der Verwendung dieser Unterlagen. Diese Einschrnkung gilt nicht bei Vorsatz oder grober Fahrlssigkeit. Die gesetzliche Haftung bei Personenschden oder die Produkthaftung bleibt unberhrt. Die Informationen, auf die Sie mglicherweise ber die in diesem Material enthaltenen Hotlinks zugreifen, unterliegen nicht dem Einfluss von SAP, und SAP untersttzt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt keinerlei Gewhrleistungen oder Zusagen ber Internetseiten Dritter ab. Alle Rechte vorbehalten.
SAP 2008 / SAP Skills 2008 Conference / F2 / Page 59