FBI Cookbook

60
Authors: Loganath Karthikeyan (I014309) Dhaval Desai (I046385) FBI Cookbook 26. August 2009 Distribution List: DL CSM All

Transcript of FBI Cookbook

Page 1: FBI Cookbook

Authors: Loganath Karthikeyan (I014309) Dhaval Desai (I046385)

FBI Cookbook 26. August 2009

Distribution List:

DL CSM All

Page 2: FBI Cookbook

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.

1.1 Architectural Overview

1.1.1 Business Object Processing Framework (BOPF)

BOPF framework supports Rapid Development Business Objects in Model Driven Environment. Overview of BOPF can be found in the picture below. More details can be found in BOPF wiki.

Service Consumer

Generic Service ConsumerHumanUser Interface

HumanPost Processing Framework

Transaction Management

BOPF Service and Transaction Manager

RR R

Business ObjectProcessing Framework

Model

Business Application

R

BO

PF

Mod

el

Run

time

Mod

el

Business ObjectProcessing Framework

Runtime

R

BufferBuffer Dispatcher

R R

R

R

Data Access

R

R

Business Object Data

Determination

Validation

Action

Association

R

R

R

R

QueryR

Delegation

R

Status & Action Management

R

Value-Set

Node Defaults

R

R

R

Legend

BOPF-DefaultImplementation

Application-specific Implementation

BOPFFramework

Service Consumer Implementation

Figure 1: Overview of BOPF

Page 3: FBI Cookbook

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.

Figure 2: Example BO (Demo) Sales Order

BOPF exposes Services of Business Object in Standardized Interface Patterns. This means

At every Node of the Business Object, we have

� Create, Update, Delete Services

� Retrieve, Retrieve By Association, Retrieve Property (field control) Services

� Action, Query, Check Services

� External ID to Internal ID Key conversion services

� …

Also, we have Save & Cleanup services to manage the transaction.

Page 4: FBI Cookbook

The following are the interfaces corresponding to interface pattern exposed by BOPF.

Interface Purpose

/BOBF/IF_TRA_TRANSACTION_MGR Transaction Manager for save & cleanup services

/BOBF/IF_TRA_SERVICE_MANAGER 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.

Figure 3: Example Business Objects

The above figure depicts the example business objects with intra BO associations (associations among the nodes of the same BO) and inter BO associations. Business Objects are

� /BOBF/DEMO_SALES_ORDER

� /BOBF/DEMO_CUSTOMER

� /BOBF/DEMO_PRODUCT

Page 5: FBI Cookbook

1.1.2 Floor Plan Manager (FPM)

Floor Plan Manager promotes modification free composition of discrete UI Building Blocks (UIBB) complying with UX guidelines. This promotes customers to freely extend UI applications. Overview of FPM can be found in the picture below. More details can be found in FPM wiki.

Figure 4: Overview of FPM

GUIBBs are centrally provided UIBBs, where the application only provides the data and a layout configuration. The rendering is done by the GUIBB. Currently FPM offers 3 GUIBBs (Form/List/Search).

Developing UI building Blocks using GUIBBs means

� Application provides a suitable feeder class implementation by which Application

o Provides a field catalog to GUIBB design time & GUIBB runtime

o Provides Data at runtime

o Accepts UI changes at runtime by calling Application middleware

o Handles UI events at runtime by calling Application middleware

o Provides field control data to control visibility, changeability in UI

� UI Administrator/Designer is able to

o Create UI layout as Web dynpro configuration for standard GUIBB Form/List/Search

o 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.

Page 6: FBI Cookbook

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 Floor Plan Manager BOPF Integration (FBI)

FBI provides configurable integration of FPM and BOPF based BOs. Generic FPM Application Feeder classes & relevant application configuration are provided in order to consume services of Business Objects modeled in BOPF. Thus BOPF BO services can be consumed seamlessly in a modification free UI environment.

Functionally FBI supports all kinds of service calls to BOPFed BOs.

� Editing data of BO node instances in GUIBB List / Form

