Authors:: Loganath Karthikeyan (I014309) Dhaval Desai (I046385)
Authors:: Loganath Karthikeyan (I014309) Dhaval Desai (I046385)
Authors:: Loganath Karthikeyan (I014309) Dhaval Desai (I046385)
FBI Cookbook
26. August 2009
1 Overview
This cookbook intended for UI Designers, UI Developers and UI Administrators. Rapid FPM based UX compliant UI Application development for Business Objects implemented n BOPF using FBI/PBI libraries is detailed in this document.
Human
User Interface
R
R
Transaction Management
Business Application
Determination
R
Validation
R
Runtime Model
BOPF Model
Action
Association
R
R
R
Query
Legend
Service Consumer Implementation
Value-Set
R
BOPF Framework
R
R Buffer Dispatcher
R
Buffer
Delegation
BOPF-Default Implementation
Data Access
Application-specific Implementation
Modeling an Application Business Object in BOPF involves Definition of Document structure with the help of BO nodes, including definition of interface data structure for BO nodes; Mapping of application data between BO nodes and underlying DB tables Defining Queries to facilitate search on DB tables including definition of search criterion Defining Actions to facilitate consolidated changes to application data driven by service consumer Definition & Development of Business Checks as Validations Definition & Development of Event Driven data Modifications as Determinations Definition of special associations intra BO and inter BO ... Composition view of a typical Business Object Modeled in BOPF is shown below.
The following are the interfaces corresponding to interface pattern exposed by BOPF. Interface /BOBF/IF_TRA_TRANSACTION_MGR /BOBF/IF_TRA_SERVICE_MANAGER Purpose Transaction Manager for save & cleanup services Service Manager for BO specific Modify, Retrieve, Action, Query, ... services
As depicted in the BOPF overview picture, a service consumer calls BOPF transaction manager and service manager to consume state-full services of the Business Object. As BOPF BO models are machine readable and as the services of BO are exposed using Standardized Interface Patterns, it is possible to develop generic adapters/libraries to assist in consumption of BO services in UI layer and other channels. FBI/PBI provides generic adapters to consume services of BOs in Webdynpro environment. 1.1.1.1 Example Business Objects FBI/PBI examples illustrated in this cookbook are based on the Business Objects depicted in the picture below.
UI Administrator/Designer is able to o o Create UI layout as Web dynpro configuration for standard GUIBB Form/List/Search And assemble such discrete GUIBB configuration in an Application configuration
FBI aims at providing generic GUIBB feeder classes to consume services of BOs in FPM applications.
This approach is different from traditional development of Web dynpro Applications, where UI developer develops multiple web dynpro components with fixed view layouts, and delivers a fully assembled application. To get customer installation specific UI variants, such applications have to be modified at customer site.
1.1.3.1 Design Time Objects/Configuration Object FBI View FBI View Usage Purpose Helps joining application data across multiple related BO nodes. Facilitates reuse of FBI view in the context of multiple hosting BO and multiple DO representation nodes with in a single hosting BO. POWL support is extended to BOPF based BOs with the help of the POWL definition. Extension to POWL Type linking it to FBI View Usage so that queries on underlying BO nodes can be served in POWL
PBI Definition
1.3 Terminology
Term BOPF FPM Abbreviation Business Object Processing Framework Floorplan Manager Meaning / Use Supports Rapid Development of Business Objects in Model Driven Environment Floor plan Manager promotes modification free composition of discrete UI Building Blocks complying with UX guidelines. A typical floor plan consists of discrete UI building blocks. These building blocks can be either freestyle UI building blocks or Generic UI Building Blocks (GUIBBs) GUIBBs are centrally provided UIBBs, where the application only provides the data and a layout configuration. The rendering is done by the GUIBB.
UIBB
GUIBB
Personal Object Work List or POWER List Object Value Selector Floorplan Manager BOPF Integration Personal Object Work List BOPF Integration FBI view This is a FBI design time configuration object helps joining application data across multiple A value help mechanism supported by Web dynpro.
Meaning / Use related BO nodes. An FBI view definition for Dependent Object Node can be reused in the context of multiple Hosting BO & multiple DO representation nodes with in a single hosting BO. To promote reuse of FBI View definition corresponding to multiple use of DO nodes, FBI View usage is used.
OIF GAF
The configuration objects are meant for convenient abstraction of BO node data structures into equivalent UI structures helping UI modeler to even define joins between node data structures allowing filter conditions to be maintained for the joins. Also, suitable OVS based value helps are promoted by these objects (associated binding/filter conditions can be maintained). Like any application configuration data, these definitions can be SAP standard deliveries / customer specific / partner specific etc. Being normal configuration tables these fit well within enhancement strategies. FBI can be divided into two parts: FBI Design Time: Design Time configuration Objects refer to BOPF model elements. Suitable feeder classes & runtime classes are provided in the design configuration. FBI View represents design time objects. In design time, FBI provides four configuration objects: a) FBI Node View: A FBI View helps represent a join of application data between related BO nodes. This helps convenient presentation of application data in GUIBBs. FBI Node View primarily represents application data of a given BO node. Optionally additional data can be merged from related BO nodes (DB like join) for convenient presentation of data FBI View is a cross client design time configuration object. b) FBI Node View Usage: FBI Node View usage represents use of a FBI Node View in context of a particular hosting BO. This is particularly useful in modeling GUIBBs for dependent object nodes. Repeated definition of Node Views for every unique use of DO nodes is avoided. FBI View usage is a cross client design time configuration object. c) PBI Definition: POWL support is extended to BOPF based BOs with the help of the POWL definition. Extension to POWL Type linking it to FBI View Usage so that queries on underlying BO nodes can be served in POWL
FBI Run Time: Feeder classes & runtime classes use configuration objects and connect to BOPF runtime using BOPF lean transaction manager and service manager in FBI runtime. a) Generic GUIBB feeder classes for List/Form GUIBBs in order to edit/display application data of BO nodes b) Generic GUIBB feeder classes for input of BOPF Alternate Keys facilitating identification of BO instances using External IDs
c) Generic GUIBB feeder classes for input of application data in BOPF Action Parameter Structures so that BOPF actions with parameters can be invoked in FPM applications
d) Generic POWL Feeder classes to Invoke Query on BO nodes Invoke Action on BO node instances Delete BO Instances Launch FPM Application Configuration to display/change application data
Group Name for data of BO Node in output structure (GUIBB) is accepted as a parameter for convenient handling of application data Can mark the view to be read-only Can accept field descriptions for UI structure fields o o o Domain Value list usage Check Table value list usage OVS usage based on Query on any BO node with associated input/output binding Input Binding values are accepted as range tables. Also access to ABAP Constant in program runtime is permitted.
Data maintenance of FBI Node View is facilitated through view cluster. Filter condition values are accepted to SELECT-OPTIONS. Since association parameter structure does not permit ranges tables, only one Include + Equal+ Low entry are permitted for assoc filter conditions.
Related views refer to other FBI Node Views following associations on the given BO node o o o Suitable filter/selection condition can be specified for the association parameter structure (optional) Suitable filter/selection condition can be specified to filter the data of related nodes to 1:0..1 cardinality Filter conditions are accepted as range tables. Also access to ABAP Constant in program runtime is permitted.
In the FBI View cluster /BOFU/VC_FBI_V, you can associate non BOPF actions to your FBI view. To enable non BOPF actions in your application, you need to create a component configuration for the application controller.
You can navigate to other application by triggering non BOPF actions using the application controller configuration. Following steps needs to be executed: o o o o o Go to transaction SWO1 and create an object/interface type Create an appropriate method, define parameters and generate the program Generate the object type Go to transaction LPD_CUST and create a launch pad Create a launch pad role for your application
Maintain appropriate business object Maintain activity Maintain system alias In the Advanced Parameters, maintain Application alias
Attribute of the Element Custom Actions FPM Event ID Role Instance applAlias
Value Name of the custom action Launch Pad Role (T code = lpd_cust) Launch Pad Instance (T code = lpd_cust) Application alias defined in the launch pad application (T code = lpd_cust)
2.1.2.2
Certain actions requires a dialog box (confirmation, input to actions, etc) to execute. Such a configuration is supported in FBI. Similar to navigation based actions, you need to create an application controller (as mentioned in step 2.1.2).
Following steps need to be executed: o In the application controller, add a top level GUIBB. This will be invisible. Maintain appropriate value for the elements.
Now you need to maintain the action parameters in the application controller
o o
Now you need to add Dialog box to your OIF component. Create a Form UIBB and the corresponding component configuration. Add the action in the toolbar
Node CONTENT Hosting BO: ORDER DO Prefix: HDR_LONG_TXT Hosting BO: ORDER DO Prefix: ITM_LONG_TXT
Business Object Model: ORDER Node ROOT DO Prefix: HDR_LONG_TXT DO Prefix: ITM_LONG_TXT DO Representation Node ROOT_LONG_TEXT
NodeViewUsage ORD_HDR_TXT
Corresponds to
Node ITEM
NodeViewUsage ORD_ITM_TXT
Corresponds to
3 Creating a FBI UI
FBI uses FPM to create UI. 1) Create a Web Dynpro Application Go to Explorer (T.Code SE80) Select the package in which you want to create your application (or local objects) Right Click on Web Dynpro and create a Web Dynpro Application. Give an appropriate name for e.g. DEMO_SALES_ORDER_XX. BOFU is the namespace used over here. A screen would appear as shown in fig.20
Enter the following parameters and save it. Once the application is created, right click on the application and select Create/Change Configuration. Refer fig. 21.
Name: DEMO_SALES_ORDER_XX
The FPM Configuration editor itself is a Web Dynrpo application itself and will start in a browser. To create an application configuration, enter a configuration name and press the Create button (Configuration names are global! You can not use the same configuration name for different applications). An application configuration is simply a composition of different component configurations. An FPM application is composed of a number of different Web Dynpro components; however most of them are created dynamically at runtime. There are only 2 components which are always present: a floor plan specific component (FPM_OIF_COMPONENT for OIF) and a component for the Header Area (FPM_IDR_COMPONENT). So, the main task in configuring an FPM application is the configuration of these two components. After you have created the application configuration, the screen looks more or less like as shown in fig. 22:
1) Form UIBB Displays the data in a form 2) List UIBB - Displays the data in a list a) So lets create one FORM UIBB for the Header. To do so, click on UIBB: UIBB_1_1_1. A window will appear where in you maintain the attributes. Component View Configuration Name : FPM_FORM_UIBB (for form UIBB) : FORM_WINDOW : SL_ORD_XX_ROOT_FORM
b) Lets create one LIST UIBB. Navigate to your OIF component, click on Add UIBB and then click on Add List Component. Follow the steps same as for FORM UIBB (step a). Instead of group, in this case it would be Configure Columns.
Form/List GUIBB can be configured using the FBI View/ FBI View Usage defined in the view cluster /BOFU/VC_FBI_V (FBI View) and view /BOFU/VFBIVU (FBI View Usage). Each UIBB has its own component configuration. FBI View/ FBI view usage can be linked to UIBB via the parameters of the component configuration. Typically the parameters of the component configuration look as shown in the fig. 10. In this scenario, you need to maintain FBI View/FBI view usage. Parameter FBI View (/BOFU/FBI_VIEW) FBI View Usage (/BOFU/FBI_VIEW_USAGE) Description FBI View maintained in the view cluster /BOFU/VC_FBI_V FBI View Usage maintained in the view /BOFU/VFBIVU
The fields that are present in the Node UI structure of the FBI view can be a part of the UI. The fields that you need in your UI can be grouped as per their characteristics. For e.g. Order details and Admin data (Created by, Changed by) can be displayed in different groups. If you dont need any such grouping, create one group and include all the fields in that group. Note: Grouping of fields is applicable only for Form GUIBB. Now click on Configure Group/ Configure Columns. While configuring the group/column, you actually select the fields you need in on UI, their position and other properties. Note: For all the attributes, for which the Action Assignment is enabled, supply FPM Event ID as FBI_DEFAULT (Flush Changes triggering insert/update).
3.1.1.3
Form/List GUIBB can be configured directly using BO, BO nodes & BO associations. BO, BO nodes & BO associations can be linked to UIBB via the parameters of the component configuration. Typically the parameters of the component configuration look as shown in the fig. 10. In this scenario, you need to maintain BO, BO nodes and BO associations (optional). If the view is a top level, no BO associations are required.
Description You need to specify the BO created using the transaction /BOBF/CONF_UI Node of the Business Object If you want data from a node which is associated other node (of the same or different BO), then you need to specify the parent BO as the source BO Node of the parent BO which has a valid association Association between the Node and the Source Node.
3.1.1.4 BOPF based Actions Standard BOPF actions like Create & Delete are available (by default). Other BOPF actions can also be handled in a similar way. In the component configuration of the corresponding GUIBB, you need to configure them. In case of Form GUIBB, while configuring the group add <Button Row>. Once you have added the button row, Configure Button Row will be enabled. This will show all the actions available on that BO node. Chose and assign the action to the button row. Refer to fig. 28.
In the parameters of the component configuration, you can maintain non BOPF actions in Non BOPF Actions (/BOFU/FBI_NON_BOPF_ACTIONS). Refer to fig. 30. If your GUIBB has more than one non BOPF actions, then you can specify all of them by using semi colon (;) separator. For e.g. SHOW_PRODUCT; NAVIGATE_ITEM
CSM Parts
CSM Parts
4 IDR Configuration
4.1 IDR title
TODO
10.04.2009, SP1
5 CNR Configuration
10.04.2009, SP1
5.1 BOPF actions configuration against Toolbar Buttons /Button Choices 5.2 Non-BOPF Action Configuration against Toolbar Buttons/Button Choices 5.3 Related Links/You Can Also
Enter the following parameters and save it. Once the application is created, right click on the application and select Create/Change Configuration. Refer to the fig below.
Name: DEMO_SALES_ORDER_XX
The FPM Configuration editor itself is a Web Dynrpo application itself and will start in a browser. To create an application configuration, enter a configuration name and press the Create button (Configuration names are global! You can not use the same configuration name for different applications). After you have created the application configuration, the screen looks more or less like fig shown below:
Note: It is always advisable to maintain appropriate name (common logical prefix) for all the configurations of the same web dynpro application.
For OIF component, SL_ORD_XX_OIF For IDR component, SL_ORD_XX_IDR Once you have created the Component Configuration for your component (lets first create configuration for OIF component), the screen looks more or less like fig shown below:
UIBB are FPM component. Basically there are two types of UIBBs: Form UIBB Displays the data in a form List UIBB - Displays the data in a list
a) So lets create one FORM UIBB for the Header. To do so, click on UIBB: UIBB_1_1_1. A window will appear where in you maintain the attributes. Refer to fig. 36.
Component View
: /BOBF/DEMO_SALES_ORDER : ROOT
Top Level View (/BOFU/FBI_TOP_LEVEL_VIEW): Yes The fields that you need to be in your UI can be grouped as per their characteristics. For e.g. Order details and Admin data (Created by, Changed by) can be displayed in different groups. If you dont need any such grouping, create one group and include all the fields in that group.
Once you have configured your group, your screen would appear as shown in the fig below.
Note: For all the attributes, for which the Action Assignment is enabled, supply FPM Event ID as FBI_DEFAULT (Flush Changes triggering insert/update).
b) So lets create one LIST UIBB. Navigate to your OIF component. In this example we will encapsulate the List GUIBB in a separate main view. To do so, click on Add Main View in your OIF component configuration screen. Refer to the fig below.
Press Save. Now you need to configure the UIBB. For that, click on Configure UIBB. This will lead to the creation to of the component configuration. Create the component configuration. Provide the feeder class /BOFU/CL_FBI_GUIBB_FEEDER. Now you need to provide the parameters. For this example, enter the following parameters:
Now you need to select the fields which you need in your list. For that, click on Configure Columns. Refer to fig 25.
Now, you need to define the Initial screen for your application. Navigate to your OIF component. Click on Add->Initial Screen. Refer to the fig below.
Now you need to configure the UIBB. Click on Configure UIBB. Provide the feeder class /BOFU/CL_FBI_GUIBB_ALTKEY_FDR and then provide the appropriate parameters.
Now Add and Configure group. Press SAVE. Now you need to maintain certain Global Settings. For that, navigate to your OIF component. Refer to the fig below.
Now execute your web dynpro application. Since Initial screen was defined, it will appear as shown in the fig below.
7 Search Help
8 PBI
POWL support is extended to BOPF based BOs through PBI definition. PBI Definition is an extension to definition of POWL Type (Transaction POWL_TYPE). For a given POWL Type, the following attributes are accepted Name of the Node View Usage Name of the Query on BO Node (corresponding to BO Node of Node View which is referenced by Node View Usage) Table of POWL Selection Parameters and their mapping to Query Attributes o o o Name of the selection parameter Kind of the Selection Parameter ( Select Option / Parameter ) Identifier if the parameter is a checkbox
Reference to Node View Usage, BO Node Query, FBI Application Configuration for OIF and FBI Application Configuration for QAF are captured. Additionally for each query attribute, the following information can be specified. SELNAME KIND Selection parameter name
Kind of selection parameter (Select Option / Parameter) input box/checkbox/dropdown list/text line (data element: POWL_CRITTYPE_TY) Select option with
PARAM_TYPE SEL_CRIT_TYPE o o o o
Interval & multi select without multi select without interval only display relevant without interval using complex restrictions mandatory is it a quick selection criteria Default Value
MANDATORY
QUICK_SEL_CRIT DEFAULT_VAL
VAL_MODE_DEF_VAL Value mode of default value (Data Element: POWL_EASY_DEF_VALUE_MODE_TY) o o o Read only Hidden Editable
Creation of a POWL application & POWL Type can be done by the following steps. a. Creation of an Application Name. b. Creation of a POWL Type. c. Assign User to POWL Type.
d. Creation of a FBI View. e. Creation of FBI View usage f. Maintain PBI POWL Definition, using created POWL Type & FBI View.
g. Execute POWL application h. Change URL & Add parameter i. Define your Query
Creation of an Application Name Go to Transaction FPB_MAINTAIN_HIER, select New Entries and enter a name for Personalization Application to represent the application. And maintain relevant text. Select the newly created entry and maintain the Personalization Characteristics.
Field name
group value
Interval
Single Value
DEFAULT_QUERY LAYOUT
None None
Multiple Multiple
Multiple Multiple
POWL_QUERY_TY POWL_LAYOUT_TY
8.2 Configuration of the POWL (Feeder) Type using FBI View Usage
Creation of a POWL Type Execute transaction POWL_TYPE and create a POWL type for your choice. Enter the following attributes: 1. Type: Appropriate POWL type name 2. Description: Appropriate description
Assign User to POWL Type Execute transaction POWL_TYPEU and create an entry for your POWL type. If you want the same POWL type for multiple users, create entries for all those users.
Creation of a FBI View An FBI View needs to be created for the BO & Node being used for the POWL Definition. Creation of FBI View Usage Execute transaction SM30 and open the view /BOFU/VFBIVU in change mode. Here you need to create a view usage for the FBI view. Click on New Entries. a. FBI View Usage: Appropriate name (FBI view usage name should be the same as FBI view maintained in the view cluster /BOFU/VC_FBI_V) b. Description: Appropriate description c. FBI View: FBI view maintained in the view cluster /BOFU/VC_FBI_V
Maintain PBI POWL Definition, using created POWL Type & FBI View In transaction SM34, you have to create an entry in the view cluster /BOFU/VC_PBI_P. Create PBI POWL definition with following attributes: a. Type: POWL type b. FBI View Usage: FBI view usage maintained in the view /BOFU/VFBIVU c. POWL Query: Query of the BO node
Execute POWL application Go to transaction SE84, Expand Web Dynpro and double click on Web Dynpro Enter value POWL in the field Web Dynpro Application and select Execute (F8). Double-Click on the displayed entry. Select Test/Execute (F8). A browser is opened with a URL similar to the below one. http://uxai1btd.wdf.sap.corp:50028/sap/bc/webdynpro/sap/powl?sap-language=EN
Change URL & Add parameter Add parameter APPLID=name of your personalization application in the URL as below. http://uxai1btd.wdf.sap.corp:50028/sap/bc/webdynpro/sap/powl?applid=HK_DEMO_SALES_HIE R&sap-language=EN Where the addition is applid=Personalization application& and press enter.
Define your Query You can now define queries. To do that, click on Define New Query and enter the relevant attributes. This is similar to creating a POWL query.
Application Name Description Text POWL TYPEU Application POWL Type APPLID = Appl Name User
Query of BO Node
08.04.2009
8.2.4 Configuration of Link targets per Action (Action buttons / Column Links) 10.04.2009, SP1
8.3 How to create own PBI Based Feeder Class CSM parts
8.3.1 Feeder Class Creation 8.3.2 POWL (Feeder) type Configuration
08.04.2009,
9 Property Handling
Not necessary for Sprint1, concept needed at latest for sprint 2
10 Message Handling
Not necessary for Sprint1, concept needed at latest for sprint 2