You are on page 1of 17

Web Dynpro ABAP - Floor Plan

Manager

Applies to:
SAP ECC 6.0. For more information, visit the Web Dynpro ABAP homepage.

Summary
The article tells about displaying employee details using Floor Plan Manager in Web Dynpro for ABAP.
Author:

J.Jayanthi

Company: Siemens IT Solutions and Services Pvt. Ltd.


Created on: 19 April 2011

Author Bio
J.Jayanthi is a Certified ABAP consultant with HR ABAP and Web Dynpro ABAP knowledge.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


1

Web Dynpro ABAP - Floor Plan Manager

Table of Contents
Floor Plan Manager in Web Dynpro ABAP ......................................................................................................... 3
Prerequisites ....................................................................................................................................................... 3
Creating Web Dynpro ......................................................................................................................................... 3
Component Controller ......................................................................................................................................... 4
View. ........................................................................................................................................................ 5
Window. .............................................................................................................................................................. 8
Code. .................................................................................................................................................... 8
Creating Web Dynpro Application .................................................................................................................... 10
Create Configuration ......................................................................................................................................... 10
Output.. .................................................................................................................................................. 14
Related Content ................................................................................................................................................ 16
Disclaimer and Liability Notice .......................................................................................................................... 17

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


2

Web Dynpro ABAP - Floor Plan Manager

Floor Plan Manager in Web Dynpro ABAP


Floor Plan Manager shortly called as FPM provides framework for developing new Web Dynpro ABAP
application interfaces consistent with SAP UI guidelines. There are following floor plans:
Object Instance Floorplan (OIF)
Guided Activity Floorplan (GAF)
Quick Activity Floorplan (QAF)
In this article, we are going to see the usage of OIF.

Prerequisites
Component
The component is the central, reusable unit of the application project. You can create any number of views in
a component and arrange them in any number of windows.
View
The view is the smallest unit of a Web Dynpro application visible for the user. The layout elements and dialog
elements - for example, tables, text fields, or buttons - required for the application are arranged in a view.
The view contains a controller and a controller context in which the application data to be processed is stored
in a hierarchical structure. This allows the linking of the graphical elements with the application data.
Window
A window is used to group multiple views and to specify the navigation between the views. A view can only

displayed by the browser if the view is embedded in a window.


Apart from this, developer should be able to create basic Web Dynpro ABAP application for developing this
exercise.

Creating Web Dynpro


Go to SE80 and select Web Dynpro Comp./Intf. and provide the name(say ZZZ_JAYTEST24) to create.
Then enter the description and choose the type as Web Dynpro Component. Double click the WebDynpro
Interface and add IF_FPM_UI_BUILDING_BLOCK in implemented interfaces tab and then reimplement it.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


3

Web Dynpro ABAP - Floor Plan Manager

Component Controller
Create four nodes as shown below.

Set the cardinality for employee as 1:1 and rest else as 0:n.
Create attribute pernr inside employee node. Similarly from PA0002, select the fields for details nodes as
shown below.

Select fields from PA0001 for ORG_DATA and from PA0006 for ADDRESS as shown.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


4

Web Dynpro ABAP - Floor Plan Manager

View
Now we are going to create four views. One for receiving the user input of employee number. Other for
holding table for Employee details, other for holding organizational data and the last one for address.
In the context tab, map the node Employee to the Main view for user input.

Design the layout as below.

Create another view ORG_DATA and design as below.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


5

Web Dynpro ABAP - Floor Plan Manager

Design its layout as below by creating table and binding its attributes.

Similarly create another view called Details. Map the node details in its context.

Design its layout as below by creating table.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


6

Web Dynpro ABAP - Floor Plan Manager

Create the last view Address. Map the node as below in context and design the layout by creating table for
the mapped node and do the binding.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


7

Web Dynpro ABAP - Floor Plan Manager

Window
Create four windows as below one for each view.

User Input is the window for main.

Code
We are going to code in Component Controller method Process Event.

Use Web Dynpro code wizard

to generate code automatically.

Step a:
Choose the radio button Read context for the node EMPLOYEE.

Step b:
Read node details.

Step c:
Read node Org_data.

Step d:
Read node Address.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


8

Web Dynpro ABAP - Floor Plan Manager

Keep the required generated code and delete the rest which is not required.
Add the logic for selecting data from database tables.

You can use appropriate types statement to fetch the required only from each table.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


9

Web Dynpro ABAP - Floor Plan Manager

Creating Web Dynpro Application


Create Web Dynpro Application by right clicking the Webdynpro (ZZZ_JAYTEST24).
Right click the Web Dynpro component and activate.
Mention the component, Interface view and Plug name as below. You can see the application under the
package and not under Web Dynpro Interfaces as usual after saving.

Create Configuration
Go to SE80 and give the package name and then choose the Web Dynpro application created. Then right
click to create configuration.

Give the configuration name as below and click create.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


10

Web Dynpro ABAP - Floor Plan Manager

After entering the configuration name as circled for each OIF and IDR component, enter configuration name
for OIF component and then click Go to Component Configuration button.

In this, press INITIAL_SCREEN and then enter as below in INITIAL_SCREEN_UIBB. Here USER_INPUT is
the name of the window.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


11

Web Dynpro ABAP - Floor Plan Manager

Similarly open variant and enter the ID as MAIN(first view).

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


12

Web Dynpro ABAP - Floor Plan Manager

Then open MAINVIEW inside that and enter details as below. Here USER_INPUT is the name of the
Window.

We now need 3 other windows inside this window. So create three subviews as below.

Then click Save button.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


13

Web Dynpro ABAP - Floor Plan Manager

Output
Go to SE80 once again by ending the existing session, and from package (or if it is local objects), choose the
Web Dynpro application and then click test.

Press Start button and then go to the page.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


14

Web Dynpro ABAP - Floor Plan Manager

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


15

Web Dynpro ABAP - Floor Plan Manager

Related Content
Floorplan Manager for Web Dynpro ABAP
Floorplan Manager (FPM) Web Dynpro ABAP
For more information, visit the Web Dynpro ABAP homepage.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


16

Web Dynpro ABAP - Floor Plan Manager

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.

SAP COMMUNITY NETWORK


2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com


17

You might also like