� Accepting Action Parameter Values & Invoking Action on BO node instances

� OVS based on BO node queries

� Input of external IDs in initial screen and subsequent conversion of external IDs to Internal IDs. (Alternate Key conversions)

In addition, following UI specific services are supported

� Navigation to Multiple targets

� Calling Dialogs and editing of application data in Dialogs

� Support for UI specific non-BOPF actions

Page 7: FBI Cookbook

Overview of FBI can be found in the picture below.

Figure 5: Overview of FBI

As you can find in the picture, suitable generic Feeder class is provided to enable editing of Application data in Forms/Lists. Additionally this feeder class can also be called from freestyle UIBBs to ease consumption of BOPF services.

The picture below depicts building blocks of FBI.

Page 8: FBI Cookbook

1.1.3.1 Design Time Objects/Configuration

Object Purpose

FBI View Helps joining application data across multiple related BO nodes.

FBI View Usage Facilitates reuse of FBI view in the context of multiple hosting BO and multiple DO representation nodes with in a single hosting BO.

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

1.1.3.2 Runtime Objects

1.1.4 POWER List (POWL) BOPF Integration (PBI)

1.2 FPM floor plan configuration Link to FPM cookbook

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90f3cfd2-46d0-2b10-b3ab-eabf3452cc50

1.3 Terminology

Term Abbreviation Meaning / Use

BOPF Business Object Processing Framework

Supports Rapid Development of Business Objects in Model Driven Environment

FPM Floorplan Manager Floor plan Manager promotes modification free composition of discrete UI Building Blocks complying with UX guidelines.

UIBB UI Building Block (FPM) 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)

GUIBB Generic User Interface Building Block(s) (FPM)

GUIBBs are centrally provided UIBBs, where the application only provides the data and a layout configuration. The rendering is done by the GUIBB.

POWL Personal Object Work List or POWER List

OVS Object Value Selector A value help mechanism supported by Web dynpro.

FBI Floorplan Manager BOPF Integration

PBI Personal Object Work List BOPF Integration

FBI View FBI view This is a FBI design time configuration object helps joining application data across multiple

Page 9: FBI Cookbook

Term Abbreviation Meaning / Use related BO nodes.

FBI View Usage

FBI View Usage 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 Object Instance Floorplan

GAF Guided Activity Floorplan

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

Page 10: FBI Cookbook

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

Page 11: FBI Cookbook

2 FBI design time Entities Maintenance

2.1 Configure FBI Views on a BOPF BO (FBI Node View) A FBI Node view is

• Is related to a BO node

• Optionally accepts UI structure which is an extended version of BO Node data structure

o UI structure can be the same as combined data structure of the BO node

o UI structure can have additional UI specific fields like

� Date/Time/Time zone fields complementing time stamp

� Descriptions of code values

� Printable/Descriptive values for Identities (Printable address text complementing of Business Partner ID)

� …

• Optionally accepts a data mapper class to map data of BO node to UI structure

o Standard Data mapper is delivered with FBI (/BOFU/CL_FBI_VIEW_MAPPER ) which simply does MOVE-CORRESPONDING statement to move data between BO node and UI data structures

o Data mapper class to be used only when UI structure is mentioned and is different from BO node data structure

• 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 Domain Value list usage

o Check Table value list usage

o 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.

2.1.1 Related Views

Related are configured so that the data can be merged from related BO nodes i.e. intra BO associations and inter BO associations (DB like join) for convenient presentation of data

Page 12: FBI Cookbook

• Related views refer to other FBI Node Views following associations on the given BO node

o Suitable filter/selection condition can be specified for the association parameter structure (optional)

o Suitable filter/selection condition can be specified to filter the data of related nodes to 1:0..1 cardinality

o Filter conditions are accepted as range tables. Also access to ABAP Constant in program runtime is permitted.

2.1.2 Non-BOPF Action Configuration

Non BOPF actions can be classified into two categories based upon their position on the UI:

o Toolbar actions

o Actions at the GUIBB level

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.

