floorplan manager for web dynpro abap -...

374
SAP NetWeaver 2014-10-29 Floorplan Manager for Web Dynpro ABAP

Upload: vudang

Post on 30-Jan-2018

811 views

Category:

Documents


92 download

TRANSCRIPT

Page 1: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

SAP NetWeaver2014-10-29

Floorplan Manager for Web Dynpro ABAP

Page 2: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Table of Contents1 Floorplan Manager for Web Dynpro ABAP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 FPM Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1 Structure of a Floorplan Manager Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72.2 Floorplans. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.2.1 Floorplan for the Overview Page (OVP). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.2 Floorplan for Guided Activity (GAF). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.2.3 Floorplan for Object Instances (OIF). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.2.4 Floorplan for Quick Activity (QAF). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

2.3 User Interface Building Blocks (UIBBs). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.3.1 Interface: IF_FPM_UI_BUILDING_BLOCK. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.3.2 Generic User Interface Building Blocks (GUIBBs). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.3.3 Reuse User Interface Building Blocks (RUIBBs). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

2.4 FPM Event Loop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.4.1 Raising Standard FPM Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.4.2 Triggering the FPM Event Loop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262.4.3 Triggering Application-Specific Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262.4.4 Asynchronous Callback. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272.4.5 Interaction with Web Dynpro Phase Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282.4.6 Key Web Dynpro Methods used in FPM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282.4.7 Different Categories of Web Dynpro Interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .292.4.8 Triggering a Data-Loss Dialog Box in the FPM Event Loop. . . . . . . . . . . . . . . . . . . . . . . . . . . 30

2.5 FPM/Web Dynpro ABAP Adjustment Concept. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

3 Developing FPM Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.1 FPM Developer Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

3.1.1 FPM Workbench: Useful Tools in One Place. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343.1.2 Creating FPM Applications with the ACT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353.1.3 Application Hierarchy Browser for Floorplan Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403.1.4 Flexible User Interface Designer (FLUID). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423.1.5 Analyzing Applications with the Runtime Analysis Tool (RAT). . . . . . . . . . . . . . . . . . . . . . . . 643.1.6 Comparing Configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

3.2 Working with GUIBBs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673.2.1 GUIBBs in Detail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683.2.2 Value/Input Helps for Generic UIBBs (GUIBBs). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2253.2.3 Dynamic GUIBB Configurations at Runtime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2273.2.4 Context Menus and Action Menus in GUIBBs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2293.2.5 Quickviews. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2363.2.6 Moving Data between UIBBs at Runtime (Drag-and-Drop). . . . . . . . . . . . . . . . . . . . . . . . . .243

2 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Table of Contents

Page 3: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.3 Working with Floorplans. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2543.3.1 Working with the OVP Floorplan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2553.3.2 FPM Error Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2663.3.3 Variants. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2683.3.4 Initial Screen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2693.3.5 Confirmation Screen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2713.3.6 Default Actions (Hot Key = Enter). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2723.3.7 Dialog Boxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2723.3.8 Identification Region (IDR) of GAF and OIF Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . .2773.3.9 Adding and Activating Sub-Steps for GAF Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

3.4 Working with FPM Framework Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2823.4.1 FPM Toolbars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2823.4.2 Providing Users with Quick Help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2933.4.3 Sharing Data between UIBBs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2953.4.4 FPM Message Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3063.4.5 Work-Protect Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3263.4.6 Transaction Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3263.4.7 Resource Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3283.4.8 Application Controllers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3323.4.9 Navigation with Launchpads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3363.4.10 Determining Navigation State Information at Runtime. . . . . . . . . . . . . . . . . . . . . . . . . . . . .343

4 Adapting FPM Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3454.1 Customizing FPM Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3464.2 Personalizing FPM Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348

4.2.1 Personalizing Pages in an Overview Page Floorplan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3484.2.2 Personalizing the Hierarchical List Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3514.2.3 Personalizing the List ATS Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3524.2.4 Personalizing the Search Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354

4.3 Context-Based Adaptations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3554.3.1 Enabling an Application for CBA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3574.3.2 Creating and Editing an Adaptation of an Adaptable Application. . . . . . . . . . . . . . . . . . . . . .359

4.4 FPM Applications on Multiple Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3604.5 Application Enhancement Tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361

5 Special Topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3625.1 FPM CHIP Integration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362

5.1.1 Creating a CHIP for a Single UIBB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3645.1.2 Adding Systems to the Saved Searches CHIP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365

5.2 Embedding an FPM Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3665.3 Setting a Default ALV View for a Freestyle UIBB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368

5.3.1 Rendering ALV Views during Runtime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368

Floorplan Manager for Web Dynpro ABAPTable of Contents © 2014 SAP SE or an SAP affiliate company. All rights reserved. 3

Page 4: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

6 Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3706.1 Final Flags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3706.2 One-Click Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3706.3 Melting Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371

4 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Table of Contents

Page 5: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

1 Floorplan Manager for Web Dynpro ABAPUse

Floorplan Manager (FPM) is a highly configurable user interface (UI) framework for easy and efficient application development and adaptation based on Web Dynpro ABAP.

With the help of predefined elements such as floorplans, toolbars and generic user interface building blocks, FPM provides you with consistency across applications and compliance with SAP UI design guidelines, as well as greatly reducing the time required to create such applications.

Central functions such as navigation, messaging, and personalization are embedded in the framework, and can be easily defined by application programming interfaces (APIs).

FPM allows you to easily adapt delivered Web Dynpro ABAP UIs to your specific needs modification-free by simple UI configuration, and to combine application-specific views of one or more business applications into new Floorplan Manager applications.

Integration

FPM is a Web Dynpro ABAP application that is integrated into the Web Dynpro ABAP development environment.

Features

FPM supports you in creating and configuring UIs by providing you with, amongst other things, the following components:

● SAP-Defined FloorplansCombinations of UI patterns arranged in a specific order in an application, allowing the user to accomplish a certain activity, such as searching for, identifying, and maintaining data for an object.The areas of a floorplan such as a message area, navigation area, and content area are automatically implemented by the FPM framework.

● Generic UI Building BlocksSAP UI-compliant templates for displaying content. Examples include templates for displaying data in a form or list view.

● FPM Configuration Editor (FLUID-Flexible User Interface Designer)Editor allowing you to configure the application composition as a whole as well as the individual floorplan and generic UI building blocks within it.

More Information

See also Floorplan Manager for Web Dynpro ABAP in the SAP Community Network (SCN). Here you will find other useful information such as FPM tutorials, and documentation relating to adapting your FPM applications.

Floorplan Manager for Web Dynpro ABAPFloorplan Manager for Web Dynpro ABAP © 2014 SAP SE or an SAP affiliate company. All rights reserved. 5

Page 6: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Related Information

FPM Basics [page 7]An introduction to FPM concepts, and the essential components of an FPM application.

Developing FPM Applications [page 33]This section comprises the main part of the document.

Customizing FPM Applications [page 346]

Personalizing FPM Applications [page 348]End-users can personalize FPM applications at runtime to suit their own requirements.

Reference [page 370]

6 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Floorplan Manager for Web Dynpro ABAP

Page 7: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

2 FPM BasicsAn introduction to FPM concepts, and the essential components of an FPM application.

Related Information

Structure of a Floorplan Manager Application [page 7]Floorplans [page 9]User Interface Building Blocks (UIBBs) [page 18]

UIBBs are used to display the content on your UI, for example, data in a table or form.

FPM Event Loop [page 25]An event loop is triggered in an application by an event, such as a mouse-click. When an event occurs, the Event Loop ensures that the event is appropriately handled by ensuring that all relevant methods are triggered, and in the correct sequence too.

FPM/Web Dynpro ABAP Adjustment Concept [page 32]The concrete layout of an FPM application is determined by the application configuration, and the configurations of the embedded components (UIBBs). These configurations can be adjusted or changed at any time.

2.1 Structure of a Floorplan Manager Application

A Floorplan Manager (FPM) application is a Web Dynpro application that is assigned one of the following Web Dynpro components:

● FPM_OVP_COMPONENT● FPM_GAF_COMPONENT● FPM_OIF_COMPONENT

Each of the above components provides the application with a different type of floorplan. Floorplans define the general layout and interaction of an application. They are used for application composition and UI assembly. They are explained in detail in another section.

Using explicit configurations of the above components, you can assign additional Web Dynpro components as user-specific views to display your content. These user-specific views are referred to as UI building blocks (UIBBs).

NoteThere are different types of UIBBs:

● Freestyle UIBBsThese components are created outside the FPM framework, in the Web Dynpro ABAP development environment, by application developers. FPM has, therefore, little control over the layout of their content.

● Generic User Interface Building Blocks (GUIBBs)

Floorplan Manager for Web Dynpro ABAPFPM Basics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 7

Page 8: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

FPM makes life easier for application developers. To ensure that your application has a harmonized look and feel, and that there is consistency in the UI screens, FPM provides you with templates, the GUIBBs, for displaying your content. For example, there are templates to display your content in a form layout (Form GUIBB), and in a list layout (List GUIBB). When using a Form GUIBB, for example, you don't have to worry about aligning input fields - the FPM GUIBB takes care of that. UIBBs and GUIBBs are explained in greater detail in another section.

By combining a configuration of a floorplan with configurations of the UIBBs, you can compile most of the common application user interfaces.

The interfaces can be changed afterwards by changing both the floorplan and the UIBB component configurations.

The figure below illustrates an FPM application, showing a floorplan configuration containing two GUIBBs (for form layout and tab page layout) and a single freestyle UIBB. Note that the tabbed component is included only to show that it is a special kind of GUIBB that contains other GUIBBs.

Figure 1: Example Structure of a Floorplan Manager Application

Related Information

Floorplans [page 9]User Interface Building Blocks (UIBBs) [page 18]

UIBBs are used to display the content on your UI, for example, data in a table or form.

8 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

FPM Basics

Page 9: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

2.2 Floorplans

Concept

To improve the uniformity of user interfaces of applications in the Web Dynpro ABAP environment, Floorplan Manager (FPM) lets you implement floorplans.

A floorplan is a template. It is a combination of user interface (UI) 'patterns' arranged in a specific order in an application that allows a user to accomplish a certain activity, for example, searching for, identifying, and maintaining data for an object.

Each floorplan represents a different type of user activity and, therefore, floorplans form the basis of an application.

Each floorplan follows the SAP design standards for UI and is implemented as a separate Web Dynpro component.

The following list displays the floorplan types that are available and provides guidelines as to when to use them:

● Floorplan for Guided ActivitiesUse this floorplan when the user carries out an activity for which he or she requires guidance, that is, an activity that is not regularly performed or is unknown by the user. This floorplan provides a framework for breaking down the activity step by step.

● Floorplan for Overview PageUse this floorplan for activities that relate to managing business records, for example editing or deleting records. The overview page (OVP) floorplan provides an overview of all important information regarding a single instance of an object (such as a sales order, an employee, or an account). The OVP floorplan has highly flexible page layout possibilities and numerous user personalization features.The OVP floorplan supersedes the Object Instance floorplan (see below).

● Floorplan for Quick ActivitiesUse this floorplan when the user activity can be performed in one step and on one screen, that is, for a very simple activity.

● Floorplan for Object InstancesUse this floorplan for activities that relate to managing business records or objects, for example, editing or deleting records.

Integration

Floorplans form the basis of an application's layout. The content for an application is supplied by the user interface building blocks (UIBBs) which are added to the pages within a floorplan configuration.

You edit the floorplan component configuration of an application using the FPM configuration editor, FLUID.

Related Information

Floorplan for the Overview Page (OVP) [page 10]

Floorplan Manager for Web Dynpro ABAPFPM Basics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 9

Page 10: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Floorplan for Guided Activity (GAF) [page 14]Floorplan for Object Instances (OIF) [page 16]Floorplan for Quick Activity (QAF) [page 18]Working with Floorplans [page 254]

A section covering the features and activities concerning the various floorplans.

2.2.1 Floorplan for the Overview Page (OVP)

A design template that dictates the structure and behavior of a user interface of an overview page (OVP).

You can use this floorplan to model an application interface that initially displays an overview of the most important data to users for a business object such as an employee or a sales order. From there, users can navigate to various pages, for example, editing pages to add, change, or delete data. The OVP floorplan has numerous layout possibilities at design-time and can be easily personalized at runtime.

Runtime Layout

At runtime, an OVP application consists of content displayed in a number of collapsible panels. Depending on the configuration of the application, these panels can be moved around the UI, and even stacked upon each other to form a tab-strip. An OVP application may also display a Page Master panel (explanation below). The following screenshots illustrate how an application based on an OVP floorplan might look at runtime:

10 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

FPM Basics

Page 11: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Figure 2: OVP Floorplan

Structure of an OVP Application

The OVP floorplan consists of the following components:

● PageAn OVP floorplan consists of at least one page (content area). There are various page types; for example, a page can be a main page (for displaying the most important or top-level information), a sub-overview page (for displaying a certain subsection of information about a business object), a dialog box, or a confirmation screen. If multiple pages exist, then one page is flagged as the default.

● SectionEach page consists of one or more sections. These allow you to define the detailed structure of a page. Each section has its own layout, and can contain numerous application-specific user interface building blocks (UIBBs). Various layouts are possible for a section, differing mainly in the number of columns into which the section is divided. You can specify the position of a UIBB in a section using the Column, Row, and Sequence Index attributes of the UIBB. At runtime, the individual sections can be recognized by the number of columns they contain and by their differing column layouts. You assign the UIBBs and GUIBBs to the individual columns within a section. Section columns can be enabled for stacking; so that the UIBBs may, at runtime, be moved on top of each other to form a stack (tab-strip) where each UIBB is represented as a tab. The system only displays the section at runtime if you have assigned UIBBs to that section. However, if you remove the last UIBB from a section at runtime, the system shows an empty section as a possible destination for a UIBB if the user moves the UIBB over that section again.

Floorplan Manager for Web Dynpro ABAPFPM Basics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 11

Page 12: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● Assignment BlocksA UIBB inside a section is rendered with a panel, or flat without a panel; if rendered as a panel, it is known as an assignment block. It's title is displayed in the panel header. An assignment block may have its own toolbar. The toolbar elements are also rendered inside the panel header.

● Page MasterThis optional area appears on the left side, or on top of, the page at runtime in a non-collapsible, resizable panel. It allows an object selection that is valid for all assignment blocks and UIBBs on the page, allowing you to find and select entries quickly within a large quantity of related objects. Selecting an object in the panel triggers a refresh in the assignment blocks and UIBBs on that page, causing all UIBBs to display details relevant to the object selected in the panel. Assignment blocks and UIBBs are connected to the Page Master by FPM events or by wiring. The Page Master can be created and influenced by the OVP APIs at runtime.

● ToolbarsAn OVP application may have several toolbars specific to OVP components:

○ Global toolbar (specific to the whole page).○ Assignment block (UIBB) toolbar○ Page Master toolbar

OVP in Design-Time (FLUID)

You can view the design-time structure of an OVP application with the FPM configuration editor, FLUID.

In FLUID, the Overview Page Schema panel displays the following:

● PagesChoose the buttons in the Navigation panel to add, delete, and copy different pages in your application.

● SectionsYou can add and remove sections in this panel. You can specify attributes of each section of an OVP floorplan. For example, you can add and delete sections, specify the layout of the individual sections, add UIBBs to a section, and choose to include a Page Master panel on a page.

● Assignment Blocks and UIBBsIn this panel, you can add and remove UIBBs to and from a section. Amongst other things, you can specify the order in which several UIBBs within a section appear and whether a particular UIBB should be visible or not. You can also specify how big the content area of an assignment block should be.

● Page Master AreaIn this panel, you can add and remove a Page Master to a page, and specify attributes such as its position.

Choose the Toolbar Schema panel to access the attributes of the individual toolbars and their elements within an application. Here you can add and remove different toolbar elements such as buttons and button choices, and change the order they appear on the toolbar, as well as specifying attributes such as button text and event attributes.

In the Attributes panel of Page Master and UIBB toolbars there is a Capture Actions field that enables the provision of extra action buttons on the toolbar. These actions arise when a UIBB exposes actions at runtime (for example when the UIBB is based on a generic UIBB and the list of actions is provided by the feeder class). If you select the Capture Actions field, FPM then uses the UIBB-API to determine the available toolbar actions at runtime, and the resulting buttons are added to the toolbar alongside the configured buttons.

For more information about what you can configure in FLUID, see the field help for the individual attributes in the system.

12 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

FPM Basics

Page 13: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

2.2.1.1 Stacking of UIBBs in a Column

In an OVP application at runtime, UIBBs inside a column can be moved on top of each other to form a stack. Each UIBB is represented as a tab in a tab strip.

You can enable each section column for 'stacking'.

If stacking is enabled for a section column, the UIBBs can be dragged at runtime and dropped onto each other in that column, thus building a stack in which each UIBB is represented by a tab. This is known as a stacked panel.

In the FPM configuration editor, FLUID, UIBBs can be stacked using appropriate values for the properties Column (= Location), Row, and Index (see figure below):

There are two possible states for a stacked panel:

● ExpandedIn an expanded stacked panel there is exactly one UIBB that is expanded, that is, its property Collapsed is set to FALSE. All other UIBBs are collapsed, that is, their property Collapsed is set to TRUE. The expanded UIBB is the active UIBB in the stacked panel. Its property Default In Stack is set to TRUE.

● CollapsedIn a collapsed stacked panel all UIBBs are collapsed, that is, their property Collapsed is set to TRUE. There is, though, exactly one UIBB in the stacked panel with the property Default In Stack set to TRUE. If the stacked panel is expanded, this UIBB becomes the active UIBB.

Floorplan Manager for Web Dynpro ABAPFPM Basics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 13

Page 14: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

2.2.2 Floorplan for Guided Activity (GAF)

A design template that dictates the structure and behavior of a user interface of a guided activity.

You can use this floorplan to model an application interface that guides the user through an activity step-by-step. The activity is one that is generally complex, and not carried out by the user on a regular basis. A guided activity is divided into a series of logical steps, each of which can be broken down further into substeps, and all of which represent tasks and subtasks of an activity.

Runtime Structure

The figure below shows the runtime UI of an application based on the GAF floorplan:

This floorplan contains a series of screens associated with the different steps of an activity. The content of the screens is determined by the business object the floorplan is based on, or by the task that the user carries out with that business object.

The floorplan has the following schematic structure:

● Page Title (formerly, the Identification Region (IDR))The system displays the title and step of the current activity in this area.

14 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

FPM Basics

Page 15: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● Page ToolbarThe order and naming convention for the standard buttons are determined by the FPM framework.

● Message Region (not shown in the above screenshot)This area (above the roadmap) is only visible if at least one message has been generated by the system.

● RoadmapThis area displays an interactive figure, depicting the individual steps, and substeps of the activity. The user navigates through the roadmap by clicking the steps, or the toolbar buttons.The last step of a guided activity is usually a confirmation screen; this is not displayed in the roadmap. When the user completes the last step in the activity and presses the Next button (or what the developer of the application has defined the Final Action step to be), the confirmation screen appears, and the roadmap disappears. Note that it is possible for a guided activity to consist of only one step, followed by a confirmation step. In this case, the system displays just a single step in the roadmap.

● Information Area (not shown in the above screenshot)This optional area (below the page title), formerly known as the Extended Identification Region, displays all relevant information that more narrowly specifies the activity. It is divided into the following elements:

● Content AreaThis area provides information that can be edited by the user. The content is provided by individual UI building blocks (UIBBs). In the screenshot above, the content area contains a Form component.

Design-Time Structure (FLUID)

View the design-time structure of a GAF configuration with the FPM configuration editor, FLUID.

In FLUID, the Guided Activity Schema panel displays the following:

● StepsEach numbered step in a roadmap corresponds to one of the following types of steps displayed in the Guided Activity Schema panel in FLUID:

○ Main StepEach main step represents one roadmap step, and, usually, one main activity.

○ SubstepA substep is a step that appears between two main steps, and, represents a breaking-down of a main activity into smaller activities.

It is the UIBBs that provide the content in a step, and an FPM application must have at least one UIBB for each step. FLUID automatically provides this, but you can add your own predefined UIBBs. Using the fields inside the Attributes panel, you can characterize each step.Main steps and substeps are available on a Main Steps type of page.

● IDRTo make changes to the page title and information area, choose the Configure IDR button in the Guided Activity Schema.

A GAF configuration may also contain an Initial Screen and/or Confirmation Screen.

Related Information

Initial Screen [page 269]

Floorplan Manager for Web Dynpro ABAPFPM Basics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 15

Page 16: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

An optional screen that may appear as the first screen in an FPM application. It might be used, for example, to allow the user to enter data before moving on to the main screen.

Confirmation Screen [page 271]An optional page that is available for all floorplan types. It is generally used to confirm the status of an activity to the user.

Identification Region (IDR) of GAF and OIF Applications [page 277]GAF and OIF applications may contain an additional area for extra information.

2.2.3 Floorplan for Object Instances (OIF)

A design template that dictates the structure and behavior of a user interface for processing a business object instance.

You can use this floorplan to model an application interface that allows the user to create, delete, display, and change the attributes and associations of business objects (for example, an employee, or a purchase order).

NoteAlthough the OIF floorplan is still in use, it has been superseded by the Overview Page Floorplan (OVP) as it does not satisfy current UI guidelines.

Runtime Structure

An application configuration based on an OIF type floorplan typically shows multiple view tabs, whose content is determined by a defined business object, and the related tasks a user must perform.

This floorplan has the following schematic structure:

● Page Title (formerly, the Identification Region (IDR))The system displays the title and step of the current activity in this area.

● Page ToolbarThe toolbar contains action buttons and navigation options, and links to more detailed information.

● Information AreaThis optional area, formerly known as the Extended Identification Region, displays all relevant information that more narrowly specifies the activity.

● Message RegionThis area is only visible if at least one message has been generated by the system.

● Contextual Navigation Region (CNR)This area consists of view and subview tabs. Tabs are used for switching between different OIF views and subviews. They are implemented with the Web Dynpro ABAP HorizontalContextualPatternControl control. This is conceptually, technically, and visually different from TabStripControl and cannot be used outside of this navigation region of an OIF.

16 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

FPM Basics

Page 17: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

NoteIf the OIF configuration has been defined with only one main layer with only one sub-layer, the tabs and sub-tabs are hidden at runtime.

● Content AreaThis area provides information that can be edited by the user. The content is provided by individual UI building blocks (UIBBs).

An OIF configuration may also contain an Initial Screen and/or Confirmation Screen.

Design-Time Structure (FLUID)

View the design-time structure of an OIF configuration with the FPM configuration editor, FLUID.

In FLUID, the Object Instance Schema panel displays the following:

● Main Views and SubviewsEach main view or subview in the application configuration at runtime corresponds to one of the following types of views displayed in the Object Instance Schema panel:

○ Main ViewEach Main View in the hierarchy represents one main view tab at runtime. Each Main View must contain at least one subview (which are only visible at runtime if there is more than one).

○ SubviewA Subview in the hierarchy represents a view tab that appears under a main view tab. Like a main view, subviews must have at least one UIBB.

It is the UIBBs that provide the content in a view, and an FPM application must have at least one UIBB for each view. FLUID automatically provides this, but you can add your own predefined UIBBs. Using the fields inside the Attributes panel, you can characterize each view.Main views and subviews are available on a Main Screens type of page.

● IDRTo make changes to the page title and information area, choose the Configure IDR button in the Object Instance Schema.

An OIF configuration may also contain an Initial Screen and/or Confirmation Screen. Navigation to a confirmation screen is technically supported by the floorplan.

Related Information

Initial Screen [page 269]An optional screen that may appear as the first screen in an FPM application. It might be used, for example, to allow the user to enter data before moving on to the main screen.

Confirmation Screen [page 271]An optional page that is available for all floorplan types. It is generally used to confirm the status of an activity to the user.

Identification Region (IDR) of GAF and OIF Applications [page 277]

Floorplan Manager for Web Dynpro ABAPFPM Basics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 17

Page 18: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GAF and OIF applications may contain an additional area for extra information.

Floorplan for the Overview Page (OVP) [page 10]

2.2.4 Floorplan for Quick Activity (QAF)

Definition

A design template that dictates the structure and behavior of a user interface of a quick activity.

Use

You can use this floorplan to model an application interface allowing the user to create, delete, display, and change the attributes and associations of business objects. For quick activities, only the fields of a business object are shown that generally suffice for creating an object instance.

A quick activity is realized at design time by using the Object Instance Floorplan (OIF) component, FPM_OIF_COMPONENT with only one main view and one subview available.

More Information

Floorplan for Object Instances (OIF)

2.3 User Interface Building Blocks (UIBBs)

UIBBs are used to display the content on your UI, for example, data in a table or form.

From an FPM perspective, UIBBs are the interface views of a Web Dynpro ABAP component (the Web Dynpro windows).

UIBBs can be divided into the following categories:

● Freestyle UIBBsThese are UIBBs that are created by the external application. They cannot be configured by the FPM framework, and thus, FPM has limited control over the layout and format of the content displayed by these building blocks.

● Generic user interface building blocks (GUIBBs)These are UIBBs that are provided by the FPM framework itself. GUIBBs ensure a consistent look and feel for the UI, and ensure that screens are SAP UI-guideline compliant.

18 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

FPM Basics

Page 19: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

In order that FPM recognizes a UIBB, the Web Dynpro component that provides the UIBB must implement theIF_FPM_UI_BUILDING_BLOCK Web Dynpro interface. This interface ensures that the Web Dynpro application can take part in the FPM Event Loop.

Related Information

Interface: IF_FPM_UI_BUILDING_BLOCK [page 19]This Web Dynpro interface ensures that a Web Dynpro application and its UIBBs can take part in the FPM Event Loop.

Generic User Interface Building Blocks (GUIBBs) [page 21]Reuse User Interface Building Blocks (RUIBBs) [page 23]

2.3.1 Interface: IF_FPM_UI_BUILDING_BLOCK

This Web Dynpro interface ensures that a Web Dynpro application and its UIBBs can take part in the FPM Event Loop.

The methods of this interface are described in the following table:

Table 1: Methods of Interface IF_FPM_UI_BUILDING_BLOCKMethod Name Description

FLUSH The first method called after the FPM event loop has been started.

In this method, the UIBB must transport all modified data from the views to other components that the UIBB wants to communicate with later on.

Normally, this data transport is done automatically using Web Dynpro context map­ping. Therefore, only create a specific implementation of this method if you are not using this automatic mechanism.

NEEDS_CONFIRMATION In this method, the UIBB requests that the subsequent event processing is stopped, and asks the user for confirmation by way of a dialog box. Depending on the action the user takes in the dialog box, the event loop is continued or canceled.

For more details, refer to Triggering a Data Loss Dialog Box.

Floorplan Manager for Web Dynpro ABAPFPM Basics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 19

Page 20: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Method Name Description

PROCESS_EVENT In this method, the UIBB completes the following tasks:

● Checks for local consistency (validation, missing data, and so on)The local check is needed to inform the user of potential input errors as soon as possible. In accordance with UX guidelines, checks are to be performed contin­ually (as long as they are not too performance-intensive). For example, when switching from one view to another view in an OIF application, the view (UIBB) which is moved away from must check for local consistency.However, this does not exempt the application from performing a complete check (including performance-critical checks) before saving. This must be han­dled in the method IF_FPM_TRANSACTION_CHECK_BEFORE_SAVE.

● Performs the actual event processingFor this, the current event can be identified through the attributes MV_EVENT_ID and MO_EVENT_DATA of the event instance io_event that is passed on. Depending on whether the event is processed successfully or not, the exporting parameter EV_RETURN must be filled with either IF_FPM_CONSTANTS~GC_EVENT_RESULT-OK or IF_FPM_CONSTANTS~GC_EVENT_RESULT-FAILED.

A typical implementation of PROCESS_EVENT is shown below:

IF io_event->mv_event_is_validating = ABAP_TRUE. Do local checks and report messages if needed ENDIF CASE io_event->mv_event_id. WHEN XYZ Handle event and fill EV_RETURN accordingly with a value from IF_FPM_CONSTANTS~GC_EVENT_RESULT ENDCASE.

If the event processing requires further user interaction (for example, asking for fur­ther data in a dialog box), the event processing can be deferred by returning EV_RETURN = IF_FPM_CONSTANTS~GC_EVENT_RESULT-DEFER.

AFTER_FAILED_EVENT This method is called by FPM if an event could not be processed successfully. In this case, the UIBB must ensure that its UI reverts to the state before the user interac­tion occurred.

For example, let us say that selecting an option in a lead field in a table triggers the display of the details of this field in a new row in another UIBB. The event might fail if the UIBB containing the details contains unsaved data for the previously-selected table row. As the detail form still contains the details of the original table row (after the failed event), the lead selection must be reverted to the original table row too.

If the PROCESS_EVENT method of the current UIBB has been processed success­fully, but the event processing failed due to a problem in another UIBB, the actual event processing must also be reverted. The parameter IV_REVERT indicates this situation.

PROCESS_BEFORE_OUTPUT

This is the last method to be called on the UIBB. The data to be displayed is read from the model.

20 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

FPM Basics

Page 21: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

2.3.2 Generic User Interface Building Blocks (GUIBBs)

The FPM framework supplies you with generic UI building blocks (GUIBBs) for displaying the content in your applications.

GUIBBs are generic configurations based on feeder classes.

There is a complete separation of the UI and the business logic; the business logic is contained in the feeder class. In the feeder class, the application (at design time) defines the data to be displayed along with a configuration. The concrete display of the data on the UI is only determined by the GUIBB at runtime; this is done automatically using the configuration provided and with the data, to be displayed, specified by the feeder class.

You can edit a statically-created GUIBB using the FPM configuration editor, FLUID. However, GUIBBs can also be created dynamically at runtime; the FPM framework indicates the presence of such GUIBBs at design-time in the Message Area of FLUID.

GUIBB or Freestyle UIBB?

There are a number of reasons why using a GUIBB to display your content is preferable to using a freestyle UIBB:

● GUIBBs are SAP UI guideline-conforming templates for displaying content. They make it possible to improve the uniformity of the user-specific views, and provide an application with a harmonized look and feel.

● GUIBBs are fully integrated into the FPM framework. Amongst other things, GUIBBs take care of the UI layout, spacing, and certain product standards such as accessibility.

● GUIBBs provide you with a code-free configuration of the UI.

Which GUIBB to Use?

FPM covers most content display requirements by providing the GUIBBs outlined in the table below:

Purpose Suitable GUIBB

Display data in a list or table format ● List ATS Component● List ATS with Integrated Data Access (IDA)● Hierarchical List (Tree) Component● List Component

Display data in a form format ● Form GL2 Component● Form Repeater Component● Form Component

Display data as a search component ● Search Component

Floorplan Manager for Web Dynpro ABAPFPM Basics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 21

Page 22: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Purpose Suitable GUIBB

Display data in other formats ● Analytics Component● Chart Component● Launchpad Component● Personal Object Worklist (POWL) Component● Visual Business Component

Organise the layout of other GUIBBs ● Composite Component● Tabbed Component

More Information

Feeder Class

2.3.2.1 Feeder Class

A feeder class provides a link between the application and the generic user interface building block (GUIBB). The feeder class contains the business logic behind an application.

Feeder class implementations are based on a predefined interface definition (supplied by FPM), providing all necessary methods and corresponding signatures to standardize the communication between the application and the GUIBB.

This communication embraces the following:

● Application definition (for example, data definition, structure or table definition, and their technical aspects)● Default layout information, and corresponding field dependencies● The (optional) action definition based on meta data● Action/event handling, and data forwarding to the underlying application model

A feeder class is a class that implements one of the following ABAP interfaces:

● IF_FPM_GUIBB_FORM (for all Form components)● IF_FPM_GUIBB_FORM_REPEATER (for Form Repeater components)● IF_FPM_GUIBB_LIST (for all List components)● IF_FPM_GUIBB_SEARCH (for Search components)● IF_FPM_GUIBB_TREE (for Hierarchical List components)● IF_FPM_GUIBB_LAUNCHPAD (for Launchpad components)

Each interface above contains the same set of methods; it is the parameter list that is different for each interface.

The following methods must always be implemented by the application (to provide the data at runtime):

● GET_DEFINITIONDefines the field catalog of the component (that is, the fields that are available for use in the configuration), and supplies the component at runtime with data from the application using the GET_DATA method.

22 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

FPM Basics

Page 23: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● GET_DATA

NoteEven if you are not using a particular method in the feeder class interface, implement it as an empty method to avoid a system dump.

Feeder class settings can be accessed in the FPM configuration editor, FLUID; see the General Settings panel of the individual GUIBB component.

2.3.3 Reuse User Interface Building Blocks (RUIBBs)

Definition

A Generic UIBB (GUIBB) is a pure UI pattern that does not support any business functionality; the business functionality is provided in the feeder class by the application. However, a Reuse UIBB (RUIBB) is, more or less, a complete component offering common business logic and a user interface to go with it.

Floorplan Manager (FPM) provides the marker interface IF_FPM_RUIBB, which all WD components acting as RUIBBs, must implement.

FPM provides the following RUIBB components:

● Attachment Component● Notes Component

More Information

● Generic User Interface Building Block (GUIBB)

2.3.3.1 Attachment Component

Definition

A component used specifically for the handling of attachments or links in an application.

The required IF_FPM_RUIBB marker interface is implemented by the attachment 'wrapper' component FPM_ATTACHMENT_WRAPPER.

An Attachment Component is an example of a Reuse User Interface Building Block (RUIBB).

Floorplan Manager for Web Dynpro ABAPFPM Basics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 23

Page 24: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Structure

An attachment component is displayed in tabular format at runtime with each row representing a separate attachment or link.

At runtime, you can download new attachments and links, edit and delete existing ones, sort, filter, and group attachments and links.

The exact structure of the attachment component at runtime is determined by the feeder class of the list component within the attachment component.

Integration

You configure this component using the FPM configuration editor, FLUID.

Technically, an attachment component is a list component embedded in an attachment wrapper component. The information displayed at runtime is determined by the feeder class attached to the list component configuration. If you need to configure the data displayed in an attachment component, you therefore configure the list component configuration within it.

You can also edit where attachments are stored: open FLUID for the attachment wrapper component to display the Storage Type field.

More Information

● List Component (List ATS)

2.3.3.2 Notes Component

Definition

A component used specifically for the handling of notes in an application.

The required IF_FPM_RUIBB marker interface is implemented by the notes 'wrapper' component FPM_NOTES_WRAPPER.

A Notes Component is an example of a Reuse User Interface Building Block (RUIBB).

Structure

A notes component is displayed in tabular format at runtime with each row representing a separate note.

24 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

FPM Basics

Page 25: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

At runtime, you can create, edit, delete, and sort notes.

The exact structure of the notes component at runtime is determined by the feeder class of the list component within the note component.

Integration

You configure this component using the FPM configuration editor, FLUID.

Technically, a notes component is a list component embedded in a notes wrapper component. The information displayed at runtime is determined by the feeder class attached to the list component configuration. Therefore, if you need to configure the note component, you configure the list component configuration within it.

You can also edit where notes are stored: open FLUID for the notes wrapper component to display the Storage Type field.

2.4 FPM Event Loop

An event loop is triggered in an application by an event, such as a mouse-click. When an event occurs, the Event Loop ensures that the event is appropriately handled by ensuring that all relevant methods are triggered, and in the correct sequence too.

In Web Dynpro ABAP programming, a user interaction is reflected by a Web Dynpro action. If a user interaction should affect not only a local component but other components in the application too, the Web Dynpro action must be transferred to an FPM event.

This FPM event then passes through an FPM event loop (or phase model) which is integrated into the Web Dynpro phase model. Within the FPM event loop, all involved components can participate in the processing of the event.

If the FPM event results in another screen assembly (for example, navigation to another step in a GAF application), the FPM handles this itself; there is no need for the application to take care of this.

2.4.1 Raising Standard FPM Events

In a floorplan-based application, most events are triggered when a user chooses the Next or Previous buttons (in a GAF instance) or when switching from one page or view to another (in OVP or OIF instances). For these interactions, the FPM automatically initiates the FPM event loop. Furthermore, these standard events are handled generically by the FPM.

However, there are scenarios where a standard event needs to be triggered from within an application-specific UIBB, for example by-passing the Initial Screen if all necessary start-up parameters have been provided as URL parameters.

Each FPM event is represented at runtime by an instance of the class CL_FPM_EVENT. This class encapsulates all the information (including the ID and additional, optional parameters) which is needed to execute the event.

Floorplan Manager for Web Dynpro ABAPFPM Basics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 25

Page 26: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

2.4.2 Triggering the FPM Event Loop

Procedure

1. Create an instance of CL_FPM_EVENT with the appropriate attributes.

For all the standard event IDs, there are constants available in the IF_FPM_CONSTANTS interface.

2. Raise the event by calling the method IF_FPM~RAISE_EVENT and passing the instance of CL_FPM_EVENT.

When an event requires no additional parameters, other than the event ID, the FPM offers an additional method RAISE_EVENT_BY_ID. This makes Step 1 above obsolete. In this case, raise the FPM event as detailed in the sample code below:

data lo_fpm type ref to if_fpm lo_fpm = cl_fpm_factory=>get_instance( ) lo_fpm->raise_event_by_id( IF_FPM_CONSTANTS=>GC_EVENT-LEAVE_INITIAL_SCREEN )

Since it is unknown whether the event can be executed successfully or not at the point the event is raised, do not enter code after the call to RAISE_EVENT[_BY_ID].

2.4.3 Triggering Application-Specific Events

To raise an application-specific event, follow the same rules as described in Triggering the Event Loop section. The only difference is that the FPM, since it does not know the semantics of the event, does not perform specific actions for this event. However, the processing of the event is identical, in that all involved components participate in the event loop in the same way as with FPM standard events (see Reacting to Framework Events section).

The following code provides an example of triggering an application-specific event (including event parameters):

data: lo_fpm type ref to if_fpm, lo_event type ref to cl_fpm_event. create object lo_event exporting iv_event_id = 'DELETE_AIRPORT'. lo_event->MO_EVENT_DATA->set_value( iv_key = 'AIRPORT_ID' iv_value = lv_airport_id). lo_fpm = cl_fpm_factory=>get_instance( ). lo_fpm->raise_event( io_event = lo_event ).

26 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

FPM Basics

Page 27: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

2.4.4 Asynchronous Callback

With Web Dynpro's notification service, it is possible to start a long-running process from the UI in an asynchronous mode; whilst the process is running in the background, the UI remains free and the user can continue to work.

The user receives notification as soon as the process is completed. The service is wrapped by FPM so that it can be used without the need for a freestyle UIBB.

To use this service, the application must do the following:

1. Call IF_FPM~REGISTER_ASYNCHRONOUS_EVENT, and pass the FPM event to the method which shall be triggered after the asynchronous process is finished. This method returns a Notification ID.

2. When the process is finished, the application must inform the FPM framework by calling the following:

cl_wd_notification_service=>update_event_status( exporting event_id = iv_notification_id"The Notification ID returned by IF_FPM~REGISTER_ASYNCHRONOUS_EVENT event_status = cl_wd_notification_service=>c_status_done).

FPM then triggers the FPM event provided in the first step automatically.

Floorplan Manager for Web Dynpro ABAPFPM Basics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 27

Page 28: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

2.4.5 Interaction with Web Dynpro Phase Model

The FPM event loop is integrated into the Web Dynpro phase model, as the following figure shows:

Figure 3: FPM Event Loop

2.4.6 Key Web Dynpro Methods used in FPM

There are Web Dynpro methods that are used frequently in the FPM framework.

The following Web Dynpro methods are the most important ones in respect of FPM.

28 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

FPM Basics

Page 29: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Table 2:Method Description

DOINIT A standard Web Dynpro method that is called only once in the lifetime of a Web Dynpro component by the Web Dynpro runtime. This method is used to initialize your component, for example initialize attributes and create helper classes).

DOBEFOREACTION A standard Web Dynpro method that is called by the Web Dynpro runtime on all visible UIBBs when the user triggers a round trip. According to Web Dynpro pro­gramming guidelines, generic validations must be han­dled in this method; for example check that all manda­tory fields are filled.

Action handler (ONACTION…) The registered Web Dynpro action handler is called. You then have the following options:

● If the user interaction does not affect other UIBBs, and there is no need for FPM features such as data-loss dialog boxes, you can handle the action locally in your UIBB. Use standard Web Dynpro programming; for example selection of another ra­dio-button leads to different enabled/disabled set­tings of other controls on the same view.

● For all actions which may affect other UIBBs, raise an FPM event.

2.4.7 Different Categories of Web Dynpro Interfaces

With regard to the behavior of instantiating Web Dynpro components and their participation within the FPM event loop, the Web Dynpro interfaces provided by the FPM can be divided into the following categories:

● Category IMore than one Web Dynpro component implements this Web Dynpro interface.Those which do, may have more than one instance, and the instances may only participate in a part of the FPM event loop during the application’s lifetime. The following Web Dynpro interfaces belong to this category:

○ IF_FPM_UI_BUILDING_BLOCK○ IF_FPM_TRANSACTION, IF_FPM_WORK_PROTECTION○ IF_FPM_RESOURCE_MANAGER

● Category IIOnly one Web Dynpro component implements this Web Dynpro interface.The corresponding Web Dynpro component has only one instance which participates at all FPM event loops that happen during the application’s lifetime. The following Web Dynpro interfaces belong to this category:

○ IF_FPM_APP_CONTROLLER○ IF_FPM_SHARED_DATA

Floorplan Manager for Web Dynpro ABAPFPM Basics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 29

Page 30: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

○ IF_FPM_OIF_CONF_EXIT (and IF_FPM_GAF_CONF_EXIT and IF_FPM_OVP_CONF_EXIT)

NoteWhen using the interfaces IF_FPM_APP_CONTROLLER and IF_FPM_OIF_CONF_EXIT (or IF_FPM_GAF_CONF_EXIT or IF_FPM_OVP_CONF_EXIT ) together, they must be implemented by the same Web Dynpro component. Furthermore, if the Web Dynpro interface IF_FPM_SHARED_DATA is also required, it is recommended to implement it in that same Web Dynpro component too.

2.4.8 Triggering a Data-Loss Dialog Box in the FPM Event Loop

Each UIBB can request a data-loss dialog box during the FPM event loop.

Triggering the Dialog Box

To do this, you must return the pre-defined instance of the class CL_FPM_CONFIRMATION_REQUEST as shown in the following code-block:

METHOD needs_confirmation IF … eo_confirmation_request = cl_fpm_confirmation_request=>go_data_lossENDIFENDMETHOD

To display other confirmation dialog boxes, create your own instance of the class CL_FPM_CONFIRMATION_REQUEST and add your own application-specific text.

Resuming the Event

Once the required user input has been obtained, the frozen FPM event is continued (either receiving the result OK or FAILED).

To do this, call the FPM method RESUME_EVENT_PROCESSING within the action handler methods for the buttons of the dialog box. The sample code below shows how this might look:

DATA lo_fpm TYPE REF TO if_fpm. lo_fpm = cl_fpm_factory=>get_instance( ). lo_fpm->resume_event_processing( if_fpm_constants=>gc_event_result-ok ).

30 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

FPM Basics

Page 31: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

After the event is resumed, the remaining UIBBs are processed (if there is more than one UIBB). The following figure summarizes the behavior described above:

Figure 4: Phase Model for Triggering a Data-Loss Dialog Box and Resumption of Event

Floorplan Manager for Web Dynpro ABAPFPM Basics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 31

Page 32: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

2.5 FPM/Web Dynpro ABAP Adjustment Concept

The concrete layout of an FPM application is determined by the application configuration, and the configurations of the embedded components (UIBBs). These configurations can be adjusted or changed at any time.

Floorplan Manager uses the FPM/Web Dynpro ABAP Adjustment Concept for making such changes. This framework is illustrated in the figure below:

As illustrated above, you can adapt an FPM application to your needs on a number of different levels, and through a number of different people:

● Configuration Level (Developer)The fundamental modeling of an FPM application occurs on the this level. Various components used in the application are created, programmed, and given a basis configuration by developers.

● Customizing Level (Administrator)Applications with their basis configuration can be adapted to enterprise-specific requirements at the customer site on this level. This is done without modification to the underlying configuration. These kinds of adjustments usually occur on the client-level and for all users.

● Personalization Level (User)Applications can be changed by individual users in various ways to fit their personal needs on this level. This is done without modification to the underlying configuration..

The individual layers of this concept are explained in more detail in the relevant sections of this documentation.

For more information, search for Web Dynpro ABAP Configuration Framework in the SAP Help Portal.

32 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

FPM Basics

Page 33: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3 Developing FPM ApplicationsThis section comprises the main part of the document.

SAP-delivered applications are created in the Web Dynpro ABAP configuration layer by developers working in Expert (Developer) mode.

Changes made to the configurations in Expert mode are stored directly in the Web Dynpro ABAP configuration layer.

Changes made in Expert mode are modifications that are overwritten when a new release or enhancement package is imported.

Accessing the Configuration Layer

You access this layer by working in Expert (Developer) mode. For this, your user must have the S_DEVELOP authorization profile assigned. With this authorization profile for ABAP Workbench, you can make any and all changes to a user interface developed with Web Dynpro ABAP/FPM.

Opening an Application in the Configuration Layer

Choose one of the following options to open an application in the configuration layer:

● Locate the application configuration in transaction SE80 under Web Dynpro FPM Application Configurations , and choose Test from the context menu.

● Add the URL parameter sap-config-mode=config to the URL of the running application.

NoteFor applications running in SAP Enterprise Portal or SAP NetWeaver Business Client (NWBC) environments, it is sometimes not possible to add a URL parameter. In these environments, you can add the system parameter FPM_CONFIG_EXPERT in System User Profile Own Data Parameters in the system. Set the value of the parameter to X.

An FPM application running in the configuration layer displays the following buttons on the main toolbar:

● Configure Page and Show Configurable AreasProvide access to FLUID in Expert mode for the various components of the application

● Application HierarchyProvides access to the FPM Application Hierarchy Browser

Working in the Configuration Layer

Working in this layer, developers can carry out the following activities:

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 33

Page 34: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● Adapt components for the whole system● Define which settings can be overwritten in the customizing or personalization layers● Ensure that the correct component configurations are available to users

Related Information

FPM Developer Tools [page 34]A description of the developer tools available in the Floorplan Manager framework.

Working with GUIBBs [page 67]A section detailing the individual GUIBBs and their features, and features that are common to all GUIBBs.

Working with Floorplans [page 254]A section covering the features and activities concerning the various floorplans.

Working with FPM Framework Features [page 282]A description of the features provided by the FPM framework, and how to use them.

3.1 FPM Developer Tools

A description of the developer tools available in the Floorplan Manager framework.

Related Information

FPM Workbench: Useful Tools in One Place [page 34]Creating FPM Applications with the ACT [page 35]Application Hierarchy Browser for Floorplan Manager [page 40]Flexible User Interface Designer (FLUID) [page 42]Analyzing Applications with the Runtime Analysis Tool (RAT) [page 64]Comparing Configurations [page 66]

3.1.1 FPM Workbench: Useful Tools in One Place

Use

The Floorplan Manager (FPM) Workbench provides you with a set of tools that you commonly need when working with FPM applications, and it brings those tools together on one web page so you don't have to spend time searching for them in the FPM framework.

34 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 35: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Examples of such tools include the following:

● Configuration tools specific to FPM such as the FPM configuration editor, FLUID or the FPM Hierarchy Browser

● Wizards for creating new FPM applications● Maintenance tools for context-based adaptations (CBA)● Generic Web Dynpro configuration tools for editing, analysis, and cleanup such as the Web Dynpro

configuration editor or the WD Trace Tool● The FPM Test Suite which allows you to browse through the most important features that FPM has to offer

Starting the FPM Workbench

You can open the FPM Workbench by opening the Web Dynpro application FPM_WB using transaction FPM_WB.

More Information

A Web Dynpro CHIP, FPM_WB, containing the FPM Workbench can be found in Web Dynpro's Page Builder CHIP Catalog. You can configure the CHIP, for example, on your home/landing page.

For more information on Page Builder and the CHIP Catalog, see the documentation Creating Mashups with the Page Builder in the SAP NetWeaver library under UI Technologies.

3.1.2 Creating FPM Applications with the ACT

Use

The FPM Application Creation Tool (ACT) significantly reduces the effort involved in creating a new FPM application.

The tool itself is a Web Dynpro ABAP application, provided by FPM, which allows application developers to create FPM applications and their corresponding configurations for all available floorplans (OVP, GAF, and OIF).

The ACT also allows you to create applications for adaptable FPM components, that is, it allows you to create context-based adaptations (CBA) for your application.

Starting the ACT

Choose one of the following options to start the ACT:

● You can access the ACT from the FPM Workbench:

1. Enter the transaction FPM_WB on the SAP Easy Access screen.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 35

Page 36: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The FPM Workbench is opened.2. Under the heading Wizards for Creating Applications, choose Wizard for Creating Empty FPM Applications.

The ACT is opened. You can now start to create your application.● Double-click the FPM_CFG_BO_MODEL_ACT application in transaction SE80 (in the APB_FPM_CONF package,

choose Web Dynpro FPM Applications ).

Creating an Application with the ACT

1. Step 1: Enter Floorplan ObjectsTo do this, complete the following steps:

1. Under Web Dynpro Application, enter a name and, optionally, a description for your application. Naturally, you can enter the name of an existing WD application.

2. Choose a floorplan from the Select Floorplan dropdown list.3. Enter a namespace using the Namespace button.

The namespace is transferred to the configuration names of the various components of your application.4. Choose the Next button.

2. Step 2: Assign Package and Transport RequestEnter the package and transport details and choose Save on the main toolbar.The ACT creates the new FPM application and component configurations, and displays the following links in the browser:

○ Edit Configuration (FLUID)Choose this link to edit the component or application configurations using FLUID. There, you can enter the content (UIBBs) for your application and edit the layout of your application.

○ Execute ApplicationChoose this link to execute the newly created FPM application.

3. Choose one of the links to continue.

NoteThe ACT creates only the components and layout of an application; it does not create the code for the application.

If you created your application without choosing an existing WD component, your application appears empty at runtime (except for the icons on the FPM toolbar). You should choose the Edit Configuration link to add content and refine your application.

Related Information

Using Application Parameters [page 37]Application parameters are defined at Web Dynpro application level.

Creating FPM Applications based on SADL Entities using the ACT [page 37]

36 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 37: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.1.2.1 Using Application Parameters

Application parameters are defined at Web Dynpro application level.

After creating your FPM application, you can add parameters to the individual component configurations. To do this, complete the following steps:

1. In transaction SE80, double-click your Web Dynpro application.2. Choose Parameters.

You can add arbitrary parameters as application-specific attributes to your Web Dynpro application. During runtime, these parameters are exposed by IF_FPM->MO_APP_PARAMETER. MO_APP_PARAMETER stores an instance of IF_FPM_PARAMETER. You can retrieve the parameters with this interface.

Note that there is no concept of mandatory or optional parameters. For security reasons, you must never trust parameters passed by a different application. Always complete a proper validation before you use application parameters.

There are other FPM-specific parameters which you can add to your application; the following two may be of particular interest:

Parameter Parameter Description

FPM_SHOW_MESSAGE_LOG You can turn on a log history of the messages for a par­ticular application. When the message log is turned on, all the previously reported messages are displayed.

FPM_MAXIMUM_MESSAGE_SIZE When a message is created in the application, the mes­sage area displays as many messages as possible. As soon as the visible number of messages in the mes­sage area exceeds the configured message size, a scroll bar will appear in the message area, allowing the user to read all messages. The maximum size of the message is set at configuration.

There are also predefined Web Dynpro parameters which can be chosen using the value help.

3.1.2.2 Creating FPM Applications based on SADL Entities using the ACT

Use

The Floorplan Manager (FPM) framework contains a number of application wizards to create various types of FPM applications. There is a wizard for creating FPM applications based on Service Adaptation Definition Language (SADL) entities.

NoteSADL is a framework which enables consumption of different business object models, and other entity-based models, in particular DDIC tables and views, in a uniform way. Knowledge of the details of the modeling

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 37

Page 38: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

frameworks, such as Business Object Process Framework (BOPF) or (Business Object Layer ) BOL is not required; the SADL entity model exposes all the required information to the UI.

With SADL, it is possible to push down queries directly to the database itself, thereby improving response cycle times, and, with suitable databases, very large amounts of data (millions of records) can be retrieved and displayed tremendously quickly.

This wizard creates a simple application consisting of a search page, that is, a page containing a section for the search criteria and a section for the search results.

Procedure

You can access the wizard for creating FPM applications based on SADL entities through the FPM Workbench.

To open the FPM Workbench, enter the transaction FPM_WB in the SAP Easy Access - User Menu screen. Under the section listing the wizard applications, choose Wizard for Creating FPM Applications Based on SADL Entities. The wizard is opened in a new browser window, and displays an application with a series of roadmap steps.

NoteDetailed instructions for this application are available through Quick Help in the system. To access Quick Help, place your cursor anywhere within the application screen and select Display Quick Help from the context menu.

Follow the instructions for each step in the roadmap as listed below:

1. Step 1: Enter Floorplan Objects

a. Enter the following information:

○ Web Dynpro Application: Enter a name for your application.○ Description (Optional)○ Adaptation Options: (Optional) You can enable your application for context-based adaptations.

b. Choose Apply Namespace to add the relevant namespace.c. Choose Next to set the SADL entity.

2. Step 2: Set SADL Entity

a. Enter the following information:

○ Entity Type: Choose the mapped framework, such as Business Object Process Framework (BOPF). There are also other entity types such as DDIC tables and views.

○ Entity: Choose the business object node which underlies the query of your search page. This is referred to as your 'main' entity in this document.

NoteThe authorization checks implemented in the application you create with this wizard are dependent on the type of SADL entity type you choose:

○ When you create applications based on DDIC tables or views, the table data is protected using the authorization objects S_TABUDIS and S_TABUNAM as in the SE16 transaction. Your application checks whether the end-user has display authorization for the entire table.

38 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 39: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

However, there is currently no further check on whether the end-user has authorization for individual rows in the table (like the WD ABAP authority-check).

○ Other entity types may come with their own authorization concepts.

b. Choose Next to define the UI structure.3. Step 3: Join Associated Entities (View Building)

This step displays the information contained in the main SADL entity that you selected in Step 2. It displays the relationships of the main SADL entity (for example, associations of the BOPF node), and the entities that can be reached by following the associations. You have the possibility to display fields from these related entities in addition to those of the main entity.

a. (Optional) Select the checkboxes in the Join column to join your main entity with other entities, so that you can avail of the fields of those entities for the UI.If you do not make any joins, the UI displays only the fields of your main entity.

b. (Optional) To avoid possible field name collisions, you can enter a suffix for a field name in the Name Suffix column.

c. Choose Next to define the UI structure. assign a package and transport request.4. Step 4: Define UI Structure

Here you enter the details of the Search component configuration that you will use, and also the List ATS with IDA configuration that will display the search results.Optionally, you can add charts to display your data graphically. Choose the Add Chart button on the toolbar and enter the configuration details. You must define a chart with a Dimension (which field in your configuration provides the focus of the chart) and a Measure (which field contains the numerical data to be displayed).

5. Step 5: Assign Package and Transport RequestEnter a package and transport request and choose Save.The wizard confirms you have created a new application based on your chosen SADL entity, and that all necessary applications and configurations have been created.

Result

You can now edit your application with FPM's configuration editor, FLUID, or you can execute the application and use the Personalization button to choose which columns to display on the UI.

More Information

● For more information on the Business Object Process Framework (BOPF), see documentation under the SAP Business Suite section in the SAP Library ( http://help.sap.com).

● Context-Based Adaptations● For more information on developing applications with FPM, see the Floorplan Manager for Web Dynpro ABAP

- Developer's Guide on the SAP Community Network (SCN) at http://scn.sap.com .

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 39

Page 40: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.1.3 Application Hierarchy Browser for Floorplan Manager

Use

You can use this function to display ( Browser Mode) and copy ( Deep-Copy Mode) the structure of an FPM application with all of its component configurations.

For example, a copy of the component configurations of an FPM application is useful when you want to make an FPM application available for multiple roles but want the user interfaces to be different depending on these roles and to map these differences using separate component configurations or application configurations. This may include, for example, specialization of an FPM application for the manager and administrator roles or specialization of an FPM application for the American and German markets.

Features

The browser for the FPM application hierarchy has a display function (browser mode) and a copy function (deep copy mode):

● Browser modeIn browser mode, the entire structure of an FPM application is shown with all its components as a hierarchy.For every component, the component configuration ID (displayed as a hyperlink) is given along with the technical name of the component and the component view. You can choose the hyperlink in the Configuration ID column to move directly to the configuration editor of the relevant component configuration.In browser mode, the system displays the structure of an application on a tab page entitled Application Hierarchy: Configuration Level. The following tab pages may also be present:

○ Application Hierarchy: Customizing LevelIf a customizing exists for the application, the system additionally displays a separate tab page detailing all the customized components of the application in a hierarchy. The system also displays the Customizing icon, in the Configuration ID column, next to each customized component to remind you that you are working on the Customizing level when you choose the Configuration ID hyperlink.This tab page is only displayed if a customizing exists.

○ Application Hierarchy: Context-Based Adaptation LevelIf the application is an adaptable application, the system additionally displays a separate tab page detailing all the components of the adaptable application in a hierarchy. The dimensions of the adaptable application are automatically generated by the system and displayed on the toolbar of this tab page. Choosing a value for a dimension results in new component configurations being displayed in the hierarchy.This tab page is only displayed if the application is an adaptable application.

● Deep-Copy ModeTo access the Deep-Copy function, choose the Application Hierarchy: Configuration Level tab page and choose the Start Deep-Copy button on the page toolbar.In Deep-Copy mode, the entire structure of an FPM application is shown with all its components as a hierarchy. As opposed to browser mode, however, two fields are displayed in addition to the technical name, component view, and component configuration ID: The Copy checkbox and the Target Configuration ID input field.

○ Copy checkbox

40 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 41: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The Copy checkbox determines whether the component configuration is copied. When you open deep copy mode, all components are selected for the copy. You have the option of excluding individual components from the copy function. You cannot exclude the Web Dynpro application configuration or the Web Dynpro component configuration you used to launch the FPM application hierarchy browser from the copy.

○ Target Configuration ID input fieldThe Target Configuration ID input field contains a generated technical name for the configuration to be created. The system suggests the technical name of the source configuration and adds the suffix CP (for "copy") to the end.You can change this name if necessary. You can do this in two ways: Overwrite the default name directly in the input field or overwrite the default value using the Change Affix function. With this function, you can change determine a prefix or suffix for the default value. This affix then appears in all names suggested by the system.

When making the copy, the system also generates the references to the source configuration and source components for the newly created configurations. This saves you the time-consuming effort of copying the individual component configurations and re-creating the references of these configurations.

NoteOnly the standard configuration is used when copying a configuration. If adjustments have been made in the Customizing layer (administrator mode) or an enhancement of a configuration, they are not included in the copy. If the configuration has already been Customized or enhanced, this is displayed by the additional Customizing and Enhancement fields.

NoteOne FPM application can only be copied once for each time it is called in the runtime environment. If you want to make multiple copies of an FPM application, you must call the application multiple times in the runtime environment.

You can start the FPM application hierarchy browser in two ways:

● From the runtime environment of an FPM applicationIf you call the FPM application hierarchy browser from an FPM application, the system transfers the FPM application configuration to the FPM application hierarchy browser and skips the initial screen of the Web Dynpro application. The system will take you directly to browser mode.

● From the Web Dynpro Explorer by calling the Web Dynpro application FPM Application Hierarchy Browser (technical name: FPM_CFG_HIERARCHY_BROWSER).If you call the FPM application hierarchy browser using the Web Dynpro Explorer, you are taken to the initial screen, where you must first select an FPM application configuration or component configuration. The system then launches browser mode with this configuration.

NoteThis way is useful if you know the technical name of the desired application configuration or if you only want to process a component configuration.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 41

Page 42: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

NoteThe link to the application hierarchy browser is only visible in the runtime environment of the FPM application when the user parameter FPM_CONFIG_EXPERT= "X" or FPM_CONFIG_EXPERT= "A" is entered for your user. For the copy function, you need S_DEVELOP authorization in the SAP system.

Activities

Launching the Application Hierarchy Browser from an FPM Application

1. In the FPM application, choose the Application Hierarchy icon on the toolbar.The system opens the FPM application hierarchy browser in browser mode.

Launching the Application Hierarchy Browser from the FPM Application Hierarchy Browser Web Dynpro Application

1. In the Object Navigator (transaction SE80), choose the package APB_FPM_CONF.

2. Choose Web Dynpro Web Dynpro Applications .3. Double-click the FPM_CFG_HIERARCHY_BROWSER Web Dynpro application.

The Web Dynpro Explorer: Display Web Dynpro Application screen opens.

4. In the menu, choose Web Dynpro Application Test In Browser - Admin Mode .The system opens the Floorplan Manager: Application Hierarchy Browser browser window.

5. Enter an application component or component configuration.6. Choose Continue.

The system displays the selected application or component.

Copying Applications using the Deep-Copy Function

1. Choose the tab page entitled Application Hierarchy: Configuration Level.2. Choose Deep Copy Mode on the page toolbar.3. If you want to exclude components from the copy, remove the selection in the Copy checkbox.4. To copy the configurations, choose Start Deep Copy on the tab page toolbar.

The system then creates the relevant copies of the configurations.

3.1.4 Flexible User Interface Designer (FLUID)

Use

The flexible user interface designer (FLUID) is the browser-based editor for FPM application configurations, and their individual components. It replaces all previous FPM configuration editors.

You use FLUID to edit and enhance FPM applications, and their user interfaces, and to fit them to your business needs.

42 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 43: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

You can edit the following component configurations within an application using FLUID:

● Floorplan (Structure)Floorplans provide the structure of your application. Depending on the floorplan instance, you can add extra pages, steps, and views to your application.

● UIBB within the floorplan (Content)UIBBs provide the content of the user interface in your application. You can attach your UIBBs to the relevant pages, steps, views, and define how the UI looks at each stage of the application.

Amongst other things, you can also configure Quick Help for your application, change the global settings for your application, set variant parameters, and configure toolbars with predefined buttons and navigation menus, and attach events to these elements.

You launch FLUID in administrator (Customizing) mode or in expert (Developer) mode, depending on the types of changes you want to carry out, and for whom the changes are applicable.

For information about the individual fields in FLUID, see the context-menu option (right mouse-click) More Field Help in the system.

NoteUse Internet Explorer 7 or higher when using FLUID.

FLUID Layout

The following figure illustrates the layout of FLUID. However, as it can be personalized, it may not appear exactly as it does here:

FLUID can be broken down into the following parts:

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 43

Page 44: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● Title BarDisplays the name of the component configuration, and the active screen or page within it.

● Page ToolbarAs well as switching between edit and display modes, this toolbar provides you with toggle buttons to control the display of the Adaptations, Comparisons, Repositories, Navigation, and Attributes panels. Additional Functions displays menu options for testing your application (displaying it in the runtime environment), making copies of application configurations and their individual component configurations ( Deep-Copy), creating modification-free enhancements, and resetting customizing changes, and displaying properties of the component such as package details.In edit mode, the toolbar displays the Save As Draft button, allowing developers to continue making changes to a configuration at a later date. A message appears if a draft version of a configuration exists.

● Message AreaThe primary area for the display of system messages.

● Bread CrumbAllows you to move to different components within your application configuration. When navigating between different components, FLUID ensures that the original work mode ( edit or display) for each component remains the same.

● PanelsFLUID is divided into a number of areas and panels, each with a different function; not all are visible for all components. These are described in detail in the following sections.

General Settings Panel

The information displayed in this panel is component-dependent. Information that relates to the floorplan or GUIBB component as a whole is displayed here. The panel is divided into the following sections:

● Classification SettingsComponent configurations may be grouped into different classifications.

● Transient SettingsSettings to determine the transient behavior of the application.

● Message SettingsSettings to control the appearance of the Message Area.

● Additional SettingsSettings specific to the particular floorplan or GUIBB being edited.

The toolbar in this panel is also component-dependent. It provides you with access to a number of actions for both the floorplan and GUIBB component. Menu options for the floorplan components include Application Controller Settings, Event Action Types and Message Mapper Settings. Menu options for the GUIBB components include settings for Final Flags, Feeder Class, and Drag-and-Drop settings.

Preview

Illustrates how the application looks at runtime. It displays the interface of the application as a set of configurable components (the UIBBs), which you can individually select to edit their attributes. You can drag-and-drop the individual UIBBs around this panel. You can also access the attributes of toolbar elements from this panel, and move elements around in the toolbar.

44 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 45: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The way objects are displayed in this panel depends on which level of your application (floorplan or UIBB) you are. From the floorplan level, you can navigate directly into the individual UIBBs (to find out if a UIBB is configurable, move the mouse over the UIBB box; the box changes color, and an icon appears in the top right corner of the box). Choose the icon to navigate directly to the UIBB component. If the UIBB component is actually an FPM GUIBB component, you remain inside FLUID; otherwise, you are transferred to the standard Web Dynpro editor.

On both floorplan and UIBB levels, a context menu allows you, for example, to navigate to and configure the different components in your application, add or delete UIBBs, and add new sections and toolbar elements.

This panel also contains the Show/Hide UIBB Preview button. This allows you to change how the UIBB is displayed in the Preview panel; UIBBs can be displayed as abstract boxes with their most important technical details, or they can be displayed as they would appear at runtime. Only UIBBs that have implemented the interface IF_FPM_CFG_UIBB_PREVIEW can be displayed as they would appear at runtime. This feature is available for all floorplan components (except the OVP floorplan), and the tabbed component.

Object Schema (for example Guided Activity Schema, Overview Page Schema, List Schema, Form Schema)

Outlines the structure of the individual GUIBB or floorplan configuration, and displays its UI elements in a tabular form. You can move elements within the table by using the Up and Down buttons, or by dragging them to a new location. You can select elements in the table, and edit their attributes in the Attributes panel.

The toolbar of this panel is component-dependent. It provides the following actions:

● Add or remove individual UI elements to the GUIBB or floorplan component, for example, add a main step to a GAF floorplan, or add a column in a List component.

● Configure the IDR (of OIF and GAF floorplan configurations)● Configure a UIBB (the Configure UIBB button is only visible when the component has a configuration name).

Attributes

Displays the attributes of configurable UI elements. Whether you can edit these elements depends on the UI element itself. In this panel, you also have access to the following features:

● Display-type propertiesEach display type has its own set of properties. For more information on display types, search for User Interface Elements in the Reference section of the Web Dynpro ABAP documentation in the SAP Help Portal.

● Action assignments for buttons● Final Flags

See the link at the end of this section.

Navigation

Allows you to move between, and select, the pages you would like to edit in your application, for example, the initial screen, the main screen of an application variant, an edit page, or a dialog box. Here, you can also add new,

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 45

Page 46: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

delete, and copy pages in your application. The type of pages available in the Navigation panel is floorplan-dependent.

This panel is available only for the floorplan configurations.

Repositories

Provides you with a list of repository items that can be dragged to the object schema, and Preview panels. The list of repository items is component-dependent, and includes, for example, form fields, list columns, search criteria and search result list items, and UIBBs for the floorplan, composite and tabbed components. You can search for specific component configurations by entering values in the Component, View or Configuration fields, or you can display all component configurations for a specific type of UIBB.

This panel may also contain a Buttons section from which you can drag various toolbar elements to the object schema, Toolbar Schema, and the Preview panels.

The New button allows you to create a new UIBB component configuration, which is then added to the Repositories panel, and which you can drag to the object schema panel (for example, the Guided Activity Schema), and Toolbar Schema panels.

NoteThe new UIBB configuration is always created on the configuration (development) level, even if you launch FLUID in administrator mode.

Adaptations

Allows you to easily create adaptations of existing configurations based on different user contexts, for example, country or role. These adaptations are known as Context-Based Adaptations (CBA). CBA is covered in more detail in another section of this document.

Comparisons

Indicates the changes that have been made to a configuration, and on which level of the Web Dynpro ABAP configuration framework they have been made (for example, on the Customizing level, or on the configuration (developer) level). Comparing configurations is covered in more detail in another section of this document.

Toolbar Schema

Displays the toolbar plan, and individual toolbar UI elements of your application. You can add additional elements to the toolbar (such as and buttons, button-choices and links), and edit their attributes in the Attributes panel. Note that the available toolbar elements vary according to the type of page you are working on. The position of

46 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 47: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

some toolbar elements is determined by the FPM framework, and is unchangeable. Toolbars are covered in more detail in another section of this document.

Wire Schema

Displays the individual wires (connections) between the UIBBs in a floorplan component. It is available only for the floorplan components, and the Composite UIBB component. It also displays the transaction handler class. It allows you to add and remove wires, and also gives you access to the Graphical Wire Editor; a tool for creating and editing wires within your application in a graphical, easy-to-understand way. Wires are discussed in more detail in the Sharing Data Between UIBBs section of this document.

Quickview Schema

Displays details of any quickviews that might be anchored to particular elements of a GUIBB. Hence, this panel is visible only for the GUIBB configurations, and not for floorplan configurations. Quickviews are covered in more detail in another section of this document.

Menu Schema

Displays details of action menus and context menus that are used in the application. This panel allows you to configure existing menus, and to create and define new menus of both types. These menu types are covered in another section of this document.

Moving Items between Panels

For most floorplan and UIBB configurations, you can add items from the Repositories panel to the Preview and the object schema panels using drag-and-drop; you can remove them too by dropping them back on to the Repositories panel.

Related Information

Personalizing FLUID (Application-Specific) [page 48]Viewing Freestyle UIBBs in FLUID [page 48]Editing Applications with FLUID - Examples [page 49]Context-Based Adaptations [page 355]Wiring with the Graphical Wire Editor [page 303]Final Flags [page 370]

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 47

Page 48: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.1.4.1 Personalizing FLUID (Application-Specific)

Use

When you open an application in design time using FLUID, the Floorplan Manager configuration editor and user interface designer, you can change the layout and appearance of FLUID to suit your own requirements.

The changes you make are user-specific and application-specific.

The changes you make to FLUID in an application are remembered by the system; your changes are visible the next time you open FLUID for the same application.

Features

You can personalize FLUID in the following ways:

● Change the appearance and layout of the panels

○ Use the Collapse and Expand icons in the panel headers to change their display state○ Rearrange panels using drag-and-drop

Place the cursor in the title area of a panel and drag the panel to another position in the work area. This is not applicable for the Navigation and Repositories panels.

○ Place panels in one column or place them on top of each other to form a tabstripTo place the panels in a tabstrip, place the cursor in the title area of a panel and drag the panel on top of another panel's title area. The title area of the second panel is selected, indicating that you can drop the first panel on top of it. You can change the order of panels in a tabstrip using the method just described.To place the panels in a single column, place the cursor in the title area of a panel and drag it to a free space within the work area (area right of the vertical splitter control). A dotted line appears indicating the new position of the panel.

○ Adjust the size of the work area using the splitter controls located at the bottom and on the left side of the work area.

● Add, remove, and move columns in the following panels using the Personalize button on the panel's toolbar:

○ Floorplan/GUIBB Schema○ Toolbar Schema○ Wire Schema○ Navigation Panel

● Choose the Navigation, Repositories, and Attributes toggle buttons on the page toolbar to display the corresponding panels.

3.1.4.2 Viewing Freestyle UIBBs in FLUID

To be able to display a freestyle UIBB in the Preview panel of FLUID, the application must implement the FPM Web Dynpro IF_FPM_CFG_UIBB_PREVIEW interface.

48 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 49: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

This interface provides the UIBB_PREVIEW method with the IV_INTERFACE_VIEW importing parameter, which is the actual visible view, and the EV_PREVIEW_WINDOW exporting parameter.

The application itself must check that the window which is returned is defined, and functions correctly at design time.

Related Information

User Interface Building Blocks (UIBBs) [page 18]UIBBs are used to display the content on your UI, for example, data in a table or form.

3.1.4.3 Editing Applications with FLUID - Examples

Use

You edit your Floorplan Manager (FPM) applications with FLUID (Flexible UI Designer), FPM's UI designer and configuration editor.

As an introduction to editing your applications using FLUID, the next sections show you how to carry out the following activities:

● Accessing and editing the UIBB component:Editing UIBB Components in an Application (generic procedure)Adding an Existing UIBB to an ApplicationAdding a List Component to an ApplicationAdding a Tabbed Component to an ApplicationEditing a Form Component inside an Application

● Editing the floorplan component:Editing the Floorplan Component of an Application (generic procedure)Changing the Title of a Roadmap Step in an ApplicationAdding a New Button to the Toolbar in the Floorplan Component

● Other activities:Moving Between the Floorplan and UIBB Components

NoteIn the example activities above it is assumed that you edit your application configurations on the Customizing level, that is, you use FLUID in the administrator mode.

Related Information

Customizing FPM Applications [page 346]

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 49

Page 50: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

FPM/Web Dynpro ABAP Adjustment Concept [page 32]The concrete layout of an FPM application is determined by the application configuration, and the configurations of the embedded components (UIBBs). These configurations can be adjusted or changed at any time.

Flexible User Interface Designer (FLUID) [page 42]

3.1.4.3.1 Editing the Floorplan Component of an Application

Use

Floorplan Manager (FPM) applications contain a floorplan component configuration and one or more UI building block (UIBB) component configurations. You use FPM's configuration editor, FLUID (Flexible User Interface Designer), to make changes to both the floorplan and UIBB component configurations.

Procedure

This procedure is a generic procedure for accessing and editing the floorplan component of an application configuration. To do this, proceed as follows:

1. Run the application you want to edit and choose the Customize Page icon on the main toolbar.2. Create a new Customizing for the component if none exists and select the relevant transport request.

The FPM configuration editor, FLUID, is displayed in edit mode.3. Choose the Navigation, Attributes and Repositories toggle-buttons on the toolbar to display the corresponding

panels.4. In the Navigation panel, choose the correct variant and page you want to edit in your floorplan.5. You can now make the following changes, amongst others, using the panels below:

○ <Floorplan Type> Schema

○ Select a row containing the various floorplan elements and edit their corresponding attributes in the Attributes panel. For example, you can select the main view of an OIF (Object Instance Floorplan) component and change the Main View Name attribute.

○ Add a new main view or subview to an OIF floorplan, or a new main step or substep to a Guided Activity floorplan (GAF) or a new page to an Overview Page floorplan (OVP).

○ Choose the Add Explanation button on the toolbar to add explanations to the various floorplan elements that the user can read at runtime.

○ Choose how to display the UIBBs within a section for an OVP floorplan.○ Add an additional UIBB to the floorplan by choosing the Add UIBB button on the toolbar or by

dragging an existing one from the Repositories panel.○ Toolbar Schema

Add further elements to the floorplan toolbar(s) or rearrange existing toolbar elements. You can edit the Visibility attribute to decide whether a toolbar element is visible or not.

○ Wire SchemaAdd wires between UIBBs within your floorplan. Wires enable the transfer of data between the UIBBs.

50 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 51: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

○ General SettingsMake changes to the floorplan component as a whole in this panel.Settings relating to the display of the Message Area allow you to determine whether or not you display the message log.The Scroll Bars field allows you to determine whether the system should display scroll bars for the floorplan component at runtime.The OVP floorplan offers you several additional options. For example, you can enable personalization of the floorplan, choose whether the UIBBs within your floorplan are displayed as read-only or editable at runtime, and choose whether UIBBs that are displayed in collapsed panels participate in the FPM event loop only when the panel is expanded.

○ Navigation panelEdit or add new types of pages to your application (for example, an initial page, an edit page, or a dialog box. You can also create new variants for the floorplan.

6. Save your changes.

More Information

● Editing Applications with FLUID● Wiring -Transferring Information between UIBBs

3.1.4.3.2 Changing the Title of a Roadmap Step in an Application

Use

A roadmap is a graphical illustration of the individual steps of an activity performed by a user to complete a task. The roadmap is divided into a series of main steps, each of which can be further divided into substeps. The user can click a toolbar button or directly on a step to navigate through the roadmap.

The Guided Activity Floorplan (GAF) is a floorplan type based around such a roadmap.

This procedure details how to edit the floorplan component of an application configuration, using a change of title in a roadmap step as an example.

Procedure

To change the title of a roadmap step in a guided activity floorplan type, proceed as follows:

1. Run the application and choose the Customize Page icon on the toolbar.2. Create a new Customizing for the component if none exists and select the relevant transport request.

FLUID is opened and displays the application in edit mode.3. Choose the Navigation button in the main toolbar to display the Navigation panel and choose the page on

which the GAF roadmap exists (you can see the roadmap immediately in the Preview panel).

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 51

Page 52: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

4. Choose the relevant step in the Preview panel or in the Guided Activity Schema.5. Choose the Attributes button in the main toolbar to display the Attributes panel and enter a new name for the

step in the Main Step Name (or Substep Name) field.6. Choose Save.

To see your changes at runtime, choose Test under the Additional Functions button on the toolbar.

More Information

Editing Applications with FLUID

3.1.4.3.3 Adding a New Button to the Toolbar in an Application

Use

A Floorplan Manager application may contain several toolbars. These toolbars may appear in the floorplan component or the UIBB component or both.

This procedure details how to access a toolbar in the floorplan component of an application.

Procedure

To add a new button to a toolbar in the floorplan component of an application, proceed as follows:

1. Run the application and choose the Customize Page icon on the toolbar.2. Create a new Customizing for the component if none exists and select the relevant transport request.

FLUID is opened and displays the application in edit mode.3. Choose the Toolbar Schema.4. Choose the Add Toolbar Element button in the toolbar of the Toolbar Schema.

The Select Toolbar Elements dialog box opens.5. Choose a toolbar element from the range of buttons, button-choices and links. The toolbar element now

appears in the Toolbar Schema and is visible also in the Preview panel.6. Choose the Attributes button on the main toolbar to display the Attributes panel and edit the fields of your

new toolbar element (for example, enter a name for your button in the Text field or assign an FPM event ID).7. Choose Save.

To see your changes at runtime, choose Test under the Additional Functions button on the toolbar.

52 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 53: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

More Information

Editing Applications with FLUID

3.1.4.3.4 Editing UIBB Components in an Application

Use

Floorplan Manager (FPM) applications contain a floorplan component configuration and one or more UI building block (UIBB) component configurations. You use FPM's FLUID (Flexible User Interface Designer) to make changes to both the floorplan and UIBB component configurations.

Procedure

This procedure is a generic procedure for accessing and editing UIBB components in an application configuration. To do this, proceed as follows:

1. Run the application you want to edit and choose the Show Customizable Areas icon on the main toolbar.This displays all the customizable UIBBs within the floorplan of your application; a colored overlay appears over those UIBBs which are customizable.

2. Choose one of the customizable UIBBs.A separate browser window opens.

3. Create a new Customizing for the component if none exists and select the relevant transport request.The FPM configuration editor, FLUID, is displayed in edit mode.

4. Choose the Attributes and Repositories buttons on the toolbar to display the corresponding panels.You can now make the following changes, amongst others, using the panels below:

○ <GUIBB Component> UIBB Schema

○ Select a row containing an individual element of the UIBB and edit its attributes in the Attributes panel. For example, you can rename a column header of an individual column in a list component or choose the display type of a column.

○ Add additional, UIBB-specific elements to the UIBB by choosing buttons on the toolbar or by dragging existing ones from the Repositories panel.

○ Toolbar SchemaAdd further elements to the floorplan toolbar(s) or rearrange existing toolbar elements. You can edit the Visibility attribute to decide whether a toolbar element is visible or not.

○ Menu SchemaEdit or create new action menus and context menus. Note that this panel is not available for all GUIBBs.

○ General SettingsMake changes to the GUIBB component as a whole. For example, for a list component there are settings to determine the appearance of the complete list; you can determine the number of rows and columns to display, how many fixed columns there are, the total width of the list, and whether you can export the list to a spreadsheet.

Note that not all panels are available for all UIBB components.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 53

Page 54: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

5. Save your changes.

More Information

● Editing Applications with FLUID

3.1.4.3.5 Adding an Existing UIBB to an Application

Use

You can add additional, application-specific views (UIBBs) to a Floorplan Manager application at any time.

You add existing UIBBs (freestyle or GUIBB) to the floorplan component configurations of your application.

This is a simple, generic procedure for adding existing UIBBs to an application; there are other examples specific to individual GUIBBs.

Prerequisites

The UIBB you want to add to your application has already been created.

If you are adding a generic UIBB (GUIBB) such as a list or form component, you must assign a feeder class to the GUIBB beforehand.

Procedure

1. Run the application and choose the Customize Page icon in the toolbar.2. Create a new Customizing for the component if none exists and select the relevant transport request.

FLUID is opened and displays the application in design mode.3. From the main toolbar, display the Navigation panel and choose the page in which the UIBB will be inserted.4. Choose the <Floorplan Component> Schema panel (for example, Guided Activity Schema, Overview Page

Schema, or Object Instance Schema); this is the panel in which you insert your UIBBs.5. Select an appropriate row in the table and choose Add UIBB in the toolbar of the object schema panel.6. In the dropdown list of the Add UIBB button, choose the type of UIBB that you want to add to your floorplan.

The UIBB is inserted in the row that you selected. If you chose a generic UIBB (GUIBB) from the list (for example, Form Component), the system automatically completes the fields Component (Name) and Window Name. You need only to enter the name of your configuration. If you chose a freestyle UIBB, you must enter details for all three fields, Component (Name), Window Name and Configuration Name.

7. Choose Save.

To see your changes at runtime, choose Test under the Additional Functions button on the toolbar.

54 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 55: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

NoteYou can only edit your UIBB further, using FLUID, if you have entered a configuration name for the UIBB.

NoteThere are other methods for inserting a UIBB into the floorplan component configuration of your application. Choose the Repositories panel to search for an existing UIBB, and drag it to either the Preview panel or the <Floorplan Component> Schema panel.

More Information

● Editing Applications with FLUID● Adding a List Component to an Application

3.1.4.3.6 Adding a List Component to an Application

Prerequisites

The list component configuration exists already and a feeder class has been assigned to it.

Context

You can add an additional, application-specific view (UIBB) to a Floorplan Manager application at any time in the form of a new list.

Procedure

1. Run the application you want to edit and choose the Customize Page button on the main toolbar.

2. If there is no previous Customizing for the component, you must create one. Choose New on the toolbar. Enter a description and a transport request for the new Customizing and choose OK.

The FPM configuration editor, FLUID, is displayed in edit mode.3. Choose the Navigation, Attributes and Repositories buttons on the toolbar to display the corresponding

panels.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 55

Page 56: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

4. You can add a list component in the following ways:

○ Drag a component from the Repositories panel into the <Floorplan Type> Schema panel

1. Under the UIBBs section of the Repositories panel, use the filter fields to locate your existing list component configuration. For example, choose List UIBB in the UIBB Type field.A list of existing configurations for the list component appears.

2. Drag the required configuration into the <Floorplan Type> Schema panel. Use the Up and Down buttons on the toolbar to move the configuration into the required location.A new row appears in the <Floorplan Type> Schema panel table indicating the UIBB you have just added.

○ Drag a component from the Repositories panel into the Preview panel

1. Under the UIBBs section of the Repositories panel, use the filter fields to locate your existing list component configuration. For example, choose List UIBB in the UIBB Type field.A list of existing configurations for the list component appears.

2. Drag the required configuration into the Preview panel. Once inside the panel, you can drag the configuration into its exact location.A new row appears in the <Floorplan Type> Schema table indicating the UIBB you have just added.

○ Choose the Add UIBB button in the <FloorplanType> Schema panel

1. In the <Floorplan Type> Schema panel, select a row in the table in which you want to add the new UIBB.To do this, choose the Expand Node icons to open up the floorplan elements in the table, such as a Section (in the OVP floorplan instance), a Main View or Subview (in the OIF instance) or Main Step or Substep (in the GAF floorplan instance).

2. Choose the Add UIBB button in the toolbar and choose the List UIBB option.A new row appears in the <Floorplan Type> Schema panel for the UIBB you have just added.

5. Specify the UIBB as a list component by entering the following values in the Attributes panel:

○ In the Component field, enter FPM_LIST_UIBB.○ In the Window Name field, enter LIST_WINDOW.○ In the Configuration Name field, enter a name for the list component configuration.

NoteAlthough the Configuration Name field is not marked as a required entry, we recommend that you enter a name here to activate the Configure UIBB button.

6. Save your entries.

Next Steps

● Generic User Interface Building Block (GUIBB)● Flexible User Interface Designer (FLUID)

56 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 57: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.1.4.3.7 Adding a Tabbed Component to an Application

Prerequisites

The tabbed component configuration exists already.

Context

You can add an additional, application-specific view to a Floorplan Manager application at any time in the form of a new tabbed component.

Procedure

1. Run the application you want to edit and choose the Customize Page button on the main toolbar.

2. If there is no previous Customizing for the component, you must create one. Choose New on the toolbar. Enter a description and a transport request for the new Customizing and choose OK.

The FPM configuration editor, FLUID, is displayed in edit mode.3. Choose the Navigation, Attributes and Repositories buttons on the toolbar to display the corresponding

panels.

4. You can add a list component in the following ways:

○ Drag a component from the Repositories panel into the <Floorplan Type> Schemapanel

1. Under the UIBBs section of the Repositories panel, use the filter fields to locate your existing tabbed component configuration. For example, choose Tabbed UIBB in the UIBB Type field.A list of existing configurations for the tabbed component appears.

2. Drag the required configuration into the <Floorplan Type> Schemapanel. Use the Up and Down buttons on the toolbar to move the configuration into the required location.A new row appears in the <Floorplan Type> Schemapanel table indicating the UIBB you have just added.

○ Drag a component from the Repositories panel into the Preview panel

1. Under the UIBBs section of the Repositories panel, use the filter fields to locate your existing tabbed component configuration. For example, choose Tabbed UIBB in the UIBB Type field.A list of existing configurations for the tabbed component appears.

2. Drag the required configuration into the Preview panel. Once inside the panel, you can drag the configuration into its exact location.A new row appears in the <Floorplan Type> Schematable indicating the UIBB you have just added.

○ Choose the Add UIBB button in the <FloorplanType> Schema panel

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 57

Page 58: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

1. In the <Floorplan Type> Schemapanel, select a row in the table in which you want to add the new UIBB.To do this, choose the Expand Node icons to open up the floorplan elements in the table, such as a Section (in the OVP floorplan instance), a Main View or Subview (in the OIF instance) or Main Step or Substep (in the GAF floorplan instance).

2. Choose the Add UIBB button in the toolbar and choose the Tabbed UIBB option.A new row appears in the <Floorplan Type> Schemapanel for the UIBB you have just added.

5. Specify the UIBB as a tabbed component by entering the following values in the Attributes panel:

○ In the Component field, enter FPM_TABBED_UIBB.○ In the Window Name field, enter TABBED_WINDOW.○ In the Configuration Name field, enter a name for the tabbed component configuration.

NoteAlthough the Configuration Name field is not marked as a required entry, we recommend that you enter a name here to activate the Configure UIBB button.

6. Save your entries.

Next Steps

● Flexible User Interface Designer (FLUID)● Generic User Interface Building Block (GUIBB)

3.1.4.3.8 Editing a Form Component inside an Application

Use

You can change the appearance of a form inside a Floorplan Manager application at any time. Forms are displayed on the screen using a configuration of the form component based on the FPM_FORM_UIBB UI building block.

This procedure details how to edit the UIBB component of an application, using a form component as an example.

Procedure

To edit a form component in an application, proceed as follows:

1. Run the application and do either of the following steps:

a. Choose the Customize Page button on the toolbar. Create a new Customizing for the component if none exists and select the relevant transport request.FLUID is opened and displays the application in edit mode.

58 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 59: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

a. Choose the Navigation button in the main toolbar to display the Navigation panel and find the page on which the form component exists (you can see the form immediately in the Preview panel).

b. Choose the form component in the Preview panel; the box changes color and a button appears in the top right corner of the box.

c. Choose the button in the box.b. Choose the Show Customizable Areas button on the toolbar.

A colored overlay appears over any UIBB that is customizable.

a. Click the customizable form component in your application. Create a new Customizing for the component if none exists and select the relevant transport request.FLUID is opened and displays the application in edit mode.

2. FLUID now displays the settings relevant for the form component only (and not for the floorplan component). Notice that there are now different fields in the General Settings tab; these are fields specific to the form component.

3. Choose the Attributes and Repositories buttons on the toolbar to display the corresponding panels.You can now make the following changes, amongst others, using the panels below:

○ Form UIBB SchemaSelect a row containing an individual element of the form component and edit its attributes in the Attributes panel. For example, you can reposition the label of a field in the form or change the display type of a field.Add additional fields, toolbars, and toolbar elements to the form by choosing the Add Element button on the toolbar or by dragging existing fields from the Repositories panel.

○ General SettingsMake changes to the form component as a whole, for example, change the layout of the form. You can also edit the feeder class of the form component or the parameters of the feeder class.

○ PreviewIn the Preview you can use the drag-and-drop feature to reposition single and multiple elements on your form. If the height of an element's field and label are identical, you can resize (lengthen) them at the same time by making sure both are selected when you resize. You can delete an entire row as long as there is no element in it. Choosing the Add Line button on the Preview toolbar will insert a new line under the cell or row that is currently selected. You can also edit the field labels directly in the Preview.To add new elements to the form, choose the buttons on the Preview toolbar or drag the elements from the Repository to the Preview .

4. Make your changes and choose Save.

To see your changes at runtime, choose Test under the Additional Functions button on the toolbar.

More Information

Editing Applications with FLUID

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 59

Page 60: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.1.4.3.9 Moving Between UIBB and Floorplan Components

Use

A Floorplan Manager (FPM) application configuration consists of a floorplan component with one or more User Interface Building Block (UIBB) components.

You can use FPM's configuration editor, FLUID, to edit both the floorplan and UIBB components of an application.

You can use the following objects to move between the two types of components:

● Breadcrumb above the work area● Configure UIBB button on the <Floorplan> Schemapanel toolbar● Configurable UIBB in the Preview panel

This is explained in detail in the following sections.

Prerequisites

You have launched FLUID from an application, and the application is now displayed, at floorplan level, in the design time environment.

Procedure

Using the Configure UIBB Button

Figure 5: Floorplan Schema Panel showing the Configure UIBB Button

60 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 61: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

To move from the floorplan component level to the UIBB component level in FLUID, proceed as follows:

1. Choose the <Floorplan> Schemapanel (the figure above shows the panel for an Overview Page type of floorplan).

2. Choose a row in the table that contains the UIBB you want to edit.Note that a UIBB can only be edited (configured) if a Configuration Name is present; the Configure UIBB button is only visible if there is a configuration name.

3. Choose Configure UIBB.4. Depending on the type of UIBB you selected, the following occurs:

○ GUIBB (for example, the list component in the figure below)In the same window, FLUID now switches to the settings for the selected GUIBB. FLUID indicates that you are now on the UIBB component level in the following ways: the settings inside the General Settings panel are appropriate only to the selected type of GUIBB, the Navigation panel is unavailable, and the <Floorplan> Schemapanel is replaced by the <GUIBB> Schemapanel.

○ Freestyle UIBBFLUID redirects you to the standard Web Dynpro configuration editor; you cannot configure freestyle UIBBs inside FLUID.

5. To return to the floorplan component inside FLUID, use the breadcrumb above the work area (described in the section below).

Using the Configurable UIBB Box

Figure 6: Preview Panel showing the Icon for Configuring the UIBB

To move from the floorplan component level to the UIBB component level in FLUID, proceed as follows:

1. In the Preview panel, move the mouse over the UIBB you want to edit.If the UIBB is configurable, the box representing the UIBB is then highlighted. It also contains an icon in the top, right corner of the box.

2. Choose the icon inside the UIBB box.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 61

Page 62: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3. Depending on the type of UIBB you selected, the following occurs:

○ GUIBB (for example, the list component in the figure above)In the same window, FLUID now switches to the settings for the selected GUIBB. FLUID indicates that you are now on the UIBB component level in the following ways: the settings inside the General Settings panel are appropriate only to the selected type of GUIBB, the Navigation panel is unavailable, and the <Floorplan> Schemapanel is replaced by the <GUIBB> Schemapanel.

○ Freestyle UIBBFLUID redirects you to the standard Web Dynpro configuration editor; you cannot configure freestyle UIBBs inside FLUID.

4. To return to the floorplan component inside FLUID, use the breadcrumb above the work area (described in the section below).

Using the Breadcrumb

Figure 7: Breadcrumb in FLUID

To move from the UIBB component level back to the floorplan component level in FLUID, proceed as follows:

1. Locate the breadcrumb, just below the page toolbar and above the work area.There are three hyperlinks in the breadcrumb. One hyperlink is not active (this represents the UIBB component that you have been making changes to).

2. The text of the hyperlink next to the inactive hyperlink begins with the abbreviated name of the floorplan (for example, OVP in the figure above). Choose this hyperlink.The system navigates you back to the floorplan component of the application.

More Information

Editing Applications with FLUID

62 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 63: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.1.4.4 Formatting Individual UI Elements (Styling)

You can use FLUID to format individual UI elements within an application.

It is possible to adjust the look and feel of FPM applications with the UI Theme Designer; for example, you can assign a new background color for all buttons within an application. However, it is not possible to assign a background color to only one specific button. To be able to do this, the FPM configuration editor, FLUID provides several style attributes for the UI elements on a screen.

In FLUID, the attributes UI Element Style, Label Style, and Title Style exist for many UI elements.

NoteNote: Instance styling is application-specific. If you change the text format of a field label, the change is only visible in that application.

This feature is based on the Web Dynpro ABAP UI element property styleClassName. For more information, search the SAP NetWeaver Library (Help Portal) for styleClassName in the UI Element Properties section of the Web Dynpro ABAP documentation.

Syntax for UI Element Style Attributes

The style is entered as a string containing a set of attribute name-value pairs. Name and value are separated by a colon (:), and the name-value pairs are separated by a semi-colon (;), as shown in the following example:

fontColor:red;fontSize:20px

Entering this string as the UI Element Style attribute of a label for a field in a form, for example, ensures that the label has red text with a font size of 20.

NoteThe syntax is based on the property names of the HTML DOM (Javascript DOM API) Style Object, and not the CSS attribute names (for example, font-color:red;font-size:20px will not work here).

At runtime, this style is converted to a CSS style and you might find something similar to the following code within the HTML source of your running application:

.A4C7B29749CA93581F368B5180D72DE2AD559BAFC { color: #ff0000 !important; font-size: 20px;}

Whether or not a specific style attribute is applied at runtime depends on the type of UI element used. For example, assigning a background image (using attribute backgroundImage) to a button will have no effect as the Button UI element does not support background images.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 63

Page 64: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.1.5 Analyzing Applications with the Runtime Analysis Tool (RAT)

Definition

The Floorplan Manager (FPM) Runtime Analysis Tool (RAT) helps you understand how the current UI of your application was created.

For example, you can determine how FPM UI elements such as generic UI building blocks (GUIBBs), buttons, fields, roadmap steps, table columns, and titles came to appear on the UI. Were these elements implemented by the FPM Configuration Application Controller (AppCC) dynamically? Were these elements created by a user personalizing the application, or were these elements introduced in a customizing or enhancement of the application? The RAT helps you to answer these types of question.

Structure

The RAT exists as a tab page divided into different sections, each containing information related to the selected UI element. Each section has a header, and you can expand the section to show a more detailed display.

Depending on the type of element you have selected, you may see the following sections:

● Feeder ClassThe name of the GUIBB's feeder class is shown. This section appears only if a GUIBB component is selected.

● Configuration DataDisplays the details, in tabular form, of an element as it was configured originally at design time. Separate rows in the table are created for any customizing or enhancement that has taken place. Therefore, a table displaying only one row of data means that no customizing or enhancement exists for this configuration; that is, the UI element you selected was created on the configuration level. You can select a row to display further details.

● <UI Element> <action> by API Indicates if the change to a UI element has occurred dynamically, that is by the Application Configuration Controller (AppCC). Appears only for the floorplan component of an application.

● Field Catalog Related InformationAppears only if a GUIBB component is selected.

● Field DescriptionAppears only if a GUIBB component is selected.

● Action DefinitionThis section displays details about an action or event associated with, for example, a button.

● DeletionsIndicates what has been deleted.

NoteThe RAT is available for only a limited number of floorplans, GUIBBs and other FPM UI elements.

64 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 65: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

More Information

Accessing the Runtime Analysis Tool (RAT)

3.1.5.1 Accessing the Runtime Analysis Tool (RAT)

Use

The Runtime Analysis Tool (RAT) helps you determine the origin of the UI elements displayed in your application at runtime.

Prerequisites

Before you can use the Floorplan Manager (FPM) RAT, you must switch on the Web Dynpro Trace Tool. To do this, complete the following steps:

1. Run the transaction WD_TRACE_TOOL in the ABAP Workbench (transaction SE80).2. Choose the Activate for this User button.3. In the Selection of Trace Features dialog box, select the WD Component Configuration checkbox, and choose

OK.The message Tracing active for <USERNAME> (30 minutes still) appears.

You can now use the FPM RAT.

Procedure

To access the FPM RAT, complete the following steps:

1. Run your application.2. Right-click on the UI element that interests you, and, in the context menu, choose Technical Help.3. Navigate to the FPM tab.

The FPM tab shows various sections containing information related to the selected UI element.

NoteIf the FPM tab page is not visible in the context menu, either the RAT is not available for that particular UI element or floorplan, or you have not opened the Web Dynpro Trace Tool application.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 65

Page 66: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

More Information

Analyzing Applications with the Runtime Analysis Tool (RAT)

3.1.6 Comparing Configurations

Use

The Comparisons panel (also known as 'the Comparison Tool') is used by Administrators and Developers to analyze the changes that have been made to an FPM configuration.

Over time you may decide to make changes to SAP-delivered configurations or even your own configurations. It is often helpful to know the history behind these changes. The Comparisons panel assists you with this.

The Comparisons panel is located in the FPM configuration editor, FLUID. Not only can you use it to compare a Customizing of a configuration with the original configuration, but you can also use it to compare Context-Based Adaptations (CBA) and Enhancements with the original configuration.

Prerequisites

The Comparisons panel is only available if a Customizing, Context-Based Adaptation, or Enhancement of the original configuration exists.

Structure

The panel is divided into the following sections:

● Details of ChangesThis section displays, in a hierarchical form, a list of the UI elements which have been changed. The Change Type column indicates whether an element has been added, changed or deleted.Note that elements that you have not changed may still appear in this section. For example, an attribute of a Page in an Overview Page (OVP) floorplan might not have been changed, but Page still appears in this section if an attribute of an element on the Page has been changed.

● Attribute ChangesThis section displays the changes to the elements in greater detail. For example, it can display the previous and current values of an element.Note that elements that you have not changed may still appear in this section. For example, if you delete an element, the Sequence Index of remaining elements is changed and is therefore displayed.This section also contains a Reset column. You may be able to reset an attribute to its original state by choosing the Reset icon for that attribute. The Reset icon is only displayed for attributes that have no dependencies or influences on other attributes of the configuration. However, you can still change an attribute's value manually in the <Floorplan/GUIBB> Schema or Attributes panel in FLUID for example.

66 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 67: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Displaying the Comparisons Panel

To display the Comparisons panel in FLUID, choose the Adaptations/ Comparisons button in the main toolbar of FLUID, and select the Comparisons menu option. The Comparisons panel is displayed just below the main toolbar.

Note that the panel is not available on the configuration (Development) level; you can access it on the Customizing level or from within a Context-Based Adaptation or Enhancement.

Making a Comparison

To compare your Customizing, Context-Based Adaptation or Enhancement with the original or another configuration, proceed as follows:

1. Ensure that the configuration you want to compare with the original (or previous) configuration is displayed on the screen, that is, display the Customizing, a Context-Based Adaptation, or an Enhancement of the configuration.Regarding CBA configurations, display the Adaptations panel and select the relevant, adapted configuration.

2. Display the Comparisons panel.In the main toolbar, choose the Adaptation/Comparisons button, and select the Comparisons menu option.The panel is displayed under the main toolbar.Note that the Adaptations and Comparisons panels are displayed in the same area of the screen. Choose the tabs to navigate between the panels.

3. Select a configuration in the Compare Current <Customizing/Enhancement/Adaptation> with: field.Here, you select the original configuration or perhaps a previous Enhancement or another Context-Based Adaptation with which you want to compare the currently selected configuration.The Details of Changes section displays the elements which have been changed.

4. Choose a row containing an element in the Details of Changes section to display the attributes of that element; the corresponding attributes are displayed in the Attribute Changes section.Further details of the element are also displayed outside of the Comparisons panel in the Attributes panel, the Menu Schema, Toolbar Schema and <Floorplan/GUIBB> Schema.

More Information

● Flexible User Interface Designer (FLUID)● Context-Based Adaptations (CBA)

3.2 Working with GUIBBs

A section detailing the individual GUIBBs and their features, and features that are common to all GUIBBs.

Related Information

GUIBBs in Detail [page 68]

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 67

Page 68: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Descriptions of the individual GUIBBs, their feeder class interfaces, and how to influence them during runtime and design time.

Value/Input Helps for Generic UIBBs (GUIBBs) [page 225]It is possible to assign Value Helps to fields belonging to GUIBB components.

Dynamic GUIBB Configurations at Runtime [page 227]This section describes how an application can trigger the invalidation, and re-instantiation of FPM GUIBBs at runtime, and how it can replace the current GUIBB configuration with a dynamic one during re-instantiation.

Context Menus and Action Menus in GUIBBs [page 229]Quickviews [page 236]Moving Data between UIBBs at Runtime (Drag-and-Drop) [page 243]

This section deals primarily with using the Drag-and-Drop feature to move data between the FPM GUIBBS. There is, however, a short description on the use of Drag-and-Drop in Freestyle UIBBs at the end of this section.

3.2.1 GUIBBs in Detail

Descriptions of the individual GUIBBs, their feeder class interfaces, and how to influence them during runtime and design time.

3.2.1.1 Analytics Component

A generic design template which provides a re-usable UI component for the display and interaction of analytical (SAP Business Warehouse) content inside an FPM application.

The Analytics component is implemented using the Web Dynpro component FPM_BICS_GRID_RUIBB. The information displayed in this component at runtime is determined by the feeder class assigned to the configuration of this Web Dynpro component. However, you can determine the concrete display of the data in this component when you configure it in the FPM configuration editor, FLUID.

This component can also be combined with a Search component. A special Search feeder class enables the Search component to be used as a selection screen for variables for one or more queries.

This component can also be combined with a Chart component; a special Chart feeder class is available for this purpose.

Combining the Analytics component with the Search and Chart components provides you with a more comprehensive and fully analytical application.

NoteA ready-to-use, generic FPM application (FPM_BICS_OVP), based on the Analytics component, is available for use immediately in the system.

68 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 69: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

NoteNote: SAP Business Warehouse is part of the overall SAP NetWeaver platform. It provides tools and functions to enable companies to evaluate and interpret data. For more information on SAP BW, search for SAP Business Warehouse in the SAP Help Portal, http://help.sap.com.

Implementation Considerations

This component is available only for systems running at least SAP_BW 7.40 SP05.

For this component to be visible in your applications at runtime, your browser must support HTML5.

This component can be viewed in Internet browsers only in Standards Mode. For more information, see UI Control Rendering in Sandards Mode in the SAP Help Portal (sap.help.com) under the Reference section of Developing Web Dynpro ABAP Applications.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 69

Page 70: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Analytics Component at Runtime

The screenshot below shows an FPM application at runtime, incorporating an Analytics component, a Search component and a Chart component.

Figure 8: Analytics, Search, and Chart Components within an OVP Floorplan Configuration

Unlike the other FPM components, the Analytics component has three interface views (Web Dynpro 'windows') for displaying different facets of the underlying BICS query.

● Query Results GridDisplays the query results in a grid format. The query results grid can be manipulated using options in the context menu, various toolbar buttons, and the collapse/expand icons of the hierarchy nodes. The

70 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 71: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

information in this grid is supplied by the window BICS_GRID_WINDOW. The figure below illustrates the grid layout:

Figure 9: Query Results Grid of Analytics Component

● Information PanelDisplays read-only information about the underlying query, such as its technical name, and when it was last updated. This information is supplied by the window BICS_GRID_INFO.

● Navigation PanelThe information for this panel is supplied by the window BICS_GRID_NAVIGATION, and can be placed in the Page Master panel of the Overview Page (OVP) floorplan. Divided into several sections, this window displays a list of the query characteristics that appear on the row and column axes in the query results grid, as well as a list of those characteristics that are available but are not displayed in the grid. This window allows the user to manipulate the query results grid by moving available characteristics to and from the grid axes (using the arrow buttons or drag-and-drop). Additional options to manipulate each characteristic (for example, sorting) are provided by a context menu.This panel has the following layout styles:

○ Analysis for MS Office (intended for use with the Microsoft Office plug-in)As well as the sections for the query fields (characteristics), there is also a section for the filter criteria; this too can be manipulated by the user to change the display of data in the query results grid.

○ FioriAs well as containing sections for the query fields (characteristics), this layout style also has a search field. Users can search for fields across all three sections; this is particularly helpful if the query contains a

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 71

Page 72: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

large number of fields. Additionally, there is a Settings button in the header of this panel with the following menu options:

○ Show FiltersThis option displays a filter button next to each field allowing the user to access filter values for that field.

○ Defer Layout UpdateThis option pauses the update or refresh of the query results grid so that any changes a user make in the navigation panel are not immediately visible. This allows for multiple changes to be made in the navigation panel without waiting for the query results grid to be updated each time. When all the changes have been made in the navigation panel, the user can manually update the query results grid using the Refresh button.

The Fiori layout also contains a filter bar. This area displays information about the current query filter values and allows users to define new queries too. Use the button, Filter Bar, on the grid toolbar to toggle the display of the filter bar.

Figure 10: Layout Styles of the Navigation Panel

Editing the Component in Design Time

It is recommended to use the Analytics component within an Overview Page (OVP) floorplan configuration.

72 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 73: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

You can configure this component using the FPM configuration editor, FLUID:

● General SettingsThe General Settings panel provides you with options to change the default values of the width and height of the query data grid, and the width of the row header column inside the grid. Note that if the text inside this column exceeds the maximimum width, a scrollbar is rendered ( particularly helpful if there are lots of characteristics on the row axis of the query). You can choose to render various toolbar buttons in the grid; one to display an option for each configured report-to-report navigation of the configured query, and one to export data to a spreadsheet. Additionally, there is the option to enable the Personalization dialog box at runtime; this allows the user to bookmark the current state of the grid and query. You can set the layout style of the navigation panel and also enable the Maximize/ Minimize button in the grid toolbar.

● Feeder Class ParametersThe Edit Parameters dialog box allows you to configure the following parameters for the feeder class of the Analytics UIBB:

○ Query, Query Instance IDEnter a Query Instance ID if, within the application, multiple independent instances of the same query should be displayed.

○ Execute AutomaticallySelect this to work with queries containing variables without configuring a selection screen. The display of the grid triggers the processing of the default values of the query.

● EventsThe Toolbar Schema panel allows you to configure the BICS-specific events, and other navigational events.

The BICS_GRID_WINDOW is the window that displays the query result set in a data grid, along with a toolbar containing standard and configurable actions. The query result can be manipulated by the user at runtime using the methods described in the section above. Making a selection in the grid activates particular toolbar functions, for example, sorting. The Export to Spreadsheet function exports the current query result, independent of the visible section on the screen. The toolbar may contain an additional button with 'jump to' actions; these represent the configured report-to-report interfaces for the query. All selection criteria, including variables and the current selection in the grid, are exposed during the report-to-report navigation.

The Analytics component uses a re-usable feeder class, CL_FPM_RUIBB_BICS_GRID. For extensions, this class can be sub-classed to enable additional, application-specific functions.

Related Information

Architecture [page 74]

Planning Queries [page 75]Planning queries can be consumed in the same way as read-only queries.

Defined Events [page 76]Events for the Analytics feeder class.

Generic BICS Search Feeder Class [page 79]The generic BICS Search feeder class is used to expose the variables of a BICS (Analytics) query using the FPM Search UIBB.

Generic BICS Chart Feeder Class [page 79]The generic BICS Chart feeder class is based on the FPM Chart UIBB feeder class.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 73

Page 74: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Generic Analytics Application [page 80]FPM provides you with a ready-to-use analytical application. In addition to the Analytics component, it includes Search and Chart components.

Chart Component [page 89]A generic design template for displaying data in an interactive chart format.

Search Component [page 186]

3.2.1.1.1 Architecture

For a fully comprehensive analytical application, the Analytics component can be combined with Search and Chart components.

The following figures provide an architectural overview of these analytical components, and their interaction with the SAP Business Warehouse data:

Figure 11: Architectural Overview of Analytical Components - Application View

74 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 75: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Figure 12: Architectural Overview of Analytical Components - Software Component View

NoteBICS = Business Intelligence Consumer Services

3.2.1.1.2 Planning Queries

Planning queries can be consumed in the same way as read-only queries.

The difference is that in planning queries the UIBB reacts to the transactional events of the overview page (OVP) floorplan, for example, FPM_EDIT, FPM_CANCEL and FPM_SAVE. The processing of these events is achieved using an implementation of the wire model transaction interface.

If you use a planning query, the wire model transaction class must be used. The default delivery contains the class CL_FPM_BICS_MODEL_TRANSACTION for this purpose.

If a query is in edit-mode, fields for currency and quantity amounts do not display the corresponding unit next to the number; these are only displayed in the same cell in read-only mode.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 75

Page 76: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

NoteManual data entries, planning functions and planning sequences are supported for planning queries. For planning functions, a re-useable filter can be specified to restrict the amount of data the planning function is working with. For planning functions and planning sequences using variables requiring user input, the system displays a dialog box.

3.2.1.1.3 Defined Events

Events for the Analytics feeder class.

Table 3: Exposed FPM Event IDs for Analytics UIBBEvent ID Description

CV_TB_FILTER_VALUE Toolbar action: Use the current value as filter value, and move the characteristic to the available axis

CV_TB_FILTER_VALUE_KEEP Toolbar action: Use the current value as filter value, and keep the characteristic on the current axis

CV_TB_FILTER_SELECT Toolbar action: Open selection dialog box for filter val­ues

CV_TB_FILTER_DELETE Toolbar action: Delete filter for characteristic

CV_TB_SORT_KEY_ASC Toolbar action: Sort by key ascending

CV_TB_SORT_KEY_DESC Toolbar action: Sort by key descending

CV_TB_SORT_TEXT_ASC Toolbar action: Sort by text ascending

CV_TB_SORT_TEXT_DESC Toolbar action: Sort by text descending

CV_TB_SORT_HIERARCHY Toolbar action: Sort according to hierarchy

CV_TB_SORT_SELECTION Toolbar action: Sort according to selection – this func­tion is deprecated and will not produce any results

CV_TB_SORT_KEYF_ASC Toolbar action: Sort by the current selected key figure according to values ascending

CV_TB_SORT_KEYF_DESC Toolbar action: Sort by the current selected key figure according to values descending

CV_TB_HIER_EXP_ALL Toolbar action: Expand all nodes for the hierarchy

CV_TB_HIER_COL_ALL Toolbar action: Collapse all nodes for the hierarchy

CV_TB_HIER_DISABLE Toolbar action: Disable the hierarchy for the current characteristic

CV_TB_HIER_ENABLE Toolbar action: Enable the hierarchy for the current characteristic

76 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 77: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Event ID Description

CV_TB_DRILL_SWAP_AXIS Toolbar action: Exchange the characteristics between row and column axis

CV_TB_DRILL_REMOVE Toolbar action: Remove drill-down

CV_TB_DRILL_ADD Toolbar action: Add drill down

List of characteristics to add are included in event pa­rameter BICS_GRID_DRILLDOWN_CHARS of type IF_BICS_MD_CHARACTERISTIC=>TN_T_ID

CV_TB_DRILL_EXCHANGE Toolbar action: Exchange drill-down with

List of characteristics to add are included in event pa­rameter BICS_GRID_DRILLDOWN_CHARS of type IF_BICS_MD_CHARACTERISTIC=>TN_T_ID

CV_TB_DRILL_ADD_ATTRIBUTE Toolbar action: Add attribute

CV_TB_DRILL_REMOVE_ATTRIBUTE Toolbar action: Remove attribute

CV_TB_MEMBER_BY_KEY Toolbar action: Display characteristic values as key

CV_TB_MEMBER_BY_TEXT Toolbar action: Display characteristic values as text

CV_TB_MEMBER_BY_KEY_TEXT Toolbar action: Display characteristic values as key and text

CV_TB_MEMBER_BY_TEXT_KEY Toolbar action: Display characteristic values as text and key

CV_TB_MEMBER_TEXT_SHORT Toolbar action: Use the short text for display

CV_TB_MEMBER_TEXT_MEDIUM Toolbar action: Use the medium text for display

CV_TB_MEMBER_TEXT_LONG Toolbar action: Use the long text for display

CV_TB_MEASURE_FORMAT Toolbar action: Open dialog box for setting the number format of displayed values

CV_TB_MEASURE_SCALING Toolbar action: Open dialog box for setting the scaling factor for displayed values – this function is depre­cated. The event CV_TB_MEASURE_FORMAT produces a dialog with formatting and scaling

CV_TB_TOTALS_SHOW Toolbar action: Always show a summary row for the current characteristic

CV_TB_TOTALS_COND Toolbar action: Show a summary row only if there is more than 1 value

CV_TB_TOTALS_HIDE Toolbar action: Hide the summary row for the current characteristic

CV_TB_TOTALS_BELOW Toolbar action: Show the summary row below the char­acteristic values

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 77

Page 78: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Event ID Description

CV_TB_TOTALS_ABOVE Toolbar action: Show the summary row above the characteristic values

CV_TB_EXPORT_EXCEL Toolbar action: Export result set to Microsoft Excel

CV_TB_RRI Toolbar action: Execute report-to-report navigation

FPM_NAVIGATE FPM navigation action. The navigation target can be configured using the defined parameter structure FPM_S_EXTERNAL_NAVIGATION_INFO.

FPM_QUERY_PLANNING_FUNCTION Toolbar action: Execute a planning function.The name of the planning function can be configured using the parameter SRVNM (planning function name).

FPM_QUERY_PLANNING_SEQUENCE Toolbar action: Execute a planning sequence. The name of the planning sequence can be configured us­ing the parameter SEQNM (planning sequence name).

A mapping can be configured for each variable in the planning sequence or in the combined planning func­tions:

● Not restricted● Use the value of a variable in the query● Use a fixed value● Use the value currently defined by the filters in the

query

For all non-restricted variables, a popup for value defi­nition comes up when the planning sequence button is pressed at runtime.

Table 4: List of FPM Events for Analytics UIBB ProcessingEvent ID Description

FPM_SWITCH_QUERY_EVENT Event raised if the query for the Analytics UIBB is ex­changed during runtime

FPM_QUERY_CHANGE_EVENT Generic event raised if anything about the query was changed, for example, characteristics on rows

FPM_QUERY_FILTER_EVENT Event raised if the filter criteria for the query are adjusted

FPM_QUERY_SORT_EVENT Event raised if the sorting for a characteristic is adjusted

FPM_QUERY_TOTALS_EVENT Event raised if the display of the summary row for a charac­teristic is adjusted

FPM_QUERY_HIERARCHY_EVENT Event raised if the hierarchy node and/or the whole hierar­chy should be expanded or collapsed

FPM_QUERY_HIERARCHY_TOOGLE Event raised for enabling/disabling of the hierarchy

78 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 79: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Event ID Description

FPM_QUERY_HIERARCHY_SELECT Event raised after selection of a new hierarchy for a charac­teristic

FPM_QUERY_PRESENTATION_EVENT Event raised for changing the presentation (display) of characteristic values

FPM_QUERY_SELECTION_EVENT Event raised after selection of a cell inside the data grid

FPM_QUERY_VALUE_CHANGE_EVENT Event raised after user changes a value in an editable query in the data grid

In each event, the event parameters FPM_BICS_QUERY_ID and FPM_BICS_QUERY_INSTANCE_ID are included to identify for which query and query instance the event is valid.

3.2.1.1.4 Generic BICS Search Feeder Class

The generic BICS Search feeder class is used to expose the variables of a BICS (Analytics) query using the FPM Search UIBB.

The generic feeder class CL_FPM_BICS_SEARCH_FEEDER creates a dynamic configuration based on the defined query or queries.

For more configuration options, the generic feeder class can be sub-classed.

In conjunction with the Analytics or Chart components, the Search component can be configured for more than one query. The variables of the different queries are merged together; variables from different queries with the same name appear only once in the Search component.

At runtime, the Search component exposes the variables of the configured queries inside this special Search feeder class. Mandatory variables are marked with an asterisk, and will create an error if they are not completed. Default values from the query configuration are displayed upon start-up.

The Search UIBB component has one configuration option. The feeder class parameters table allows you to enter multiple combinations of query and query instance IDs. The instance ID is necessary if, within an application, multiple independent instances of the same query should be displayed.

Related Information

Search Component [page 186]

3.2.1.1.5 Generic BICS Chart Feeder Class

The generic BICS Chart feeder class is based on the FPM Chart UIBB feeder class.

The generic feeder class CL_FPM_BICS_CHART_FEEDER creates a dynamic configuration based on the defined query. For more configuration options, the generic feeder class can be sub-classed.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 79

Page 80: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The Chart component exposes the analytical chart to the application.

Configuration Options in FLUID

For the feeder class of the Chart UIBB component, you can configure the following options in FLUID:

● Query and Query Instance IDThe Instance ID is necessary if, within an application, multiple independent instances of the same query should be displayed.

● Execute AutomaticallySelect this to work with queries containing variables without configuring a selection screen. The display of the chart then triggers the processing of the default values of the query.

● Render Report-Report InterfaceSelect this to display a button to render any report-to-report navigation.

● UI Element HeightFor adjusting the height of the analytical chart.

● Chart TypeSelect a default chart type in the dropdown list. If the selected chart type does not match the data, an internal fallback is applied.

Related Information

Chart Component [page 89]A generic design template for displaying data in an interactive chart format.

3.2.1.1.6 Generic Analytics Application

FPM provides you with a ready-to-use analytical application. In addition to the Analytics component, it includes Search and Chart components.

This generic application can be used for simple scenarios involving one query only.

The generic application FPM_BICS_OVP is based on the OVP floorplan, and contains the following analytical elements:

● Search component for the supply of variables to the query● Analytics component for the display and manipulation of query data● Chart component for visualization of query data

The generic application exposes one application parameter FPM_BICS_QUERY_ID in which the name of the query can be specified.

Additionally, URL parameters can be passed to pre-fill certain variables. The syntax of these URL parameters is the same as for previous analytical components (see here for examples).

80 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 81: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The generic application uses an application controller to analyze the URL parameters, and to adjust the layout of the application accordingly. If no variables are found, the Search component is not displayed at all. The application controller is based on class CL_FPM_BICS_APP_CC.

Interaction between the Different Components

Interaction between the various components can be based on the following approaches:

● Configuration of Query ID and Query Instance IDInteraction with the BICS API requires all the components to interact with an instance of IF_BICS_QV. To allow separate UIBBs (like the Analytics and Chart UIBBs) to read and interact with the same instance of IF_BICS_QV, query instances will be stored in IF_FPM->MO_APP_PARAM under a key consists of the query ID and an optional instance key. If a UIBB requires access to a query to read data from it, it must first check if the required instance already exists in IF_FPM->MO_APP_PARAM. It can only create an instance if it does not already exist there, and it must store the instance in IF_FPM->MO_APP_PARAM.

● WiringEach BICS-based UIBB exposes data using two defined ports; one port for the whole query instance, and one port for the selection data inside the query. Using these ports, data transfers can be graphically defined with the Graphical Wire Editor in FLUID. To use the selection data port, the receiving UIBB must have a query ID and an instance ID defined in the configuration. The outports of the Search feeder class are different compared to the outports of the Analytics and the Chart feeder classes. In the Search feeder class, two outports for each configured query are available to allow distinct routing of information.The class CL_FPM_BICS_WIRE_ENTITY is delivered as a connector object class for transporting the selection data and the query instance data over the wire. The wire processing is enabled in the Analytics UIBB re-usable feeder class as well as in the generic BICS Chart feeder class. To retrieve the selection criteria, the methods GET_SEARCH_CRITERIA and GET_SELECTION of the entity class must be called. The first method returns all variable values. The second method returns all fixed, dynamic, and current UI filters. All methods return references to IF_FPM_BICS_SELECTION.

NoteAn application can use a mixture of both these approaches. However, we recommend the use of only one approach to limit the effort required for error analysis.

Related Information

Wiring with the Graphical Wire Editor [page 303]

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 81

Page 82: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.2 Attribute Filter Component

Definition

A generic design template for visualizing data distributions into individual attribute values. Configured attributes are displayed in a list from which the user can iteratively select a subset. For each selected attribute, a table is displayed, showing the distinct attribute values together with a hit counter. These 'value tables' appear in the sequence of the user’s selection. Selection of attribute values can be used as selection criteria for all subsequent value tables.

Use

In contrast to the Search Component that is typically used to query data using specific attribute values known in advance, the Attribute Filter Component is used for browsing data and its distribution into attribute values. Additionally, it can be used to drill-down data by selecting attribute values in an arbitrary order.

Structure at Runtime

The following screenshot shows how an Attribute Filter component might look at runtime.

82 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 83: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Note that the Hit Counter can be displayed as a progress indicator.

The Attribute Filter retrieves the distinct attribute values in packages, for example the first 20 values. In a value table, users can choose More Values... to retrieve the next package. An icon is visible in the value table header when the package size is exceeded. Additionally, users can click the header of a value table to access sort and filter functions.

Editing the Structure at Design Time (FLUID)

You configure this component using the FPM configuration editor, FLUID.

You add extra fields to this component using one of the following methods:

● Drag and drop a field from the Repositories panel onto the Attribute Filter UIBB Schema panel● Choose the Add Attribute button in the Attribute Filter UIBB Schema panel

For more information on the attributes of this component in FLUID, choose Field Help from the context menu in the system.

Related Information

Interface: IF_FPM_GUIBB_ATTRIBUTE_FILTER [page 83]Description of methods in the interface implemented by the feeder classes of Attribute Filter components.

3.2.1.2.1 Interface: IF_FPM_GUIBB_ATTRIBUTE_FILTER

Description of methods in the interface implemented by the feeder classes of Attribute Filter components.

Table 5: Methods of IF_FPM_GUIBB_ATTRIBUTE_FILTER Interface

GET_DEFINITION:Allows the feeder class to provide all necessary information for configuring an Attribute Filter component, that is, the list of available filter attributes and their properties.

Parameter Description

EO_FIELD_CATALOG Is of type CL_ABAP_STRUCTDESCR. The components are the available filter attributes.

The Attribute Filter GUIBB supports only flat structures. When using deep structures, only the highest level fields are available.

ET_FIELD_DESCRIPTION (Optional) Here you can provide additional information needed to cre­ate the Attribute filter component, for example header texts (which shall deviate from the DDIC texts).

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 83

Page 84: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DEFINITION:Allows the feeder class to provide all necessary information for configuring an Attribute Filter component, that is, the list of available filter attributes and their properties.

ES_OPTIONS (Optional) Here you can adjust properties for the Attribute Filter UIBB, for example, specify a name for accessing the counter column in GET_DATA (for which the default is COUNT).

ET_SPECIAL_GROUPS Special groups can be used for a grouping feature in FLUID. If the feeder class provides a special group table, it should assign each field in the field description table to a group in field SP_GROUP. At design-time, the FPM configuration editor groups the fields. This is an easier way to find fields if your field catalog contains many fields.

GET_PARAMETER_LIST: Called at design time and at runtime when the Attribute Filter component is created. It allows you to define a list of the parameters that the feeder class supports. This list is used by the FPM configuration editor to provide the input fields for these parameters.

Parameter Description

RT_PARAMETER_DESCR Is returned from this method. It describes which pa­rameters are possible. In field TYPE, the DDIC type needs to be entered.

INITIALIZE: Called at design time and at runtime when the Attribute Filter component is created.

Parameter Description

IT_PARAMETER Contains a list of the feeder parameters and the values for them specified in the configuration.

FLUSH: This method is called whenever an FPM event is triggered (this includes all round trips caused by the At­tribute Filter component itself). Since the Attribute Filter component has no user input fields, there are no parameters.

PROCESS_EVENT:Called within the FPM event loop. Here the event processing can take place and this is where the event can be canceled or deferred.

Parameter Description

IO_EVENT The FPM event which is to be processed.

IV_RAISED_BY_OWN_UI Indicates whether the event originates from this UIBB.

ET_MESSAGES A list of messages which shall be displayed in the mes­sage region.

84 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 85: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

PROCESS_EVENT:Called within the FPM event loop. Here the event processing can take place and this is where the event can be canceled or deferred.

EV_RESULT The result of the event processing. There are 3 possible values:

● ev_result = if_fpm_constants=>gc_event_result-OK

● ev_result = if_fpm_constants=>gc_event_result-FAILED

● ev_result = if_fpm_constants=>gc_event_result-DEFER

BEGIN_PROCESS_BEFORE_OUTPUT: Called within the FPM event loop during the FPM PROCESS_BEFORE_OUTPUT event. It marks the beginning of the PROCESS_BEFORE_OUTPUT phase for this UIBB. Before the end of this phase is indicated (by calling method END_PROCESS_BEFORE_OUTPUT ), there can be multiple requests of method GET_VALUES for indi­vidual attribute value retrievals.

Parameter Description

IO_EVENT The FPM event which is to be processed.

IV_RAISED_BY_OWN_UI Indicates whether the event originates from this UIBB.

EV_FORCE_NEW_REQUEST The Attribute Filter component only triggers new data retrieval if the UI state has changed such that it is nec­essary. You can set this flag if you want force com­pletely new data retrieval in any case.

CT_SELECTED_ATTRIBUTE Contains the attributes currently selected at the UI. You can use this parameter to programmatically change the current selection.

GET_VALUES: Called within the FPM event loop during the FPM PROCESS_BEFORE_OUTPUT event whenever it is necessary to newly retrieve attribute values. Since the requests for individual attributes may be dependent due to se­lections.

Parameter Description

IV_NAME Name of the requested attribute.

IV_MAX_NUMBER_OF_HITS The number of requested distinct values.

IV_SORT_STATE_VALUES The requested sort state for the values. The possible values are:

● CS_SORT_STATE-NONE: No specific sort state requested.● CS_SORT_STATE-ASCENDING: Ascending sort state requested.● CS_SORT_STATE-NONE: Descending sort state requested.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 85

Page 86: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_VALUES: Called within the FPM event loop during the FPM PROCESS_BEFORE_OUTPUT event whenever it is necessary to newly retrieve attribute values. Since the requests for individual attributes may be dependent due to se­lections.

IV_SORT_STATE_COUNT Same as IV_SORT_STATE_VALUES but for the counter.

IV_REF_FIELD_NAME Name of the reference field (as given in the field description in method GET_DEFINITION). If the value is not initial, the corresponding column of the same name in parameter ET_VALUE must be filled so that, for ex­ample, currency amounts can be correctly formatted.

IT_SELECTION_CONDITION Contains the selection conditions of preceding attributes which should be used as selection condition. The table is deep; it contains a row for each preceding attribute having selections carrying the name and a ta­ble of selected values.

IR_FILTER_RANGE Contains a range table for the currently requested attribute if the user has applied the filter function.

ET_VALUE Contains the result, table of distinct values together with their hit coun­ters and, if necessary, the reference field values.

EV_TOTAL_VALUES_COUNT The total number of distinct values (ignoring parameter IV_MAX_NUMBER_OF_HITS).

EV_TOTAL_RECORDS_COUNT The total number of records.

NoteWith 7.40 SP10, this parameter is of type I. With the next SP, the func­tionality of the attribute filter will be extended such that not only the total records count but also other measures (for example, amounts or quantities) can be counted. Therefore, the integer type is not final and will be changed to the generic type SIMPLE.

EV_KEEP_SELECTION By setting this flag you can request that previously selected values stay selected if they are still contained in ET_VALUE.

ET_SELECTED_LINE Can be used to programmatically select values.

END_PROCESS_BEFORE_OUTPUT:

Called within the FPM event loop during the FPM PROCESS_BEFORE_OUTPUT event. It marks the end of the PROCESS_BEFORE_OUTPUT phase for this UIBB, that is, GET_VALUES is not called again for this event.

Parameter Description

IO_EVENT The FPM event which is to be processed.

IV_RAISED_BY_OWN_UI Indicates whether the event originates from this UIBB.

86 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 87: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

END_PROCESS_BEFORE_OUTPUT:

Called within the FPM event loop during the FPM PROCESS_BEFORE_OUTPUT event. It marks the end of the PROCESS_BEFORE_OUTPUT phase for this UIBB, that is, GET_VALUES is not called again for this event.

IT_SELECTION_CONDITION Contains all selection conditions. This information can be used to forward conditions to dependent UIBBs, for example, a result list displaying the records resulting in the Attribute Filter selection.

GET_DEFAULT_CONFIG:Call this if you want to have a default configuration. Use it to call pre-configured Attribute Filter configura­tions when a user starts the FPM configuration editor. This avoids the user, who uses a feeder class to cre­ate an attribute filter, having to create it from scratch.

Parameter Description

IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_ATTR_FILT_CONFIG: This ob­ject provides the API to create a default configuration.

CHECK_CONFIG:Call this if you want to make your own application-specific checks on the configuration in the FPM Configu­ration Editor immediately before saving.

Parameter Description

IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_ATTR_FILT_CONFIG: This ob­ject provides the API to read the configuration to be saved.

ET_MESSAGES A list of messages which shall be displayed in the mes­sage region.

3.2.1.3 Carousel Component

A generic design template for displaying images within an interactive carousel.

Definition

This component is implemented using the Web Dynpro component FPM_CAROUSEL_UIBB.

The images displayed in this component at runtime are determined by the feeder class assigned to the configuration of the Web Dynpro component FPM_CAROUSEL_UIBB.

Unlike the other generic user interface building blocks (GUIBBs), this GUIBB requires no definition (in the method GET_DEFINITION of the feeder class). It is already defined by the framework. It always has the following attributes:

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 87

Page 88: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● ID● Image● Tooltip

Implementation Considerations

For this component to be visible in your applications at runtime, your browser must support HTML5.

This component can be viewed in Internet browsers only in Standards Mode. For more information, see UI Control Rendering in Standards Mode in the SAP Help Portal under the Reference section of Developing Web Dynpro ABAP Applications.

Structure at Runtime

The example configuration in the screenshot below shows how a Carousel component may look at runtime. A Form component is being used to show further details about the product that is selected in the Carousel component.

Editing the Structure in Design Time (FLUID)

You configure this component using the FPM configuration editor, FLUID. You can change the height and width of the image in the General Settings panel

Note that there is no Preview panel in FLUID for this GUIBB.

88 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 89: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.4 Chart Component

A generic design template for displaying data in an interactive chart format.

Definition

The Chart component is implemented using the Web Dynpro component FPM_CHART_UIBB.

The information displayed in this component at runtime is determined by the feeder class assigned to the configuration of the Web Dynpro component FPM_CHART_UIBB. However, the concrete display of the data in this component is determined at configuration of this component in the FPM configuration editor, FLUID.

NoteThe FPM Chart UIBB renders charts on the basis of the Web Dynpro ABAP Chart UI element. This element is exposed by ABAP class CL_WD_CHART. It can render graphics on the basis of the CVOM (Common Visual Object Model) HTML5 Visualization library. Therefore, for this component to be visible in your applications at runtime, your browser must support HTML5. For more information, see UI Control Rendering in Standards Mode, and the documentation for Chart under User Interface Elements in the Reference section of the Web Dynpro ABAP documentation in the SAP NetWeaver library. Search also for in the

Use

The Chart component offers a large selection of different and highly-configurable graphs, providing you with visual representations of your business data. Charting features such as resizing, morphing, and transition effects are available with this component. The Chart component also provides you with an out-of-the-box drill-down feature for interactive analysis.

Personalization of this component at runtime is also possible.

Structure at Runtime

The structure of this component at runtime varies according to chart type. However, the following objects are usually present in all chart types:

● Chart● Chart Title● Legend● Chart Toolbar

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 89

Page 90: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The following figure illustrates some of the available chart types:

Figure 13: Example Chart Types

Editing the Structure at Design Time (FLUID)

You configure this component using the FPM configuration editor, FLUID. At design time, the Preview panel in FLUID displays the Chart component in WYSIWYG-like style. You can change the chart type, and enable personalization using the relevant fields in the General Settings panel. Settings grouped into Basic Settings, Plot Area, X-Axis, and Y-Axis are also displayed in this panel; the settings displayed for each are dependent on the chart type.

You add extra fields to this component using one of the following methods:

● Drag and drop a field from the Repositories panel onto the Preview panel● Choose the Add Element button in the Chart UIBB Schema panel

For more information on the attributes of this component in FLUID, choose Field Help from the context menu in the system.

NoteIn the General Settings panel, under the Fixed Size section, the Height field is set as a default to 100% to ensure that a Chart component automatically fills up all available space at runtime. However, if the available space is too small, the Chart component is rendered with a height of 0%, and is no longer visible to the user.

90 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 91: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

NoteTo enable the default Height setting of 100% to function correctly, the Chart UIBB attribute Container Stretching must be set to UIBB Needs Surrounding Containers to be Stretched. Additionally, in the General Settings panel, under the Additional Settings section, the Scroll Mode field must be set to No Scrollbars. These settings are made automatically by FPM when you add a Chart UIBB to a floorplan, Tabbed component, or Composite component configuration. If you change the height of the Chart component to a fixed height, you must remove these settings.

Chart UIBB - Dimensions and Measures

The data and data model behind a chart are defined in the feeder class. On configuration level (dynamic or static) Dimensions and Measures are then defined on the basis of the given data model:

● DimensionA range of data. For example, City, Country, Month, Year, and Currency Code could all be considered as Dimensions.

● MeasureData that can be quantified by numbers only.

A Measure can be always used as a Dimension, but a Dimension cannot always be converted into a Measure.

The drill-down feature at runtime is achieved by setting the Data Type of the individual Elements of the chart to Dimension for Drilldown.

Related Information

FPM Chart UIBB: A Data-Model Driven Approach [page 91]In Floorplan Manager, charting is done on the basis of a data-model driven approach.

Interfaces for the Chart UIBB [page 97]Description of the various interfaces and methods used when configuring a Chart component.

3.2.1.4.1 FPM Chart UIBB: A Data-Model Driven Approach

In Floorplan Manager, charting is done on the basis of a data-model driven approach.

In the data-model driven approach (see following figure), the application developer first chooses (in the feeder class) the table model on which the chart is to be configured during design time and rendered during the runtime. A simple table model is provided that can be addressed by DDIC table types for example, and that can be efficiently consumed by the application. Later, a chart type is selected that fits the data provided.

The data model is defined in the GET_DEFINITION method of the feeder class.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 91

Page 92: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Figure 14: Data-Model Driven Approach in FPM Charting

With this approach, the application developer is never forced to invest in techniques close to the rendering (JSON or Java Script). Instead, he or she stays focused on the back-end application logic, and the corresponding data retrieval from arbitrary data sources (classic DDIC, In-Memory, Cloud, SOA, ODATA, and so on).

On configuration level (dynamic or static) dimensions and measures are defined on the basis of the given data model. A dimension is regarded in this context as a range (for example, City, Country, Month, Year and Currency Code), whereas a measure is understood as something that can be quantified by numbers only. A measure can be always used as a dimension; a dimension cannot however also be converted always into a measure.

Charting takes place on the basis of one table, where single columns (table fields) are defined either as a Dimension or as a Measure. Most of the DDIC table types can be regarded as a table model. The table model is naturally similar to the data model of the List ATS UIBB.

The data-model driven approach allows for the generation of several chart types on one dataset. For instance, a dataset that is visualized using a Bar Chart can be also rendered as an Area or Line Chart. Restricting to one Measure, the same dataset can be rendered as a Pie Chart or Donut Chart, and so on. For more information, see Chart Types: Minimum Requirements.

For the application developer, the Table Model is an excellent candidate that should be exposed by the FPM APIs, since it can be easily prepared from most of the DDIC table types, as the following code shows:

DATA: lt_table TYPE <<DDIC_TABLE_TYPE>>, lo_table_descr TYPE REF TO cl_abap_tabledescr. lo_table_descr ?= cl_abap_tabledescr=>describe_by_data( lt_table ).

92 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 93: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Related Information

Chart Types: Minimum Requirements [page 93]Floorplan Manager provides you with numerous chart types for configuration. However, the type of chart available at configuration or at personalization is dependent on the number of fields defined as a measure or dimension (and the values of their axes). The axes in the following table are required by the FPM runtime to transform data from the table model into a cross-table model representation.

3.2.1.4.2 Chart Types: Minimum Requirements

Floorplan Manager provides you with numerous chart types for configuration. However, the type of chart available at configuration or at personalization is dependent on the number of fields defined as a measure or dimension (and the values of their axes). The axes in the following table are required by the FPM runtime to transform data from the table model into a cross-table model representation.

Table 6: Chart Types showing Number of Measures and Dimensions

Chart Type Chart Descrip­tion

Measures Dimensions

Axis Index Index Axis Index Index

001 Line 1 1 1 1

002 Bar 1 1 1 1

003 Column 1 1 1 1

004 Pie 1 1 1 1

005 Scatter 1

2

1

1

1 1

006 Combination 1

1

1

2

1 1

007 Donut 1 1 1 1

008 Waterfall 1 1 1 1

009 Box Plot 1 1 1

2

1

1

010 Area 1 1 1

2

1

1

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 93

Page 94: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Chart Type Chart Descrip­tion

Measures Dimensions

Axis Index Index Axis Index Index

011 Horizontal Area 1 1 1

2

1

1

012 100% Area 1 1 1

2

1

1

014 Stacked Bar 1 1 1

2

1

1

015 Stacked Column 1 1 1

2

1

1

016 100% Stacked Bar

1 1 1

2

1

1

017 100% Stacked Column

1 1 1

2

1

1

018 Dual Bar 1

2

1

1

1 1

019 Dual Column 1

2

1

1

1 1

020 Dual Stacked Bar 1

2

1

1

1 1

021 Dual Stacked Column

1

2

1

1

1 1

022 Dual Percentage Stacked Bar

1

2

1

1

1 1

023 Dual Percentage Stacked Column

1

2

1

1

1 1

024 Horizontal Line 1 1 1 1

94 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 95: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Chart Type Chart Descrip­tion

Measures Dimensions

Axis Index Index Axis Index Index

025 Dual Line 1

2

1

1

1 1

026 Dual Horizontal Line

1

2

1

1

1 1

027 Horizontal Com­bination

1 1 1

2

1

1

028 Dual Combina­tion

1

2

1

1

1 1

029 Dual Horizontal Combination

1

2

1

1

1 1

030 3D Column 1 1 1

2

1

1

031 3D Bar 1 1 1

2

1

1

032 Horizontal Wa­terfall

1 1 1 1

033 Stacked Water­fall

1 1 1

2

1

1

034 Horizontal Stacked Water­fall

1 1 1

2

1

1

035 Horizontal Box Plot

1 1 1

2

1

1

036 Bubble 1

2

3

1

1

1

1

1

1

2

037 Radar 1 1 1 1

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 95

Page 96: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Chart Type Chart Descrip­tion

Measures Dimensions

Axis Index Index Axis Index Index

038 Tag Cloud 1 1 1 1

039 3D Donut 1

2

1

1

1 1

040 3D Pie 1

2

1

1

1 1

041 Heat Map 1 1 1 1

042 Tree Map 1 1 1 1

043 Multiple Line 1 1 1

2

1

1

044 Multiple Bar 1 1 1

2

1

1

045 Multiple Column 1 1 1

2

1

1

046 Multiple Pie 1 1 1

2

1

1

047 Multiple Donut 1 1 1

2

1

1

048 Multiple Area 1 1 1

2

1

1

049 Multiple Radar 1 1 1

2

1

1

050 Multiple 3D Do­nut

1

2

1

1

1

2

1

1

051 Multiple 3D Pie 1

2

1

1

1

2

1

1

96 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 97: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Chart Type Chart Descrip­tion

Measures Dimensions

Axis Index Index Axis Index Index

052 Multiple Horizon­tal Line

1 1 1

2

1

1

053 Multiple Horizon­tal Area

1 1 1

2

1

1

054 Multiple 100% Area

1 1 1

2

1

1

055 Multiple 100% Horizontal Area

1 1 1

2

1

1

056 Multiple Stacked Bar

1 1 1

2

1

1

057 Multiple Stacked Column

1 1 1

2

1

1

058 Multiple 100% Stacked Bar

1 1 1

2

1

1

059 Multiple 100% Column

1 1 1

2

1

1

3.2.1.4.3 Interfaces for the Chart UIBB

Description of the various interfaces and methods used when configuring a Chart component.

IF_FPM_GUIBB_CHART

The data model for the FPM Chart GUIBB can be accessed through the feeder class interface IF_FPM_GUIBB_CHART. This interface includes the interface IF_FPM_GUIBB. The application developer must implement at least the following methods:

● GET_DEFINITIONIn this method, the application developer decides on a data model (for example, a Table Model) by calling the appropriate method on the received model factory instance.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 97

Page 98: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● GET_DATAIn this method, the selected data model instance is supplied with the appropriate data.

For a full list of the methods of this interface, see the interface documentation for other GUIBB components.

Model Factory Interfaces

There are two Model Factory interfaces:

● IF_FPM_CHART_MODEL_FACTORYExposed by the feeder class method IF_FPM_GUIBB_CHART~GET_DEFINITION. Its method GET_TABLE_MODEL provides an instance on the Table Model through interface IF_FPM_CHART_TABLE_MODEL.

● IF_FPM_CHART_DATA_FACTORYExposed by the feeder class method IF_FPM_GUIBB_CHART~GET_DATA. Its method GET_TABLE_MODEL provides an instance on the Table Model through interface IF_FPM_CHART_TABLE_DATA.

Both interfaces provide access to the selected data model and are implemented by class CL_FPM_CHART_MODEL_FACTORY.

Table Model Interfaces

In a first version of the Chart UIBB, the Table Model is offered as the only data model of the FPM Chart UIBB. The Table Model can be consumed easily by the application developer as it can be derived from any DDIC table type.

There are three Table Model interfaces:

● IF_FPM_CHART_TABLE_MODELExposed by the Model Factory interface IF_FPM_CHART_MODEL_FACTORY~GET_TABLE_MODEL. It is typically accessed in the feeder class methods GET_DEFINITION and GET_DATA. Its method SET_DEFINITION defines the Table Model by setting a field catalogue, and field descriptions.

● IF_FPM_CHART_TABLE_DATAExposed by the Model Factory interface IF_FPM_CHART_DATA_FACTORY~GET_TABLE_MODEL. It is typically accessed in the feeder class methods GET_DEFINITION and GET_DATA. Its method SET_DATA sets the Table Model data.

● IF_FPM_CHART_TABLE_SELECTIONExposed by the event parameter FPM_CHART_SELECTION of FPM event FPM_CHART_SELECT. It is typically accessed in the feeder class methods PROCESS_EVENT and GET_DATA. Its method GET_CURRENT_SELECTION returns the selected indices from the current round trip.

Using interface IF_FPM_CHART_TABLE_DATA, the application developer sets the current chart data set (method SET_DATA ). Methods GET_DIMENSIONS and GET_MEASURES may be used to enable (respectively, optimize) the selection of data in the feeder class.

All three interfaces are implemented by the class CL_FPM_CHART_TABLE_MODEL.

98 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 99: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Configuration Interface IF_FPM_GUIBB_CHART_CONFIG

The Configuration API IF_FPM_GUIBB_CHART_CONFIG is derived from the explicit configuration context of Chart UIBB runtime component FPM_CHART_UIBB. The Configuration API IF_FPM_GUIBB_CHART_CONFIG can be accessed, for example, through the feeder class interface method IF_FPM_GUIBB_CHART~GET_DEFAULT_CONFIG. It is used to create pre-configured chart configurations during the FPM design time, as well as complete dynamic configuration contexts during the FPM runtime .

The Configuration API is implemented by class CL_FPM_GUIBB_CHART_MODEL_CONFIG.

3.2.1.5 Composite Component

Definition

A generic design template allowing you to group additional application-specific views (UIBBs) within a single UIBB.

It is implemented using the Web Dynpro component FPM_COMPOSITE_UIBB.

The information displayed in a Composite component at runtime is determined by the individual components within the Composite component.

Use

You use this design template for content layout purposes. Use it when you want to display data in different ways within a single UIBB. For example, you can display a form, a table and a search component all within one UIBB. You can determine the concrete display of the data in a Composite component when configuring the Web Dynpro component FPM_COMPOSITE_UIBB.

NoteComposite UIBBs explicitly do not serve Master/Detail purposes.

Structure at Runtime

A Composite component consists of a number of other components, for example, form components and list components.

Editing the Structure at Design Time (FLUID)

You configure this component using the FPM configuration editor, FLUID.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 99

Page 100: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Although the Composite component is technically a UIBB, you use it for layout purposes. As such, when you edit this component using FLUID, you see settings that are usually available only for the floorplan components.

At design time, the Preview panel in FLUID displays the Composite component as a number of placeholders for UIBBs. You can delete the existing placeholders or add more of them. You can change the layout of the placeholders using the relevant field in the General Settings panel. In the standard (one-column) layout, you can add an unlimited number of UIBBs to a composite component.

You add your UIBBs to the placeholders using one of the following methods:

● Drag and drop a UIBB from the Repositories panel onto a placeholder● Choose the Add UIBB button in the Composite UIBB Schema panel

An individual UIBB can occupy more than a single area within the Composite component. Using the Height, Width, Column, and Row fields of the individual components, you can determine where to place the components within the Composite component.

The following components cannot be included in a Composite component:

● Tabbed component● Launchpad component● Composite component; nesting of composite components is not possible

For more information on the attributes of this component in FLUID, choose Field Help from the context menu in the system.

Related Information

Changing the Composite UIBB dynamically at Runtime [page 101]You may add, remove, and get UIBBs from your Composite UIBB component during runtime.

100 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 101: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.5.1 Changing the Composite UIBB dynamically at Runtime

You may add, remove, and get UIBBs from your Composite UIBB component during runtime.

Context

To do this, proceed as follows:

Procedure

1. Choose an application-specific Web Dynpro component. and add the Web Dynpro interface IF_FPM_CMPST_CONF_EXIT to the Implemented Interfaces tab of your Web Dynpro component. This is one of the Web Dynpro components that provide you with a child UIBB.

2. Save and activate the newly added interface.3. In the component controller, implement the method OVERRIDE_CONFIG_COMPOSITE.

Alternatively, you can choose to use a class-interface instead of a Web Dynpro interface. The class interface is IF_FPM_COMPOSITE_CONF_EXIT.

3.2.1.6 Form Component

Definition

A generic design template for displaying data in a form.

It is implemented using the Web Dynpro component FPM_FORM_UIBB.

The information displayed in a form at runtime is determined by the feeder class assigned to the configuration of the Web Dynpro component FPM_FORM_UIBB.

Use

You use this design template when you want to display data using a form. You can determine the concrete display of the data in a form when configuring the Web Dynpro component FPM_FORM_UIBB.

NoteThis component is superseded by the Form GL2 Component.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 101

Page 102: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Structure at Runtime

A form consists of fields and corresponding field labels. Fields may be grouped together. Forms may also contain toolbars.

Editing the Structure at Design Time (FLUID)

You configure this component using the FPM Configuration Editor.

At design time, the Preview panel in FLUID displays the Form component in WYSIWYG-like style. You can change the layout of the form using the relevant field in the General Settings panel.

A form is composed of various objects:

● ElementElements are descriptor/field combinations that can be configured for the display type of the field or descriptors.

● Melting GroupA melting group is a group of multiple fields.

● ToolbarContains buttons that can have actions assigned to them and can be executed in the form.

● GroupA group consists of elements, melting groups, and toolbars. You can enter a separate name and group type for each group. The following group types are possible:

○ Full screen width with 1 column○ Full screen width with 2 columns○ Half screen width with 1 column

NoteOnly one element or melting group can be displayed per line in a column.

NoteThe information that can be displayed on a form is determined by the feeder class assigned to the configuration of the Web Dynpro component FPM_FORM_UIBB.

You add extra fields to this component using one of the following methods:

● Drag and drop a field from the Repositories panel onto the Preview panel● Choose the Add Element or Add Child Element buttons in the Form UIBB Schema panel

For more information on the attributes of this component in FLUID, choose Field Help from the context menu in the system.

102 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 103: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Related Information

Using the CHECKBOX_GROUP Display Type in a Form [page 103]The Form component contains fields with a display type CHECKBOX_GROUP. In contrast to the other display types, the application must consider making some amendments to ensure the desired functionality.

Interface: IF_FPM_GUIBB_FORM [page 104]Description of methods in the interface implemented by the feeder classes of both types of Form components.

Form GL2 Component [page 107]Melting Groups [page 371]

A melting group is a group of fields that belong together semantically, and that can be found in Form components. Melting groups often require special rendering in display mode (the fields are often merged together) to ensure better user readability.

3.2.1.6.1 Using the CHECKBOX_GROUP Display Type in a Form

The Form component contains fields with a display type CHECKBOX_GROUP. In contrast to the other display types, the application must consider making some amendments to ensure the desired functionality.

To use this field to its full extent, the application must consider the following points:

● The field type must be of type Character, and the field length must be at least the number of checkboxes that you want to display.

● The values of the checkboxes must be set as fixed values for the field.

In the GET_DATA method, use an X to indicate that a checkbox should be checked at runtime, and a space to indicate that it should not be. For example, you want three checkboxes to be displayed at runtime, with all three checked. In GET_DATA, this should be written as XXX. If you wanted the second checkbox un-checked, it would be written as X_X.

With a checkbox field, you can do the following:

● Set default values for a checkbox field.● Use the FLUSH method to get the data from the field, and the change log.● Check the Index of the field to determine whether it is checked (Checked = X, Unchecked = "" (space).

Field Length

The field length must be at least the number of checkboxes that you want to display.

ExampleYou have a field length of 5, and 5 fixed values. Let us presume all are marked with an X. Within the FLUSH method, this field of the structure will be updated XXXXX. Now, let us assume that the fourth field is not marked. Within the FLUSH method, this field of the structure will be updated XXX_X.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 103

Page 104: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.6.2 Interface: IF_FPM_GUIBB_FORM

Description of methods in the interface implemented by the feeder classes of both types of Form components.

Table 7: Methods of IF_FPM_GUIBB_FORM InterfaceGET_DEFINITION:

Allows the feeder class to provide all necessary information for configuring a form: the list of available fields and their properties, and the list of actions (FPM events).

Parameter Description

EO_FIELD_CATALOG Is of type CL_ABAP_STRUCTDESCR. The components of this object are the available fields. The simplest way to provide a field catalog is to create a flat DDIC structure containing all fields, and then get the field catalog using eo_field_catalog ?= CL_ABAP_STRUCTDESCR=>DESCRIBE_BY_NAME(<NAME>).

The Form GUIBB supports only flat structures. When using deep structures, only the highest level fields are available.

ET_FIELD_DESCRIPTION Here you can provide the additional information needed to create the form, for example Label_by_DDIC, LABEL_REF.

ET_ACTION_DEFINITION A list of all actions (which will be transformed to FPM events at runtime) that you can assign to Form ele­ments.

ET_SPECIAL_GROUPS Here you have the same options that you have in the ABAP ALV (see function module REUSE_ALV_GRID_DISPLAY) to group the fields within your field catalogue. You must enter the Special Group for each field in the Field Description table in field SP_GROUP. At design-time, the FPM configuration edi­tor groups the fields. This is an easier way to find fields if your field catalogue contains many fields.

GET_PARAMETER_LIST:

Called at design time and allows you to define a list of the parameters that the feeder class supports. This list is used by the FPM configuration editor to provide the input fields for these parameters.

Parameter Description

RT_PARAMETER_DESCR Is returned from this method. It describes which pa­rameter is possible. In Field TYPE , the DDIC type needs to be entered.

104 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 105: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

INITIALIZE:

Called at runtime when the form is created. It is the first feeder method which is called from FPM.

Parameter Description

IT_PARAMETER Contains a list of the feeder class parameters and the values for them specified in the configuration.

FLUSH:

The first feeder method which is called during an event loop. Whenever an FPM event is triggered (this in­cludes all round trips caused by the form itself) this method is called. Use it to forward changed form data to other components in the same application.

Parameter Description

IT_CHANGE_LOG Lists all changes made by the user.

IS_DATA Is a structure containing the changed data.

PROCESS_EVENT:

Called within the FPM event loop, it forwards the FPM PROCESS_EVENT to the feeder class. Here the event processing can take place and this is where the event can be canceled or deferred.

Parameter Description

IO_EVENT The FPM event which is to be processed.

EV_RESULT The result of the event processing. There are 3 possible values:

● ev_result = if_fpm_constants=>gc_event_result-OK

● ev_result = if_fpm_constants=>gc_event_result-FAILED

● ev_result = if_fpm_constants=>gc_event_result-DEFER

IV_RAISED_BY_OWN_UI Indicates whether the event originates from this UIBB.

ET_MESSAGES A list of messages which shall be displayed in the mes­sage region.

GET_DATA:

Called within the FPM event loop and forwards the FPM PROCESS_BEFORE_OUTPUT event to the feeder class. Here you specify the form data after the event has been processed.

Parameter Description

IO_EVENT The FPM event which is to be processed.

IO_EXTENDED_CTRL Request focus on action or field.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 105

Page 106: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DATA:

Called within the FPM event loop and forwards the FPM PROCESS_BEFORE_OUTPUT event to the feeder class. Here you specify the form data after the event has been processed.

Parameter Description

IV_RAISED_BY_OWN_UI Indicates whether the event originates from this UIBB.

IV_EDIT_MODE The OVP edit mode state of the UIBB.

IT_SELECTED_FIELDS The list of fields necessary for the form rendering. Pro­vide only the data for the fields listed in this table; all other fields are neither visible at runtime nor used as reference for visible fields.

ET_MESSAGES A list of messages which shall be displayed in the mes­sage area.

EV_DATA_CHANGED For performance reasons, the GUIBB adjusts the data in the form only if the data has been changed. To indi­cate this, set this flag whenever you change the data to be displayed within this feeder.

EV_FIELD_USAGE_CHANGED Indicates whether or not the field usage has been changed by this method. If you change the field usage without setting this flag to X, your changes are ignored.

EV_ACTION_USAGE_CHANGD Indicates whether or not the action usage has been changed. Use an X to indicate whether you changed the action usage. If you do not, your changes are ig­nored.

CS_DATA The form data to be changed.

CT_FIELD_USAGE Field usage to change. The field usage consists of the field attributes which might change at runtime (for ex­ample, enabled, and visible). Note that if you change the fixed values of a field, set the flag FIXED_VALUES_CHANGED for this field.

CT_ACTION_USAGE Action usage to change. The action usage consists of the attributes related to actions which might change at runtime. For example, visibility. If an action is rendered as a button, then the visibility setting of the button is defined here.

106 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 107: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DEFAULT_CONFIG:

Call this if you want to have a default configuration. Use it to call pre-configured form configurations when a user starts the FPM configuration editor. This avoids the user, who uses a feeder class to create a form, having to create it from the beginning.

Parameter Description

IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_FORM_CONFIG: This object provides the API to create a default configuration for the “old” Form, is not used in FPM_FORM_UIBB_GL2.

IO_LAYOUT_CONFIG_GL2 Of type IF_FPM_GUIBB_FORM_CFG_GL2: This object provides the API to create a default.

CHECK_CONFIG:

Call this if you want to make your own application-specific checks on the configuration in the FPM configu­ration editor immediately before saving.

Parameter Description

IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_FORM_CONFIG: This object provides the API to read the configuration to be saved for the “old” Form, is not used in FPM_FORM_UIBB_GL2.

ET_MESSAGES A list of messages which shall be displayed in the mes­sage region.

IO_LAYOUT_CONFIG_GL2 Of type IF_FPM_GUIBB_FORM_CFG_GL2: This object provides the API to read the configuration to be saved.

3.2.1.7 Form GL2 Component

Definition

A generic design template for displaying data in a form.

It is implemented using the Web Dynpro component FPM_FORM_UIBB_GL2.

The information displayed in a form at runtime is determined by the feeder class assigned to the configuration of the Web Dynpro component FPM_FORM_UIBB_GL2.

NoteUse the Form GL2 component to ensure that your applications comply with the most recent SAP user interface guidelines; the original form component, implemented using the Web Dynpro component FPM_FORM_UIBB is, however, still available.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 107

Page 108: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Use

You use this design template when you want to display data using a form. You can determine the concrete display of the data in a form when configuring the Web Dynpro component FPM_FORM_UIBB_GL2.

Structure at Runtime

A form consists of fields and corresponding field labels. Fields may be grouped together. Forms may also contain toolbars.

Editing the Structure at Design Time (FLUID)

You configure this component using the FPM configuration editor, FLUID.

At design time, the Preview panel in FLUID displays the Form component in WYSIWYG-like style. A grid enables you to place elements (fields, label, toolbars, and so on) accurately inside your form. You can change the layout of the form using the relevant field in the General Settings panel.

A form is comprised of various sub-objects:

● Standard ElementElements are descriptor/field combinations that can be configured for the display type of the field or descriptors

● Toolbar (Button Row)Contains buttons that can have actions assigned to them, and can be executed in the form

● ButtonA single button that can have actions assigned to it, and can be executed in the form

● GroupA group consists of group elements, and group toolbars. You can enter a separate name for each group. A group of elements is confined to one panel only in a 16/2 layout of a Form GL2 component.

● Group Element Same structure as the standard element

● Group Button RowButton Row with the same structure as the Button Row (Toolbar)

● Group ButtonButton element with the same structure as the Button

You add extra fields to this component using one of the following methods:

● Drag and drop a field from the Repositories panel onto the Preview panel● Choose the Add Element button in the Form UIBB Schema panel

For more information on the attributes of this component in FLUID, choose Field Help from the context menu in the system.

108 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 109: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Related Information

Melting Groups [page 371]A melting group is a group of fields that belong together semantically, and that can be found in Form components. Melting groups often require special rendering in display mode (the fields are often merged together) to ensure better user readability.

3.2.1.8 Form Repeater Component

Definition

A generic design template for displaying data in a repeating form layout.

Depending on the application, individual forms may be expanded to display further form fields, but only one form at a time may be in its expanded state. The fields displayed in this expanded version of the data are not necessarily displayed in a form format but can actually be displayed in another format such as a table or list or even a Composite component. A separate UIBB configuration, known as the Swap UIBB, displays the expanded version of the form data.

This component is implemented using the Web Dynpro component FPM_FORM_REPEATER_UIBB.

The information displayed in this component at runtime is determined by the feeder class assigned to the configuration of the Web Dynpro component FPM_FORM_REPEATER_UIBB.

Use

You use this design template when you want to display data using a form. You can determine the concrete display of the data in this component when configuring the Web Dynpro component FPM_FORM_REPEATER_UIBB.

Structure at Runtime

The screenshot below shows how a Form Repeater component may look at runtime. Note that the third form has been expanded to show more fields.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 109

Page 110: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Figure 15: Form Repeater Component using Swap Component

Each form displays a different data-set or record, and individual forms are, optionally, divided by separators.

Each form in a Form Repeater component has a structure identical to the Form GL2 component. However, the expanded version of the data may be displayed in a format other than a form, for example in a list format.

Forms may be grouped together but only one level of grouping is available.

Any action buttons that appear at runtime are defined in the relevant feeder class.

Editing the Structure at Design Time (FLUID)

You configure this component using the FPM configuration editor, FLUID.

At design time, the Preview panel in FLUID displays the Form Repeater component in WYSIWYG-like style. A grid enables you to place elements (fields, label, toolbars, and so on) accurately inside your form. You can change the layout of the form using the relevant field in the General Settings panel.

NoteThe Preview panel displays only the main form of the Form Repeater component. The extra fields that appear in the expanded version belong to another component (that is the Swap UIBB). To see the fields of the Swap

110 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 111: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

UIBB inside the Preview panel, take note of the Web Dynpro Component and Configuration ID of the Swap UIBB, and open FLUID for this component configuration.

You add extra fields to this component using one of the following methods:

● Drag and drop a field from the Repositories panel onto the Preview panel● Choose the Add Element button in the Form Repeater UIBB Schema panel

Additionally, FLUID provides you with the following elements:

● Add Swap UIBB button allows you to change the Swap UIBB for a new one.● Group Field, in the General Settings panel, allows you to group the individual forms at runtime by a single field.● If no value is specified in the Row Count field, all data records of the form are displayed one below the other.

Entering a value larger than zero activates a paginator, enabling you to view records by selecting particular pages rather than by scrolling.

For more information on the attributes of this component in FLUID, choose Field Help from the context menu in the system.

Further Notes on the Swap UIBB

The toolbar of the Form Repeater UIBB Schema contains the button Add Swap UIBB. This allows you to add another UIBB that is configured to display extra fields at runtime, and that can be exchanged for the Form Repeater UIBB temporarily. The Swap UIBB is a separate UIBB configuration and may be of any UIBB type, for example, it may be a configuration of FPM_LIST_UIBB. At runtime, the user may, for example, choose a Details or Expand button attached to a particular form to see extra fields. The data and its layout that is displayed is provided by the UIBB configuration that is chosen as the Swap UIBB.

The Attributes panel may contain the Swap Events table that displays a list of events triggering the swapping of the Swap UIBB with the original form component. These events are defined in the relevant feeder class. Swap events comprise the following:

● An FPM Event ID● A Swap Type which defines whether the event invokes or hides the Swap UIBB● An Event Condition which defines whether only the UIBB events, events of the Swap UIBB or any events are

taken into account

For example, a row action of the Form Repeater feeder class can be configured as a Swap-In event, so that an Expand link in each repeating unit triggers its representation to be replaced by a Form UIBB displaying an extended representation of the entity, that is, showing more fields. An action of the Form feeder class can then be configured as a Swap-Out event so that a Collapse link triggers a return from the Form UIBB representation by the repeating unit of the Form Repeater.

Related Information

Paging Mechanism for Fast Data Retrieval [page 112]If an application has to retrieve and display a very large amount of records (tens of thousands for example) in an FPM GUIBB, performance problems are very likely to occur if all the data is loaded at once. The paging mechanism offered by FPM prevents this.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 111

Page 112: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Interface: IF_FPM_GUIBB_FORM_REPEATER [page 113]Description of methods in the interface implemented by the feeder classes of Form Repeater components.

Melting Groups [page 371]A melting group is a group of fields that belong together semantically, and that can be found in Form components. Melting groups often require special rendering in display mode (the fields are often merged together) to ensure better user readability.

3.2.1.8.1 Paging Mechanism for Fast Data Retrieval

If an application has to retrieve and display a very large amount of records (tens of thousands for example) in an FPM GUIBB, performance problems are very likely to occur if all the data is loaded at once. The paging mechanism offered by FPM prevents this.

The Form Repeater GUIBB offers a paging mechanism; a feature by which only that data that is currently visible on the UI, is requested from the application by the FPM runtime, and only that data is transferred from the backend to the UI. This results in both a much lower memory consumption and shorter response times.

Paging Interface

To use the paging mechanism in the Form Repeater GUIBB, the feeder class must do the following:

● Implement the paging interface IF_FPM_GUIBB_FORM_REP_PAGING● Return the value X in the implementation of the interface method IS_ACTIVE● Set the number of visible lines, per Form Repeater page, to a value larger than 0 in the Form Repeater

configuration

You can find details of all methods and parameters of this interface in the system.

NoteThe standard feeder methods of interface IF_FPM_GUIBB_FORM_REPEATER are still called when paging is active, except for method GET_DATA which is replaced by method PROCESS_BEFORE_OUTPUT of the paging interface.

112 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 113: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.8.2 Interface: IF_FPM_GUIBB_FORM_REPEATER

Description of methods in the interface implemented by the feeder classes of Form Repeater components.

Table 8: Methods of IF_FPM_GUIBB_FORM_REPEATER InterfaceGET_DEFINITION:

Allows the feeder class to provide all necessary information for configuring a Form Repeater component: the list of available fields and their properties, and the list of actions (FPM events).

Parameter Description

EO_FIELD_CATALOG Is of type CL_ABAP_TABLEDESCR table, and must de­scribe an index table with a structured line type. The components of the table are the available fields. .

The Form Repeater GUIBB supports only flat struc­tures. When using deep structures, only the highest level fields are available.

ET_FIELD_DESCRIPTION Here you can provide the additional information needed to create the Form Repeater component, for example label texts, read-only properties, F4 helps.

ET_ACTION_DEFINITION A list of all actions (which will be transformed to FPM events at runtime) that you can assign to Form Re­peater elements as field events, or in an OVP toolbar if the action is marked as exposable.

ET_ROW_ACTION A list of all row actions (which will be transformed to FPM events at runtime) that you can assign to buttons or links. The visibility and enablement of row actions can be controlled index-specifically.

ET_SPECIAL_GROUP Special groups can be used for a grouping feature in FLUID. If the feeder class provides a special group table it should assign each field in the field description table to a group in field SP_GROUP . At design-time, the FPM configuration editor groups the fields. This is an easier way to find fields if your field catalogue contains many fields.

GET_PARAMETER_LIST:

Called at design time and at runtime when the Form Repeater component is created. It allows you to define a list of the parameters that the feeder class supports. This list is used by the FPM configuration editor to provide the input fields for these parameters.

Parameter Description

RT_PARAMETER_DESCR Is returned from this method. It describes which pa­rameter is possible. In Field TYPE , the DDIC type needs to be entered.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 113

Page 114: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

INITIALIZE:

Called at design time and at runtime when the Form Repeater component is created.

Parameter Description

IT_PARAMETER Contains a list of the feeder class parameters and the values for them specified in the configuration.

FLUSH:

This method is called whenever an FPM event is triggered (this includes all round trips caused by the Form Repeater component itself). Use it to forward changed form repeater data to other components in the same application.

Parameter Description

IT_CHANGE_LOG Lists all changes made by the user.

IS_DATA Is a table containing the changed data.

PROCESS_EVENT:

Called within the FPM event loop. Here the event processing can take place and this is where the event can be canceled or deferred.

Parameter Description

IO_EVENT The FPM event which is to be processed.

EV_RESULT The result of the event processing. There are 3 possible values:

● ev_result = if_fpm_constants=>gc_event_result-OK

● ev_result = if_fpm_constants=>gc_event_result-FAILED

● ev_result = if_fpm_constants=>gc_event_result-DEFER

IV_RAISED_BY_OWN_UI Indicates whether the event originates from this UIBB.

ET_MESSAGES A list of messages which shall be displayed in the mes­sage region.

GET_DATA:

Called within the FPM event loop. Here you specify the form repeater data after the event has been proc­essed.

Parameter Description

IO_EVENT The FPM event which is to be processed.

114 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 115: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DATA:

Called within the FPM event loop. Here you specify the form repeater data after the event has been proc­essed.

Parameter Description

IO_EXTENDED_CTRL Of type IF_FPM_FORM_REPEATER_EXT_CTRL: An ex­tended control interface for special interaction be­tween the feeder class and the UIBB. As read-only vari­ables, it provides information of the assigned Swap UIBB key, the current swap index (0 if the swap UIBB is not active), and the enabled state of the Form Repeater UIBB, and for which field grouping is configured. If grouping, the feeder class should sort the data by the Group field. The methods of the interface allow to set the entire Form Repeater (except a Swap UIBB) ena­bled or disabled. It is also possible to change the index of the Swap UIBB, except that it is not allowed to switch from index zero (Swap UIBB not active) to a non-zero index (Swap UIBB active).

IV_RAISED_BY_OWN_UI Indicates whether the event originates from this UIBB.

IV_EDIT_MODE The OVP edit mode state of the UIBB.

IT_SELECTED_FIELDS The list of fields necessary for the form rendering. Pro­vide only the data for the fields listed in this table; all other fields are neither visible at runtime nor used as reference for visible fields.

ET_MESSAGES A list of messages which shall be displayed in the mes­sage area.

EV_DATA_CHANGED For performance reasons, the GUIBB adjusts the data in the form repeater only if the data has been changed. You must set this flag whenever you change the pa­rameter CT_DATA.

EV_FIELD_USAGE_CHANGED Indicates whether or not the field usage has been changed by this method. If you change the field usage without setting this flag to X, your changes are ignored.

EV_ACTION_USAGE_CHANGD Indicates whether or not the action usage has been changed. Use an X to indicate whether you changed the action usage. If you do not, your changes are ig­nored.

CS_DATA The form repeater data to be changed.

CT_FIELD_USAGE Field usage to change. The field usage consists of the field attributes which might change at runtime (for ex­ample, enabled, and visible). Note that if you change the fixed values of a field, set the flag FIXED_VALUES_CHANGED for this field.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 115

Page 116: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DATA:

Called within the FPM event loop. Here you specify the form repeater data after the event has been proc­essed.

Parameter Description

CT_ACTION_USAGE Action usage to change. The action usage consists of the attributes related to actions which might change at runtime. For example, visibility. If an action is rendered as a button, then the visibility setting of the button is defined here.

GET_DEFAULT_CONFIG:

Call this if you want to have a default configuration. Use it to call pre-configured form configurations when a user starts the FPM configuration editor. This avoids the user, who uses a feeder class to create a form, having to create it from the beginning.

Parameter Description

IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_FORM_REPEATER_CFG: This object provides the API to create a default configura­tion.

CHECK_CONFIG:

Call this if you want to make your own application-specific checks on the configuration in the FPM configu­ration editor immediately before saving.

Parameter Description

IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_FORM_REPEATER_CFG: This object provides the API to read the configuration to be saved.

ET_MESSAGES A list of messages which shall be displayed in the mes­sage region.

3.2.1.9 Hierarchical List (Tree) Component

Definition

A generic design template for displaying data in a hierarchical list (also known as a Tree). A hierarchical list is a list of items arranged on interdependent successive levels. Certain items in a hierarchical list are associated with nodes that may be expanded to display further lists below them. Each item in a lower level list has a parent/child relationship with the item in the higher level list whose node was expanded.

It is implemented using the Web Dynpro component FPM_TREE_UIBB.

The information displayed in a Hierarchical List component at runtime is determined by the feeder class assigned to the configuration of the Web Dynpro component FPM_TREE_UIBB.

116 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 117: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

NoteFrom SAP NetWeaver 7.31 SP4 onwards, this component uses the Web Dynpro ABAP C-Table (Client Table) for displaying the data in a list (which the List ATS component also uses). The main advantages include better client-side rendering, and smooth horizontal and vertical scrolling. It also features an integrated personalization dialogue box, and new configuration features in the General Settings panel. All new configurations of this component automatically use the C-Table. Previously made configurations are not updated with the C-Table. New component configurations still use the same feeder classes as were previously used for this component.

Use

You use this design template when you want to display data in a hierarchical list format. You can determine the concrete display of the data in a Hierarchical List component when configuring the Web Dynpro component FPM_TREE_UIBB.

Structure at Runtime

A Hierarchical List component is displayed as a table of rows and columns at runtime. Each item in a list is displayed in a separate row. Items are grouped together under nodes. A list has its own toolbar.

Each column of the list has a column header. If the application has enabled list functions such as sorting, filtering, and grouping, an arrow appears in the bottom-right corner of the column header when you hover the mouse over the heading at runtime. The available menu options are determined by the relevant feeder class.

List components may contain an action column containing several one-click action controls.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 117

Page 118: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The following figures illustrates what a Hierarchical (Tree) component might look like at runtime:

Figure 16: Hierarchical List Component at Runtime

If the application has enabled sorting, a small arrow appears in the bottom-right corner of the column heading at runtime allowing you to perform this function.

Hierarchical list components may contain an action column containing several one-click action controls.

Editing the Structure at Design Time (FLUID)

You configure this component using the FPM configuration editor, FLUID.

At design time, the Preview panel in FLUID displays the Hierarchical List component in a WYSIWYG style.

In the General Settings panel, you can specify settings applicable to the list as a whole.

In the Tree UIBB Schema, you can specify attributes for the individual elements of the list and add or remove columns.

A Hierarchical List has the following properties:

● Master ColumnThe master column displays all the items in a list. When the system first displays the list, each top-level, parent item in the master column is preceded by an Expand or Collapse icon, which allows you to see the child

118 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 119: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

(sub) items contained within it. A top-level item in the master column with no child items has no Expand or Collapse icon preceding it.The master column is always visible and is always displayed as the first column in a table.

● Incremental LoadingThe Hierarchical List component permits incremental loading of data, meaning that data relating to sub-lists can be loaded into the application only when the node is expanded.

For more information on the attributes of this component in FLUID, choose Field Help from the context menus in the system.

Related Information

FPM Events and the Hierarchical List Component [page 119]The Hierarchical List (Tree) component, being an FPM UIBB, takes part, when it is visible, in each FPM event loop. The Tree component may also raise FPM events itself from several sources.

Interface: IF_FPM_GUIBB_TREE [page 121]

Enabling the Search Feature in the Tree Component [page 126]Like the List ATS UIBB, the Tree UIBB can activate a search function within its toolbar.

3.2.1.9.1 FPM Events and the Hierarchical List Component

The Hierarchical List (Tree) component, being an FPM UIBB, takes part, when it is visible, in each FPM event loop. The Tree component may also raise FPM events itself from several sources.

These events are raised from the following sources:

● Cell eventsThe columns may contain fields with a display type that is capable of raising an event (for example, a Button display type). All cell-based events have the FPM event ID IF_FPM_GUIBB_TREE=>GC_GUIBB_TREE_ON_CELL_ACTION. The corresponding row and column values are added as event parameters to this FPM event as follows:

○ IF_FPM_GUIBB_TREE=>GC_EVENT_PAR_ROW○ IF_FPM_GUIBB_TREE=>GC_EVENT_PAR_COLUMN_NAME

● Toolbar eventsAlmost each toolbar element may raise an FPM event. In this case, the event ID is the action ID (which is defined by the feeder class in method GET_DEFINITION). To get user input values from elements such as a toggle button, input field, or dropdown list box, you can use the following FPM event parameters:

○ IF_FPM_GUIBB_TREE=>GC_EVENT_PAR_TOGGLE_STATE○ IF_FPM_GUIBB_TREE>GC_EVENT_PAR_INPUT_VALUE○ IF_FPM_GUIBB_TREE=>GC_EVENT_PAR_DROP_DOWN_KEY

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 119

Page 120: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

NoteThere is a default button set in the toolbar for applications. This button set contains two buttons, Expand All and Collapse All, which control the display content of the tree nodes. Once the default button set is configured, the application itself must handle the event IDs of these buttons in the feeder class.

● Selection eventsA row selection may also raise an FPM event. It is possible to choose whether only a lead selection, or a normal selection raises an FPM event. For more information, see the system documentation in FLUID).

● Sorting Event:It is possible sort the Tree UIBB. However, the FPM framework provides only the handle for the sort event triggered on the UI by a user. As a result, an FPM event is triggered which can then be handled in the respective feeder class. Information such as the feeder class, the direction of the sort, and the column which is sorted are available as event parameters. The actual sorting of the data must be handled in the feeder class itself. Note that the master column of the Tree UIBB is not available for sorting. Sorting can be activated only for the other columns in the Tree. Additionally, sorting needs to be activated by the feeder class ( in the GET_DEFINITION method). The FPM event ID which is raised for sorting is FPM_SORT_TREE_COLUMN.

● Sorting with the New C-Table:The feeder class, using method GET_DEFINITION, parameter FIELD_DESCRIPTION, and attribute ALLOW_SORT, determines which columns are available for sorting.There are two attributes in method GET_DEFINITION, parameter ES_OPTIONS:

○ ALLOW_MULTI_COL_SORTWhen this attribute is set to TRUE, the personalization dialog box enables the user to sort according to more than one column. It is recommended to set this attribute to TRUE although the default is FALSE (for compatibility reasons).

○ ALLOW_SORT_PERSONALIZATIONWhen this attribute is set to TRUE, the Personalization dialog box displays a Sorting tab. The recommended value is also TRUE.Whether the sort feature is available or not is also determined by the configuration (General Settings panel in FLUID). Sorting is available only when the feeder class, and the configuration, allow it.At runtime, when a user triggers sorting, the following FPM event is raised: IF_FPM_GUIBB_TREE=>GC_EVENT_APPLY_RULES. The feeder class retrieves the current sort rule in the feeder class method GET_DATA. The parameter, IO_SERVICE_INFO, of type IF_FPM_TREE_SERVICE_INFO. Note that sort rules can be persisted by using the Personalization dialog box. That means that, even at startup, it is possible that sort rules already exist; this makes it necessary to use parameter IO_SERVICE_INFO to check for this first.

● One-Click ActionsOne-click actions are available in this component. For more information on one-click actions, see the section on the List ATS Component.

● Personalization Dialog BoxThis is available only to components that are created in SAP NetWeaver 7.03/7.31 SP4 onwards (which use the WD ABAP C-Table). For more information, see the documentation under this heading under the List ATS Component. However, note that this dialog box contains a restricted set of features for the Hierarchical List Component.

120 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 121: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.9.2 Interface: IF_FPM_GUIBB_TREE

Table 9: Methods of IF_FPM_GUIBB_TREE InterfaceGET_DEFINITION:

Allows the feeder class to provide all necessary information for configuring a Tree component: the list of available fields and their properties, and the list of actions (FPM events).

Parameter Description

EO_FIELD_CATALOG Is of type CL_ABAP_TABLEDESCR table. The compo­nents of the table are the available fields. The simplest way to provide a field catalog is to create a flat DDIC structure containing all the fields and then get the field catalog using the following construct:

eo_field_catalog ?= CL_ABAP_TABLEDESCR=>describe_by_name( <name>)

The Tree GUIBB supports only flat structures. When using deep structures, only the highest level fields are available.

ET_FIELD_DESCRIPTION This mandatory parameter is used to inform FPM which fields from the field catalog are to be used for which purpose in the Tree component. This is achieved with the help of the field COLUMN_TYPE (see note and table below).

The ET_FIELD_DESCRIPTION parameter can also be used to provide additional properties for various col­umns:

● LABEL_BY_DDICIndicates whether a column header text should be taken from DDIC or not

● Search helpsDDIC, OVS, and freestyle search help

● HEADER_TEXT_WRAPPINGDetermines whether the column header text shall be wrapped or not

● Attributes for read-only, mandatory, enabled and visibility

● Attributes for enabling filtering and sorting, for for­matting amongst others

ET_ACTION_DEFINITION A list of all actions (which will be transformed to FPM events at runtime) that you can assign to the Tree ele­ments.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 121

Page 122: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DEFINITION:

Allows the feeder class to provide all necessary information for configuring a Tree component: the list of available fields and their properties, and the list of actions (FPM events).

Parameter Description

ET_SPECIAL_GROUPS This provides you with the same options that you have in the ABAP ALV (see function module REUSE_ALV_GRID_DISPLAY) to group the fields within your field catalog. You must enter the special group for each field in the field description table in field SP_GROUP . At design-time, the FPM configuration edi­tor groups the fields together, providing you with an easier method for finding fields.

COLUMN_TYPE

To create a hierarchical list (tree), you must establish the hierarchical relationship between records using the application data. To do this, the fields in the following table are required. This information is passed in the GET_DEFINITION method of the feeder class. From the field catalog provided in this method, you must select the fields which you want to use to determine the hierarchy. The field COLUMN_TYPE in the ET_FIELD_DESCRIPTION is used to provide this information. The following table explains the various column types:

Table 10: Values for COLUMN_TYPE FieldCOLUMN_TYPE Value Explanation Optional or Mandatory Data Type

Parent Key This column of a table contains the parent ele­ment in the hierarchy at any level.

Mandatory Any

Row Key This column of a table contains the row/child ele­ment in the hierarchy at any level.

Mandatory Any

Expanded This column of the table determines whether the parent node is expanded or not.

Mandatory Boolean

Is Leaf This column of the table determines whether the element is the last node in the hierarchy.

Optional Boolean

Children Loaded This column helps in stop­ping a backend call every time the same node is opened.

Optional Boolean

122 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 123: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

COLUMN_TYPE Value Explanation Optional or Mandatory Data Type

Text This column determines the text which needs to be rendered on the UI for the tree column.

Optional String

Image This column contains the string for an icon if you want to display one in the master column.

Optional String

GET_PARAMETER_LIST:

This method is called at design time and allows you to define a list of the parameters that the feeder class supports. This list is used by the FPM Configuration Editor to provide the input fields for these parameters.

Parameter Description

RT_PARAMETER_DESCR Is returned from this method. It describes which pa­rameter is possible. In Field TYPE , the DDIC type needs to be entered.

INITIALIZE:

Called at runtime when the Tree component is created.

Parameter Description

IT_PARAMETER Contains a list of the feeder class parameters and the values for them specified in the configuration.

FLUSH:

This method is called whenever an FPM event is triggered (this includes all round trips caused by the Tree component itself). Use it to forward changed Tree data to other components in the same application.

Parameter Description

IT_CHANGE_LOG Lists all changes made by the user.

IS_DATA A structure containing the changed data.

PROCESS_EVENT:

Called within the FPM event loop. Here the event processing can take place and this is where the event can be canceled or deferred.

Parameter Description

IO_EVENT The FPM event which is to be processed.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 123

Page 124: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

PROCESS_EVENT:

Called within the FPM event loop. Here the event processing can take place and this is where the event can be canceled or deferred.

Parameter Description

EV_RESULT The result of the event processing. There are 3 possible values:

● ev_result = if_fpm_constants=>gc_event_result-OK

● ev_result = if_fpm_constants=>gc_event_result-FAILED

● ev_result = if_fpm_constants=>gc_event_result-DEFER

ET_MESSAGES A list of messages which shall be displayed in the mes­sage region.

GET_DATA:

Called within the FPM event loop. Here you specify the Tree data after the event has been processed.

Parameter Description

IO_EVENT The FPM event which is to be processed.

IV_RAISED_BY_OWN_UI Indicates whether the event originates from this UIBB.

IV_EDIT_MODE The OVP edit mode state of the UIBB.

IT_SELECTED_FIELDS The list of fields necessary for the Tree rendering. Pro­vide only the data for the fields listed in this table; all other fields are neither visible at runtime nor used as reference for visible fields.

ET_MESSAGES A list of messages which shall be displayed in the mes­sage area.

EV_DATA_CHANGED For performance reasons, the GUIBB adjusts the data in the Tree only if the data has been changed. You must set this flag whenever you change the parameter CT_DATA.

EV_FIELD_USAGE_CHANGED Indicates whether or not the field usage has been changed by this method. If you change the field usage without setting this flag to X, your changes are ignored.

EV_ACTION_USAGE_CHANGD Indicates whether or not the action usage has been changed. Use an X to indicate whether you changed the action usage. If you do not, your changes are ig­nored.

CS_DATA The Tree data to be changed.

124 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 125: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DATA:

Called within the FPM event loop. Here you specify the Tree data after the event has been processed.

Parameter Description

CT_FIELD_USAGE Field usage to change. The field usage consists of the field attributes which might change at runtime (for ex­ample, enabled, and visible). Note that if you change the fixed values of a field, set the flag FIXED_VALUES_CHANGED for this field.

CT_ACTION_USAGE Action usage to change. The action usage consists of the attributes related to actions which might change at runtime. For example, visibility. If an action is rendered as a button, then the visibility setting of the button is defined here.

CS_TREE_ATTRIBUTES Use this parameter to specify the header and the tool­tip for the master column in the Tree.

NoteRegarding columns, note that it is possible to assign the attributes for CT_FIELD_USAGE and CT_ACTION_USAGE either to single cells, or to whole columns. If you want to set these attributes for the whole column, use the corresponding fields in the FIELD_USAGE structure. If you would like to set these attributes for single cells, proceed as follows:

1. Create a new column for the table (add a field to the field catalog in the GET_DEFINITION method).2. Define the column as a technical column (one that is not visible at runtime), by setting the field

TECHNICAL_FIELD to X.This column contains the properties of the cells.

3. In the GET_DEFINITION method, adjust the field description accordingly. For example, you want to set the property READ_ONLY for single cells in column A. For this reason, you create a technical column B. In the field description, you set READ_ONLY_REF to B.

GET_DEFAULT_CONFIG:

Call this if you want to have a default configuration. Use it to call pre-configured form configurations when a user starts the FPM configuration editor. This avoids the user, who uses a feeder class to create a Tree, having to create it from the beginning.

Parameter Description

IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_TREE_CONFIG: This object provides the API to create a default configuration.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 125

Page 126: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

CHECK_CONFIG:

Call this if you want to make your own application-specific checks on the configuration in the FPM configu­ration editor immediately before saving.

Parameter Description

IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_TREE_CONFIG: This object provides the API to read the configuration to be saved.

3.2.1.9.3 Enabling the Search Feature in the Tree Component

Like the List ATS UIBB, the Tree UIBB can activate a search function within its toolbar.

Unlike the List ATS UIBB, in which the search function can be activated simply by selecting the Search Function field in the General Settings panel in FLUID, the search function for the Tree UIBB requires the application to prepare the data before the search.

As the search is performed by the Tree UIBB on all rows (including those rows which might be concealed under collapsed nodes), the application must decide when it should retrieve all of the data. The feeder class must inform the Tree UIBB, using the SEARCH attribute in the feeder class method GET_DEFINITION, parameter ES_OPTION, which of the following options it chooses:

● Retrieve all data on start-upFor this, the application must assign the following value to the SEARCH attribute: IF_FPM_GUIBB_TREE=>GC_SEARCH_OPTIONS-ENABLED.

● Retrieve all data when the search is executedFor this, the application must assign the following value to the SEARCH attribute: IF_FPM_GUIBB_TREE=> GC_SEARCH_OPTIONS-DYNAMIC.When the search is executed, the Tree UIBB raises the FPM event IF_FPM_GUIBB_TREE=>LOAD_ALL_DATA. This is the signal for the feeder class to provide all data in method GET_DATA.

Now you can activate the search function for the Tree UIBB in FLUID.

NoteUnlike the search function in the List ATS UIBB which offers two types of search (find and filter), the Tree UIBB offers only one search flavor, that is, the find type.

This feature is possible due to the text marker properties of the Web Dynpro ABAP UI element, the C-Table. For more information, see C Table Properties in the SAP Help Portal (help.sap.com).

3.2.1.9.4 Enabling the Filter Feature in the Tree Component

You can configure the filtering options for the Tree component using FLUID. It is in the feeder class, however, where the actual filtering of the data is performed.

The following table describes what you must do to enable filtering in this component:

126 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 127: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Point in Time Processing

Initialization and configuration In the feeder class method GET_DEFINITION, parame­ter field_description, set ALLOW_FILTER = ABAP_TRUE for the relevant columns.

In the General Settings panel of FLUID, set the filter functionality.

Start-up (when the feeder class method GET_DATA is called for the first time). This usually occurs when the FPM event FPM_START is raised but this is not always the case, for example, in a GAF floorplan where the Tree UIBB is on a subsequent step.

In the feeder class method GET_DATA, call the method GET_FILTER_RULES of parameter io_service_info. If it returns the filter rules, the feeder class must filter the data according to the rules, and pass it to the Tree UIBB through parameters ct_data and ev_data_changed.

User opens a column header menu The Tree UIBB calls the method GET_FILTER_SUGGEST_VALUES in IF_FPM_GUIBB_TREE_FILTER. (Optional) The feeder class provides the filter suggest-values.

User activates a new filter rule (either by clicking a filter suggest-value inside the column header menu or by us­ing the Filter tab inside the Personalization dialog box.

The FPM event GC_EVENT_APPLY_RULES in IF_FPM_GUIBB_TREE is raised. The feeder class must check whether the filter rules have changed. This is done by checking the event parameter GC_EVENT_PAR_SERVICE inIF_FPM_GUIBB_TREE. The value gc_service_filtering means the filter rules have changed. The feeder class must then filter the data and pass the result in GET_DATA through the pa­rameters ct_data and ev_data_changed.

3.2.1.10 Launchpad Component

Definition

A generic design template for displaying navigation destinations as hyperlinks.

It is implemented using the Web Dynpro component FPM_LAUNCHPAD_UIBB.

For more information on Launchpads, search for Launchpads in the SAP Help Portal (help.sap.com).

Use

You use this design template in the floorplan of an overview page (OVP) to add a launchpad of type FPM_LAUNCHPAD_UIBB and configure how it is displayed.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 127

Page 128: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

NoteFloorplan Manager (FPM) is a framework for the layout of user interfaces of an application; the concrete construction of a launchpad is not carried out in FPM, but in transaction LPD_CUST.

Structure

In the standard system, the display of a launchpad component on an overview page consists of three configurable areas:

● HomepageThe system formats a launchpad on an overview page in four different ways on the home page. Users can switch between these using the toolbar. The following formats are available:

○ DirectoryIn this view, the launchpad's folder structure is shown but the individual folders are not initially opened.

○ MapIn this view, the first level of the folder structure of the launchpad is shown. The system can also show quick-links below each folder. These quick-links are selected items from that folder.

○ IndexIn this view, all navigation destinations are listed alphabetically.

○ TreeIn this view, navigation destinations are displayed in a tree (hierarchical list) format. The links are grouped together under specific headings. Headings appear as nodes which can be expanded to show the navigation links. The relevant feeder class determines whether individual nodes are shown as expanded or closed at runtime.

Note

You can activate navigation via icons in Customizing for the launchpad. To do this, choose ExtrasGeneral Settings in Customizing for the launchpad and select the Set Icons as Selectable checkbox.

● Most Frequently UsedAn area listing navigation destinations that the user uses most frequently in the application.In Customizing for the launchpad, you can predefine this area with entries from the existing Customizing settings. This way, the area is displayed with entries even when the user opens the application for the first time.

● Related LinksAn area where the system shows additional navigation destinations that are not part of the navigation destinations on the homepage. You must also make these navigation destinations available via the launchpad.

At runtime, the user can personalize the launchpad component by moving each of the views around the screen. The panels containing the views can also be stacked on top of each other to form a tabstrip.

128 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 129: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Integration

This launchpad component can only be inserted into a configuration of an OVP type floorplan.

You configure this component using the FPM configuration editor, FLUID.

You can configure, amongst others, the following properties of this component:

● HomepageYou can determine the default view of the Homepage, the visibility of the individual Homepage views, and the number of columns that the Homepage should contain.

● Links visibilityUsing the Links Visibility field, you can determine whether links should be displayed only in the Map format of the Homepage or in all views.

● Role and Instance fields of the Homepage and Related Links areasYou can also determine which launchpad is added to the Related Links area. It is required that this launchpad already has the launchpad type FPM_UIBB assigned to it in Customizing for the launchpad.

● Area PagesIn some of the Homepage views, navigation links are grouped together under so-called area page titles. Under the area page title, there is often information about the area page itself. The First-Level Folder Information field determines whether the title of, and information for an area page appears on the area page itself as you navigate to it from a Homepage view.

For further information on this component, see the field help of the individual fields.

The properties described above are found in the General Settings panel of FLUID. To make changes to the underlying launchpads, choose the individual configurable components in the Preview panel; you are directed away from the FPM framework and into the transaction LPD_CUST ( Launchpad Customizing).

NoteSince changes to launchpad components are primarily made in Customizing, there is no object schema for this component in the configuration editor.

Related Information

Adding a Launchpad to a Toolbar Element [page 130]Editing a Launchpad [page 130]Interface: IF_FPM_GUIBB_LAUNCHPAD [page 131]

Description of methods in the interface implemented by the feeder classes of Launchpad components.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 129

Page 130: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.10.1 Adding a Launchpad to a Toolbar Element

Use

The launchpad component found in Floorplan Manager applications uses one type of launchpad. However, there are also other types of launchpad.

You can add launchpads of Stand-Alone type to the Related Links and You Can Also links in a toolbar on the user interface of a Floorplan Manager (FPM) application.

Procedure

To assign a launchpad to the You Can Also or Related Links toolbar elements, complete the following steps.

1. Run the application you want to edit and choose either the Customize Page (to open the floorplan component of your configuration) or the Show Customizable Areas (to open the UIBB component of your configuration) icon on the main toolbar.

2. Create a new Customizing for the component if none exists and select the relevant transport request.The FPM configuration editor, FLUID, is displayed in edit mode.

3. Choose the Attributes toggle-button on the main toolbar to display the Attributes panel if not visible.4. Choose the Toolbar Schema tab.5. Do one of the following:

○ Display the attributes of an existing You Can Also or Related Links element by clicking the element in the table.

○ Add a link by choosing Add Toolbar Element in the toolbar and choosing either the Related Links or You Can Also element.

6. In the Attributes panel, enter the Role and Instance of the launchpad you want to add.7. Choose Save.8. To see your changes at runtime, choose Test under the Additional Functions button on the toolbar.

More Information

● Flexible User Interface Designer (FLUID)

3.2.1.10.2 Editing a Launchpad

Procedure

To make changes to a launchpad in a Floorplan Manager (FPM) application, you must first know the technical names of the launchpad's Role and Instance.

130 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 131: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Finding Out the Technical Names of a Launchpad in FPM

1. Run the application and open the relevant application component configuration (floorplan or UIBB) using the FPM configuration editor, FLUID, in administrator mode.

2. Choose the Attributes toggle-button in the main toolbar to display the Attributes panel.3. Choose the You Can Also or Related Links element that contains the launchpad.4. In the Attributes panel, take note of the launchpad's Role and Instance.

Editing a Launchpad

You edit a launchpad outside the FPM framework. To do this, complete the following steps:

1. On the SAP Easy Access screen, enter /NLPD_CUST in the command field.2. Choose Continue.

The system calls up the start screen for launchpad Customizing.3. On the Overview of Launchpads screen, double-click the launchpad with the correct role and instance

combination.4. On the Change Launchpad Role: <name of role> Instance: <name of instance> , screen you have the

following options for changing the role:

a. To create additional applications, select New Application.b. To delete an application, click the application and choose Delete.c. To change an application, click the application and change its attributes (for example, the link text).d. To insert a separator between two applications, click the application after which you would like the

separator to be added and choose Add Separator.5. Choose Save.

More Information

● Flexible User Interface Designer (FLUID)

3.2.1.10.3 Interface: IF_FPM_GUIBB_LAUNCHPAD

Description of methods in the interface implemented by the feeder classes of Launchpad components.

Table 11: Methods of IF_FPM_GUIBB_LAUNCHPAD InterfaceOVERWRITE_LAUNCHPAD_KEY

Called at runtime, and before the launchpad customizing (defined in the configuration) is read. Allows the feeder class to specify another launchpad customizing. Depending on the parameter EV_ALSO_CALLED_IN_PBO, this method is also processed in PROCESS BEFORE OUTPUT.

Parameter Description

IV_ROLE Role of a launchpad.

IV_INSTANCE Instance of a launchpad.

IR_EVENT FPM event

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 131

Page 132: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

OVERWRITE_LAUNCHPAD_KEY

Called at runtime, and before the launchpad customizing (defined in the configuration) is read. Allows the feeder class to specify another launchpad customizing. Depending on the parameter EV_ALSO_CALLED_IN_PBO, this method is also processed in PROCESS BEFORE OUTPUT.

Parameter Description

EV_ALSO_CALLED_IN_PBO Flag if this method is processed also in PROCESS BEFORE OUTPUT

EV_ANYTHING_CHANGED_IN_PBO Must be set to ABAP_TRUE if anything was changed in PROCESS BEFORE OUTPUT

MODIFY

Called at run time before the content of the launchpad is displayed. It allows you to change some parts of the launchpad customizing. You can, for example, change the link text, or set an application defined by a user parameter. Depending on the parameter EV_ALSO_CALLED_IN_PBO, this method is also processed in PROCESS BEFORE OUTPUT.

Parameter Description

IR_NAVIGATION A reference to the IF_FPM_NAVIGATION interface.

IR_EVENT FPM event.

EV_ALSO_CALLED_IN_PBO See description for same parameter in method OVERWRITE_LAUNCHPAD_KEY.

EV_ANYTHING_CHANGED_IN_PBO See description for same parameter in method OVERWRITE_LAUNCHPAD_KEY.

OVERWRITE_REL_LINKS_LPD_KEY

Called at runtime, before the Launchpad customizing for Related Links (defined in the configuration) is read. Allows the feeder class to specify another launchpad customizing for Related Links . Depending on the parameter EV_ALSO_CALLED_IN_PBO, this method is also processed in PROCESS BEFORE OUTPUT.

Parameter Description

IV_ROLE Role of a launchpad.

IV_INSTANCE Instance of a launchpad.

IR_EVENT FPM event.

EV_ALSO_CALLED_IN_PBO See description for same parameter in method OVERWRITE_LAUNCHPAD_KEY.

EV_ANYTHING_CHANGED_IN_PBO See description for same parameter in method OVERWRITE_LAUNCHPAD_KEY.

132 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 133: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

MODIFY_RELATED_LINKS

Called at runtime before the content of the launchpad for Related Links is displayed. It allows you to change some parts of the launchpad customizing for Related Links. You can, for example, change the link text or set an application as defined by a user parameter. Depending on the parameter EV_ALSO_CALLED_IN_PBO, this method is also processed in PROCESS BEFORE OUTPUT.

Parameter Description

IR_NAVIGATION Reference to the IF_FPM_NAVIGATION interface.

IR_EVENT FPM event.

EV_ALSO_CALLED_IN_PBO See description for same parameter in method OVERWRITE_LAUNCHPAD_KEY.

EV_ANYTHING_CHANGED_IN_PBO See description for same parameter in method OVERWRITE_LAUNCHPAD_KEY.

NAVIGATE

Called within the FPM event loop, this method forwards the FPM PROCESS_EVENTto the feeder class. This method can be used to cancel the navigation, or to change, or add an application or business parameters.

Parameter Description

IO_EVENT The FPM navigation event which is to be processed.

EV_RESULT The result of the event processing.

Related Information

Interface: IF_FPM_NAVIGATION [page 338]

3.2.1.11 List Component

Definition

A generic design template for displaying data in a list.

It is implemented using the Web Dynpro component FPM_LIST_UIBB.

The information displayed in a list at runtime is determined by the feeder class assigned to the configuration of the Web Dynpro component FPM_LIST_UIBB.

NoteThis component is superseded by the List ATS component to comply with existing SAP UI guidelines.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 133

Page 134: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Use

You use this design template in application-specific views (UIBBs) where you want to display data using a list. You can determine the concrete display of the data in a list when configuring the Web Dynpro component FPM_LIST_UIBB.

Structure at Runtime

A list is displayed as a table of columns and rows at runtime. A list may have its own toolbar.

If the application has enabled sorting and filtering, an arrow appears in the bottom-right corner of the column headings at runtime, allowing you to perform these actions.

List components may contain an action column containing several one-click action controls.

Editing the Structure at Design Time (FLUID)

You configure this component using the FPM configuration editor, FLUID.

At design time, the Preview panel in FLUID displays the List component in a WYSIWYG style.

In the General Settings panel, you can specify settings applicable to the list as a whole.

In the List UIBB Schema, you can specify attributes for the individual elements of the list.

For more information on the attributes of this component, choose Field Help from the context menu in the system.

Related Information

Attributes of the List Component [page 135]A description of some of the attributes of this component.

FPM Events and the List Component [page 135]The List component, being an FPM UIBB, takes part, when it is visible, in each FPM event loop. The List component may also raise FPM events itself from several sources.

Interface: IF_FPM_GUIBB_LIST [page 136]Description of methods in the interface implemented by the feeder classes of both List components (List and List ATS).

Rendering List Component Data using SAP List Viewer (ALV) [page 138]

134 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 135: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.11.1 Attributes of the List Component

A description of some of the attributes of this component.

The following attributes are available for the List Component:

● Lead Selection Action AssignmentYou can assign an FPM event ID to the lead selection here. If a lead selection occurs during runtime, the assigned FPM event is raised. If you assign no event ID, the generic eventID IF_FPM_GUIBB_LIST=>GC_FPM_EVENT_ON_LEAD_SEL is assigned.

● Column CountDetermines the amount of columns that are displayed at runtime

● Row CountDetermines the amount of rows that are displayed at runtime

● Selection EventLike a Web Dynpro table, the List Component offers two kinds of selection at runtime:

○ Lead selection (the user uses the left mouse-button to select one single row)○ Normal selection (the user uses the right mouse-button to select one or more rows)

Using this dropdown list box, you can determine what kind of selection raises an FPM event. The default is a Lead Selection.

● Selection ModeDetermines whether it is possible to select multiple rows

● Selection BehaviorDetermines whether currently selected rows are de-selected when the user makes a new selection

● Fixed ColumnsIt is possible to set the initial column in a list as a fixed column. As a result, whenever a horizontal scrollbar is used, these fixed columns cannot be scrolled. There is an attribute in the General Settings panel for the GUIBB, where you can set the number of columns to be fixed. Note the following:

○ It is only the initial column that can be fixed; columns with index 1,2,3... It is not possible to fix columns at random indices.

○ The number of visible columns is independent of the number of fixed columns. For example, if the Fixed Columns is set as 3 and the total columns as 5, then the actual number of columns visible on the UI would be 8. Here, the first 3 columns would always remain fixed and the count for the visible column starts from 1 after the last fixed column.

● Initial Lead Selection If this field is selected then, at runtime, if the list contains at least 1 record, the first record is lead selected

3.2.1.11.2 FPM Events and the List Component

The List component, being an FPM UIBB, takes part, when it is visible, in each FPM event loop. The List component may also raise FPM events itself from several sources.

These events are raised from the following sources:

● Cell eventsThe columns may contain fields with a display type that is capable of raising an event (for example, a Button display type). All cell-based events have the FPM event ID

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 135

Page 136: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

IF_FPM_GUIBB_LIST=>GC_GUIBB_LIST_ON_CELL_ACTION. The corresponding row and column values are added as event parameters to this FPM event as follows:

○ IF_FPM_GUIBB_LIST=>GC_EVENT_PAR_ROW○ IF_FPM_GUIBB_LIST=>GC_EVENT_PAR_COLUMN_NAME

● Toolbar eventsAlmost each toolbar element may raise an FPM event. In this case, the event ID is the Action ID (which is defined by the feeder class in method GET_DEFINITION). To get user input values from elements such as a toggle button, input field, or dropdown list box, you can use the following FPM event parameters:

○ IF_FPM_GUIBB_LIST=>GC_EVENT_PAR_TOGGLE_STATE○ IF_FPM_GUIBB_LIST>GC_EVENT_PAR_INPUT_VALUE○ IF_FPM_GUIBB_LIST=>GC_EVENT_PAR_DROP_DOWN_KEY

● Selection eventsA row selection may also raise an FPM event. It is possible to choose whether only a lead selection, or a normal selection raises an FPM event. For more information, see the system documentation in FLUID).

3.2.1.11.3 Interface: IF_FPM_GUIBB_LIST

Description of methods in the interface implemented by the feeder classes of both List components (List and List ATS).

Table 12: Methods of IF_FPM_GUIBB_List InterfaceMethod Name Description

GET_DEFINITION Called once at startup. Tells the List UIBB which col­umns and actions are available. This is done using pa­rameters EO_FIELD_CATALOG and ET_ACTION_DEFINITION for columns and toolbar items respectively. The columns and actions defined here do not automatically appear at runtime. They ap­pear in the FPM configuration editor as a list of availa­ble columns and actions to choose from. Only when they have been configured will they appear at runtime.

It is also possible to provide additional information about columns such as texts, tooltips, F4 helps, and formatting information. This is done using parameter ET_FIELD_DESCRIPTION

FLUSH Called as part of the FPM event loop. It is the first method of the event loop. Using parameter IT_CHANGE_LOG, it tells the feeder class what changes have been made by the user. The changes, in­dicated by IT_CHANGE_LOG, must not be copied into the source data table (parameter IT_DATA); accessing the source table is not allowed in this FPM event hook.

136 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 137: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Method Name Description

PROCESS_EVENT Also part of the FPM event loop; called directly after the FLUSH method. Use this method to check the Event ID and, if necessary, to carry out Event ID-spe­cific processing. Besides the Event ID, the feeder class also gets information about the currently selected rows, and whether the event has been raised by this List UIBB, or by some other UIBB on the screen. For more information, use the parameter IO_UI_INFO (in­terface IF_FPM_LIST_ATS_UI_INFO).

Additionally, this method can be used to pass mes­sages using the parameter ET_MESSAGES.

GET_DATA Also part of the FPM event loop; called directly after method PROCESS_EVENT. It corresponds to the gen­eral UIBB method PROCESS_BEFORE_OUTPUT. The main purpose of this method is to exchange data be­tween the feeder class and the List ATS UIBB (for de­tails, refer to the section Data Exchange in this docu­ment. It is also used to change attributes of the table (parameters CS_ADDITIONAL_INFO and CV_FIRST_VISIBLE_ROW), attributes of the columns (parameterCT_FIELD_USAGE), and attributes of the toolbar elements (parameter CT_ACTION_USAGE). With CV_FIRST_VISIBLE_ROW, it is possible to set the first visible row of the list.

GET_PARAMETER_LIST Called once at startup. It is not mandatory to use this method. It is used to fill the feeder class parameters with values. The feeder class defines parameters and at design time one can assign values to those parame­ters in the FPM configuration editor with this method. This is used, for example, in more complex (generic) feeder classes.

INITIALIZE Called once at startup. It is not mandatory to use this method. At runtime this method tells what parameters have been defined by the feeder class (GET_PARAMETER_LIST) and what values have been assigned to them in the configuration. This is used, for example, in more complex (generic) feeder classes.

GET_DEFAULT_CONFIG Called once at startup. It is not mandatory to use this method. It has two purposes. When creating a new configuration, use this method to generate a list of col­umns and toolbar elements that could be configured. This method is also called at runtime when no columns at all are configured. In this case, it is used to generate a configuration.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 137

Page 138: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Method Name Description

CHECK_CONFIG Called at design time only. It is not mandatory to use this method. Use this method to execute application-specific checks on the configuration.

Related Information

Data Exchange in the List ATS Component [page 142]There are several different data exchange modes for the List ATS component.

3.2.1.11.4 Rendering List Component Data using SAP List Viewer (ALV)

There is an option to render the data in a List component using the SAP List Viewer (ALV). This allows the end-user to personalize the table and, amongst other things, to export data from the table to a spreadsheet, to use the print feature, and to sort and filter data.

For more information on the SAP List Viewer (ALV), see the SAP NetWeaver Library.

Configuration of the Standard View of an SAP List Viewer (ALV)

You can specify an SAP List Viewer in the configuration editor for Floorplan Manager when you configure a Web Dynpro component containing a list that you can edit with the SAP List Viewer.

To display the list, the system loads this standard view of the SAP List Viewer when the FPM application is called.

NoteThis function is available only in List component configurations based on the FPM_LIST_UIBB GUIBB component; component configurations based on FPM_LIST_UIBB_ATS GUIBB component contain other functions that negate the use of ALV rendering.

Integration

You can use other SAP List Viewer views to override the standard view of the SAP List Viewer that you have specified in configuration at design time. These are SAP List Viewer views that have been selected as the initial view by the administrators in the Customizing layer or by the user during personalization. At design time, you cannot assign theseSAP List Viewer views as the standard view during configuration. For more information about how to create SAP List Viewer views at runtime in an application, see SAP List Viewer for Web Dynpro.

Prerequisites

This function is only available for Web Dynpro components for which you have implemented the IF_FPM_CFG_CONF_ALV_USAGE interface.

138 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 139: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Features

You make assignments for the standard view of the SAP list viewer in the configuration editor for Floorplan Manager when you configure the Web Dynpro component containing the SAP List Viewer list. The Configurable ALV Tables table is visible in the attributes of the Web Dynpro component. You can select a view for each usage name in this table.

Configuration Editor Settings

In the component cconfiguration of the List component at design time, in the Attributes section of FLUID, the Rendering Style dropdown list displays the following options:

● Standard RenderingThe data is displayed in a simple table format.

● Render as Row-RepeaterThe data is displayed in a single column format. Column headings which would appear once in a table format are repeated here to form a group; one group is displayed on top of another group in a single column.

● Render as ALVThe data is displayed in an ALV table format with sorting, filtering, printing and personalization capabilities as well as the feature to print to Microsoft Office Excel. No other settings are required for ALV output; it is not necessary to make changes to the feeder class, nor to the configuration of the List component.

Important Notes on ALV Rendering

● Rendering a list with ALV consumes considerably more memory than rendering with the List component. Therefore, it is recommended to render with ALV only when necessary.

● If ALV rendering is selected, it should never be deselected in a later delivery. If the end-user personalizes an ALV table, the changes are lost when ALV is switched off in a later delivery.

● It is possible to print table data to a spreadsheet without rendering the table in ALV format. In FLUID, in the Attributes panel, select the Export to Excel checkbox. This provides an Export List button above the table at runtime.

● Data handling and formatting in ALV may not be exactly the same as with the List component, due to the technical differences between ALV tables and WD tables (for example, the event names are not the same for the two tables).

● It is recommended (but not mandatory) to use separate configurations for the List component and ALV to avoid possible discrepancies. Due to the point above, applications might code in the feeder class specific to an event ID and parameters. Switching between the two modes for the same configuration might lead to discrepancies. The List component and ALV are also different in terms of the features they offer. It is therefore best if they are separate configurations to avoid features being available in one and not available in the other for the same table.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 139

Page 140: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

More Information

● List ATS Component

3.2.1.12 List ATS Component

Definition

A generic design template for displaying data in a list.

It is implemented using the Web Dynpro component FPM_LIST_UIBB_ATS.

The information displayed in a list at runtime is determined by the feeder class assigned to the configuration of the Web Dynpro component FPM_LIST_UIBB_ATS.

NoteThis List component supersedes the original List component implemented by the Web Dynpro component FPM_LIST_UIBB. The List ATS (ABAP Table Services) component provides you with an extended range of features, including personalization features, and advanced sorting and filtering functions.

Use

You use this design template when you want to display data using a list. You can determine the concrete display of the data in a list when configuring the Web Dynpro component FPM_LIST_UIBB_ATS.

Structure at Runtime

A list is displayed as a table of rows and columns at runtime. Each item in a list is displayed in a separate row. A list has its own toolbar.

Each column of the list has a column header. If the application has enabled list functions such as sorting, filtering, and grouping, an arrow appears in the bottom-right corner of the column header when you hover the mouse over the heading at runtime. The available menu options are determined by the relevant feeder class.

List components may contain an action column containing several one-click action controls.

Editing the Structure at Design Time (FLUID)

You configure this component using FLUID, the FPM configuration editor.

140 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 141: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

At design time, the Preview panel in FLUID displays the List ATS component in a WYSIWYG style.

In the General Settings panel, you can specify settings applicable to the list as a whole.

In the List UIBB Schema, you can specify attributes for the individual elements of the list, and add or remove columns.

For more information on the attributes of this component in FLUID, choose Field Help from the context menu in the system.

Changes to Elements of Previous List Component (FPM_LIST_UIBB)

Note the following changes regarding elements that were available in the previous version of the List component:

● Data changes in feeder class method FLUSHMethod FLUSH contains the parameter IT_DATA. This parameter holds a reference to the internal table which contains the table data. Therefore, it is theoretically possible to change the table data using this parameter, though it was never the intention to allow the feeder class to do so. The correct place to change the data is in feeder method GET_DATA. The List ATS component no longer allows you to change data in FLUSH.

● Style of renderingThe original List component can be adjusted to render itself in the following styles:

○ Normal list rendering○ Row-repeater rendering○ ALV rendering

This feature no longer exists in the List ATS component (the features in ALV rendering are already included in the List ATS, for example, personalization, extended sorting, and filtering).

● Text wrapping for column headers is now possible using the Header attribute of the column in FLUID; use the ENTER key to start a new line in a header. Previously, it was also possible to control text wrapping in the

feeder class (method GET_DEFINITION, parameter ET_FIELD_DESCRIPTION, attribute HEADER_TEXT_WRAPPING). This is no longer possible in the List ATS UIBB.

Related Information

Personalizing the List ATS Component [page 352]

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 141

Page 142: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.12.1 Data Exchange in the List ATS Component

There are several different data exchange modes for the List ATS component.

General

The data exchange happens in the feeder methods FLUSH and GET_DATA. Data entered by the user is passed using method FLUSH to the back end; the data from the back end is passed to the front end using method GET_DATA. The following are the different data exchange modes:

● Compatibility● Key● Stable Line

It is recommended to use either the Key or Stable Line modes to ensure that the data exchange complies with the latest SAP UI guidelines.

A detailed description for the above exchange modes, and for managing data exchange is found in the section Edit Scenarios for the List ATS UIBB: Guidelines.

Compatibility Mode

This mode exists to support feeder classes that have been coded for the former (old) List component (List UIBB). It uses two parameters: CT_DATA and EV_DATA_CHANGED. When the parameter EV_DATA_CHANGED is set to TRUE, the List ATS GUIBB takes the data from parameter CT_DATA. There is no possibility to exchange only part of the data; the whole table is exchanged.

Key Mode

In this mode, the rows of the data table have a primary key. Arbitrary operations with the data table are possible as long as the uniqueness of the keys is guaranteed. This mode uses the parameters CT_DATA, CS_DATA_CHANGED and EO_ITAB_CHANGE_LOG. The parameter EO_ITAB_CHANGE_LOG is a handle to the interface IF_SALV_ITAB_CHANGE_LOG which describes how the data in the data table was changed. This interface has the following methods:

142 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 143: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Table 13: Methods of IF_SALV_ITAB_CHANGE_LOG Interface

Method Description

GET_INDEX_MAP Gets the indices of deleted rows (before image), the in­dexes of inserted rows (after image), the mapping of rows between before and after image and the indexes of rows (before image) which must be moved to an in­sert position

GET_COLUMNS_MODIFIED Gets the names of columns for which values have been changed

GET_LINES_MODIFIED Gets the indices of lines (after image) for which values have been changed

DATA_IS_NEW The value is TRUE if data is completely new and there is no connection between before and after image

If the parameter EV_DATA_CHANGED is set to TRUE, the List ATS UIBB distinguishes between the following cases:

EO_ITAB-CHANGE_LOG Purpose

Initial Data table is changed but the changes are not re­corded; data is new

Not Initial

DATA_IS_NEW = TRUE

Data table is changed but the change log is not com­plete; data is new

Not Initial

DATA_IS_NEW = FALSE

Data table is changed and the change log is complete

In the 'data is new’ cases, no connection between the before and after images can be constructed by the List ATS UIBB. Therefore, features such as sorting and filtering are executed automatically. These services are not to be executed automatically when only part of the data is changed.

There is a standard implementation for Key mode for the creation of a change log, the class CL_SALV_ITAB_EDITOR_KEY_MODE. This class has the following methods:

Table 14: Methods of CL_SALV_ITAB_EDITOR_KEY_MODE Class

Method Name Description

LOG_NEW_DATA Resets the change log (DATA_IS_NEW); returns TRUE value

START_RECORDING Starts recording of a change log; an existing change log is deleted

KEY_CHANGED Notifies that a key was changed

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 143

Page 144: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Method Name Description

STOP_RECORDING Stops recording of a change log

MOVE_TO_INSERT_POSITION Marks a line for moving to an insert position

Stable Line Mode

In this mode, the order of lines in the data table must not be changed; in particular, the table must not be sorted. Insertions and deletions of lines are allowed. This mode uses the parameters CT_DATA, CS_DATA_CHANGED and EO_ITAB_CHANGE_LOG. For a description of these parameters, refer to the Key mode section above.

There is a standard implementation for the Stable Line mode for the creation of a change log, the class CL_SALV_ITAB_EDITOR_LINE_MODE. This class provides methods for table operations such as insert and append instead of direct usage of ABAP statements. This class has the following methods:

Table 15: Methods of CL_SALV_ITAB_EDITOR_LINE_MODE Class

Method Name Description

START_RECORDING Starts recording of a change log; an existing change log is deleted

SET_NEW_DATA Gets new data and resets the change log (DATA_IS_NEW returns TRUE value)

APPEND_... Substitutes for ABAP statement APPEND (3 variants)

CLEAR_TABLE Substitutes for ABAP statement CLEAR

COLLECT_LINE Substitutes for ABAP statement COLLECT

DELETE_... Substitutes for ABAP statement DELETE (2 variants)

INSERT_... Substitutes for ABAP statement INSERT (3 variants)

MODIFY_LINE Substitutes for ABAP statement MODIFY

MOVE_TO_INSERT_POSITION Marks a line for moving to an insert position

Related Information

Edit Scenarios for List ATS UIBB: Guidelines [page 152]

144 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 145: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.12.2 Actions in the List ATS

An action in this sense is a UI element, such as a button, a link to action, or an input field, that is capable of raising an FPM event. There are several places in a List ATS component where you can set actions.

You can set actions in the following places in the List ATS UIBB:

● Toolbar● Inside cells● Inside the Action column (known as 'one-click actions')

Actions in the Toolbar

Actions must first be defined in the feeder class using the method GET_DEFINITION, parameter ET_ACTION_DEFINITION. Additionally, actions must be added to the Toolbar Schema panel in the FPM configuration editor, FLUID, to ensure that they appear at runtime.

At runtime, the actions will raise the FPM Event ID that has been specified using the attribute ID in parameter ET_ACTION_DEFINITION.

It is possible to render the action in the toolbar of the OVP assignment block in which the list is embedded, instead of in the toolbar of the List ATS UIBB. To do this, set the flag Exposable of parameter ET_ACTION_DEFINITION to TRUE.

You can change properties such as Visibility, or Enabled of the toolbar elements in the feeder class method GET_DATA using parameter CT_ACTION_USAGE.

You can assign a particular action (corresponding to one entry in ET_ACTION_DEFINITION) to more than one UI element in the toolbar. However, when doing so, be aware of the following restriction: In feeder class method GET_DATA it is possible to change properties of the UI elements in the toolbar using parameter CT_ACTION_USAGE. For actions that have been used more than once, it is only possible to change the Visibility and Enable/Disable properties.

Actions inside Cells

In the FPM configuration editor, you can set several Display Types (Input Field, Button, Checkbox, and Link to Action) to raise an event.

The standard behavior of all cell actions is to raise the same event, IF_FPM_GUIBB_LIST=>GC_GUIBB_LIST_ON_CELL_ACTION. Using the event parameter IF_FPM_GUIBB_LIST=>GC_EVENT_PAR_COLUMN_NAME, you can determine which cell has raised which action. However, you can change the standard behavior in the FPM configuration editor. In addition to the standard behavior, there is the possibility to un-assign an action (no action at all), or to assign a specific action (in which case the action must be specified by the feeder class in method GET_DEFINITION, parameter ET_ACTION_DEFINITION).

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 145

Page 146: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

One-Click Actions

One-click actions are actions that are specific to a certain table row, and are executed with a single mouse-click, such as deleting a row, editing a row, or setting the status of a row. One-click actions have the display type Link to Action, and are rendered in one single column known as the action column. In accordance with current UI guidelines, there is only one action column, and it is the first column in the table.

To use one-click actions, complete the following steps:

1. Define actions in the feeder class method GET_DEFINITION, parameter ET_ROW_ACTIONS.

NoteThere must be a minimum of 2 entries in parameter ET_ROW_ACTIONS.

2. Edit the configuration in the FPM configuration editor, FLUID. If the feeder class has defined one-click actions, the Repositories panel displays a special column, FPM_ROW_ACTIONS_COLUMN; you can drag this in to the List UIBB Schema panel.

3. To add one-click actions to the action column, select the action column in the List UIBB Schema, and then add single actions using the Attributes panel.

At runtime, it is possible to disable, or hide, single one-click actions per row. To do this, you must define a new technical column of type BOOLEAN in the feeder class that controls the enablement or visibility of the one-click action. To do this, add the column in feeder class method GET_DEFINITION, parameter EO_FIELD_CATALOG, and mark it is as Technical using parameter ET_FIELD_DESCRIPTION, and attribute TECHNICAL_FIELD. The ID of that column must be put into the one-click action definition (method GET_DEFINITION, parameter ET_ROW_ACTIONS, attribute VISIBLE_REF, or ENABLED_REF). Fill the content of the technical column according to your requirements in method GET_DATA.

NoteOne-click actions are also available in the previous List component (FPM_LIST_UIBB).

3.2.1.12.3 List Operations (Filtering, Sorting, Grouping, Aggregation)

Enablement of filtering, sorting, grouping, and aggregation functions on a List ATS component.

Filtering

The feeder class determines whether a column can be filtered or not. Do this using method GET_DEFINITION, parameter ET_FIELD_DESCRIPTION, attribute ALLOW_FILTER. If the feeder class allows filtering on columns, it is possible to switch the filtering on or off in the FPM configuration editor, and to determine the filtering rules.

146 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 147: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Sorting

The feeder class determines whether a column can be sorted or not. Do this using method GET_DEFINITION, parameter ET_FIELD_DESCRIPTION, attribute ALLOW_SORT. If the feeder class allows sorting on columns, it is possible to switch the sorting on or off in the FPM configuration editor, and to determine the sort rules.

Aggregation

The feeder class determines whether a column can be aggregated or not. Do this using method GET_DEFINITION, parameter ET_FIELD_DESCRIPTION, attributeALLOW_AGGREGATION. If the feeder class allows aggregation on columns, it is possible to switch the aggregation on or off in the FPM configuration editor, and to determine the aggregation rules.

Grouping

This feature allows the user to group entries of columns by column header. It is not controlled by the feeder class. It can be switched on or off only in the FPM configuration editor, and to determine the grouping rules.

3.2.1.12.4 F4/Input Help

The List ATS UIBB supports several types of input (F4) help.

F4/Input Help

The List ATS UIBB supports the following types of F4 help:

● DDICIf a column uses a data element that has a DDIC F4 Help assigned to it, the F4 Help is used automatically. It is possible to overwrite this, and to use another DDIC F4 Help. This is done in feeder class method GET_DEFINTION, parameter ET_FIELD_DESCRIPTION, attribute DDIC_SHLP_NAME.

● OVSTo use this type of F4 Help, you must implement the interfaceIF_FPM_GUIBB_OVS. This can be done in the feeder class itself, or in another class. If you implement it in another class, the List ATS UIBB instantiates the class at runtime. It is also necessary to put the name of the class that implements the interface into the attribute OVS_NAME of parameter ET_FIELD_DESCRIPTION in feeder class method GET_DEFINITION.The methods of the interface IF_FPM_GUIBB_OVS must be implemented according to the documentation for the Online Value Help (OVS) concept. You can pass an FPM event (EO_FPM_EVENT) in method HANDLE_PHASE_3. This is optional. If it is passed, this event is raised directly after the end of the value help processing. If it is not passed, no round-trip after the value help processing takes place.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 147

Page 148: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● Freestyle WD ABAPTo use this type of F4 Help, you need to create a Web Dynpro component that implements the Web Dynpro interface IWD_VALUE_HELP. You must put the name of that component into the attribute WD_VALUE_HELP of parameter ET_FIELD_DESCRIPTION in feeder class method GET_DEFINITION.

3.2.1.12.5 Drag-and-Drop of Rows at Runtime

You can enable drag-and-drop of table rows during runtime.

To do this, the feeder class must define the corresponding attributes. This is done in method GET_DEFINITION, parameter ET_DND_DEFINITION. There, you can determine whether a list is to be the drag source, drop target, or both (attribute Type), whether drag-and-drop occurs only within the same list, or between several lists (attribute Scope).

If drag-and-drop between several lists is defined, it is possible to control which lists are used as a drag source, and which lists are used as a drop target (attribute Tags). When two lists have the same tags, you can drag and drop between them. You can assign more than one tag to a list in the configuration editor by separating them with semi colons. Drag-and-drop attributes can be changed at runtime (feeder class method GET_DATA, parameter CT_DND_ATTRIBUTES and attribute EV_DND_ATTR_CHANGED).

When drag-and-drop occurs at runtime, the following FPM event is raised after a row(s) has /have been dropped: IF_FPM_GUIBB_LIST=>GC_GUIBB_LIST_ON_DROP (the event is only raised by the List ATS UIBB when the user has dropped the rows).

You can check this using parameter IV_RAISED_BY_OWN_UI in feeder class methods GET_DATA OR PROCESS_EVENT. Data regarding the row that has been dragged is passed as an event parameter of the event IF_FPM_GUIBB_LIST=> GC_GUIBB_LIST_ON_DROP. The row that has been dragged is not automatically inserted into the target list. That must be done by the feeder class itself. To comply with current UX guidelines, you must use a special method to insert the data. This method, MOVE_TO_INSERT_POSITION, is part of the change log API. Refer to the section Data Exchange for further details.

When grouping is enabled, it could happen that the drop position lies between two group header rows (for example, if at least one group is collapsed). In this case, the insert position in the drop event is initialized. The application must decide if the drop should still be executed. Inserted rows will be appended to the end of the table if no other insert position has been explicitly specified in PROCESS_EVENT.

Related Information

Data Exchange in the List ATS Component [page 142]There are several different data exchange modes for the List ATS component.

3.2.1.12.6 Influencing the Row Order at Runtime

Usually, the row order at runtime is determined by sort settings which are personalized by the user. But even in the absence of such sort rules, the List ATS attempts to keep the row order stable. While this is the desired

148 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 149: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

behavior in most use-cases, an application is sometimes required to have more control over the row order at runtime.

If you need to influence the row order which is displayed to the user, you can choose from the alternatives listed below. However, keep in mind that personalized sort and filter rules may have an impact on any attempt to manipulate the row order at runtime.

● Disable sorting and grouping by configuration or feeder class definition.This prevents the user from changing the row order without the feeder class noticing it. However, you must be aware that newly inserted rows are inserted at the point of selection, or appended to the end of the table as long as the feeder class provides a change log in GET_DATA. If you want to avoid this, do not provide such a change log (or set the change log report to Data is New).

● Clear the sort and grouping rules immediately before setting new data as described in the section Clearing Sorting and Grouping Rules from Personalization. Consider very carefully whether this is a good choice for your application. It is the application developer’s responsibility to ensure that the UI remains intuitive and usable when making use of this feature.

● Move individual rows to a given position, retaining their front-end order.In method PROCESS_EVENT, you define the insert position as described in the section Defining the Insert Position of New Rows. In method GET_DATA, you supply a change log which provides the rows to be moved to the insert position in parameter api of method GET_INDEX_MAP. Note that this procedure retains the sequence of the moved rows as they were previously shown on the front-end. Any personalized filter operations are then no longer applied to these rows.

● Move individual rows to a given position, displaying them in their back-end order.In method PROCESS_EVENT, you define the insert position as described in the section Defining the Insert Position of New Rows. In method GET_DATA, you supply a change log which lists the rows as both deleted and inserted. As a result, the inserted rows will be shown at the current insert position in the order they appear in the original data table. Any personalized filter operations are then not be applied to these lines.

3.2.1.12.7 Reading the Row Order displayed at Runtime

It is possible to retrieve the order of the data rows as displayed at runtime.

To do this, you must use the instance of IF_FPM_LIST_ATS_UI_INFO that is passed as an import parameter IO_UI_INFO to PROCESS_EVENT. For more details, refer to the ABAP documentation of method GET_LINE_ORDER of that interface (accessible with the F9-key in the ABAP workbench).

This information is particularly useful if you want to provide features to move individual rows up or down at runtime. In this case, make sure you consider the situations that users have personalized any filter conditions, or that users might have defined any grouping rules and some groups may be collapsed. In such cases, GET_LINE_ORDER indicates hidden rows.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 149

Page 150: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.12.8 Defining the Insert Position of New Rows

You can define the insert position for new rows or for rows that have been moved using method PROCESS_EVENT.

To do this, use the instance of IF_FPM_LIST_ATS_UI_INFO that is passed as an importing parameter IO_UI_INFO to PROCESS_EVENT. For more details, refer to the ABAP documentation of method SET_INSERT_POSITION of that interface (accessible with the F9-key in the ABAP workbench).

You specify the insert position as a table index, referring to the importing parameter IT_DATA of method FLUSH. You can also specify whether the index position is before or after that data row. Always keep in mind that the row order of the front-end may be different from the sequence in IT_DATA. Therefore, specifying the insert position as 'before 2' is not the same as 'after 1'.

If users have personalized a view with active grouping rules, new rows will be added to the group in which the row at the insert position belongs to.

3.2.1.12.9 Clearing Sorting and Grouping Rules from Personalization

If the feeder class provides no change log in the GET_DATA method, and sets EV_DATA_CHANGED to TRUE, the data table is subjected to any personalized sorting rules. If you want new data to be shown in exactly the same order provided by the feeder class, you must first clear the personalized sorting rules.

The feeder class can achieve this by raising the FPM event IF_FPM_GUIBB_LIST=>GC_EVENT_CLEAR_SORT_RULES_ATS (make sure to attach the instance key to the event). The sorting rules are cleared after the phase PROCESS_EVENT has been finished for this event. So, if the feeder class provides new data in method GET_DATA for this event, this data will be displayed in the sequence provided by the feeder class.

NoteClearing sorting rules also results in clearing grouping rules. The event does not clear any filter rules.

3.2.1.12.10 Sorting and Filtering of Images in a List

The List ATS component provides the possibility of letting the end-user sort and filter images (icons) at runtime.

To enable this, meta data must be attached to the images using the feeder class method GET_DEFINITION, parameter ET_FIELD_DESCRIPTION, attribute ENUMERATION.

The ENUMERATION attribute is a table consisting of two columns: values and their descriptions. The column Value contains the technical names that appear at runtime in the table itself. For example, assume there is a table

150 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 151: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

column image, having the following entries: ~icon/red, ~icon/green, and ~icon/yellow. The table should be completed as follows:

Value Text (Description)

~icon/red Declined

~icon/yellow Undecided

~icon/green Approved

The order of the entries in the enumeration table is important. At runtime, when a user chooses the sort action, the column is sorted in the order defined in the enumeration table; in this example, red icons are displayed at the top of the list, followed by yellow icons, and then green icons. It is also possible to change the content of the enumeration table at each round trip. You can do this in the feeder class method GET_DATA, using parameter IO_EXTENDED_CTRL. Note also that the the attribute ORDER_OF_CRITERION of the relevant field descriptor must also be set to IF_FPM_CONSTANTS=>GC_ORDER_CRITERION-ENUMERATION.

3.2.1.12.11 Multi-Value Paste

It is possible to paste multiple values from the clipboard into a List ATS component (when the list is in edit mode).

Occasionally, the content of the clipboard consists of a table that has more rows than currently available in the List ATS component. In this case, the amount of rows copied from the clipboard is limited to the amount of rows available in the List ATS component. However if Mass Edit mode (see following section) is enabled, the List ATS component can dynamically create new rows if necessary, thereby allowing all content to be copied and pasted.

Normally, only the feeder class creates new rows (in feeder class method GET_DATA) but in this case the List ATS component creates the rows. In the case of multi-value paste, the FPM event IF_FPM_GUIBB_LIST=>GC_EVENT_MULTI_VALUE_PASTE is raised.

Services such as sorting and filtering are not applied to the new rows.

3.2.1.12.12 Mass Edit

This feature enables the end-user to enter data, and create new rows in a convenient and speedy manner.

At runtime, at the bottom of a table in edit mode, dummy (virtual) rows appear. The user can insert data into those virtual rows, and as soon as Enter is pressed, the List ATS component will take the content of that input and create real rows.

Usually, only the feeder class creates new rows (in feeder class method GET_DATA). However, if this feature is activated the List ATS component will create and append new rows automatically. In the FLUSH method, the change log lists the content of new rows. Of course, in method GET_DATA, the feeder class has the possibility to adjust the data if necessary. This feature must be activated by the feeder class in method GET_DEFINITION, parameter ES_OPTIONS, attribute ALLOW_CREATE_ROWS_BY_LIST_UIBB. Additionally, it is necessary to set a flag in the configuration (General Settings panel, Automatic Row Append).

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 151

Page 152: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

It is also possible for the feeder class to enable and disable the mass edit mode in each roundtrip, and pass template values for the new lines. This is done using the feeder class method GET_DATA, parameter IO_EXTENDED_CTRL, method SET_MASS_EDIT_MODE. Services such as sorting and filtering are not applied to the new rows.

3.2.1.12.13 Row-Specific Property Values for Display Types

The property values of the display types dropdown list box and threshold slider can be row-specific and it is possible to change them via the feeder class at runtime.

Developers can configure that specific property values are displayed for these display types in a List ATS component depending on the row selected. The property values can be altered at runtime using the follwing interfaces:

● Dropdown list box: IF_FPM_LIST_ATS_VALUE_SET● Threshold slider: IF_FPM_LIST_ATS_THRESHOLD

To use this feature, developers must complete the following actions:

1. Set a flag to indicate that this feature is to be used in the dropdown list boxes or threshold sliders. In the parameter ET_FIELD_DESCRIPTION of the GET_DEFINITION method, set the parameter FIXED_VALUES_IS_ROW_SPECIFIC to TRUE.

2. In FLUID, set the display type of the column to Dropdown List or Threshold Slider.3. Access the API and set the property values.

This is done in feeder class method GET_DATA (parameter IO_EXTENDED_CONTROL, interface IF_FPM_LIST_ATS_EXT_CTRL, method GET_VALUE_SET_HANDLER respectively GET_THRESHOLD_HANDLER).

3.2.1.12.14 Edit Scenarios for List ATS UIBB: Guidelines

Objectives

The List ATS UIBB provides, with the help of ABAP Table Services (ATS), sorting and filtering services. These services do not work directly on the data table of the application; they copy the required information into their own, local structures. They compute and manage the mapping between rows of the data table (source) and rows shown on the UI (result). Therefore, the feeder class cannot presuppose any connection between the data table and the UI unless the execution of services is forbidden.

The following questions arise if edit scenarios are to be realized:

● How do I handle a row on the UI if the value of a sorted column is changed and the new value is not in the sort order?

● How do I handle a row on the UI if the value of a filtered column is changed and the new value does not fulfill the filter criteria?

152 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 153: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● Where should a row on the UI be displayed which is inserted by the feeder class?

The desired behavior of the UI is outlined in the SAP UI Guidelines 2.0. In brief, these guidelines state that for edit scenarios the UI must be stable after values are changed. This can be summarized as follows:

● If values in a row are changed, the row maintains its position on the UI independent of the kind of change.● If rows are inserted into the data table by feeder class, these rows appear on the UI after the last selected row.

Additionally, the order of the rows on the UI is not changed.● If rows are deleted from the data table by feeder class, these rows are removed from the UI. Additionally, the

order of rows on the UI is not changed.

Therefore, after changes to values (on the UI or by feeder class) or after deletion or insertion of rows (by feeder class), the services (sorting and filtering) should not be executed. However, these services manage the mapping between the data table and the UI. Therefore, the services must be informed about changes to the data table in order to actualize the mapping.

This section describes how to realize edit scenarios which allow the usage of services (sorting and filtering), and which conform to the current UI guidelines.

Prerequisites

● An application works in round-trips (the phase model of FPM). The feeder class method GET_DATA is called once per round-trip. The data is shown (and perhaps changed) on the UI between two calls of GET_DATA.

● The insertion and deletion of rows in the data table is only made in the feeder class method GET_DATA. Therefore, between two calls of this method, the number of rows in the data table is constant.

● Changes to values in any rows are possible (in method GET_DATA and on UI).

NoteThe following scenarios and programming examples must be extended if changes to the data table are made in the feeder class method FLUSH (in fact forbidden, but possible).

3.2.1.12.14.1 Change Log

A change log has been created which contains all changes needed for actualization of internal data of ATS.

The starting point is the before image of the data table (on entry of method GET_DATA) and the end point is the after image of the data table (after leaving the method GET_DATA). The editor change log describes the transition from the before to after images.

The application must create the change log, and then hand over to ATS.

The change log is described by the interface IF_SALV_ITAB_CHANGE_LOG. Its methods are described in the following table and screenshot. For further information, see the system documentation.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 153

Page 154: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Table 16: Methods of IF_SALV_ITAB_CHANGE_LOGMethod Description

GET_INDEX_MAP Gets the indices of the deleted rows (the before image), the indices of inserted rows (the after image), the map­ping of rows between the before and after image, and the indices of rows (before image) which must be moved to an insert position.

GET_COLUMNS_MODIFIED Gets the names of columns in which values are changed. This method is optional; the change log does not have to supply this information, but the ATS reacts faster if this information is available.

GET_ROWS_MODIFIED Gets the indices of rows (after image) in which values are changed. This method is optional; the change log does not have to supply this information, but the ATS reacts faster if this information is available.

DATA_IS_NEW This is TRUE if the data is completely new, and no con­nection between the before and after images exists.

Note● Row numbers are always described as ranges in the change log. If a range consists of only one row, the

lower and the upper value are the same.● The mapping of rows (ET_MOVED) describes how to map ranges of rows of the before image to ranges of

rows of the after image. The range in the after image is described only by the lower value, as the following example demonstrates:((3, 5), 7) means that rows 3, 4 and 5 of the before image are mapped to rows 7, 8 and 9 of the after image.

● Entries in table ET_MOVED of method GET_INDEX_MAP are only needed for rows which change their position in the data table between the before and after images. Rows which do not change their position do not have to be listed in this table.

154 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 155: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.12.14.2 Application Scenarios

The creation of a change log by feeder classes is supported by special classes of ATS. Dependent on this support, there are different application scenarios:

● Unique Key ModeThe rows of the data table have a unique key. The key can consist of an arbitrary number of fields. You can edit the values of the key, but the uniqueness of the key must always be guaranteed for the whole data table. Additionally, arbitrary operations with the table are allowed.

● Stable Line Order ModeThe application does not change the order of rows in the data table, but insert and delete operations are allowed.

● Own Delta HandlingThere is no support by ATS; the application is responsible for the creation of a correct change log.

● No Delta HandlingThere is no delta handling; after changes to data the services (sorting and filtering) are always executed. This is the behavior of the original List UIBB. This behavior, naturally, does not conform to current SAP UI guidelines.

In the Unique Key Mode and Stable Line Order Mode scenarios, the application can delegate the creation of change logs to helper classes of ATS (see below). The application must guarantee special conditions (agreements). Violation of these agreements leads to erroneous mapping between the before and after image and, therefore, a correct mapping cannot be calculated in all cases. Therefore, conformity with the current UI guidelines is not guaranteed. However, no data is lost.

NoteThe existing feeder classes can be used furthermore with the new List ATS UIBB without changes. This corresponds to the 'no delta handling' scenario.

3.2.1.12.14.2.1 Extension of Feeder Interface

The signature of the method GET_DATA of the feeder interface is extended with an exporting parameter. This parameter must reference an object which implements the interface for the editor change log, as the code below illustrates:

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 155

Page 156: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Together with the existing export parameter EV_DATA_CHANGED the following situations are possible:

EV_DATA_CHANGED EO_ITAB_CHANGE_LOG Meaning

FALSE is not observed Data not changed; change log is not observed. Services are not executed

TRUE initial Data changed; change log not calcu­lated. Services are executed at new

not initial : DATA_IS_NEW( ) = TRUE

Data changed; change log calcu­lated but data_new is set. Services are executed at new

not initial : DATA_IS_NEW( ) = FALSE

Data changed; change log calcu­lated (access via get_index_map). Services are not executed

3.2.1.12.14.2.2 Unique Key Mode

This section describes what an application must do to realize the scenario Unique Key Mode.

To-Dos for the Application

● The flag EV_DATA_CHANGED must always be set if changes to data are made inside the method GET_DATA.

○ The flag will not be set if changes are made by UI and accepted by the application.○ The flag must also be set if only the order of the rows is changed (for example, by sorting the table).

● The uniqueness of the key must always be ensured.

○ Applies also for changes of keys on the UI.○ Applies also for insert operations, that is, new inserted rows should already have a unique key.

● For the creation of the editor change log, the class CL_SALV_ITAB_EDITOR_KEY_MODE can be used.

○ See below for programming example, and also the class documentation in the system.

NoteA violation of uniqueness results in erroneous mapping between rows of the before and after images. However, no data is lost.

A selection of the methods for class CL_SALV_ITAB_EDITOR_KEY_MODE are described in the following table:

156 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 157: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Method Description

LOG_NEW_DATA Resets the change log (DATA_IS_NEW returns TRUE).

If you want to notify that new data exists using the change log, you can use the method LOG_NEW_DATA (see Extension of Feeder Interface).

START_RECORDING Starts recording of change log; an existing change log is deleted.

The start of recording with this method is absolutely necessary; the actual state of the data table must be handed over as a parameter at the start.

The call of this method deletes an existing change log. Therefore, this method may be called once within the method GET_DATA.

KEY_CHANGED Indicates that a key was changed.

The notification of key changes is essential for the cal­culation of a correct change log. If a key is changed and no notification is made, it is assumed that any row is deleted and any row is inserted. This is different behav­ior to changing a key (no new row, and row is moved).

STOP_RECORDING Stops recording of change log.

Further access to the change log (using 'get' methods) are realized more quickly as the change log does not have to be calculated for each access. But in principle the method STOP_RECORDING is not required.

MOVE_TO_INSERT_POSITION Marks a row for moving to an insert position.

The constructor of this class has the following parameters:

● ○ IT_KEY_NAME Names of key fields

○ I_UI_CAN_CHANGE_KEY_FIELDS Flag indicating whether changes of key fields are possible by UIIf no such changes are possible, a quicker calculation of the change log is possible.

NoteThe calculation of the change log is expensive. It takes place either during a call of method STOP_RECORDING or, if the method STOP_RECORDING is not called before, during a call of the get' methods of interface IF_SALV_ITAB_CHANGE_LOG (see above).

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 157

Page 158: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Moving of Rows

As described above, the application knows of no connection between the data table and the UI, that is, it does not affect the order in which the rows of the data table are displayed on the UI. In certain situations it is necessary to move rows around the UI. For example, when implementing the drag-and-drop of rows, it must be possible to mark those rows in the data table which have to be moved in the UI to an insert position. For this reason, the class CL_SALV_ITAB_EDITOR_LINE_MODE has the methods MOVE_TO_INSERT_POSITION and LOG_MOVE_TO_INSERT_POSITION. These methods can be passed a row number that appears in the UI at the insert position. Several calls to these methods with different row numbers are possible. These rows are shifted simultaneously. Changes to the data table are not necessary, that is, it is not necessary to move these rows inside the data table.

Programming Examples

The following programming example shows the principal construction of method GET_DATA if the class CL_SALV_ITAB_EDITOR_KEY_MODE is used for creating the change log. The application must start and stop the recording, must notify key changes, and must export the change log using the exporting parameter.

158 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 159: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

NoteThe constructor and the methods START_RECORDING and KEY_CHANGED can throw exceptions. In the programming example above, the handling of exceptions has been waived.

3.2.1.12.14.2.3 Stable Line Order Mode

This section describes what an application must do to realize the scenario Stable Line Order Mode.

To-Dos for the Application

● The flag EV_DATA_CHANGED must always be set if changes on data are made inside the method GET_DATA.

○ The flag will not be set if changes are made by UI and accepted by application.● The order of rows in the data table must not be changed.

○ Sorting is forbidden.○ Do not call routines (methods, function modules) which change the order of rows in the table.○ Insert and delete operations are possible. However, no mapping is detected if a row is deleted and then

inserted.● The class CL_SALV_ITAB_EDITOR_LINE_MODE can be used for creating the editor change log.

○ See programming examples below, and also the class documentation in the system.○ This class contains methods for all table operations (except for LOOP and READ).○ It is possible to execute all table operations themselves, and only use the log functions of this class.

Note● Changes in row order lead to erroneous mapping between the before and after images. However, no data is

lost.● If, in certain situations (for example during sorting), there is a need to change the order of table rows, it

should proceed as if there is new data (run method RESET).

This class provides a complete set of operations to change a table. Reading operations (READ, LOOP) must be executed directly using ABAP statements.

A selection of the methods for class CL_SALV_ITAB_EDITOR_LINE_MODE are described in the following table:

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 159

Page 160: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Method Description

START_RECORDING Starts recoding of change log_an existing change log deleted.

The start of recording with this method is absolutely necessary. During the start, the current state of the data table must be handed over as a parameter. A method for stopping the recording is not needed, and does not exist.

The call of this method deletes an existing change log. Therefore, this method may be called once within the method GET_DATA.

SET_NEW_DATA Gets new data and resets the change log (DATA_IS_NEW returns TRUE.

Table Operations with Recording

APPEND_... Substitute for ABAP statement APPEND (3 variants).

CLEAR_TABLE Substitute for ABAP statement CLEAR.

COLLECT_LINE Substitute for ABAP statement COLLECT.

DELETE_... Substitute for ABAP statement DELETE (2 variants).

INSERT_... Substitute for ABAP statement INSERT (3 variants).

MODIFY_LINE Substitute for ABAP statement MODIFY.

MOVE_TO_INSERT_POSITION Marks a row for moving to an insert position.

Only Recording of Table Operations

LOG_APPEND_ROWS Records appended rows.

LOG_DELETE_ROWS Records deleted rows.

LOG_INSERT_ROWS Records inserted rows.

LOG_NEW_DATA Resets the change log (DATA_IS_NEW returns TRUE).

The method LOG_NEW_DATA can be used if you want to notify using the change log that new data exists (see Extension of Feeder Interface).

MOVE_TO_INSERT_POSITION Marks a line (row) for moving to an insert position.

NoteAll operations that change a table can be executed as ABAP statements too if, after each statement, the corresponding recording method LOG_... is called. However, it is recommended that changes to a table are always made with the appropriate methods for such table operations.

160 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 161: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Moving of Rows

As described above, the application knows of no connection between the data table and the UI, that is, it does not affect the order in which the rows of the data table are displayed on the UI. In certain situations it is necessary to move rows around the UI. For example, when implementing the drag-and-drop of rows, it must be possible to mark those rows in the data table which have to be moved in the UI to an insert position. For this reason, the class CL_SALV_ITAB_EDITOR_LINE_MODE has the methods MOVE_TO_INSERT_POSITION and LOG_MOVE_TO_INSERT_POSITION. These methods can be passed a row number that appears in the UI at the insert position. Several calls to these methods with different row numbers are possible. These rows are shifted simultaneously. Changes to the data table are not necessary, that is, it is not necessary to move these rows inside the data table.

Programming Examples

● The following code demonstrates how to replace ABAP statements for changing table content using calls of methods of class CL_SALV_ITAB_EDITOR_LINE_MODE:

Note○ If the corresponding ABAP statement returns any system fields (SY-...), the method has an exporting

or returning parameter with the value of this system field (see the signatures of the methods).○ Regarding the validity of indices, the same rules apply as for the corresponding ABAP statements.

Therefore, invalid values for insert indices, for example, lead to system dumps as they would in the corresponding ABAP statement.

○ Most of the methods above can throw exceptions. The handling of exceptions has been waived in the example code above.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 161

Page 162: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● The following programming example shows the principal construction of the method GET_DATA if the class CL_SALV_ITAB_EDITOR_LINE_MODE is used for creating the change log. The application uses the methods for table operations (this is demonstrated by the deletion and insertion of a line in this example):

NoteNote that the handling of exceptions is waived in the above example.

● In the following programming example the table operations are made by ABAP statements and then recorded using recording methods:

162 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 163: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

NoteNote that the handling of exceptions is waived in the example above.

● Both the programming examples above have a drawback; table operations using ABAP statements can be mixed with calls of methods for table operations. This increases the occurrence of erroneous change logs. The following example avoids this problem and forces you to use methods for table operations in all cases:

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 163

Page 164: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

In the above example the entire code is moved to method GET_DATA_INTERNAL. The data table is transferred to this method using an importing parameter. Therefore, inside the method GET_DATA_INTERNAL, ABAP statements for changing the table are no longer allowed. All changes relate to calls of editor methods.

3.2.1.12.14.2.4 Own Delta Handling

This section describes what an application must do to realize the scenario Own Delta Handling. The application is responsible themselves for the creation of the change log.

To-Dos for the Application

● The flag EV_DATA_CHANGED must always be set if changes to data are made inside the method GET_DATA.

○ The flag will not be set if changes are made by UI and accepted by the application.● If the data table is changed, a change log must be created. The recording methods (LOG_...) of class

CL_SALV_ITAB_EDITOR_LINE_MODE may be used. This corresponds with the second example of the preceding section.

164 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 165: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.12.14.2.5 No Delta Handling

This case describes the behavior of the original List UIBB.

To-Dos for the Application

● The flag EV_DATA_CHANGED must always be set if changes to data are made inside the method GET_DATA.

○ The flag will not be set if changes are made by UI and accepted by application.

Note that the existing feeder classes can be used with the new List ATS UIBB without changes. But, of course, the behavior during edit scenarios does not conform to the current UI guidelines under certain conditions.

3.2.1.13 List ATS Component with Integrated Data Access (IDA)

Definition

The List ATS component with integrated data access (IDA) allows you to connect directly and easily with SAP HANA, taking full advantage of the greatly enhanced performance features of such a system. This component is optimized for SAP HANA but can also be used with other underlying databases.

Without IDA, the List ATS component requires all data to be first loaded from a database into an internal table in order to display it. Functions such as sorting, filtering and aggregation are then carried out on the data in this table, in addition to authorization checks being carried out on every single row.

With IDA, data is loaded into the List ATS component 'on demand'. All authorization checks, table functions and other operations normally carried out in the application layer are now 'pushed down' to the database itself with the result that the List ATS component is able to retrieve and display huge amounts of data tremendously quickly. Using the paging capabilities of both SAP HANA and the IDA interface, all data in the database can be displayed in the list in one go (without the need for truncating data). The user is able to scroll smoothly through the list, and see the results of functions, such as sorting and grouping, on all data in an instant.

IDA is available only to the List ATS component in Floorplan Manager applications. Currently, the List ATS with IDA component can be used only in read-only scenarios.

To take advantage of IDA, the List ATS component implements the IDA interface, IF_FPM_GUIBB_LIST_IDA, inside its feeder class.

The overall structure of the List ATS component remains unchanged when using IDA; it is only the interface which the List ATS component implements inside its feeder class that is different.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 165

Page 166: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Structure at Runtime

A list is displayed as a table of rows and columns at runtime. Each item in a list is displayed in a separate row. A list has its own toolbar.

Each column of the list has a column header. If the application has enabled list functions such as sorting, filtering, and grouping, an arrow appears in the bottom-right corner of the column header when you hover the mouse over the heading at runtime. The available menu options are determined by the relevant feeder class.

List components may contain an action column containing several one-click action controls.

NoteThe overall structure of the List ATS component remains unchanged when using IDA; it is only the interface, which the List ATS component implements inside its feeder class, that is different. For more information on the structure of the List ATS component, see the documentation for the List ATS component.

NoteCurrently, not all features available in the List ATS component are available in the List ATS component with IDA. See the Release Notes for further details.

Editing the Structure at Design Time (FLUID)

You configure this component with FLUID, the FPM configuration editor.

At design time, the Preview panel in FLUID displays the List ATS component in a WYSIWYG style.

In the General Settings panel, you can specify settings applicable to the list as a whole.

In the List UIBB Schema, you can specify attributes for the individual elements of the list.

For more information on the attributes of this component in FLUID, choose Field Help from the context menu in the system.

NoteSettings for some properties of the List ATS component with IDA are necessarily different to those of the List ATS component alone.

For more information on configuring the List ATS component, see the documentation for both the List ATS Component and for FLUID.

The IDA Interface, IF_FPM_GUIBB_LIST_IDA

The IDA interface, IF_FPM_GUIBB_LIST_IDA, contains a similar set of methods belonging to those of the feeder class interface for the FPM List component, IF_FPM_GUIBB_LIST.

166 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 167: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.13.1 Features Common to Both List ATS and List ATS with IDA Components

Not all features found in the interface of the List ATS component (FPM_LIST_UIBB_ATS) are currently available in the IDA interface (IF_FPM_GUIBB_LIST_IDA). This section describes the current position.

The following table describes the methods available to the List ATS with IDA interface in the current release of FPM:

Table 17:Feature Where Defined Notes

Column Availability and Visibility ● ET_FIELD_DESCRIPTION:

○ TECHNICAL_FIELD (Availa­bility)

● CT_FIELD_USAGE

○ VISIBILITY (Availability● FLUID (Visibility)● Personalization (Visibility)

Availability and visibility of columns can be influenced by feeder class, configuration, and personalization in the same way as it is with the List ATS feeder class.

Currency/Unit Reference Fields ● ET_FIELD_DESCRIPTION:

○ CQ'C' = Currency, 'Q' = Unit

○ CQ_REFCurrency/unit reference field

A reference field is used for display­ing values with the correct number of decimal places. This also affects table functions like sorting, filtering and aggregation. The declaration of the reference field in ET_FIELD_DESCRIPTION is op­tional. It overwrites references de­clared in DDIC. If you use External Views, it is not possible to declare references in DDIC. Here, you need to define the reference field in ET_FIELD_DESCRIPTION.You can provide texts such as column labels in ET_FIELD_DESCRIPTION. It overwrites texts that are stored in DDIC. If you use External Views, it is not possible to provide texts in DDIC. Here, you need to provide the texts in ET_FIELD_DESCRIPTION.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 167

Page 168: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Feature Where Defined Notes

Column-Specific Texts ● ET_FIELD_DESCRIPTION:

○ HEADER_LABEL○ HEADER_LABEL_TOOLTIP○ HELP_TEXT○ TOOLTIP

You can provide texts such as col­umn labels in ET_FIELD_DESCRIPTION. It over­writes texts that are stored in DDIC.

If you use External Views, it is not possible to provide texts in DDIC. Here, you need to provide the texts in ET_FIELD_DESCRIPTION.

Field Groups (Special Groups) ● ET_FIELD_DESCRIPTION:

○ SP_GROUP● ET_SPECIAL_GROUP

This is the same as for List ATS. It allows the application to group fields.

Table Functions: Sorting, Filtering, Aggregation, and Grouping

● ET_FIELD_DESCRIPTION:

○ ALLOW_SORT○ ALLOW_FILTER○ ALLOW_AGGREGATION

● FLUID

FPM List with IDA supports table functions like sorting, filtering, ag­gregation, and grouping. These functions are pushed down to the database. These functions are switched off by default, but can be enabled using these flags for each column.

Example of a generic way to allow services can be found in the method CL_FPM_TEST_LIST_IDA_SFLIGHT->GET_FIELD_DESCRIPTIONS().

The functions must be enabled in FLUID afterwards.

Initial Sorting, Grouping, and Aggre­gation

FLUID Initial sorting, grouping, and aggre­gation can be defined in FLUID

(SAP NetWeaver 7.4 sorting and grouping in SP03; aggregation in SP04)

Personalization FLUID Application may choose one of the following options:

● Personalization is disabled● Personalization is enabled● Personalization enabled with

option for end user to create own views

168 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 169: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Feature Where Defined Notes

Application Functions and Toolbar ● ET_ACTION_DEFINITION● FLUID

Application may create toolbar but­tons, and other elements in toolbar in the same way as in List ATS feeder class, using ET_ACTION_DEFINITION; design of the toolbar in FLUID must be made afterwards.

3.2.1.13.2 Displaying Data from a Database Table or View

Context

Procedure

1. Create the feeder class.The feeder class must implement the interface IF_FPM_GUIBB_LIST_IDA; the methods are similar to those in interface IF_FPM_GUIBB_LIST.

2. Return the structure descriptor in IF_FPM_GUIBB_LIST_IDA~GET_DEFINITION.

The method GET_DEFINITION is executed as it is in other UIBBs at both runtime and design time (FLUID).

method if_fpm_guibb_list_ida~get_definition. eo_structdescr ?= cl_abap_structdescr=>describe_by_name( 'SFLIGHT' ).endmethod.

3. Create a Data Source instance in IF_FPM_GUIBB_LIST_IDA~START_RUNTIME.

The method START_RUNTIME is called once at runtime after GET_DEFINITION, but before the first call to PROCESS_BEFORE_OUTPUT. Keep the Data Source instance reference as you will need it for the next phases.

Class private section: data mo_data_source type ref to if_fpm_list_data_src_db_table .

Implementation: method if_fpm_guibb_list_ida~start_runtime. mo_data_source = cl_fpm_list_source_factory=>create_for_db_table( iv_ddic_name = 'SFLIGHT' ). eo_data_source = mo_data_source. endmethod.

4. Create your FPM application with a List ATS UIBB (component FPM_LIST_UIBB_ATS), using the feeder class you created above.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 169

Page 170: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.13.3 Restricting Data using Selection Criteria

Use method SET_DATA_SELECTION_CRITERIA of the data source to set selection criteria in the feeder class method PROCESS_BEFORE_OUTPUT.

Selection criteria may be set only in PROCESS_BEFORE_OUTPUT; if they are set anywhere else, an exception CX_FPM_LIST_CALL_OUTSIDE_PBO is raised.

We recommend you use the helper class CL_SALV_RANGE_TAB_COLLECTOR to create selection criteria (but you may generate them on your own without the helper class).

The sample code below details this scenario:

Class private section: methods get_selection_criteria exporting et_selection type if_salv_service_types=>yt_named_ranges.

Implementation: method if_fpm_guibb_list_ida~process_before_output. case io_event->mv_event_id. when if_fpm_guibb_search=>fpm_execute_search. get_selection_criteria( importing et_selection = data(lt_selection) ). mo_data_source->set_data_selection_criteria( lt_selection ). endcase. endmethod.

method get_selection_criteria. clear et_selection.

data lt_carrid_range type range of sflight-carrid. data lt_connid_range type range of sflight-connid. ... " IMPLEMENT: Get ranges from Search UIBB or other sources ... data(lo_collector) = new cl_salv_range_tab_collector( ). lo_collector->add_ranges_for_name( iv_name = 'CARRID' it_ranges = lt_carrid_range ). lo_collector->add_ranges_for_name( iv_name = 'CONNID' it_ranges = lt_connid_range ). lo_collector->get_collected_ranges( importing et_named_ranges = et_selection ). endmethod.

A complete example of the generic transformation of selection criteria from the Search UIBB can be seen in method CL_FPM_TEST_SEARCH_IDA_SFLIGHT>IF_FPM_GUIBB_SEARCH~PROCESS_EVENT.

3.2.1.13.4 Using SAP HANA CalcViews with Placeholder Variables

An application may use a SAP HANA CalcView with placeholder variables. The variables can be set using method SET_VIEW_PARAMETERS of the data source created in the feeder class method START_RUNTIME:

method if_fpm_guibb_list_ida~process_before_output.

mo_data_source->set_view_parameters( value #( ( name = 'SFLIGHT_PLACE_HOLDER'

170 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 171: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

value = 'AA' ) ) ).

endmethod.

You must not wrap the variable name with '$$' (unlike HANA SQL syntax).

The view parameters may be set only in the method PROCESS_BEFORE_OUTPUT; setting these anywhere else will raise an exception CX_FPM_LIST_CALL_OUTSIDE_PBO.

3.2.1.13.5 Row Selection

The List ATS with IDA UIBB supports single row selection.

Context

There are API methods for the application to check for the existence of a selection, and to get the selected row. To do this, you must perform the following steps:

Procedure

1. A prerequisite for the use of this feature is that the database table or view has a unique key. If available, the key definition is taken automatically from DDIC. However, the application can define its own key using the attribute IS_KEY of the field description in the feeder class method GET_DEFINITION. If the provided key is not unique, the method GET_SELECTED_ROW may throw a duplicate key exception. On the other hand, do not mark more fields than necessary as key fields. The List ATS UIBB always reads key fields together with visible fields for each page of data. The more fields you read, the poorer the performance becomes.

2. When the key is known, the application must allow single row selection in FLUID.3. The application gets the selected row from the List ATS UIBB using the importing parameter

IO_ROW_SELECTION of the feeder class method PROCESS_EVENT.

The sample code below illustrates these steps:

method if_fpm_guibb_list_ida~process_event.

data ls_selected_row type sflight. data lt_field type if_fpm_list_ida_selection=>yts_field_name. data l_field like line of lt_field.

case io_event->mv_event_id.

when 'SHOW_DETAILS'. if io_row_selection->is_row_selected( ) = abap_true. try. l_field = 'SEATSMAX'. insert l_field into table lt_field.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 171

Page 172: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

l_field = 'SEATSOCC'. insert l_field into table lt_field. io_row_selection->get_selected_row( exporting iv_request_type = if_fpm_list_ida_selection=>cs_request_type-key_and_requested_fields it_requested_fields = lt_field importing es_row = ls_selected_row ). catch cx_salv_ida_sel_row_deleted. " do apropriate error handling here ... endtry. endif. endcase.

endmethod.

NoteThe application calls the method GET_SELECTED_ROW only if a row is selected; calling the method GET_SELECTED_ROW when no row is selected raises an exception. Therefore, the application must first check for the existence of a row selection, using the method IS_ROW_SELECTED.

The parameters IV_REQUEST_TYPE and IT_REQUESTED_FIELDS of the method GET_SELECTED_ROW are optional. These are described in the following table:

IV_REQUEST_TYPE IT_REQUESTED_FIELDS Result

IF_FPM_LIST_IDA_SELECTION=>CS_REQUEST_TYPE-KEY_AND_REQUESTED_FIELDS (Default)

Empty, or not supplied Key fields are filled; other fields are undefined

One or more requested fields Key fields, and request fields are filled; other fields are undefined

IF_FPM_LIST_IDA_SELECTION=>CS_REQUEST_TYPE-ALL_FIELDS

Anything Row with all database fields is read

The method GET_SELECTED_ROW always execute a SELECT statement on the database, regardless of what you request. If the selected row is deleted, the exception CX_SALV_IDA_SEL_ROW_DELETED is raised.

The handling of the exception is optional. The selected row may be read only in the method PROCESS_EVENT; anywhere else results in an exception CX_FPM_LIST_CALL_OUTSIDE_PE.

3.2.1.13.6 (Fuzzy) Text Search

The application can use the text-search feature of the database.

The application can place a search string input field anywhere on the UI, usually in a Search UIBB or in the List ATS UIBB toolbar. Use the method TEXT_SEARCH()->SET_SEARCH_TERM of the data source to set the search string in the feeder class method PROCESS_BEFORE_OUTPUT, as detailed in the sample code below:

method if_fpm_guibb_list_ida~process_before_output.

172 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 173: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

data lo_search_string type string.

mo_data_source->text_search( )->set_search_term( lo_search_string ).

endmethod

If the database supports fuzzy search, you can also set the field-similarity factor using the method TEXT_SEARCH()->SET_ FIELD_SIMILARITY of the data source in the feeder class method PROCESS_BEFORE_OUTPUT:

mo_data_source->text_search( )-> set_field_similarity( '0.7' ).

Text search criteria may be set only in PROCESS_BEFORE_OUTPUT; setting it anywhere else results in the exception CX_FPM_LIST_CALL_OUTSIDE_PBO.

3.2.1.13.7 Complex Conditions

The application may need to create a data selection criteria that cannot be achieved using simple selection ranges.

For example, you search for flights with business or first-class seats. You can use a condition factory, obtained from the data source, to generate the required condition.

method if_fpm_guibb_list_ida~process_before_output.

data(lo_condition_factory) = mo_data_source->condition_factory( ). data(lo_condition) = lo_condition_factory->greater_than( name = 'SEATSMAX_B' value = 0 )->or( lo_condition_factory->greater_than( name = 'SEATSMAX_F' value = 0 ) ). mo_data_source->set_data_selection_criteria( io_condition = lo_condition ).

endmethod.

If you supply both parameters IT_SELECTION_CRITERIA and IO_CONDITION to the method SET_DATA_SELECTION_CRITERIA, both conditions are combined with the AND operator. Supplying no parameter is the same as providing an empty condition; it means that any condition provided previously is cleared.

Selection criteria may be set only in PROCESS_BEFORE_OUTPUT, setting anywhere else results in the exception CX_FPM_LIST_CALL_OUTSIDE_PBO.

CautionThe application must take care of NULL values in the conditions built by the condition factory. NULL values may appear, for example, in the database views with outer-joins. If a database field contains NULL values in the database, and you create a condition that contains an initial value, but do not explicitly include a NULL value, the result will not be as the user expects; NULL and initial values will appear to be the same to the end user. NULL values can be added to a condition, as shown in the following example:

lo_condition_for_one_field = lo_condition_for_one_field->or( lo_condition_factory->is_null( 'MY_FIELD_WITH_NULLS' ) ).

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 173

Page 174: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The List ATS UIBB handles NULL values automatically for the parameter IT_SELECTION_CRITERIA of method SET_SELECT_OPTIONS.

3.2.1.13.8 Authorizations

The List ATS with IDA supports the pushing of authorization checks down to the database. The data is restricted according to the authorization restrictions of the active user. The authorization check is based on the authorization object concept, but executed on the database. The application must define the required authorization, and any mapping between the authorization object field, and the database field. The authorization check may be specified in the feeder class method START_RUNTIME using the method ADD_AUTHORIZATION_FOR_OBJECT of the data source:

method if_fpm_guibb_list_ida~start_runtime.

mo_data_source->add_authorization_for_object( iv_authorization_object = 'S_CARRID' it_activities = VALUE #( ( field = 'ACTVT' von = '03' ) ) it_field_mapping = VALUE #( ( auth_field = 'CARRID' view_field = 'CARRID' ) ( auth_field = 'CONNID' do_not_check = abap_true ) ) ).

endmethod.

You may call this method several times for different authorization objects. Conditions for all objects must be fulfilled. Conditions are combined using the AND operator.

The authorization check is defined only in the method START_RUNTIME; if you define it anywhere else, an exception CX_FPM_LIST_AFTER_START_RUNTIM is raised.

3.2.1.13.9 Definition of Data Elements for Fields of an External View

If you want to display data from an external view (for example, a view modeled in SAP HANA), the following issues arise:

● Values in the list are not properly formatted; for example, date is displayed in an internal format● Column header titles are missing

To get around this, the application should create a structure descriptor by filling the parameter EO_STRUCTDESCR in the feeder class method GET_DEFINITION with the required types. If you do this, the value formatting, and column headers are taken from the data types used in that structure.

The sample code below describes how to change the data element for a field FLDATE from S_DATE to CHAR8.

method if_fpm_guibb_list_ida~get_definition. data(lt_components) = cast cl_abap_structdescr( cl_abap_typedescr=>describe_by_name( 'SFLIGHT' ) )->get_components( ).

174 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 175: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

" ************************************ " replace type for component(s) lt_components[ name = 'FLDATE' ]-type = cast cl_abap_datadescr( cl_abap_typedescr=>describe_by_name( 'CHAR8' ) ). " *********************************** eo_structdescr = cl_abap_structdescr=>get( lt_components ). endmethod.

NoteThe types in the structure descriptor must be compatible with the type of the database type, that is, if the database type is character-based, then the type in the descriptor must also be character-based. The lengths of the values must also be equal. For example, you could use DATS or NUMC8 for a database type CHAR8, but not INT4 for database type CHAR10.

3.2.1.13.10 Retrieving Entire Dataset of a Row (Link Display Types)The feeder class is able to retrieve the entire dataset of a row, even when a cell containing a Link to Action or One-Click Action display type is selected at runtime.

This is made possible by a new interface, IF_FPM_LIST_IDA_ROW_DATA, containing the method GET_ROW_DATA. This new interface is accessed through the IF_FPM_GUIBB_LIST_IDA interface (PROCESS_EVENT method, IO_EVENT_ROW_DATA parameter).

The sample code below illustrates how you can achieve this:

method if_fpm_guibb_list_ida~process_event. data ls_row_data type sflight.

if io_event_row_data is bound. io_event_row_data->get_row_data( exporting iv_request_type = if_fpm_list_ida_selection=>cs_request_type-all_fields importing es_row = ls_row_data ). endif.

endmethod.

3.2.1.13.11 Detection of Database CapabilitiesApplication developers can use available APIs to determine which services are supported by the underlying database. This allows developers to program alternatives for those applications using SAP HANA and those using non-HANA systems.

The List ATS with IDA component is able to display most types of data from most SAP-supported databases. Therefore, an application that is programmed to run on any database must be aware of the capabilities of the database currently being accessed, and the features provided by the application must reflect these capabilities.

Application developers can use a capability service to check which capabilities a database supports. Use the static method CL_FPM_LIST_SOURCE_FACTORY=>GET_SOURCE_CAPABILITIES() to call this service. The capability

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 175

Page 176: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

service implements the interface IF_SALV_IDA_CAPABILITY_SERVICE. See the system documentation for further details about this interface and its methods.

This service allows you to check whether the database has the following capabilities:

● Text SearchIf a text search is not supported by the database, then the application shall not provide a text search input field (for example, in a Search GUIBB).

● Limitation to Number of Selected RecordsIt is recommended to limit the number of records if the database does not support addressing records by a range of row indices. In this case, List ATS with IDA transfers all records from the database into an ABAP internal table [ITAB]. To avoid performance issues, the application may display an input field for a user to enter the maximum number of data rows (for example in a Search UIBB). The limit should be set in the feeder class method IF_FPM_GUIBB_LIST_IDA~PROCESS_BEFORE_OUTPUT by calling the method SET_MAXIMUM_NUMBER_OF_ROWS( ) of the data source (interface IF_FPM_LIST_DATA_SRC_DB_TABLE).

● Support of DDIC External Views

Tip

For an example of how a Search UIBB may react to specific database capabilities, see the method IF_FPM_GUIBB_SEARCH~GET_DEFINITION of the class CL_FPM_TEST_SEARCH_IDA_SFLIGHT.

3.2.1.13.12 Sorting according to Log-on Language (Sort Locale)

By default, List ATS with IDA sorts lists according to the log-on language. Application developers can overwrite this if they need to.

If a column contains language-dependent text, application developers can set the field description component SORT_AS_TEXT = IF_FPM_CONSTANTS=>GC_ORDER_AS_TEXT-ON to sort it according to the language-specific alphabet. The field description is provided by the feeder class using parameter ET_FIELD_DESCRIPTION of method IF_FPM_GUIBB_LIST_IDA~GET_DEFINITION.

There is a significant performance penalty for language-specific, alphabetical sorting; use this type of sorting only if necessary. By default, List ATS with IDA uses language-specific, alphabetical sorting for all character and string columns that have set the flag Lower Case in their DDIC domain.

If the default sort strategy is not appropriate, use SORT_AS_TEXT = IF_FPM_CONSTANTS=>GC_ORDER_AS_TEXT-OFF to ensure an optimal sort speed. For example, use binary sorting (SORT_AS_TEXT is off) for columns that contain codes or IDs, such as currency codes, country codes, material numbers, and object IDs, and use language-specific, alphabetical sorting for columns that contain language specific country names.

176 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 177: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.13.13 Suppressing Data Selection for a Search Results List

Data, to be displayed in a List ATS with IDA component that is used as a results list for a search component, can now be suppressed until the search is executed; no data is displayed in the list component until the search is actually run.

List ATS with IDA selects data immediately when it is displayed for the first time. This behavior is not always desirable if the list is used as a search results list; an empty search results list is often required when it is first displayed.

Data selection can be suppressed until a user actually performs a search.

To suppress data selection, use the method SET_DATA_SUPPRESSING of the data source (interface IF_FPM_LIST_DATA_SRC_DB_TABLE) in the feeder class method IF_FPM_GUIBB_LIST_IDA~PROCESS_BEFORE_OUTPUT.

3.2.1.13.14 Sorting by External Value

Application developers should determine whether a list is to be sorted by external values (those values displayed at runtime) or internal values (the corresponding values stored in the database).

Values displayed in a list at runtime (external values) may be different to the corresponding values held in the underlying database (internal values). The values may have been converted, for example, by an ABAP conversion exit. Sorting at runtime may therefore produce unexpected results for the user if sorting is performed using internal values.

● Sort by External ValueList ATS IDA sorts lists by external value if sorting is performed in ABAP memory.If values displayed in a column are converted by an ABAP conversion exit, the field description component is set to SORT_BY = IF_FPM_CONSTANTS=>GC_ORDER_CRITERION-EXTERNAL_VALUE. The field description is provided by the feeder class using parameter ET_FIELD_DESCRIPTION of method IF_FPM_GUIBB_LIST_IDA~GET_DEFINITION.

● Sort by Internal ValueIf sorting is performed by the database (as with SAP HANA), the field description component (SORT_BY) is ignored, and the data is sorted by values stored in the database (internal values).When using SAP HANA, sorting by external value is only possible if the application stores the external values in the database.

For further information on this topic, see the documentation for method IF_SALV_IDA_CAPABILITY_SERVICE=>IS_MAX_ROWS_RECOMMENDED in the system.

There is a significant performance penalty for sorting by the external value as all values in the table must be converted to the external format before they are sorted. Therefore use sorting by external value only if necessary.

By default, the List ATS with IDA sorts by the external value if the data type of an internal value is a character or string; otherwise it sorts by the internal value. If necessary, application developers can force the List ATS with IDA to sort by the internal value using the parameter SORT_BY = IF_FPM_CONSTANTS=>GC_ORDER_CRITERION-INTERNAL_VALUE.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 177

Page 178: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.13.15 Interface: IF_FPM_GUIBB_LIST_IDA

Table 18: Methods of IF_FPM_GUIBB_LIST_IDA InterfaceGET_DEFINITION:

Allows the feeder class to provide all necessary information for configuring a List IDA component: the list of available fields and their properties, and the list of actions (FPM events).

Parameter Description

EO_STRUCTDESCR Is of type CL_ABAP_STRUCTDESCR. It contains a set of all available columns. In the configuration, columns can be added that belong to this set of columns.

ET_FIELD_DESCRIPTION Here you can provide the additional information needed for the creation of the columns, for example, la­bel texts and tooltips.

ET_ACTION_DEFINITION A list of all actions (which will be transformed to FPM events at runtime) that you can add to the toolbar through configuration.

ET_SPECIAL_GROUP Special groups can be used for a grouping feature in FLUID. If the feeder class provides a special group table it should assign each field in the field description table to a group in field SP_GROUP . At design-time, the FPM configuration editor groups the fields. This is an easier way to find fields if your field catalogue contains many fields.

GET_PARAMETER_LIST:

Called at design time and at runtime when the List IDA component is created. It allows you to define a list of the parameters that the feeder class supports. This list is used by the FPM configuration editor to pro­vide the input fields for these parameters.

Parameter Description

RT_PARAMETER_DESCR Is returned from this method. It describes which pa­rameter is possible. In Field TYPE , the DDIC type needs to be entered.

INITIALIZE:

Called at design time and at runtime when the List IDA component is created.

Parameter Description

IT_PARAMETER Contains a list of the feeder class parameters and the values for them specified in the configuration.

178 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 179: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

START_RUNTIME:

Called once at runtime during start up.

EO_DATA_SOURCE The feeder class must provide a data source; use this method to do so: CL_FPM_LIST_SOURCE_FACTORY=> CREATE_FOR_DB_TABLE().

FLUSH:

This method is called whenever an FPM event is triggered. Currently it contains no parameters. Usually this method is used to pass data changes made by the user to the feeder class. However, as List ATS w/IDA is currently used for read-only scenarios only, this is not relevant at present.

Parameter Description

PROCESS_EVENT:

Called within the FPM event loop. Here the event processing can take place and this is where the event can be canceled or deferred.

Parameter Description

IO_EVENT The FPM event which is to be processed.

EV_RESULT The result of the event processing. There are 3 possible values:

● ev_result = if_fpm_constants=>gc_event_result-OK

● ev_result = if_fpm_constants=>gc_event_result-FAILED

● ev_result = if_fpm_constants=>gc_event_result-DEFER

IV_RAISED_BY_OWN_UI Indicates whether the event originates from this UIBB.

IO_ROW_SELECTION Provides an API that can be used to retrieve informa­tion about selected rows.

IO_EVENT_ROW_DATA Provides an API that can be used to retrieve the com­plete dataset of a row where an FPM event occured. This is helpful, for example, when the column is of dis­play type Link to Action or if it is a One Click Action col­umn.

PROCESS_BEFORE_OUTPUT:

Called within the FPM event loop. This is the last method within the event loop. It is used to change proper­ties of columns, cells or actions.

Parameter Description

IO_EVENT The FPM event which is to be processed.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 179

Page 180: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

PROCESS_BEFORE_OUTPUT:

Called within the FPM event loop. This is the last method within the event loop. It is used to change proper­ties of columns, cells or actions.

Parameter Description

IV_RAISED_BY_OWN_UI Indicates whether the event originates from this UIBB.

CT_FIELD_USAGE Field usage to change. The field usage consists of the field attributes which might change at runtime (for ex­ample, enabled, and visible).

EV_FIELD_USAGE_CHANGED Indicates whether or not the field usage has been changed by this method.

CT_ACTION_USAGE Action usage to change. The action usage consists of the attributes related to actions which might change at runtime. For example, visibility.

EV_ACTION_USAGE_CHANGD Indicates whether or not the action usage has been changed by the feeder class.

CS_ADDITIONAL_INFO Contains additional information that might be changed.

GET_DEFAULT_CONFIG:

Call this if you want to have a default configuration. Use it to call pre-configured form configurations when a user starts the FPM configuration editor. This avoids the user, who uses a feeder class to create a form, having to create it from the beginning.

Parameter Description

IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_LIST_CONFIG: This object provides the API to create a default configuration.

CHECK_CONFIG:

Call this if you want to make your own application-specific checks on the configuration in the FPM configu­ration editor immediately before saving.

Parameter Description

IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_LIST_CONFIG: This object provides the API to read the configuration to be saved.

ET_MESSAGES A list of messages which shall be displayed in the mes­sage region.

3.2.1.14 Personal Object Worklist (POWL) Component

Definition

A generic design template for displaying data in a STANDARD POWL format.

180 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 181: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

It is implemented using the Web Dynpro component FPM_POWL_UIBB.

The information displayed in a Personal Object Worklist at runtime is determined by the settings in the POWL interface, IF_POWL_FEEDER.

You use this design template in application-specific views (UIBB) when you want to display data in a worklist format. You determine the concrete display of the data in a worklist when you configure the Web Dynpro component FPM_POWL_UIBB.

NoteThis documentation focuses on the POWL component within FPM, and not specifically on POWL configuration. For more information on POWL configuration, see the SAP NetWeaver Library.

Structure

A POWL component is comprised of the following objects:

● Master ListThe POWL component, FPM_POWL_UIBB, can be configured as a master list within any floorplan.

● Detail ViewAll FPM UIBBs and GUIBBs can be configured as a detail view.

The detail view participates seamlessly in the FPM event loop.

Integration

You can configure a POWL component using the FPM configuration editor, FLUID.

In FLUID, you can configure the following properties of this component, as outlined in the table below:

FIELD NAME DESCRIPTION

Application ID The POWL Application ID that is maintained in the POWL Cockpit. It is a mandatory parameter.

Active Query Name The query that is activated on load of the application. Data is selected from existing active queries in the POWL back-end system.

Merge Query Selection Parameters Sets all the query selection parameters of all queries with the value of Overwrite Values for Criteria.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 181

Page 182: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

FIELD NAME DESCRIPTION

Overwrite Values for Criteria A query selection parameter for all active POWL quer­ies. If the checkbox for the field Merge Query Selection Parameters is selected, the value in Overwrite Values for Criteria is applicable for all queries; otherwise, the value is applicable to the default query only.

Use POWL Delta Rendering Enhances the browser performance during rendering.

Refresh All Queries Refreshes all active POWL queries registered for this application on every load of the FPM application.

Refresh Query on Load Refreshes the default active query on load of the appli­cation.

Application Server Group Use these parameters to set the details of the server group.

Theme Allows you to select the theme supported by POWL. The available options are Object Worklist and Workflow Worklist.

Configuration Name The default POWL configuration provided by FPM.

Further properties of the POWL component can be edited in the standard Web Dynpro editor by choosing Configure.

The POWL Component in FPM

With the FPM configuration editor, FLUID, you can configure a POWL component as a UIBB. Depending on the floorplan, you can configure a POWL component as a master view in the following ways:

● in a subview of an Object Instance (OIF) floorplan● in a main step or a substep of a Guided Activity (GAF) floorplan● in a section of an Overview Page (OVP) floorplan● in a Tabbed component in a master UIBB● in a Tabbed component in a tab UIBB● in a dialog box

182 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 183: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.14.1 Configuring a POWL Component in FPM

Context

To configure a POWL component, complete the following steps:

Procedure

1. Run the application, and launch FLUID, the FPM configuration editor, in configuration mode (development mode).

2. Add the POWL UIBB.

1. On the <Floorplan> Schema panel, select the place where a new POWL UIBB is to be added.2. Choose the Add UIBB button, and select POWL Component. The following values are inserted

automatically by the system to identify it as a POWL component:

○ Component: FPM_POWL_UIBB○ Window Name:POWL_WINDOW

3. Enter a configuration name. This is a mandatory field if you want to be able to configure the POWL UIBB. It is not necessary to enter an existing configuration; you can create a new configuration in the next steps.

4. (Optional) Open the Attributes panel to display the attributes of the UIBB. Edit the remaining attributes such as Location, Container Stretching, Sequence Index and Instance ID.

5. Save your entries. If you are not using an existing POWL configuration, an error message appears to say your configuration does not exist. You will create this in the next steps.Note that you can also drag and drop an existing POWL component configuration from the Repositories panel onto the <Floorplan> Schema panel.

3. Configure the POWL UIBB

1. Select e the inserted POWL UIBB and choose the Configure UIBB button.2. In the Editor for the Web Dynpro ABAP Component Configuration screen, choose New to create your new

POWL configuration, and enter the description and package details in the dialog boxes that follow. The system opens the FPM configuration editor with the name of the new configuration displayed in the header.

3. Enter an existing Application ID. The input help selects existing configurations from the POWL Cockpit. When you enter an application ID, the system automatically updates the field Configuration Name with FPM_POWL_CONFIG, the default configuration provided by FPM.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 183

Page 184: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

NoteThe default configuration FPM_POWL_CONFIG has the following attributes enabled to ensure that the FPM configuration is compliant with the most recent guidelines:

Note○ Enable FPM○ Enable New UI○ Display ALV Dialog as Popup

You can choose your own POWL configuration and enable these attributes yourself. The remaining attributes are features that POWL itself offers.

4. Choose Configure. In the Editor for the Web Dynpro ABAP Component Configuration screen, choose Continue in Change Mode. The Web Dynpro default editor is opened.

5. In the Component-Defined assignment block, choose the confData node to display the POWL attributes.6. Save your changes.

3.2.1.14.2 The POWL Component at Runtime

The POWL UIBB provides you with FPM events which can be handled in the following ways:

● In the detail UIBBEvents are handled in the feeder class of the GUIBB, or in the Web Dynpro component which implements the IF_FPM_UI_BUILDING_BLOCK interface.

● In FPM`s CONF_EXITS methodsEvents are handled by the applications themselves as required.

The available events are described in the following table:

Event Name Description

FPM_GUIBB_POWL_ON_LEAD_SELECT This event is triggered by FPM when a lead selection event occurs in the POWL worklist. The event parame­ters supplied with this event are:

● POWL_SELECTED_LINE_INDEX (type integer)The value is the selected index in the POWL work­list.

● POWL_SELECTED_LINE_DATA (type ref to data)The data object refers to the data in the line which is lead-selected in the POWL worklist.

● POWL_CURRENT_TYPE (type POWL_type_ty)The type associated with the query on which the lead selection event has occurred.

184 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 185: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

FPM_GUIBB_POWL_ON_QUERY_SWITCH This event is triggered by FPM when there is a query switch operation performed by the user. The event pa­rameters supplied with this event are:

● POWL_SELECTED_QUERY_DATA (type POWL_query_sty)The value is the details about the newly selected query.

● POWL_CURRENT_TYPE (type POWL_type_ty)The type associated with the newly selected query. To handle the functionality in the detail UIBB, you can use just the information about the type of the newly selected query or all the details of the newly selected query

FPM_GUIBB_POWL_ON_NEW_QUERY This event is raised when you click the New Worklist button on the POWL component toolbar.

FPM_GUIBB_POWL_ON_CHANGE_QUERY This event is raised when you click the Change Worklist button on the POWL component toolbar.

Actions from Detail UIBB

The following actions can be triggered by the detail UIBB:

● Trigger a refresh of the POWL worklist.This is achieved by raising the FPM event POWL_REFRESH. The FPM framework informs the POWL to refresh the worklist.

● Request a follow-up from POWLThis is achieved by raising the FPM event POWL_FOLLOW_UP with the following event parameters: ADD_EVENT_DATA (type REF TO DATA) and EVENT_PARAMETERS (type POWL_NAMEVALUE_TTY).

NoteIt is not necessary to provide information about the detail component in the feeder class of the POWL (method IF_POWL_FEEDER~GET_DETAIL_COMP) as the UIBB, configured in FPM, acts as a detail for the POWL by reacting to the above FPM events.

NoteAt runtime, the actions Query Switch and Refresh List result in the removal of any previous lead selection in the table

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 185

Page 186: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.15 Search Component

Definition

A generic design template for displaying search queries and search results.

It is implemented using the Web Dynpro component FPM_SEARCH_UIBB and the Web Dynpro interface view SEARCH_WINDOW.

The information displayed in a search at runtime is determined by the feeder class assigned to the configuration of the Web Dynpro component FPM_SEARCH_UIBB.

Use

You use this design template when you want to have a search page or search function available. You determine the concrete display of the search component when configuring the Web Dynpro component FPM_SEARCH_UIBB.

186 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 187: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Structure at Runtime

The following figure shows how a search component might look at runtime:

Figure 17: Search Component at Runtime

A search component consists of the following areas:

● Search AreaThe search area contains all the fields and functions to specify the search criteria and start the search. The field labels, operators, and search fields of the search criteria (search statements) obtain their values from the feeder class at runtime. Search criteria may be grouped.You can hide the search criteria at runtime to provide more space on the screen for the search results.

● Search Results ListIf configured, the search results list is displayed below the search area.To display a search result, the columns and the initial sorting of the results list must be determined in the configuration. The search results list can be provided by a separate component altogether, a list component based on a configuration of the FPM_LIST_UIBB_ATS component.

● Saved SearchesIf you regularly search for certain items, save time by saving your searches. You can save any searches you define by choosing the Save Search As button. You can call up these searches again by choosing them from the Saved Searches dropdown list box.

The following buttons are always present at runtime:

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 187

Page 188: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● SearchWhen the cursor is positioned in a search value, the search will start when this button is pressed.

● Clear EntriesThis button clears all search fields, but does not reset the result list or the search statements (that is, attributes and operators remain unchanged, and lines are not removed). This button also clears the Save Search As field and Saved Searches field, but the Maximum Number of Results field remains unchanged.

● Reset to DefaultThis button rolls all search criteria back to the predefined default state (that is, the predefined combination of search criteria that was configured for the search). It clears all search fields as well as the Save Search As field, and also clears the search result list if the standard result list is used.

Editing the Structure at Design Time (FLUID)

You configure this component using the FPM configuration editor, FLUID.

At design time, the Preview panel in FLUID displays the Search component in a WYSIWYG style.

In the General Settings panel, you can specify settings applicable to the Search component as a whole.

In the Search UIBB Schema, you can specify attributes for the individual elements of the Search component, as well as adding search criteria, search groups, and adding a List component to display the search results list.

In FLUID, a search component is comprised of the following objects:

● Search AttributesThese are the attributes that a user can use to build up a search query, e.g. cost center, personnel number or area code, etc. Each search attribute has a certain ABAP data type. From this ABAP data type, a particular meta type is derived. The existing predefined meta types are: text, alpha numeric, numeric, date, enumeration, and Boolean.The following table shows the mapping in the standard delivery:

ABAP Data Type Meta Type

Character or string Text

Char or string with 2 values in domain Boolean

Char or string with more than 2 values in domain Enumeration

Numeric, integer, packed, float, hexadecimal Numeric

Date, time Date

Others Text

It is possible to overwrite the standard mapping by using the field description in the feeder class.

● Search OperatorsThese are operators such as is, is greater than, or is between that the user can combine with search attributes in order to build up the query. Each search attribute gets a default set of search operators assigned. The content of that set depends on the meta-type of the search attribute. The table below shows the search operators that are available for the different search attribute meta-types.

188 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 189: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The set of search operators can be modified in the feeder class (see later in this section):

Meta Type/Property Search Operators

Text (TE) Is (01), is not (02), is empty (03), contains (05), starts with (04), is not empty (23)

Alpha numeric (AN) Is (06), is not (07), is empty (03), is not empty (23), contains (05), is between (10), is greater than (08), is less than (09), is greater than or equal to (19), is less than or equal to (20)

Numeric (NU) Is (06), is not (07), is empty (03), is not empty (23), is between (10), is greater than (08), is less than (09), is greater than or equal to (19), is less than or equal to (20)

Date (TD) Is (01), is not (02), is between (10), is earlier than (11), is later than (12), is earlier than or on (21), is later than or on (22)

Enumeration (EN) Is (01), is not (02), is empty (03), is not empty (23)

Boolean (BO) Is (01)

NoteThere is an additional operator is similar to (24). This operator is not in the default set of operators; it can only be explicitly added in the field_description of a search attribute (see later in this section). The constants for these operators are defined in the interface IF_FPM_GUIBB_SEARCH, attribute GC_OPERATORS.

● Search ValuesThese are the values that are used for the search. There is one input field where the user can enter a value. However, if the user chooses the search operator is between two input fields are displayed in order to build up a range. For the operator is empty no input field is displayed.

● Search RowA search row is a combination of one search attribute, plus one search operator, plus one search value (or two in the case of a range).

● Search QueryA search query consists of one or several search rows.

For more information on the attributes of this component in FLUID, choose Field Help from the context menus in the system.

Feeder Class Properties of the Search Component

In the feeder class of this component, the following properties can be determined:

● Assignment of multiple search values for one search criterionThe application can use the feeder class to define for a search criterion whether a user can enter multiple search values at once into a search line. This simplifies, for example, the structure of a search for the

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 189

Page 190: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

qualifications an applicant must fulfill. Instead of defining a separate search line for each individual qualification (such as English = fluent, work experience = 3 years), the user can now merge all of the qualification characteristics into one search line. The user does this with a selection box provided by the application. You can open this selection box using the Edit button.

● Free text searchUsing the feeder class, the application can define whether a free-text search is possible in the application. If a free-text search is enabled, the system reserves the top search line in the search dialog box for the free-text search. In the standard system, three more search lines are available for additional search criteria. In the search dialog box, the user can choose how the search works with the entered free text.

● Exclude CriteriaThe search query can be enhanced by using criteria to exclude certain records from the results list. If an application uses the exclude criteria, an Add Criteria To Exclude hyperlink is visible under Search Criteria during runtime, and an Exclude Criteria dropdown list is visible in the General Settings panel in FLUID, the FPM configuration editor. You can use this dropdown list to enable or disable the Exclude Criteria hyperlink that appears at runtime.

● Saved SearchesThe feeder class determines whether or not the Saved Searches or Save Search As buttons are displayed at runtime.

● Search OperatorsWhich search operators are permitted for each field label is determined in the feeder class.

3.2.1.15.1 Enter, Reset, and Clear Buttons

Enter: When the cursor is positioned in a search value the search will start when pressing enter.Clear: The Clearbutton clears all search fields, but does not reset the result list or the search statements (that is, attributes and operators remain unchanged, and lines are not removed).The Clear button also clears the Save Search As field and Saved Searches field, but the Maximum Number of Results field remains unchanged. Reset: The Reset button rolls all search criteria back to the predefined default state (that is, the predefined combination of search criteria that was configured for the search). Reset Page clears all search fields as well as the Save Search As field. Reset Page also clears the search result list if the standard result list is used.

3.2.1.15.2 Defining a Results List for the Search Component

After executing a search using a Search component, the results must be displayed in a results list.

Context

You can choose from the following alternatives when defining a result list:

● Use a separate List ATS component (Recommended)You can do either of the following:

190 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 191: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

○ Use the Composite Search (Recommended)You can add and configure a List ATS component directly in FLUID within the Search UIBB. Use the Add List UIBB button on the toolbar of the Search UIBB Schema panel to do this. In the General Settings panel of the List ATS UIBB, there is a field Table Is Search Result List. If this is selected, then the visible row count is changed to 10. This field is automatically selected if you create the List ATS UIBB in the configuration editor of the Search UIBB.

○ Create a separate List ATS component in the floorplanYou must implement the reset functionality, and you are also responsible for the communication between the Search UIBB and the results list. You can use wiring, for example, for this communication.

● Use the standard result list from the Search UIBBThis list is very simple; it has no toolbar. If you want to use this list, define the parameters EO_FIELD_CATALOG_RESULT and ET_FIELD_DESCRIPTION_RESULT in the method GET_DEFINITION.The reset functionality works automatically.

NoteThe List component used in this method is the original List component which has now been superseded by the List ATS component. The List ATS component offers more in-built features such as sorting and filtering.

Related Information

List ATS Component [page 140]

3.2.1.15.3 Refining the Search Results List using Exclude Criteria

When you define search statements, you can use the Exclude Criteria feature to refine and reduce the search results list.

Enabling Exclude Criteria

You can enable Exclude Criteria in the FPM configuration editor, FLUID, in the General Settings panel for the Search component. You have the following options for the Exclude Criteria field:

● Enabled (and Disabled)● Defined by Feeder

The feeder class of the Search component can activate this feature using method GET_DEFINITION, parameter ES_OPTIONS, and attribute ALLOW_EXCLUDE_CRITERIAS = ABAP_TRUE.

When Exclude Criteria is enabled, the Add Criteria to Exclude link appears on the search screen at runtime. When this link is clicked, a new Exclude Criteria area appears on the screen.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 191

Page 192: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Defining the Criteria for Exclude Criteria

Once Exclude Criteria is enabled, you can define in the Search feeder class which search criteria are displayed in the Exclude Criteria area at runtime. You define this in the feeder class method GET_DEFINITION as follows:

● If you define nothing, then all search criteria are displayed in the Exclude Criteria area.● If you do not want to display a particular search criterion in the Exclude Criteria area, you must set the

following value in the field description of the feeder class method IF_FPM_GUIBB_SEARCH->GET_DEFINITION for this search criteria :

ls_descr_attr-exclude_criteria = if_fpm_guibb_constants=>gc_use_as_excl_search_crit-use_not_as_excl_crit

When the search is executed, all results found by the Exclude Criteria area are removed from the overall search results list before the search results list is displayed.

3.2.1.15.4 Dependent Searches

This feature relates to the OVS (Object Value System) value help in the Search component. You can influence the content of the F4 value help dialog box, based on what is currently selected for the search attributes on the screen.

For example, a user selects France from the dropdown list in the search criterion Country at runtime; accordingly, the search criterion City should only display cities in France in its dropdown list.

To activate this feature, you must implement the OVS interface IF_FPM_GUIBB_OVS_SEARCH.

This interface contains the method SET_CURRENT_SEARCH_CRITERIA. It indicates what is currently selected in all rows of the search criteria before an OVS round-trip is started.

You can find the following example in the system:

Table 19:Component Name

WD application configuration: FPM_TEST_DEP_SEARCHES

Search component configuration: FPM_SEARCH_TEST_DEP_1

Search Feeder class: CL_FPM_TEST_SEARCH_DEP

192 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 193: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.15.5 Grouping Search Criteria

Search criteria in a Search component can be grouped together into a Search Group, allowing for improved organization of the data as well as the screen space.

The following screenshot shows an example of search criteria grouped together into Search Groups (note that a Search Group can be expanded and collapsed):

Figure 18: Search Groups

Defining a Search Group

A Search Group is defined in the FPM configuration editor, FLUID.

To do this, proceed as follows:

1. Choose the Add Search Group button in the Search UIBB Schema panel, as the following screenshot shows, and edit the Standard Attributes as required.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 193

Page 194: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Figure 19: Search UIBB Schema Panel2. Assign a Search Criteria element to the Search Group using drag-and-drop in the Search UIBB Schema panel.

Grouping Search Attributes

You can further organize your groups by grouping the individual search attributes (fields) together. For example, in the first screenshot above, if you had several Currency fields displayed, you could also group them together under a collapse/expand icon.

To do this, you must select the Group Same Criteria field in FLUID (in the General Settings panel).

For more information, see the system text for this field.

194 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 195: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.15.6 Using Multi-Value Fields

Multi-value (MV) fields provide the end-user with the opportunity to define his or her own input field containing multiple input data.

Context

The different input values are entered by the end-user in a dialog box. This data is formatted by the FPM, and is displayed on the search screen, as the screenshot below illustrates:

The application defines the dialog box which the users use to enter the multi-value data. An example of such a dialog box is shown below:

To use such a multi-value field, the application developer must perform the following steps:

NoteYou can use the following example in the system:

Web Dynpro application configuration: FPM_TEST_ADV_SEARCH_CONF

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 195

Page 196: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Search UIBB component configuration: FPM_TEST_ADVANCED

Web Dynpro component of dialog box: FPM_TEST_MULTIPLE_DIALOG

Procedure

1. In method GET_DEFINITION, define a field (type STRING) in the field catalog.

In our example, it is S_BUSINESS_PARTNER-REGION.

2. In method GET_DEFINITION, enter the attribute FIELD_DESCRIPTION- MULTI_VALUE_STRUCT for the MV criteria.This field is of type CL_ABAP_STRUCTDESCR. The components of this object are the input values of the dialog box. The simplest way to provide these fields is to create a flat DDIC structure containing the fields, and then get it using FIELD_DESCRIPTION-MULTI_VALUE_STRUCT ?= CL_ABAP_STRUCTDESCR=>DESCRIBE_BY_DATA( … ). You can make the field read-only by setting the parameter ES_OPTIONS-SET_MULTI_ATTR_TE_READ_ONLY to ABAP_TRUE.

3. Create a Web Dynpro component for the dialog box, and implement the interface IF_FPM_UI_BUILDING_BLOCK. Design the view with your input fields.

4. In the component controller of the WD component, define the context with your input fields.5. Map the context from the component controller to the view context.6. Open the FPM component configuration (in our example, FPM_TEST_ADV_COMP), and open the Navigation

panel to add a dialog box. The name of the dialog box must be concatenated in the following way: FPM_SEARCH_DIALOG_<CONFIG_KEY-CONFIG_ID>_<NAME OF MV ATTRIBUTE>. In our example, the name is: FPM_SEARCH_DIALOG_FPM_TEST_ADVANCED_REGION.

If you do not want to use the concatenated name for the dialog box ID, you can set the parameter ES_OPTIONS-USE_STD_DIALOG_MULTI_EDIT = ABAP_TRUE in the feeder class method GET_DEFINITION. Then you can use the dialog box ID FPM_SEARCH_STD_DIALOG instead of the concatenated ID.

7. When you close the dialog box, you must raise the FPM event IF_FPM_CONSTANTS=>GC_EVENT-CLOSE_DIALOG. In our example, this is done in the DIALOG_VIEW in the method ONACTIONSEND_CLOSE.

8. Implement the method PROCESS_EVENT in the component controller. Here, you can react on the FPM event IF_FPM_CONSTANTS=>GC_EVENT-CLOSE_DIALOG. You must create and raise the FPM event IF_FPM_CONSTANTS=>GC_EVENT-MULTIPLE_VALUE. With this event, you pass the multi-value data which was entered in the dialog box to the Search component. Set the following values for this event:

lo_event->MO_EVENT_DATA-> set_value( iv_key = if_fpm_guibb_search=>event_param_multi_name iv_value = <name of MV attribute> ). lo_event->MO_EVENT_DATA-> set_value( iv_key = if_fpm_guibb_search=>event_param_multi_struct iv_value = <data entered for MV attribute>.

In the Search component, the values passed by this event are automatically formatted. The separation between the two input fields from the dialog box is defined in ES_OPTIONS-MULTI_ATTR_SEPARATOR.

9. There is an option that allows the application, and not the Search component, to format the multi-value string. The application passes a formatted multi-value string table. This string table will be displayed in the Search component. The application passes this string table as an event parameter (IF_FPM_GUIBB_SEARCH=>EVENT_PARAM_MULTI_STRING_TABLE) of the event

196 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 197: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

IF_FPM_CONSTANTS=>GC_EVENT-MULTIPLE_VALUE. This can be done in the component controller, in method PROCESS_EVENT:

lo_event->MO_EVENT_DATA->set_value( EXPORTING iv_key = if_fpm_guibb_search=>event_param_multi_string_table iv_value = <name of string table with formatted values>).

10. Check the FPM event IF_FPM_CONSTANTS=>GC_EVENT-OPEN_DIALOG in the method PROCESS_BEFORE_OUTPUT of the component controller of your MV Web Dynpro component. The event parameters contain the input of the multi-value field in the Search component. You need this data to fill the input fields of your dialog box correctly. Reading of the event parameters is done in the following way:

io_event->MO_EVENT_DATA->get_value( EXPORTING iv_key = if_fpm_guibb_search=>event_param_multi_name IMPORTING ev_value = <name of multi value attribute>).io_event->MO_EVENT_DATA-> get_value( EXPORTING iv_key = if_fpm_guibb_search=>event_param_multi_struct IMPORTING er_value = <values of multi-value attribute>).

In our example, this is done in the method PROCESS_BEFORE_OUTPUT of the component controller in the WD application FPM_TEST_MULTIPLE_DIALOG.

3.2.1.15.7 Search Attributes with Conversion Exits or Range Conversion

The data displayed on a user interface is often stored in a different format by the system in internal tables. Conversion exits consist of two function modules which take care of the transformation of the data to and from the internal tables to the UI. Range conversions carry out a similar function to conversion exits, but act on a range of data as opposed to single values.

If the data element of a search attribute has a conversion exit, developers must distinguish between an internal and an external format for the search value. To do this, developers can use the option USE_EXTERNAL_FORMAT in the feeder method GET_DEFINITION

NoteConversion exits are defined at domain level. To check which conversion exit a data element is using, display the screen for the domain of the particular data element, and check the Conversion Routine field. If there is also a function module with a name in the following format, CONVERSION_EXIT_<exit_name>_RANGE_I, then the search attribute also has a range conversion.

Examples of both coversion exits and range conversions are provided in the following sections.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 197

Page 198: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.15.7.1 Conversion ExitsExamples of existing conversion exits.

ExampleConversion Exit ALPHA

The ALPHA conversion is used particularly with account numbers. During conversion from the external to the internal format, the system checks to see if input in the input field is purely numeric, or whether it contains spaces before or after the numbers. If it is purely numeric, then the number string is inserted right-justified in the display output field, and all spaces to the left of the value are filled with zeros. If the input is not purely numeric, it is inserted in the display field from left to right and all extra spaces are filled with blanks.

TipSee the data element ADRNR in the system for an example of a data element with conversion exit ALPHA.

This is detailed in the tables below (note that both input and output fields are both eight characters in length).

Table 20: Function Module CONVERSION_EXIT_ALPHA_INPUTInput (External Format) Output (Internal Format)

'1234 ' 00001243

'123*' 123*

'ABDC ' ABCD

' ABCD ' ABCD

' 1234 ' 00001234

Table 21: Function module CONVERSION_EXIT_ALPHA_OUTPUT:Input (Internal Format) Output (External Format)

00001243 1234

123* 123*

ABDC ABCD

ABCD ABCD

001234 123400

ExampleConversion Exit ISOLA (Language)

The ISOLA conversion exit converts internal (length 1) to external (length 2) language formats. Table T002 (Language Keys) is used for the transformation.

NoteSee the data element SPRAS is an example of a data element with conversion exit ISOLA.

198 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 199: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Table 22: Function Module CONVERSION_EXIT_ISOLA_INPUTlnput T002-LAISO (External Format) Output T002-SPRAS (Internal Format)

DE D

TH 2

ES S

Table 23: Function Module CONVERSION_EXIT_ISOLA_OUTPUT:lnput T002-SPRAS (Internal Format) Output T002-LAISO (External Format)

D DE

2 TH

S ES

Figure 20: Table T002 (Language Keys)

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 199

Page 200: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.15.7.2 Range Conversion

Often, a single, external statement such as 'Language starts with A' results in a range containing several rows of data (for example, LANGUAGE = AR and LANGUAGE = AF).

The following examples detail the use of two range conversions, ALPHA and ISOLA.

ExampleRange Conversion: ALPHA

Table 24: Function module CONVERSION_EXIT_ALPHA_RANGE_I:externlnput RANGE_EXT (External Format) Output RANGE_INT (Internal Format)

I CP 1* I CP 1*

I CP 01*

I CP 001*

I CP 0001*

I CP 0001*

I CP 00001*

I CP 0000001*

I CP 00000001*

I BT 56 123 I BT 00000056 00000123

ExampleRange Conversion: ISOLA

Table 25: Function module CONVERSION_EXIT_ISOLA_RANGE_I:

externlnput RANGE_EXT (External format) Output RANGE_INT (Internal format)

I EQ DE I EQ D

I CP E* I EQ 9

I EQ E

I EQ G

I EQ S

I BT SR TH I EQ 0

I EQ 2

I EQ V

200 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 201: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

externlnput RANGE_EXT (External format) Output RANGE_INT (Internal format)

I CP A* I EQ A

I EQ a

NoteIn both examples, both input and output fields are both eight characters in length.

Deciding which Format to Use

The application developer must decide if the internal or the external format of a value is passed in table FPMGB_T_SEARCH_CRITERIA in the feeder class. This can be achieved using the parameter USE_EXTERNAL FORMAT in ES_OPTIONS of method GET_DEFINITION, as detailed below:

● USE_EXTERNAL_FORMAT = ABAP_FALSEIn this case, the search values are rendered in the external format at the front-end. If an internal format is entered this will be automatically changed to the external format.In the feeder class methods the values will be passed in the internal format, for example, in table IT_SEARCH_CRITERIA in feeder class method PROCESS_EVENT. A range conversion exit will not be considered.

Table 26: Example: ALPHA, Operator “is”Input in Search Value Field Displayed in Search Value Field

(External Format)IT_FPM_SEARCH_CRITERIA-LOW(Internal Format)

000012 12 00000012

12 12 00000012

ABC ABC ABC

123* 123* 123*

Table 27: Example ISOLA, Operator “is”Input in Search Value Field

Displayed in Search value field (External For­mat)

IT_FPM_SEARCH_CRITE­RIA-LOW(Internal Format)

DE DE D

D DE D

S ES S

2 TH 2

D* Error: Language D* not in System -

● USE _EXTERNAL_FORMAT = ABAP_TRUE

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 201

Page 202: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

In this case, the search values are rendered as character fields with the output length defined in the dictionary at the front-end. In the feeder class methods, the values will also be passed in the external format, for example, in table IT_SEARCH_CRITERIA in feeder class method PROCESS_EVENT.In the feeder class method GET_DATA, data can be supplied for attributes in internal or external format (set the parameter EXT_PRESENTATION accordingly). In the feeder class methods, for example PROCESS_EVENT, the data is passed in external format (since there might be no simple internal format for the values that the user entered).Attributes with range conversion: A range conversion exit will be executed in the conversion method for FPM operators to ABAP options (see the section Conversion of FPM Attributes to ABAP Options).

Table 28: Example: ALPHA, Operator “is”Input in search value field Displayed in Search Value Field

(External Format)IT_FPM_SEARCH_CRITERIA-LOW (External Format)

000012 12 12

12 12 12

ABC ABC ABC

123* 123* 123*

Table 29: Example ISOLA, Operator “is”Input in search value field Displayed in Search Value Field

(External Format)IT_FPM_SEARCH_CRITERIA-LOW (External Format)

DE DE DE

D DE DE

S ES ES

S TH TH

D* D* D*

3.2.1.15.8 Converting FPM Attributes to ABAP Options (and Vice-Versa)

Converting FPM Search Attributes to Web Dynpro ABAP Select Options

You can use the IF_FPM_GUIBB_SEARCH_CONVERSION interface to transform FPM search statements into ABAP options.

This interface is included as a parameter in the search feeder class methods FLUSH and PROCESS_EVENT.

TipThe search feeder class CL_FPMGB_SEARCH_SFLIGHT in the method PROCESS_EVENT provides an example of how to use this interface.

202 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 203: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

To convert FPM search statements into ABAP Options, complete the following steps:

1. Call method IF_FPM_GUIBB_SEARCH_CONVERSION~CREATE_ABAP_RANGE_REF(…).This method creates data references for a range structure, and for a range table for a given search attribute.

2. With the data reference you have just created, call method IF_FPM_GUIBB_SEARCH_CONVERSION~FPM_ATTRIBUTE_INTO_ABAP_RANGE(…).This method converts the search data for a given search attribute into ABAP range tables that can be used in ABAP select statements. If the option USE_EXTERNAL_FORMAT = ABAP_TRUE, a range conversion is executed; otherwise a range conversion is not considered.

3. Use the range table that is returned in your ABAP select statement.

The following code example details the steps described above:

DATA: lr_range_tab_ref TYPE REF TO data.

FIELD-SYMBOLS: <fpmgb_s_search_criteria> TYPE fpmgb_s_search_criteria, <sel_opt_carrid > TYPE table.

LOOP AT it_fpm_search_criteria ASSIGNING <fpmgb_s_search_criteria>. AT NEW search_attribute.* create data referene for a ABAP range table io_search_conversion->create_abap_range_ref( EXPORTING iv_search_attribute = <fpmgb_s_search_criteria>-search_attribute IMPORTING er_range_tab_ref = lr_range_tab_ref ).

* convert search data into ABAP select statements, i.e. fill * lr_range_tab_ref io_search_conversion->fpm_attribute_into_abap_range( EXPORTING iv_search_attribute = <fpmgb_s_search_criteria>-search_attribute IMPORTING et_range_tab_ref = lr_range_tab_ref ). ENDAT.

* for each search attribute fill table with ABAP select options CASE <fpmgb_s_search_criteria>-search_attribute. WHEN 'CARRID'. ASSIGN lr_range_tab_ref->* TO <sel_opt_carrid>. ENDCASE.ENDLOOP.

* Perform ABAP select statementSELECT * FROM sflight INTO TABLE mt_sflight UP TO iv_max_num_results ROWS WHERE carrid IN <sel_opt_carrid>.

Converting ABAP Options to FPM Attributes

You can use method IF_FPM_GUIBB_SEARCH_CONVERSION~ABAP_RANGE_INTO_FPM_ATTRIBUTE(…) to convert ABAP select options into FPM search criteria.

For more information, see Defining Selection Criteria with Select Options in the SAP Help Portal (sap.help.com).

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 203

Page 204: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.15.9 Interface: IF_FPM_GUIBB_SEARCH

Description of methods in the interface implemented by the feeder classes of Search components.

Table 30: Methods of IF_FPM_GUIBB_SEARCH InterfaceGET_DEFINITION:

Allows the feeder class to provide all necessary information for configuring a search: a list of available search attributes, and, optionally, a list of columns for the results table.

Parameter Description

EO_FIELD_CATALOG_ATTR Is of type CL_ABAP_STRUCTDESCR table. The compo­nents of the table are the available search attributes. The simplest way to provide a field catalog is to create a flat DDIC structure containing all the search attrib­utes, and then get the field catalog using the following construct:

EO_FIELD_CATALOG_ATTR ?= CL_ABAP_STRUCTDESCR=>DESCRIBE_BY_NAME( <NAME OF DDIC STRUCTURE>)

The Search GUIBB supports only flat structures. When using deep structures, only the highest level fields are available.

204 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 205: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DEFINITION:

Allows the feeder class to provide all necessary information for configuring a search: a list of available search attributes, and, optionally, a list of columns for the results table.

Parameter Description

ET_FIELD_DESCRIPTION_ATTR Optional. Here you can provide additional information for search attributes, for example F4 helps, or input field data format. You can also change the set of search operators that are assigned to a search attribute. The following table describes the available attributes:

Attribute Description

NAME Name of the search at­tribute.

IS_OF_TYPE Overwrite the standard meta type.

TEXT Text for the search crite­ria that is displayed.

INCLUDE_OPERATORS Add operators to the standard set of operators.

EXCLUDE_OPERATORS Exclude operators from the standard set of opera­tors.

ENUMERATION Value set for an enumera­tion search criteria. The dropdown is always ren­dered as ‘nullable’; this means an empty entry in the value set is created in addition.

It is possible to use an ini­tial value as key but it is recommended not to do this. It is not allowed to use the operator IS_BETWEEN if the value set contains the initial value as key. In this case, the NULL and the initial value for the low and high field cannot be handled properly.

DDIC_SHLP_NAME DDIC F4 help.

OVS_NAME OVS name.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 205

Page 206: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DEFINITION:

Allows the feeder class to provide all necessary information for configuring a search: a list of available search attributes, and, optionally, a list of columns for the results table.

Parameter Description

Attribute Description

NULL_AS_BLANK Displays zeros as blanks.

SIGN_POS Sign left or right.

CONDENSE Compress input.

DATE_FORMAT Date format.

SHORT_TIME Do not display seconds.

MULTI_VALUE_STRUCT Structure of a multi-value field.

EXCLUDE_CRITERIA If the Exclude Criteria area is enabled, this value is evaluated. If the value is IF_FPM_GUIBB_CONSTANTS=> GC_USE_AS_EXCL_SEARCH_CRIT- USE_NOT_AS_EXCL_CRIT, then this search criteria is not displayed as an ex­clude search criteria (see below for more informa­tion).

FREE_TEXT_SEARCH This attribute is a free text search.

WD_VALUE_HELP WD value help.

MAX_1_VALUE This criteria is a singleton, that is, it can be used just once in the selection.

DEFAULT_OP Default operator for the search criteria. If there is one defined in the config­uration, the default oper­ator from the configura­tion is used.

DEACTIVATE_VALUE_HELP

No value help is dis­played.

VALUE_SUGGEST Value suggest feature of Web Dynpro input field.

206 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 207: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DEFINITION:

Allows the feeder class to provide all necessary information for configuring a search: a list of available search attributes, and, optionally, a list of columns for the results table.

Parameter Description

Attribute Description

MANDATORY This attribute is rendered without a minus sign. Mandatory attributes are listed before non-manda­tory attributes in the Search UIBB.

SUPPRESS_PATTERN_SEARCH

Suppresses the pattern search (*) with operator IS and IS NOT. If the user types in ‘*’ with these op­erators a warning is dis­played.

SP_GROUP If you define Special Groups in ES_OPTIONS, you can enter here the Special Group ID for a search attribute. The FPM configuration editor, FLUID, groups the fields together, providing you with an easier method for finding fields.

INPUT_PROMPT This string is displayed as an input prompt in a free-text Search Criteria.

EO_FIELD_CATALOG_RESULT Optional. Contains the columns that are possible to choose from during configuration of the result table.

EO_FIELD_DESCRIPTION_RESULT Optional: Here you can provide additional information for the columns of the result table, e. g. the column text.

EV_RESULT_TABLE_SELECTION_MODE This parameter determines the selection mode of the result table, such single line selection, or multiple line selection. ( Constants CL_WD_TABLE => E_SELECTION_MODE).

ES_MESSAGE Messages that will be displayed on the error page.

EV_ADDITIONAL_ERROR_INFO Additional information about error messages.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 207

Page 208: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DEFINITION:

Allows the feeder class to provide all necessary information for configuring a search: a list of available search attributes, and, optionally, a list of columns for the results table.

Parameter Description

ES_OPTIONS Optional: Here you can adjust and overwrite the prop­erties for the Search UIBB, for example, modify stand­ard texts. The following table describes some of the available attributes:

Table 31:Attribute Description

APP_KEY_FOR_SAVING_SEARCHES

Configuration ID for saving a search.

If it is a space, the search variants are saved configu­ration-specific. Otherwise, this Configuration ID is used to save a search var­iant. This feature enables you to use the same Search UIBB in different Web dyn­pro application configura­tions, and lets you see the same search variants.

RAISE_EVENT_ON_ATTR_CHANGE

Raise event FPM_SEARCH_ATTR_CHANGED

RAISE_EVENT_ON_RESULT_LEAD_SEL

The FPM event FPM_RESULT_LEAD_SEL (constant IF_FPM_GUIBB_SEARCH => FPM_RESULT_LEAD_SEL) is only raised if there is a change of the lead selection in the standard result list.

FIXED_WIDTH_FOR_USE_IN_DIALOG

If the search UIBB is used in a dialog box, it should have a fixed width.

ALLOW_EXCLUDE_CRITERIAS

This flag is only evaluated if in the configuration editor in the General Settings panel, the attribute Exclude Criteria is set to Defined by Feeder. In this case, if

208 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 209: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DEFINITION:

Allows the feeder class to provide all necessary information for configuring a search: a list of available search attributes, and, optionally, a list of columns for the results table.

Parameter Description

Attribute Description

ALLOW_EXCLUDE_CRITERIAS = ABAP TRUE, the link for Exclude Search Criteria is displayed (for more infor­mation, see below).

SET_MULTI_ATTR_TO_READ_ONLY

Only for multi-value fields: The search value of a multi value field is set to read only.

MULTI_ATTR_SEPERATOR

Only for multi-value fields: The separator between two entries in the formatted string of a multi-value field.

PASS_INITIAL_SEARCH_ROWS

All current search criteria on the screen will be passed to the user in the feeder class, that is search criteria with initial input. The feeder method GET_DATA always gets all those search crite­ria in parameter CT_FPM_SEARCH_CRITERIA passed to it.

USE_STD_DIALOG_MULTI_EDIT

Only for multi-value fields: The standard dialog box ID FPM_SEARCH_STD_DIALOG(constant IF_FPM_GUIBB_SEARCH=> FPM_SEARCH_STD_DIALOG) is used for a multi-value field pop up.

USE_EXTERNAL_FORMAT

If this parameter is ABAP_FALSE, any range conversion of search attrib­utes is ignored. All attrib­utes are typed and transfer­red in internal format.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 209

Page 210: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DEFINITION:

Allows the feeder class to provide all necessary information for configuring a search: a list of available search attributes, and, optionally, a list of columns for the results table.

Parameter Description

ET_SPECIAL_GROUPS Special groups can be used for a grouping feature in FLUID. If the feeder class provides a special group ta­ble, it should assign each field in the field description table to a group in field SP_GROUP. At design-time, the FPM configuration editor groups the fields. This is an easier way to find fields in your field catalogue

GET_PARAMETER_LIST:

This method is called at design time, and allows you to define a list of the parameters that the feeder class supports. This list is used by the FPM configuration editor to provide the input fields for these parameters.

Parameter Description

RT_PARAMETER_DESCR Is returned from this method. It describes which pa­rameters are available. In field TYPE, the DDIC type needs to be entered.

INITIALIZE:

Called at runtime when the Search component is created.

Parameter Description

IT_PARAMETER Contains a list of the feeder class parameters, and the values for them specified in the configuration.

FLUSH:

The first feeder class method which is called during an event loop. This method is called whenever an FPM event is triggered (this includes all round trips caused by the Search component itself). Use it to forward changed Search data from the user to other components in the same application.

Parameter Description

IT_FPM_SEARCH_CRITERIA Contains the actual search criteria.

IV_MAX_NUM_RESULTS Contains the value for the maximum number of result objects.

IT_SELECTED_LINES_OF_RESULT Contains those lines within the result table that are cur­rently selected.

210 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 211: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

PROCESS_EVENT:

Called within the FPM event loop, this method forwards the FPM PROCESS_EVENT event to the feeder class. This method should be used for actually conducting the search. Before doing so, you should check for the ID IF_FPM_GUIBB_SEARCH=>FPM_EXECUTE_SEARCH event. This FPM event is raised as soon as the user presses the SEARCH button.

Parameter Description

IO_EVENT The FPM event which is to be processed.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 211

Page 212: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

PROCESS_EVENT:

Called within the FPM event loop, this method forwards the FPM PROCESS_EVENT event to the feeder class. This method should be used for actually conducting the search. Before doing so, you should check for the ID IF_FPM_GUIBB_SEARCH=>FPM_EXECUTE_SEARCH event. This FPM event is raised as soon as the user presses the SEARCH button.

Parameter Description

IT_FPM_SEARCH_CRITERIA The current search criteria. If the parameter ES_OPTIONS=>PASS_INITIAL_SEARCH_ROWS in method GET_DEFINITION is TRUE, then all search rows will be in this table. Otherwise, only the search rows where there is an input in the search value field will be included. For each search row, the attributes de­scribed in the following table are passed.

Table 32: Details for IT_FPM_SEARCH_CRITERIA (structure FPMGB_S_SEARCH_CRITERIA)Attribute Description

SEARCH_ATTRIBUTE Name of search attribute.

OPERATOR Current search operator.

LOW Search value in LOW field.

HIGH Search value in HIGH field; used with operator IS BETWEEN.

MULTI_VALUE_ATTR Multi values.

SIGN Include (I) or exclude (E) search criteria.

FREE_TEXT_SEARCH This attribute is a free text search.

IS_INITIAL_VALUE_EVALUATED

This value is ABAP_TRUE if something was entered in the LOW field. If the search criteria is a drop­down list box, and a value with an initial key was se­lected, then IS_INITIAL_VALUE_EVALUATED = ABAP_TRUE AND LOW IS INITIAL.

APPL_FORMATTED_MV_STRING_TABLE

Only for Multi-value fields: This parameter is used when the user formats the multi-value data. The

212 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 213: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

PROCESS_EVENT:

Called within the FPM event loop, this method forwards the FPM PROCESS_EVENT event to the feeder class. This method should be used for actually conducting the search. Before doing so, you should check for the ID IF_FPM_GUIBB_SEARCH=>FPM_EXECUTE_SEARCH event. This FPM event is raised as soon as the user presses the SEARCH button.

Parameter Description

Attribute Description

passed string table is dis­played in the search row.

EXT_PRESENTATION This parameter can only be set for search attrib­utes with a range conver­sion. For all other attrib­utes, the parameter is ig­nored. For more details, see the section Search Attributes with Conver­sion Exits or Range Con­version.

IV_RAISED_BY_OWN_UI Indicates whether the event was raised by the actual search UIBB, or by some other UIBB.

IV_MAX_NUM_RESULTS Indicates the maximum number of found objects to be displayed in the result table. Zero is allowed, and should display all search results.

IO_SEARCH_CONVERSION This interface should be used to transform FPM search statements into ABAP options. For details see the topic Conversion from FPM operators into ABAP options: In­terface IF_FPM_GUIBB_SEARCH.

ET_MESSAGES The feeder class may return messages via this parame­ter. As usual, the messages are displayed within the FPM message area.

EV_RESULT The result of the event processing. There are 3 possible values:

● ev_result = if_fpm_constants=>gc_event_result-OK

● ev_result = if_fpm_constants=>gc_event_result-FAILED

● ev_result = if_fpm_constants=>gc_event_result-DEFER

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 213

Page 214: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DATA:

Called within the FPM event loop, this method forwards the FPM PROCESS_BEFORE_OUTPUT event to the feeder class. The main purpose of this method is to transport data from the feeder class to the search UIBB. With this method, the user can also set initial data in the search UIBB. You must check the Event IDs CL_FPM_EVENT=>GC_EVENT_START, IF_FPM_GUIBB_SEARCH=>FPM_RESET_SEARCH, if_fpm_guibb_search=>fpm_execute_search, and pass the search results from the application to the search UIBB.

Parameter Description

IO_EVENT The FPM event which is to be processed.

IV_RAISED_BY_OWN_UI Indicates whether the event originates from this UIBB.

IT_VISIBLE_ATTRIBUTES Indicates which search attributes are currently visible on the UI.

IT_SELECTED_COLUMNS_OF_RESULT Indicates which columns have been configured for the result table.

IT_SELECTED_SEARCH_ATTRIBUTES Indicates which search attributes have been config­ured.

IO_SEARCH_CONVERSION This interface should be used to transform FPM search statements into ABAP options. For details see the chapter Conversion from FPM operators into ABAP op­tions: Interface IF_FPM_GUIBB_SEARCH.

ET_MESSAGES The feeder class may return messages through this pa­rameter, to be displayed in the Message Area.

EV_SEARCH_CRITERIA_CHANGED Informs the search UIBB whether the search criteria have been changed. If so then the search criteria on the screen will be updated accordingly.

ET_RESULT_LIST If the application chooses to let the search UIBB render the result table, the application must inform the search UIBB about the content of the result using this parame­ter (but only if the event ID is IF_FPM_GUIBB_SEARCH=>FPM_EXECUTE_SEARCH).

CT_FPM_SEARCH_CRITERIA Contains the current search criteria. All search criteria will be passed from FPM to the user, that includes search criteria with initial search values.

EV_RESULT_LIST_TITLE Sets a title for the standard result list.

EV_FIELD_USAGE_CHANGED Indicates whether the field usage has been changed by this method.

CT_FIELD_USAGE Field usage to change. The field usage consists of the field attributes which might change at runtime (for ex­ample, enabled, and visible).

214 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 215: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DEFAULT_CONFIG:

Call this if you want to have a default configuration. Use it to call pre-configured form configurations when a user starts the FPM configuration editor. This avoids the user, who uses a feeder class to create a search, having to create it from the beginning.

Parameter Description

IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_SEARCH_CONFIG: This object provides the API to create a default configuration.

CHECK_CONFIG:

Call this if you want to make your own application-specific checks on the configuration in the FPM configu­ration editor immediately before saving.

Parameter Description

IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_SEARCH_CONFIG: This object provides the API to read the configuration to be saved.

Related Information

Search Attributes with Conversion Exits or Range Conversion [page 197]The data displayed on a user interface is often stored in a different format by the system in internal tables. Conversion exits consist of two function modules which take care of the transformation of the data to and from the internal tables to the UI. Range conversions carry out a similar function to conversion exits, but act on a range of data as opposed to single values.

Using Multi-Value Fields [page 195]Multi-value (MV) fields provide the end-user with the opportunity to define his or her own input field containing multiple input data.

3.2.1.16 Tabbed Component

Definition

A generic design template used specifically for displaying data in a master/detail format.

It is implemented using the Web Dynpro component FPM_TABBED_UIBB.

Unlike most of the generic UIBBs (GUIBBs), the Tabbed component has no feeder class.

Use

You use this design template to display data in a master/detail format. You could use the Tabbed component to simultaneously display a selection list of business objects, and the additional details of those business objects in

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 215

Page 216: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

tabs without changing the view. You determine the concrete arrangement of the selection list, detail views, and data when configuring the Web Dynpro component FPM_TABBED_UIBB.

Structure at Runtime

A Tabbed component consists of the following areas:

● The Master areaThis is usually (but does not have to be) one of the List components, allowing the end-user to select a row item whose details are then shown on individual tabs in the Details area

● The Details area (also known as the TAB area)This area consists of a number of tabs, each one showing specific details relating to the row item selected by the end-user in the Master area

● The Details Title areaAn area providing a title for the Details area.

The content of the Master area and the content of the tabs in the Details area are determined by separate Web Dynpro components, which you set when configuring the Web Dynpro component FPM_TABBED_UIBB.

NoteIf you do not set the Web Dynpro component for the Master area, only the tabs appear with their UIBBs.

Editing the Structure at Design Time (FLUID)

You configure this component using the FPM configuration editor, FLUID.

Although the Tabbed component is technically a UIBB, you use it for layout purposes. As such, when you edit this component using FLUID, you see settings that are usually available only for the floorplan components.

At design time, the Preview panel in FLUID displays the Tabbed component as two separate boxes; one box displays the configuration details of the UIBB selected for the Master area, and one box displays the tabs in the Details area. Each tab displays the configuration details of the UIBB it contains.

In the General Settings panel, you can specify settings applicable to the Tabbed component as a whole.

In the Tabbed UIBB Schema panel, you can add the Master area, and specify the type of UIBB to use there (usually a List UIBB). You can construct the Details area by adding tabs to which you add the UIBBs. Additionally, you can specify attributes for the individual elements of the Tabbed component.

For more information on the attributes of this component in FLUID, choose Field Help from the context menus in the system.

Related Information

Changing the Tabbed Component Dynamically at Runtime [page 217]

216 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 217: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

You may rename, add and remove tabs or child-UIBBs (or embedded UIBBs) from your Tabbed component during runtime.

3.2.1.16.1 Changing the Tabbed Component Dynamically at Runtime

You may rename, add and remove tabs or child-UIBBs (or embedded UIBBs) from your Tabbed component during runtime.

Context

To do so, proceed as follows:

Procedure

1. Choose an application-specific Web Dynpro component and add the Web Dynpro interface IF_FPM_TABBED_CONF_EXIT to the Implemented Interfaces tab of your Web Dynpro component. This is one of the Web Dynpro components that provide you with a child UIBB.

2. Save and activate the newly added interface.You want to rename a tab in your code at runtime. To do this, you must raise your own FPM event (for example, CHANGE_TAB_NAME) as the sample code below shows:

DATA: lo_fpm TYPE REF TO if_fpm, lo_event TYPE REF TO cl_fpm_event. lo_fpm = cl_fpm=>get_instance( ). lo_event = cl_fpm_event=>create_by_id( 'CHANGE_TAB_NAME' ). lo_event->MO_EVENT_DATA->set_value( iv_key = 'ID' lo_event->MO_EVENT_DATA->set_value( iv_key = 'NAME' iv_value = lv_tab_name ). lo_fpm->raise_event( io_event = lo_event ).

3. In the component controller, implement the method OVERRIDE_CONFIG_TABBED.To continue with the above example of renaming a tab, implement the following sample code:

CASE io_tabbed->mo_event>mv_event_id.WHEN 'CHANGE_TAB_NAME'.DATA lv_name TYPE string.DATA lv_id TYPE string.io_tabbed->mo_event>MO_EVENT_DATA->get_value( EXPORTING iv_key = 'ID'IMPORTING ev_value = lv_id ).io_tabbed->mo_event->MO_EVENT_DATA->get_value( EXPORTING iv_key = 'NAME'IMPORTING ev_value = lv_name ).io_tabbed->rename_tab( iv_tab_id = lv_id iv_new_name = lv_name ).

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 217

Page 218: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.1.16.1.1 Hiding Master or Detail UIBBs at Runtime

It is possible to hide the UIBBs in the Master or Details areas in a Tabbed component at runtime.

You can use the following methods in the IF_FPM_TABBED interface to hide UIBBs contained in the Master or Detail areas of a Tabbed Component at runtime:

● SET_MASTER_UIBB_HIDDENUse this to hide or unhide the UIBB in the Master area in a Tabbed component. The application must pass the UIBB information (Component, Interface View, Configuration Name) to FPM, along with information about whether the UIBB should be set to visible or invisible.

● SET_TAB_UIBB_HIDDENUse this to hide a UIBB in the Details area in a Tabbed component. Along with the UIBB details. The flag to set it as visible or invisible should be sent to FPM.

NoteEven though all Master UIBBs can be hidden or removed, the last Details UIBB on a tab cannot be hidden or removed.

3.2.1.16.1.2 Changing the Details Title Area at Runtime

The Details Title area of a Tabbed component can be changed at runtime using an extended application configuration controller (AppCC).

You can implement an extended AppCC by implementing IF_FPM_TABBED_CONF_EXIT_E either for a Web Dynpro component or for an ABAP class.

The extended AppCC provides a feature to check the name of the Master Detail column in the List component acting as the Master UIBB, and change the content of the Details Title area with the method CHANGE_DETAIL_AREA_TITLE.

3.2.1.17 Visual Business Component

A generic design template for displaying data in an interactive graphic format.

The Visual Business ("VisBiz") component allows you to embed SAP Visual Business applications into your FPM applications.

NoteSAP Visual Business is an existing user interface technology that visualizes data from SAP and external data sources on a single screen. Visual Business applications not only combine different types of content, but also include interactive graphics that visualize and combine enterprise data with geographical or three-dimensional real-world scenes.

For more information on SAP Visual Business, search for Visual Business in the SAP Help Portal (help.sap.com).

218 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 219: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The VisBiz component is implemented using the Web Dynpro component FPM_VISBIZ_UIBB. The information displayed in this component at runtime is determined by the feeder class assigned to the configuration of the Web Dynpro component FPM_VISBIZ_UIBB. However, you can determine the concrete display of the data in this component when you configure this component in the FPM configuration editor, FLUID.

Implementation Considerations

If you use SAP solutions or applications that integrate Visual Business applications, you must install SAP Visual Business. For use in FPM applications, you must install at least SAP Visual Business version 2.1.

This component uses the Web Dynpro ABAP HTML Island element. Therefore, applications containing the Visual Business Component must be run in a browser supporting HTML5. For more information, see the SAP Help Portal (help.sap.com).

Always run these applications in the Standards mode of the browser. For more information, see UI Control Rendering in Standards Mode in the SAP Help Portal under Developing Web Dynpro ABAP ApplicationsReference .

VisBiz Component at Runtime

The screenshot below shows an FPM application at runtime, incorporating a VisBiz component (in this example a geomap) and a List component. When the application is first opened, the VisBiz component is configured to show a default map type and location. When the user chooses a destination city in the List component, the application zooms into that city at a predefined zoom level. Visbiz applications are divided into geomap applications and 3D scenarios.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 219

Page 220: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Figure 21: Visual Business Component at Runtime (showing a Geomap Application)

Depending on how the application is configured, the following objects might be displayed:

● Navigation ControlAllows you to zoom in on the graphic for greater detail, to move around, and to rotate and tilt the graphic.

● ToolbarAllows you to navigate backwards and forwards, to select objects on the graphic, and to zoom in on an area for greater detail.

● Visualization ObjectsThese represent objects from business scenarios, for example warehouses, factories, revenues, spending power. The actual data behind these objects is provided by the backend systems.

● Quick InfoAppearing when you select a specific visualization object, quick info provides you with additional information about the selected object.

If personalization is enabled, you can personalize the map at runtime using the context menus.

Editing the Component in Design Time

In transaction SM34 (View Cluster Maintenance), you can find all the SAP Visual Business application data in view cluster VBIVC_APPDEF. The SAP Visual Business application is a collection of map stacks; layers of maps are grouped together to form a map stack.

You configure this component using the FPM configuration editor, FLUID.

220 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 221: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

For this component, FLUID displays only the General Settings panel. Here you can configure the starting position of the map that is displayed when the application is first opened; you can enter latitude and longitude values, as well as the angle at which the map is tilted and rotated.

As a minimum, the name of the feeder class and the VisBiz application must be entered in FLUID. The following optional fields can remain empty (FPM fills them with default values):

● Service Provider Class● UI Adapter Class● Application Class

You can also create your own class (inheriting from the VisBiz classes) if the standard behavior does not fit your needs. The standard classes are:

● Application Class: CL_FPM_VBI_GEOMAP_APPLICATION for a geomap application, CL_FPM_VBI_APPLICATION for 3D scenario

● Adapter Class: CL_VBI_CONTROL_ADAPTER_GEO for a geomap application, CL_VBI_CONTROL_ADAPTER for 3D scenario

● Service Provider Class: CL_VBI_SERVICE_PROVIDER

Additionally, you can define which location should be displayed when the map is opened at runtime (start position); no start position is the default setting. If field values are not defined by application development, default values from SAP Visual Business are used.

For more information about the individual fields in the General Settings panel, choose Field Help from the field context menus in the system.

Related Information

Creating a VisBiz Configuration Dynamically [page 221]A summary of the methods of interface IF_FPM_GUIBB_VISBIZ_CONFIG which you can use to create a Visual Business(VisBiz) configuration at runtime.

Interface: IF_FPM_GUIBB_VISBIZ [page 222]Description of methods in the interface implemented by the feeder classes of Visual Business (VisBiz) components.

3.2.1.17.1 Creating a VisBiz Configuration Dynamically

A summary of the methods of interface IF_FPM_GUIBB_VISBIZ_CONFIG which you can use to create a Visual Business(VisBiz) configuration at runtime.

This interface is used in feeder class methods GET_DEFAULT_CONFIG and CHECK_CONFIG. It contains the following methods that allow you to set, and validate, the configuration data of a VisBiz component:

Table 33: Methods of IF_FPM_GUIBB_VISBIZ_CONFIG InterfaceMethod Description

ADD_PARAMETER If the feeder class has parameters, add the values here.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 221

Page 222: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Method Description

ADD_START_POSITION If a special start position is required, enter it here.

ADD_VISBIZ_CLASSES You can enter all relevant VisBiz classes here, if neces­sary. If you leave it empty, the VisBiz default classes will be used.

ADD_APPLICATION The VisBiz application is the most important entity; without this, the GUIBB will not work.

ADD_MIME_REP_PATH A mime repository path can be set to change the icons, if you want to use your own icons and not those of Vis­Biz.

ADD_DEFAULT_MAP_STACK If another default map stack than the one which is de­fined in customizing should be used at start of the ap­plication it has to be added here.

ADD_PERSONALIZATION_ENABLED Allow the user to personalize the start position and de­fault map stack.

GET_PARAMETERS Before saving the configuration within FLUID, the pa­rameter values can be checked by the application.

GET_START_POSITION Before saving the configuration within FLUID, the start position can be checked by the application.

GET_VISBIZ_CLASSES Before saving the configuration within FLUID, the classes can be checked by the application. Normally, the classes should be empty but if a special inherited class is required for the GUIBB, it must be checked here.

GET_APPLICATION Before saving the configuration within FLUID, the appli­cation can be checked by the application.

GET_MIME_REP_PATH Before saving the configuration within FLUID, the mime repository path can be checked by the application.

GET_DEFAULT_MAP_STACK Before saving the configuration within FLUID, the de­fault map stack can be checked by the application.

GET_PERSONALIZATION_ENABLED Before saving the configuration within FLUID, the per­sonalization flag can be checked by the application.

3.2.1.17.2 Interface: IF_FPM_GUIBB_VISBIZ

Description of methods in the interface implemented by the feeder classes of Visual Business (VisBiz) components.

The following table provides details only for those methods in this interface which must be implemented as a minimum. For details on other methods, see the interface documentation for other GUIBBs.

222 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 223: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Table 34: Methods of IF_FPM_GUIBB_VISBIZ InterfaceGET_DATA

Allows the feeder class to provide all necessary information for configuring a VisBiz component.

This method contains the following tables, representing objects that you can show on the map at runtime:

● CT_SPOTS● CT_LINKS● CT_AREAS

If the data is changed, set the exporting parameter EV_DATA_CHANGED to X, so that the data is updated and shown on the map.

Each of the above entities contain the following attributes:

Attribute Description

DESCRIPTION You can add a description in the tables for the tooltip and/or the Quick Info that appears when, for example, you click on a spot on the map.

Note● Category

Can be a tooltip, description (Quick Info), or both. Use the constants, found in IF_VBI_CONST=> GC_DESCR_CATEGORY..

● PartEnter values for Category (both and descrip­tion only) so that the Quick Info is displayed in the right format (as a caption, sub-caption, or value). Use the constants, found in IF_VBI_CONST=>GC_DESCR_PART.

● Field_NameEnter values for each case; these will be shown as labels for the values.

● ValueValue to be displayed.

GUID A unique identifier for a spot, link, or area on the map. If you update any data on the screen, or create a Quick Info, this GUID is used to locate the corresponding spot, link, or area on the map.

FLY_TO A flag that determines whether a spot, link, or area on the map should have a fly-to effect when it is displayed.

ROLE Determines which icon is to be shown on the map for a spot.

POSITION Add the xpos, ypos, and zpos here according to the scenario type (maps or 3D visuals).

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 223

Page 224: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DATA

Allows the feeder class to provide all necessary information for configuring a VisBiz component.

This method contains the following tables, representing objects that you can show on the map at runtime:

● CT_SPOTS● CT_LINKS● CT_AREAS

If the data is changed, set the exporting parameter EV_DATA_CHANGED to X, so that the data is updated and shown on the map.

Each of the above entities contain the following attributes:

Attribute Description

BORDER_COLOR These are used for links and areas only.

FILL_COLOR These are used for links and areas only.

TYPE The type is used, for example, for the 3D Scenario, and should, in this case, be of type BOX; see constant IF_VBI_CONST=> GC_SCENE_OBJECT_TYPE- BOX.

SPECIAL_PROPERTIES This attribute is used within the 3D Scenario. It should be of type IF_VBI_CONST=>GTYPE_BOX_EXTENSION. Here, you can enter values for the scales for the x, z, and z axes.

PROCESS_EVENT

Called within the FPM event loop. Here the event processing can take place, and this is where the event can be canceled or deferred.

The following events can be processed in this method:

CONTEXT MENU REQUEST Is triggered when the user right-clicks on the map at runtime. You can add your own context menu with your own events by entering values in parameter CT_MENU (constant IF_FPM_GUIBB_CONSTANTS=>GC_GUIBB_VISBIZ-CONTEXT_MENU). A reference to CL_CTMENU must be used.

DETAIL REQUEST Is triggered when the user clicks, for example, a spot on the map. If you have not defined the details in the method GET_DATA, you can enter the details here. You get the parameter DETAILS (con­stantIF_FPM_GUIBB_CONSTANTS=>GC_GUIBB_VISBIZ-DETAILS) with reference to CL_VBI_OBJECT_DETAILS_DESCR where you can set a caption, add a toolbar element or links, for ex­ample.

224 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 225: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

PROCESS_EVENT

Called within the FPM event loop. Here the event processing can take place, and this is where the event can be canceled or deferred.

The following events can be processed in this method:

DROP EVENT Is triggered when the user drags, for example, a spot onto another spot on the map. The drop event FPM_VBI_DROP (constant CL_FPM_EVENT=>GC_EVENT_VBI_DROP) contains as a parameter the source GUID of the spot which was dragged. (constant IF_FPM_GUIBB_CONSTANTS=>GC_GUIBB_VISBIZ-SOURCE_GUID).

Self-Defined Events These events are triggered as soon as the user se­lects them in the context menu at runtime. You can create your own FPM event in the context menu that you created (as described above).

3.2.2 Value/Input Helps for Generic UIBBs (GUIBBs)

It is possible to assign Value Helps to fields belonging to GUIBB components.

You can use the following options to assign value helps (arranged in order of precedence):

1. DDIC value helps assigned in the field description2. OVS (Object Value Selector) assigned in the field description3. Freestyle value helps assigned in the field description4. Fixed values assigned in the field description5. DDIC value helps assigned to a DDIC structure used as includes in the field catalog (nesting is possible).6. DDIC value helps assigned to the data element used in the field catalog7. Fixed values from the domain assigned in the data element used in the field catalog8. Input help for data types DATS and TIMS.

NoteIf more than one of these options is assigned to a field, the one highest in the above list has priority.

3.2.2.1 Assignments in the Field Description

A summary of the Value Help assignments in the field description.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 225

Page 226: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

DDIC Value Help

A DDIC value help can be assigned by the feeder class in the field description in field DDIC_SHLP_NAME.

OVS

Whenever a DDIC search help is not applicable, you should consider the OVS mechanism. OVS offers a generic UI like the DDIC value help. However, you must offer the selection logic. To do this, you must provide the name of a class implementing IF_FPM_GUIBB_OVS in the field description in field OVS_NAME. If the specified name is the same as the feeder class name, then the feeder class instance will be used, otherwise this class will be instantiated whenever it is needed.

This interface offers 4 methods:

● HANDLE_PHASE_0 where the OVS popup can be “configured”● HANDLE_PHASE_1 to define the selection fields● HANDLE_PHASE_2 where the result list must be determined● HANDLE_PHASE_3 where the selected result list entry is passed back to the input field

In order to fulfill these tasks, an instance of IF_WD_OVS is passed as an importing parameter to these methods.

Freestyle Value Help

A freestyle value help is a WD ABAP component implementing the WD interface IWD_VALUE_HELP. The name of a freestyle value help component can be assigned by the feeder class in the field description in field WD_VALUE_HELP. The attribute values can be accessed via the context element attached to the value help listener. The context attribute names are the same as the field names of the field catalog except for the search attributes of the Search UIBB. Additional information can be provided if the freestyle component also implements the WD interface IF_FPM_GUIBB_VH. In method INITIALIZE_GUIBB_VH, the following parameters are passed:

● IS_INSTANCE_KEY: The instance key of the GUIBB● IV_FIELDNAME: The field name from the field catalog of the value help field● IO_SEARCH_ATTR_READ: An access interface providing the current search criteria

Fixed Values

A set of fixed values can be assigned by the feeder class in the field description in field FIXED_VALUES.

226 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 227: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.3 Dynamic GUIBB Configurations at Runtime

This section describes how an application can trigger the invalidation, and re-instantiation of FPM GUIBBs at runtime, and how it can replace the current GUIBB configuration with a dynamic one during re-instantiation.

Dynamic GUIBB configurations in this context are default configurations that are provided by the GUIBB feeder class through the feeder class method GET_DEFAULT_CONFIG.

Such a method exists in the feeder class interfaces of the following GUIBBs:

● Form and Form GL2● Form Repeater● List and List ATS● Tree● Search

Additionally, a feeder class method GET_DEFAULT_CONFIG also exists in the feeder class interfaces of the FPM Thing and Dataset quickviews. However, quickviews are handled slightly differently compared to GUIBBs with respect to invalidation and re-instantiation. The approach involves two mechanisms:

● Invalidation and re-instantiationThis mechanism not only applies to GUIBBs and quickviews, but to freestyle UIBBs too.

● Dynamic configuration exchangeThis takes place after invalidation and re-instantiation, and is specific to GUIBBs and quickviews.

Related Information

UIBB Invalidation and Re-instantiation [page 227]Mechanism applying to GUIBBs, freestyle UIBBs, and quickviews.

Dynamic GUIBB/Quickview Configuration Exchange [page 228]Mechanism specific to GUIBBs and quickviews.

3.2.3.1 UIBB Invalidation and Re-instantiation

Mechanism applying to GUIBBs, freestyle UIBBs, and quickviews.

The FPM event FPM_INVALIDATE_UIBB can be raised in order to initiate the UIBB invalidation and re-instantiation, and is represented by the FPM constant IF_FPM_CONSTANTS=>GC_EVENT-INVALIDATE_UIBB.

Additionally, the FPM event parameter FPM_LIST_OF_UIBB_INSTANCES, represented by the FPM constant IF_FPM_CONSTANTS=> GC_EVENT_PARAM_LIST_OF_INST, is evaluated by the FPM runtime when processing the invalidation event FPM_INVALIDATE_UIBB.

The event parameter can be used to specify the list of UIBB instances that are going to be invalidated and re-instantiated. Each UIBB can register itself or other UIBBs by adding the corresponding UIBB Instance Key to that list. The relevant DDIC table type for this list of UIBB instances is FPM_T_COMPONENT_INSTANCE_KEY.

If the invalidation event has been raised, and not been cancelled, the central FPM runtime releases the UIBBs that have been registered on the invalidation event. The release happens in the FPM event loop after the last point in

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 227

Page 228: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

time at which the event can be cancelled, that is, after calling PROCESS_EVENT on the current UIBBs (respectively after calling AFTER_PROCESS_EVENT if an application controller exists), and before the instantiation of any new components of the next UIBBs and quickviews takes place, that is, before confirmation requests are processed, or PROCESS_BEFORE_OUTPUT is called on the next UIBBs. The conditions for the release of the UIBBs are the same as if they were defined as transient. If at least one UIBB cannot be released because of these conditions, the invalidation event is cancelled by the central FPM runtime according to an ‘all or nothing’ principle.

With respect to invalidation, quickviews are handled slightly differently to GUIBBs or UIBBs. This is because quickviews are always tightly coupled to their quickview source GUIBBs, and cannot exist without their source. Quickviews will always be invalidated together with their quickview source GUIBB; it is sufficient to register only a quickview source GUIBB for invalidation in order for all its quickviews to be invalidated too. On the other hand, invalidation of quickviews without invalidation of their quickview source GUIBB is not supported by the FPM; a quickview alone must never be registered for invalidation.

RestrictionThe mechanism for invalidation and re-instantiation of GUIBBs could theoretically also be applied to the Tabbed UIBB and Composite UIBB. However, the invalidation and re-instantiation will only take place if all the GUIBBs/ UIBBs contained in the composite UIBB have been registered explicitly on the FPM invalidation event too. Additionally, since the Tabbed and Composite UIBBs have no feeder class, but a runtime API that enables dynamic changes at runtime, it does not make sense to invalidate and re-instantiate these UIBBs.

Since there is no feeder class for free-style UIBBs, there is of course no call to a feeder class method GET_DEFAULT_CONFIG. This means the free-style UIBB itself should determine what happens at re-instantiation.

3.2.3.2 Dynamic GUIBB/Quickview Configuration Exchange

Mechanism specific to GUIBBs and quickviews.

To exchange the configuration of an instantiated GUIBB with a dynamic configuration, you use the interface IF_FPM_GUIBB_DYNAMIC_CONFIG.

This interface has one method HAS_DYNAMIC_CONFIGURATION, returning a Boolean value. The interface is added to a GUIBB feeder class, and the method must be implemented. If the feeder class returns the value ABAP_TRUE in this method, this serves as an indicator for the GUIBB runtime to explicitly call method GET_DEFAULT_CONFIG of the feeder class during instantiation (and, as an exception, during processing of the special event FPM_SEARCH_NEW_FIELDCAT in the GUIBB Search too).

The feeder class method GET_DEFAULT_CONFIG is called by the GUIBB runtime in the following situations:

● During initialization of the GUIBB, if the static GUIBB configuration is ‘empty’ according to specific GUIBB/quickview criteria.

● During initialization of the GUIBB, if the GUIBB feeder class implements the interface IF_FPM_GUIBB_DYNAMIC_CONFIG and returns the value ABAP_TRUE in the interface method HAS_DYNAMIC_CONFIGURATION.

● Immediately before calling feeder class method GET_DATA in the GUIBB Search, if the special FPM event FPM_SEARCH_NEW_FIELDCAT has been raised.

228 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 229: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

RestrictionAt design time, the value ABAP_TRUE in method HAS_DYNAMIC_CONFIGURATION of the interface IF_FPM_GUIBB_DYNAMIC_CONFIG means the configuration cannot be maintained anymore in the configuration editor (with the exception of the feeder class and the feeder parameters). If the configuration is already non-empty (because it was created at an earlier point in time when the feeder class had not yet returned the value ABAP_TRUE in method IF_FPM_GUIBB_DYNAMIC_CONFIG-> HAS_DYNAMIC_CONFIGURATION), an appropriate message is displayed to the administrator.

3.2.4 Context Menus and Action Menus in GUIBBs

Use

A context menu is a list of menu options that appears at runtime when the user chooses the secondary mouse button. The list of menu options displayed generally relates to the object currently selected on the screen and varies according to the current state, or context, of the application.

An action menu is a specific icon which displays a list of menu options or activities when the user chooses this icon at runtime.

Both context and action menus can be assigned to the individual elements of the GUIBB component. Additionally, context menus can also be added to the GUIBB component as a whole, that is, a context menu could be assigned to an individual column in a list or to the overall list itself.

The application's feeder class is responsible for defining both context and action menus. However, both menu types can be configured in the Floorplan Manager (FPM) configuration editor, FLUID.

Structure

Context menus are configured in the Menu Schema panel inside the FPM configuration editor, FLUID, of the GUIBB component of your application.

Each context menu has a unique Context Menu ID and contains one or more Menu Items (actions).

The following attributes exist for Menu Items:

● Item TypeDetermines how the text detailing the menu item is presented at runtime. The following Item Types exist:

○ Single Action Item○ Menu Checkbox○ Submenu

● FPM Event IDThe FPM event that is raised by this menu item.

● Needs More InformationThis option is selected if another dialog box appears after the menu item; an ellipsis appears after the name of the menu item to indicate to the user that more information will follow.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 229

Page 230: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● ImageThe name of the icon that appears alongside the text of the menu item.

● Separator BarAs an alternative to displaying an uninterrupted list of menu items, separator bars can be used to organize menu items into meaningful groups.

NoteNot all attributes exist for all Item Types.

A context menu can be displayed as an Action Menu at runtime by assigning the context menu to the Action Menu ID field of an element on the <GUIBB> Schema panel.

Once you have configured a context menu, you can assign it to an individual element in the GUIBB or to the GUIBB component itself. You can also decide to display the context menu not as a context menu but as an action menu instead.

Creating Context Menus and Action Menus

You can create context menus in the following ways:

● Statically, using the FPM configuration editor, FLUID● Dynamically, by implementing the IF_FPM_GUIBB_CTXT_MENU interface

Related Information

Creating a Context Menu Dynamically [page 230]There is the option to create or change context menus dynamically at runtime by implementing the interface IF_FPM_GUIBB_CTXT_MENU.

Creating a Context Menu in FLUID [page 233]Action Menus in GUIBBs [page 234]

Action menus are visible context menus available as text views in List, Tree, Form, and Form Repeater components only.

Displaying a Context Menu as an Action Menu [page 235]

3.2.4.1 Creating a Context Menu Dynamically

There is the option to create or change context menus dynamically at runtime by implementing the interface IF_FPM_GUIBB_CTXT_MENU.

Form, List and Tree feeder classes can provide context menus.

The interface IF_FPM_GUIBB_CTXT_MENU offers an additional event (PROCESS_CTXT_MENU) which is called after the user launches the context menu, and before the context menu is displayed. This event corresponds to the

230 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 231: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Web Dynpro event WDDOONCONTEXTMENU. Due to the pure dynamic nature of these context menus, the GUIBB context menu features are restricted compared to what Web Dynpro itself offers: menu checkboxes and radio buttons cannot be provided in this way.

IF_FPM_GUIBB_CTXT_MENU Interface

Table 35: Methods of IF_FPM_GUIBB_CTXT_MENUPROCESS_CTXT_MENU

Allows the feeder class to provide a context menu

Parameter Description

IV_NAME Type NAME_KOMP. Contains the field name if the context menu is launched from a place which can be related to a field from the field cata­log. If this is not possible (for exam­ple, when the context menu is launched from the list title or from a form’s group title) then IV_NAME is initial.

I_VALUE Type DATA. In form UIBBs it con­tains the field’s value, in list UIBBs the complete row. This parameter is initial when the context menu is launched from a place which is not related to this data (for example, when launching the context menu in a list from a column header IV_NAME will be filled, but I_VALUE will be empty).

IO_CTXT_MENU Type IF_FPM_CTXT_MENU. This in­terface is explained in detail below.

Table 36: Methods of IF_FPM_CTXT_MENUGET DETAIL

Gets the detail information for this context menu

Parameter Description

EV_ID Type FPM_CTXT_MENU_ID. Contains the unique ID of the context menu.

EV_TITLE Type FPM_CTXT_MENU_TITLE. Contains the title of the context menu. This title is only visible when the context menu is used as submenu.

EV_IMAGE_SOURCE Type FPMGB_IMAGE_SRC. Provides the source of the image of the menu. This image is only displayed when the context menu is used as a submenu.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 231

Page 232: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET DETAIL

Gets the detail information for this context menu

Parameter Description

ET_ITEM Type IF_FPM_CTXT_MENU=> TY_T_CTXT_MENU_ITEM. Provides alist of all menu items.

Table 37:GET_SUBMENU

Returns a submenu

Parameter Description

IV_ID Type FPM_CTXT_MENU_ID. Specifies the ID of the con­text sub menu.

RO_SUBMENU Type IF_FPM_CTXT_MENU. Represents the submenu.

Table 38:REMOVE_ITEM

Removes the specified item from a context menu

Parameter Description

IV_ID Type FPM_CTXT_MENU_ID. Specifies the ID of the item to be removed.

Table 39:ADD_ACTIONITEM:

Adds a new Action Item to the menu

Parameter Description

IV_TEXT The text of the new menu entry.

IV_FPM_EVENT_ID The FPM Event ID which will be raised when the user selects this action item.

IO_FPM_EVENT The FPM Event to be raised when the user selects this action item. Either IV_FPM_EVENT_ID or IO_FPM_EVENT have to be provided. If both are pro­vided IV_FPM_EVENT_ID is ignored.

IV_IMAGE_SOURCE Provides the image source for the menu entry (op­tional).

IV_NEEDS_MORE_INFO Should be set when executing the action additional in­formation is required. Another three points are listed after the text to display this information.

IV_INDEX Allows specification of the position of the new entry (optional: if left initial, entry is appended to the end).

232 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 233: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Table 40:ADD_SUBMENU:

Creates and adds a new submenu to the Context Menu

Parameter Description

IV_TITLE The title of the new menu entry.

IV_IMAGE_SOURCE Provides the image source for the new submenu (op­tional).

IV_INDEX Allows specification of the position of the new entry (optional: if left initial, entry is appended to the end).

RO_SUBMENU The new submenu.

Table 41:ADD_SEPARATOR:

Adds a new separator to the Context Menu

Parameter Description

IV_INDEX Allows specification of the position of the separator (optional: if left initial, entry is appended to the end).

3.2.4.2 Creating a Context Menu in FLUID

Use

You can use context menus to provide the user with shortcuts to actions or activities that are relevant to the object the user has selected at runtime.

Procedure

Context menus can be created and configured in the FPM configuration editor, FLUID, as well as by API.

There are three steps to creating such a menu type in an application using FLUID:

1. Create a context menu, and add and configure menu items to it.2. Assign the context menu to an element in the GUIBB, or to the GUIBB as a whole.3. Display the menu as a context menu or, alternatively, as an action menu.

Creating a Context Menu and Adding and Configuring Menu Items to It

1. Open FLUID, and choose the GUIBB (for example, a list or form component) to which you want to add a context menu.

2. Choose the Menu Schema panel.3. Choose Add Menu in the Menu Schema toolbar.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 233

Page 234: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

4. In the Attributes panel, enter a Context Menu ID.It is useful to provide an explanatory name for your context menu.

5. Choose Add Menu Item in the Menu Schema toolbar.6. In the Standard Attributes section of the Attributes panel, choose one of the following Item Types, and enter

the attributes described below each type:

○ Single ActionIn the Action Assignment section of the Attributes panel, enter an FPM Event ID and the Menu Item Text.

○ Menu CheckboxIn the Action Assignment section of the Attributes panel, enter an FPM Event ID and the Menu Item Text.

○ SubmenuIn the Standard Attributes section of the Attributes panel, enter text for the label of the submenu and the Context Menu ID of the context menu which should appear as the submenu at runtime.

You have now created a context menu.7. (Optional) You can also complete the following fields if available:

○ Image○ Separator Bar○ Needs More Information

Displaying the Context Menu

You have now created your context menu. You can assign it to an element in the component, or to the component as a whole. To do this, do one of the following:

● Assigning a Context Menu to an ElementChoose the <GUIBB> Schema panel and choose an element inside the panel. In the Standard Attributes section of the Attributes panel, enter the Context Menu ID of the context menu you have just created. Save and test your application. The context menu appears only for the element you chose; it does not appear when you choose the secondary mouse button anywhere else on the screen.

● Assigning a Context Menu to a GUIBBChoose the General Settings panel. In the Additional Settings section, enter the Context Menu ID. Save and test your application. The context menu appears wherever you click on the screen.

Displaying a Context Menu as an Action Menu

Once you have created a context menu you can choose to display it as an action menu instead of a context menu. To do this, see the section Displaying a Context Menu as an Action Menu.

3.2.4.3 Action Menus in GUIBBs

Action menus are visible context menus available as text views in List, Tree, Form, and Form Repeater components only.

For the user, the behavior is similar to a context menu; the action menu is triggered by clicking the menu icon on the right side of the text view (see screenshot below).

234 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 235: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

At design-time, action menus are created in the same way as context menus. There is, however, the option to dynamically change the action menus at runtime. However this works completely differently to dynamic context menus. Unlike context menus, action menus are visible. Therefore, it is not possible to create them on-demand; you can only change existing(action menus that are already configured. To do this, the GUIBB’s feeder class must implement the interface IF_FPM_DYNAMIC_ACTION_MENU. This interface offers one method, PROCESS_ACTION_MENU, which is called when the user clicks on the action menu icon. It passes the Action Menu ID (as defined in the configuration), the name of the field the action menu is attached to, the row index (for List and Tree components) , and an instance of IF_FPM_CTXT_MENU (see previous section, Context Menus in GUIBBs) allowing the action menu to be changed dynamically.

3.2.4.4 Displaying a Context Menu as an Action Menu

Use

For stylistic reasons, you might choose to display a context menu as an action menu at runtime. Although accessing these menu types is slightly different (context menus use the secondary mouse button, action menus use the primary mouse button), technically, an action menu is a context menu.

Prerequisites

You have already created and configured a context menu.

Procedure

To display a context menu as an action menu, proceed as follows:

1. Open FLUID, and choose the GUIBB whose context menu you want to display as an action menu.2. Choose the <GUIBB> Schema panel and choose the relevant element inside the panel.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 235

Page 236: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3. Ensure that the Display Type of the element is set to Text View; action menus can only be displayed using this type of Display Type.

4. In the Display Type Dependent Properties section of the Attributes panel, in the Action Menu ID field, enter the Context Menu ID of your chosen context menu.

5. Save and test your application.

3.2.5 Quickviews

Definition

A quickview is a read-only UI element which allows the user, at runtime, to view additional information (not displayed on the current screen) about an object without having to navigate to other screens to obtain the information. Like a tooltip, a quickview appears (and disappears) on the UI during a mouse-over action by the user.

The following types of quickview exist:

● Thing QuickviewThis is used to display information relating to a 'thing' (a business object for example). It is implemented using the Web Dynpro component FPM_QUICKVIEW_THING.

● Dataset QuickviewThis is used to display information relating to a dataset. It is implemented using the Web Dynpro component FPM_QUICKVIEW_DATASET.

● Image QuickviewThis is used to display an image related to the field it is assigned to. It is implemented using the Web Dynpro component FPM_QUICKVIEW_IMAGE.

A quickview can be assigned to a particular element of a generic UI building block (GUIBB) component inside an FPM application. For example, a quickview could be assigned to a particular column in a table (implemented using a list component). As the user hovers the mouse over the rows in this column, the same quickview is displayed for each row, but the data inside the quickview changes.

The information displayed in a quickview at runtime is determined both by the feeder class assigned to the configuration of the Web Dynpro components mentioned above, and by the settings inside the FPM configuration editor, FLUID.

Quickviews can be exchanged with other quickviews dynamically. Therefore, quickviews that were not assigned to a particular GUIBB at configuration may still appear on that GUIBB at runtime.

236 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 237: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Structure at Runtime

The following screenshot shows an example of what a quickview (in this example, a thing quickview) might look like at runtime:

Figure 22: A Thing Quickview at Runtime

In this example, the quickview is triggered when the user hovers the mouse over a hyperlink.

As the screenshot illustrates, a quickview may contain the following parts:

● Quickview TitleStatic; this title remains the same for each instance of the thing. It represents the type of thing and is independent of the instance title.

● Instance TitleDynamic; supplied by the feeder class assigned to the quickview configuration, and changes for each instance of the thing.

● IconOptional.Can be static or dynamic. Icons may be configured statically (the same icon is displayed at runtime for all instances of a thing) in FLUID or the feeder class may provide the icon(s) at runtime.

● AttributesThe list of attributes available is determined by the field catalog of the relevant feeder class.

Activities

You can create, configure, and assign a quickview using the Quickview Panel in FLUID. FPM also provides a fast-track method for image quickviews.

Once a quickview is configured, it can be assigned to an individual element of a GUIBB; the Quickview ID is entered in the Display Type Dependent Properties section in the Attributes section of an individual element inside the <GUIBB> Schema panel in FLUID.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 237

Page 238: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The fields available in the General Settings panel of the quickview component are component-dependent. Amongst others, are the following:

● Quickview TitleThis can be changed dynamically at runtime.

● ImageIf the image is dynamically created by the feeder class, the Image (Static) field is not available in FLUID.

You can edit the attributes' text and sequence, and, depending on the quickview type, also add a launchpad (display type Link to Action) to an attribute.

Each attribute has one of the following display types: Text View, Image, Link to URL, and Link to Action, meaning that the information displayed here might be in the form of an image or text, a hyperlink, or it might result in an action. You can change the display type to suit your requirements.

Related Information

Dynamic Calling of Quickviews [page 239]Applications can specify additional quickviews (that are not statically configured) at runtime; these are instantiated in addition to the configured quickviews.

Interface: IF_FPM_GUIBB_QV_DATASET [page 240]Description of methods in the interface for a dataset quickview.

Interface: IF_FPM_GUIBB_QV_THING [page 243]Description of methods in the interface for a thing quickview.

Creating and Assigning a Quickview [page 238]A procedure applicable for all types of quickviews.

Assigning Image Quickviews: Fast-Track Method [page 239]FPM offers a ready-to-use Image Quickview that can be assigned quickly and easily to a GUIBB configuration.

3.2.5.1 Creating and Assigning a Quickview

A procedure applicable for all types of quickviews.

Context

Quickviews can only be added to elements of a GUIBB configuration.

Procedure

1. In FLUID, in the Quickview Panel of the GUIBB configuration, choose Add Quickview and select the type of quickview you want to display.

238 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 239: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The system displays the Quickview ID in the Attributes panel.2. Enter a Configuration ID, and choose the Configure Quickview button.3. Enter the relevant feeder class, and optionally, the feeder class parameters, and press OK.

FLUID then displays various panels allowing you to configure the new quickview.4. Return to the GUIBB configuration (use the breadcrumb above the General Settings panel to do this).5. Choose the <GUIBB> Schema panel, and select the row containing the field you wish to assign the quickview

to. In the Attributes panel, enter the quickview ID.

3.2.5.2 Assigning Image Quickviews: Fast-Track Method

FPM offers a ready-to-use Image Quickview that can be assigned quickly and easily to a GUIBB configuration.

Context

As with other quickview types, you can create an Image Quickview in the Quickview Panel in FLUID, and assign it to the GUIBB configuration in the <GUIBB Name> Schema panel.

However, FPM provides you with the following, far simpler, method of creating and assigning and Image Quickview.

NoteA prerequisite of this method is that the field catalog of the GUIBB's feeder class must contain an image field.

Procedure

1. In the <GUIBB Name> Schema panel, select the row containing the field you wish to assign an Image Quickview to. Note that this field must have Text, Image, Link to URL or Link to Action display type.

2. In the Attributes panel in the Image Field, enter the name of the field in the field catalog containing the image.

3.2.5.3 Dynamic Calling of Quickviews

Applications can specify additional quickviews (that are not statically configured) at runtime; these are instantiated in addition to the configured quickviews.

This can be done by raising an FPM event of the event class type CL_FPM_DYNAMIC_QUICKVIEW_EVENT with the Event ID FPM_DYNAMIC_QUICKVIEW (constant CL_FPM_DYNAMIC_QUICKVIEW_EVENT=>GC_EVENT_DYNAMIC_QUICKVIEW) and the tabular event parameter NEW_QUICKVIEWS (constant CL_FPM_DYNAMIC_QUICKVIEW_EVENT=>GC_EVENT_PARAM_NEW_QUICKVIEWS) of type CL_FPM_DYNAMIC_QUICKVIEW_EVENT=>TY_T_QUICKVIEW.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 239

Page 240: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The application can then exchange the quickview to be opened when hovering over a field using the existing mechanism. This can be done by implementing interface IF_FPM_QUICKVIEW_SOURCE and its method GET_QUICKVIEW_KEY in the respective feeder class.

To find out which quickviews have already been instantiated, and to which feeder class fields they are assigned, the feeder class of the quickview source GUIBB can call method GET_QUICKVIEW_INFORMATION on the extended control interface instance (in the case of the Form GL2 GUIBB for example, this is an instance of interface IF_FPM_FORM_EXT_CTRL) that is passed to the feeder class in method GET_DATA.

3.2.5.4 Interface: IF_FPM_GUIBB_QV_DATASET

Description of methods in the interface for a dataset quickview.

As with the implementation of the GUIBB interfaces, implement an empty method even if your application does not actually require the method (to avoid a system dump).

Table 42: Methods of IF_FPM_GUIBB_QV_DATASET InterfaceGET_DEFINITION

Allows the feeder to provide all necessary information for configuring a dataset quickview: the list of availa­ble fields and their properties and the list of actions (FPM events).

Parameter Description

EO_FIELD_CATALOG Is of type CL_ABAP_TABLEDESCR. The components of this object are the available fields. The simplest way to provide a field catalog is to create a table of a flat DDIC structure containing all fields and then get the field cat­alog via EO_FIELD_CATALOG ?= CL_ABAP_TABLEDESCR=>DESCRIBE_BY_NAME( <NAME> )

NoteThe dataset quickview supports only flat struc­tures.When using deep structures, only the highest level fields are available.

ET_FIELD_DESCRIPTION Here you can provide the additional information needed to create the dataset quickview, for example a link reference, LINK_REF.

EV_STATELESS_ENABLED Set feeder to stateless, so that it can be used in state­less scenario (UI5).

ES_MESSAGE A list of messages which shall be displayed in the mes­sage region.

240 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 241: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

INITIALIZE

Called at runtime when the dataset quickview is created. It is the first feeder method which is called from FPM.

Parameter Description

IT_PARAMETER Contains a list of the feeder parameters and the values for them specified in the configuration.

IO_APP_PARAMETER Application parameter

IV_COMPONENT_NAME Web Dynpro: Component Name

IS_CONFIG_KEY Key components of configuration tables

IV_INSTANCE_ID Instance ID

FLUSH

The first feeder method which is called during an event loop. Whenever an FPM event is triggered (this in­cludes all round trips caused by the dataset quickview itself) this method is called. Use it to forward changed dataset quickview data to other components in the same application.

Parameter Description

IT_CHANGE_LOG Lists all changes made by the user.

IS_DATA Is a structure containing the changed data.

PROCESS_EVENT

Called within the FPM event loop, it forwards the FPM PROCESS_EVENT to the feeder class. Here the event processing can take place and this is where the event can be canceled or deferred.

Parameter Description

IO_EVENT The FPM event which is to be processed

IV_RAISED_BY_OWN_UI ABAP_TRUE if the event is raised by own UI

EV_RESULT The result of the event processing. There are 3 possible values:

● EV_RESULT = IF_FPM_CONSTANTS=>GC_EVENT_RESULT-OK

● EV_RESULT = IF_FPM_CONSTANTS=>GC_EVENT_RESULT-FAILED

● EV_RESULT = IF_FPM_CONSTANTS=>GC_EVENT_RESULT-DEFER

ET_MESSAGES A list of messages which shall be displayed in the mes­sage region.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 241

Page 242: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

GET_DATA

Called within the FPM event loop and forwards the FPM PROCESS_BEFORE_OUTPUT event to the feeder class. Here you specify the quickview data after the event has been processed.

Parameter Description

IO_EVENT The FPM event which is to be processed.

IT_SELECTED_FIELDS The list of fields necessary for the quickview rendering. Provide only the data for the fields listed in this table; all other fields are neither visible at runtime nor used as reference for visible fields.

IV_RAISED_BY_OWN_UI ABAP_TRUE if the event is raised by own UI.

IV_KEY Serialized key for the quickview.

ET_MESSAGES A list of messages which shall be displayed in the mes­sage area.

EV_DATA_CHANGED For performance reasons, the GUIBB adjusts the data in the quickview only if the data has been changed. To indicate this, set this flag whenever you change the data to be displayed within this feeder.

CS_DATA The quickview data to be changed.

GET_DEFAULT_CONFIG

Call this if you want to have a default configuration. Use it to call pre-configured quickview configurations when a user starts the FPM configuration editor. This avoids the user, who uses a feeder class to create a quickview, having to create it from the beginning.

Parameter Description

IO_CONFIG Of type IF_FPM_GUIBB_QV_DATASET_CONFIG. This object provides the API to create a default configura­tion.

CHECK_CONFIG

Call this if you want to make your own application-specific checks on the configuration in the FPM configu­ration editor immediately before saving.

Parameter Description

IO_CONFIG Of type IF_FPM_GUIBB_QV_DATASET_CONFIG. This object provides the API to read the configuration to be saved.

ET_MESSAGES A list of messages which shall be displayed in the mes­sage region.

242 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 243: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.5.5 Interface: IF_FPM_GUIBB_QV_THING

Description of methods in the interface for a thing quickview.

As with the implementation of the GUIBB interfaces, implement an empty method even if your application does not actually require the method (to avoid a system dump).

Table 43: Methods of IF_FPM_GUIBB_QV_THING InterfaceGET_DEFINITION

Allows the feeder to provide all necessary information for configuring a thing quickview: the list of available fields and their properties and the list of actions (FPM events).

Parameter Description

EO_FIELD_CATALOG Is of type CL_ABAP_STRUCTDESCR. The components of this object are the available fields. The simplest way to provide a field catalog is to create a table of a flat DDIC structure containing all fields and then get the field cat­alog via EO_FIELD_CATALOG ?= CL_ABAP_STRUCTDESCR=>DESCRIBE_BY_NAME( <NAME> )

NoteThe thing quickview supports only flat struc­tures.When using deep structures, only the highest level fields are available.

For all other methods and attributes of this interface, see the interface documentation for the dataset quickview.

3.2.6 Moving Data between UIBBs at Runtime (Drag-and-Drop)

This section deals primarily with using the Drag-and-Drop feature to move data between the FPM GUIBBS. There is, however, a short description on the use of Drag-and-Drop in Freestyle UIBBs at the end of this section.

You can enable the Drag-and-Drop feature in GUIBBs to allow end-users to move data at runtime within and between individual generic user interface building blocks (GUIBBs).

This feature allows you to determine, for example, whether you can move single or multiple rows of data from one list to another list, or to prohibit the transfer of data.

Individual GUIBBs may act as drag sources (that is, data can be moved from them), drop targets (that is, data can be moved on to them), or both. Individual GUIBBs may also act as drag sources, or drop targets, for several other GUIBBs.

This feature is available in the following GUIBBs:

● List ATS, List, Hierarchical List (Tree)These GUIBBs may act as both drag sources and drop targets.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 243

Page 244: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● Form GL2, Form, Form RepeaterThese GUIBBs may act only as drop targets.

The Drag-and-Drop feature must be defined in the corresponding feeder class of the GUIBB.

See also 1761101 regarding the Drag-and-Drop feature in GUIBBs.

Related Information

Enabling Drag-and-Drop in GUIBBs [page 244]You can define the settings for Drag-and-Drop in various feeder class methods of the corresponding GUIBB, and also in the FPM configuration editor, FLUID.

Processing Events in a Drag-and-Drop Operation [page 245]Summary of steps that occur during a drag-and-drop opeation.

Defining Drag-and-Drop Attributes in GET_DEFINITION [page 246]Details of the attributes required when defining Drag-and-Drop using the GET_DEFINITION feeder class method.

Body-Specific Dropping [page 250]This feature enables an application to control dropping of drag sources on to the row edge level in the GUIBBs List ATS and Tree.

Row-Specific Dropping [page 251]This feature enables an application to control dropping of drag sources on a row level in the GUIBBs List ATS, List, and Tree.

Multiple Drag Sources and Drop Targets [page 251]The feeder class can, in principle, define multiple drag sources and multiple drop targets of the same type. However, in order to define meaningful drag-and-drop entries, several points must be considered.

Modifying Drag Sources & Drop Targets at Runtime [page 253]It is possible to modify the properties of drag sources and drop targets at runtime. Currently, this mechanism is supported by the GUIBBs List ATS, List, and Tree.

Drag-and-Drop in Freestyle UIBBs [page 253]This section describes the details for ensuring Drag-and-Drop in freestyle UIBBs, as opposed to the GUIBBs.

3.2.6.1 Enabling Drag-and-Drop in GUIBBs

You can define the settings for Drag-and-Drop in various feeder class methods of the corresponding GUIBB, and also in the FPM configuration editor, FLUID.

The Drag-and-Drop feature must be defined in the corresponding feeder class of the GUIBB. The feeder class interfaces to use are:

● IF_FPM_GUIBB_LIST● IF_FPM_GUIBB_TREE● IF_FPM_GUIBB_FORM

244 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 245: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● IF_FPM_GUIBB_FORM_REPEATER

Drag-and-Drop can be enabled or disabled for individual GUIBBs separately in an application.

The following table describes how and where you define the settings for Drag-and-Drop:

Table 44: Locations for Enabling Drag-and-Drop in GUIBBsLocation Description

Feeder class method GET_DEFINITION GET_DEFINITION is called once, on start-up of the ap­plication. It allows the feeder class to provide all neces­sary information for configuring Drag-and-Drop attrib­utes using parameter ET_DND_DEFINITION (type structure FPMGB_S_DND_DEFINITION).

Feeder class method GET_DATA GET_DATA is called at runtime on every round-trip. It allows the feeder class to provide all necessary infor­mation for overriding Drag-and-Drop attributes at run­time using parameterCT_DND_DEFINITION (type structure FPMGB_S_DND_DEFINITION).

NoteThis method is dependent on the Override at Runtime field (described in more detail later in this section).

FPM configuration editor, FLUID If not exceptionally configured in FLUID, the Drag-and-Drop definition entries provided by the feeder class are evaluated and applied at runtime. However, if these entries do not exactly meet the application require­ments, some of them can be overwritten in the GUIBB configuration, and/or modified at runtime.

Only if Drag-and-Drop is first defined in the feeder class, does the menu option Drag-and-Drop Settings appears in the FPM configuration editor, FLUID (inside the General Settings panel of the relevant GUIBB con­figuration).

NoteChanges you make to attributes in FLUID take prec­edence over those defined in the feeder class.

3.2.6.2 Processing Events in a Drag-and-Drop OperationSummary of steps that occur during a drag-and-drop opeation.

When a drag source is dropped on to a drop target, the following steps occur:

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 245

Page 246: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

1. The action handler on the drop target GUIBB raises an FPM event with the Event ID FPM_DROP_COMPLETED (constant IF_FPM_CONSTANTS=>GC_EVENT-DROP_COMPLETED), and the drop target GUIBB key as event source.The drop event provides an FPM event parameter FPM_DROP_INFO (constant IF_FPM_CONSTANTS=>GC_GUIBB_DND-DROP_INFO; type FPMGB_S_DROP_INFO) which contains a table of the original Web Dynpro event parameters, and, for the drop target GUIBBs List ATS, List, Tree, and Form Repeater, information about the drop position (Drop Index and Offset).

2. During processing of the drop event in step 1 above, each GUIBB that might be a valid drag source must check whether it is indeed the current drag source. This is done in the GUIBB method FLUSH by evaluating the table of Web Dynpro event parameters that has been passed the drop event (as part of the FPM event parameter FPM_DROP_INFO). The relevant Web Dynpro event parameter in this table is DATA.The GUIBB is the drag source of the current drag-and-drop operation if the value of DATA is the same as the value of the property DATA of the Drag Source UI element of the GUIBB. The latter has been set by the GUIBB runtime during the creation of the UI elements of its view, and normally has the GUIBB key as its value.

3. If a GUIBB has identified itself as the drag source, it adds important drag source information to the drop event of step 1. This occurs in the method FLUSH. The drag source information is provided with event parameter FPM_DRAG_SOURCE_DATA (constant IF_FPM_CONSTANTS=>GC_GUIBB_DND-DRAG_SOURCE; type FPMGB_S_DRAG_AND_DROP), and contains the following parameters:

○ DRAG_UIBB_CONFIG_KEYThe GUIBB key of the drag source (as a string).

○ DRAG_SOURCE_DATAA pointer representing the whole data set from where the drag is initiated.

○ DRAG_SOURCE_INDICESThe indices of the dragged entries in this set of data records

○ DROP_POSITIONThe index where the drop occurs; applicable only for List and Hierarchical List (Tree) GUIBBs.

The drop event is then further processed like any other FPM event. This means that a GUIBB feeder class can react appropriately on the FPM drop event, in particular in the feeder class methods PROCESS_EVENT and GET_DATA. For example, in this way, a drag source GUIBB feeder class can delete dragged entries, and the corresponding drop target GUIBB feeder class can insert them.

3.2.6.3 Defining Drag-and-Drop Attributes in GET_DEFINITION

Details of the attributes required when defining Drag-and-Drop using the GET_DEFINITION feeder class method.

The line structure (type FPMGB_S_DND_DEFINITION) of the exporting parameter ET_DND_DEFINITION in feeder method GET_DEFINITION contains the following attributes:

● Type● Name● Scope● Enabled (Status)● Tags● Override

246 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 247: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

These attributes are described in detail in the following table:

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 247

Page 248: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Table 45:Attribute Details

Type Defines whether the UIBB is a drag source or a drop target (and which kind of drop target).

Cannot be overwritten in the GUIBB configuration, nor modified at runtime.

The following types are supported:

● DRAG:Type for a drag source. Available for GUIBBs List ATS, List, and Tree. It al­lows dragging one or multiple entries from the drag table/ tree.

● DROP ON BODYType for a drop target. Available for the GUIBBs List ATS, List, and Tree. It allows dropping a drag source between two entries in the drop table/ tree, or into an empty drop table/tree. It does not allow dropping the drag source on an existing entry in the drop table/tree.Different flavors for this drop type exist:

○ UnspecificThe drag source can be dropped between any two entries in the drop table/ tree.

○ SpecificThe drag source can be dropped between any or between two specific entries in the drop table/ tree. Body-specific dropping means, in WD ABAP/ UR, terms dropping on the row edge of a table/ tree entry. This is described later in the section Body-Specific Dropping.

Note○ The Web Dynpro UI element C-Table supports this feature; the

Web Dynpro UI element Table does not. Therefore, this feature is available only for the GUIBB List ATS, and for the new version of the GUIBB Tree.

○ The previous version of the GUIBB Tree is based on the WD UI Element Table. If row-specific dropping is required here, note that an entry that can be dropped on a specific tree node can al­ways be dropped between the child entries of this node as well. In this way, the previous version of the GUIBB Tree also provides a kind of body-specific dropping.

● DROP ON ROWType for a drop target. Available for the GUIBBs List ATS, List, and Tree.It allows dropping a drag source on to an existing entry in the drop table/ tree. However, it is not possible to drop the drag source between two en­tries, or into an empty drop table/ tree.Different flavors for this drop type exist:

○ UnspecificThe drag source can be dropped on any entry in the drop table/ tree

○ Specific

248 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 249: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Attribute Details

The drag source can be dropped on any, or on specific entries in the drop table/ tree. This is described later in the section Row-Specific Dropping.

NoteThe previous version of the GUIBB Tree is a special case (for reasons described above). If row-specific dropping is required there, note that an entry that can be dropped on a specific tree node can always be dropped between the child entries of this node as well. In this way, the previous version of the GUIBB Tree also provides a kind of body-specific dropping.

● DROPType for a drop target. Available for the List ATS, List, Tree, Form Repeater, Form GL2, and the original Form.For a table or a tree, an entry of this drop target type is treated as if there were two drop target entries, one of type Drop on Row, and one of type Drop on Body.For a Form Repeater or Form GL2, this drop target type allows dropping a drag source on to the whole form, whereas for the original Form, it allows dropping a drag source on single form groups.

Name A name is required in order to distinguish multiple drop entries of the same type. This is currently only relevant if a body-specific and/ or a row-specific drop behavior is required.

NoteCannot be overwritten in the GUIBB configuration, nor modified at runtime.

Scope Defines whether dropping is:

● LocalDropping is possible only on the drag source itself. Use constant IF_FPM_GUIBB_CONSTANTS=>GC_DRAG_DROP_SCOPE-LOCAL.

● GlobalDropping is possible on any other GUIBB that supports the drag-and-drop mechanism. Use constant IF_FPM_GUIBB_CONSTANTS=>GC_DRAG_DROP_SCOPE-GLOBAL.

Of course, in order to perform a real dropping operation, drop targets with ap­propriate tags must exist in the target GUIBB. If not further specified, the de­fault scope is Global.

Can be overwritten in the configuration and/or modified at runtime. The latter is described in the section Modifying Drag Sources and Drop Targets at Runtime.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 249

Page 250: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Attribute Details

Enabled (Status) Defines whether a drag-and-drop entry is enabled or not; if a drag source is disa­bled, dragging is not possible. If a drop target is disabled, dropping on this target is not possible.

Can be overwritten in the configuration and/or modified at runtime. The latter is described in the section Modifying Drag Sources and Drop Targets at Runtime

Tags Specifies the relevant tags of the drag-and-drop entry. Multiple tags can be sep­arated by a space. Wild cards, such as ‘HUGO*’, are supported.

A drag source can only be dropped on a drop target if their Tags match each other, that is, at least one of the tags of the drag source must be part of the tag list of the corresponding drop target. If this is not so, dropping is not possible.

Can be overwritten in the configuration and/or modified at runtime. The latter is described in the section Modifying Drag Sources and Drop Targets at Runtime.

Override Defines whether the properties (for example, the Scope or the tag list) of the drag-and-drop entry can be modified at runtime or not.

Can be overwritten in the configuration in FLUID.

3.2.6.4 Body-Specific Dropping

This feature enables an application to control dropping of drag sources on to the row edge level in the GUIBBs List ATS and Tree.

In this way, it is possible to enable dropping between two particular entries in the drop table/ tree, but to forbid it between other entries.

For the GUIBB Tree, this feature is, in principle, only supported in the new version of the GUIBB Tree that uses the Web Dynpro C-table. However, in the original version of the GUIBB Tree a kind of body-specific dropping exists too; if the row-specific dropping feature is used, an entry that can be dropped on a specific tree node can always be dropped between the child entries of this node too.

The technical mechanism behind the body-specific dropping feature is, in principle, based on different tag lists that are assigned to the single rows of the drop table. To provide such a pool of tag lists, multiple drop targets are required because a drop target can only have one tag list. The drop targets are then bound to the data table. For this, the data table must have one explicit column that contains the name of the relevant drop target at runtime, per row.

To use this feature, you must ensure the following:

● Depending on the number of different tag lists that an application requires for controlling the drop behavior on the row edge level, a corresponding number of drop target entries of Drop on Body type or Drop type with unique names must be defined by the GUIBB feeder class in method GET_DEFINITION. The conditions for meaningful drop target combinations are described in detail in another section.

● The name of a (technical) reference field of string type must be specified with parameter DROP_ON_BODY_TRGT_NAME_REF in the exporting parameter ES_OPTIONS (which is of FPMGB_S_LIST_OPTIONS type for the GUIBB List ATS, and of FPMGB_S_TREE_OPTIONS type for the GUIBB

250 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 251: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Tree). The reference field must of course be part of the GUIBB field catalog. At runtime, the reference field must contain the name of the relevant drop target for each data record in the data collection. As for any other feeder class field, the field content can be provided in the feeder class method GET_DATA.

3.2.6.5 Row-Specific Dropping

This feature enables an application to control dropping of drag sources on a row level in the GUIBBs List ATS, List, and Tree.

In this way, it is possible to enable dropping on particular entries drop table/ tree but to forbid it on other entries.

The technical mechanism behind the row-specific dropping feature is in principle based on different tag lists that are assigned to the single rows of the drop table. To provide such a pool of tag lists, multiple drop targets are required because a drop target can only have one tag list. The drop targets are then bound to the data table. For this, the data table must have one explicit column that contains the name of the relevant drop target at runtime, per row.

To use the feature, you must ensure the following:

● This feature enables an application to control dropping of drag sources on a row level in the GUIBBs List ATS, List, and Tree.Depending on the number of different tag lists that an application requires for controlling the drop behavior on the row level, a corresponding number of drop targets of Drop on Row type or Drop type with unique names must be defined by the GUIBB feeder class in method GET_DEFINITION. The conditions for meaningful drop target combinations are described in detail in another section.

● The name of a (technical) reference field of type string must be specified with parameter DROP_ON_ROW_TRGT_NAME_REF in the exporting parameter ES_OPTIONS (which is of type FPMGB_S_LIST_OPTIONS for the GUIBB List ATS, and of type FPMGB_S_TREE_OPTIONS for the GUIBB Tree) of the feeder class method GET_DEFINITION. The reference field must of course be part of the GUIBB field catalog. At runtime, the reference field must contain the name of the relevant drop target for each data record in the data collection. As for any other feeder field, the field content can be provided in the feeder method GET_DATA.

3.2.6.6 Multiple Drag Sources and Drop Targets

The feeder class can, in principle, define multiple drag sources and multiple drop targets of the same type. However, in order to define meaningful drag-and-drop entries, several points must be considered.

To define meaningful drag-and-drop entries, the following points must be taken into account:

● Define only one drag source entry.Web Dynpro ABAP does not support more than one. FPM therefore considers only one drag source at runtime.

● Define multiple drop targets of the same type with unique names.Only one entry per type and name is considered by FPM at runtime.

● If body-specific dropping is required, it is mandatory to define multiple drop targets of Drop on Body or Drop type.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 251

Page 252: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Each drop target must have a unique name. Note that each drop target entry of Drop type will result in two drop targets, one of Drop on Body type and one of Drop on Row type.

● If row-specific dropping is required, it is mandatory to define multiple drop targets of Drop on Row type or Drop.Each drop target entry must have a unique name. Note that each drop target entry of Drop type will result in two drop targets, one of Drop on Body type and one of Drop on Row type.

Further drop types are detailed in the following table:

Table 46: Drop Types

Type of Drop Required Drop Type to Use

Body-unspecific dropping is required (but body-spe­cific dropping is not).

Only one entry of Drop on Body type or Drop is meaningful.

Further entries are neglected by FPM at runtime. Note that a drop target entry of Drop type results in two drop targets, one of Drop on Body type and one of Drop on Row type.

Row-unspecific dropping is required (but row-specific dropping is not).

Only one entry of Drop on Row type or Drop is mean­ingful.

Further entries are neglected by FPM at runtime. Note that a drop target entry of type Drop results in two drop targets, one of Drop on Body type and one of Drop on Row type.

Both body-unspecific and row-unspecific dropping is required (and which must be controlled completely in­dependently of each other).

One drop target of Drop on Body type and one of Drop on Rowtype is needed.

Both body-unspecific and row-unspecific dropping is required (but do not need not to be controlled inde­pendently of each other).

One drop target of Drop type is sufficient, since it will result in two drop targets, one of Drop on Body type and one of Drop on Row type.

Both body-specific and row-specific dropping is re­quired (and which must be controlled completely inde­pendently of each other).

Only drop targets of Drop on Body type and Drop on Row type are required; no drop targets of Drop type. Each drop target must have a unique name within the complete set of drop targets.

Both body-specific and row-specific dropping is re­quired (and which do not need to be controlled com­pletely independently of each other).

Drop targets of Drop type are sufficient where depend­ence is required, since each of those drop targets re­sults in two drop targets, one of Drop on Body type and one of Drop on Row type.

A mixture of body-unspecific and row-specific or body-specific and row-unspecific dropping is re­quired.

The above-mentioned conditions are valid.

252 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 253: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.2.6.7 Modifying Drag Sources & Drop Targets at Runtime

It is possible to modify the properties of drag sources and drop targets at runtime. Currently, this mechanism is supported by the GUIBBs List ATS, List, and Tree.

As a prerequisite, the attribute OVERRIDE of the corresponding drag source or drop target must have the value X.

The attribute value can either be set by the feeder class itself, when specifying the Drag-and-Drop definition entries in method GET_DEFINITION, or by an administrator in the GUIBB configuration.

At runtime, the current settings of the drag sources and drop targets are passed to the feeder class using the changing parameter CT_DND_ATTRIBUTES of method GET_DATA. The feeder class can modify these settings and pass them back using the same parameter. To notify the GUIBB runtime about the changes, the exporting parameter EV_DND_ATTR_CHANGED of method GET_DATA must be set to X by the feeder class too. The GUIBB runtime considers the changed settings of a drag source or a drop target if the modification is allowed for this entry, that is, if OVERRIDE = X.

By using this feature it is possible, for example, to disable dragging for particular entries of a table/ tree. This can be done by modifying the property ENABLED of the drag source in GET_DATA based on the selected and dragged table/ tree entry.

It is not possible with this feature to add or remove drag sources or drop targets, or to change their type or name.

3.2.6.8 Drag-and-Drop in Freestyle UIBBs

This section describes the details for ensuring Drag-and-Drop in freestyle UIBBs, as opposed to the GUIBBs.

If a freestyle UIBB is used as a drag source or drop target instead of an FPM GUIBB, similar steps to the ones described in the section Event Processing in a Drag-and-Drop Operation must be performed by the respective freestyle UIBB.

For this, FPM provides a helper-class CL_FPM_GUIBB_DRAG_AND_DROP.

CL_FPM_GUIBB_DRAG_AND_DROP contains the following methods and parameters:

RAISE_DROP_EVENT

FPM GUIBBs use this method internally to raise the FPM_DROP_COMPLETED event during the drop action.

Note that applications can also use this method to raise the FPM_DROP_COMPLETED event during the drop on UIBBs. This can be called in ON_DROP_ACTION method of the UIBB view.

IS_DROP_INFO This attribute sets the drop information of the GUIBB from ON_DROP_ACTION method.

IO_COMP This attribute sets the source UIBB configuration details (Config ID + Config type + Config variant).

IV_COMP_NAME This attribute sets the source UIBB Component Name.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 253

Page 254: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

SET_FPM_DROP_DATA

This method is called from the FLUSH method of the UIBB to set the drag and drop data.

IO_DATA This attribute has a reference to the data from where the drag occurred.

IO_EVENT This attribute sets the event FPM_DROP_COMPLETED to which the dragged data has to be set.

IT_INDICES This attribute sets the selected (dragged) data.

IV_DROP_POSITION (OPTIONAL)

This attribute sets the drop position in the drop target.

IV_CONFIG_KEY (OPTIONAL)

This attribute sets the drag source config key to identify the source.

NoteMethod RAISE_DROP_EVENT of this class can be used for performing step 1 in the section Event Processing in a Drag-and-Drop Operation, and method SET_FPM_DROP_DATA can be used for performing step 3.

Step 2, however, is application-specific.

3.3 Working with Floorplans

A section covering the features and activities concerning the various floorplans.

Related Information

Working with the OVP Floorplan [page 255]Activities relating to the OVP floorplan type.

FPM Error Page [page 266]The Error Page allows FPM applications to exit from the application in a clean manner.

Variants [page 268]You can store multiple variants of a selected floorplan for each FPM application.

Initial Screen [page 269]An optional screen that may appear as the first screen in an FPM application. It might be used, for example, to allow the user to enter data before moving on to the main screen.

Confirmation Screen [page 271]An optional page that is available for all floorplan types. It is generally used to confirm the status of an activity to the user.

Default Actions (Hot Key = Enter) [page 272]Dialog Boxes [page 272]

254 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 255: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Identification Region (IDR) of GAF and OIF Applications [page 277]GAF and OIF applications may contain an additional area for extra information.

Adding and Activating Sub-Steps for GAF Applications [page 281]

3.3.1 Working with the OVP Floorplan

Activities relating to the OVP floorplan type.

Related Information

Dynamic Changes at Runtime [page 255]The FPM framework provides you with APIs to make changes dynamically to an OVP floorplan instance at runtime.

Edit and Display Mode in OVP [page 256]In accordance with SAP UI guidelines there is an explicit edit and display mode for an overview page (OVP) application.

Processing Mode for Collapsed UIBBs (Lazy Loading) [page 258]This feature allows you to determine whether collapsed UIBBs should be immediately instantiated (and take part in the FPM event loop) when they are visible on the page, independent of their collapsed/expanded state, or whether the UIBBs should be instantiated in a 'lazy' manner and take part in the FPM event loop only if they are wire sources, or after they become expanded and visible.

Technical UIBBs [page 259]Some application development areas use a kind of generic controller UIBB that never has a screen presence, but must participate in the FPM event loop to fulfill its controller functionality. The Technical UIBBs feature allows developers to define a UIBB that is never shown on the user interface but that is processed in the FPM event loop as a normal visible UIBB.

Initial Search Page and External Navigation [page 259]

3.3.1.1 Dynamic Changes at Runtime

The FPM framework provides you with APIs to make changes dynamically to an OVP floorplan instance at runtime.

You can use the following APIs to apply dynamic changes at runtime:

● OVP CNR API (IF_FPM_CNR_OVP)Use this interface to perform changes to the following:

○ Toolbar buttons○ Simple page, UIBB, Page Master area, or Page Master UIBB properties

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 255

Page 256: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

○ External navigation menus○ Basic application parameters○ Page selector

● OVP Application Configuration Controller (AppCC) API (IF_FPM_OVP_CONF_EXIT)Use this interface to get complete access to the OVP including the page composition and layout.An application WD component or an ABAP class that should act as an application controller can implement the interface IF_FPM_OVP_CONF_EXIT. Its method OVERRIDE_EVENT_OVP passes a reference to the OVP interface of IF_FPM_OVP to the application.

For a full list of methods and descriptions for both these APIs, see the system documentation.

Related Information

OVP Personalization plus Dynamic Changes [page 350]Unexpected effects might occur in if an OVP application enables personalization, but also performs dynamic changes at runtime using the OVP CNR API IF_FPM_CNR_OVP or the OVP Application Controller API IF_FPM_OVP.

3.3.1.2 Edit and Display Mode in OVP

In accordance with SAP UI guidelines there is an explicit edit and display mode for an overview page (OVP) application.

The edit and display mode for OVP is as follows:

● Normally, an overview page opens in display mode.This means all assignment blocks show their data read-only, and there are no editable fields. The buttons Save and Cancel in the page toolbar are disabled. An Edit button in the assignment block (UIBB) title bar offers the possibility to change the data of this assignment block. A central Edit button in the page toolbar of the overview page (optional) changes all assignment blocks to edit mode. If one or several assignment blocks of the overview page are in edit mode, the Save and Cancel buttons in the page toolbar are enabled.

● After pressing the Edit button of an assignment block, the application normally switches to edit mode, in-place, and gives the user the possibility to edit the data.The Edit button is disabled when the assignment block is in edit mode. An assignment block that was switched to edit mode stays in this mode until the end-user clicks Save (saving all changes in all assignment blocks) or Cancel (discarding all changes in all assignment blocks) in the page toolbar. A save or cancel event sets all assignment blocks on the overview page back to display mode (if the overview page has a display mode).

Enabling Edit/Display Mode for OVP

You can enable an explicit edit and display mode in an overview page using one of the following ways:

● In the General Settings panel of the OVP floorplan configuration● Using the application parameter FPM_EDIT_MODE

256 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 257: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● Using the URL parameter FPM_EDIT_MODE

The first alternative has the lowest priority, the last one has the highest. That is, the application parameter overrules the configuration setting whereas the URL parameter overrules both the application parameter and the configuration setting.

Currently, the following values are supported:

● ‘ ‘: No Mode Handling (Default)No special logic is processed by the FPM regarding display or edit mode. This means that the application behaves in the same way it did before this feature was introduced. There is no automatic enablement or disablement of Edit, Save or Cancel buttons done by the FPM. The UIBBs do not receive information about their current edit mode state.

● E: EditThe application starts at runtime displaying all UIBBs in edit mode. This is typically used for 'create' scenarios.There is an automatic enablement or disablement of Edit, Save or Cancel buttons done by the FPM. All GUIBBs receive information about their current edit mode state through the importing parameter IV_EDIT_MODE of method GET_DATA of the respective feeder class interface. All free-style UIBBs can access information about their current edit mode through method GET_UIBB_EDIT_MODE of the FPM runtime interface IF_FPM.

● R: Read-OnlyThe application starts at runtime displaying all UIBBs as read-only

Configuring Buttons for Edit/Display Mode

If the edit and display mode is used in an application, a local Edit button can be configured in the UIBB toolbar. This button must trigger the FPM event FPM_LOCAL_EDIT. If this button is pressed at runtime the UIBB is transferred into edit mode, and the button is automatically disabled. In the global toolbar, Save, Cancel and Edit buttons can be configured with the FPM events FPM_SAVE, FPM_CANCEL, and FPM_EDIT, respectively. FPM_SAVE and FPM_CANCEL transfer the application globally into display mode, that is, no UIBB stays in edit mode. FPM_EDIT transfers the application globally into edit mode, that is, all UIBBs are transferred into edit mode. In global edit mode, the global edit mode button and all local edit mode buttons are disabled. In global display mode, the global save and cancel buttons are displayed.

As well as the Edit button there are also other buttons allowed for a UIBB that transfer the UIBB directly into local edit mode. One example is an Add button for lists. To enable automatic switching of a GUIBB into local edit mode when such a button is pressed, a new indicator IS_IMPLICIT_EDIT is available in the structureFPMGB_S_ACTIONDEF which is used in the feeder class method GET_DEFINITION for defining non-exposable or exposable feeder class actions. To enable switching of an application-specific UIBB into local edit mode when pressing an application-specific button, two cases have to be distinguished: for exposable actions, the structure FPMGB_S_ACTIONDEF is used again for the action definition and therefore the indicator IS_IMPLICIT_EDIT is available; for non-exposable actions, a new attribute can be set at the FPM event of the button in order to enforce switching to the edit mode. This attribute is defined in class CL_FPM_EVENT and its name is MV_IS_IMPLICIT_EDIT.

NoteImportant precondition: The UIBBs in the configuration must support edit mode; that is, they need to react appropriately on their current edit mode state.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 257

Page 258: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.3.1.3 Processing Mode for Collapsed UIBBs (Lazy Loading)

This feature allows you to determine whether collapsed UIBBs should be immediately instantiated (and take part in the FPM event loop) when they are visible on the page, independent of their collapsed/expanded state, or whether the UIBBs should be instantiated in a 'lazy' manner and take part in the FPM event loop only if they are wire sources, or after they become expanded and visible.

The processing mode is specified at application level, not at individual UIBB level.

You can set the processing mode in the following ways:

● In the General Settings panel of the OVP configuration● Using the application parameter FPM_COLLAPSED_UIBB_PROC_MODE● Using the URL parameter FPM_COLLAPSED_UIBB_PROC_MODE

The first alternative has the lowest priority, and the last alternative has the highest. That is, the application parameter overrules the configuration setting, whereas the URL parameter overrules both the application parameter and the configuration setting.

Currently, the following values are supported for the processing mode:

● ‘ ‘ – Participate (in FPM Event Loop) (Default)UIBBs which are visible on the page are taken into account during the FPM event loop. The UIBBs are instantiated by the FPM runtime as soon as they are visible on the page. The instantiation of the UIBB and their participation in the FPM event loop is independent of the collapsed/expanded state of the UIBBs.

● ‘D’ – Defer Participation (in FPM Event Loop; Lazy Instantiation)Collapsed UIBBs which are visible on the page are not taken into account during the FPM event loop unless they are wire sources or Composite UIBBs that contain UIBBs that are wire sources. They are instantiated in a 'lazy' manner; they are instantiated only after they have been expanded. Note that Composite UIBBs must be instantiated before they have been expanded in order to determine which UIBBs they contain.

CautionThe use of the processing mode for collapsed UIBBs with values other than the default value is critical since not all UIBBs are prepared to be instantiated and to take part in the FPM event loop only if they are visible and expanded or if they are a wire source. For example, if there is coding in a UIBB that reacts on the FPM event FPM_START, the processing mode D should not be used. Collapsed UIBBs on the page (and which are not wire sources) would not be processed during this start event and the specific logic for the start event would not be executed.

Wiring and Lazy Loading

For FPM applications using wiring, the FPM runtime automatically prevents 'lazy loading' for UIBBs which are declared as wire sources; that is, if a UIBB is a wire source, it will be instantiated and take part in the FPM event loop even if it is in a collapsed state. This technique ensures that lazy loading spoils the logical dependencies between UIBBs.

Note, however, that wiring is the only declarative dependency definition known to the FPM runtime. If there are dependencies explicitly hard-coded in application UIBBs, feeder classes, or application controllers, and so on,

258 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 259: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

application development is responsible for ensuring that correct application behavior is not spoiled by lazy loading.

3.3.1.4 Technical UIBBs

Some application development areas use a kind of generic controller UIBB that never has a screen presence, but must participate in the FPM event loop to fulfill its controller functionality. The Technical UIBBs feature allows developers to define a UIBB that is never shown on the user interface but that is processed in the FPM event loop as a normal visible UIBB.

To specify a UIBB as a technical UIBB, select the value T (Hidden but Processed in Event Loop (Technical)) for the attribute Hidden Element of the UIBB in the configuration of the OVP Floorplan.

3.3.1.5 Initial Search Page and External Navigation

In accordance with SAP UI guidelines, an OVP application can have an Initial Page. An Initial Page is used if it is necessary for an end-user to enter data before going to the main screen. The Initial Page can also be used to present a table of objects (for example, recently used objects) that can be selected for further processing. In particular, an Initial Page can contain a search and a search result list. A result list entry may contain one or several links which, when clicked, enforce navigation to further details of the selected object. In addition, a result list may offer a dedicated button that is intended for the creation of a new object.

For example, an OVP application for purchase orders could have an initial screen that enables the end-user to search for certain purchase orders. The purchase orders are then displayed in a result list below the purchase order search criteria. This result list could contain a column showing the Purchase Order ID, and another column showing the Business Partner ID, amongst others. Clicking the Purchase Order ID would trigger navigation to an overview page for the Purchase Order Details, whereas clicking the Business Partner ID would trigger navigation to an overview page for Business Partner Details. Both overview pages, however, belong to different OVP applications. In addition, the purchase order result list might offer a dedicated button that is intended for the creation of a new purchase order. When the end-user chooses this button, the OVP would restart with a different Initial Page.

The following screenshot shows an example of how such an Initial Page could look:

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 259

Page 260: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Ideally, the navigation from an initial search page to the overview page of the same object would be done in-place. In principle, this is no problem for the OVP floorplan. However, current guidelines prescribe to open a new application window whenever applications, or reports, are launched from the result list of a search. In the OVP floorplan, this kind of navigation is realized with the launchpad and appropriate launchpad customizing.

Concept

Technical Details

Start of an OVP Application

When an OVP application is started, the standard FPM event FPM_START is triggered. The target page is determined in the method GET_UIBBS_FOR_EVENT of the OVP floorplan. This can either be a page of type INIT (Initial Screen), if there is one, or a page of type MAIN (Main Page). The standard process of selecting the target page is as follows:

● The default Initial Page will be the starting page.● If there is no default Initial Page, any other Initial Page is selected instead.● If no Initial Page exists, the default Main Page is selected as the target page.

260 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 261: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● If no default Main Page exists, any other Main Page is selected instead.● If there is neither an Initial Page nor a Main Page, an error message is shown.

NoteOverruling the Standard Process: An additional URL parameter FPM_START_PAGE_ID, or an application parameter FPM_START_PAGE_ID can be specified (the URL parameter has the higher priority) to overrule the standard process described above. The value of the parameter must be a valid ID of an Initial Page or Main Page of an OVP application.

NoteDisplaying a Search Page as Initial Page: To do this, the search page must be configured in the configuration editor as the default, or the only Initial Page, or the application must be started using the URL parameter or application parameter FPM_START_PAGE_ID. The search page must contain a Search GUIBB as well as its built-in result list, or a List GUIBB.

Enablement of Navigation from Result List

When the user has executed the search on the initial search page, the result list is shown. To enable the external navigation from the result list entries to an OVP application, the result list must have at least one column containing links. For 'create' scenarios, a dedicated button in the result list toolbar that triggers an external navigation is also possible. Choosing either a cell in a column containing links, or the dedicated button for 'create' scenarios, must trigger the navigation event FPM_NAVIGATE. As a minimum, the navigation event must be supplemented with suitable event parameters that identify an application by launchpad customizing.

The following FPM DDIC structures have been created to support the maintenance of the navigation event parameters in the configuration editor:

Table 47: FPM_S_EXTERNAL_NAVIGATION_KEYComponent Component Type Data Type Length Short Description

LPD_ROLE APB_LPD_ROLE CHAR 10 Role

LPD_INSTANCE APB_LPD_IN­STANCE

CHAR 32 Instance

LPD_APPLICA­TION_ALIAS

APB_LPD_APPL_ALIAS

STRING 0 Application Alias

DDIC structure FPM_S_EXTERNAL_NAVIGATION_KEY defines the general key for a launchpad entry that allows starting an external application. This DDIC structure is included in DDIC structure FPM_S_EXTERNAL_NAVIGATION_BASE which additionally contains the field component SOURCE_ATTRIBUTE_NAME. When clicking a cell in a search result list, this field may contain the name of an alternative list column that carries the relevant object key that is required to process the initial search page in the background.

Table 48: FPM_S_EXTERNAL_NAVIGATION_BASEComponent Component Type Data Type Length Short Description

.INCLUDE FPM_S_EXTER­NAL_NAVIGA-TION_KEY

0 External navigation key

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 261

Page 262: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Component Component Type Data Type Length Short Description

SOURCE_ATTRIB­UTE_NAME

FPM_SOURCE_AT­TRIBUTE

CHAR 30 Source attribute

DDIC structure FPM_S_EXTERNAL_NAVIGATION_BASE is itself contained in DDIC structure FPM_S_EXTERNAL_NAVIGATION_INFO.

Table 49: FPM_S_EXTERNAL_NAVIGATION_INFOComponent Component Type Data Type Length Short Description

.INCLUDE FPM_S_EXTER­NAL_NAVIGA-TION_BASE

0 External navigation base information

INI­TIAL_PAGE_PROC_MODE

FPM_INI­TIAL_PAGE_PROC_MODE

CHAR 1 Processing mode of initial page

EDIT_MODE FPM_EDIT_MODE CHAR 1 Edit mode for OVP floorplan

START_PAGE_ID FPM_CON­TENT_AREA_ID

STRING 0 Start page of the OVP floorplan

This structure offers three more field components:

● INITIAL_PAGE_PROC_MODESpecifies the processing mode of the initial screen of the OVP application. It is described below in more detail.

● EDIT_MODESpecifies the edit mode of the OVP application.

● START_PAGE_IDSpecifies the page that should be displayed when the OVP application is started. This field component is particularly relevant for 'create' scenarios.

Navigation to External Application

To realize the navigation, the feeder class for the result list must expose the FPM event FPM_NAVIGATE in its action definition. Additionally, a DDIC structure, which includes the structure FPM_S_EXTERNAL_NAVIGATION_BASE, must be assigned as an event parameter structure. In the configuration of the result list, a column can be configured with display type Link to Action. Instead of the Standard Action default action assignment, the feeder class action FPM_NAVIGATE should be configured. For 'create' scenarios, a button that is based on the feeder class action FPM_NAVIGATE can be configured. As event parameters for the Link to Action or the button, the launchpad key Role and Instance ID can be maintained as well as the processing mode. If no launchpad key is maintained, a dynamic launchpad entry is created at runtime, restarting the current application configuration externally, that is, ex-place. Using the processing mode of the Initial Page, it is possible to execute the search in the background, parameterized with the data from the selected result list entry providing a unique result; the Main Page is opened, displaying the data for this result.

To display the details of a selected object when navigating externally from the result list of an initial search page to another (or the same) OVP application, you must ensure that the initial search page is not shown again, but is processed in the background instead. For 'create' scenarios, an appropriate page must be displayed which allows data for the new object to be entered. The event which is raised when clicking a navigation link in the search page

262 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 263: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

result list, or on the dedicated button for the creation of new objects, contains a special event parameter INITIAL_PAGE_PROC_MODE. This parameter can have the following values:

● (Blank) – NormalEverything works as if the OVP application is started new and without any special logic.

● E – Execute SearchThe Search GUIBB triggers the FPM event FPM_EXECUTE_SEARCH in PBO in order to execute the search automatically in the background. The required search parameters are derived from the URL before the search is executed. However, no further navigation is triggered.

● L – Execute Search & LeaveThe Search GUIBB triggers the FPM event FPM_EXECUTE_SEARCH in PBO. However, afterwards, the standard FPM event FPM_LEAVE_INITIAL_SCREEN is also triggered. It is expected that the search execution provides a unique search result. As a consequence, the OVP will no longer show the initial search page but navigate directly to the (default) Main Page. Alternatively, the target page can be specified directly in the FPM event LEAVE_INITIAL_SCREEN using the event parameter TARGET_CONTENT_AREA.

● C – CreateThe OVP is started new. However, the event parameter START_PAGE_ID is taken into account, and enables the OVP to start directly with the specified page. This is required for ‘create’ scenarios in which a page, other than the initial search page, must be displayed.

Transferring Field Information of Chosen Link

Field content of the clicked link will be transported to the externally launched application as a URL parameter; the value is taken from the cell in the result list that raised the event. However, if a different component name was specified in the SOURCE_ATTRIBUTE_NAME field , the content of this field is transmitted instead.

The name of the corresponding URL parameter is FPM_NAVI_SOURCE_KEY_ATTR_<component_name>. If the processing mode is set in the configuration, the search is automatically executed with the parameter, having the same name as the component name of the result list. If the component name in the search is different from the result list, a parameter mapping in the launchpad configuration should be defined (therefore, navigation by a static launchpad entry is mandatory). The result list feeder class must make sure that it transfers the first record to the main page content when the FPM_LEAVE_INITIAL_SCREEN event is triggered in the background processing.

ExampleA search for purchase orders has a component PO_ID in the search attributes and search result list. The result list feeder class exposes the event FPM_NAVIGATE with the event parameter structure FPM_S_EXTERNAL_NAVIGATION_INFO. All that application development must do is to choose the display type Link to Action for component PO_ID and to assign the FPM event FPM_NAVIGATE in the result list configuration. In the event parameters, the field INITIAL_PAGE_PROC_MODE has to be set to L (Execute Search & Leave).

NoteIf more than one key field is required for a unique search result, the single field component SOURCE_ATTRIBUTE_NAME in the FPM_S_EXTERNAL_NAVIGATION_INFO structure is not sufficient. In this case, the application can include the structure FPM_S_EXTERNAL_NAVIGATION_INFO into an application-specific structure containing additional field components for the key information. The additional field component names should begin with ‘SOURCE_ATTRIBUTE_NAME’. Alternatively, if five field components for the key information are required, the FPM DDIC structure FPM_S_EXT_NAVIGATION_INFO_ADD5 may be used.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 263

Page 264: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.3.1.5.1 Navigation Events for OVP

Navigation between the various OVP pages is controlled by dedicated FPM events. These FPM events can either be raised by configured button elements, by button elements that are created at runtime using the runtime APIs of the OVP, or by being simply programmed in the application.

The following FPM events are relevant for enabling navigation between OVP pages:

Table 50:FPM Event ID (to be entered in FPM configuration ed­itor)

Description

FPM_BACK_TO_MAIN Leave edit page, and navigate back to last main overview page (without saving the data).

FPM_CALL_DEFAULT_DETAILS_PAGE Navigate to UIBB default details page, specified with the property Default Details Page on the UIBB in the configuration. If there is no default details page for the UIBB, the target content area can either be specified with the property Target Page in the configuration, or with the event parameter TARGET_CONTENT_AREA.

FPM_CALL_DEFAULT_EDIT_PAGE Navigate to UIBB default edit page, specified with the property Default Edit Page on the UIBB in the configu­ration. If there is no default edit page for the UIBB, the target content area can either be specified with the property Target Page in the configuration, or with the event parameter TARGET_CONTENT_AREA.

FPM_CALL_FULL_SCREEN Navigate to edit page. If the edit page marked as de­fault in the configuration is not the desired one, the target edit page can either be specified with the prop­erty Target Page in the configuration or with the event parameter TARGET_CONTENT_AREA.

FPM_CALL_SUBOVERVIEW_PAGE Navigate from main overview to sub-overview page. If the sub-overview page marked as default in the config­uration is not the desired one, the target sub-overview page can either be specified with the property Target Page in the configuration, or with the event parameter TARGET_CONTENT_AREA.

FPM_CHANGE_CONTENT_AREA Navigate to page specified with the property Target Page in configuration.

FPM_CLOSE_DIALOG Close FPM dialog box. This event is raised automati­cally by the standard buttons on the FPM dialog box.

264 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 265: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

FPM Event ID (to be entered in FPM configuration ed­itor)

Description

FPM_ DELETE_CURRENT_OBJECT Navigate to confirmation page. If the confirmation page marked as default in the configuration is not the desired one, the target confirmation page can either be specified with the property Target Page in the con­figuration, or with the event parameter TARGET_CONTENT_AREA.

FPM_DONE_AND_BACK_TO_MAIN Leave edit page, and navigate back to last main overview page (without saving the data).

FPM_LEAVE_INITIAL_SCREEN Leave initial screen and navigate to main overview page. If the main overview page marked as default in the configuration is not the desired one, the target main overview page can either be specified with the property Target Page in the configuration or with the event parameter TARGET_CONTENT_AREA.

FPM_OPEN_DIALOG Open the FPM dialog box specified with the property Target Page in configuration.

FPM_SAVE_AND_BACK_TO_MAIN Transactional event. Leave edit page, and navigate back to last main overview page.

FPM_START Start event of every FPM application. Navigate to in­itial page (if it exists), or to main overview page.

3.3.1.5.2 Controlling the Previous and Next Buttons

A Sub-Overview Page or an Edit Page may have the buttons Previous and Next in their page toolbar for scrolling through items in a list. To be able to control the properties of these buttons automatically, the OVP runtime must be aware of certain information at the point of navigation to the Sub-Overview Page or the Edit Page.

If the currently displayed item on such a page is the first item in the item list, Previous must be disabled; if it is the last item in the item list, Next must be disabled.

To control the properties of these buttons automatically, the OVP runtime must have the following information at the point of navigation to the Sub-Overview Page or the Edit Page (this information can be passed to the OVP using the event parameters indicated below):

● Total number of items in the item list (FPM_ITEM_LIST_TOTAL_ROWS)● Index of the currently selected item (FPM_ITEM_LIST_SELECTED_ROW)

The parameters can be set on all OVP navigation events that trigger navigation to a Sub-Overview or Edit Page. These are as follows:

● FPM_CALL_DEFAULT_DETAILS_PAGE● FPM_CALL_DEFAULT_EDIT_PAGE● FPM_CALL_FULL_SCREEN

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 265

Page 266: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● FPM_CALL_SUBOVERVIEW_PAGE● FPM_CHANGE_CONTENT_AREA

When using these parameters, the OVP runtime enables or disables the Previous and Next buttons depending on the index of the currently selected item. The index is automatically decreased when the FPM event FPM_PREVIOUS_OBJECT is triggered (which happens when the Previous button is pressed), and increased when the FPM event FPM_NEXT_OBJECT is triggered (which happens when the Next button is pressed).

3.3.2 FPM Error Page

The Error Page allows FPM applications to exit from the application in a clean manner.

If an application faces a serious problem, and it is not possible to continue further, the application can display an error page which describes the problem to the end user. No further navigation is possible after navigating to the Error Page.

Structure

The structure of the FPM Error Page is as follows:

● TitleThe page title is always Error. This cannot be influenced by application development.

● Message AreaA short text or short description about the problem can be displayed in the Message Area. The long text can be accessed via the link Display Help.

● Error DetailsThe Error Details section is sub-divided to display more information:

○ Technical Exception displays the technical problem as provided by application development.○ Error Description displays the long text of the problem.○ Additional Information displays documentation created using transaction SE61(SAP Documentation ) that

application development might want to display.

The screenshot below shows an example of how such an error page could look.

266 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 267: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Figure 23: Example of an FPM Error Page

Features

The FPM Error Page supports the following:

● Navigation to Error Page using APIThe application can call the method DISPLAY_ERROR_PAGE in the IF_FPM interface. Use parameter IO_ERROR_DETAILS.

● Support for T100 messages, Bapiret2, exception objects, and OTR to pass error data.The factory class CL_FPM_ERROR_FACTORY enables the application to create error data in a structured format using any of the following sources displayed on the Error Page. The methods available are named in the following table (for a list of the parameters, see the system):

Table 51:Method Name Description

CREATE_FROM_BAPIRET2 Used to create error data if the application has error information in the form of Bapiret2.

CREATE_FROM_T100 Used to create error data if the application has error information in the form of T100 table.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 267

Page 268: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Method Name Description

CREATE_FROM_OBJECT Used to create error data if the application has error information in the form of an exception object.

CREATE_FROM_OTR Used to create error data if the application has error information in the form of OTR.

CREATE_FROM_EMPTY_DATA To get error object when no error data is available.

● Log viewing using transaction SLG1Logs can be seen using transaction SLG1 in the corresponding system under the FLOORPLAN_MANAGER object, the RUNTIME sub-object, or the External ID (Error ID if provided). The Error ID can be passed from the application while calling the Error Page . The log contains both the long text and short text of the problem.

3.3.3 Variants

You can store multiple variants of a selected floorplan for each FPM application.

The final configuration of a GAF road map, OVP page, or OIF view switch may sometimes only be decided at run-time.

For example, assume that an initial screen asks you to select one of three options. The subsequent road map or view switch that appears is dependent on the option you selected in the initial screen. FPM makes this possible by allowing you to configure variants. Each variant is a complete set of configurations. You use the input from the initial screen (or from other start-up information, such as application parameters) to select one of the variants.

You can configure variants in FLUID, the FPM configuration editor.

Related Information

Configuring Variant Selection [page 269]You can configure variants of the floorplan component of an application. This allows for a different screen to be displayed at runtime, depending on what the user selects in a previous screen. Variant selection is controlled programmatically with an application-specific configuration controller (AppCC).

268 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 269: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.3.3.1 Configuring Variant Selection

You can configure variants of the floorplan component of an application. This allows for a different screen to be displayed at runtime, depending on what the user selects in a previous screen. Variant selection is controlled programmatically with an application-specific configuration controller (AppCC).

Context

To configure variant selection, proceed as follows:

Procedure

1. Implement the interface IF_FPM_OIF_CONF_EXIT (or IF_FPM_GAF_CONF_EXIT) in one of the application components or in a new component. This interface has only one method OVERRIDE_EVENT_OIF (or OVERRIDE_EVENT_GAF) which passes a handler object of type IF_OIF (respectiveIF_GAF). This handler object provides the API with information to manipulate the floorplan configuration at runtime.

2. Select the variant.Use the SET_VARIANT method of this object as shown in the following code for an OIF floorplan:

method OVERRIDE_EVENT_OIF . ... case io_oif->mo_event->MV_EVENT_ID. when if_fpm_constants=>gc_event-leave_initial_screen. io_oif->set_variant( ).

In the sample code above, the variant selection takes place after the initial screen is exited. This is the latest point at which it is possible to select the variant. You can, however, select the variant at an earlier stage.

3. Declare the AppCC to the FPM.Open FLUID, the FPM configuration editor, for the component configuration. In the General Settings panel, choose Floorplan Settings Application-Controller Settings . Enter the Web Dynpro component which you are using as an application-specific configuration controller.

4. Save your changes.

3.3.4 Initial Screen

An optional screen that may appear as the first screen in an FPM application. It might be used, for example, to allow the user to enter data before moving on to the main screen.

To add an Initial Screen to your application, open FLUID, and display the Navigation panel. Choose New Initial Screen .

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 269

Page 270: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

FPM adds the Continue button automatically to the toolbar of the Initial Screen. It is non-configurable. When you choose this button at run-time, FPM raises the event IF_FPM_CONSTANTS=>GC_EVENT-LEAVE_INITIAL_SCREEN, exits the Initial Screen, and displays the first main screen of the application.

Related Information

Skipping the Initial Screen [page 270]An Initial Screen is not always necessary in an application. There are several methods which you can use to skip this screen.

3.3.4.1 Skipping the Initial Screen

An Initial Screen is not always necessary in an application. There are several methods which you can use to skip this screen.

Context

Some applications may start with an Initial Screen in which the user selects the object he or she intends to work with. If the object is already known by the application (for example, the application is called with the parameters already set), the initial screen is unnecessary.

To bypass an initial screen at runtime, complete the following step:

Procedure

Launch the FPM event LEAVE_INITIAL_SCREEN.

You can launch this in the following ways:

○ in the OVERRIDE_EVENT_*-method of your application-specific configuration controller (AppCC)○ in the PROCESS_BEFORE_OUTPUT method of one of your UIBBs in your Initial Screen if you are not using

an AppCC

data: lo_fpm type ref to if_fpm, lv_object_id type string.* Check event id if lv_event_id = if_fpm_constants=>gc_event_start.* Determine if Parameter OBJECT_ID is provided lo_fpm = cl_fpm_factory=>get_instance( ). lo_fpm->mo_app_parameter->get_value( exporting iv_key = 'OBJECT_ID' importing ev_value = lv_object_id ).* In case OBJECT_ID is set, navigate directly to the main floorplan * area if not lv_object_id is initial. lo_fpm->raise_event_by_id(

270 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 271: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

if_fpm_constants=>gc_event-leave_initial_screen ). endif endif

NoteFor an application with an Initial Screen that contains only GUIBBs (and no freestyle UIBBs), and which does not use an AppCC, you must use the GET_DATA method of the relevant feeder class. There is no PROCESS_BEFORE_OUTPUT method available for applications if only GUIBBs are used (and therefore, it is not possible to raise the FPM event LEAVE_INITIAL_SCREEN.

3.3.5 Confirmation ScreenAn optional page that is available for all floorplan types. It is generally used to confirm the status of an activity to the user.

Confirmation screens are most commonly found in applications based on the Guided Activity Floorplan (GAF) to conclude a particular activity. However, they are also required in applications using other floorplan types when deleting an object. A confirmation screen provides users with final information before they leave the application.The confirmation screen can contain hyperlinks to related applications, or to restart a guided activity. Confirmation screens are available for all floorplans.

The floorplan type determines when and where exactly a confirmation screen appears in an application:

● OVP and OIF FloorplansConfirmation Screen appears only when the object currently being processed in the application is deleted.

● GAF FloorplanConfirmation Screen appears as the final step at the end of the roadmap to inform the user that the action he or she has just executed has been successfully completed.

The confirmation page gives you the option of creating a separate Quick Help. However, you can only enter text directly into the quick help; you cannot add any of the generic text objects you have created in transaction SE61. You can also include any number of application-specific views (UIBBs) on the confirmation screen. You have the option of including a generic UIBB ( FPM_CONF_STEP) that refers users to additional applications, or useful information by displaying hyperlinks. This GUIBB allows you to integrate a separate launchpad (type: Embedded) to add any other supplemental navigation destinations. You can also add texts that summarize the success of the application as a component of this GUIBB.

NoteConfirmation screens which use the FPM_CONF_STEPGUIBB can be configured only using the standard Web Dynpro configuration editor.

To add a Confirmation Screen to your application, open FLUID, and display the Navigation panel. Choose NewConfirmation Screen .

You can configure separate confirmation screens for individual variants for OIF and GAF instances.

In OVP instances, you configure as many confirmation screens as you need, and specify which Confirmation Screen you must navigate to when deleting an object and raising the IF_FPM_CONSTANTS=>GC_EVENT-DELETE_CURRENT_OBJECT event.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 271

Page 272: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.3.6 Default Actions (Hot Key = Enter)

The floorplan components allow the definition of default actions, that is, of an action that is triggered automatically when the Enter key is pressed.

Such a default action can, but need not, be related to a button element (for example, a normal button, toggle button, or button-choice). An example of where a button-related default action makes sense is an Initial Page with a Continue button that should automatically be triggered on pressing Enter .

You can define a default action for a button element in the Floorplan Manager (FPM) configuration editor, FLUID, by selecting Enter for the Hotkey attribute of the button element. A default action can also be defined using the CNR (Context Navigation Region) APIs or the Application Configuration Controller APIs at runtime. Note that only one button element on a page can have the Hotkey value Enter.

Default actions that are not related to a button element can be defined by specifying an FPM event on page level, or technically speaking, on the content area level. This can also be done in FLUID at design time or by using the runtime APIs.

If both a default action related to a button element and a default action that is not related to a button element are defined on a page, the default action that is related to the button element has the higher priority; when Enter is pressed, the action of the button element is triggered, not the action that is defined on the page level.

3.3.7 Dialog Boxes

Use

Dialog boxes are primarily used to inform users of a system action, to ask users to enter missing data, or to ask a user to actively confirm or reject a system action.

FPM provides a framework for supporting dialog boxes for all floorplan instances. An application can contain multiple dialog boxes, each dialog box having a unique ID.

Structure

In Floorplan Manager (FPM) applications, dialog boxes are essentially pages in a floorplan component. These pages are composed of at least one UIBB but often contain several UIBBs.

The Context Navigation Region (CNR) and the Identification Region (IDR) are not available in the FPM dialog boxes.

In accordance with current UI guidelines, FPM supports up to three levels of dialog boxes (opening one dialog box from within another dialog box). The level, on which a dialog box is opened, determines the available buttons:

● Levels 1 and 2Dialog boxes on these levels display any of the following button sets:

○ OK and Cancel

272 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 273: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

○ Close○ No button

● Level 3Dialog boxes on this level displays only the Close button. It is not possible to open another FPM dialog box from a dialog box on level 3.

Activities

● FLUIDAlthough dialog boxes are mostly configured through their respective feeder classes, you can also configure dialog boxes with the FPM configuration editor, FLUID.You find the dialog boxes in your application in the Navigation panel in FLUID. You can configure, amongst others, the following properties:

○ Type of UIBB to be added to a dialog box (for example, a freestyle UIBB or a GUIBB)○ Arrangement of the UIBBs in the dialog box○ Selection of the button set○ Quick Help text○ Alternative button text○ Button tooltips○ Title○ Size

● Calling Dialog BoxesAlthough you can assign a dialog box to a button, mostly the application determines the dialog box, and the system calls it through the OPEN_ DIALOG_BOX method of interface IF_FPM, or through an FPM event. This is detailed in a following section.

● Navigation to an Error PageNavigation to an error page from dialog boxes is also possible, and at all levels of dialog boxes. If the application encounters an error during the processing of a dialog box, and subsequently wants to navigate to an error page, it can be done by calling the API of the error page. The main screen is replaced by the error page, and the dialog box is automatically closed. No further navigation is then possible.

● Enabling/Disabling Dialog Box Buttons at RuntimeDialog box buttons can be enabled or disabled at runtime (except for the Cancel button). An API IF_FPM->SET_DIALOG_BUTTON_STATUS is provided to set the status of the dialog box button, as the sample code below shows:

data: lv_button type wdr_popup_button.lv_button = wd_comp_controller->lr_fpm->set_dialog_button_status( iv_button = lv_button "the button type iv_status = ABAP_TRUE ).

Related Information

Opening and Closing FPM Dialog Boxes [page 274]

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 273

Page 274: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

You can open and close dialog boxes using API methods and FPM events.

Creating a Dialog Box using FLUID [page 275]

Message Management for FPM Dialog Boxes [page 315]FPM manages the message handling (with respect to the parent component and the FPM dialog boxes) in terms of visibility and lifetime of a message in FPM dialog boxes.

3.3.7.1 Opening and Closing FPM Dialog Boxes

You can open and close dialog boxes using API methods and FPM events.

You can open FPM dialog boxes using the following methods:

● IF_FPM APIThe floorplan interface IF_FPM contains the method OPEN_DIALOG_BOX. The Dialog ID must be passed to this API. The table below describes the method with its parameters:

Method Name Parameters Description

OPEN_DIALOG_BOX IV_DIALOG_BOX_ID

IS_DIALOG_BOX_PROPERTIES (optional)

IO_EVENT_DATA (optional)

This method is used in the applica­tion to open the dialog box. Prop­erties of the Web Dynpro compo­nent and event data can also be exported.

The code below shows how to open a dialog box using direct API calls:

DATA : lo_fpm TYPE REF TO if_fpm, lv_window_id TYPE fpm_dialog_window_id.lv_window_id = ‘CONTENT_AREA_1’ .lo_fpm = cl_fpm_factory=>get_instance( ). lo_fpm->open_dialog_box( EXPORTING iv_dialog_box_id = lv_window_id ).

● FPM eventAll the UIBB types that can be used in the main screen can also be used in FPM dialog boxes. FPM events, or any application-specific events, can be handled in the FPM dialog boxes.Raise the FPM event (FPM_OPEN_DIALOG) CL_FPM_EVENT =>GC_EVENT_OPEN_DIALOG_BOX, and raise the event using the RAISE_EVENT methodThe closing of FPM dialog boxes is handled by FPM itself; FPM triggers an event (FPM_CLOSE_DIALOG) CL_FPM_EVENT=>GC_EVENT_CLOSE_DIALOG_BOX.

The code below shows how to open a dialog box by raising an FPM event:

DATA : lo_event_params TYPE REF TO if_fpm_parameter, lr_event TYPE REF TO cl_fpm_event, lv_window_id TYPE fpm_dialog_window_id, lo_fpm TYPE REF TO if_fpm.

lv_window_id = ‘CONTENT_AREA_1’ .CREATE OBJECT lo_event_params type cl_fpm_parameter.

274 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 275: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

lo_event_params->set_value( EXPORTING iv_key = if_fpm_constants=>gc_dialog_box-id iv_value = lv_window_id).CREATE OBJECT lr_event EXPORTING iv_event_id = cl_fpm_event=>GC_EVENT_OPEN_DIALOG_BOX io_event_data = lo_event_params.

lo_fpm = cl_fpm_factory=>get_instance( ). lo_fpm->raise_event( lr_event ).

Determining the State of an FPM Dialog Box

The IF_FPM~MV_IS_DIALOG_MODE attribute provides information on the state of an application, that is, whether it is in a dialog screen or in a main screen. The application can read the state (OPENED or CLOSED) using this attribute.

Transient Behavior

FPM takes care of transient behavior. Transient behavior is enabled only when the FPM dialog box is closing. The parent screen of the FPM dialog box is not released even if transient behavior is switched on. The dialog box component is released when it is closed.

3.3.7.2 Creating a Dialog Box using FLUID

Prerequisites

The application-specific view (UIBB) that forms the basis of the new dialog box exists in the system already.

Context

You can create a dialog box in your application using the FPM configuration editor, FLUID.

Procedure

1. Open the floorplan component configuration of your application.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 275

Page 276: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

2. In the Navigation panel, in edit mode, choose the New Page button and add a page of type Dialog Box.

3. Choose the Attributes button on the main toolbar to display the attributes of this new page.

4. Enter an ID and name for the dialog box page.

5. On the <Floorplan> Schema tab, choose Add UIBB.

6. Choose the type of UIBB that forms the basis of your dialog box and enter the following attributes:

○ Component○ Window Name○ Configuration Name

7. (Optional) Add further UIBBs by choosing the Add UIBB button.

8. In the Navigation panel, choose the dialog box again to display its attributes and select the set of buttons you want on your dialog box.

9. (Optional) You can also determine the following attributes of the dialog box in the Attributes panel:

○ Layout of the UIBBs○ Title○ Quick Help text○ Tooltips for each button○ Alternative text for each button○ Size

10. Save the configuration.

3.3.7.2.1 Assigning a Dialog Box to a Button using FLUID

Use

You can configure a button using the FPM configuration editor, FLUID, in an FPM application such that when users press the button at runtime a dialog box is opened.

Prerequisites

You have created and configured the dialog box.

Procedure

1. Open the floorplan component configuration of your application.2. In the Navigation panel, choose the page in which you want to create the button.3. In the Toolbar Schema tab, select the row containing the toolbar in which you want to add your new toolbar

element.

276 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 277: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

4. Choose Add Toolbar Element.5. Choose one of the application-specific function buttons.

A new row appears on the Toolbar Schema tab showing the new button. You are now ready to enter the relevant information about this button in the Properties/Attributes panel.

6. In the Properties/Attributes panel, enter the following information:

○ A new label○ Enter FPM_OPEN_DIALOG in the FPM Event ID field.

7. (Optional) You can also determine, amongst others, the following properties/attributes of the button:

○ Quick Help text○ Tooltip

8. Choose Add Parameter in the Maintain Event Parameters section of the Properties/Attributes panel.9. Enter DIALOG_BOX_ID in the Parameter Name field.10. In the Parameter Value field, enter the ID of the dialog box that you want this button to open.11. Save and test the configuration.

RecommendationWe recommend that you use OTR aliases for these texts and that you not enter any direct OTR text here. You can use and reuse OTR aliases, which greatly reduces effort when editing because you have to make only one change that affects all references.

More Information

● Flexible User Interface Designer (FLUID)

3.3.8 Identification Region (IDR) of GAF and OIF Applications

GAF and OIF applications may contain an additional area for extra information.

Structure of the IDR

The IDR consists of the following three areas:

● Header AreaDisplays the application title

● Ticket areaDisplays information that more narrowly specifies the activity

● Items areaDisplays descriptors and values (so-called value-pairs) providing additional information

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 277

Page 278: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Configuring the IDR in FLUID

You can configure the IDR in the FPM configuration editor, FLUID; choose the Configure IDR button in the <Floorplan> Schema panel. The following elements are displayed:

● idrBasic (IDR Basic)You can add an application title and a tooltip for the title here

● idrExtended(IDR Extended) (available for OIF instances only)You can add the ticket and items information here. Attributes for Ticket Top and Ticket Bottom can be called dynamically to add label/value pairs, label/navigation link pairs, and label/icon pairs to the ticket area.

Changing the IDR Dynamically

During runtime, you can use the IDR API to make changes to the individual IDR areas. This API consists of the methods encapsulated in the IF_FPM_IDR interface.

Adding a Link in the IDR to the FPM Configuration Editor

Currently, the following options provide a link in the IDR header area of your FPM application that points to the FPM configuration editor, FLUID:

● Using transaction SU3To do this, proceed as follows:Open transaction SU3 and choose the Parameters tab.Add the parameter FPM_CONFIG_EXPERT and set the Parameter Value to X. The Change Configuration link appears in the IDR header area when you start the FPM configuration editor, using the Web Dynpro Explorer, for your application configuration. This corresponds to a change of the explicit and implicit configuration in development mode.

● Starting your FPM application with URL parameter SAP-CONFIG-MODE=XThe link Adapt Configuration appears in the IDR header area when you start the FPM configuration editor using Web Dynpro application CUSTOMIZE_COMPONENT. This corresponds to a customizing of the explicit and implicit configuration in the administrator mode. In the administrator mode you may adapt all elements of the configuration that have not been marked previously as final elements in the development mode.

Related Information

IF_FPM_IDR [page 279]This interface provides you with methods to change the IDR dynamically at runtime.

278 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 279: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.3.8.1 IF_FPM_IDR

This interface provides you with methods to change the IDR dynamically at runtime.

Accessing the Interface

The sample code below shows you how to access this interface:

DATA: lo_idr TYPE REF TO if_fpm_idr, lo_fpm TYPE REF TO if_fpm.lo_fpm = cl_fpm_factory=>get_instance( ).lo_idr ?= lo_fpm->get_service( cl_fpm_service_manager=>gc_key_idr ).

Methods of the IDR Header Area

Method Description

GET_APPLICATION_TITLE Retrieves the title text and its tooltip.

SET_APPLICATION_TITLE Displays a new title text and tooltip in the header area.

SET_HEADER_VISIBILITY Makes the header area visible or invisible.

Methods of the IDR Ticket Area

Method Description

GET_TICKET Retrieves the texts of the ticket top, ticket bottom and their tooltips.

SET_TICKET Displays new texts of the ticket top, ticket bottom and their tooltips.

SET_TICKET_VISIBILITY Makes the ticket area visible or invisible.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 279

Page 280: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Methods of the IDR Items Area

Method Description

ADD_ITEM_GROUP_BY_VALUE Adds a new item group to the item area. One item con­sists of a label, its tooltip, a value and the value’s tool­tip. A group of items consists of an arbitrary amount of such items. With this method, you can add items to the IDR as simple static text strings. Therefore, if the value of an item needs to be changed at a later point in time, you will need to call method CHANGE_ITEM_GROUP_BY_VAL. The method ADD_ITEM_GROUP_BY_REF can also be used to pass references to Web Dynpro context nodes to the IDR. In this case, the value changes automatically when the value of the corresponding attribute in the context node changes.

CHANGE_ITEM_GROUP_BY_VALUE Changes the label and values that were passed to the IDR via the method ADD_ITEM_GROUP_BY_VAL.

ADD_ITEM_GROUP_BY_REF Similar to ADD_ITEM_GROUP_BY_VAL. Adds label/value items to the IDR. In this case, the value is not passed as a static text but as reference to a Web Dyn­pro context node attribute. The advantage here is that the value can be of a type other than string. In addition, updating the value happens automatically; whenever the attribute of the context node changes, the IDR changes the visible value. It is also possible for the IDR to show the unit of the value. Do this using a flag; the actual unit is taken from the DDIC information of the value’s type. Therefore, this feature will only work if the type of the attribute in the context node (that is passed to the IDR) has a defined DDIC unit.

ADD_NAVIGATION_ITEM Adds a pair of label/navigation links to the IDR. The link itself is provided by the report launchpad. It makes no difference whether the link in the report launchpad is supplied by the database or is created dynamically dur­ing runtime via the report launchpad API. For more in­formation about the report launchpad, refer to the re­port launchpad documentation. You specify the launchpad via the parameters instance and role. Since one launchpad may contain several targets (and this method is used to add only one target), use an addi­tional parameter to specify the single target. The addi­tional parameter is either the application alias or the navigation key.

280 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 281: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Method Description

CHANGE_NAVIGATION_ITEM Use this method to edit a pair of label / navigation links that you added using the method ADD_NAVIGATION_ITEM. It is possible to change only the label and the link text with this method. If you want to change the target itself, use the report launchpad API.

ADD_IMAGE_ITEM Adds pairs of label/icons to the IDR.

CHANGE_IMAGE_ITEM Edits a label/icon pair that you added using the method ADD_IMAGE_ITEM.

CONTAINS_ITEM_GROUP Checks whether a certain item group exists within the IDR.

REMOVE_ITEM_GROUP Removes a certain item group from the IDR.

INITIALIZE_ITEMS Clears all items from the IDR.

SET_ITEMS_VISIBILITY Edits the visibility of the item area (the visibility status of all items, not just single items).

3.3.9 Adding and Activating Sub-Steps for GAF Applications

The configuration of substeps is similar to that of main steps. You can add one or more substeps to a main step, and each substep can contain one or more UIBBs.

In FLUID, navigate to the floorplan component, and in the Guided Activity Schema panel, choose the main step for which you want to add a substep. Choose the Add Substep button on the schema toolbar.

Once a substep has been configured statically, you may invoke it at runtime using the FPM API. This is done by raising an FPM event. Before raising this event, the event parameters are populated with the corresponding substep ID that you want to use.

This is shown in the sample code below:

DATA: lo_fpm TYPE REF TO if_fpm, lr_event TYPE REF TO cl_fpm_event. * get reference to FPM API lo_fpm = cl_fpm_factory=>get_instance( ). * create event lr_event = cl_fpm_event=>create_by_id(cl_fpm_event=>gc_event_change_step ). * fill event parameters lr_event->MO_EVENT_DATA-set_value(iv_key = cl_fpm_event=>gc_event_param_mainstep_id iv_value = <ID of Main Step> ). lr_event->MO_EVENT_DATA->set_value( iv_key = cl_fpm_event=>gc_event_param_substep_id iv_value = <ID of Sub-Step> ). lr_event->MO_EVENT_DATA->set_value(iv_key = cl_fpm_event=>gc_event_param_subvariant_id iv_value = <ID of Sub-Step variant> ). * now raise event wd_this->fpm->raise_event( io_event = lr_event )

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 281

Page 282: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4 Working with FPM Framework Features

A description of the features provided by the FPM framework, and how to use them.

Related Information

FPM Toolbars [page 282]Providing Users with Quick Help [page 293]Sharing Data between UIBBs [page 295]

A description of some of the possible approaches to sharing data, and how FPM supports the communication between UIBBs.

FPM Message Management [page 306]FPM message management is an integral part of Floorplan Manager, and is available to all applications that use the standard floorplans. It guarantees consistent and guideline-compliant message handling.

Work-Protect Mode [page 326]Floorplan Manager allows the application to make use of the 'work-protect mode' offered by SAP Enterprise Portal and SAP NetWeaver Business Client (NWBC) (that is, to display a data-loss dialog box when the user closes the application without first saving the data).

Transaction Handling [page 326]A description of the optional interface for handling transactions, IF_FPM_TRANSACTION.

Resource Management [page 328]The larger an FPM application is, the more important resource management becomes. Performance issues, due mainly to heavy memory consumption (usually due to the embedded UIBBs within an application), might be encountered.

Application Controllers [page 332]A description of the application controllers provided by the FPM framework.

Navigation with Launchpads [page 336]A summary of the options available for navigation with launchpads in FPM.

Determining Navigation State Information at Runtime [page 343]FPM provides an interface to determine information on the navigation state of an application at runtime.

3.4.1 FPM Toolbars

Floorplan Manager allows you to construct toolbars according to the latest SAP UI guidelines. You choose which toolbar elements you require (buttons, links, and so on), and FPM positions them in a predetermined location according to the latest SAP UI guidelines.

282 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 283: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Toolbars of the Different FloorplanTypes

There are differences between the toolbars of the various floorplan types:

● OIF Floorplan TypeThere is only one toolbar in every OIF variant. FPM automatically adds a Save button to an OIF toolbar when you create the component configuration. As the Save button belongs to the category Activation Function, you can configure it (for example with a tooltip, label or event).

● GAF Floorplan TypeIn a GAF application, every main step and substep inside a variant has its own toolbar. This enables you to have a different toolbar configuration at each step in the roadmap. FPM automatically adds the Next and Previous buttons to a GAF toolbar when you create the component configuration.

NoteThere is no such thing as a main toolbar in a GAF application. If you require a particular button on the toolbar at each step in the roadmap, you add it to each main step toolbar.

● OVP Floorplan TypeIn total, there are three different kinds of toolbars in an OVP configuration:

○ Global toolbar (or Page Header toolbar)○ Assignment block toolbar (or UIBB toolbar)○ Page Master toolbar

FPM toolbars can be broken down into the following parts:

● Toolbar Elements● Toolbar Element Events● Toolbar Element Attributes

These are described in the following sections.

3.4.1.1 Toolbar Elements

FPM allows you to configure a variety of toolbar elements.

Types of Toolbar Elements

The following toolbar elements are available:

● Standard function buttonsThese include buttons such as Check, Edit, Finish, and Read-Only

● Application-specific buttonsThese are buttons to which you add your own code.Application-specific buttons are available in several forms, including the following:

○ Button-choice

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 283

Page 284: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Buttons which offer the user a dropdown menu with a list of further options. A button-choice is indicated in the Add Toolbar Element dialog box by a small arrow in the bottom right-hand corner of the button.You can define the individual menu options in a button-choice and attach events to them. FPM provides no predefined events for these menu options but allows you to attach your own events instead. You attach your own predefined events to a button by entering a Menu Option Name (a label) and an Event ID. When the menu option is selected during runtime, the FPM calls up the attached event.

○ Toggle-button (available in OVP floorplan only)○ Dropdown list box (available in OVP floorplan only)

● Navigation menusYou can add the following links to your toolbars:

○ You Can Also○ Related Links

These links support navigation to external applications from the runtime UI through the use of a launchpad. They are rendered as button-choices. The menu items of the button-choices are the entries that are defined in the Customizing for the respective launchpad (transaction LPD_CUST).

Adding and Defining Toolbar Elements

You can add and define the various toolbar elements for each kind of toolbar in the FPM configuration editor, FLUID, by choosing the Add Toolbar Element button in the Toolbar Schema panel or by dragging toolbar elements from the Repositories panel in to the Toolbar Schema panel .

3.4.1.1.1 Toolbar Element Attributes

Toolbar elements have a variety of attributes, and not every element has the same attributes.

The following table lists some of the non self-explanatory toolbar element attributes:

Table 52: FPM Toolbar Element AttributesAttribute Description

Element ID Enter an Element ID if you want to change the proper­ties of a toolbar element dynamically during runtime.

Sequence Index This allows you to choose the order in which your appli­cation-specific UI elements (for example Other Function buttons) appear on the toolbar or in the hier­archy. The toolbar elements which FPM automatically adds to the toolbar cannot be rearranged using this at­tribute.

284 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 285: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Attribute Description

Repeat Sel. Action (Repeat Select Action) This is available for button-choice elements. If you tick this checkbox, the menu option that is selected from a button-choice at runtime will then be visible as the but­ton choice title for the current session. If the user wishes to select the same option next time, he must click only the button and not scroll through the list of menu options.

Enabled This grays out a toolbar element; it renders a toolbar element unusable if the checkbox is not ticked.

Visibility If you check the visibility attribute of both the button and the button-choice, only the button is visible in the toolbar.

Capture Actions (OVP only) There is an additional method for assignment blocks and Page Master toolbars. If the UIBB, on which the as­signment block or the page master is based, exposes actions at runtime (for example when the UIBB is based on a generic UIBB and the list of actions is pro­vided by the feeder class), you can select the Capture Actions attribute for the toolbar. FPM then uses the UIBB API to determine the available toolbar actions at runtime, and the resulting buttons are added to the panel header toolbar alongside the configured buttons.

3.4.1.1.2 Toolbar Element Events

Toolbar elements trigger events. Some of these events are provided by the FPM framework, others are implemented by application development.

Every Standard Function button is attached to an FPM event (for example, the Edit button is connected to the FPM event GC_EVENT_EDIT). The connection to these raised FPM events is hard-coded and cannot be changed. The event can, of course, be changed dynamically by calling other events.

Some button events are pre-configured by the FPM framework (for example, the Previous and Next navigation button events, and the Save button event) and require no extra code, but generally the application must provide the event processing.

In general, FPM ensures only that all affected UIBBs are informed. For example, although the FPM provides a Print button, there is no print support in FPM. FPM provides this button only to ensure that it is rendered according to the SAP UI guidelines. The application must provide the necessary print functions.

For a list of the FPM Event IDs, see the system documentation for CL_FPM_EVENT.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 285

Page 286: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.1.1.3 Description of Individual Toolbar Elements

FPM provides several types of toolbar elements.

The following table describes the available elements for FPM toolbars:

Table 53: FPM Toolbar ButtonsToolbar Button Name Description

Activation Function (OIF) The button within this category is placed in the first po­sition on the toolbar. It is the most important event on the screen, and is intended primarily to be used as Save button. The FPM configuration editor automati­cally adds this button to your configuration by default. The FPM event FPM_SAVE is set as the default FPM Event ID, but you can edit this.

Alternate Function (OIF) If another important event (besides the activation func­tion) exists, applications can define an alternate func­tion. This is placed directly bedsides the Activation Function button.

Other Function (OIF and GAF) All other application-specific events are defined within the Other Functions area. These buttons are placed af­ter the standard buttons.

You Can Also and Related Links (All floorplan instan­ces)

Provide navigation menu options away from FPM appli­cation. Require a Role and an Instance, both of which are taken from a launchpad (you must create and con­figure this beforehand).

You can configure both links in the FPM configuration editor. Technically, they are identical. However, they can be configured with a different parameter set. In contrast to the OIF and GAF floorplans, the OVP floor­plan allows you to configure You Can Also and Related Links per single OVP page.

Exit to Main Step (GAF) This is available only to substeps. If you click this but­ton during run-time you return to the Main Step to which the button is assigned.

Finish (GAF) Available only to Main Steps. If you click this button during run-time, the roadmap is executed sequentially; the FPM will navigate automatically through the road­map as far as the last screen (before the confirmation screen) or will stop prematurely if it encounters an er­ror.

Final Action (GAF) You can explicitly define your own final action. This but­ton is displayed directly next to the Next step button in the roadmap.

286 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 287: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Toolbar Button Name Description

Next Step (GAF) Included automatically in the roadmap. Extra attributes are available for Next step in the final roadmap step.

NoteUp until SAP NetWeaver 7.03, the Close button appears automatically on the FPM toolbar. You cannot configure it like the standard function buttons. You can hide it by using the CNR API or with an application parameter, FPM_HIDE_CLOSE=X. From 7.03 onwards, applications based on FPM do not provide a Close button at all because the browser window is closed using the browser's X (Close) button in the top right-hand corner To add a Close button to your FPM application, you must provide application parameter FPM_HIDE_CLOSE with value space. When this parameter is set, then the button will appear. For more

information, see 1612699 and 1526176 .

3.4.1.2 Adjusting Toolbars Dynamically

There are various APIs which you can use for making changes to the toolbars at runtime.

● OIF and GAF ToolbarsDuring runtime, the content and visibility of the OIF and GAF toolbars may be changed using the following Context Navigation Region (CNR) APIs:

○ IF_FPM_CNR_GAF○ IF_FPM_CNR_OIF

Using these APIs you can dynamically change the FPM toolbars of both the initial screen and the main screen.● OVP Toolbars

You can use the following APIs to apply dynamic changes at runtime for OVP toolbars:

○ OVP CNR API (IF_FPM_CNR_OVP)○ OVP Application Configuration Controller (AppCC) API (IF_FPM_OVP_CONF_EXIT)

Use this interface to get complete access to the OVP including the page composition and layout.

Related Information

The Application-Specific Configuration Controller [page 332]

The FPM Application Controller [page 335]The FPM application controller can be used to control and steer the application as a whole.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 287

Page 288: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.1.2.1 IF_FPM_CNR_GAF (and OIF)

Interfaces providing methods to dynamically change the FPM toolbar of an initial screen or main screen in a GAF-based or OIF-based application.

Accessing the Interface

These interfaces are accessed through CL_FPM_SERVICE_MANAGER, as the following code shows (example shows a GAF-based application):

DATA: lo_cnr_gaf TYPE REF TO if_fpm_cnr_gaf, lo_fpm TYPE REF TO if_fpm.lo_fpm = cl_fpm_factory=>get_instance( ).lo_cnr_gaf ?= lo_fpm->get_service(cl_fpm_service_manager=>gc_key_cnr_gaf ).

Methods of the Interface

Table 54: Methods of IF_FPM_CNR_GAF and IF_FPM_CNR_OIF InterfacesMethod Description

DEFINE_BUTTON With this method either standard buttons or applica­tion-specific buttons can be created and edited. The parameter IV_FUNCTION defines the button type (see IF_FPM_CONSTANTS=>GC_BUTTON). The ELEMENT_ID is needed if application-specific buttons must be changed subsequently.

DEFINE_BUTTON_CHOICE With this method either standard button-choices or ap­plication-specific button-choices can be created and edited. The parameter IV_FUNCTIONdefines the but­ton-choice type (see IF_FPM_CONSTANTS=>GC_BUTTON_CHOICE). The ELEMENT_ID is needed if application-specific buttons must be changed subsequently.

CREATE_SEPARATOR Use this method to create a separator at runtime in the OTHER_FUNCTIONS area (application-specific).

DEFINE_YOU_CAN_ALSO Use this method to define launchpads for the You Can Also menu bar.

DEFINE_RELATED_LINKS Use this method to edit the menu bar for Related Links menu bar.

GET_BUTTONS This method determines which buttons (and their con­figurations) are to be shown in the toolbar.

288 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 289: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Method Description

GET_BUTTON_CHOICES This method determines which button-choices (and their configurations) are to be shown in the toolbar.

GET_SEPARATORS This method determines the positions of the separa­tors in the toolbar (only in the Other Functions area).

GET_RELATED_LINKS This method determines the contents of the Related Links menu in the toolbar.

GET_YOU_CAN_ALSO This method determines the contents of the You Can Also menu in the toolbar.

GAF-Specific Parameters

Depending on the location of the UI elements that should be defined, the following parameters are passed with every GAF CNR API method:

Table 55:Location of UI Element Parameters

Main Step VARIANT_IDMAINSTEP_ID

Sub-Step VARIANT_ID, MAINSTEP_ID, SUBVARIANT_ID, SUBSTEP_ID

Initial Screen SCREEN

OIF-Specific Parameters

Since a toolbar exists for every OIF variant, only the VARIANT_ID must be passed with every OIF CNR API method.

3.4.1.2.2 Example: Method Calls to Change CNR of GAF at Runtime

Example code showing method calls to change the CNR of the GAF at runtime.

DATA: lo_cnr_gaf TYPE REF TO if_fpm_cnr_gaf, lo_fpm TYPE REF TO if_fpm.lo_fpm = cl_fpm_factory=>get_instance( ).lo_cnr_gaf ?= lo_fpm->get_service( cl_fpm_service_manager=>gc_key_cnr_gaf ).lo_cnr_gaf ->define_button( EXPORTING iv_variant_id = < optional; e.g. 'variant_1'; current variant if skipped > iv_mainstep_id = < optional; ‘mainstep_1’; current mainstep if skipped > iv_subvariant_id = < optional;‘subvariant_xyz’>

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 289

Page 290: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

iv_substep_id = < optional;‘substep_99’> iv_function = < e.g. EXIT_TO, FINISH, OTHER_FUNCTIONS (appl-specific buttons), SAVE_DRAFT, NEXT_STEP) see also IF_FPM_CONSTANTS=>gc_button > iv_screen = < optional; the screen where the UI-Element has to be changed (INIT, MAIN) >

iv_element_id = < optional; only if you want to change the properties of application-specific buttons afterwards> iv_sequence_id = < optional; only if you use OTHER_FUNCTIONS; determines the place where to insert this button > iv_design = < optional; Button-Design > iv_enabled = < optional; Button-Enabling > iv_explanation = < optional; Button-Explanation > iv_on_action = < optional; determines the Event-Id for a button; not possible with standard buttons > iv_text = < optional; Button-Label > iv_tooltip = < optional; Button-Tooltip > iv_visibility = < optional; Button-Visibility > iv_default_button = < optional; only for NEXT button; by pressing enter within an application triggers the action of this button> ).

iv_hotkey = < optional; key-combination for activating the event of this button>

lo_cnr_gaf->define_button_choice( EXPORTING iv_variant_id = < optional; e.g.'variant_1'; current variant if skipped >

iv_mainstep_id = < optional;‘mainstep_1’; current mainstep if skipped > iv_subvariant_id = < optional;‘subvariant_xyz’> iv_substep_id = < optional;‘substep_99’> iv_function = < e.g. OTHER_FUNCTIONS (appl-specific button-choices)> iv_screen = < optional; the screen where the UI-Element has to be changed(INIT, MAIN) > iv_element_id = < optional; only if you want to change the button-choice properties afterwards> iv_sequence_id = < optional; only if you use OTHER_FUNCTIONS; determines the place where to insert this button-choice > iv_enabled = < optional; Button-Choice-Enabling > iv_text = < optional; Button-Choice-Label > iv_tooltip = < optional; Button-Choice-Tooltip > iv_visibility = < optional; Button-Visibility > it_menu_action_items = < menu elements of a Button-Choice > ).

3.4.1.2.3 Example: Method Calls to Change the CNR of the OIF at Runtime

Example code showing method calls to change the CNR of the OIF at runtime.

DATA: lo_cnr_oif TYPE REF TO if_fpm_cnr_oif, lo_fpm TYPE REF TO if_fpm.lo_fpm = cl_fpm_factory=>get_instance( ).lo_cnr_oif ?= lo_fpm->get_service( cl_fpm_service_manager=>gc_key_cnr_oif ).lo_cnr_oif->define_button( EXPORTING iv_variant_id = < optional; e.g. 'variant_1'; current variant if skipped > iv_function = < e.g. ACTIVATION_FUNCTIONS (appl-specific buttons),ALTERNATE_FUNCTIONS (appl-specific buttons), CHECK, DELETE_OBJECT, EDIT, LOAD_DRAFT, NEW, NEXT_OBJECT, OTHER_FUNCTIONS (appl-specific buttons), REVIOUS_OBJECT, PRINT, PRINT_PREVIEW, READ_ONLY,REDO, REFRESH, SAVE_AS, SAVE_DRAFT, SEND, START_OVER, UNDO, see also IF_FPM_CONSTANTS=>gc_button >

290 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 291: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

iv_screen = < optional; the screen where the UI-Element has to be changed (INIT, MAIN) >

iv_element_id = < optional; only if you want to change the button properties afterwards > iv_sequence_id = < optional; only if you use OTHER_FUNCTIONS; determines the place where to insert this button > iv_design = < optional; Button-Design > iv_enabled = < optional; Button-Enabling > iv_explanation = < optional; Button-Explanation > iv_on_action = < optional; determines the Event-Id for a button; not possible with standard buttons > iv_text = < optional; Button-Label > iv_tooltip = < optional; Button-Tooltip > iv_visibility = < optional; Button-Visibility > iv_default_button = < optional; only for buttons CHECK and REFRESH; by pressing enter within an application triggers the action of this button > iv_hotkey = < optional; key-combination for activating the event of this button > iv_hotkey = < optional; Button-Hotkey > iv_action_type = < optional; action type of the button event – standard or validation-independent > iv_image = < optional; Button-Icon > lo_cnr_oif->define_button_choice( EXPORTING iv_variant_id = < optional; e.g. 'variant_1'; current variant if skipped > iv_function = < e.g. NEW, OTHER_FUNCTIONS (appl-specific button-choices), PRINT, PRINT_PREVIEW, SEND, see also IF_FPM_CONSTANTS=>gc_button_choice > iv_screen = < optional>; the screen where the UI-Element has to be changed (INIT, MAIN) > iv_element_id = < optional; only if you want to change the button-choice properties afterwards > iv_sequence_id = < optional; only if you use OTHER_FUNCTIONS; determines the place where to insert this button-choice > iv_enabled = < optional; Button-Choice-Enabling > iv_text = < optional; Button-Choice-Label > iv_tooltip = < optional; Button-Choice-Tooltip > iv_visibility = < optional; Button-Visibility > it_menu_action_items = < menu elements of a Button-Choice >

3.4.1.3 Configuring a Button as the Default Button

Use

Floorplan Manager gives you the ability to set buttons as default buttons in the toolbar. If you set a button as a default button, the system performs the action triggered by the button once a user has entered data or after he or she has performed an action and pressed the Enter key.

Features

In Floorplan Manager, a button is set as a default button using the Default Button attribute. Only one button can be set as the default button for each Web Dynpro component.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 291

Page 292: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The following restrictions apply to the selection of buttons as default button:

● On the initial screen of a Floorplan Manager application, only the Start button (technical name: START) can be given the attribute of default button.

● In the toolbar of a guided activity floorplan (GAF), you can only give the Next Step button (technical name NEXT) the attribute of default button.

● In the toolbar of an object instance floorplan (OIF), you can give the Check (technical name CHECK) and Refresh (technical name REFRESH) buttons the attribute of default button.

Activities

You can set the Default Button indicator of a button in the Attributes panel in the configuration editor for Floorplan Manager.

3.4.1.4 Configuration of a Button Choice

Use

A ButtonChoice enables users to select different actions using the same button, where possible actions are shown to the user in a selection list below the button.

Floorplan Manager enables you to use the last action selected as the default action for a button. When the button is chosen again, the system automatically selects this action without the user having to select it again from the selection list.

Features

In Floorplan Manager, this behavior can be set for each ButtonChoice using the Repeat Selected Action indicator.

If this indicator is set for the button, the system sets the last action selected for the button as the default action and simultaneously renames the button to the name of the action.

The default action is only valid until the user closes the application or chooses a new action for the button from the selection list. If the user reopens the application, the system once again shows the standard name for the button. If the user selects a new action, it then becomes the new default action.

Activities

You can set the Repeat Selected Action indicator in the button choice attribute view in the configuration editor for Floorplan Manager.

292 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 293: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.2 Providing Users with Quick Help

Using Quick Help you can provide your users with extra, context-sensitive information as they progress through an application.

Helpful explanations can be assigned to various application elements, including the following:

● Initial screen of an application● Main step and substep in a Guided Activity Floorplan (GAF) application● Subview of an Object Instance Floorplan (OIF) application● Assignment blocks in an Overview Page (OVP) floorplan● Toolbar buttons● Dialog boxes

Using FLUID, you can enter Quick Help text for an element in one of the following ways:

● Enter text directly in the Explanation Text attribute of the element● Enter a reference to a documentation object containing the text in the Explanation Document attribute of the

element

If you enter a text directly and enter a reference to a documentation object, then the content of the documentation object takes priority and is displayed as Quick Help.

If the Quick Help text is to be used in multiple views or applications, it is better to give a reference to a documentation object since the text must only be written in one place.

Quick Help can be turned on and off by the user at runtime (using the Display Quick Help option of the context-menu).

Related Information

Creating Quick Help [page 293]Creating a Documentation Object [page 294]

3.4.2.1 Creating Quick Help

Create Quick Help text to provide extra information to your application users at runtime.

Procedure

To create Quick Help text in the FPM configuration editor, FLUID, you can either enter the Quick Help text directly, or enter a reference to a documentation object.

1. Select the element in the application for which you want to create the Quick Help text (for example, a subview, main step, substep, or initial screen).

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 293

Page 294: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

2. In the Attributes panel, do one of the following:

○ in the Explanation Text field, enter the text you would like○ In the Explanation Document field of the Attributes panel, enter the technical name of the documentation

object

If there are no such fields in the Attributes panel, choose Add Explanation from the toolbar of the floorplan schema tab.

3. Save and test the configuration.To test the configuration, make sure Quick Help is activated; choose the context-menu option Display Quick Help at runtime.

3.4.2.2 Creating a Documentation Object

Context

A documentation object contains useful, context-sensitive information for the user. You can assign it to various elements in an application. This information can be displayed to the user at runtime to enable him or her to better understand the particular objects on the screen.

One documentation object can be used by several different elements in several applications.

Note that the information is displayed at runtime only when Quick Help is activated.

Procedure

1. Choose SAP Menu Tools ABAP Workbench Utilities SE61 - Documentation .

2. Choose General Text as the document class.

3. Enter a technical name for the documentation object.

4. Choose Create.

5. Enter the desired Quick Help text.

6. Choose Save Active.

The documentation object is now created and can be assigned as a Quick Help to an element in an application.

Next Steps

See also Creating Quick Help

294 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 295: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.3 Sharing Data between UIBBs

A description of some of the possible approaches to sharing data, and how FPM supports the communication between UIBBs.

FPM does not define the way in which different UIBBs communicate. This is because FPM sits on top of several, very different frameworks, and also because of the different requirements of applications with regard to this topic.

FPM offers the following concepts for sharing data between UIBBs, each with their own advantages and disadvantages:

● Central instances● Event parameters● Wiring● FPM Shared Data component (now considered obsolete)

These concepts are not mutually exclusive - they can be used together.

3.4.3.1 Central Instances

A central instance is an object that can be accessed by all UIBBs, at all times, and retains information which might be interesting for the other UIBBs.

During the FPM event loop, in the FLUSH phase, all UIBBs store their updated data in it; in later phases the other UIBBs can obtain the data from it that they require.

The easiest approach to realize such a central instance is by using a singleton. However there is a drawback: it is generally not seen as good practice to use singletons in situations where a sole instance of a class is not really required. From a practical point of view, however, there is no real problem with this.

Nevertheless, you can avoid such a singleton quite easily, using the following approach:

1. Use an application-specific configuration controller (AppCC), or an application controller (IF_FPM_APP_CONTROLLER) as a central instance.

2. Choose one of the following ways to register your central instance with the application parameters of the related FPM instance:

○ If your component supports multi-instantiation, you should add something similar to the code below to the INITIALIZE_FPM method of your central instance:

IO_FPM->MO_APP_PARAMETER->SET_VALUE( IV_KEY = ‘MY_CENTRAL_INSTANCE’ IV_VALUE = me ).

○ If your component does not support multi-instantiation, you should use method WDDOINIT (or the Constructor of a class-based controller) of your central instance:

Data: LO_FPM type ref to IF_FPM. LO_FPM = CL_FPM_FACTORY=>GET_INSTANCE( ). If LO_FPM is bound. LO_FPM->MO_APP_PARAMETER->SET_VALUE( IV_KEY = ‘MY_CENTRAL_INSTANCE’ IV_VALUE = me ). Endif.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 295

Page 296: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3. Now the UIBBs can access your central instance any time through the IF_FPM interface:

Data: lo_appcc type ref to <my_app_cc>. MO_FPM->MO_APP_PARAMETER->GET_VALUE( EXPORTING IV_KEY = ‘MY_CENTRAL_INSTANCE’ IMPORTING EV_VALUE = lo_appcc ).

The advantage of using central instances is that they are easy to implement.

However, although this approach itself is quite simple and clean, it favors bad design; central instances tend to be designed and implemented in a very application-specific way. It might be the case that you cannot reuse them. Additionally, in using an AppCC as a central instance, it is easy to introduce dependencies between UI, UI interaction logic, and the business logic.

3.4.3.2 Event Parameters

Event parameters within the FPM event loop can be used to share data between UIBBs.

UIBBs interact with the FPM framework's own phase model – the FPM event loop. This event loop is triggered either by the framework (following a user interaction), or by application code. The event loop starts when an FPM event is raised, and during the FPM event loop, callbacks for all involved UIBBs are made, and the FPM event is passed to these callbacks. Along with the event, there is also a parameter bag (store), which can be used to pass arbitrary information from UIBB to UIBB.

The following simple example illustrates this concept:

Let us assume a GAF-based application with two steps; Step 1 contains UIBB1 with an input field, Step 2 contains UIBB2: this UIBB requires the value that the user enters in the input field in Step 1.

The task is, therefore, to pass this information using events whenever the user navigates from Step 1 to Step 2.

When the user chooses the Next button or Step 2 in the roadmap, the user starts the FPM event loop:

● FLUSH: UIBB1 is informed of the new value, and stores it● PROCESS_EVENT: UIBB1 adds the value to the FPM event

IO_EVENT->MO_EVENT_DATA->SET_VALUE( IV_KEY = ‘MY_KEY` IV_VALUE = <value> ).

● PROCESS_BEFORE_OUTPUT: UIBB2 retrieves the value from the event

IO_EVENT->MO_EVENT_DATA->SET_VALUE( EXPORTING IV_KEY = ‘MY_KEY` IMPORTING EV_VALUE = <value> ).

The advantage with this concept is that no additional instances are needed.

However, communication by event only is only appropriate for very simple applications. Difficulties arise due to the fact that only the UIBBs that are part of the screen, either before or after the event, are informed. Another UIBB, say, in Step 3, is not informed of the new value. The more complex your application, the more you require additional central instances.

296 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 297: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.3.3 Wiring

Wiring is a mechanism to transport data across UIBBs; the data flow is defined in the floorplan configuration.

In the configuration, you define a set of wires, and each wire connects a target UIBB with a dedicated outport of a source UIBB. A wire also assigns a connector class which can be used to implement additional logic to be processed between the source and target UIBB.

As a precondition for wiring, UIBBs must provide a feeder-model instance. This is a configured feeder class for the FPM GUIBB which implements the feeder model interface. The interface pattern allows the exchange of any kind of object references between feeder models and connector classes; the type of object is decided by the application. It could be a data access API so that each UIBB could directly retrieve the data from it, but it could also be a simple bag of keys so that the UIBB could still retrieve the data from a central instance (by providing the specific key for the data it is supposed to access). Regardless of the option chosen, the main goal of wiring is to transport information about UI interactions that dictate data flow. For example, the lead selection of a master table that controls the data shown in a details view.

The main use-cases for wiring are generic feeder classes on business object models such as BOPF, BOL, SPI or SADL. Using appropriate feeder class parameters, such feeder classes can act on any business object node. Only the GUIBB configurations point to specific nodes whereas the generic feeder classes are always the same for each type of GUIBB. Connector classes can be used to directly forward the data or keys between the UIBBs, and they can also be parameterized on associations, and process the association at runtime. Using this method, the UIBBs are unaware of how they get the data; the UIBBs only need to know which kind of data they shall provide, and hence they can be reused in semantically-different contexts.

Wiring is fully integrated into the FPM runtime. In particular, if the source and target UIBB of a wire participate in the process-before-output (PBO) phase of an FPM event, the FPM framework ensures that the source is called before the target. It is clear that no wire cycles must be configured, that is, the wiring is a directed tree graph (which may have separate components). If source and target UIBB do not participate in the same PBO phase of an FPM event, then the application must be structured such that it is not possible that the target participates in an earlier event than the source.

The following views for configuring wiring at design time in FLUID are available:

● Wire Schema panel in conjunction with the Attributes panel● Graphical Wire Editor

In both cases, a namespace concept prevents feeder classes and connector classes, which do not fit together, being configured in wires.

The advantage of the wiring concept is that the data flow is defined by configuration. UIBBs are processed at PBO in the correct order. In particular, no additional synchronization events are needed to keep dependent UIBBs up-to-date, for example, if master selections are changed at PBO. Additionally, wiring is especially designed for reuse as for generic adapters on business object models, so that complex transactional applications can be built without any application-specific code. Only generic feeder and connector classes can be reused in specific configurations.

The disadvantage of wiring is that there is initial effort required to implement the connector classes and feeder model classes. It is not worth the effort if it is used only for a specific application without any further reuse.

Related Information

FPM Wire Model [page 298]

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 297

Page 298: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Floorplan Manager (FPM) enables you to define wires between user interface building blocks (UIBBs) as a means of transferring information from the source UIBB to the target UIBB. A wire controls the runtime interdependencies between two UIBBs, that is, wires determine the data content of a target UIBB depending on the user interaction changing the outport of the source UIBB. Wires are configurable, and are based on reusable connector classes.

3.4.3.3.1 FPM Wire Model

Floorplan Manager (FPM) enables you to define wires between user interface building blocks (UIBBs) as a means of transferring information from the source UIBB to the target UIBB. A wire controls the runtime interdependencies between two UIBBs, that is, wires determine the data content of a target UIBB depending on the user interaction changing the outport of the source UIBB. Wires are configurable, and are based on reusable connector classes.

Wire Model Concept

The FPM wire model can be used to create running FPM applications by pure configuration or, at least, with minimal coding effort. The runtime inter-dependencies between UIBBs are defined by configuration entities called wires which are based on reusable connector classes implementing the dependency semantics. The primary use-cases for the wire model are object models with generic access interfaces (for example, Enterprise Service Framework (ESF), Business Object Process Framework (BOPF), or Business Object Layer (BOL)).

Wires are defined on the level of the floorplan configuration. Each UIBB can only be defined as a target once, otherwise the system cannot decide at runtime where the user interface building block takes its information from. An application can use a UIBB as a source multiple times.

You create and define your wires using the FPM wire model interfaces, and the Graphical Wire Editor or Wire Schema panel in FLUID.

NoteIf the floorplan contains composite components (such as a Tabbed component), the UIBBs contained in the Tabbed components can also be wired. For Tabbed components, a UIBB is determined as a wire plug. This wire plug is used by the surrounding Web Dynpro component to access the Tabbed component. In an FPM application, the surrounding Web Dynpro component is either the floorplan or another Tabbed component. One wire for this plug is then defined on the level of the surrounding floorplan or Tabbed component. This architecture makes it possible to reuse the Tabbed component in other floorplans or Tabbed components without having to redefine all the wires each time.

NoteApplication areas or object models define their own namespaces for which their connector classes, and feeder class model classes can be reused. Moreover, they typically need to provide a transaction handler class which manages transaction events like SAVE, MODIFY, or CHECK, and global message handling.

298 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 299: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Example

An application wants to define a search with a search component, but wants to display the results in a list defined using a separate list component. Below this list, the application wants to show the details of the selected list entry in a form defined using a form component.

To map this, the application must define two wires: one between the search and the list and one between the list and the form. The source of the wire between the search and the list is the search component; the target is the list component. The Collection outport type is selected to transfer all of the search data to the list. The source of the wire between the list and the form is the list component; the target is the form component. Since only the detailed data for lead entry is to be displayed in the form, the Lead Selection outport type is selected.

The execution of a search on the search component will change its collection outport and may therefore change the data content of the result list displayed in the list component. Similarly, changing the lead selection in a list of sales orders may change the data contents of another list displaying the associated sales order items.

Related Information

Wires [page 299]Wiring with the Graphical Wire Editor [page 303]

3.4.3.3.1.1 Wires

Wires

Each wire consists of the following parts:

● Source UIBBThe source is always a UIBB and is always specified using its Web Dynpro component name as well as, if necessary, an assigned configuration.

● Outport SpecificationThe outport specification of the source UIBB is comprised of the following parts:

○ Outport TypeSpecifies which information the system transfers across the wire. There are three outport types:

○ CollectionTransfers information about all entries in the source UIBB to the connector class.

○ Lead SelectionTransfers information about the entry that has been selected in the source UIBB to the connector class.

○ SelectionTransfers information about all entries selected in the source UIBB to the connector class.

○ Outport IdentifierAllows you to have multiple instances of the outport types.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 299

Page 300: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● Target UIBBThe target is always a UIBB and is always specified using its Web Dynpro component name as well as, if necessary, an assigned configuration.

● Connector ClassImplements a connector interface between the source and target UIBBs. The connector class controls the information overall by defining the dependencies between the UIBBs. The connector class can define separate parameters that the administrator can edit in the wire attributes.

3.4.3.3.1.1.1 Wire Model Interfaces

To be part of the FPM wire model, a freestyle UIBB must implement a particular Web Dynpro interface, IF_FPM_UIBB_MODEL, which, in turn, provides a feeder class model implementation. These interfaces are described in the this section.

The wire model uses the following interfaces:

NoteThe FPM generic user interface building blocks (GUIBBs) are automatically integrated if their feeder classes implement the feeder class model interface.

● IF_FPM_UIBB_MODELFreestyle UIBBs which act as sources or targets of wires must implement this Web Dynpro interface. You only need to implement the method GET_MODEL_API such that it returns a bound reference to the ABAP OO feeder model interface.

● IF_FPM_FEEDER_MODELThe feeder class model interface contains methods which are called by the FPM framework. These methods are described in the following table:

Table 56: IF_FPM_FEEDER_MODEL MethodsMethod Name Description

GET_NAMESPACE Returns the namespace of the underlying application area. Method is called at design time.

SET_CONNECTOR Called upon instantiation of a UIBB. It provides the connector (reference to IF_FPM_CONNECTOR_RUN which can be accessed for data retrieval at PBO.

GET_INPORT_KEY Returns a reference to an object key which charac­terizes the meta data type expected at the inport (for example, the business object node). Method is called at design time.

GET_OUTPORTS Provides a table of outports comprising the object key, the port type, an identifier, and a descriptive text. Method is called at design time.

300 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 301: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Method Name Description

GET_OUTPORT_DATA Returns an object reference carrying the actual data identifier for a certain port. Method is called at run­time.

The actual object type and the type of data it contains (keys, GUIDs, or entity references, and so on) is left to the design of the actual namespace. However, it is important that there is a consistent handling inside a namespace, and that the data identifier allows each feeder class model to uniquely identify the runtime data to be accessed.

● IF_FPM_CONNECTORTheIF_FPM_CONNECTOR connector interface comprises the following:

○ IF_FPM_CONNECTOR_DEFFor defining the access by the FPM framework. This interface possesses a static attribute,SV_NAMESPACE, which should be filled with the namespace in the class constructor of a connector implementation (for example, in a common superclass). The methods of this interface are described in the following table:

Table 57: IF_FPM_CONNECTOR_DEF MethodsMethod Name Description

GET_PARAMETER_LIST Connector classes can be parameterized to flexibly control their runtime behavior. The parameter val­ues are maintained for the wires in the FPM config­uration editor. A parameter is defined by a name, its data type, and a descriptive text.

GET_PARAMETER_VALUE_SET With this method, a connector implementation can provide a value set for each parameter. For exam­ple, in an object model a parameter may carry the association name. For a wire between specified UIBBs, the method may provide a list of all associa­tions between the source and target business ob­ject node.

INITIALIZE With this method the connector is initialized with the parameter values. This method is called by the FPM runtime upon UIBB instantiation.

SET_INPUT Receives an object reference carrying the actual data of the connected outport. This method is called before the UIBB’s PBO by the FPM runtime.

○ IF_FPM_CONNECTOR_RUNFor runtime access by the application feeder class model. It contains all the methods which are concurrently called in the request-response cycles at runtime. The methods of this interface are described in the following table:

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 301

Page 302: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Table 58: IF_FPM_CONNECTOR_RUN MethodsMethod Name Description

GET_OUTPUT Returns an object reference carrying the actual data to be displayed by a UIBB. This method can be called by the UIBB at PBO for example in the GET_DATA method of a feeder class.

CREATE_ENTITY Creates and returns a data entity which can be ar­bitrarily typed. This method can be called by an ac­tion handler of the UIBB for example in the PROCESS_EVENT method of a feeder class.

IS_CREATE_ALLOWED Returns a Boolean indicator whether entity crea­tion is allowed. This method can be called by the UIBB at PBO to dynamically control the activation of create buttons for example to maintain the ac­tion usage parameter in the GET_DATA method of a feeder class.

● IF_FPM_WIRE_MODEL_TRANSACTIONThe transaction interface provides methods for handling global and transactional events. In the FPM configuration editor, one transaction handler implementation can be assigned on the level of the wire model. The methods of this interface are desribed in the following table:

Table 59: Transaction Handler Interface MethodsMethod Name Description

START Receives basic data such as the FPM message han­dler, and application parameters. This method is called once at application start.

AFTER_FLUSH This method is called after FLUSH has been called for all current UIBBs. It can be used to flush buffers.

AFTER_PROCESS_EVENT This method is called after PROCESS_EVENT has been called for all current UIBBs. It can be used for handling transactional events ( for example, SAVE or CHECK. Moreover, it can be used to collect messages which are not handled inside UIBBs, and to forward them to the FPM message handler.

AFTER_PROCESS_BEFORE_OUTPUT This method is called after PROCESS_BEFORE_OUTPUT has been called for all current UIBBs. It can be used to collect messages at the latest possible point in time before screen out­put.

AFTER_NEEDS_CONFIRMATION This method is called after NEEDS_CONFIRMATION has been called for all UIBBs. It can be used to ana­lyze and add confirmation requests.

302 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 303: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Method Name Description

IS_DIRTY This method can be used to indicate a dirty state for the work protection mode

3.4.3.3.1.2 Wiring with the Graphical Wire Editor

Use

Wires transfer information from a source UIBB to a target UIBB.

In addition to the Wire Schema tab page in the Floorplan Manager (FPM) configuration editor, FLUID, there is also a tool, the Graphical Wire Editor, for viewing, editing, and creating the wires you need in your application.

Structure

The Graphical Wire Editor is divided into the following areas:

● Repository PanelUIBBs that are not currently wired in your application are displayed in the Available UIBBs repository panel.

● Work AreaA central work area displays the UIBBs in your application that are currently wired, along with information regarding their outport specifications and connector classes. Each UIBB is displayed as a box containing the name of the UIBB component type, the configuration name and an icon to show the type of UIBB component.Outport specifications are displayed as colored arrows on the edges of the boxes, with labels displaying the outport type.

● WiresThe wires are displayed graphically as arrows joining one UIBB box with another.Labels of connecting wires are provided by the connector interface.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 303

Page 304: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The figure below shows the layout of the Graphical Wire Editor:

Figure 24: Graphical Wire Editor

Integration

Choose the Graphical Wire Editor button on the Wire Schema tab page in FLUID to start the application.

Wires that you create using the Graphical Wire Editor appear on the Wire Schema tab.

Features

The Graphical Wire Editor has the following features

● Drag-and-drop enabledYou can move the UIBB boxes around the screen, and to and from the repository panel. You can also drag the wires to different UIBB boxes.

● Multiple selection of UIBB boxes possible● Context menu for deleting objects and provision of connector details

304 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 305: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Procedure

Creating a Wire with the Graphical Wire Editor

1. Run the application and choose the Customize Page icon in the toolbar.2. Create a new Customizing for the component if none exists and select the relevant transport request.

FLUID is opened and displays the application in design mode.3. Choose the Wire Schema panel.

If wires have been configured in your application, they are displayed in the table.4. Choose the Graphical Wire Editor button to open the Graphical Wire Editor.5. To create a new wire, click an outport arrow on a UIBB box and drag the arrow onto another UIBB box.6. The Connector Data dialog box appears, allowing you to choose the Connector Class and related Connector

Parameters.To display the Connector Data dialog box at any time, double-click the connecting lines between the UIBBs.

7. Choose Done to save your changes and return to the FLUID.

More Information

● Flexible User Interface Designer (FLUID)● Wiring - Transferring Information between UIBBs

3.4.3.4 FPM Shared Data Component

FPM Shared Data (IF_FPM_SHARED_DATA)

The FPM Shared Data concept is not applicable to GUIBBs.

A shared data component is a Web Dynpro component which implements the marker interface IF_FPM_SHARED_DATA. Each component (freestyle UIBB or application controller) that wants to access the shared data component must declare a usage of the shared data component. The FPM runtime then attaches the same instance of the shared data component to these usages. The shared data component can then access the business data, and expose it through its context or interface methods, and the consuming components can access it.

The advantage with this concept is that the shared data component is instantiated by the FPM runtime, and the single instance can be accessed by the consuming components by standard Web Dynpro methods.

However, this mechanism is not applicable to GUIBBs as feeder classes are kept outside the Web Dynpro programming model. Since freestyle UIBBs are now only considered as exceptional break-out scenarios for missing GUIBB functionality, this mechanism is considered obsolete.

Related Information

Using a Shared Data Component [page 306]

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 305

Page 306: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.3.4.1 Using a Shared Data Component

A shared data component is a Web Dynpro component which implements the IF_FPM_SHARED_DATA interface. This interface contains no methods or attributes but serves as a marker interface only. Each component (for example UIBB, FPM_OIF|GAF_CONF_EXIT component) which wants to use a shared data component needs to declare a usage to the shared data component. For this, the technical type of the usage does not need to refer to IF_FPM_SHARED_DATA (this would mean that it would not have accessible methods/attributes) but link to the actual component itself. The lifecycle handling is now handled completely by the FPM. Whenever a component is instantiated by the FPM (for example a UIBB which is configured for a given screen), the FPM analyzes all usages of that component. If it detects a usage pointing to a component which implements the IF_FPM_SHARED_DATA interface, a singleton of this shared data component is automatically attached to the usage. As a result, an application must proceed as follows to share data using the shared data interface:

● Create a component which implements the IF_FPM_SHARED_DATA interface. This component contains methods to retrieve data from the business logic and exposes the extracted UI data via its Web Dynpro context or interface methods.

● Each component accessing this shared data defines a usage of the shared data component. This usage is automatically instantiated by the FPM.

● The consuming component can now communicate with the shared data component via Web Dynpro context mapping, attribute access or method calls.

3.4.4 FPM Message Management

FPM message management is an integral part of Floorplan Manager, and is available to all applications that use the standard floorplans. It guarantees consistent and guideline-compliant message handling.

FPM message management can be divided into the following parts:

● Message ManagerThe 'Message Manager' refers to the interface IF_FPM_MESSAGE_MANAGER. This interface can be accessed by another interface, IF_FPM, and provides you with methods to perform the following tasks:

○ Clear messages○ Raise exceptions○ Report messages

The individual methods and their attributes for the tasks above are described in a later section.● Message Area

All messages to be reported are displayed in theMessage Area. This UI element is included in all FPM applications.You can make the following changes to the Message Area in FLUID, in the General Settings panel of the floorplan configuration:

○ Set the maximum message sizeWhen the application displays your messages, the message area expands to accommodate the number of messages that you enter in the Maximum Message Size field. Once the number of messages exceeds

306 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 307: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

the maximum limit, a scroll bar appears in the message area. Thus you can view messages other than those immediately visible in the Message Area.

○ Turn on the message log○ Change the display behavior of the Message Area

You can determine whether the Message Area is always visible in the application, or whether it is visible only when a message must be displayed.

● Message LoggingYou can produce a log of the messages for your application. When the message log is turned on, all the previously reported messages can be seen. When a message is to be reported, the Display Message Log link appears in the Message Area. Note that this link appears only when there is at least one message in the log.

NoteYou can also turn on the message log by using the URL parameter FPM_SHOW_MESSAGE_LOG=X. However, if you turn on the message log in the General Settings panel, you cannot turn it off using the URL parameter.

● Message MappingThis refers to the practice of mapping system messages that are currently displayed by the system to an alternate, business-context related, and more understandable message for the user. You can access the Message Mapping Settings through the Floorplan Settings control in the General Settings panel of the floorplan configuration.

NoteIt is possible to use the Web Dynpro message manager along with the FPM message manager. However, you must create and maintain your own reference of the Web Dynpro message manager. Messages that are reported directly into the Web Dynpro message manager will not be maintained by FPM after they are reported, and the application must handle the message independent of the FPM lifetime and visibility functions. Exceptions logged directly into the Web Dynpro message manager are not logged under the FPM_RUNTIME_MESSAGES checkpoint group.

NoteIt is possible to use the FPM floorplan but not to use the FPM Message Area. However, FPM message manager functions such as automatic lifetime handling, consolidated dialog box display, and so on is not then available.

3.4.4.1 Interface: IF_FPM_MESSAGE_MANAGER

A description of the methods and attributes provided by the interface, allowing you to control message management in a logical manner.

The IF_FPM_MESSAGE_MANAGER interface provides you with methods to perform the following tasks:

● Reporting messagesThere are three methods available to report messages (including T100 and Bapiret2 messages).

● Raising exceptionsThere are four methods available to raise exception messages (including T100 and Bapiret2 messages).

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 307

Page 308: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● Clearing messagesThere is one method available to clear all messages.

3.4.4.1.1 Methods for Reporting Messages

A description of the methods and their parameters for reporting messages.

The methods for reporting messages are provided by the IF_FPM_MESSAGE_MANAGER interface.

This interface provides the following methods for reporting messages:

● REPORT_MESSAGE● REPORT_BAPIRET2_MESSAGE● REPORT_T100_MESSAGE● REPORT_OBJECT_MESSAGE

The following information relates to all the reporting methods listed above:

● By default, the message is not mapped to a context element.● If there are minor inconsistencies while reporting the message, FPM automatically takes alternative action

(unless an exception is raised): If the message is reported to be bound to a context element, and if the element or the attribute is missing, FPM reports the message without the binding.

● FPM raises an exception in the following cases:

○ If the message lifetime is marked to be bound to a controller, but the controller is NULL or not reachable.○ If the component for the message is missing.○ If the Message Lifetime is set to Manual and View, but the element or attribute is missing.

The parameters of the methods above are described in the following table:

308 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 309: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Table 60: Parameters of the Reporting MessagesParameter Relevant

MethodDescription

IO_COMPONENT All Passes an object reference to the message manager, used for storing the message. Preferably, the Web Dyn­pro component, which raises the message, must be passed here. You can pass another object reference only in the event of exceptions where the object raising the message does not have a handle to the Web Dyn­pro component (for example an ABAP OO class). This is important for those messages whose lifetime is maintained manually by the application. When an appli­cation creates a message whose lifetime is manual, it must then delete the message once it is no longer needed. In this case, you must pass the component whose messages need to be cleared. This helps to pre­vent messages from a different component being cleared by a component that has not raised them. This could happen when you re-use components from dif­ferent areas

IV_SEVERITY All The severity of the message to be reported. Possible values are:

● Error (E) (Default Value)● Warning (W)● Success (I)

These messages affect the navigation in different ways for each floorplan.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 309

Page 310: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Parameter Relevant Method

Description

IV_LIFETIME All Determines when, where, and how long a message is displayed. This parameter is a combination of the fol­lowing elements:

● LifetimeDetermines how long the message exists in the Message Area; that is, the creation and deletion of the message. Possible values are:

○ Automatic (Default Value)FPM handles the destruction of the message as defined by the SAP UI guidelines for the floorplan

○ ManualThe application developer handles the deletion of the message from theMessage Area.

● VisibilityDetermines when the message appears in the Message Area. Possible values are:

○ Automatic (Default Value)FPM takes care of the visibility based on the SAP UI guidelines

○ ViewMessage is visible as long as the view to which the message is bound is available

○ ControllerMessage is visible as long as the controller that has raised the message is available (see the parameter controller IO_ Controller for de­tails)

○ ApplicationMessage is permanently displayed (until it is deleted manually by the application devel­oper), and is visible whilst the application is running

○ Pop-upMessage is visible only in a dialog box

Not all combinations of Lifetime and Visibility are possible. Some combinations, for example Lifetime = Manual and Visibility = Pop-up are not available. The permitted combinations are (showing the constant to be used):

● GC_LIFE_VISIBILITY_AUTOMATIC: Automatic + Automatic (Fully handled by FPM)

● GC_LIFE_VISIBILITY_AUT_DIALOG BOX

310 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 311: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Parameter Relevant Method

Description

Automatic + Pop-up (Creation and destruction handled by FPM; visible as long as the dialog box is visible)

● GC_LIFE_VISIBILITY_MANU_VIEWManual + View (Should be deleted by the applica­tion; visible until the view that created it is visible)

● GC_LIFE_VISIBILITY_MANU_CONTManual + Controller (Should be deleted by the ap­plication; visible as long as the controller that cre­ated it is visible)

● GC_LIFE_VISIBILITY_MANU_APPLManual + Application (Should be deleted by the ap­plication; visible as long as the application is run­ning)

IV_PARAMETERS All Group of parameters of the type R_NAME_VALUE_LIST that can be stored along with the message.

IR_MESSAGE_USER_DATA All Additional data that can be stored along with the mes­sage. Does not influence the message visually. This pa­rameter can be used by the application developers to provide error resolution mechanism.

IV_MESSAGE_INDEX All (Optional) Numerical value indicating the order in which the message is to be displayed. If no value is passed, the message appears in the order in which the Web Dynpro runtime chooses to display it. Messages are sorted for display according to the following attrib­utes: Error Severity, Message Index, (parameter MSG_INDEX), Context element (if it exists), and Con­text attribute (if it exists)

IO_ELEMENT All Reference to a context element to which the message is bound. The message is then clickable, and the focus shifts to a UI element bound to this context element.

IV_ATTRIBUTE_NAME All The element attribute to which the message must be mapped. This parameter is used in conjunction with the IO_ELEMENT. If the message is to be mapped to more than one attribute, use parameter IT_ATTRIBUTES in­stead.

IV_IS_VALIDATION _INDEPENDENT

All Defines whether a message, referring to a context at­tribute or a context element, influences the execution of a standard action. If the parameter’s value is ABAP_FALSE (default value), the standard action is no longer executed after this message is created. How­ever, if the parameter’s value is ABAP_TRUE, the stand­ard action is executed.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 311

Page 312: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Parameter Relevant Method

Description

IO_CONTROLLER All Pass the reference to the controller whose lifetime will dictate the lifetime of the messages which have the life­time set to the context.

IS_NAVIGATION_ALLOWED All Relevant for GAF applications only. Use this flag if you need to allow navigation, even on an Error type mes­sage.

IV_VIEW All Relevant only if the message manager is used in appli­cation-specific dialog boxes. Name of the view of the dialog box. The error is then restricted only to the dia­log box. Otherwise there is a side effect in that the error message (if a non-automatic type) is also reported on the main screen when the dialog box is closed.

IV_MESSAGE_TEXT All Any free-text that must be reported in the Message Area. When used with the UI element and attribute pa­rameters, it becomes a clickable free-text message.

IS_BAPIRET2 All The BAPIRET2 structure directly in the message. The severity of the message is automatically selected from the BAPIRET2 structure. The T100 message that is em­bedded in the BAPIRET2 structure is used to display the message text. Additionally, the lifetime, visibility and context mapping can be set along with the BA­PIRET2 structure. Note that if the BAPIRET2 structure contains a severity value of A, the message is con­verted into an exception.

IR_MESSAGE_OBJECT REPORT_OBJECT_MESSAGE

Exception object providing access to message long text.

IT_ATTRIBUTES All Table of attributes to which the message is mapped. This parameter overrides the IV_ATTRIBUTE_NAME if both parameters are set.

IT_CUSTOMIZING_PARAMETERS All (Optional) Of type String table.

● If the message needs to be mapped to a context in ALV, then include constant GC_REPORT_IN_ALV (present in interface IF_FPM_MESSAGE_MANAGER) to this importing parameter.

● When a permanent message needs to be reported only in the view, and not in any dialog boxes, then include constant GC_NAVIGATE_ERROR (present in interface IF_FPM_MESSAGE_MANAGER) to this im­porting parameter.

IV_MSGID REPORT_T100_MESSAGE

Used when reporting a T100 based message. Supply the parameter with the message class.

312 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 313: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Parameter Relevant Method

Description

IV_MSGNO REPORT_T100_MESSAGE

The message number of the message class specified by the IV_MSGID.

IV_PARAMETER_1 IV_PARAMETER_2 IV_PARAMETER_3 IV_PARAMETER_4

REPORT_T100_MESSAGE

Optional parameters for the message.

3.4.4.1.2 Methods for Raising Exception Messages

A description of the methods and their attributes for raising exception messages.

The RAISE_EXCEPTION methods are provided by the IF_FPM_MESSAGE_MANAGER interface.

This interface provides the following methods for raising exceptions:

● RAISE_EXCEPTION● RAISE_T100_EXCEPTION● RAISE_CX_ROOT_EXCEPTION● RAISE_BAPIRET2_EXCEPTION

All exceptions are logged into the system with the following details:

● the method that was used to raise the exception● the text of the exception● additional text (if used)

There is no recovery mechanism from the exceptions.

The following table describes the attributes of the RAISE_EXCEPTION methods.

Table 61: Parameters of the RAISE_EXCEPTION methodsParameter Relevant Method Description

IV_TEXT RAISE_EXCEPTION Optional text that can be passed while raising a simple exception. This text is logged, and can later be used for analysis.

IV_MSGID RAISE_T100_EXCEPTION Message Class ID for the T100 message. Use this parameter to raise an exception whose text is based on the T100 message mecha­nism.

IV_MSGNO RAISE_T100_EXCEPTION Message number of the T100 mes­sage class.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 313

Page 314: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Parameter Relevant Method Description

IV_PARAMETER_1IV_PARAMETER_2IV_PARAMETER_3IV_PARAMETER_4

RAISE_T100_EXCEPTION Optional message parameters.

IO_EXCEPTION RAISE_CX_ROOT_EXCEPTION The exception class inheriting from CX_ROOT. This parameter is a man­datory parameter.

IV_ADDITIONAL_TEXT RAISE_CX_ROOT_EXCEPTION Additional text to be added while re­porting an exception based on CX_ROOT.

IS_BAPIRET2 RAISE_BAPIRET2_EXCEPTION The BAPIRET2 structure for raising an exception.

3.4.4.1.3 Method for Clearing Messages

A description of the method and parameters for clearing messages.

This method is provided by the IF_FPM_MESSAGE_MANAGER interface.

The method clears messages from the Message Area, and acts upon all those methods that have Lifetime set to Manual. This is the only method to selectively clear those messages with a manual Lifetime from the Message Area.

This method ensures that messages from a different component are not cleared accidentally.

The defaults for the parameters contain a negative semantic with respect to the method name; if the method is called with defaults, all the messages are deleted.

The following table describes the parameters for the CLEAR_MESSAGES method.

Table 62: Parameters of the CLEAR_MESSAGES methodParameter Relevant Method Description

IO_COMPONENT CLEAR_MESSAGES The component in which messages were previously reported. Only those messages that were reported from this component will be cleared. If this contains object references other than components, then those object references will be used. This is a mandatory parameter.

314 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 315: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Parameter Relevant Method Description

IV_EXCLUDE_ERROR CLEAR_MESSAGES Pass TRUE if error messages be­longing to the component are not to be deleted. This is an optional pa­rameter and the default is FALSE. This means that all the error mes­sages belonging to this component will be deleted unless this parame­ter contains a true value. Looking at the parameter’s name, the parame­ter indicates that the default value (FALSE) has to be overridden only if error messages are to be saved from being cleared and this parame­ter contains negative semantic with respect to the method name.

IV_EXCLUDE_WARNING CLEAR_MESSAGES Default is FALSE. Override it with true, if warnings raised for the com­ponent are to be saved.

IV_EXCLUDE_SUCCESS CLEAR_MESSAGES Default is FALSE. Override it with true, if success messages raised for the component are to be saved.

3.4.4.2 Message Management for FPM Dialog Boxes

FPM manages the message handling (with respect to the parent component and the FPM dialog boxes) in terms of visibility and lifetime of a message in FPM dialog boxes.

Table 63:Lifetime/Visibility Message Behavior

Automatic FPM takes care of the visibility based on the current UI guidelines. The Automatic messages in an FPM dialog box are cleared after every round-trip, or if a new mes­sage is raised on a dialog box.

● On Dialog Close:Automatic messages are not carried forward to the parent, or the previous level dialog box.

● On Dialog Open:Automatic messages are cleared on the parent window, or on parent dialog box from where the di­alog box is opened.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 315

Page 316: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Lifetime/Visibility Message Behavior

View The message is visible as long as the view to which the message is bound is available.

● On Dialog CloseMessages with MANU_VIEW lifetime are not carried to the parent or the parent dialog box.

● On Dialog Open:Messages with MANU_VIEW lifetime reappear on the dialog box when it is reopened until it is cleared manually.

These messages are not carried forward from the pa­rent window, or the parent dialog box on the dialog box.

Controller The message is visible as long as the controller that has raised the message is available.

● On Dialog Close:Messages with MANU_CONT lifetime would be passed to the parent if it is raised through the same controller.

● On Dialog Open:Messages with MANU_CONT lifetime would be passed to the dialog box from the parent window or the parent dialog if it is raised through the same controller.

Application The message is permanently displayed, in both the dia­log box and the parent window throughout the applica­tion until it is manually cleared by the application devel­oper.

Auto Pop-up The message is visible only in a message dialog box un­til it is closed.

316 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 317: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.4.3 Message Management for Non-FPM Dialog Boxes

The handling of FPM Message Manager is also possible in non-FPM dialog boxes (that is, in application-specific dialog boxes).

FPM handles the messages with respect to the parent component and the dialog box in terms of visibility and lifetime of a message, as the following table indicates:

Lifetime/Visibility Value Message Behavior

Automatic FPM takes care of the visibility based on the SAP UI guidelines. The automatic messages in the dialog box get cleared after every round-trip or if a new message is raised on a dialog box.

This behavior is similar to the automatic messages in the parent window.

View The message is visible as long as the view to which the message is bound is available; this message is not transferred to the parent window if the dialog box is closed.

Controller The message is visible as long as the controller that has raised the message is available. This message would be passed to the parent if it is raised through the same controller.

Application The message is permanently displayed, in the dialog box and the parent window throughout the application, until it is manually cleared by the application developer.

Pop-up The message is visible only in a dialog box as long as the non-FPM dialog box is open.

3.4.4.4 Adding Actions to Messages in the Message Area

Applications can use the ON_NAVIGATE event to perform any action on the click of a message displayed as a link in the Message Area.

When a link is chosen in the Message Area, FPM raises the ON_NAVIGATE event. The application writes its business logic in this event.

NoteWhile reporting a message, the IS_ENABLE_MESSAGE_NAVIGATION parameter must be set to X. Only then will the message be displayed as a link.

The parameters that are passed as part of the event data (MO_EVENT_DATA) are as follows:

● ID

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 317

Page 318: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● CONTEXT_ELEMENT● MESSAGE_ID● MESSAGE_USER_DATA

Corresponds to import parameter IR_MESSAGE_USER_DATA of the message manager interface. It can be used by the application to pass additional information, for example, about the navigation target.

See also 1709055 .

3.4.4.5 Message Mapper

Messages that are displayed by the system often contain technical terms which might not be understood by everyone who works with the system. Message Mapper is used to map messages (error messages, warning messages, and information/success messages) that are currently displayed by the system to a more understandable, user-friendly form.

The Message Mapper is an FPM application, FPM_CFG_MESSAGE_MAPPER.

With Message Mapper you can perform the following activities:

● Map messages to an alternative message to be displayed by the system● Group messages into specific categories, and have the system display an alternative message for the

category● Hide messages● Log messages in an application log

Message mapping can be performed by both SAP applications and customer applications.

Only T100 and BAPIRET2 messages can be mapped; that is, the original messages passed to the Message Mapper should be either of these types. These messages can be mapped to T100 or OTR or free-text messages.

Enabling Message Mapping

You can enable message mapping for an application using the FPM configuration editor, FLUID; in the General Settings panel of the floorplan component configuration, choose Message Mapper Settings under Floorplan Settings.

Additional settings for message mapping and message logging can also be found here.

3.4.4.5.1 Message Mapping Fields

A description of the fields used in the FPM Message Mapper.

In addition to other, self-explanatory fields, the Message Mapper uses the following fields (parameters) below:

318 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 319: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Field Description

Context Mandatory parameter.

Message Mapper can be called from different contexts of applications. Applications can specify their own con­texts.

Applications can use this field, for example, to describe a role. Roles can also be described as part of the con­text or category. The application decides the context and category based on its own requirements.

For example, a context can be, SRM, CRM, or ERP de­pending on the application that is using the Message Mapper. A context could also be a role such as Employee or Manager with a specific category to differ­entiate the roles further.

Category You can group messages into categories.

Customers cannot delete categories created by SAP applications, but they can add new entries based on their own requirements.

You can use categories to specify, for example, the fol­lowing items: roles such as Administrator, Manager, and Employee; technical groups such as No Authorization group; functional groups such as an SRM Shopping Cart Customizing group.

Namespace There is a separate namespace for SAP and customer message mappings.

Customers can override the message mapping made by SAP applications if such mappings are not indicated as Final. Final is a field in the message mapping table (a table containing all mapping entries). Customer map­pings have priority over SAP mappings. The name­space is not part of the message mapping API, but is a part of the message mapping table. The customer namespace begins with Z or Y.

Hide You can choose to hide specific messages by selecting this option when you map the alternate message in the message mapping table.

NoteMessage Type field

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 319

Page 320: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

You can change the message type of the original message to a different message type in the alternate message. If no alternate message type is described in the Message Type field, the message is reported with its original message type.

3.4.4.5.2 Generalization

Generalization refers to the process used by the Message Mapper to match system messages to alternative messages.

The way messages are mapped to system messages varies; messages can be mapped specifically by specifying all fields of a message, or they can be mapped more broadly by specifying fewer fields.

When the application reports a message, the Message Mapper checks which fields are present in the reported message, and whether there is a specific mapping for this collection of fields. The Message Mapper starts the search for a mapping using the lowest level of generalization, G0 (it checks to see if there is a mapping which includes all the fields), and it continues with a higher level of generalization until an alternate message mapping is found.

If all generalization levels are searched, and no mapping is found, the original message is reported.

Generalization Type

You can set the Generalization Type in the Message Mapper Settings dialog box in FLUID. The following Generalization Types exist:

● Type 0 (no generalization)● Type 1 (default generalization)

The fields involved in Type 1 generalization are shown in the table below:

Generalization Level Fields Involved

G8 Context

G7 Context Message Type

G6 Context Category

G5 Context Message Type

G4 Context Message ID Message Type

G3 Context Message ID/Message No

G2 Context Message ID/Message No

Message Type

G1 Context Message ID/Message No

Category

320 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 321: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

G0 Context Message ID/Message No

Category Message Type

The options mentioned above can be specified by a domain FPM_MSG_GENERALIZE, which has the following value range:

● FPM00 - No GeneralizationIf you do not require generalization, then option FPM00 must be passed; the alternate message (if present) is returned for the specified criteria, otherwise the original message is returned.

● FPM01 - Type 1 – Default GeneralizationIf you do not pass any option, then the default option is FPM01 generalization.

Example

Assume that a message is reported from an application with parameters corresponding to generalization level G0. The message details are as follows:

Field Field Value

Context SRM

Message ID: EBP

Message No: 123

Category No Authorization

Message Type E

In accordance with the options previously described, the following would happen:

● FPM00 - No GeneralizationIf the entries exist for the above criteria in the message mapping customizing table, then a corresponding alternate message is reported. For example, if an alternate message mapping exists in the customizing table for mapping at G0 level (that is, for all the corresponding fields) with the alternative message text No Authorization to change Purchase Order, this alternate message is displayed.If no alternate message mapping exists in the message mapping table, then the original message is displayed.

● FPM01 - Type 1 – Default GeneralizationIf no mappings exist in the customizing table for mapping at G0 level, but there is an entry at, for example, G5 level for the same Context, Category and Message Type, the generalization concept is adopted automatically, and the alternate message text at G5 level is displayed.

3.4.4.5.3 Mapping Message Variables

Message variables in the original message are copied into the corresponding message variables in the alternate message, according to the certain conditions.

The following conditions apply in relation to the mapping of message variables:

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 321

Page 322: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● If the original message contains message variables and the alternate message does not contain message variables, the message variables are not displayed.

● If the alternate message and the original message contain the same number of message variables, there is a one to one mapping between the message variables.

● If the alternate message does not contain the same number of message variables as that of the original message, then only the message variables described in the alternate message are displayed and there is a one to one mapping of the same. The remaining message variables are ignored.

● If the alternate message has variables & & & & instead of &1 &2 &3 &4, then the first variable & corresponds to message variable &1, the second variable & to message variable 2, and so on.

3.4.4.5.4 Tables and Views for Message Mapper

A description of the tables and views available for message mapping.

Tables

● FPM_T_MSG_MAPPERThe main customizing table for mapping messages.

Table 64: Table FPM_T_MSG_MAPPERField Field Type Description Field Entry

NAMESPACE FPM_NAMESPACE Namespace for Message Mapper.

Mandatory

MSG_CONTEXT FPM_CONTEXT FPM application context name.

Indicates, for example, the business unit or role in which the message is mapped.

Mandatory

MSGID SYMSGID Message class of system message.

Optional

MSGNO SYMSGNO Message number of sys­tem message.

Optional

MSGTY SYMSGTY Message type of system message.

Optional

MSG_CATEGORY FPM_MSG_CATEGORY Message category of sys­tem message.

Optional

ALT_MSGID SYMSGID Message class for alter­nate message.

Optional

322 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 323: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Field Field Type Description Field Entry

ALT_MSGNO SYMSGNO Message number for al­ternate message.

Optional

ALT_MSG FPM_ALT_MSG Alternate message. Type your message text here.

Optional

ALT_MSGTY SYMSGTY Message type for alter­nate message.

Optional

HIDE_MSG BOOLEAN Hides the message. Optional

FINAL BOOLEAN Ensures that the mes­sage mapping cannot be edited.

Optional

● FPM_MSGCATEGORYTable for customizing message categories.

Table 65: Table FPM_MSGCATEGORYField Field Type Description Field Entry

MSG_CATEGORY FPM_MSG_CATEGORY Message category. Mandatory

NAMESPACE FPM_NAMESPACE Namespace for Message Mapper.

Mandatory

● FPM_CATEGORYTThis is a text table for FPM_MSGCATEGORY.

Table 66: Table FPM_CATEGORYTField Field Type Description Field Entry

MSG_CATEGORY FPM_MSG_CATEGORY Message category. Mandatory

NAMESPACE FPM_NAMESPACE Namespace for Message Mapper.

Mandatory

LANGU SPRAS Language key. Optional

MSG_CATEGORY_NAM FPM_MSG_CATEGORY_NAME

Description of the mes­sage category.

Optional

Views

The following maintenance views are available for message mapping:

● FPM_V_MSG_MAPPERThe maintenance view for table FPM_T_MSG_MAPPER.

● FPM_VMSGCATEGORYThe maintenance view for table FPM_MSGCATEGORY and FPM_CATEGORYT.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 323

Page 324: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.4.5.5 Message Logging

A summary of the methods you can use to control message logging.

Mapped messages are logged under a separate group name in transaction SLG1. You can enter the following values to analyze the log:

● FPM_MSG_MAPPER (Object)● RUNTIME (Subobject)

Only the original message is logged unless generalization has occurred (in which case, both the original and the alternate message are logged).

Message logging is inactive by default, but you can control logging using the following methods:

● Message Mapper ParametersThe following logging options are found in the FPM configuration editor, FLUID, in the Message Mapper Settings dialog box:

○ Always Enable LoggingAll messages that are mapped are logged.

○ Log on GeneralizationMessages are logged only if mapping is not present for a specified criteria and a subsequent level of generalization is considered.

○ Log on HideMessages are logged only if they are hidden.

● URL ParametersYou can also use the following URL parameters to log messages (set to X to activate):

○ FPM_ALWAYS_LOG○ FPM_LOG_ON_GENERALIZATION○ FPM_LOG_ON_HIDE

NoteIn addition to the above, the BAdI FPM_BADI_LOG_MAPPED_MSG is provided in which you can write specific logic for message logging (for example, specific message logging based on roles). If the BAdI is implemented, then the logging details written in the BADI take precedence over the logging details specified as default, irrespective of the options selected in the configuration editor.

324 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 325: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.4.5.6 Message Mapper Flow

Diagram showing the process flow of the Message Mapper.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 325

Page 326: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.5 Work-Protect Mode

Floorplan Manager allows the application to make use of the 'work-protect mode' offered by SAP Enterprise Portal and SAP NetWeaver Business Client (NWBC) (that is, to display a data-loss dialog box when the user closes the application without first saving the data).

To achieve this, the application must inform FPM whether it contains unsaved ('dirty') data. For this, the FPM provides the Web Dynpro interface IF_FPM_WORK_PROTECTION.

This interface can be implemented by any Web Dynpro component in your application which is known to the FPM (for example, any UIBB, or a shared-data component). At runtime, FPM detects all components implementing this interface. If any of these components signals unsaved data, the application is marked as ‘dirty’. This application ‘dirty-state’ is then passed on by the FPM to the shell (that is, the SAP Enterprise Portal or the NWBC.

IF_FPM_WORK_PROTECTION contains only one method, IS_DIRTY.

NoteThe shell-API requires this information as soon as the application state changes. Therefore, the IF_FPM_WORK_PROTECTION~IS_DIRTY method is called by the FPM runtime during each round-trip. FPM does not necessarily call the method IS_DIRTY on all UIBBs that are currently visible; as soon as one UIBB informs FPM that it has unsaved data, the FPM does not need to call the method on the remaining visible UIBBs. Therefore, do not assume that the IS_DIRTY method is called by FPM on all visible UIBBs.

You can use the following sample code in your application:

METHOD is_dirty. if * component contains unsaved data ev_dirty = ABAP_TRUE. else. ev_dirty = ABAP_FALSE. endif. ENDMETHOD.

3.4.6 Transaction Handling

A description of the optional interface for handling transactions, IF_FPM_TRANSACTION.

Transactions can be handled in a systematic manner in FPM by implementing the Web Dynpro interface, IF_FPM_TRANSACTION.

This interface guarantees you the following advantages:

● There is a logical sequence in which the interface methods are called● The transaction steps can be split up into the sequence in which they are supposed to be processed● There is a check – save – validate sequence that provides high transaction integrity● The check – save – fail – recover sequence provides the required robustness to the transaction

The methods of IF_FPM_TRANSACTION interface are invoked by the standard FPM SAVE event, and all events (including application-specific events) in which the attribute MV_EVENT_IS_TRANSACTIONAL of CL_FPM_EVENT, is set to TRUE.

326 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 327: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

TipYou can have multiple components implement this interface in the same application. FPM will call all the methods on all the implementing components. However, a general recommendation is to use only one central component for transaction handling.

Interface: IF_FPM_TRANSACTION

The following table describes the methods of the IF_FPM_TRANSACTION interface:

Method Description

CHECK_BEFORE_SAVE This method has a return parameter which indicates whether the validation before a save to the database is successful. Use this method as a trial for saving, and return a TRUE if the trial save was successful.

SAVE This method is used to perform the actual save and any possible commit. It is called when the CHECK_BEFORE_SAVE has returned a FALSE. If there are errors while saving, you must return rejected = true, so that the AFTER_REJECTED_SAVE can be called. If the save was successful, then the method AFTER_COMMIT is called.

AFTER_COMMIT You can perform clean-up activities such as releasing database locks, releasing other resources, and trigger­ing an event for processing after a successful commit.

AFTER_REJECTED_SAVE You can perform your roll-back activities. You can also release locks and resources.

SUPPORTS_TRANSACTION_HANDLING Allows a (generic) feeder class that has implemented this interface to decline transaction handling at run­time.

NoteOnce the interface is implemented, the FPM identifies the corresponding component that has the method to be called, in sequence, and calls the methods on this component in the same sequence as defined in the above table.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 327

Page 328: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.6.1 IF_FPM_TRANSACTION Method Calls

A sequence diagram of the method calls of interface IF_FPM_TRANSACTION.

3.4.7 Resource Management

The larger an FPM application is, the more important resource management becomes. Performance issues, due mainly to heavy memory consumption (usually due to the embedded UIBBs within an application), might be encountered.

UIBBs can be made transient in their behavior. Transient behavior means that UIBBs, which are not visible, can be removed from memory so as to increase the performance, and the memory footprint of the application.

Transient behavior can be switched on and off in the FPM configuration editor, FLUID. However, the business logic of the application should not rely on these settings alone. Additionally, whilst the transient behavior of UIBBs may indeed reduce memory consumption, this must be balanced with the cost of possible UIBB reinstantiation.

Transient behavior can be specified only during design time at the level of the application, and not at the level of a UIBB or its usage.

328 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 329: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.7.1 Releasing a Component

FPM does not rely simply on the Transient Settings attribute in FLUID to decide whether or not a component should be released.

Technically, a UIBB is an interface view and this, by itself, cannot be released from memory, hence the FPM releases the component containing the UIBB based on certain rules.

These rules are as follows:

● The application developer must set the transient flag to TRUE in FLUID (General Settings panel of the floorplan configuration).

● The FPM framework finds that it is technically feasible to release the component.● The UIBBs implement the Resource Manager interface (described in a later section), and do not veto the

transient decision passed by the application using the ON_HIDE method.● The UIBB has not implemented the Resource Manager interface (meaning that it does not have the possibility

to veto).

The transient behavior of the UIBBs can be handled in one of the following ways:

● One UIBB per componentThe component contains only one interface view which is used as a UIBB. When the UIBB is removed from the view assembly, the component that contains this UIBB is released.

● Multiple UIBBs per componentThe component is released only when all the interface views that behave as UIBBs are no longer part of the view assembly, and the next set of UIBBs (for the forthcoming view assembly) does not contain a UIBB from this component. In such a case, the component is only released when all the interface views of this component are no longer part of the visible view assembly. Note that when one of the interface views (UIBBs) is removed from the view assembly, the component remains alive if other interface views of the same component are still part of the view assembly, or part of the next view assembly.

If the application developer has set the global flag to transient, meaning that the UIBBs (components) can be released, then the FPM will then investigate whether the component can be released.

To Release or Not to Release - How FPM Decides

To evaluate whether to release a component, the FPM completes the following steps:

1. FPM reads the Transient Settings attribute in the General Settings panel in FLUID.2. FPM then does one of the following:

○ If the setting is Non-Transient, this information is passed on to the UIBBs, and FPM ignores the transient behavior; that is, it does not release the components.

○ If the setting is Transient, the following can occur:

○ FPM checks the technical feasibility of the component being released (see following section); if it is not feasible, it retains the component.

○ If it is technically feasible to release the component, FPM then checks to see if the IF_FPM_RESOURCE_MANAGER interface has been implemented by the component.If the interface has not been implemented, it releases the component. If the interface has been implemented, FPM calls the ON_HIDE method.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 329

Page 330: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

○ In the ON_HIDE method, FPM checks for the veto value from the UIBB.If the UIBB has not vetoed the release state, then FPM releases it; otherwise, it will retain it.

Instances for Non-Release of Components

There are instances when, even if the application developer has set the default to transient, the component containing the UIBBs cannot be released. These instances are described below:

● The component is held as a used component by another component.● There are UIBBs from the same component that are still being displayed.● The component implements an FPM interface that does not allow it to be released. These are as follows:

○ IF_FPM_SHARED_DATA○ IF_FPM_TRANSACTION○ IF_FPM_APP_CONTROLLER○ IF_FPM_OIF_CONF_EXIT or IF_FPM_GAF_CONF_EXIT or IF_FPM_OVP_CONF_EXIT○ IF_FPM_TABBED_CONF_EXIT

3.4.7.2 Transient Behavior Requirements and their Settings

The following table describes the settings you should make dependent on the transient behavior you require.

Requirement Transient Flag

(Transient Settings in FLUID)

Implement IF_FPM_RESOURCE_MANAGER

Veto Coding with the Re­source Manager to handle Application Data

I do not want transi­ent behavior for any UIBB, and I do not want to release any memory.

FALSE NA NA

I do not want transi­ent behavior for any UIBB, and I would like to release some resources.

FALSE Yes NA Yes

Based on need from business logic.

I want all my UIBBs to be transient, and I do not have the need to release any re­sources explicitly.

TRUE NA NA NA

330 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 331: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Requirement Transient Flag

(Transient Settings in FLUID)

Implement IF_FPM_RESOURCE_MANAGER

Veto Coding with the Re­source Manager to handle Application Data

I want all my UIBBs to be transient, and I want to release some resources ex­plicitly.

TRUE Yes No Yes

Based on need from business logic.

I want only some of the UIBBs to be re­leased, and I would like to retain some due to business logic reasons.

TRUE Yes Yes (Only for those that do not need to be released).

Based on need from business logic.

I only want some of the UIBBs to be re­leased, and some UIBBs I would like to retain due to busi­ness logic reasons.

For those UIBBs that are transient, there is no need to release any resources.

TRUE Only on those that need to veto (or not be released).

Yes (Only for those that do not need to be released).

NA

3.4.7.3 Vetoing a Release Decision using IF_FPM_RESOURCE_MANAGERApplication developers can veto a component release decision by FPM using the FPM interface IF_FPM_RESOURCE_MANAGER.

When you implement the interface IF_FPM_RESOURCE_MANAGER, you see that it contains only one method, ON_HIDE.

This method has an importing parameter, IV_RELEASE_COMPONENT, which provides information to the UIBB about the FPM’s decision on the release feasibility for the component containing this UIBB. The UIBB reacts to this parameter only if the value is TRUE. If the UIBB does not want itself to be released, then it sets the exporting parameter, EV_VETO_RELEASE, to TRUE (the default is FALSE).

FPM will use the veto parameters only if the IV_RELEASE_COMPONENT is TRUE. If the UIBB sets the veto to TRUE, then the component containing the UIBB is not released, even if it is capable of being released.

The following code demonstrates this:

method ON_HIDE. data: lv_veto type boole_d.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 331

Page 332: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

IF IV_RELEASE_COMPONENT = ABAP_TRUE. "do some business logic here and based on it, set the flag lv_veto = ABAP_TRUE. ENDIF. IF lv_veto = ABAP_TRUE." some bus. EV_VETO_RELEASE = ABAP_TRUE. "This UIBB will not be released. ENDIF.endmethod.

The following table is helpful in understanding the final action taken by FPM:

IV_RELEASE_COMPONENT EV_VETO_RELEASE FPM action

FALSE TRUE/FALSE Ignore the veto value; do not release component.

TRUE FALSE Release the component.

TRUE TRUE Do not release the component.

3.4.8 Application Controllers

A description of the application controllers provided by the FPM framework.

The following application controllers are available for use:

● FPM Application Controller (IF_FPM_APP_CONTROLLER)For controlling the application as a whole during the FPM event processing.

● Application-Specific Configuration Controller (AppCC) (IF_FPM_<FLOORPLAN>_CONF_EXIT)For making global checks and adjustments, and reading and influencing the structure (the floorplan) of the application, for example, adding and removing UIBBs.

○ IF_FPM_<FLOORPLAN>Application controller API that allows you to read and influence the floorplan component. The method OVERRIDE_EVENT_<FLOORPLAN> of interface IF_FPM_<FLOORPLAN>_CONF_EXIT provides access to this interface.

● IF_FPM_CNR_<FLOORPLAN>It is not always necessary to implement the FPM application controller or an AppCC to make change to the application. This interface allows you to make simple changes to toolbars and toolbar elements, and to read the floorplan configuration data.

3.4.8.1 The Application-Specific Configuration Controller

Using an application-specific configuration controller (AppCC) allows you to do the following:

● Read the structure of your application at runtime● Change the structure of your application dynamically● Make global checks

332 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 333: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● Make global adjustments for FPM events

Using an AppCC is optional; implement an AppCC only if you need one of the features which the AppCC offers.

Implementing an AppCC Component

There are two ways to implement an AppCC Component:

● Implement a WD interface in a WD componentTo provide your application with an AppCC using a WD component, you implement one of the following Web Dynpro interfaces in a Web Dynpro component:

○ IF_FPM_OIF_CONF_EXIT for an OIF application○ IF_FPM_GAF_CONF_EXIT for a GAF application○ IF_FPM_OVP_CONF_EXIT for an OVP application

The Web Dynpro component is either one of the components already used within your application, or is a completely new one.

● Use an ABAP OO classTo provide your application with an AppCC using an ABAP OO class, you implement one of the following ABAP OO interfaces in a simple ABAP OO class:

○ IF_FPM_OIF_CONF_EXIT for an OIF application○ IF_FPM_OIF_CONF_EXIT for a GAF application○ IF_FPM_OVP_CONF_EXIT for an OVP application

The ABAP OO class AppCC offers the same methods and options as the Web Dynpro AppCC, and works in the same way. The only difference is that the ABAP OO class AppCC itself cannot be configured.

Declaring the AppCC to FPM

To declare the AppCC component to FPM, open FLUID for the floorplan configuration of your application. Choose General Settings Floorplan Settings Application Controller Settings . Enter the Web Dynpro component or

ABAP OO class and the configuration name, and save.

NoteThe Web Dynpro component names take priority over ABAP OO class names; if you enter an ABAP OO class, and there is a Web Dynpro component with the same name, the system will read the Web Dynpro component.

NoteIf your AppCC has declared a static usage to a component implementing IF_FPM_SHARED_DATA, this shared data component is instantiated and attached automatically by the FPM framework. This ensures that all components within your application, which access the shared data component, will see the same instance of it.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 333

Page 334: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Related Information

Configuring Variant Selection [page 269]You can configure variants of the floorplan component of an application. This allows for a different screen to be displayed at runtime, depending on what the user selects in a previous screen. Variant selection is controlled programmatically with an application-specific configuration controller (AppCC).

3.4.8.1.1 The AppCC Interface

A summary of the methods and features of the AppCC interface.

Methods of the AppCC Interface

The AppCC interface contains only one method for each floorplan application:

● OVERRIDE_EVENT_OIF● OVERRIDE_EVENT_GAF● OVERRIDE_EVENT_OVP

These methods pass an object of type IF_FPM_<FLOORPLAN>, which serves as an API for the applications.

The OVERRIDE_EVENT_<FLOORPLAN> method is called at the start of event processing, immediately after the FLUSH method has been called on all visible UIBBs.

Features of the AppCC Interface

The AppCC interface provides you with the following features:

● Reading and influencing the floorplan configuration at runtimeThe AppCC provides you with several methods which allow you to read and influence the floorplan configuration data at runtime.

● Adjusting eventsThe IF_FPM_OIF (or IF_FPM_GAF or IF_FPM_OVP) interface provides the currently processed FPM event as a changeable attribute. Therefore, it is possible to change an event by adding, removing, or changing event parameters. You also can replace an event.

● Cancelling eventsWith the AppCC you can perform global checks. For checking purposes, the event is stored as an attribute in the IF_FPM_OIF (or IF_FPM_GAF or IF_FPM_OVP) interface of the AppCC. You can cancel an event out of the AppCC by calling the CANCEL_EVENT method of the AppCC.

● Selecting a variantIf there is more than one variant configured, you can select a specific variant to be used in an event by calling SET_VARIANT method in the IF_FPM_OIF respectively IF_FPM_GAF interface. Note this is not relevant for OVP applications as the OVP floorplan contains no variants.

334 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 335: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● As the AppCC is called right at the beginning of the event loop, changing an event has the same result as if changed event had been raised instead of the original event.

3.4.8.2 The FPM Application Controller

The FPM application controller can be used to control and steer the application as a whole.

When steering the application as a whole, it is sometimes necessary for the application to participate in all FPM events that happen during the entire lifetime of the application, with one arbitrary single component instance. This is not possible, for example, with simple UIBBs since the methods provided by the Web Dynpro interface IF_FPM_UI_BUILDING_BLOCK only participate in the FPM event loop when the corresponding UIBBs are visible at the time the event loop happens, or become visible after the current event loop has finished successfully. Furthermore the UIBBs cannot make assumptions about the sequence in which they are called. Therefore, an application controller is provided that closes this gap.

Implementing the FPM Application Controller

As with the implementation of the application-specific configuration controller (AppCC) , the FPM application controller can be implemented either using a Web Dynpro component or an ABAP OO class.

The FPM application controller is a singleton instance of a Web Dynpro component provided by the application.

In order to use either a Web Dynpro component or an ABAP OO class as an application controller, complete the following steps:

1. Choose a Web Dynpro component and implement the Web Dynpro interface IF_FPM_APP_CONTROLLER, or implement the ABAP OO interface IF_FPM_APP_CONTROLLER in a simple ABAP OO class.

2. Insert the component (or class) you have chosen into the OIF, GAF, or OVP component configuration.To do this, open the FPM configuration editor, FLUID, for the floorplan component. In the General Settings panel, choose Floorplan Settings Application Controller Settings , and enter the Web Dynpro Component or ABAP OO Class and the configuration name.Note that Web Dynpro component names take priority over ABAP OO class names; if you enter an ABAP OO class and there is a Web Dynpro component with the same name, the system will read the Web Dynpro component.

3. Choose Save.

Interface: IF_FPM_APP_CONTROLLER

This interface provides you with methods to allow the application to participate in all FPM events that happen during the entire lifetime of the application.

It contains similar methods to the interface IF_FPM_UI_BUILDING_BLOCK, and has two corresponding methods with the prefix BEFORE_ and AFTER_ for each of the IF_FPM_UI_BUILDING_BLOCK methods, for example, BEFORE_PROCESS_EVENT and AFTER_PROCESS_EVENT.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 335

Page 336: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

As the names suggest, the method BEFORE_PROCESS_EVENT is called immediately before another call to the corresponding UIBB method PROCESS_EVENT; the AFTER_PROCESS_EVENT is called immediately after all calls to PROCESS_EVENT are finished.

3.4.9 Navigation with Launchpads

A summary of the options available for navigation with launchpads in FPM.

To navigate to a specific application outside of your FPM application (for example, to another URL or Web Dynpro application, transaction, or report), FPM provides you with the following options:

● FPM toolbar menus:

○ You Can Also○ Related Links

These FPM toolbar menus utilize launchpads. Launchpads are lists of hyperlinks, and are created in the transaction LPD_CUST. You assign existing launchpads to these toolbar menus in the Toolbar Schema panel in FLUID. Enter the Role and Instance of the launchpad in the Attributes panel.In transaction LPD_CUST, on the Change Launchpad screen, choose Extras General Settings to display settings which are valid for the whole launchpad and its applications. In the dialog box, you can, amongst other things, set the Check for Unique Application Aliases flag to check that a destination application alias being used by an FPM application is unique.

● Navigation APIs for controlling the launchpads:

○ IF_FPM_NAVIGATIONUse this to navigate to an application using an existing launchpad.

○ IF_FPM_NAVIGATE_TOUse this to navigate to an application without using a launchpad.

These navigation APIs are described in more detail in the following sections.

NoteThe launchpad is available, at runtime, through a dropdown list for both of the above toolbar menus. Descriptions written for launchpad applications in transaction LPD_CUST are not displayed in FPM applications.

NoteIn FPM, only those navigation destinations that were created in transaction LPD_CUST as applications in the first visible folder after the top node of the launchpad are shown. The applications in the other folders of the launchpad are hidden in the display.

Suspend and Resume

This Web Dynpro feature is available for FPM applications. It allows a Web Dynpro application, built within the FPM framework, to be placed in a suspended state whilst the user navigates to another URL. The user works in the new

336 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 337: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

URL, and then navigates back to the suspended FPM application. The FPM application is resumed from exactly the same state before navigation occurred.

This feature is explained further in another section.

NoteThe usage of a report type launchpad is mandatory for enabling suspend and resume in FPM applications.

For more information on launchpads, search for Launchpads in the SAP Help Portal.

3.4.9.1 Transporting a Launchpad

The steps you should take when transporting a launchpad.

Context

To transport a launchpad, proceed as follows:

Procedure

1. Do one of the following:

○ In the Customizing client, create the launchpad that is to be transported; all languages will be transported.

○ Alternatively, use the menu entry Read from other system by RFC in the launchpad overview of transaction LPD_CUST to copy the launchpad. In this case, only the log-on language is copied.

2. Open the launchpad in change mode.

3. Choose Launchpad Transport .4. Enter the package to which you want to assign the texts that you created in the launchpad.5. In the dialog box that follows, enter a Customizing request.

This request includes the relevant table entries for the following tables:

○ APB_LAUNCHPADT○ APB_LAUNCHPAD_V○ APB_LPD_CONTROL○ APB_LPD_OTR_KEYS (this table may be empty for a specific launchpad)○ APB_LPD_VERSIONS

6. In the dialog box that follows, enter a workbench request.This request includes the texts from the launchpad. There are objects of type R3TR DOCT or R3TR.DOCV (and in some cases also R3TR LPDC).

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 337

Page 338: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

7. Release both requests.

3.4.9.2 Interface: IF_FPM_NAVIGATION

This navigation interface provides you with a list, MT_TARGETS, containing all customized applications of a given launchpad.

You access this interface through the GET_NAVIGATION method of interface IF_FPM. This returns an instance of the navigation API, IF_FPM_NAVIGATION.

The following table describes the methods of IF_FPM_NAVIGATION:

Method Description

NAVIGATE Starts the navigation of an applica­tion.

MODIFY Changes attributes of an applica­tion. For example, you can change the visibility of an application, ena­ble or disable an application and change its description and text.

SET_FILTER Allows you to display the content of particular folders.

MODIFY_PARAMETERS Changes the values of existing pa­rameters, or adds a parameter if none exists. (Modifies Application, Business and Additional Information parameters).

SUPPRESS_REBUILD_OF_MT_TARGETS

The rebuilding of table MT_TARGETS can be switched on or off (for mass changes) for performance reasons if necessary.

ADD_BEX_ANALYZER* Adds an application of type BEx An­alyzer to a given launchpad.

REMOVE Removes an application from a launchpad.

NoteThere are numerous other methods with a similar interface to ADD_BEX_ANALYZER, which allow you to add a specified application, at runtime, to a launchpad.

338 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 339: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.9.3 Navigation in the Event Loop

If you call the IF_FPM_NAVIGATION method NAVIGATE, a new event object of type CL_FPM_NAVIGATION_EVENT is created. This event object contains all the available application parameters.

The interface IF_FPM_UI_BUILDING_BLOCK contains the PROCESS_EVENT method, which allows you to process the navigation event, and change these parameters.

To do this, you can implement the following code in the PROCESS_EVENT method:

check io_event->MV_EVENT_ID = io_event->gc_event_navigate. "First check if the event is a navigation event"DATA lr_event type ref to cl_fpm_navigation_event. lr_event ?= io_event. "Make a cast from the event object to the cl_fpm_navigation_event object" lr_bus_parameter ?= lr_event->MO_EVENT_DATA. "Get the business parameter" lr_launcher_parameter ?= lr_event->mo_launcher_data. "Get the launcher parameter"

Note the use of the following LR_PARAMETER methods of interface IF_FPM_PARAMETER that can be used to influence the business and launcher parameters:

● GET_KEYSProvides you with an internal table with the parameters

● GET_VALUE, SET_VALUE or DELETE_VALUEAllows you to change a parameter

You can return the following values:

● EV_RETURN = IF_FPM_CONSTANTS~GC_EVENT_RESULT-DEFERReturn this if the event processing requires further user interaction (for example, requesting further data using a dialog box)

● EV_RETURN = IF_FPM_CONSTANTS~GC_EVENT_RESULT-OKReturn this if the result of the event processing is acceptable

● EV_RETURN = IF_FPM_CONSTANTS~GC_EVENT_RESULT-FAILEDReturn this if the result of the event processing is not acceptable

To prevent a loss of data, you can implement the NEEDS_CONFIRMATION method. This method is located in the interface IF_FPM_UI_BUILDING_BLOCK. This method contains the navigation event; you can decide whether to raise a data-loss dialog box. To do this, you must return the following value: EO_CONFIRMATION_REQUEST = CL_FPM_CONFIRMATION_REQUEST=>GO_DATA_LOSS.

3.4.9.4 Interface: IF_FPM_NAVIGATE_TO_API

This interface provides you with a set of methods to launch an application without using a launchpad.

You access this interface using the GET_NAVIGATE_TO method of interface IF_FPM which returns an instance of the interface IF_FPM_NAVIGATE_TO.

The interface contains numerous methods such as LAUNCH_BEX_ANALYZER, LAUNCH_CRYSTAL_REPORT, LAUNCH_URL, and so on, allowing you to launch a specified application.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 339

Page 340: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.9.4.1 Restarting a Web Dynpro ABAP Application

A list of restrictions for the restart feature.

The IF_FPM_NAVIGATE_TO interface contains a RESTART method. This method will restart the WD application from which the user temporarily navigates away.

Note the following restrictions for the restart feature:

● The iView that is used to start the Web Dynpro application must contain the application parameter system_alias=<system>.

● The iView exists on a page on its own which means only this application is executed in the main window. If several applications are displayed in the main window, the application that is used to execute the restart function is the only one that is displayed after a restart.

● If the restart occurs from an external window, you must navigate to this window with navigation mode 3.● The window header can be transferred to the restart method. If no header is transferred, the system displays

the text Launchpad Start WD ABAP.● In SAP NetWeaver Business Client, a navigation bar cannot be displayed on the left-hand side.● If navigation takes place using object-based navigation (OBN) in the SAP Enterprise Portal or in the SAP

NetWeaver Business Client that is connected to a Portal, the OBN Navigation MODE must be set to User Set of Roles. If it is set to Source Role, the system cannot find the targets following a restart because the restart changes the role context.

For further information, see 1285228 .

3.4.9.5 Extracting Launchpad Content and Launch Service

Extracting the content of one or more launchpads using the function module READ_LAUNCHPADS of function group APB_LAUNCHPAD_RFC .

This function module contains the following import parameters:

● ID_ROLE● ID_INSTANCE● ID_LANGU

All these parameters are optional.

If you call the function module without any parameters you will get all launchpads that exist in the client in all existing languages.

To launch a single entry of the extracted launchpad, call the Web Dynpro application APB_LPD_LAUNCH_SERVICE. This application expects the following URL parameters:

● Role● Instance● Application_ID

It is also possible to add business parameters to the URL. These parameters are forwarded to the target application.

340 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 341: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

3.4.9.6 Suspend and Resume

This feature enables an FPM application to remain in a suspended state when a user navigates to a URL, or any other Web Dynpro ABAP or Web Dynpro Java application. When the user navigates back to the FPM application, the Suspend and Resume feature allows the application to be resumed in the exact state it was before navigation occurred.

The basic settings to utilize this feature include the time out of suspended applications. Session management, and the Suspend and Resume feature are provided by technology layers like Web Dynpro ABAP Foundation, SAP Enterprise Portal, and ABAP Server, and so on, and are not provided or influenced by FPM.

Suspend and Resume is supported in the following client environments:

● Stand-alone● SAP NetWeaver Business Client (NWBC)● SAP Enterprise Portal

NoteSuspend and Resume is currently limited to URL, Web Dynpro ABAP, Web Dynpro Java, and to OBN navigation of OBN type Absolute OBN

There is a uniform method to enable both Suspend and Resume across all the clients. However, the method in which the external URLs get the information to navigate back to the Web Dynpro application varies. Only the FPM’s methods to suspend and resume are detailed in this section.

With the Suspend and Resume feature, it is possible to pass parameters back and forth to the URL from the FPM application.

3.4.9.6.1 Suspending Applications: Examples

Brief descriptions on suspending FPM applications using static launchpad Customizings, and the navigation interface IF_FPM_NAVIGATE_TO.

Suspending with Static Launchpad Customizing for URL Application Category

1. Open the Launchpad Customizing (transaction LPD_CUST).2. On the Overview of Launchpads screen, choose New Launchpad.3. Enter the Role, Instance and Description. Choose Continue.4. On the Change Launchpad Role screen, choose New Application.5. Enter the following details:

○ Linktext (for example FPM_TEST)○ Application Category (choose URL)○ Application Parameters (enter the URL of the application to be opened on suspension of the FPM

application)

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 341

Page 342: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

6. Check the Activate Suspend and Resume Functionality checkbox.

When the user uses this launchpad application to navigate away from the FPM application, the FPM application is suspended.

Suspending with Static Launchpad Customizing for Web Dynpro ABAP or Web Dynpro Java Application

Customizing in LPD_CUST is similar to the steps described above but WDA or WDJ must be selected in the Application Category field.

Check the Activate Suspend and Resume Functionality checkbox after entering all the other information.

When the user uses this launchpad application to navigate away from the FPM application, the FPM application is suspended.

Suspending with Navigation Interface IF_FPM_NAVIGATE_TO

You can navigate away from an FPM application dynamically, that is, without creating a launchpad Customizing. It is possible to enable Suspend and Resume for such navigation too.

Once a handle is obtained on the IF_FPM_NAVIGATE_TO object, you can call the method LAUNCH_URL to open external applications. This method takes in an input parameter IS_URL_FIELDS of type FPM_S_LAUNCH_URL. In the structure FPM_S_LAUNCH_URL, the field USE_SUSPEND_RESUME must be set to ABAP_TRUE or X.

When the application is launched, the FPM application is suspended.

3.4.9.6.2 Resuming a Suspended Application

When a user wants to navigate from the external URL back to the suspended FPM application, the FPM event loop is triggered. This is the entry point back into the application.

The application reacts to the FPM event FPM_RESUME, which is accessed through the constant CL_FPM_EVENT=> GC_EVENT_RESUME. The event data contains the URL parameters that are passed from the external URL back into the FPM application.

The key to access this is obtained through the following key parameter, CL_FPM_SUSPEND_RESUME_UTILITY=>CO_RESUME_URL_PARAMETERS. The value obtained is an internal table of the type TIHTTPNVP, containing the URL key-values pair passed by the external application. Note that this data is available only during the lifetime of the event object, and is not stored by FPM. The application maintains a copy if the user needs to access this information later.

Sample code to resume an application is shown below (in the Component Controller's PROCESS_EVENT method):

METHOD PROCESS_EVENT. "Check the Navigation mode and set it to the launchpad accordingly.

342 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 343: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

DATA lr_event TYPE REF TO cl_fpm_navigation_event. "Check if this is the resume event. CASE io_event->mv_event_id. WHEN cl_fpm_event=>gc_event_resume. get_resume_parameters( io_event ). ENDCASE.Method GET_RESUME_PARAMETERSDATA: lr_fpm_event_data TYPE REF TO if_fpm_parameter. DATA: it_url_parameters TYPE tihttpnvp. lr_fpm_event_data = io_event->MO_EVENT_DATA. CALL METHOD lr_fpm_event_data->get_value EXPORTING iv_key = cl_fpm_suspend_resume_utility=>co_resume_url_parameters IMPORTING ev_value = it_url_parameters.

At the end of this code, the internal table IT_URL_PARAMETERS contains the URL parameters passed back from the external application.

The code above, along with additional information, is found in the test application FPM_TEST_SUSPEND_RESUME in the APB_FPM_TEST package.

3.4.10 Determining Navigation State Information at Runtime

FPM provides an interface to determine information on the navigation state of an application at runtime.

The IF_FPM interface provides the method GET_RUNTIME_INFO. This method allows you, for example, to determine which subview is currently selected in an OIF application, or which substep will be displayed after the event in a GAF application.

There are always two states which can be determined: the state before the current event, and the target state after the event.

As the target state might change during the event loop, the following restrictions apply regarding the point in time when the API can be used:

● The current state can be determined from the NEEDS_CONFIRMATION event to the PROCESS_BEFORE_OUTPUT event

● The target state can be determined from the NEEDS_CONFIRMATION event to the WDDOMODIFYVIEW event

If launched at the wrong point in time, the API launches a CX_FPM_FLOORPLAN exception. This also means that at event FLUSH, and in the AppCC, the information on state is not available (or if there are several events within one round-trip it might become outdated).

DATA: lo_fpm TYPE REF TO if_fpm, ls_fpm_info TYPE fpm_s_runtime_info.

lo_fpm = cl_fpm=>get_instance( ). ls_fpm_info = lo_fpm->get_runtime_info( ).

* check whether it is a OIF or GAF floorplan IF ls_fpm_info-floorplan = if_fpm_constants=>gc_floorplan-oif.

DATA: lo_oif_info TYPE REF TO if_fpm_oif_info, ls_current_state TYPE fpm_s_oif_info, ls_target_state TYPE fpm_s_oif_info.

Floorplan Manager for Web Dynpro ABAPDeveloping FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 343

Page 344: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

* now here comes the cast from type object to type * if_fpm_oif_info. lo_oif_info ?= ls_fpm_info-floorplan_info. ls_current_state = lo_oif_info->get_current_state( ). ls_target_state = lo_oif_info->get_target_state( ). ENDIF.

* now same thing for GAF... IF ls_fpm_info-floorplan = if_fpm_constants=>gc_floorplan-gaf. DATA: lo_gaf_info TYPE REF TO if_fpm_gaf_info, ls_current_state TYPE fpm_s_gaf_info, ls_target_state TYPE fpm_s_gaf_info.

* now here comes the cast from type object to type if_fpm_gaf_info. lo_gaf_info ?= ls_fpm_info-floorplan_info. ls_current_state = lo_gaf_info->get_current_state( ). ls_target_state = lo_gaf_info->get_target_state( ). ENDIF.

344 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Developing FPM Applications

Page 345: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

4 Adapting FPM ApplicationsFloorplan Manager (FPM) makes full use of the Web Dynpro ABAP Configuration Framework, providing you with several methods for adapting your applications.

Before you make changes to any application, it is important to understand which objects in the application need to be adapted. Do the changes involve only adaptations to the individual floorplan and/or UIBB component configurations, or should the code contained in feeder classes or application controllers also be adapted?

Once you have decided which objects should be adapted, there are a number of ways in which you can make changes to the application. Each has its advantages and disadvantages.

The available adaptation options are outlined below:

● Copy the applicationYou can use the FPM Hierarchy Browser to copy an entire application, and make your changes to the copied version. Any changes made to the original SAP-delivered application will not affect your copied application; however, any further improvements or corrections delivered by SAP will also not reach your copied application.

● Enhance the applicationThe general SAP NetWeaver Enhancement Framework works with FPM-based applications too. All necessary entities can be enhanced. This is the only option that allows you to combine both code changes and configuration adaptations. From SAP NetWeaver 7.31 onwards, the enhancement only contains the changed parts of the application. Therefore, later changes or corrections will be applied even to an adapted configuration.It is possible to have more than one enhancement per component configuration, and, additionally, the single enhancements may originate in different systems. However, with these possibilities there is always the danger of losing the overall picture.

● Customize the applicationWith customizing, only the changed parts of the application are stored. At runtime, the original configuration is merged with the changes in the customizing layer. Therefore, later changes or corrections to the original base configuration will be applied even to an adapted configuration. No additional effort is required compared to modifying the original object. Customizing is the best approach to fine-tuning an FPM application.However, customizing is restricted to component configurations; there is no way to customize code. Also, in contrast to component configurations, it is not possible to create versions or copies as a backup. Additionally, a customizing can be created even if there is no underlying component configuration. This might lead to semantic data inconsistencies during the FPM runtime if a corresponding component configuration is created at a later point. If a configuration is deleted, the customizing delta remains in the database. This could lead to semantic data inconsistencies during the FPM runtime, as the delta might contain only fragments of the information needed to render the FPM application.

● ModificationThis refers to changing the configuration on the configuration level. This is easy to understand and to do.After upgrade of the application or a support package, there is always the risk that the modification is overwritten, and has to be re-implemented.

● Context-Based AdaptationsThis is an adaptation concept that allows you to have adaptations based on the runtime environment. With CBA you have the option to create multiple adaptations of a single application and, at runtime, the adaptation chosen is based on the current launch or runtime conditions. Only the changed parts of the configuration are stored. Therefore, later changes or corrections to the original base configuration will be applied even to an adapted configuration. No additional effort is required compared to modifying the original object. You can

Floorplan Manager for Web Dynpro ABAPAdapting FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 345

Page 346: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

have multiple adaptations in parallel, and there is a mechanism to define which adaptation should be chosen at runtime. CBA is most suitable for large, global, role-based projects.Dynamic CBA (in which the adaptation is only determined at runtime based on the displayed data) normally requires some code adaptation. Therefore, it is often necessary to combine CBA with an enhancement. Some concept work is certainly required before implementation.

For a more detailed description of these adaptation options, see the document Creating, Enhancing, and Adapting FPM Applications on the Floorplan Manager - Learning Material page on the SAP Community Network (SCN).

Related Information

Customizing FPM Applications [page 346]

Personalizing FPM Applications [page 348]End-users can personalize FPM applications at runtime to suit their own requirements.

Context-Based Adaptations [page 355]FPM Applications on Multiple Devices [page 360]

Applications have most often been designed to be run on desktop PCs. However, it is important that the end-user is able to access and read these same applications on other devices such as smartphones and tablets. FPM makes the process of designing the various UIs much easier for you.

Application Enhancement Tool [page 361]

http://scn.sap.com/docs/DOC-8068

4.1 Customizing FPM Applications

SAP-delivered applications can be changed to suit a customer's own business requirements. These changes, or customizings, are made in the Web Dynpro ABAP customizing layer in Administration (Customizing) mode.

All the changes made to an existing, explicit configuration in Administration mode are saved as an independent delta of the configuration in the customizing layer.

If a customizing for a component exists, the FPM framework automatically loads this on to the application when the application is opened. If you try to open a component customizing that does not acutally exist, the system automatically assumes that you want to create one, and displays a dialog box requiring a configuration name and a description for the new customizing.

This level has a transport link that allows changes in the system landscape to be transported.

Changes in Administration mode (those made on the customizing layer) are modification-free changes. This is because when a new release or enhancement package is imported, only the Web Dynpro development layer is affected, and not the customizing layer.

346 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Adapting FPM Applications

Page 347: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Accessing the Customizing Layer

You access this layer by working in Administration (Customizing) mode. For this, your user must have one of the following authorization objects assigned:

● S_DEVELOPWith the authorization profile for ABAP Workbench, you can make any and all changes to a user interface developed with Web Dynpro ABAP/FPM. It provides you with access to both configuration and customizing layers.

● S_WDR_P13NThis authorization object allows you to make changes to a Web Dynpro application in Administrator mode.

Opening an Application in the Customizing Layer

Choose one of the following options to open an application in the customizing layer:

● Locate the application configuration in transaction SE80 under Web Dynpro FPM Application Configurations , and choose Web Dynpro Configuration Test Execute in Administration Mode from the main menu.

● Add the URL parameter sap-config-mode=x to the URL of the running application.

NoteFor applications running in SAP Enterprise Portal or SAP NetWeaver Business Client (NWBC) environments, it is often not possible to add a URL parameter. In these environments, you can add the system parameter FPM_CONFIG_EXPERT under System User Profile Own Data Parameters in the system. Set the value of this parameter to A.

An FPM application running in the customizing layer displays the following buttons on the main toolbar:

● Customize Page and Show Customizable AreasProvide access to FLUID in Administration mode for the various components of the application

Working in the Customizing Layer

Working in this layer, admininstrators can carry out the following activities:

● Make client-wide changes to components● Define which settings can be overwritten on the personalization layer by end-users

Floorplan Manager for Web Dynpro ABAPAdapting FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 347

Page 348: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

4.2 Personalizing FPM Applications

End-users can personalize FPM applications at runtime to suit their own requirements.

Changes to an application made by an end-user at runtime are saved in the Web Dynpro ABAP Personalization layer. In accordance with the Web Dynpro adjustment concept, the personalization of an application by an end-user is valid only for that end-user; the changes are visible only to that end-user.

To be able to personalize an application, personalization must first be enabled. It can be enabled in the following ways:

● In the FPM configuration editor, FLUID, on both configuration and customizing layers● In the configuration APIs in the relevant GUIBB feeder classes

GUIBB Personalization

If personalization is enabled, the Personalize button is present at runtime. The location of this button at runtime varies, but it is usually situated in the toolbar of the GUIBB.

Several GUIBBs can be personalized; see the following sections for more information on the individual GUIBBs.

Floorplan Personalization

The Overview Page (OVP) floorplan type can be personalized. If personalization is enabled, the Personalize button is found in the toolbar of the floorplan.

Related Information

Personalizing Pages in an Overview Page Floorplan [page 348]Personalizing the Hierarchical List Component [page 351]Personalizing the List ATS Component [page 352]Personalizing the Search Component [page 354]

At runtime, users can determine how the Search component should behave when the application is opened.

4.2.1 Personalizing Pages in an Overview Page Floorplan

You can personalize an overview page (OVP) floorplan configuration at runtime if personalization has been enabled in the FPM configuration editor, FLUID, or by API method calls dynamically.

348 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Adapting FPM Applications

Page 349: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Personalization can be enabled for the following parts of an application:

● the whole applicationSelecting the Enable Personalization field in the General Settings panel for the OVP component in FLUID enables personalization for the whole application.

● a given content area of a pageTo restrict the user to certain pages also requires that the Enable Personalization field be selected; the field Personalization Enabled (in the Attributes section of FLUID) for each page can then be selected or deselected as required. Select the required page in the Navigation panel to display this field in the Attributes section.

If personalization is enabled, a Personalization button is available in the toolbar at runtime.

When personalization is enabled, you can carry out the following actions

● Move (drag and drop) UIBBs between the different columns and sections on the page● Use the Collapse and Expand icons to hide or display UIBBs● Choose the Personalization button to carry out more activities

Changes that you make outside of the Personalization dialog box are automatically saved when you exit the application.

Procedure

To change the appearance of a page in an OVP configuration at runtime, proceed as follows:

1. Run the application and choose Personalize in the page toolbar.The system displays the Personalization Editor dialog box. The dialog box is divided into a number of sections and columns as specified by the current page layout at runtime. Each column is represented as a table containing a toolbar and buttons.

2. You can now make the following changes:

○ Change the layout for a sectionSelect a predefined layout from the Layout for Section <section number> dropdown list. The dialog box makes the adjustments immediately so that you can see your changes.

○ Display the UIBBs in a column as tab pagesChoose the Stackable button in a column. When you save your changes and return to the application screen, you can drag and drop UIBBs onto that column. Each UIBB is then displayed as a tab page, the header of which is the title of the UIBB.

○ Add or delete UIBBsUse the Add and Delete icon on the column toolbar to display or remove a UIBB from the column. The Delete button does not actually delete the UIBB but removes it from display. To redisplay the UIBB at any time, choose the Add button in any column. Note that the Add button is not available if all UIBBs are on display.

○ Move UIBBs from one column or section to another column or sectionSelect one or more UIBBs within a column and choose the arrows on the column toolbar to move the UIBB to another column in the same section or to another section.

3. (Optional) Choose the Reset to Default button to close the dialog box, and display all UIBBs with their default settings. Any changes you have made are lost.

4. Choose Save or Cancel to close the dialog box and return to the application screen.

Floorplan Manager for Web Dynpro ABAPAdapting FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 349

Page 350: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

NoteThe OVP always considers all UIBBs of a page when storing personalization settings that are in any way relevant for a UIBB. This means that, potentially, the state of all UIBBs is stored in personalization even though there was just a change in the properties of one UIBB. If there is already customizing data available only the delta changes compared to the customizing data are stored in personalization.

NoteIf there are personalization settings for a particular page on top of customizing data and the customizing data for that page is changed or deleted afterwards the resulting page layout might be unexpected when the application is started again in end-user mode. This is a consequence of the stored delta changes in personalization.

More Information

● Flexible User Interface Designer (FLUID)● Floorplan for Overview Page

4.2.1.1 OVP Personalization plus Dynamic Changes

Unexpected effects might occur in if an OVP application enables personalization, but also performs dynamic changes at runtime using the OVP CNR API IF_FPM_CNR_OVP or the OVP Application Controller API IF_FPM_OVP.

The interaction of personalization and dynamic changes might become apparent on the screen when the end-user resets the personalization settings for an OVP page.

During such a reset, the personalization settings of the page are deleted, and the state of the initial page configuration plus the API changes are restored. The reason for the latter is that the API changes should not be lost during the reset. Whereas dynamic changes at runtime (that are independent of personalization data) should not be a problem, a conflict might arise in the case of dynamic API changes that have been performed on personalized data. In this case, the reset might lead to unexpected results. It is the responsibility of the application to avoid such situations.

NoteBe aware that the dynamic changes at runtime are not directly stored in the personalization settings (as this is not an action performed by the end-user). However, dynamic changes might have an effect on the page layout which the end-user can personalize afterwards. In this case, the complete current layout of the page is stored in the personalization settings, including the changes that were made dynamically.

350 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Adapting FPM Applications

Page 351: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

4.2.2 Personalizing the Hierarchical List Component

Use

At runtime, users can personalize a hierarchical list component to suit their own requirements.

For example, he or she can specify which columns should be visible in the table and whether they can be sorted. Users can also create separate Views, each with a different group of settings. For example, one View might contain only a small subset of the total number of columns in the table.

Prerequisites

Personalization of this component is only possible if the Personalize button has been enabled in the General Settings panel of this component's configuration in FLUID.

Procedure

Depending on the settings specified in the feeder class of the application, users can personalize this component using the following approaches:

● Personalization Dialog BoxVarious personalization options are presented in a dialog box. Any changes you make persist; the changes are still visible the next time you open the application. To remove all your changes, open the Personalization dialog box and choose Reset to Default, followed by Save. The options are reset to those that were delivered with the application, or to the Customizing settings of the application (if such a Customizing exists).

● Menu Options in Column HeadersIf personalization features are available through menu options in the headers of the columns in the table, a small icon appears in the bottom-right corner of the cell containing the column header when you hover over it with the mouse. Changes you make using this method do not persist; when you open the application again, your changes are no longer visible.

The following procedure uses the Personalization dialog box.

To personalize a hierarchical list at runtime, proceed as follows:

1. At runtime, in the toolbar of the hierarchical list component or in the relevant panel header, choose the Personalize button.The Personalization dialog box appears. It contains a section for Views, a tabstrip containing one or more tabs, and a toolbar.

2. You can now make the following changes:

○ ViewsChoose a View from the Current View dropdown list. If no View has been created, the Standard View is displayed.To create a new View, make your changes on the relevant tabs and choose the Save As button. Choose Save to save subsequent changes to the View.Select the Display this View on Open to set a default View.

Floorplan Manager for Web Dynpro ABAPAdapting FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 351

Page 352: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

○ TabstripDepending on the functions that have been specified by the application for this component's configuration, the following tabs are displayed:

○ ColumnsUse the arrows between the Displayed Columns and Available Columns to hide or display individual columns in the list. Use the Up and Down buttons to rearrange the order of the columns displayed in the list. As an alternative to using the arrows and buttons, you can also drag and drop the columns (be sure to select the row by clicking the first cell in the row).You can also specify the number of rows to display in the list, and the width of each column.Choose the Allow Horizontal Scrolling to display a horizontal scroll bar. When you select this option, you also have the Fixed option to specify whether certain columns should remain fixed on the screen as you scroll through the columns in the list.

○ SortingSelect a column from the Sort By dropdown list to sort the list with respect to the chosen column. You can specify whether the list should be sorted in ascending or descending order. Choose the Add Line button to sort the list by additional columns.

3. Choose Save to return to the list and see the changes you have specified.

More Information

● Hierarchical List Component

4.2.3 Personalizing the List ATS Component

Use

At runtime, users can personalize a list component to suit their own requirements.

For example, he or she can specify which columns should be visible and whether they should be sorted, filtered or even grouped. Users can also create separate Views, each with different settings. For example, a particular View may contain only a small subset of the total amount of columns in the table.

Prerequisites

Personalization of this component is only possible for those list components implemented using the FPM_LIST_UIBB_ATS Web Dynpro component.

Personalization of this component through the Personalization dialog box is only possible if the Personalize button has been enabled in the General Settings panel of this component's configuration in FLUID.

352 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Adapting FPM Applications

Page 353: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Procedure

Users can personalize this component using the following approaches:

● Personalization Dialog BoxVarious personalization options are presented in a dialog box. Any changes you make persist; the changes are still visible the next time you open the application. To remove all your changes, open the Personalization dialog box and choose Reset to Default, followed by Save. The options are reset to those that were delivered with the application, or to the Customizing settings of the application (if such a Customizing exists).

● Menu Options in Column HeadersIf personalization features are available through menu options in the headers of the columns in the table, a small icon appears in the bottom-right corner of the cell containing the column header when you hover over it with the mouse. Changes you make using this method do not persist; when you open the application again, your changes are no longer visible.

● Sorting/Grouping Menu Option in FLUIDYou can set a default sort or grouping on a list/table for when the application is opened. In the General Settings panel, choose GUIBB Settings Default Sorting/Grouping .

The following procedure uses the Personalization dialog box.

To personalize this component at runtime, proceed as follows:

1. At runtime, in the toolbar of the component or in the relevant panel header, choose the Personalize button.The Personalization dialog box appears. It contains a section for Views, a tabstrip containing one or more tabs, and a toolbar.

2. You can now make the following changes:

○ ViewsViews enable you to quickly display the information in a table that is of most interest to you. For example, you may have a table with a large number of columns, of which the most interesting are positioned at the start of the table and at the end of the table. To avoid scrolling to those columns at the end of the table, you can hide those columns of little interest and then create a new View displaying only the important ones. The original View still remains available.Choose a View from the Current View dropdown list. If no View has been created, the Standard View is displayed.To create a new View, make your changes on the relevant tabs and choose the Save As button. Choose Save to save subsequent changes to the View.Select the Display this View on Open to set a default View.

○ TabstripDepending on what has been specified by the application for this component's configuration, the following tabs are displayed:

○ ColumnsUse the arrows between the Displayed Columns and Available Columns to hide or display individual columns in the table. Use the Up and Down buttons to rearrange the order of the columns displayed in the table. As an alternative to using the arrows and buttons, you can also drag and drop the columns (be sure to select the row by clicking the first cell in the row).You can also specify the number of rows to display in the list, and the width of each column.Choose the Allow Horizontal Scrolling to display a horizontal scroll bar. When you select this option, you also have the Fixed option to specify whether certain columns should remain fixed on the screen as you scroll through the columns in the table.

○ Sorting and Grouping

Floorplan Manager for Web Dynpro ABAPAdapting FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 353

Page 354: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Select a column from the Sort By dropdown list to sort the list with respect to the chosen column. You can specify whether the list should be sorted in ascending or descending order. Choose the Add Line button to sort the list by additional columns.Select the Group Column checkbox to group rows according to the unique entries in the column (visible in the Sort By dropdown list). An extra column appears as the first column in the table displaying each unique entry. Using the expand/collapse icons next to each unique entry, you can display all those rows related to the group.To ungroup your data, choose the Ungroup menu option in the header of the column you originally grouped by.

○ FilterDisplay only a selection of data in the list by adding a filter. Choose a column from the Attribute Selection dropdown list, specify the Operator Selection and enter the relevant text in the field on the right. Add extra criteria to your filter by choosing the Insert New Line button. To exclude certain data from the results of your filter, choose the Add Criteria to Exclude link and specify the criteria.

○ AggregationThis tab provides you with some simple mathematical functions ( Sum, Minimum, Maximum, and Average) which you can display in your data at runtime.Choosing one of these functions generates an extra row (highlighted in yellow) at the end of the table, showing the result of the function and an icon indicating which function you have used. If the data is grouped, the function result is additionally displayed for each group; the function result is displayed in the same row as the group heading and in the column which you have grouped by.

3. Choose Save to return to your data and see the changes you have specified.

More Information

● List ATS Component

4.2.4 Personalizing the Search Component

At runtime, users can determine how the Search component should behave when the application is opened.

Providing that personalization for the Search component has been activated in FLUID, users can choose the Personalize button in the toolbar of the Search component at runtime to determine the following:

● Default SearchUsers can choose a specific search variant to display when the application is opened. The search criteria are then displayed, but the search itself is not automatically run; the user must choose the Search button to do this.The search variants displayed in this field are actually the saved search variants.

● Run Default Search on OpenSelect this option to run the default search when the application is opened.

● Run Selected Search AutomaticallySelect this option to automatically run any search variant that the user chooses from the list of Saved Searches.

● Collapse Search Criteria PanelSelect this option to collapse or expand the whole search panel when the application is opened.

354 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Adapting FPM Applications

Page 355: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

4.3 Context-Based Adaptations

With context-based adaptations (CBA), an FPM application can be adapted dependent on specific runtime parameters. A particular adaptation will be applied when the application is called within a specified context (a context being, for example, the role of the person who launches the application).

CBA negates the need for making extra copies of applications, and for writing additional code.

Use

An application configuration might display a form that is completed by both employees and their managers. You might want the form that is displayed to the managers to look different from that which is displayed to the employee. For example, the managers' form might have fewer entry fields or it might contain a section for notes. Instead of making several copies of an application configuration and adjusting them for every eventuality that you require, Floorplan Manager provides you with CBA.

Each adaptation of a configuration contains only the delta changes to its base configuration.

Structure

Applications that are adaptable applications are embedded inside a 'wrapper' application.

The adaptation wrapper application is not based on the normal floorplan component ( FPM_ <Floorplan ID>_COMPONENT, for example FPM_OVP_COMPONENT), but is based on an 'adaptable' component instead ( FPM_ADAPTABLE_ <Floorplan ID> , for example, FPM_ADAPTABLE_OVP). The adaptable component calls the normal floorplan component. The following figure illustrates this concept; the upper part of the figure shows an application based on the Overview Page (OVP) component ( FPM_OVP_COMPONENT), whilst the lower part shows an application based on the adaptable version of the OVP component, FPM_ADAPTABLE_OVP - a so-called wrapper component.

Floorplan Manager for Web Dynpro ABAPAdapting FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 355

Page 356: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Figure 25: Context-Based Application based on OVP Component

Which particular adaptation of an application is displayed at runtime depends on the parameters passed to the application. Each wrapper application knows which parameters to expect.

A parameter that affects an adaptable application is known as an adaptation dimension. Adaptation dimensions are attached to adaptation schema. This is explained below in more detail:

● Adaptation SchemaA list of characteristics (or dimensions) which can be used for adaptations, for example a role or country.Adaptation schemas relate to a whole application area; it is not necessary to create a separate schema for each application.

● Adaptation DimensionRepresents an individual characteristic within an adaptation schema. It is maintained in transaction SM30 view FPM_V_ADAPT_DIM. Examples of adaptation dimensions include role and country.A dimension is defined by the following attributes:

○ NameFor identification purposes.

○ IndexUsed to determine the dominating adaptation dimension in case there is a collision.

○ Data elementUsed only at design time, allowing the provision of field helps and F4 helps.

The adaptation dimensions that are used in an adaptable application are found on the Parameters page of the application in transaction SE80.

356 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Adapting FPM Applications

Page 357: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The adaptations that you create always inherit attributes from the base configuration. If you make changes to the base configuration, these changes are present in the adapted configurations too, even if you created the adapted configurations before the changes to the base configuration were made.

Activities

Recognizing an Adaptable Application

Applications created using CBA are known as adaptable applications. You can recognize whether an application is adaptable in the following ways:

● In the Web Dynpro hierarchy browserAn extra component configuration is visible, the 'adaptable' floorplan component, for example FPM_ADAPTABLE_OVP.

● At runtime, when you open the FPM configuration editor, FLUID, using the Customize Page icon on the main toolbar.The Adaptations toggle-button is visible on the main toolbar. Choosing this button displays the Adaptations panel, listing all existing adaptations of the application configuration.

More Information

● Enabling an Application for CBA● Creating an Adaptation of an Adaptable Application

4.3.1 Enabling an Application for CBA

Use

You can create adaptations of your application to use in context-specific cases. These are known as context-based adaptations (CBA).

For example, you can create several configurations of an application, each one adapted to the particular context in which it is called; a context is, for example, the role of the person who launches the application.

CBA negates the need for making extra copies of applications and for writing lots of additional code.

An application configuration must first be enabled with a 'wrapper' component for it to be used as an adaptable configuration; the wrapper component provides the context information. You can create a wrapper component using the CBA Enabler application as described in the following procedure.

Floorplan Manager for Web Dynpro ABAPAdapting FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 357

Page 358: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Prerequisites

You have an existing application configuration that you would like to convert to an adaptable configuration.

Procedure

To be able to create context-based adaptations of an application, you must complete the following steps:

1. Create the Adaptation Schema and DimensionsOpen transaction SM34. Enter FPM_VC_ADAPT_SCHEMA as the View Cluster name and create a new adaptation schema, for example, MY_SCHEMA, and the dimensions that you need (for example, Role and Country).The index is used to determine the dominating adaptation dimension to avoid possible collisions. The data element is used for design-time purposes, allowing you to provide field help while configuring context-based adaptations.

2. Enable the Application as an Adaptable ApplicationYou can use the CBA Enabler tool to enable your application for context-based adaptations. To do this, complete the following steps:

a. Start the CBA Enabler. Navigate to the following folder in the WD ABAP Workbench (transaction SE80): APB_FPM_CONF FPM Applications FPM_CFG_CBA_ENABLER .

b. In Step 1 (Enter Adaptation Settings) enter the following configuration data:

○ Application Configuration NameEnter the name of the existing application which you want to enable for CBA.

○ Adaptation SchemaEnter an existing Schema.

○ Adaptation Configuration NameEnter the name of the component configuration that contains the Schema information.

○ Origin of Adaptable Application ConfigurationHere you can decide to use the existing application (whose name you entered already), or you can decide to create a completely new application and application configuration. If you choose the second option, you must enter the name of the CBA application to be created.

NoteBe aware that if you create a new application any references that you had to the original application (for example in the SAP Enterprise Portal) will be lost.

○ You can classify your application as administration-relevant (with regard to the Internet Communication Framework (ICF)) by selecting the Administration Flag for ICF Services checkbox. See More Field Help... in the context menu for further information on this topic.

The addition of a namespace is optional.c. Choose Step 2 (Assign Package and Transport Request) and enter the relevant information.

You have now enabled your application for CBA.d. In the ABAP Workbench, navigate to your application configuration, and add the adaptation dimensions

that you created in step 1 of this procedure to your application. Enter them on the Parameters tab in your application. The dimensions can then be passed as parameters to your application.

358 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Adapting FPM Applications

Page 359: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Result

You have enabled your application for CBA. You can now configure your adaptations in the Adaptations panel inside FLUID.

More Information

● Context-Based Adaptations● Creating and Editing an Adaptation of an Adaptable Application● Flexible User Interface Designer (FLUID)

4.3.2 Creating and Editing an Adaptation of an Adaptable Application

Use

You can create context-specific adaptations of an application. For example, an application that displays a form to both employees and managers can be adapted so that when a manager opens the application, he or she is presented with a form that looks different to that which the employee sees.

Prerequisites

You have an existing adaptable application.

To check whether your application is adaptable, open the application using FLUID. If the application is opened at floorplan level, an Adaptations toggle button is visible in the main toolbar. If it is an adaptable application, an additional component, FPM_ADAPTABLE_ <FLOORPLAN_ID> is visible in the standard Web Dynpro application editor.

Procedure

1. In the ABAP Workbench, select the application you want to edit and choose Start Configurator.2. Choose Continue in Change Mode in the Editor for Web Dynpro ABAP Application Configuration window.3. Choose the link to the floorplan component of the application.

The FPM configuration editor, FLUID, is displayed.4. From the main toolbar, open the Adaptations panel.

The Adaptations panel appears under the main toolbar. There is at least one row in the Schema table; this is the base configuration.

Floorplan Manager for Web Dynpro ABAPAdapting FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 359

Page 360: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

5. Select the base configuration and choose one of following buttons:

○ AddEnter values for the adaptation dimensions in the Add Adaptation dialog box that appears and press OK.

○ Change Dimension ValuesEdit existing values for the adaptation dimensions in the Change Dimension Values dialog box that appears and press OK.

6. A new adaptation appears in the Schema table underneath the base configuration.Using the Preview panel or the tab pages below the Adaptation panel, you can now make the desired changes to this adaptation (for example, add an extra field in a form for the manager role).

7. To test your new adaptations, run the application as you would normally. You see the original application, unchanged. To see how the adapted application looks, add the relevant parameter and values to the URL (for example &ROLE=MANAGER and refresh the screen. Note that the values you enter for your parameter in the URL are case-sensitive.

NoteAny changes you make in the base configuration are inherited by the adaptations, even if you make changes after you have created an adaptation.

More Information

● Flexible User Interface Designer (FLUID)● Context-Based Adaptations● Enabling an Application for CBA

4.4 FPM Applications on Multiple Devices

Applications have most often been designed to be run on desktop PCs. However, it is important that the end-user is able to access and read these same applications on other devices such as smartphones and tablets. FPM makes the process of designing the various UIs much easier for you.

If you have an application that should be run on multiple devices, it is most likely that you need to adjust the UI for each type of device. For example, you might want to remove particular fields, or use single-column layouts instead of multi-column layouts when displaying the application on a smartphone rather than the desktop.

You can do this using Context-Based Adaptations (CBA).

You must ensure that the application is enabled for CBA:

● If your application is not already CBA-enabled, you need to make it so using the Schema FPM_DEVICE.● If your application is already CBA-enabled, you must add a Dimension to your Schema, based on the data

element FPM_DEVICE_TYPE.

Once you have enabled the application for CBA, you can create context-based adaptations for the following device types:

360 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Adapting FPM Applications

Page 361: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● Desktop● Tablet● Smart Phone

The FPM framework takes care of determining the device type, and applying the right adaptation at runtime.

Related Information

Context-Based Adaptations [page 355]

4.5 Application Enhancement Tool

Use

Floorplan Manager provides you with a link to the Application Enhancement Tool (AET).

This tool allows you to create additional fields which you can then add to the user interface of your application. Creation of additional fields requires the presence of enhancement places (markers) in specific DDIC (Data Dictionary) structures, namely, tables. These enhancement places are defined during development and allow additional fields to be appended to such enhancement places as, for example, BOL (Business Object Layer) objects.

The relevant feeder class of a component in your application determines the presence of these enhancement places. If an enhancement place exists, the Create/Maintain Field Enhancements link is displayed in the Repositories panel in the FPM configuration editor, FLUID.

New fields can be added to search, and form components. You can add columns to a list component.

It is also possible to create new GUIBB configurations (additional list or form components) using the AET; you can configure them afterwards in FLUID.

Once you have created the additional fields using the AET, refresh the application screen to have them appear in the Repositories panel. You can then move them to the appropriate UIBB on the user interface.

More Information

● Flexible User Interface Designer (FLUID)● Editing Application Configurations with FLUID

Floorplan Manager for Web Dynpro ABAPAdapting FPM Applications © 2014 SAP SE or an SAP affiliate company. All rights reserved. 361

Page 362: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

5 Special Topics

Related Information

FPM CHIP Integration [page 362]CHIPs (Collaborative Human Interface Part) are created using the Web Dynpro ABAP Page Builder framework. A CHIP is an encapsulated, stateful piece of software used to provide functions in collaboration with other CHIPs in a Page Builder page or side panel. Single FPM GUIBBs can be displayed inside a CHIP.

Embedding an FPM Application [page 366]FPM was designed for building stand-alone applications. However, it is possible (with some restrictions) to embed an FPM application within another Web Dynpro application.

Setting a Default ALV View for a Freestyle UIBB [page 368]When you embed freestyle UIBBs into an FPM application, you can select the default SAP List Viewer (ALV) view which will be displayed when the freestyle UIBB is launched during runtime.

5.1 FPM CHIP Integration

CHIPs (Collaborative Human Interface Part) are created using the Web Dynpro ABAP Page Builder framework. A CHIP is an encapsulated, stateful piece of software used to provide functions in collaboration with other CHIPs in a Page Builder page or side panel. Single FPM GUIBBs can be displayed inside a CHIP.

In principle, an FPM floorplan component can be used as a CHIP; the wrapper component FPM_CHIP implements the CHIP interface, and the OVP component directly implements it. However, this is not recommended since a full floorplan UI is usually too large to be displayed inside a CHIP. However, there is a need for displaying single GUIBBs inside a CHIP, for example, a Form UIBB. For this purpose, FPM offers a single UIBB floorplan, the UIBB CHIP Wrapper Component, FPM_UCW_COMPONENT.

For more information on CHIPs, search for Creating Mashups with the Page Builder in the SAP Help Portal.

Structure of the UIBB CHIP Wrapper Component

The UCW displays only a single UIBB, without an Identification Region (IDR) or a page header.

However, it is permitted to assign nested (composite) UIBBs to the UCW (for example, a Composite UIBB, a Tabbed UIBB, or a Search UIBB (which can embed a Results List UIBB). The configuration is rather simple, and must be maintained with the WD ABAP default configuration editor.

362 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Special Topics

Page 363: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Multi-Instantiability

As there may be several FPM-based CHIPs on a page, it must be possible to run multiple FPM instances in parallel. In this case, the FPM factory to access the central FPM instance (reference to IF_FPM) can no longer be used.

To achieve multi-instantiability, FPM offers the interface IF_FPM_MULTI_INSTANTIABLE, both on WD ABAP and ABAP OO level. The interfaces have a method FPM_INITIALIZE which passes the local FPM instance. With the other method, FPM_IS_MULTI_INSTANTIABLE, an FPM object can declare itself as being multi-instantiable with a Boolean return value. An FPM object that returns a TRUE value commits itself to obey the following rules:

● Only the local FPM instance (IF_FPM) passed in FPM_INITIALIZE must be accessed. CL_FPM_FACTORY=>GET_INSTANCE must not be accessed except for a simple determination between runtime and design time.

● The methods of CL_FPM_SERVICE_MANAGER are always called with the local FPM instance.● Method CL_FPM_UIBB_API_FACTORY is always called with the local FPM instance● Instances of CL_FPM_LPD_PROVIDER are always created with the local FPM instance.● The application logic itself must compatibly run with parallel FPM instances. (Example: If FPM application

objects use the same singleton pattern to access shared transactional data, they should not declare themselves as being multi-instantiable.)

An entire FPM instance is multi-instantiable as long as all its instantiated FPM application-specific objects (that is, application controllers, freestyle UIBBs, GUIBB feeder classes, wire model connector classes and wire model transaction handlers) declare themselves as being multi-instantiable too. GUIBBs are multi-instantiable if, and only if, their feeder classes are multi-instantiable too. If there is more than one non multi-instantiable FPM instance in one roll area, the FPM runtime raises a short dump.

To avoid conflicts due to multi-instantiation, it is recommended that new developments ensure multi-instantiation of FPM objects by implementing IF_FPM_MULTI_INSTANTIABLE, accessing solely the FPM instance passed in method FPM_INITIALIZE, and returning a TRUE value in FPM_IS_MULTI_INSTANTIABLE. In particular, it is strongly recommended that UIBBs and feeder classes developed for usage in the UCW be multi-instantiable.

Communication between FPM CHIPs

UIBBs and GUIBB feeder classes can optionally implement the WD interfaces IF_FPM_CHIP, and IF_FPM_CHIP_FEEDER respectively. Using the Web Dynpro CHIP API passed in method FPM_CHIP_DO_INIT and CHIP_ INIT, it is possible to add dynamic inports. Inport events are communicated in the UCW through the FPM event FPM_HANDLE_CHIP_INPORT, and the CHIP port event object is attached as the event parameter with the key FPM_CHIP_PORT_EVENT.

NoteCHIP inport event-handling is processed after the Web Dynpro before-navigation phase, that is, the latest phase where FPM can execute its dynamic navigation. As a consequence, it is not possible to invalidate the navigation in the event loop triggered by FPM_HANDLE_CHIP_INPORT. For example, it is not possible to trigger the invalidation of dynamic UIBBs, or to exchange UIBBs or tab-strips by the configuration controller of a Tabbed UIBB.

Floorplan Manager for Web Dynpro ABAPSpecial Topics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 363

Page 364: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Tagging in FPM GUIBBs

UIBBs can be a tagging source, no matter whether they are embedded in a CHIP or whether they are part of the canvas application. For Web Dynpro components, this can be done by the standard Web Dynpro context tagging. Since GUIBB feeder classes do not have access to the Web Dynpro context, the tagging can be defined in the field descriptions provided in the feeder interface method GET_DEFINITION. Here a tag can be assigned to any field through the field description component TAG_NAME. If the feeder class has assigned a tag to a field, the tagging needs to be activated in the GUIBB configuration. This is done through an activation checkbox (Tag is Active) in the field’s attributes in the Attributes panel in the FPM configuration editor, FLUID.

5.1.1 Creating a CHIP for a Single UIBB

FPM applications are usually too large to be completely displayed inside a CHIP. However, you can use a special FPM UIBB CHIP Wrapper (UCW) component - basically, a single floorplan UIBB - which allows you to display just a single UIBB in a side panel or other Web Dynpro Page Builder page.

Prerequisites

You have created a UIBB (either a freestyle WD component or one based on an FPM GUIBB component).

Procedure

1. Create the UCW configuration (and add your existing UIBB to the UCW floorplan).a) Create a configuration for WD component FPM_UCW_COMPONENT (found in APB_FPM_CORE package).

○ Choose the FPM_UCW_COMPONENT component, and from the context-menu, choose Create/Change Configuration.

○ Enter a name for your new configuration in the Configuration ID field and choose New○ Enter a description and package details in the dialog boxes that follow.

b) In the Component-Defined panel, select the ucwApplication row, and add a new UIBB. A list of UIBB attributes appears.

c) Enter the following attributes for the UIBB you have created (see Prerequisites above):

○ Component: The original component that your existing configuration is based on (for example, FPM_LIST_UIBB)

○ Window Name○ Configuration Name

d) Save your configuration.2. Create the CHIP (and refer it to the UCW configuration).

a) In APB_FPM_CORE package, choose the WD component FPM_CHIP.b) In the context menu, choose Create, Web Dynpro CHIP.

364 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Special Topics

Page 365: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

c) Enter a name and package details in the dialog boxes that follow.d) On the Properties tab, enter a display name and description and the following information:

○ Component: FPM_UCW_COMPONENT (overwrite the entry FPM_CHIP)○ Configuration Name: The name of the configuration you created in step 1 above○ Interface View: FPM_WINDOW○ Plug Name: DEFAULT

e) Save.

Results

You have now created a CHIP containing a single UIBB. You can add it to a side panel or any other Web Dynpro ABAP Page Builder type page.

5.1.2 Adding Systems to the Saved Searches CHIP

Use

The Saved Searches CHIP (Collaborative Human Interface Part) displays a list of searches you have executed (using the Floorplan Manager (FPM) Search UIBB) and saved in your system(s). Each search is displayed as a hyperlink which, when selected, opens the relevant application and executes the search automatically.

The Saved Searches CHIP can contain searches carried out in more than one system by the user.

CHIPS can be implemented on any page that is based on Page Builder (for example, the standard homepages).

The UIBB contained in the UIBB CHIP Wrapper (UCW) is based on the main view of the Launchpad UIBB. The feeder class for this UIBB contains parameters that allow you to edit or add additional system connections in the CHIP, so that your saved searches in multiple systems are recorded.

Procedure

You can edit the Saved Searches CHIP to ensure that searches you save in multiple systems, and not just the default system, are stored in the CHIP.

To do this, you can create a customizing of the launchpad configuration that is wrapped in the UCW.

To do this, complete the following steps:

1. Open transaction SE80 and choose the APB_FPM_GUIBB package.

2. Navigate to Web Dynpro Component Configurations folder.3. Open the FPM_SAVED_SEARCHES_LOCAL_LPD component in Administrator mode with the FPM configuration

editor, FLUID.4. Enter the Customizing details (if one does not exist already).

Floorplan Manager for Web Dynpro ABAPSpecial Topics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 365

Page 366: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

5. In the General Settings panel, choose the Feeder Class Parameters button.6. In the Edit Parameters dialog box, enter the System Alias and Destination of your additional system.7. Save your entries.

More Information

● Flexible User Interface Designer (FLUID)

5.2 Embedding an FPM Application

FPM was designed for building stand-alone applications. However, it is possible (with some restrictions) to embed an FPM application within another Web Dynpro application.

NoteAlthough it is technically possible to embed FPM into another FPM or Web Dynpro application, it is against the intended use of the FPM framework. Therefore, we strongly recommend that you do not do this unless you have a thorough understanding of the framework.

To embed an FPM application inside another Web Dynpro application, proceed as follows:

1. Create a usage for the floorplan component FPM_xxx_FLOORPLAN (where xxx is the placeholder for the chosen floorplan OVP, GAF, UCW, or OIF) within the embedding component.

2. Embed the FPM_WINDOW interface view within one of the views of the embedding component.3. Manually create the FPM component to be used (as you must provide the configuration key of the floorplan

component). This is best done at this point in time. In most cases, this is done in the WDDOINIT method of the embedding application’s component controller, as the sample code below shows:

DATA: lo_usage TYPE REF TO if_wd_component_usage, ls_conf_key TYPE wdy_config_key. lo_usage = wd_this-> wd_cpuse_fpm_usage( ). IF lo_usage-> has_active_component( ) = abap_true. lo_usage-> delete_component( ).ENDIF. ls_conf_key- config_id = '<configuration ID>.* recreate component using new configuration IDTRY. CALL METHOD lo_usage-> create_component EXPORTING component_name = 'FPM_<xxx>_COMPONENT' configuration_id = ls_conf_key. CATCH cx_wd_runtime_api .ENDTRY.

NoteThe following remarks relate to the above sample code:

366 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Special Topics

Page 367: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

● The configuration you pass is the configuration key of component FPM_xxx_COMPONENT; you cannot pass the application’s configuration key.

● The code example names the usage FPM_USAGE. If you name it differently, adjust the following line: LO_USAGE = WD_THIS->WD_CPUSE_FPM_USAGE( ).

● The DELETE_COMPONENT call is not necessary for simple, static embedding. However, you may need it if you want to change the embedded FPM application in the future.

Constraints

● As FPM dynamically navigates the UIBBs into the FPM window, you must ensure that the embedded FPM is already embedded and initialized when the navigation phase starts. If you do not do this, you will see the embedded application without the UIBBs. This happens, for example, when you navigate the embedded FPM using a plug into the embedding window.

● If you want to embed an FPM application within another FPM application, ensure that both FPM applications support multi-instantiation.

● Be aware that if you want to embed OIF and GAF applications, you cannot pass a configuration key for the IDR (header area). Therefore, the header appears without configuration settings; these you can set programmatically at runtime.

● You cannot pass application parameters for the FPM application, as the application is now unknown to FPM.● There is no communication channel offered by the FPM framework, neither allowing control of the embedded

application from the embedding application, nor for passing data from the embedded application to the outer application. Such communication requires some programming hacks (such as the use of public static attributes or singletons) which are far from being architecturally clean.

Related Information

FPM CHIP Integration (Multi-Instantiability Section) [page 362]CHIPs (Collaborative Human Interface Part) are created using the Web Dynpro ABAP Page Builder framework. A CHIP is an encapsulated, stateful piece of software used to provide functions in collaboration with other CHIPs in a Page Builder page or side panel. Single FPM GUIBBs can be displayed inside a CHIP.

Floorplan Manager for Web Dynpro ABAPSpecial Topics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 367

Page 368: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

5.3 Setting a Default ALV View for a Freestyle UIBB

When you embed freestyle UIBBs into an FPM application, you can select the default SAP List Viewer (ALV) view which will be displayed when the freestyle UIBB is launched during runtime.

Context

NoteThis feature is restricted to those ALV views that have been created previously on the configuration level. To do this, you must run the FPM application with the URL parameter SAP-CONFIG-MODE = CONFIG and create the views using the ALV Settings dialog box.

For freestyle UIBBs, a list is displayed using the SAP List Viewer (ALV). To determine the default ALV views, complete the following steps:

Procedure

1. Implement the marker WD interface IF_FPM_CFG_CONF_ALV_USAGE in the freestyle UIBB which has a usage on the WD component SALV_WD_TABLE.

2. Open the FPM configuration editor, FLUID, and add this freestyle UIBB to your floorplan.3. In the <Floorplan> Schema panel, choose the row containing the UIBB to display its attributes.

The table CONFIGURABLE ALV TABLES, is displayed.

4. In this table, use the field help to enter one ALV view for each usage on the WD component SALV_WD_TABLE.

5.3.1 Rendering ALV Views during Runtime

The selected ALV view is not automatically applied to the usage on the WD component SALV_WD_TABLE in your freestyle UIBB.

Instead, you must instantiate the usage on the WD component SALV_WD_TABLE with the corresponding ALV configuration key.

To do this, apply the ALV configuration keys in the method WDDOINIT of your freestyle UIBB with the following code:

method wddoinit . data lo_cmp_usage type ref to if_wd_component_usage. data lo_fpm type ref to if_fpm. data lt_conf_comp_usage type fpm_t_uibb_conf_comp_usage. data ls_conf_comp_usage type fpm_s_uibb_conf_comp_usage. data lv_component_name type wdy_component_name. data ls_config_key type wdy_config_key.

368 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Special Topics

Page 369: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

* get name of freestyle UIBB lv_component_name = wd_this->wd_get_api( )->get_component_info( )->get_name( ).

* get tree of configurable ALV usages lo_fpm ?= cl_fpm_factory=>get_instance( ). lt_conf_comp_usage = lo_fpm->if_fpm~mo_conf_comp_usage->get_conf_comp_usage_tree( iv_component_name = lv_component_name ).

* pick one configuration key from tree read table lt_conf_comp_usage into ls_conf_comp_usage with key child_component_usage_name = 'ALV'. move-corresponding ls_conf_comp_usage to ls_config_key.

* pass configuration key to ALV usage lo_cmp_usage = wd_this->wd_cpuse_alv( ). if lo_cmp_usage->has_active_component( ) is initial. lo_cmp_usage->create_component( configuration_id = ls_config_key ). endif.

endmethod.

For more information on ALV views, see SAP List Viewer in Web Dynpro for ABAP in the SAP NetWeaver Library.

Floorplan Manager for Web Dynpro ABAPSpecial Topics © 2014 SAP SE or an SAP affiliate company. All rights reserved. 369

Page 370: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

6 ReferenceRelated Information

Final Flags [page 370]One-Click Actions [page 370]Melting Groups [page 371]

A melting group is a group of fields that belong together semantically, and that can be found in Form components. Melting groups often require special rendering in display mode (the fields are often merged together) to ensure better user readability.

6.1 Final Flags

Definition

A method for preventing the editing of fields by the next layer of users in the Web Dynpro ABAP configuration framework.

Example

If a developer (working on the configuration level) checks a Final Flag for the field Sequence Index, then an administrator (working on the Customizing level) is unable to edit the Sequence Index field.

6.2 One-Click Actions

Definition

One-click actions are actions that can be triggered by one click of the mouse without the need to first make a row selection and then click a function button. In Floorplan Manager applications, they can be found in List and Hierarchical List (Tree) components.

Structure

One-click actions for each row in a table are grouped in the Actions column which is displayed at the beginning of a table.

370 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Reference

Page 371: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

The action is related to a single table row item only.

The figure below shows an example of one-click actions at runtime:

Figure 26: List Component with Action Column containing One-Click Action Controls

The feeder class defines the set of available one-click actions for the actions column. Once this has been defined, an extra field (the actions column, technical name FPM_ROW_ACTIONS_COLUMN) appears in the Repositories panel inside the FPM configuration editor, FLUID, and which then can be added to the <GUIBB> Schema panel. The one-click actions are then added to the actions column by choosing the Add Action button in the Action Assignment table in the Attributes panel.

The Display Type of a one-click action is always Link to Action.

More Information

● Flexible User Interface Designer (FLUID)

6.3 Melting Groups

A melting group is a group of fields that belong together semantically, and that can be found in Form components. Melting groups often require special rendering in display mode (the fields are often merged together) to ensure better user readability.

Typical examples of melting groups include the following:

● Street name and house number● Phone number with area code and extension● Amount and a currency● Number and its unit of measurement

Floorplan Manager for Web Dynpro ABAPReference © 2014 SAP SE or an SAP affiliate company. All rights reserved. 371

Page 372: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

A melting group requires special rendering in display mode to override the space between the fields that is created by the use of a rigid form grid in edit mode. Therefore, fields inside a melting group in edit mode may look very different than they do in display mode.

NoteBefore the arrival of the Form GL2 component, developers could define their own melting groups within a form. This is no longer the case; the FPM framework now automatically defines melting groups using a special algorithm. For more information on this, search for the Floorplan Manager for Web Dynpro ABAP space on the

SAP Community Network, scn.sap.com .

Suppression of Melting Group Rendering

The field Suppress Field Merging in the Display-Type-Dependent Properties section of the Attributes panel allows you to stop the automatic special rendering of the fields inside a melting group in display mode.

372 © 2014 SAP SE or an SAP affiliate company. All rights reserved.Floorplan Manager for Web Dynpro ABAP

Reference

Page 373: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

Important Disclaimers and Legal Information

Coding SamplesAny software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, unless damages were caused by SAP intentionally or by SAP's gross negligence.

AccessibilityThe information contained in the SAP documentation represents SAP's current view of accessibility criteria as of the date of publication; it is in no way intended to be a binding guideline on how to ensure accessibility of software products. SAP in particular disclaims any liability in relation to this document. This disclaimer, however, does not apply in cases of wilful misconduct or gross negligence of SAP. Furthermore, this document does not result in any direct or indirect contractual obligations of SAP.

Gender-Neutral LanguageAs far as possible, SAP documentation is gender neutral. Depending on the context, the reader is addressed directly with "you", or a gender-neutral noun (such as "sales person" or "working days") is used. If when referring to members of both sexes, however, the third-person singular cannot be avoided or a gender-neutral noun does not exist, SAP reserves the right to use the masculine form of the noun and pronoun. This is to ensure that the documentation remains comprehensible.

Internet HyperlinksThe SAP documentation may contain hyperlinks to the Internet. These hyperlinks are intended to serve as a hint about where to find related information. SAP does not warrant the availability and correctness of this related information or the ability of this information to serve a particular purpose. SAP shall not be liable for any damages caused by the use of related information unless damages have been caused by SAP's gross negligence or willful misconduct. All links are categorized for transparency (see: http://help.sap.com/disclaimer).

Floorplan Manager for Web Dynpro ABAPImportant Disclaimers and Legal Information © 2014 SAP SE or an SAP affiliate company. All rights reserved. 373

Page 374: Floorplan Manager for Web Dynpro ABAP - …a248.g.akamai.net/n/248/420835/b379855819a9e98e1353600b5febed... · 5.3 Setting a Default ALV View for a Freestyle UIBB ... See also Floorplan

www.sap.com/contactsap

© 2014 SAP SE or an SAP affiliate company. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. The information contained herein may be changed without prior notice.Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary.These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies.Please see http://www.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.