sappress netweaver visual composer
TRANSCRIPT
-
8/8/2019 Sappress NetWeaver Visual Composer
1/54
Bonn Boston
Carsten Bnnen, Mario Herger
SAP NetWeaver Visual Composer
-
8/8/2019 Sappress NetWeaver Visual Composer
2/54
Contents at a Glance
Foreword ................................................................. 13
1 Introduction ............................................................ 17
2 SAP NetWeaver Visual Composer .......................... 25
3 Model-Driven Development ................................... 55
4 Architecture and Concepts ..................................... 67
5 Visual Composer Basics .......................................... 91
6 Building Applications ............................................. 179
7 Analytical Applications ........................................... 279
8 Application Lifecycle ............................................... 399
9 Business Examples ................................................. 427
10 Visual Composer and Enterprise SOA .................... 435
A Modeling and Tips .................................................. 441
B Coding for Integration Examples ............................ 463
C The Authors ............................................................ 513
Index ....................................................................... 515
-
8/8/2019 Sappress NetWeaver Visual Composer
3/54
7
Contents
Foreword ................................................................................... 13
1 Introduction ............................................................ 17
2 SAP NetWeaver Visual Composer ........................... 25
2.1 SAP NetWeaver ......................................................... 26
2.2 Building Applications for SAP NetWeaver .................. 29
2.3 A Model-Driven Tool ................................................. 31
2.3.1 From Business Analyst to Business
Process Expert ............................................... 322.3.2 Freestyle Models ........................................... 34
2.3.3 SAPs UI Strategy .......................................... 38
2.3.4 Benefits of SAP NetWeaver Visual
Composer ..................................................... 40
2.4 Visual Composer Today ............................................. 42
2.4.1 SAP Visual Composer for NetWeaver
2004s ........................................................... 42
2.4.2 SAP Visual Composer 6.0 .............................. 49
3 Model-Driven Development ................................... 55
3.1 Basics ........................................................................ 56
3.2 Model-to-Code Approach .......................................... 58
3.3 Model-Driven Development Within SAP ................... 59
3.3.1 SAP NetWeaver Business Intelligence ............ 60
3.3.2 Web Dynpro ................................................. 60
3.3.3 SAP Composite Application Framework ........ 61
3.3.4 Comparison Matrix ....................................... 61
3.4 Visual Composer as Visual Modeling Tool .................. 62
3.5 Parting Thoughts ....................................................... 64
4 Architecture and Concepts ...................................... 67
4.1 Architecture of SAP Visual Composer for
NetWeaver 2004s ...................................................... 68
4.1.1 Visual Composer Storyboard ......................... 69
4.1.2 Visual Composer Server ................................. 75
4.1.3 SAP NetWeaver Portal .................................. 80
-
8/8/2019 Sappress NetWeaver Visual Composer
4/54
Contents
8
4.1.4 Web Browser ............................................... 84
4.1.5 Summary ...................................................... 84
4.2 Visual Composer within the SAP NetWeaver
Development Infrastructure ...................................... 86
4.3 How to Choose the Right Modeling Tool .................. 874.3.1 SAP Composite Application Framework ........ 88
4.3.2 Guided Procedures ....................................... 89
4.3.3 Business Process Modeling ........................... 89
4.3.4 SAP Business Explorer Suite .......................... 90
5 Visual Composer Basics .......................................... 91
5.1 Visual Composer Storyboard ..................................... 93
5.1.1 Main Menu .................................................. 945.1.2 Main Toolbar ............................................... 116
5.1.3 Task Panel and Task Panel Toolbar ............... 117
5.1.4 Board Toolbox .............................................. 122
5.1.5 Navigation Bar ............................................. 123
5.1.6 Console ........................................................ 124
5.2 Composing a Model .................................................. 125
5.2.1 Components ................................................. 126
5.2.2 Connectors ................................................... 132
5.2.3 Operators ..................................................... 1365.2.4 Additional Operators .................................... 139
5.3 UI Controls ............................................................... 142
5.3.1 Bulleted List ................................................. 143
5.3.2 Calendar ....................................................... 144
5.3.3 Checkbox ..................................................... 145
5.3.4 Clock ............................................................ 146
5.3.5 Combo Box .................................................. 147
5.3.6 Date Picker .................................................. 148
5.3.7 Drop-Down List ........................................... 1495.3.8 Expression Box ............................................. 150
5.3.9 Gauge .......................................................... 151
5.3.10 HSlider ......................................................... 152
5.3.11 HTML Text ................................................... 153
5.3.12 Image ........................................................... 154
5.3.13 Input Field ................................................... 155
5.3.14 List Box ........................................................ 156
5.3.15 Numbered List ............................................. 157
5.3.16 Plain Text ..................................................... 1575.3.17 Progress Bar ................................................. 158
-
8/8/2019 Sappress NetWeaver Visual Composer
5/54
Contents
9
5.3.18 Pushbutton ................................................... 159
5.3.19 Radio Group ................................................. 160
5.3.20 Spinner ......................................................... 161
5.3.21 Text Editor .................................................... 162
5.3.22 Ticker ............................................................ 1635.3.23 Toggle Button ............................................... 164
5.3.24 VSlider .......................................................... 165
5.4 Expression Editor ....................................................... 166
6 Building Applications .............................................. 179
6.1 Getting StartedThe Basic Model ............................. 179
6.2 Transactional ApplicationsAccessing ERP from
Visual Composer ........................................................ 1816.2.1 The First Application ..................................... 182
6.2.2 Adding More Complex Data Services ............ 192
6.2.3 Adding Toolbars, Popups, and Charts ............ 205
6.2.4 Adding Layers ............................................... 215
6.2.5 Working with Data Stores and Visibility
Conditions .................................................... 221
6.2.6 Adding a Wizard ........................................... 227
6.2.7 Eventing in Visual Composer ......................... 251
6.3 Accessing Web Services ............................................. 259
7 Analytical Applications ........................................... 279
7.1 BI Kit Connections ..................................................... 279
7.1.1 SAP NetWeaver BI ........................................ 281
7.1.2 SAP Query .................................................... 282
7.1.3 JDBC ............................................................. 283
7.1.4 XMLA ........................................................... 285
7.1.5 ODBO ........................................................... 286
7.2 BI Kit Tools ................................................................ 2877.2.1 First BI Example ............................................ 287
7.2.2 BI Integration Wizard .................................... 292
7.2.3 SAP BI Queries .............................................. 295
7.2.4 JDBC ............................................................. 312
7.2.5 SAP Query .................................................... 319
7.2.6 XMLA ........................................................... 319
7.2.7 ODBO ........................................................... 338
7.2.8 SQL Editor .................................................... 338
7.2.9 MDX Editor .................................................. 343
-
8/8/2019 Sappress NetWeaver Visual Composer
6/54
Contents
10
7.2.10 Exceptions .................................................... 346
7.2.11 Alerts ........................................................... 347
7.2.12 Hierarchies ................................................... 357
7.2.13 Sorting ......................................................... 370
7.2.14 Filtering ....................................................... 3717.2.15 Dynamic Columns ........................................ 372
7.2.16 Pivot and ALV .............................................. 377
7.3 Integration ................................................................ 378
7.3.1 BI Elements .................................................. 378
7.3.2 BI Workbooks .............................................. 389
7.3.3 BI Documents Store ..................................... 389
7.3.4 Planning Functionality .................................. 392
7.3.5 Exporting Data to Different Targets .............. 392
8 Application Lifecycle ............................................... 399
8.1 Visual Composer System Landscape .......................... 399
8.1.1 Transporting Models .................................... 399
8.1.2 Transporting Applications ............................. 400
8.1.3 Down Porting Applications ........................... 403
8.1.4 Upgrading Models and Applications ............. 407
8.1.5 Versioning .................................................... 407
8.1.6 Personalization ............................................. 4088.1.7 Localization .................................................. 409
8.1.8 Testing and Monitoring ................................ 419
8.1.9 Documentation and Help ............................. 423
8.2 Backend and Portal Systems ...................................... 423
8.2.1 Portal ........................................................... 423
8.2.2 SAP NetWeaver BI ....................................... 423
8.2.3 Other Data Sources ...................................... 425
9 Business Examples .................................................. 4279.1 Best Practice Scorecarding ........................................ 427
9.2 Account Analytics ..................................................... 429
9.3 Treasury and Financial Investment Controlling .......... 430
9.4 Summary .................................................................. 433
10 Visual Composer and Enterprise SOA ..................... 435
-
8/8/2019 Sappress NetWeaver Visual Composer
7/54
Contents
11
Appendix........................................................................ 439
A Modeling and Tips ............................................................... 441
A.1 General Portal Issues ................................................. 441
A.2 Enable the Visual Composer Log ................................ 443A.3 Unlocking a Visual Composer Model ......................... 443
A.4 Percentage Sign ......................................................... 444
A.5 Chart Design .............................................................. 445
A.6 Changing Colors for Visual Composer
Applications .............................................................. 445
A.7 Searching for Visual Composer iViews in
the Portal .................................................................. 446
A.8 Performance Issues with BI JDBC Connector .............. 447
A.9 No Metadata from the BI JDBC Connector ................. 448A.10 No Metadata from the BI XMLA Connector ............... 448
A.11 Cannot See the InfoCube Under BI XMLA .................. 448
A.12 Performance Issues and Limitations with the
BI XMLA/ODBO Connector ....................................... 449
A.13 INVALID_VARIABLE_VALUES# .................................. 450
A.14 Wrong Language ....................................................... 451
A.15 Language Mapping .................................................... 452
A.16 Strange Names for Query Elements ............................ 452
A.17 Web Service Enablement ........................................... 452A.18 Authority Check Error ............................................. 454
A.19 Virtual Interface not found Error ............................. 455
A.20 Serialization Error ................................................... 456
A.21 Drop-Down List and Combo Box ............................... 458
A.22 Visual Composer and SAP BW/
SAP NetWeaver BI Sizing ........................................... 458
A.23 Formats of Date, Time, Units ..................................... 458
A.24 Problems with Mandatory Variables in BI XMLA ........ 459
A.25 SAP Query Result Fields and Select Fields .................. 459A.26 Writing Data Back ..................................................... 460
A.27 Jump to Detailed Analysis (from Alert or Any
Other Link) ................................................................ 460
A.28 Using a Dynamic RFC ................................................. 461
A.29 Sorting on BI Data with More Than 500 Records ....... 461
A.30 Calling Analysis Process Designer or Process Chain .... 462
-
8/8/2019 Sappress NetWeaver Visual Composer
8/54
Contents
12
B Coding for Integration Examples .......................................... 463
B.1 BEx Integration ......................................................... 463
B.2 Document Integration ............................................... 472
B.3 Additional Code for Meta and Transactional
Data Document Association ...................................... 506B.4 Dynamic RFC ............................................................ 510
C The Authors ........................................................................ 513
Index ......................................................................................... 515
-
8/8/2019 Sappress NetWeaver Visual Composer
9/54
13
Foreword
Foreword
SAP NetWeaver is a product that provides the tools to follow a new
architecture concept called Enterprise Services-Oriented Architec-ture (Enterprise SOA). One of these new and exciting development
tools to create applications calling enterprise services is the Visual
Composer. Before we look into its details described in this book by
Carsten Bnnen and Mario Herger, let us get some common ground
first: Why is it necessary to become familiar with an Enterprise SOA?
What role does SAP NetWeaver play in it? Whats the benefit of it
all?
Most companies do not want to continue spending large portions oftheir IT budget on maintaining the status quo. That is investing in
maintaining the current infrastructure or building quick fixes that
result in even more costs for the future. Theyd rather free money
and time to build applications from their users wish list long since
neglected or build new applications. Regardless of the applications
that have to be built, they all follow this pattern. IT is not aligned
with the business and thus not set up for rapid change, which is one
of the main drivers in competitive business situations. Adhering to
an Enterprise SOA will give customers the flexibility to adapt to new
market requirements and keep up with the speed of change. The
Enterprise SOAs main aim is to realize a business-driven approach
to an architecture of loosely coupled enterprise services for adaptive
business solutions. The enterprise services are Web services with
business logic and they are created and maintained with tools pro-
vided by SAP NetWeaver. Once you are able to leverage enterprise
services by utilizing the many development, administration and
maintenance tools provided by SAP NetWeaver, you have success-fully established an open, rapidly changeable but yet stable IT archi-
tecture. How so? Your applications utilizing services are re-usable,
can easily be deployed, can be used in various UIs, are quick to
implement, involve little training effort, and grant you with lean and
transparent business processes that can be adapted quickly.
SAP NetWeaver is not only providing the tools to realize an Enter-
prise SOA. SAP NetWeaver is also on its path to become a full-blown
Business Process Platform (BPP), with core business objects and
ready-to-run business processes leveraging enterprise services. SAP
-
8/8/2019 Sappress NetWeaver Visual Composer
10/54
14
Foreword
is already well underway in providing the technology through its
SAP NetWeaver release and has already service-enabled SAP applica-
tions. For your convenience you can find an Enterprise Service Dis-
covery System on the SAP Developer Network (SDN), that describes
hundreds of services that are available right now. So you can startany minute to implement an Enterprise SOA that will help you gain
business advantages and help your IT and business stay flexible.
Of course you will also be able to develop your own custom services
and applications. If you put the right tools into the hands of the right
users, you can increase flexibility, develop faster, and free time and
money for new custom development projects.
How does the Visual Composer help you? What does it allow you to
do and who should use it? The Visual Composer allows you to
quickly and easily build applications and prototypes using a visual
interface rather than manually writing code. Instead of having to
concentrate on technical and programming know-how, you use
graphical building blocks and put these together to a flow diagram.
The Visual Composer will promote a new type of application devel-
opers, namely business analysts and business process experts. They
will be able to apply their inherent understanding of business pro-
cesses and their companies requirements to model Visual Composerapplications without having any development expertise or better still
without having to have it. The Visual Composer lets them tailor their
models to their end-users needs, e.g., the same Visual Composer
application can be deployed to run in more than one UI, for example
the SAP NetWeaver Portal, a Web Dynpro application or a mobile
application. The UI building blocks are interlinked with enterprise
services to service-enable your applications.
What reduction of development time can be expected? Since theVisual Composers development environment is so intuitive, you can
expect a huge decrease of development time. For example, SAP has
used the Visual Composer to model about 200 xApps for BI Analytics
in six weeks, one of which received the Macromedia MAX price for
analytical applications last year. Some of our customers have used
the Visual Composer for fast prototyping for projects running no
longer than a few weeks, sometimes days. So not only will your
development time and costs get significantly reduced, but you will
also be able to easily customize and adapt a Visual Composer model
-
8/8/2019 Sappress NetWeaver Visual Composer
11/54
15
Foreword
to changing business needs. You will gain speed, flexibility and you
will have freed time to get to the backlog of internal development
requests that you can now model rapidly, deploy, and adapt quickly
using the Visual Composer.
To sum it up, SAP recommends an Enterprise SOA to stay flexible,
reduce costs and align IT with the business. The tools to maintain
and change your IT and applications are provided by SAP
NetWeaver, which will move ahead to become a Business Process
Platform to offer an extensive and rich set of enterprise services. One
of these tools to model applications leveraging enterprise services,
the Visual Composer, is described in detail in this book.
Enjoy this exciting book and have fun leveraging the Visual Com-
poser. When youve finished your new modeling projects, wed love
to hear from you.
Klaus Kreplin, Walldorf 2006
Executive Vice President and Corporate Officer of SAP Group
SAP NetWeaver
-
8/8/2019 Sappress NetWeaver Visual Composer
12/54
179
One of the longest chapters in this book is still ahead of you,
but it is also the most practical one. What would all the
prior talk be without hands-on examples and real life ques-tions? Well, this is the chapter to put all that talk to the test.
6 Building Applications
When building an application with SAP NetWeaver Visual Composer
from scratch, there are some initial steps that you must take:
Visual ComposerFirst StepCreating a Model
1. First, you must create the model. One way to do this is by opening
theModel menu and choosing New Model from the list. An empty
model is created.
2. Before you continue, it might make sense to configure the work
environment according to your needs (see Section 5.1.1 on the
Options dialog from the Tools menu for details).
3. After everything is set up, you can begin to build your applica-tion.
6.1 Getting StartedThe Basic Model
Visual Composer101A BasicModel
In Chapter 5, we said that Visual Composer is used to build applica-
tions for SAP NetWeaver Portal. Figure 6.1 shows the elements that
represent known entities from the portal world. All entities can be
opened by double-clicking on them in the Storyboard of the VisualComposer. Starting with the basic element on the right, an iView
defines the smallest entity of content in SAP NetWeaver Portal. The
iView element is the basic element for all Visual Composer elements,
and without it, you cannot model an application. The application
logic and flow is defined in one or several iView elements.
-
8/8/2019 Sappress NetWeaver Visual Composer
13/54
180
Building Applications6
Figure 6.1 The Main Elements
From a Visual Composer perspective, aportal page is nothing more
than a container for iViews. Figure 6.2 shows the same elements as
Figure 6.1 but this time the iView is part of thePage element. Note
that you can define applications that consist only of iViews in Visual
Composer and set up the pages later as an administrator in SAP
NetWeaver Portal.
Figure 6.2 ... with an iView in the Page Element
By definition,Business packagesprovideout-of the-box portal applica-tions that can be easily modified to suit a customers needs. Because
Visual Composer is used to build business applications, it therefore
makes sense that one of the many elements that it offers represents a
business package: Package. Figure 6.3 shows this element with the
portal content (the page and the iView that we saw in Figure 6.1 and
Figure 6.2 before) in it.
Figure 6.3 ... and with the Same Page in the Package
From Packageto iView
Figure 6.4 outlines all the steps of building an application with Visual
Composer: First, you Create a Model, and then you Create a Package
within the model by dragging the Package element from the task
panel into the model. To open the package, double-click on it. Then
-
8/8/2019 Sappress NetWeaver Visual Composer
14/54
181
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
you Create a Page by dragging a Page element from the task panel
into the package and open it with a double-click. Next, you Create an
iView by dragging the iView element from the task panel onto the
page. By double-clicking on the iView element, you open the iView
and can start modeling your application.
Figure 6.4 Steps in Building a Flexible Application with Visual Composer
All other steps (from Connect to Backend to Deploy Package) are
explained in the examples later on in this chapter. Note that all
examples start from within an opened iView unless mentioned oth-
erwise.
6.2 Transactional ApplicationsAccessing ERP
from Visual Composer
In the following examples, you will build applications that connect
to SAP Enterprise Resource Planning (ERP) systems. To do so, you
will access Business Application Programming Interfaces (BAPIs) that
provide the functionality necessary to implement your application.
Connect to Backend
Create an iView
Create a Package
Create a Page
Create a Model
Design the iView Logic Create the Layout
Access Data Service
Check Model for Errors Deploy Package
Flexible Application
-
8/8/2019 Sappress NetWeaver Visual Composer
15/54
182
Building Applications6
SAP SystemAdapter
To access ERP systems, Visual Composer uses theSAP System adapter
for SAP NetWeaver Portal. The SAP System adapter is an implemen-
tation of a connector framework based on the J2EE Java Connectiv-
ity Architecture (JCA) 1.0, the SAP Remote Function Call (RFC)
library, and the SAP Java Connector (JCo). Using the SAP Systemadapter, you can access SAP ERP systems, Customer Relationship
Management systems (like mySAP CRM), and Business Intelligence
solutions (like SAP NetWeaver BI).
6.2.1 The First Application
Keep it SimpleOur First
Application
Imagine the following situation. Youre a member of a project team.
You have a basic understanding of IT and an even better understand-
ing of the processes in your company, but you dont have any pro-gramming skills. Therefore, you are close to having the skill set of the
business process expert.
In this particular scenario, your project lead comes in and tells you to
build a relatively simple application. The application is supposed to
display the address of a customer after typing in the customer num-
ber. Furthermore, since this application is intended to be used in a
SAP NetWeaver environment, it should be displayed using the SAP
NetWeaver Portal.
Sounds easy, doesnt it? Remember in this setup that you dont know
how to develop applications, that is, no Java, no ABAP, no nothing
And now you are supposed to build an application that runs in SAP
NetWeaver Portal and also accesses data from a backend system.
Make it FastBuilding anApplication
Quickly
To add an interesting twist to this situation, because the application
is considered to be so simple, the request is for it to be available by
noon and it is now 9 am. If you have a good developer who is readily
available, you should be able to meet this goal; however, as luckwould have it, there is no developer on hand and the application still
has to be implemented by noon.
Lets see how Visual Composer can help you to build this straightfor-
ward application. In the next example, well show you how to build
this application without requiring development skills and without
needing three hours to implement it.
-
8/8/2019 Sappress NetWeaver Visual Composer
16/54
183
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
Accessing Data Services
1. After creating a basic model as explained in Section 6.1, you can
begin building your application. Open the iView from the basic
model and fill the iView with application elements and logic.2. After choosing Find Data from the task panel toolbar, you will see
an input form in the task panel. Using the input form, you can
now decide on which system you want to access. For the follow-
ing example, you will choose an ERP system. Figure 6.5 shows an
already conducted search on an ERP system named XK3.
Figure 6.5 Task Panel ToolbarFind Data
-
8/8/2019 Sappress NetWeaver Visual Composer
17/54
184
Building Applications6
3. As you can see in Figure 6.5, using the Look for field, you can nowdetermine how you want to search for a data service. Visual Com-
poser differentiates from among the various system types (such as
ERP, BI, JDBC systems) that it can access. Depending on the type of
system that you select, different entries will appear. For example,
for ERP systems, you can either Look for a service by name, Look
for a service by group, or Browse the service catalog. In this exam-
ple, you want to Look for a service by name.
Searching fora Data Service inVisual Composer
4. You can now type in the search criteria in the Service field.Because youre looking for details on a customer, you first try the
following: *CUSTOMER*. Then, if you expect the data service that
youre looking for to be a BAPI, you search for BAPI_CUSTOMER*
as well. However, while the second approach reduces the list sig-
nificantly, the first approach shows all available data services with
CUSTOMER in its name. Besides BAPIs, it is very likely that RFCs
will be in the system as well. If you use the second approach (i.e.,
search for BAPI_CUSTOMER*), they will be listed as well.
5. From the list of results, you can now choose the data service thatyou want to use for your application. In this example, that data ser-
vice is BAPI_CUSTOMER_GETDETAIL. To import the metadata
describing this data service into your iView, you can either double-
click on the data service or position it directly in your iView by
using drag-and-drop.
6. Before the representation of the data service will be visible in your
model, Visual Composer will ask you which ports and fields you want
Attention
The list of systems in the System drop-down list may vary, depending on
the user. As mentioned before, Visual Composer uses the system land-
scape of SAP NetWeaver Portal. It connects to the portal with the same
user you used to log on to Visual Composer.
The roles and thepermissions of the user define which systems you will see
in the drop-down list. In addition, the logonticket or the usermapping of
this user are used for authentication purposes on the backend systems. If
there is any kind of authorization that is maintained for the user on the
backend, it will be used as well. This way Visual Composer ensures that
the user cannot access systems (authentication) he must not access and
cannot access data services (authorization) he must not use.
-
8/8/2019 Sappress NetWeaver Visual Composer
18/54
185
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
to use (see Figure 6.6). If you select too many fields1 in the Define
Data Service dialog (see right side), youll receive a system warning.
Figure 6.6 Definition of a Data Service
Suggestions toOptimize YourModelVisualComposerWarnings
You can use the following feature to optimize your model. In all
the examples that we have selected for this book, you will be able
to select fields and play around with them, without having to
import the metadata again. You will then see the new BAPI that
you imported above now shown as an element on the Storyboard.
7. To ensure that the data servicein this example, the BAPIthatyou imported really does what you expect it to do, you can check
the functionality of that data service. By right-clicking on the data
servicethe BAPI representation in your modelyou can open a
context menu (see Figure 6.7). When you select Test Data Ser-
vice... from the context menu, the Test Data Service dialog opens
(see Figure 6.8).
Figure 6.7 Data Service Context Menu
1 How many fields are too many is defined in the Options dialog box from the Tools
menu explained in Chapter 5.
-
8/8/2019 Sappress NetWeaver Visual Composer
19/54
186
Building Applications6
Figure 6.8 Test Data Service Dialog
8. For the BAPI_CUSTOMER_GETDETAIL, you can enter test input
for five fields, although only two fields are requiredCustomerno
and Pi Salesorg. Required input fields are marked in red and are
each affixed with an asterisk (*).
An example entry for a customer number is 0000001000 and an
example entry for a sales organization is 1000. With these two val-
ues, you can test the functionality of the data service by clicking
on Execute.
You have now created your first representation of a data service in
Visual Composer. If you glance at the Layout tab, youll notice that
there are no views yet.
Creating Views
Creating YourFirst View
1. On the Design tab, youll see an Input port on the left side of the
data service. By dragging out from this port and releasing the
mouse button, you can open a context menu (see Figure 6.9).
ChoosingAdd Input Form from the list will create an input form.
2. You just created your first viewan input form. Easy, wasnt it?
Switching back to the Layout tab, youll see an input form with all
the fields that you might need when using BAPI_CUSTOMER_
GETDETAIL.
-
8/8/2019 Sappress NetWeaver Visual Composer
20/54
187
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
Figure 6.9 Dragging Out a Context Menu from the Input Port
If a BAPI has too many input fields, Visual Composer will require
you to select from the list of input fields, but you can always select
all fields using Select all.3. Creating an output view is as simple as creating an input form. By
dragging out from Pe Addressan output port of BAPI_
CUSTOMER_GETDAILand releasing the button, you can open
another context menu. You can then chooseAdd Form View from
the list. Another dialog box opens (see Figure 6.10).
Figure 6.10 Select Display Fields Dialog
4. Visual Composer realized that there are too many fields and you
can now decide on the fields that you want to use for your Form
View. For this example, choose CITY, COUNTRY, NAME, and STREET.
Submit your selection by clicking OK.
-
8/8/2019 Sappress NetWeaver Visual Composer
21/54
188
Building Applications6
If you switch back to the Layout tab, you now see the new views
the input form and the Form View (see Figure 6.11). But, there are
still some things that you would like to change such as the field
names.
Figure 6.11 Initial Layout of Your First Application
Layout of ViewsYou notice that all fields that can be used together with BAPI_
CUSTOMER_GETDETAIL are visible in the input form. Remember-
ing the test of the BAPI, you know that only two of the fields are
really requiredthe ones marked with red asterisks (*) on the Lay-
out tab. For this sample application, all you need to do is to provide
the input for the required fields.
DeletingSuperfluous Fields
1. Removing the other three fields is easy. By marking the fields and
pressing the Del key, you can remove the fields. You can markmore than one field by first using the Ctrl key and then using the
Del key to remove them.
Another solution would be to right-click on the input form and
choose Configure Element from the context menu. On the lower
part of the task panel, you can now check and uncheck the ele-
ments that should be visible in your input form.
2. On the Layout tab, you can then arrange the forms according to
Figure 6.12. This can be done easily by using drag-and-drop to
-
8/8/2019 Sappress NetWeaver Visual Composer
22/54
189
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
position the forms. In addition, you can grab the borders of the
forms to enlarge or shrink them.
Figure 6.12 Arranging the Layout of the First Application
Renaming Fields3. After arranging the forms and the fields within themusing the
same mechanism as you used for the formsyou can change the
names of the fields as well as the names of the forms. By marking
the element that you want to rename and pressing the F2 key,you can easily rename it.
Alternatively, you can open a context menu by right-clicking on
the field. From this context menu, choose Edit Label to change the
name of the element. You can employ this method for almost
every element available in Visual Composer.
Note
By double-clicking on a control on the Layout tab, you can open the Con-trol Properties dialog. You can also do this by right-clicking on the con-
trol and choosing Properties from the context menu. Using the Control
Properties dialog, you can modify all controls that are available in Visual
Composer. At the same time that you opened the Control Properties dia-
log, the Configure Element was opened in the task panel.
The Control Properties dialog might differ for different UI controls in
Visual Composer. For a detailed description of the UI controls, see Section
5.3.
-
8/8/2019 Sappress NetWeaver Visual Composer
23/54
190
Building Applications6
4. As an example of modifying a control, youyou can determine the
Label position on the Display tab of the Control Properties dialog
(see Figure 6.13). You can experiment with it for the example
above.
Figure 6.13 The Display Tab of the Control Properties Dialog
Deployment
From VisualComposer to
SAP NetweaverPortalDeploying
Your Application
Before you deploy your application, you should ensure that themodel looks similar to the one shown in Figure 6.14.
Figure 6.14 Model of Your First Application
1. To deploy your application to the SAP NetWeaver Portal, you can
now click on Deploy in the task panel toolbar. Deploy to Portal
will appear in the task panel. You will see three buttons: Deploy,
Compile, and Clear.
2. After clicking on Deploy, a Progress Bar will appear to inform you
of the deployment progress. In addition, you will receive messages
with information on the different steps that Visual Composer is
running through such as compiling and deploying.
-
8/8/2019 Sappress NetWeaver Visual Composer
24/54
191
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
3. Figure 6.15 shows the Deploy to Portal dialog in the task panel
after a successful deployment.2View source code and Run Basi-
capplicationiview are links that can be used to access the source
code and run the application in SAP NetWeaver Portal.
Figure 6.15 Deploy to Portal Dialog
Running YourApplication
4. Click on Run Basicapplicationiview to open your application in
SAP NetWeaver Portal. Your application should look similar to
the one shown in Figure 6.16 after test values have been entered
(into the input fields) and submitted.
Figure 6.16 First Application After Deployment in SAP NetWeaver Portal
2 After pressing Compile instead ofDeploy in the previous step, you will only see
View source code.
-
8/8/2019 Sappress NetWeaver Visual Composer
25/54
192
Building Applications6
You have now built your first simple application. Well now have
you tackle more challenging applications in order to give you a better
understanding of how to use Visual Composer to build flexible busi-
ness applications.
6.2.2 Adding More Complex Data Services
Because you built your first application in the requested time, your
project lead is convinced that you can build applications in a very
short time frame.
First, the bad news. He asks you to build an application that shows all
sales orders for the customer from the first example. The orders
should be displayed in a list. After clicking on a list entry, the appli-
cation should then display the details on the sales order. Further-
more, the project lead would truly appreciate it if you could use col-ors to mark different statuses of the sales orders. And of course, the
list should be sorted. Now, for the good news. This time, youll have
an entire day to build the application.
One Input Formfor Two BAPIs
In the next example, you will extend the application that you built in
the first application. You will reuse the information from the created
input form (Enter Customer) as input for another BAPI: BAPI_
SALESORDER_GETLIST. Then, you will modify the output of this
BAPI by sorting it before displaying it in a Table View. Next, you will
add a new column to the Table View, accessing data from another
field and using this data to determine the color of the table cells. You
will also invoke a second BAPI: BAPI_SALESORDER_GETSTATUS.
For the Table View that displays the data from this BAPI, you will
add a new column based on dynamic expressions.
Note
By default, Visual Composer will use Adobe Flash runtime to build an
application. As mentioned before, you can choose another runtime, that
is, Web Dynpro. For more information, see the explanation ofOptions
from the Tools menu in Section 5.1.1.
-
8/8/2019 Sappress NetWeaver Visual Composer
26/54
193
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
Adding a Second BAPI to Your Application
1. In this example, you will start by importing BAPI_SALESORDER_
GETLIST to your first application (see Figure 6.17).
Figure 6.17 Looking for BAPI_SALESORDER_GETLIST
2. By dragging out the Input port of BAPI_SALESORDER_GETLIST itcan be connected to the already existing input form EnterCus-
tomer. You just drag out from the Input port and release the
mouse button after moving it to the out port ofEnter Customer. A
red line will mark the connection that will be created before
releasing the mouse button.
3. By testing BAPI_SALESORDER_GETLIST with your first applica-
tion, you ensure that the BAPI provides the functionality that you
want. At the same time, you notice that the required fields are
Customer Number and Sales Organization. This means that your
input form already has the correct input fields to fetch the data
for the required fields.
Field Mapping
If you remember your first application, youll recall that the fields
required by BAPI_CUSTOMER_GETDETAIL were named differently.
So there is no way yet for BAPI_SALESORDER_GETLIST to know
-
8/8/2019 Sappress NetWeaver Visual Composer
27/54
194
Building Applications6
which data should be used for the two required fields. Fortunately,
this issue is easy to resolve.
1. The connection that you created in the first step is of type data-
mapping. You will open Configure Element for this connection inthe task panel. On the lower part of the task panel, you can assign
values to the input fields. In this example, the value @CUSTOMERNO is
assigned to the input field CUSTOMER_NUMBER and @PI_SALESORG is
assigned to SALES_ORGANIZATION. The data service is now imported
correctly into the model.
2. According to the settings forAutomatically create data mapping
when source and target from the Composingtab ofOptions from
the Tools menu (see Section 5.1.1), Visual Composer will try to do
an automatic data mapping. Depending on this setting and thedata, it might be necessary to do the data mapping manually.
3. After correctly importing the data service BAPI_SALESORDER_
GETLIST into your model, you can now drag out from Sales
Orders port. When you release the button, a context menu will
open, from which you can again choose Add Table View. Visual
Composer realizes that there are too many fields and asks you to
select the ones that you want to use in the Table View. You
choose DOC_DATE, DOC_STATUS, MATERIAL, NAME, and SD_DOC fromthe list of available fields.
You have now created your first Table View. The model should look
similar to the one in Figure 6.18.
Figure 6.18 Extended Application with a Table View
Switching back to the Layout tab, you can now modify the TableView according to how it looks in Figure 6.19, using the same meth-
-
8/8/2019 Sappress NetWeaver Visual Composer
28/54
195
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
ods for resizing and renaming elements as you did in the first appli-
cation. The only difference here is that instead of marking input
fields, you will now mark table columns.
Figure 6.19 New Layout of Your Application with a Table View
Sorting
When we introduced this example, we promised to sort the output
of BAPI_SALESORDER_GETLIST. A look at Figure 6.20 reveals that
after entering test values and submitting them, the resulting table in
your application is not yet sorted. To sort the list of sales orders, you
have to switch back to the Design tab.
1. On the Design tab, click on Compose from the task panel toolbar.This will open the Compose Model in the task panel.
2. You will see four groups: Components, Connectors, Operators,
andAdditional Operators. To sort data, you can use Sort from the
Operators group. In a first step, drag this operator into your
model.
3. In the next step, you must remove the connection betweenBAPI_
SALESORDER_GETLIST and the Sales Orders Table View.
-
8/8/2019 Sappress NetWeaver Visual Composer
29/54
196
Building Applications6
Figure 6.20 Application with an Unsorted List of Sales Orders
4. Drag the Sort operator (Sort1) to a convenient position in your
model and connect its Input port to the Sales Orders port of
BAPI_SALESORDER_GETLIST. To complete the connection, you
then connect the out port of the operator to the in port of the
Sales Orders Table View. Your model should resemble the oneshown in Figure 6.21.
Figure 6.21 Sample Application with Sort Operator
5. Because the Sort operator doesnt know according to which crite-
ria you want to sort the data, you must configure it. To configure
the data, first, double-click on the operator. The Configure Ele-
ment dialog will be opened in the task panel. In this example, you
-
8/8/2019 Sappress NetWeaver Visual Composer
30/54
197
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
want to sort the data (Sort by) byDOC_STATUS and the Direction is
down. By setting the direction to down, you will sort the list in a
way whereby the open documents are shown first. Because DOC_
STATUS is of type Text, you have to sort the list in reverse alphabet-
ical order (down) instead of straight alphabetical order (up). There-fore, documents with status Open will show up first on the list.
6. You might have to reconfigure the Sales Orders Table View.
Before deploying, you have to check the Layout tab. If everything
looks okay, you can deploy your application to your first applica-
tion.
After running the application in SAP NetWeaver Portal, it should
look like the one shown in Figure 6.22. The list of sales orders is now
sorted.
Figure 6.22 Application with a Sorted List of Sales Orders
According to the project plan, there is still something missing. Your
project lead would like to have the sales orders marked with differ-
ent colors to indicate their status. This would make it easier for an
end user to identify the relevant rows in the list. More specifically,
you want open sales orders to be marked with a red flag, sales orders
that are not yet delivered to be marked with a yellow flag, and com-
pleted sales orders to be marked with a green flag.
-
8/8/2019 Sappress NetWeaver Visual Composer
31/54
198
Building Applications6
Customizing
If you open the Layout tab, you see that there is one column that
provides the data on the status of the sales order: Document Status.
From this column, you can derive the necessary information on the
statuses of the different sales orders. Now all you have to do is use
this information to mark orders with the right colors.
Creating aCustom Field
1. First, you have to configure the Sales Orders Table View. You can
open Configure Element by clicking on Configure in the task panel
toolbar, or by using the Sales Orders context menu.
2. Next, click on the Plus symbol on the lower part of the task panel,
which will open the New UI Control dialog that displays a list of
available UI controls.
3. Choose Expression Box from the list. The data type is by default
Text, which is fine for this example, but the Field name should be
changed. Because you eventually want to replace the existing field
Document Status, it makes sense to name the field document_sta-
tus. Note that there are no blanks allowed in a field name.
4. After clicking on OK, youll see an additional column in the Table
ViewSales Orders. Rename the column to Document Status. Your
layout should now resemble the layout in Figure 6.23. Double-
click on the newly created column.
Figure 6.23 New Column for the Sales Orders Table View
-
8/8/2019 Sappress NetWeaver Visual Composer
32/54
199
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
Expression Editor5. The Control Properties dialog box opens. Your first goal is to display
the data from the existing field Document Status in your newly cre-
ated field. Click on Formula on the General tab of the dialog box.
6. Another dialog box opens (see Figure 6.24). Computed Value is
the dialog box in which you can use the Expression Editor.3 On
the right side of the dialog box is a structure that you can browse
as you would browse in a file explorer.
Figure 6.24 Expression Editor
7. From the structure, you choose Data Fields and expand the node.
Youll see a list of fields. Every field has an icon to identify its data
type. From the list, you selectDOC_STATUS by double-clicking on it.
You now see @DOC_STATUS in the formula area on the left side of
the dialog box.
8. When you click on the Check button in the Computed Values dia-
log, Visual Composer informs you that the entered formula is
valid. After closing the dialog box, youll see that@DOC_STATUS is
now the value of the Expression field on the General tab in the
Control Properties dialog (see Figure 6.25).
As an optional step, you could deploy the application to ensure that
the two columns always contain the same value. So far, there is no
coloring involved, but that will change right now.
Adding StyleVisual ComposerStyles
1. If you switch from the General tab of the Control Properties dialog
box to the Styles tab, you can now define different styles, includ-
ing different colors. In addition, you can assign a Condition (i.e.,
boolean expressions that decide whether a style should be applied)
to every style that defines when a specific style should be used.
3 For details on the Expression Editor, see Section 5.4.
-
8/8/2019 Sappress NetWeaver Visual Composer
33/54
200
Building Applications6
Figure 6.25 Expression BoxGeneral Tab
2. By clicking on the Plus symbol (see Figure 6.26), you can create a
new entry in the list ofStyle-Condition pairs. You can use boolean
operators within the conditions. The Styles tab should look like
the one in Figure 6.26. Table 6.1 lists the Style-Condition pairs
accordingly.
Note that you can define the colors using hexadeximal notation (as
you would do in HTML), or by choosing from a palette that can be
opened by clicking on the icon next to the fields Foreground and
Background.
Figure 6.26 Expression BoxStyles Tab
-
8/8/2019 Sappress NetWeaver Visual Composer
34/54
201
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
You can now deploy your application. It should look like the one in
Figure 6.27. The only thing left for you to do now is to remove the
original Document Status column from the table. Note that in your
model you will have to uncheck the old column from the configura-tion dialog of the table in order to remove it.
Figure 6.27 Application After Adding Expression Box with Styles
Style Condition
#FF0000 (Background color red) @DOC_STATUS=='Open'
#FFFF00 (Background color yellow) @DOC_STATUS=='Not delivered'
#00FF00 (Background color green) @DOC_STATUS=='Completed'
Table 6.1 Style-Condition Combinations for Your Expression Box
Attention
On the Styles tab, not only can you define the background color (Back-
ground), but the text font (Textfont) and style (Textstyle), the foreground
color (Foreground), and the alignment of the text (Align).
In the example, the conditions exclude each other so the order of the con-
ditions is not important. In general, however, the order of the conditions
is important. When you use a set of conditions whereby more than one
condition might apply, the style that is connected to the first condition is
applied.
-
8/8/2019 Sappress NetWeaver Visual Composer
35/54
202
Building Applications6
ConnectingTwo BAPIs
After having created a sorted list of all sales orders for your cus-
tomer, you will now make additional information available on the
status of the sales orders.
1. To make this information available, you will have to invokeanother BAPI: BAPI_SALESORDER_GETSTATUS. This BAPI will
provide you with detailed information on the sales orders.
2. To use BAPI_SALESORDER_GETSTATUS, you must connect it to
the out port of the Sales Orders Table View. Then, double-click on
the connection and Configure Element will open in the task panel.
On the lower part of the task panel, you have to assign @SD_DOC to
the input field SALESDOCUMENT.
3. You can now drag out from the Statusinfo port and release the
mouse button. SelectAdd Table View to create an additional Table
View. In the Layout tab, modify your layout and then deploy the
application. Figure 6.28 shows what the application looks like
after deployment.
DynamicExpressions
For the output of BAPI_SALESORDER_GETSTATUS, you want to
mark the sales orders according to their size. Sales orders with a
value smaller than 100,000 (or 128,000 USD) should be marked in
red with Small in the Order Size column. All other sales orders
should be marked in green and have the value of the order.
1. If you recall in the first example on creating custom fields, you first
switched to the Layout tab. The field NET_VALUE would provide us
with the information that we were looking for; however, in this
example, you will compute the value of the order instead of read-
ing it from a field. To do so, open ConfigureElement for Sales
Order Status.
2. By clicking on the Plus symbol on the lower part of the task panel
you open the New UI Control dialog. As in the last example, youchoose Expression Box from the list UI controls. Use the Text data
type again. Change the Field name to order_size.
3. After clicking on OK youll see an additional column in the Sales
Order Status Table View. You can now rename the column to
Order Size. When you double-click on the column, the Control
Properties dialog opens.
-
8/8/2019 Sappress NetWeaver Visual Composer
36/54
203
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
Figure 6.28 Application Showing Status Information from BAPI_SALESORDER_GETSTATUS
Calculating inVisual Composer
Your first objective here is to compute and display the net value of
the order. You also want the value to be replaced by the text Small
whenever the order size is smaller than 100,000.
1. On the General tab of the dialog box, click on the Formula button.
The Expression Editor opens. By clicking on the node Conditional
Functions, you can expand this node.
2. A list of conditional functions is displayed. From the list, choose
the IF function. In the text field on the right-hand side, modify the
IF function using the following formula:
IF(@REQ_QTY*@NET_PRICE>100000,@REQ_QTY*@NET_PRICE,'Small')
The formula checks whether the net price multiplied with the
quantity is higher than 100,000 (IF(@REQ_QTY*@NET_PRICE>
100000)). If this condition is true, the first expression is used
(@REQ_QTY*@NET_PRICE
); if the condition is false, the secondexpression ('Small') is used.
-
8/8/2019 Sappress NetWeaver Visual Composer
37/54
204
Building Applications6
3. Click on Check to determine whether the formula is valid (i.e.,
Visual Composer will notify you). If the formula is valid, you can
close the dialog. The formula is now the value of the Expression
field.
4. To bring some more color to your application, open the Styles tab
and define two Style-Condition pairs in accordance with your
objective of marking small orders in red and all orders with a
value higher than 100,000 in green (see Table 6.2).
Thats it! After deploying your application, it should look like the one
shown in Figure 6.29.
Figure 6.29 Application After Adding Another Custom Column to Sales Order Status
Style Condition
#FF0000 (Background color red) @REQ_QTY*@NET_PRICE>100000
#00FF00 (Background color green) @REQ_QTY*@NET_PRICE
-
8/8/2019 Sappress NetWeaver Visual Composer
38/54
205
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
6.2.3 Adding Toolbars, Popups, and Charts
Free ExercisesImproving theApplication
Well now your project lead is convinced that you are some kind of
magician when it comes to building applications quickly. He likes the
application, but detects that there is still something missing:
First, not every user will have instant recall of the sales organiza-
tion of customers. Therefore, the project lead recommends imple-
menting a kind of help for the user that allows him or her to
choose from a list of sales organizations. Furthermore, it would be
much appreciated if only those sales orders available for the spe-
cific customer would be on the list.
Secondly, your project lead asks you to enhance the application
with some additional colors. More specifically, he wants you to find
a way to make some of the data available in a chart. This becomes
even more critical because your project lead has to provide a status
report and would like to add some nice screenshots to it.
Although you dont know how you will implement all of these
requirements, you feel confident that you can do this using Visual
Composer.
Adding aToolbar
In the next steps, you will extend the application that you built in the
last example. First, you will create a toolbar for the Enter Customerinput form. From this toolbar, it will be possible to open a popup
window in which the end user can choose the sales organization of a
customer using BAPI_CUSTOMER_GETSALESAREAS. In addition,
you will create a chart that displays the size of the different orders in
a column chart sorted by the date of the order.
Creating a Toolbar
In Visual Composer, you can create a toolbar for every viewsuch asform, table, or chart views.
1. Toolbars can be easily added to a view by right-clicking on the view,
either on the Design tab or the Layout tab. A context menu will
open up in which you can choose Create Toolbar (see Figure 6.30).
-
8/8/2019 Sappress NetWeaver Visual Composer
39/54
206
Building Applications6
Figure 6.30 Context Menu of a View
2. In this example, you will create a toolbar for the input form Enter
Customer. After choosing Create Toolbar from the context menu,
the Create Toolbar Buttons dialog opens (see Figure 6.31). To adda button to the toolbar, click on the Plus symbol on the lower left
side of the dialog box. A button labeled Button will be created.
Rename the button to Choose Sales Org. You can also define an
action on the button. Here, define a custom action with the name
CHOOSE_SALES_ORG.
Figure 6.31 Create Toolbar Buttons Dialog
You have now created your first toolbar. Figure 6.32 shows the input
form with the newly created toolbar.
-
8/8/2019 Sappress NetWeaver Visual Composer
40/54
207
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
Figure 6.32 Input Form with a Toolbar
Popup iView
After creating the toolbar with the Choose Sales Org button, you
now have a trigger to raise an event to open a help dialog for the
Enter Customer input form. There are different ways in Visual Com-
poser to create a help dialog. In this example, youll use a popup
iView (see the sections on Value Help in Chapter 7 for an alternative
to this approach).
1. To create a popup iView, drag out from the out port ofEnter Cus-
tomer. From the context menu that opens, select Open Popup
iView. The Select Popup iView dialog opens (see Figure 6.33).
2. In the Select Popup iView dialog, select Create new iView and
change the name to Choose Sales Org. After clicking on OK, you
have created your first popup iView, but it still doesnt contain any
functionality nor can it be invoked.
Tip
If you click on OK before creating a button for a toolbar, you wont see a
toolbar in the specific view. This is due to the fact that in theory every
view already has a toolbar and, by default, this toolbar is hidden. Addinga button automatically sets the visibility flag of the toolbar to Show. If
you dont add a button, the status of the toolbar wont change and it will
still be hidden.
To remove a toolbar, open Configure Element for the view with the tool-
bar. Youll see a property Toolbar with the value Show. By opening the
drop-down list and changing the value to Hide, you can hide the toolbar.
If you want to reuse the toolbar later on, you can keep the buttons of the
toolbar. On the other hand, if you want to remove the toolbar completely
and dont intend on using it again, we recommend that you remove all
buttons from the toolbar before hiding it. This will eliminate unnecessary
data from your model description.
-
8/8/2019 Sappress NetWeaver Visual Composer
41/54
208
Building Applications6
Figure 6.33 Select Popup iView Dialog
3. You can configure the event that will later bring up the popup
iView by double-clicking on the connection between the out port
and the popup element. Moreover, by changing the value of
Event name to choose_sales_org (see Figure 6.34), you can gen-
erate an event which you can raise with the button from the tool-
bar that you just created. Note that Visual Composer does not dif-
ferentiate between uppercase and lowercase for actions andevent names.
Figure 6.34 Configure Element for the Popup Invocation
You can now open a popup iView. Next, you will add functionality to
this iView.
AddingFunctionality to a
Popup iView
1. To add functionality to the popup iView, you have to drill down to
the popup iView. This opens the popup iView. You can do this by
right-clicking on the popup icon and choosing Drill Down from
the context menu. Figure 6.35 shows the icon with an opened con-
text menu.
-
8/8/2019 Sappress NetWeaver Visual Composer
42/54
209
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
Figure 6.35 Popup Element Context Menu
2. In your popup iView, the end user should be able to choose from
a list of sales areas that are available for a specific customer. TheBAPI that provides this functionality is BAPI_CUSTOMER_GET-
SALESAREAS. Note that this BAPI requires the customer number.
3. Since you already asked the end user for the customer number in
the Enter Customer input form, it is already available. Unfortu-
nately, this information is available only in the calling iView, and
not yet in the popup iView. How do you make the customer num-
ber available within the popup iView?
4. By dragging out and releasing the Input port of BAPI_
CUSTOMER_GETSALESAREAS, you open a context menu, just asyou have done before. This time you choose Start Point from the
list (see Figure 6.36).
Figure 6.36 Creating a Start Point to Import Data into a Popup iView
5. The Select Input Fields dialog opens. From there, you select
CUSTOMERNO and click on OK.
6. By dragging out from the Salesareas port of BAPI_CUSTOMER_
GETSALESAREAS, you can now create a Table View with at least
the customer number (CUSTOMER) and the sales organization
(SALESORG).
-
8/8/2019 Sappress NetWeaver Visual Composer
43/54
210
Building Applications6
Adding a Button toa Popup iView
To preview the layout of the popup iView, select the Layout tab.
Because you are dealing with a popup iView here, you sense that there
is still one thing missing, namely, a button to close the popup iView.
1. To add this button, you create a toolbar for the Table View and adda button called Close. In addition, you define a custom action
named CLOSE on this button. Figure 6.37 shows an example for a
Table View for BAPI_CUSTOMER_GETSALESAREAS.
2. Next, drag out from the out port of the Table View and create an
End Point in the same way that you created the Start Point before.
By double-clicking on the connection between out port and the
End Point you can rename the connection to close.
Figure 6.37 Table View with Close Button for BAPI_CUSTOMER_GETSALESAREAS
3. Now you can close the popup iView by clicking on the button from
the toolbar. There is still one thing left to domake the informa-
tion on the sales organization available to the calling iView.
4. To make this data available, first switch back to the calling iView
by clicking on the back arrow from the navigation bar.5. Then double-click on the choose_sales_org connection to open a
list of input and output ports. Assign the input and output fields of
the popup iView according to the way they appear in Figure 6.38.
After deploying your application, it should look like the one shown
in Figure 6.39. You can see the newly created popup iView opened
and showing only the available sales organizations for customer
0000001000the customer number that was already entered in the
Enter Customer input form.
-
8/8/2019 Sappress NetWeaver Visual Composer
44/54
211
Transactional ApplicationsAccessing ERP from Visual Composer 6.2
Figure 6.38 Assigning Popup Input and Output to the BAPI and the InputForm Fields
Figure 6.39 Application with Popup iView Opened
-
8/8/2019 Sappress NetWeaver Visual Composer
45/54
515
Index
A
ABAP List Viewer (ALV) 358
ABAP stack 27, 28
ABAP Workbench 31, 391
ActionScript 72, 78, 85
Activation 425
Additional operators 139
Administrator Workbench 424
Adobe Flash 43, 72
Client 78File 85
Player 52, 91UI 40
Adobe Flash Runtime 85
Deploying applications using 192Adobe Flex Server 78, 85, 419
Adobe SVG Viewer 52, 71, 91
Alert Data Service 104, 347, 406
Alert Framework 347
Alert Monitor 357
Alias Manager 403
Analysis Process Designer 462
Analytic applications 40, 46 APD 462
Application consultant 33
Application platform layer 27
Application service 61, 88
ARIS 87, 89
Authentication 184
Authorization 184, 317
B
Backend elements 74
Balanced Scorecard 428BAPI 435
Accessing 184BAPI_CUSTOMER_GETDETAIL
184, 216
CITY 187COUNTRY 187Customerno 186NAME 187
Pe Address 187Pi Salesorg 186
STREET 187
BAPI_CUSTOMER_GETSALESAREAS 205, 209
CUSTOMER 209CUSTOMERNO 209SALESORG 209
BAPI_FLBOOKING_CREATEFROMD
ATA 246, 247, 248
BOOKING_DATA 246CLASS 248INPUT 246OUTPUT 246
RESERVER_ONLY 247RETURN 246TEST_RUN 247TICKET_PRICE 246
BAPI_FLIGHT_CHECKAVAILABILIT
Y 238
AIRLINEID 238CONNECTIONID 238FLIGHTDATE 238
BAPI_FLIGHT_GETLIST 230, 238,
253
AIRLINE 245AIRPORTFR 245AIRPORTID 252AIRPORTTO 245ARRDATE 245ARRTIME 245CITY 252CONNECTID 238COUNTRY 252COUNTRY_ISO 252CURR 245DATE_RANGE 230, 231, 232DEPTIME 245FLIGHTDATE 245MAX_ROWS 231PRICE 245
BAPI_SALESORDER_GETLIST 192,
193, 213
CUSTOMER_NUMBER 194DOC_DATE 194DOC_STATUS 194
MATERIAL 194NAME 194
-
8/8/2019 Sappress NetWeaver Visual Composer
46/54
516
Index
SALES_ORGANIZATION 194SD_DOC 194
BAPI_SALESORDER_GETSTATUS192, 202
SALESDOCUMENT 202
BAPI_SALESORDERS_GETLIST 216BEx 378
BEx Analyzer 90
BEx Query Designer 90, 305BEx Report Designer 90
BEx Suite 31, 41, 47, 87, 90, 378
BEx Web Application Designer 47,90
BEx workbook 389
BI 281
BI Consumer Services 281
BI Document Repository Manager
389
BI extension Kit for Visual Composer
47, 70, 75, 279
BI Integration Wizard 112, 286,
292, 313
BI JDBC Connector
MaxDB 317Microsoft SQL Server 316Oracle 317Setup 316
BI UDI 419
Board Toolbox 122
Design Board 122Layout Board 123Source Board 123
Bulleted List UI Controls
Busines Process Modeling 87
Business analyst 32, 47
Business application 39
Business content 60, 424
Business expert 32Business Intelligence 27, 46, 59,
182
Accessing 182Business package 38, 85, 180
Business Process Expert 32, 33, 47,
64
Business Process Expert Network
64
Business Process Management 27
Business Process Modeling 89
Business Server Pages (BSP) 391
C
Calendar UI Controls
Change Management Service 86
Characteristics 297, 321
Chart 212Column Chart 212
Chart Type 221
Chart ViewModel Components
Checkbox UI Controls
Clock UI Controls
Close ModelModel
Collaboration 42
com.sap.vc 253
epcm 253Combine operator 248
Creating 248Combo Box UI Controls
Command URL 295
Compiler 70, 72
Component Build Service (CBS) 86
Compose Task Panel Toolbar
Compose Model 195
Additional operators 195Connectors 195Operators 195
Composer Model 222Components 195Composite Applications 41, 436
Analytic Composites 41Conditional Functions Expression
Editor
Conditions 199
Configure Task Panel Toolbar
Configure ElementModel
Connector Framework 182
Connectors
Multidimensional 280Relational 280Control Properties UI Controls
Control Properties Dialog UI Con-
trols
Cost awareness 29
Count 321, 323
Creating views 186
CSV 393
Cumulative Total 321, 326
Currency 300
Custom Field
-
8/8/2019 Sappress NetWeaver Visual Composer
47/54
517
Index
Creating 198Customer Relationship Manage-
ment 182
Accessing 182
D
Data Definition Language 426
Data fields 199
Data services 184
Accessing 183Required input fields 186
Data StoreModel Connectors
Data Type 142, 198, 199
Data Warehousing Workbench 424
Date Functions Expression Editor
Date Picker UI Controls
Date/time 321
Date/Time Formats Expression
Editor
Date/Time Formatting Mask
Expression Editor
Date/Time Parts Expression Editor
Date/Time Units Expression Edi-
tor
DDL 426
DefaultFlexFrameStyle 446Delta link 400, 401
Deploy Task Panel Toolbar
Deploy to Portal 190
Design Board 93
Design tab 93Design Time Repository (DTR) 68,
86, 408
Development class 425
Development server 77
Dimension table 308
Distinct
Model OperatorsDocument classes 389
Document Object Model (DOM) 74
Document Repository Manager 389
Document store 378
Documentation Wizard 99
Down port 403
Drag-and-drop 184
Drop-Down List UI Controls
Dynamic columns 298, 300, 372
Dynamic Expressions Expression
Editor
Dynamic Expressions Editor
Expression Editor
Dynamic Expressions OperatorsExpression Editor
Dynamic List List
E
Eclipse
Eclipse SDK 86Element
Configure 188, 189Deleting 188Marking 188Renaming 189
End PointModel Connectors
Enteprise services 437
Enterprise portal 28
Enterprise Portal Client Manager
(EPCM) 133, 253, 257
Enterprise Service Repository (ESR)
437
Enterprise Services Architecture
(ESA) 436
Enterprise SOA 39, 435, 436
Entity service 61
Entry List Manager 99EP Usage Type 42, 81
EPCM Event Eventing
ERP
Accessing 181Event
Name 208Raising 208
Eventing 251, 378
Event 133Signal in 133
Signal out 133Excel 393Exceptions 300, 346
Executable GUI language 63
Exporting to
CSV 397Excel 394PDF 397
Expression Box UI Controls
Expression Editor 129, 166, 199
Categories 167
Conditional Functions 172, 203
-
8/8/2019 Sappress NetWeaver Visual Composer
48/54
518
Index
Date Functions 171Date/Time Formats 177Date/Time Formatting Mask 175Date/Time Parts 176Date/Time Units 176
Dynamic Expressions 192, 202Number Formatting Mask 174Numeric Functions 169Operators 173Scientific Functions 172Text Functions 167Time Functions 171
External key 297, 305
External services 61
F
F4-help 306
Field mapping 193
Field name 198
Fields 184
FilterModel Operators
Filtering 136
Filters
Key-figures 371Financial Instrument Controlling
431Find Data Task Panel Toolbar
Flash debugging console 421
Flexibility 29
Floor Plan
Guided Activity 40Forecasts 329
Form ViewModel Components
Formatted value 300
Formulas 419
Free form 323
Freestyle 35Freestyle Kit for Visual Composer
70, 75
G
Gauge -> s. UI Controls
Generalized Modeling Language(GML) 62, 72, 73, 85, 400
Generalized Modeling Language
Document Object Model (GML
DOM) 70
Generalized Modeling Language Plus
(GML+) 63
Grand Totals 321, 322Graphic engine 70, 71
GUI Machine 74
GUI Machine Language 74Guided Procedures 42, 87, 89, 131,
438
H
Hierarchy 297, 323
HTML 69, 71
HTML components 71
HTML Text UI Controls
HTML ViewModel Components
HTMLB 407
HTTP sniffing 317, 338
HTTP(S) 69
HttpWatch 318, 423
I
IF function 203
Image UI Controls
Image Manager 101
Images 154Inbound service template 379
InfoObject 301
InfoProvider Data 390
Information Integration Layer 27
Inheritance of attributes 407
Innovation 29
Input Field UI Controls
Input Form
Add 186Input Port 186, 193, 295, 304
Inspect Task Panel ToolbarIntegration broker 27Interaction problem 40
Internet Graphics Server (IGS) 315
INVALID_VARIABLE_VALUES 450IT architecture 436
IT specialist 34
iView 28, 38, 179
-
8/8/2019 Sappress NetWeaver Visual Composer
49/54
519
Index
J
J2EE Connector Architecture (JCA)
182, 280
J2EE Engine
GUI Config Tool 399 J2EE Log Configurator 420
Java API 69
Java Connector (JCo) 182, 442
Java Database Connectivity (JDBC)
283
Java Dictionary 86
Java Server Pages (JSP) 78
Java stack 27, 28, 67
Database 68 JavaScript 71
K
Key figures 300, 371
Knowledge Management 27, 42,
378, 389
L
Language settings 451
Layer
Model ComponentsLayers
Adding 215Creating 216Navigation 218, 242Wizard 227
Layout Board Layout tab
Layout Manager 70, 71
Layout tab 93, 186Level 323
List
Dynamic List 101Static List 101Value Help List 101
List Box UI ControlsLocalization 409
Log Viewer 420
Logging 419Logon ticket 184
Lower Model Operators
M
Macromedia Flex Markup Langu-
age 64
Main Menu 94
BI 112Edit 96Help 114Model 94Search 96Tools 98, 192Window 114
Main Toolbar 116
Master Data 390
Master Data Management 27
MDX 338
Multidimensional expressions 286MDX Editor 112, 286, 338, 343
MDX injection 338
Measures 321
Member 322
Menu BI Main Menu
Menu EditMain Menu
Menu HelpMain Menu
Menu Model Main Menu
Menu Search Main Menu
Menu Tools
Main MenuMenu WindowMain Menu
Metadata 56, 184, 390
MetaObject facility 57
Microsoft Internet Explorer 52, 91
Microsoft Internet Information Ser-
ver 51, 67
Microsoft SQL Server 51, 67
Microsoft Windows 51
Microsoft XML 4.0 73, 91
Microsoft XML Parser 52
Mobile device 39Model
Basic Model 179Browse 96, 117Close 94Compile 98Components 126Compose 118, 125Configure Element 118Deploy 99Export 95
Export To File 95
-
8/8/2019 Sappress NetWeaver Visual Composer
50/54
520
Index
Import 95Import From File 95Inspect 120Manage 95New 94
Open 94Print 95Save 95Search 98
Model Browser 95
Model Components
Chart View 128, 212, 221Form View 126, 187, 222HTML View 129iView 179Layer 131Nested iView 130Package 180Page 180Table View 127
Model Connectors 132
Data Store 134, 167, 221, 223,244, 248, 406
End Point 132, 210Popup Signal 135Signal In 133Signal Out 133Start Point 132, 209Timer 135User Data 134, 167
Model Operators 136
Combine 141Distinct 139Filter 136Group 141Intersect 140Lower 138
Sigma 137Sort 137Subtract 140Union 139Upper 138
Model persistence 67
Model-driven architecture 57
Model-driven development 35
Directness 37Exploratory 35Expressiveness 37
Extensibility 37Principles 35
Reusability 36Simplicity 36
Model-driven tools 35 Model-to-code approach 39
Model-View-Controller (MVC) 78
Architecture 78 MOF 57
Moving average 321, 328
Multi Channel Access 28 Multidimensional connectors 280
MXML 72, 78, 85
N
Naming rules 94
Nested iViewModel Components
Number Formatting Mask Expres-
sion Editor
Numbered List UI Controls
Numeric Functions Expression
Editor
O
Object Management Group 57
OLAP 285
OLE DB for OLAP (ODBO) 286Open ModelModel
Options 192
Outbound service template 379
P
Package 425
PAR file 78, 401PDF 393
People Integration Layer 27
Percentage Growth 321, 334Percentage Share 321, 325
Perforce 408
Permissions 92, 184Personalization 134, 167, 408
Perspective 86
Pivot control 377Plain Text UI Controls
Planned vs. Actual 321, 335
Planning functionality 392Popup iView 135, 207
Adding functionality 208, 210
-
8/8/2019 Sappress NetWeaver Visual Composer
51/54
521
Index
Creating 207Open 207Select 207
Popup SignalModel Connectors
Port
Flipping 230Portal archive 401
Portal Connector 80, 83, 419
Portal Connector Framework 80,83, 85
Portal Content Catalog 81, 110, 257
Portal Content Directory (PCD) 78,81, 82, 92
Portal deployment 419
Portal eventing 421
Portal page 180
Portlet 28
Ports 184
Process chain 462
Process Integration Layer 27
Progress Bar 240
Progress Bar UI Controls
Pushbutton UI Controls
Q
Query 435Query Designer 305
R
Radio Group UI Controls
Rank Change 321, 330
Relational connectors 280
Remote Function Call (RFC) 435
Return on investment (ROI) 29
RFC 391
Accessing 184RFC library 182Rich client 39
Rich Internet Applications 72
Roles 184RSRT2 371
S
SAP Composite Application Frame-work 31, 41, 49, 59, 61, 87, 88,
438
SAP List Viewer (ALV) 377
SAP NetWeaver 26, 43
SAP NetWeaver Application Server27
Java stack 43
SAP NetWeaver Business Intelli-gence 27, 281
SAP NetWeaver Developer Studio
31, 41, 48, 78SAP NetWeaver Development Infra-
structure 68, 86
SAP NetWeaver Master Data Management 27
SAP NetWeaver Portal 27, 28, 43,
68, 80, 85
Connector Framework 38Content Catalog 38System Landscape 38
SAP NetWeaver Portal Content Stu-
dio 30
SAP NetWeaver Visual Composer
31
Add-Ons 52, 80, 81Architecture 68Client 69Components 68Configuration 105, 106, 107, 109Console 124Convergence 63Core 70Customizing 104Deploy applications 190Kits 70, 75Logging off 95Logging on 92Navigation 98Navigation back 98
Navigation Bar 123Navigation forward 98Prerequisites 91Repository 77Roadmap 42Server 68, 75, 85, 419Storyboard 68, 69, 85, 93Storyboard components 70
SAP NetWeaver Visual Composer for
NetWeaver 2004s 42, 43
Supported platforms 44, 51
Supported UI technologies 44, 51SAP Query 282
-
8/8/2019 Sappress NetWeaver Visual Composer
52/54
522
Index
SAP Query application 282
SAP system adapter 182
SAP Visual Administrator 316SAP Visual Composer 6.0 42
SAP xApp Analytics 43, 46, 427
SAP_JDBC 406Scalable Vector Graphics (SVG) 70,
71
Scientific Functions ExpressionEditor
Scorecarding 427
Best Practices 427SE80 391
SEM 427
Serialization error 456
Service 435
Service consumer 435
Service provider 435
Service Repository 435
Service request 435
Service-Oriented Architecture (SOA)
435
Severity 420
SigmaModel Operators
Signal In Model Connectors
Signal OutModel Connectors
Single Sign-On (SSO) 92, 442
SOAP 285
SortModel Operators
Sort Operator 195
Add 195Configure 196Direction 197
Sorting 137, 195, 370
Source Board Source Tab
Source tab 93
Special characters 407
Spinner
UI ControlsSQL editor 112, 285, 338
SQL field 285
SQL injection 317, 338
Standardized UI 40
Start PointModel Connectors
Static List List
Store 391
Stored procedure 435
Storing global data 134
Strategic Enterprise Management
427Styles 199
Suppress sum 303
SWF see Adobe Flash file
System alias 92, 441System Alias Manager 102
System landscape 82, 85, 184
System types 184
T
Table View 192, 194
Add 194Table Columns 195
Table ViewModel Components
Task panel 117, 183
Task Panel Toolbar 117, 183
Browse 117Compose 118Configure 118Deploy 120Find Data 120Inspect 120
Test Data Service 185
Text editor 162
Text Functions Expression Editor
Ticker UI Controls
Tile View 407
Time Functions
Expression EditorTimerModel Connectors
Toggle Button UI Controls
Toolbar 205
Adding a button 206Creating 205Removing 207
Tools MenuMain Menu
Top N 321, 331, 336
Total cost of ownership (TCO) 29,
40
Transactional applications 181Translation
Formula 419Text string 418Worklists 409
Translation Localization
Translation files 409
Translation information 85
Transport 399, 425
Transport Package Tool 400
Treasury and Financial Investment
Controlling 430
-
8/8/2019 Sappress NetWeaver Visual Composer
53/54
-
8/8/2019 Sappress NetWeaver Visual Composer
54/54
Index
Web services 43, 83, 406
Systems 43Web UI 39WEBAPI 295
Wizard Layers
Wizards 131Work Center 438
Workbook 389
Workspace environment 70World Wide Web Consortium (W3C)
74
Write back 460WSDL 43, 102, 259
X
xApps 87
XGraph language (XGL) 37, 72, 85
XMI 58
XML 69XML for Analysis (XMLA) 285
Y
Year-to-date 326
YTD 326
Z
Zero Activity 321, 336
Z-order 221