Figure 6: Component Config. For Application Control ler

2.1.2.1 Navigation configuration against Actions

You can navigate to other application by triggering non BOPF actions using the application controller configuration.

Following steps needs to be executed:

o Go to transaction SWO1 and create an object/interface type

o Create an appropriate method, define parameters and generate the program

o Generate the object type

o Go to transaction LPD_CUST and create a launch pad

o Create a launch pad role for your application

Page 13: FBI Cookbook

• Maintain appropriate business object

• Maintain activity

• Maintain system alias

• In the ‘Advanced Parameters’, maintain Application alias

Figure 7: Launch Pad Role

o Go to your application controller (the one created in step 2.1.2) and add ‘custom actions’ in the configuration context

Page 14: FBI Cookbook

Figure 8: Custom Actions in Application Controller

o Provide the appropriate values in the “Attributes of the Element customActions”.

Attribute of the Element Custom Actions Value

FPM Event ID Name of the custom action

Role Launch Pad Role (T code = lpd_cust)

Instance Launch Pad Instance (T code = lpd_cust)

applAlias Application alias defined in the launch pad application (T code = lpd_cust)

Page 15: FBI Cookbook

Figure 9: Attributes for Custom actions

o This application controller needs to be maintained in the global settings of your application (OIF component)

Page 16: FBI Cookbook

Figure 10: Global Settings of OIF component

o Go to transaction PFCG and create a role

o Assign your user to the role

o In the ‘Menu’, add your web dynpro applications i.e. source and target application

Page 17: FBI Cookbook

Figure 11: User Role

o In this case, the source application is Sales Order Application and the target application is the customer application i.e. we have modeled a non BOPF action called ‘DISP_CUST’ on the top level GUIBB of sales order application which uses customer number as input and triggers navigation to the customer application.

o In Sales Order application maintain the details as shown in the fig. below.

Page 18: FBI Cookbook

Figure 12: Application details in User Role

o Similarly maintain the details in the customer application

o Also in the customer application, maintain additional details as shown in the fig. below. Here you need to maintain the method and the parameter which you had created in your business object (T code = SWO1)

Page 19: FBI Cookbook

Figure 13: Additional Details for the target applic ation

o Add the custom action in your GUIBB.

Page 20: FBI Cookbook

Figure 14: Custom action in GUIBB

o Log on in the system via NWBC

o Since your user was assigned to the role created, your applications will appear there.

o Execute the source application (Sales Order application in this case)

o Now click on the non BOPF action (In this case, it will open the customer application)

2.1.2.2 Dialog Configuration against Actions

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.

Page 21: FBI Cookbook

Figure 15: Top level GUIBB in application controlle r

Attributes of the Element topGuibb Value

Component FPM_FORM_UIBB

View FORM_WINDOW

Configuration Name Appropriate configuration name

Configuration Type General

o Now you need to maintain the action parameters in the application controller

Page 22: FBI Cookbook

Figure 16: Action Parameters for Dialog actions

Attributes of the Element actParamConfig Value

Action Name of the BO action (Dialog action)

Business Object Name of the Business Object on which the action is defined

Node Node of the BO on which the action is defined

Dialog window id Name of the dialog window (you need to create a dialog box with the same name in your OIF component)

o Now you need to add Dialog box to your OIF component. Create a Form UIBB and the corresponding component configuration.

o Add the action in the toolbar

Page 23: FBI Cookbook

Figure 17: Action on the Toolbar

o Dialog action has been configured successfully

2.1.3 Generation of Nested Structures for Custom UI BB

2.2 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.

The picture below illustrates logical model of the Node View in relation to Node View.

Figure 18: Logical Model of Node View Usage

Page 24: FBI Cookbook

Typical example of Node View Usage is illustrated below.

Business Object Model: ORDER

Dependent Object Model: Text Collection

«Node»ROOT

«Node»CONTENT

«NodeView»TXT_COLL_ROOT

«Node»ROOT

«DO Representation Node»ROOT_LONG_TEXT

«Node»ITEM

«DO Representation Node»ITEM_LONG_TEXT

DO Prefix: HDR_LONG_TXT

DO Prefix: ITM_LONG_TXT

«NodeViewUsage»ORD_HDR_TXT

Hosting BO: ORDER

DO Prefix: HDR_LONG_TXT Hosting BO: ORDER

DO Prefix: ITM_LONG_TXT

«NodeViewUsage»ORD_ITM_TXT

Corresponds to

Corresponds to

Figure 19: Example of Node View Usage

BO ORDER uses dependent object text collection as ROOT_LONG_TEXT and ITEM_LONG_TEXT. A Node view is created for TXT_COLL_ROOT. Node View usage ORD_HDR_TXT and ORD_ITM_TXT provide two usages of the Node View TXT_COLL_ROOT in the context of Header Long Text and item Long Text. Thus definition of main Node View is not repeated twice promoting better maintainability of Node Views.

Page 25: FBI Cookbook

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

Figure 20: Web Dynpro Application

The application should have following parameters:

Component : FPM_OIF_COMPONENT (for OIF)

Interface View : FPM_WINDOW

Plug Name : DEFAULT

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.

Page 26: FBI Cookbook

Figure 21: Create Web Dynpro Application Configurat ion

2) Create Web Dynpro ABAP Application Configuration

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:

Page 27: FBI Cookbook

Figure 22: Maintain Web Dynpro Application Configur ation

Now enter an appropriate Component Configuration name (in the configuration column as shown in the fig. above) for both the implementations i.e. FPM_OIF_COMPONENT & FPM_IDR_COMPONENT . Now select one of them and then click on ‘Go to Component Configuration’. This will lead to the creation of the component configuration. Repeat the same process for the other component.

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 as shown in fig. 23:

Page 28: FBI Cookbook

Figure 23: Configure OIF component of Web Dynpro ap plication

Now you have to maintain the Attributes of the main view. For that, click on ‘Main View: (1)’. A window will appear (as shown in fig. 24) below where in you can maintain the attributes.

Figure 24: Maintain View attributes

Similarly maintain the attributes for the Subview. In this example, for the Header main view, there is only one subview. So we will maintain the same attributes for the subview also.

Once the attributes are maintained for the views, we have to create the required UIBB(s) for these views. A subview would have by default one UIBB in it. You can add multiple UIBBs over here.

UIBB are FPM component. Basically there are two types of UIBBs:

Page 29: FBI Cookbook

1) Form UIBB – Displays the data in a form 2) List UIBB - Displays the data in a list

a) So let’s 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 : FPM_FORM_UIBB (for form UIBB) • View : FORM_WINDOW • Configuration Name : SL_ORD_XX_ROOT_FORM

Enter the following details and press ‘SAVE’.

Figure 25: Maintain UIBB attributes

Now you need to configure your UIBB. For that click on ‘Configure UIBB’. Since the Configuration for this UIBB doesn’t exist, it will throw a message ‘The specified configuration does not yet exist’. Click on ‘Create’. This will create the configuration for the UIBB.

Once you have created the configuration, a dialog box will appear as shown in fig 26.

Page 30: FBI Cookbook

Figure 26: Maintain Feeder class

Now you need to provide the Feeder Class.

The composition (configuration) of the building blocks (Form UIBB & List UIBB) takes place in a designer-application where all the necessary field attributes, positioning and layout properties are assigned. Necessary application specific information will be supplied by the application itself via a Feeder class .

Those feeder implementations are based on a predefined interface definition providing all necessary methods and corresponding signatures in order to standardize the communication between the application and the GUIBB. This communication will embrace

� application definition (e.g. data definition, structure or table definitions and the technical

aspects) � the (optional) action definition based on metadata � the action/event handling and data forwarding to the underlying Application Model

The Feeder class /BOFU/CL_FBI_GUIBB_FEEDER is a generic feeder class i.e. it serves both types of UIBB, Form as well as List.

In the figure above, provide the Feeder class /BOFU/CL_FBI_GUIBB_FEEDER and then click on ‘Edit Parameters’.

A new dialog box will appear wherein you can supply the parameters to your configuration. It would appear as shown in fig. 27.

Page 31: FBI Cookbook

Figure 27: Maintain Configuration parameters

You can maintain the parameters as per your requirements. Parameters can be maintained depending upon whether you have created FBI View/ FBI View Usage or directly specify BO-Node associations. For further details refer to 3.1.1.1 & 3.1.1.2 for further details.

b) Let’s 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’.

Page 32: FBI Cookbook

3.1 Integration of Generic UIBB FBI supports both the Generic UIBBs i.e. Form & List.

3.1.1 Configuration of Form/List GUIBB

3.1.1.1 Creating a FBI View

a. Go to view cluster /BOFU/VC_FBI_V.

b. Click on ‘New Entries’.

c. Now you need to maintain the parameters.

i. FBI View: Appropriate view name

ii. Description: Appropriate description

iii. Business Object: Name of the Business Object

iv. Node: Node of the Business Object

v. Node UI structure: Structure which contains the fields relevant to the BO node. This can be the node structure maintained in the UI or any other DDIC structure.

vi. Mapper Class for the node: /BOFU/CL_FBI_VIEW_MAPPER

vii. Save your entry. The FBI view has been created.

d. Now you can maintain UI field descriptions for selected fields (optional). UI field descriptions can be maintained for those fields for which you want to enable OVS input and output binding.

3.1.1.2 Using FBI View /FBI View usage

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 Description

FBI View (/BOFU/FBI_VIEW) FBI View maintained in the view cluster /BOFU/VC_FBI_V

FBI View Usage (/BOFU/FBI_VIEW_USAGE) 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 don’t 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 Specifying the BO-Node associations dire ctly

Page 33: FBI Cookbook

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.

Parameter Name Description

Business Object (/BOFU/BO) You need to specify the BO created using the transaction /BOBF/CONF_UI

Node (/BOFU/NODE) Node of the Business Object

Source BO (/BOFU/SOURCE_BO) 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

Source Node (/BOFU/SOURCE_NODE) Node of the parent BO which has a valid association

Association (/BOFU/FBI_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.

Page 34: FBI Cookbook

Figure 28: Configure BOPF actions (Form GUIBB)

In case of List GUIBB, BO actions can be modeled on the GUIBB using ‘Configure Toolbar’. Refer to fig. 29.

Figure 29: Configure BOPF actions (List GUIBB) 3.1.1.5 Non-BOPF based Actions

User can define Non-BOPF actions in an FBI application. FBI handles these actions through the parameters of the component configuration.

Page 35: FBI Cookbook

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

Figure 30: Configure Non BOPF actions

3.2 Integration of Free-Style UIBB ���� CSM Parts

3.2.1 Configuration of Form/List CUIBB 3.2.1.1 Using FBI View /FBI View usage

3.2.1.2 Specifying the BO-Node associations direc tly

3.2.2 Action Handling 3.2.2.1 BOPF based Actions

3.2.2.2 Non-BOPF based Actions

Page 36: FBI Cookbook

3.3 Layout UIBB ���� CSM Parts

3.3.1 Master Detail

Page 37: FBI Cookbook

4 IDR Configuration ���� 10.04.2009, SP1

4.1 IDR title TODO

4.2 IDR ticket Area TODO

4.3 IDR Fields TODO

4.4 IDR Navigation Targets TODO

Page 38: FBI Cookbook

5 CNR Configuration ���� 10.04.2009, SP1

5.1 BOPF actions configuration against Toolbar Butt ons /Button Choices

5.2 Non-BOPF Action Configuration against Toolbar Buttons/Button Choices

5.3 Related Links/You Can Also

Page 39: FBI Cookbook

6 Building a small Application using FPM & FBI 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. 31

Figure 31: Create a web dynpro application

The application should have following parameters:

Component : FPM_OIF_COMPONENT (for OIF)

Interface View : FPM_WINDOW

Plug Name : DEFAULT

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.

Page 40: FBI Cookbook

Figure 32: Create a web dynpro application configur ation

2) Create Web Dynpro ABAP Application Configuration

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:

Page 41: FBI Cookbook

Figure 33: Web dynpro application configuration scr een

Now enter an appropriate Component Configuration name (in the configuration column as shown in the fig. above) for both the implementations i.e. FPM_OIF_COMPONENT & FPM_IDR_COMPONENT . Now select one of them and then click on ‘Go to Component Configuration’. This will lead to the creation of the component configuration. Repeat the same process for the other component.

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:

Page 42: FBI Cookbook

Figure 34: OIF component configuration

Now you have to maintain the Attributes of the main view. For that, click on ‘Main View: (1)’. A window will appear below where in you can maintain the attributes. Refer to the fig below.

Figure 35: Maintain Main View attributes

Similarly maintain the attributes for the Subview. In this example, for the Header main view, there is only one subview. So we will maintain the same attributes for the subview also.

Once the attributes are maintained for the views, we have to create the required UIBB(s) for these views. A subview would have by default one UIBB in it. You can add multiple UIBBs over here.

Page 43: FBI Cookbook

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 let’s 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 : FPM_FORM_UIBB (for form UIBB)

• View : FORM_WINDOW

• Configuration Name : SL_ORD_XX_ROOT_FORM

Enter the following details and press ‘SAVE’.

Figure 36: UIBB attributes

Now you need to configure your UIBB. For that click on ‘Configure UIBB’. Since the Configuration for this UIBB doesn’t exist, it will throw a message ‘The specified configuration does not yet exist’. Click on ‘Create’. This will create the configuration for the UIBB.

Once you have created the configuration, a dialog box will appear as shown in the fig below.

Page 44: FBI Cookbook

Figure 37: UIBB component configuration

Now you need to provide the Feeder Class.

The Feeder class /BOFU/CL_FBI_GUIBB_FEEDER is a generic feeder class i.e. it serves both types of UIBB, Form as well as List.

In the figure above, provide the Feeder class /BOFU/CL_FBI_GUIBB_FEEDER and then click on ‘Edit Parameters’.

A new dialog box will appear wherein you can supply the parameters to your configuration. It would appear as shown in the fig below.

Page 45: FBI Cookbook

Figure 38: Parameters of UIBB component configurati on

You can maintain the parameters as per your requirements.

In this example, we will provide the following parameters:

Business Object (/BOFU/BO) : /BOBF/DEMO_SALES_ORDER

Node (/BOFU/NODE) : 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 don’t need any such grouping, create one group and include all the fields in that group.

To create a group, click on ‘Add Group’. Refer to the fig below.

Page 46: FBI Cookbook

Figure 39: Configuring UI elements

Maintain the group attributes and save it. Now click on ‘Configure Group’. While configuring the group, you actually select the fields you need in on UI, their position and other properties.

Once you have configured your group, your screen would appear as shown in the fig below.

Figure 40: Maintaining FPM Event ID for the UI elem ents

Page 47: FBI Cookbook

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 let’s 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.

Figure 41: Add Main View to OIF component

Maintain the attributes for the Main view and the Subview as mentioned previously.

Since we need to create a List UIBB, maintain the attributes of UIBB accordingly.

Component : FPM_LIST_UIBB

View : LIST_WINDOW

Configuration Name : SL_ORD_XX_ITEM_LIST

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:

Parameter Value

Business Object (/BOFU/BO) /BOBF/DEMO_SALES_ORDER

Node (/BOFU/NODE) ITEM

Page 48: FBI Cookbook

Source BO (/BOFU/SOURCE_BO) /BOBF/DEMO_SALES_ORDER

Source Node (/BOFU/SOURCE_NODE) ROOT

Association (/BOFU/FBI_ASSOCIATION) ITEM

Now you need to select the fields which you need in your list. For that, click on ‘Configure Columns’. Refer to fig 25.

Figure 42: Component configuration of List GUIBB

Select the fields you need on your list. Press Save.

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.

Page 49: FBI Cookbook

Figure 43: Add Initial Screen to the OIF component

Maintain the UIBB attributes for the Initial screen. Refer to the fig below.

Figure 44: Maintain UIBB attributes

Page 50: FBI Cookbook

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.

Business Object (/BOFU/BO) : /BOBF/DEMO_SALES_ORDER

Node (/BOFU/NODE) : ROOT

Alternate Key (/BOFU/ALTKEY) : ORDER_ID

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.

Figure 45: Maintain Global Settings for the applica tion Provide the Web Dynpro Component as ‘/BOFU/WDC_FBI_CONTROLLER ’. Save your OIF component.

Now execute your web dynpro application. Since Initial screen was defined, it will appear as shown in the fig below.

Page 51: FBI Cookbook

Figure 46: Output – Initial Screen

Provide the appropriate input and the press ‘Start’. In this example it will be the Sales Order number.

Output will be something similar to as shown in the fig below.

Figure 47: Output – Order Header

Page 52: FBI Cookbook

Figure 48: Output – Order Items

Page 53: FBI Cookbook

7 Search Help ���� 10.04.2009, CSM Parts

Page 54: FBI Cookbook

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 Name of the selection parameter

o Kind of the Selection Parameter ( Select Option / Parameter )

o 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 � Selection parameter name

• KIND � Kind of selection parameter (Select Option / Parameter)

• PARAM_TYPE � input box/checkbox/dropdown list/text line

• SEL_CRIT_TYPE � (data element: POWL_CRITTYPE_TY) Select option with

o Interval & multi select

o without multi select

o without interval – only display relevant

o without interval – using complex restrictions

• MANDATORY � mandatory

• QUICK_SEL_CRIT � is it a quick selection criteria

• DEFAULT_VAL � Default Value

• VAL_MODE_DEF_VAL � Value mode of default value (Data Element: POWL_EASY_DEF_VALUE_MODE_TY)

o Read only

o Hidden

o Editable

Page 55: FBI Cookbook

8.1 Creation of a POWL Application + POWL (Feeder) Type T codes = FPB_MAINTAIN_HIER, POWL_TYPE, POWL_TYPEU.

Database table = /BOFU/IPBI_POWLF.

View Cluster = /BOFU/VC_PBI_P.

View = /BOFU/VFBIVU.

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 Reference Data Element

DEFAULT_QUERY None Multiple Multiple POWL_QUERY_TY

LAYOUT None Multiple Multiple POWL_LAYOUT_TY

Save the entry.

8.2 Configuration of the POWL (Feeder) Type using F BI 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

Page 56: FBI Cookbook

3. Feeder Class: /BOFU/CL_PBI_POWL_FEEDER

Save your entry.

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 Ty pe & 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_HIER&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.

Page 57: FBI Cookbook

Application Name

Description Text

POWL TYPE

Description

Feeder Class POWL TYPEU

Application

POWL Type

User

PBI POWL Definition

Query of BO Node

POWL URL

Define Query

APPLID = Appl Name

FBI VIEW

BO & Node

UI Fld Desc

Related Views

Actions

Page 58: FBI Cookbook

8.2.1 Configuration of Selection Criteria ���� 08.04.2009

8.2.2 Configuration of Field Catalog ���� 08.04.2009

8.2.3 Configuration of Buttons (Name, Order etc. ) ���� 10.04.2009, SP1

8.2.4 Configuration of Link targets per Action (Act ion buttons / Column Links) ���� 10.04.2009, SP1

8.3 How to create own PBI Based Feeder Class ���� 08.04.2009, CSM parts

8.3.1 Feeder Class Creation

8.3.2 POWL (Feeder) type Configuration

Page 59: FBI Cookbook

9 Property Handling Not necessary for Sprint1, concept needed at latest for sprint 2

Page 60: FBI Cookbook

10 Message Handling Not necessary for Sprint1, concept needed at latest for sprint 2