SAP Cloud Applications Studio - 1805 - Library PDF
SAP Cloud Applications Studio - 1805 - Library PDF
5 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.1 Getting Started with the Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.2 About the SAP Cloud Applications Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.3 Feature Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.4 First Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Installing and Updating the SAP Cloud Applications Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
User Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
User Setup Quick Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.5 Introduction to the Integrated Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Working in the Integrated Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Using Help Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Help Content: Questions and Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
My Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Repository Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Execute a Query to Explore a Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Solution Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Add New Item Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Properties Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Trace Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Working with the Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Icon Library (Studio) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Icon Library (UI Designer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.6 Public Solution Model (PSM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
About the Public Solution Model (PSM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
5.7 Introduction to Business Object Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Business Object Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Business Object Modeling: Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Look Up the Representation Term of a Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Business Object Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
12 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
In this library you can view reference documentation about the SAP Cloud Applications Studio (“studio”). The library
contains reference documentation to help you get started with the studio, as well as information related to quality
assurance, information for studio administrators, and detailed information on development activities in the studio.
The library also contains reference documentation for the user interface designer (UI designer), and references the
general concepts and tools in the SAP cloud solutions.
You can access the library as follows:
● In the studio, select Help SAP Cloud Applications Studio Help . The library opens in your browser and
is displayed using a content player. This option does not offer a function to search the library.
● In the studio, select Help Manage Help Settings . You can install the help content manually and view the
content using Microsoft Help Viewer, which includes a search function. For more information, see Using Help
Content [page 42].
● If you install the help content using Microsoft Help Viewer, you can also access context-sensitive help for
wizards, dialog boxes, and tool windows by pressing F1 or clicking the Help icons on the UI.
This documentation does not describe the standard features and technologies in Microsoft Visual Studio. For
information about Microsoft Visual Studio, see http://www.microsoft.com .
Any software coding or code lines/strings (“Code”) provided in this documentation are only examples
and are not intended for use in a productive system environment. The Code is only intended to better
explain and visualize the syntax and phrasing rules for certain SAP coding. SAP does not warrant the
correctness or completeness of the Code provided herein and SAP shall not be liable for errors or damages
cause by use of the Code, except where such damages were caused by SAP with intent or with gross
negligence.
First Steps
Scripting Languages
● Scripting Language Reference [page 173] ● Syntax for the Implementation of Business Logic
The scripting language is used to define business [page 210]
objects and business object extensions as well as to You use these methods and keywords to implement
implement the business logic for cloud partner the business logic of your solution. For this task, you
solutions. This lightweight language is easy to learn can also use predefined built-in functions and reuse
and to use with its focused set of features. services:
The keywords, methods and functions of the scripting ○ Built-In Functions [page 276]
language are described in separate sections according ○ Basic Reuse Libraries [page 238]
to the task you want to perform:
○ Reuse Libraries for Business Areas [page 268]
○ Syntax for Business Object Definitions
[page 174] ● Basic Data Types [page 284]
You use these keywords and functions to define The scripting language supports basic data types such
the structure and interface of business objects. as string, numeric and Boolean values. In addition, the
existing metadata of the SAP underlying cloud
○ Syntax for Business Object Extension Definitions
platform for core data types (CDTs) and global data
[page 197]
types (GDTs) is made available.
You use these keywords and functions to define
the structure and interface of business object
extensions.
Check Out the Style Guides Check Out the Reference Guides
Style Guide for Writing System Message Texts [page 682] Reference Guide for Documentation of Cloud Solutions from
This style guide provides you with the standards and SAP [page 708]
guidelines for writing system messages to be displayed on the This reference guide provides an overview of the main
user interface (UI) of your solution. It also provides the reference documentation types specific to the SAP cloud
standards and guidelines for writing system messages that solution.
are relevant for SAP Support; these messages are not
displayed on the UI.
In addition, this style guide provides guidance on writing long-
text documents providing additional information to a system
message that helps the user to solve very complex error
situations. These long-text documents can be incorporated
into the Solution Documentation.
Discussion Forum
Ask your peers questions and search for answers.
You can find the discussion forum in the SAP Community at SAP Cloud Applications Studio Community .
The following information is relevant, if the tenants of your customer are upgraded to a new version. The steps you
need to take to upgrade your customer-specific solution differ according to the tenant type on which you are
developing.
Customer's Tenant
SAP maintains the upgrade to a new version to ensure high quality upgrade of the customer's production tenant and
test tenants.
Please take into account that you cannot access the customer's tenant during the upgrade preparation phase
(this is one week before the downtime period of the upgrade) and during the upgrade period itself.
Development Tenant
SAP does not upgrade your development tenant. However, if your solution has been deployed in a customer's tenant,
it will automatically be upgraded when SAP upgrades that tenant. You can then download the upgraded version of
your solution, upload it to the next studio version, and then create a patch for this solution.
You can upload solutions that have not yet been deployed in a customer's tenant as well as solution templates to
the next studio version or the subsequent studio version, for example:
SAP Solutions OnDemand Studio 1302 SAP Solutions OnDemand Studio 1305 SAP Cloud Applications Studio 1308
(February 2013) (May 2013) (August 2013)
Overview
Before you start working in the studio, you must connect to the repository, which contains any solutions that you
develop as well as the SAP public solution model (PSM) content.
Prerequisites
You have a user and password for the repository. For more information, see User Setup Quick Guide [page 31].
Procedure
1. Open the studio.
2. The Connect to Repository dialog box is displayed. Select the System that contains the repository to which
you want to connect.
In most cases, only one System is available; this is your development repository.
To edit the repository system connection, from the Administration menu, click the pencil icon ( ) to
the right of the System field or select Options and Settings and edit the settings on the Connectivity
tab.
Name: Y77VXGW3Y_
Status: In Development
Patch Solution: No
See Also
My Solutions [page 49]
Solution Explorer [page 55]
Repository Explorer [page 50]
This document provides information about what is new in the SAP Cloud Applications Studio version 1805 (May
2018).
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
Any software coding or code lines/strings (“Code”) provided in this documentation are only examples
and are not intended for use in a productive system environment. The Code is only intended to better
explain and visualize the syntax and phrasing rules for certain SAP coding. SAP does not warrant the
correctness or completeness of the Code provided herein and SAP shall not be liable for errors or damages
cause by use of the Code, except where such damages were caused by SAP with intent or with gross
negligence.
You can also remove the change history from the custom objects.
To depersonalize data of standard business objects, use the
DataPrivacyDestructionOfCustomDataBOBased enhancement option.
You can use the BADI filter to specify which business object you want to depersonalize. If no filter is specified,
the implementation is executed for all the business objects.
For more information, see Depersonalize Transactional Data
● Sensitive Personal Data for Extension Node Fields
You can now define fields that contain sensitive personal data for business partners in extension node fields.
When these fields are viewed by a business user, a Read Access Log (RAL) entry is created. Fields can be
defined as sensitive personal only if the extension node is enabled for change history.
● Change History Deletion for Extension Nodes
Change history for extension nodes is included in the data removal process. When you remove the business
partner using the data privacy tool, you can also remove change history for extension nodes that may have
personal data.
Note that the extension node should be enabled for change history using the [ChangeHistory] annotation.
First Steps
Any software coding or code lines/strings (“Code”) provided in this documentation are only examples
and are not intended for use in a productive system environment. The Code is only intended to better
explain and visualize the syntax and phrasing rules for certain SAP coding. SAP does not warrant the
correctness or completeness of the Code provided herein and SAP shall not be liable for errors or damages
cause by use of the Code, except where such damages were caused by SAP with intent or with gross
negligence.
Availability
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
The SAP Cloud Applications Studio (“studio”) for the SAP cloud solutions enables SAP partners, resellers, and
customers to adapt and enhance the solution capabilities of the SAP cloud solutions.
The development tools provided are presented in an integrated development environment (IDE) based on Microsoft
Visual Studio. Using the studio, you can develop, deploy, and test specific add-on functionality. Furthermore, you
can create and integrate new business content, services, and user interfaces to provide complete micro-vertical
business solutions.
The studio allows SAP partners, resellers, and customers to work with the same entities that SAP uses in the core
development of its cloud solutions and to develop solution capabilities that have the same look and feel as the SAP
standard cloud solutions.
Customer-Specific Solutions
The development of a customer-specific solution is triggered by a customer requirement. The solution is typically
developed by a reseller for a specific customer.
For information about the development scenarios for customer-specific solutions, see Lifecycle Management of
Customer-Specific Solutions [page 138].
Features
For information about the specific features and tools provided by the studio, see Working in the Integrated
Development Environment [page 37].
Translation Support
You can extract text from certain project items and export it in an XML-based file format for translation into one of
the languages supported by the SAP standard cloud solution.
For information about the functions that support translation of a solution, see Translation Quick Guide
[page 584].
Cloud Readiness
The studio supports the development of solution capabilities that are tailored for specific customers. The
development and deployment of these solution capabilities causes no disruption to daily business because the
upload process of a solution to a customer's production system does not require any system downtime.
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes all
features that are available within the studio. Not all of these features are available for every SAP cloud solution.
General Features
SAP Business SAP Hybris Cloud SAP Cloud for Travel and
ByDesign for Customer Expense
Scripting Language
SAP Business SAP Hybris Cloud SAP Cloud for Travel and
ByDesign for Customer Expense
Business Configuration
SAP Business SAP Hybris Cloud SAP Cloud for Travel and
ByDesign for Customer Expense
SAP Business SAP Hybris Cloud SAP Cloud for Travel and
ByDesign for Customer Expense
For a list of supported Business Object Extensions, check the documents below:
● Node (Business Object Extension) [page 204]
● Action (Business Object Extension) [page 199]
Mashups
SAP Business SAP Hybris Cloud SAP Cloud for Travel and
ByDesign for Customer Expense
Screens
SAP Business SAP Hybris Cloud SAP Cloud for Travel and
ByDesign for Customer Expense
Service Integration
SAP Business SAP Hybris Cloud SAP Cloud for Travel and
ByDesign for Customer Expense
Prerequisites
● To download the studio from the SAP Software Download Center, you need a valid S user.
● You are using one of the following operating systems:
○ Microsoft Windows XP
○ Microsoft Windows Vista
○ Microsoft Windows 7 or higher
● You have installed the following:
○ Relevant version of Microsoft .NET Framework
○ Relevant version of Microsoft Visual Studio 2010 Shell (Isolated)
○ Relevant version of Microsoft Silverlight
Partners are required and solely responsible to regularly install security updates or patches provided by
Microsoft Corporation for the Microsoft .NET Framework and Microsoft Visual Studio 2010 Shell (Isolated).
As these components need to be installed/obtained by the partner, SAP is not responsible for installation of
any related security updates or patches. For more information, see http://www.microsoft.com .
● The studio version must match the release version of the SAP cloud solution for which you are creating a
solution.
To determine the release version in the SAP cloud solution, click Help About [SAP cloud solution] and
verify that the Technical Release details match the latest build version of the studio.
● Previous Build
If relevant, you have removed the previous build. Check the sections below on updating your studio installation
Steps
1. Go to the SAP Software Download Center at https://support.sap.com/swdc .
2. Select the Software Downloads tab. The system opens a new window.
3. In the Search field, enter Studio XXXX where XXXX stands for the studio release version. The system gives
you a list of the available studio versions. .
4. Click on the required SAP CLOUD APP STUDIO product Version. The system takes you to your company’s
download catalog.
If the search does not produce any results, you might not have a valid S user. In such a case, please
contact solution partner management.
5. Click on the Downloads tab, select your solution and under the Action header, click on the arrow icon. Choose
Download from the list of available actions.
If you encounter any issues, please contact SAP Partner Management by writing an e-mail to
[email protected].
Developer
Developers can perform the following tasks:
● Create and maintain all types of development objects, such as business objects and user interfaces, in the
studio, user interface (UI) designer, and administrator tools for the SAP cloud solutions
● Access work center views for Analytics
For more information about what the developer role can do, see the reference documentation in the section
Developer Desktop [page 312].
Studio Administrator
The studio administrator must not be confused with the administrator in the SAP cloud solution. These
users have different roles.
Studio administrators can perform all tasks that a developer can perform. In addition, studio administrators can
perform the following tasks:
● Create new solutions
● Delete solutions
● Submit solutions for certification
● Submit patch requests
● Delete sessions and locks for other users
For more information about the tasks that only a studio administrator can perform, see:
● Administration Quick Guide [page 151]
● Implementation Manager Quick Guide [page 153]
Business User
The business user role is used for testing within the development or test tenant of the SAP cloud solution. Business
users have authorizations and restrictions equivalent to users on a customer tenant; they have no authorization
within the studio.
Business Users can perform the following tasks (depending on their access rights):
● Create additional business users
● Assign work center views to other business users
● Grant instance-based authorizations to other business users
● Perform business configuration scoping and deployment
● Start a trace from within the SAP cloud solution
Before you can begin administrating, developing, or testing solutions in the SAP Cloud Applications Studio (“studio”),
you have to create development users (studio administrator and developer user roles) and business users. You
create these users in the SAP cloud solution
After these users have been created, the development users must change their initial passwords and maintain
contact data. Business users only need to change their initial passwords.
Development users with studio administrator or developer user roles are for use in the studio only.
Business users are for use in the SAP cloud solution.
User Roles
The user roles are Studio Administrator, Developer, and Business User.
For more information, see User Roles [page 30].
SAP Business ByDesign Application and User Management User and Access Management Business Users
SAP Cloud for Customer Administrator General Settings Users Business Users
or Application and User Management Business Users
SAP Cloud for Travel and Application and User Management User and Access Management Business Users
Expense
Prerequisites
● Prerequisites for creating service agents, assigning user IDs and passwords, assigning work centers, and
creating business users:
○ You have an initial business user. The initial user is provided to you during the tenant provisioning
process. Only use the initial business user in the SAP cloud solution. Do not use it in the studio.
○ To create the service agent, you need access to the following work center views:
SAP Cloud for Travel and Expense Business Partners Service Agents
○ To assign access rights to the business user, you need access to the following work center views:
SAP Cloud for Customer Administrator General Settings Users Business Users
or Application and User Management Business Users
SAP Cloud for Travel and Expense Application and User Management Business Users
Before starting to develop in the studio, you have to create the required development users with the relevant
administration or developer rights. You do this by creating service agents in the SAP cloud solution, and assigning
the relevant user ID, password, and work centers to those service agents.
SAP Business ByDesign Business Partner Data —> New Service Agent
Project Management —> New Service Agent
Resource Management —> New Service Agent
SAP Cloud for Customer Business Partners —> New Service Agent
Project Management —> New Service Agent
Resource Management —> New Service Agent
SAP Cloud for Travel and Expense Business Partners —> New Service Agent
If the Service Agent ID field is enabled, your entry must have the prefix EXT.
If internal number assignment is active, the system determines the new ID.
For the ID, the system uses the naming convention <LastName><FirstName><ServiceAgentID>.
For example, the service agent ID for Kate Jacob could be JACOBKATEEXT999.
Assign a User ID and a Password to the Service Agent (for Development Users)
1. Open the Business Users view by clicking Application and User Management User and Access
Management Business Users .
2. Search for the service agent (business user) that you created. For the search, enter one of the following:
● *<ServiceAgentID> (for example, *EXT999)
● Name
3. Click Edit and select Attributes.
The Business User quick activity opens.
4. In the User Data screen area, define a user ID, for example, the last name of the service agent.
5. In the Language field, set the language to English.
You must set the language to English to ensure the consistency of your solution, because the logon language
of both the SAP cloud solution and the studio is English
6. In the fields Password and Confirm Password, assign an initial password.
7. Click Save or Save and Close .
SAP Cloud for Customer Administrator General Settings Users Business Users
or Application and User Management Business Users
SAP Cloud for Travel and Expense Application and User Management Business Users
2. Search for the service agent (business user) that you created. For the search, enter one of the following:
● *<ServiceAgentID> (for example, *EXT999)
● Name
3. Click Edit and select Access Rights.
The Edit Access Rights quick activity opens.
4. In the Edit Access Rights editor, on the Work Center and View Assignment tab assign the following work centers
and views by selecting Assigned to User.
The work centers and views that are available for assignment depend on the SAP cloud solution,
therefore not all work center views may be available to you.
For more information about the features that are available to you in the studio and for some of
which you require these access rights, see Feature Matrix [page 25].
You can also use business roles to assign access rights to users. In the Edit Access Rights editor,
click the Business Roles tab. For more information, see the Business Roles Quick Guide in your SAP
cloud solution.
The users must change the initial password. To do this, they must log on for the first time to the
SAP cloud solution using the assigned user ID. The system requests a new password.
The user can use the same password in both the SAP cloud solution and in the studio.
In addition to the users for the studio, you also have to create business users for use in the SAP cloud solution only.
These business users are for test purposes and are not for use in the studio.
Do not assign the Partner Development work center and its views to a business user role. These users
must not have access to the studio.
You use business users to perform the following in the SAP cloud solution:
● Scoping and deployment of your business configuration entities
● Testing of your solution
● Starting a trace from within the SAP cloud solution
Steps
1. Create the required business users (administrator users and end users) in the SAP cloud solution.
To enable testing of business configuration entities, at least one standard business user must be
assigned to the Business Configuration work center.
Do not test or change business configuration entities with a development user.
Development Users
After receiving your user details, before logging on to the studio, you must first change your initial
password in the SAP cloud solution. This is important, because you cannot change the initial password
in the studio.
Do not change the logon language defined for your user ID, as this causes inconsistencies in the solution.
The logon language must be English.
If you do not maintain your contact details, when you create an incident the system forwards the incident
automatically to a development user in your organization, who has maintained contact data.
1. Log on to the SAP cloud solution with your development user and proceed as follows:
SAP Business ByDesign Home Self-Services Self-Services Overview Company Address Book Edit My
Contact Data
2. Enter your telephone number and e-mail address and save your entries.
Business Users
After receiving your user details, you must first change your initial password in the SAP cloud solution.
The development tools provided by the release are presented in an integrated development environment (IDE) based
on Microsoft Visual Studio. The user interface (UI) of the release, referred to as the developer desktop, is composed
of different elements. Many elements are standard features and tools of Microsoft Visual Studio, for example, the
Menu toolbar, the Standard toolbar, various tool windows, and the document window. In addition, the developer
desktop provides UI elements that represent specific features and tools of the release development environment.
To get an idea of the integrated development environment, have a look at the following screenshot:
The UI elements of the developer desktop are docked or auto-hidden on the left, bottom, and right. The tool windows,
menus, and toolbars available depend on the type of solution or item you are working on as well as on the settings
you have applied. You can move and position the UI elements to suit your working behavior.
Availability
Product Documentation
You can access the release documentation from the Help menu by selecting SAP Cloud Applications Studio Help.
The library documentation appears in your browser.
For more information, see Using Help Content [page 42].
This documentation does not describe the standard features and technologies in Microsoft Visual Studio. For
information about Microsoft Visual Studio, see http://www.microsoft.com .
Developer Desktop
The following sections describe the tools that you can use for the administration and lifecycle management of a
solution and how you can access the corresponding user interface (UI) elements.
Administration toolbar
The Administration toolbar provides a number of administrative tasks, such as creating and deleting customer-
specific solutions or solution templates and managing user sessions. You can also access the Session
Administration tool window from the Administration toolbar.
You can access the Administration toolbar in the View menu by clicking Toolbars Administration .
For more information, see Administration Quick Guide [page 151].
Session Administration
The Session Administration tool window displays a list of users in the release with open sessions. If you are assigned
the Administrator role, you can delete user sessions and any item locks that are applied for the corresponding
sessions. All other users can delete their own sessions and item locks, but they cannot delete other users' sessions
and item locks.
You can access the Session Administration tool window in the View menu and in the Administration menu.
Implementation Manager
The Implementation Manager ( ). is a tool for managing the lifecycle of customer-specific solutions. You can access
the lifecycle management functions provided by the release from a toolbar and a tool window:
● Implementation Manager tool window
The tool window provides a view of the solution status and implementation log at each stage in the process.
You can access the Implementation Manager tool window in the View menu and in the Administration menu.
● Implementation Manager toolbar
The toolbar provides buttons that allow you to assemble, upload, and create a patch for your solution.
You can access the Implementation Manager toolbar in the View menu by clicking Toolbars
Implementation Manager .
For more information, see Implementation Manager Quick Guide [page 153].
You cannot switch on the admin mode for solution templates. For more information, see Solution
Templates [page 162].
Help Menu
The functions available on the Help menu are:
● SAP Cloud Applications Studio Help
Open the built-in help.
The following sections describe the tools that you can use to develop a solution and how you can access the
corresponding user interface (UI) elements.
My Solutions
The My Solutions tool window provides functions that allow you to create solutions and to access the repository. You
must log on to a repository system to create and edit solutions in the studio.
For more information, see My Solutions [page 49].
Repository Explorer
The Repository Explorer tool window displays SAP content that is released with the public solution model (PSM)
such as business objects, data types, enhancement options, inbound service interfaces, and reuse UIs. You can
explore the content to gain an understanding of the repository structure and the business context and use of SAP
content, which you can reuse and enhance in your solution.
For more information, see Repository Explorer [page 50].
Solution Explorer
The Solution Explorer tool window displays a solution and the project items created for this solution, for example, a
business object or a screen. In the Solution Explorer, you can open items for editing and add new items to a solution.
You can also search for files within a solution.
For more information, see Solution Explorer [page 55].
Properties window
The Properties window displays information about the item in your solution that is currently selected in the Solution
Explorer. When you select the solution, you can view solution properties such as the solution status. When you select
an item such as a business object or a UI component, you can view item properties such as the activation status of
runtime objects.
For more information, see Properties Window [page 66].
Document windows
In the release, document windows provide a view of the items that you add to your solution. Examples of items that
you can open, edit, and save in a document window are business object definitions, extensions for existing business
object definitions, data sources, and business object queries. The type of document window in which an item opens
depends on the type of item. For example, when you open a business object definition, the business object file is
displayed in the code editor.
Document windows are displayed on tabs in the center of the developer desktop. You can switch between open
document windows by using the tabs. You can also view multiple document windows side-by-side.
You can open an item in a document window by double-clicking the item in the Solution Explorer.
If you double-click an item that represents a user interface component, such as a quick activity floorplan (QAF)
screen or a business configuration view, the item file opens in a separate window in the UI designer.
You can access the Output window in the View menu by clicking Output.
Wizards
The wizards in the studio guide you through a logical sequence of steps, making it easier and quicker for you to
perform development activities that are complex, unfamiliar, or infrequently performed. All wizards are easy to
access and follow similar user interface (UI) patterns.
For more information, see Working with the Wizards [page 68].
Trace Explorer
The Trace Explorer is a tool for gathering and analyzing diagnostic information.
For more information, see Trace Explorer [page 68].
The studio documentation is also called Help content. When you want to know something about a certain topic, you
can either search the integrated Help content or the local Help content.
Integrated Help Content
This Help content is integrated in the studio and installed automatically when you install the studio. The Help content
is displayed in the standard content player, and you can search for information in individual topics. This type of Help
content is very easy to access. However, we recommend using the local Help content in addition because it offers a
lot of advantages.
Local Help Content
To display the local Help content, you need to install a Help Viewer. The local Help content is also installed
automatically when you install the studio. If this does not work, you can install the local Help content manually. One
of the advantages of the local Help content is that you can search the entire studio documentation.
The following table shows the differences between the integrated and the local Help content and the advantages of
the local Help content:
Download Help The integrated Help content comes If you want to install the local Help content manually (see
together with the studio. below for more information), download the MS Help files from
the SAP Help Portal or SAP Business Center.
For more information, see Install Local Help Content Manually
[page 44].
Install Help The Help content is installed The local Help content is installed automatically. However, you
automatically together with the can also install it manually, for example, to install a different
studio. version.
For more information, see Install Local Help Content Manually
[page 44].
Display Help In the standard content player in In the Help Viewer that you have installed:
your browser ● Microsoft Help Viewer 1.0
● Microsoft Help Viewer 1.1
● H3Viewer (by The Helpware Group)
Open Help In the studio, go to Help SAP If the local Help content is installed, you can access it as
follows:
Cloud Applications Studio Help
● In the studio, go to Help View Help
● In the studio, press F1 to access context-sensitive
F1 Help.
For more information, see Use Context-Sensitive F1
Help [page 46].
Search Help Search in individual documents Use the Help Viewer search function and search the entire
local Help content.
For more information, see View Local Help Content
[page 45].
Update Help The integrated Help content is The local Help content is automatically updated when you
updated automatically when you update your studio build. You can also update it manually by
update your studio build. installing a new version of the local Help content.
For more information, see Installing For more information, see Installing and Updating the SAP
and Updating the SAP Cloud Cloud Applications Studio [page 28] under “Updating Your
Applications Studio [page 28] Studio Installation” and Install Local Help Content Manually
under “Updating Your Studio [page 44].
Installation”.
Remove Help You cannot remove the integrated You can remove the local Help content.
Help content. For more information, see Remove Local Help Content
[page 45].
For more information, see Help Content: Questions and Answers [page 46].
If you cannot open the Topics in Detail page by clicking the link, you can navigate to the page
by opening the Business Center at https://www.sme.sap.com ; then select SAP Business
ByDesign Solution Information Wiki Info Exchange SAP Solutions OnDemand Studio .
In the Partner/Developer Information section, select Topics in Detail and then
Documentation — SAP Cloud Applications Studio.
b. At the top of the page, click the Documentation — SAP Cloud Applications Studio tab and navigate to the
Installing the Help Content in Microsoft Help Viewer Format section.
c. Click the Download now button for the relevant version, save the .zip file to your local computer, and
extract the two Help files (an .msha file and an .mshc file) from the .zip file.
You can also find the Help content in the SAP Help Portal : Go to Software Development Kits (SDKs),
select your version of the studio and then click the Help Content link.
You can also right-click the program entry while holding the SHIFT key.
For more information, see Search for Topics [page 45] and Use Context-Sensitive F1 Help [page 46].
You can now install the current version of the Help as described under Install Local Help Content Manually
[page 44].
Context-sensitive help is available for ... What you need to do to access context-sensitive help
... wizards, dialog boxes, and tool windows ● In the studio, press F1 when you open a wizard or dialog box or
when you select a tool window.
●
In the studio, click the Help icon ( ) located in the top right of
the user interface element.
... keywords when you create a business object In the code editor, when you define a business object for your solution and
press F1 , an overview document opens (Syntax for Business Object
Definitions [page 174]), which contains a list of functions and keywords
with links to further information.
... keywords when you create a script file In the code editor, place your mouse cursor on a keyword and press F1 .
If documentation is not available for a keyword, an overview document
opens (Syntax for Implementation of Business Logic [page 210]).
We have collected some questions that may come up when you are using the help content. Read the sections below
to get answers to your questions and additional information about using the Help content for the studio.
If you want to know how to manually install and use the Help content, see Using Help Content [page 42].
I cannot complete the installation of Microsoft Visual Studio 2010 Shell (Isolated)
Redistributable Package. What do I do?
Uninstall the unfinished installation and restart your computer. Make sure that you have installed the latest Microsoft
updates and switch off your antivirus software. Reinstall Microsoft Visual Studio 2010 Shell (Isolated) Redistributable
Package, restart your computer, and switch on your antivirus software again.
I have installed Microsoft Visual Studio 2010, SP1, but I still see Help Viewer 1.0, not 1.1. Which
version do I have?
To see which Help Viewer version is installed, open Control Panel Programs Programs and Features .
You will find an entry for either Microsoft Help Viewer 1.0 or Microsoft Help Viewer 1.1.
The Help Library Manager that you open from the Help menu → Manage Help Settings is a component of the Help
Viewer. In Microsoft Visual Studio 2010, SP1, Help Viewer 1.1 is still shipped with Help Library Manager 1.0. The title
bar of the Help Library Manager dialog box therefore displays Help Library Manager — Microsoft Help Viewer 1.0 even
when Help Viewer 1.1 is installed.
What is H3Viewer?
H3Viewer is a third-party tool developed by The Helpware Group that you can install and use instead of the Microsoft
Help Viewer. The advantage of using H3Viewer is that it displays the full table of contents (TOC), whereas Microsoft
Help Viewer 1.0 doesn't display the TOC. If you install H3Viewer, you can still use Microsoft Help Viewer.
I don't have administrator privileges, so how can I install the Help content?
You need to run the studio as an administrator to install Help content on your local computer.
If the message The content publisher cannot be verified. Installing this content requires administrator privileges. is
displayed, please do the following:
1. On your desktop, click the Start button and in the programs list, find SAP Cloud Applications Studio [x.x].
2. Right-click the program entry and select Properties.
3. In the Properties dialog box, on the Compatibility tab, select Run program as an administrator.
You can also right-click the program entry while holding the SHIFT key.
You can now install the Help content manually on your local computer by following the instructions in Using Help
Content [page 42] under “Install Local Help Content Manually”.
Why is the message “No content was found on your computer.” displayed?
Please check whether the studio Help content is installed. If no studio Help content is installed, you need to install
the Help content manually on your local computer by following the instructions in Using Help Content [page 42]
under “Install Local Help Content Manually”.
If you have already installed the Help content and tried to open the Help by pressing F1 , please report this issue
and describe exactly what you did before the message appeared. For information about reporting problems, please
see Report an Incident [page 565].
When I try to view the studio Help, why does the MSDN Library open in my browser and display
the message “Page Not Found”?
Please do the following:
1. In the studio, from the Help menu, click Manage Help Settings.
Help Library Manager (HLM) opens. The first time you launch HLM, you will be prompted to set the location
where local content will be installed. By default, a path is entered in this field. You should not need to change
the path. However, make sure that it is a location on your C: drive.
2. In Help Library Manager, click the Choose online of local help link, select I want to use local help, and then
OK.
3. If the Help content hasn't been installed automatically, you need to do this manually by following the
instructions in Using Help Content [page 42] under “Install Local Help Content Manually”.
When I try to view the studio Help, why is the Visual Studio documentation displayed in my
browser?
If the Help content hasn't been installed automatically, you need to do this manually by following the instructions in
Using Help Content [page 42] under “Install Local Help Content Manually”.
Why isn't the studio Help displayed in the contents even though I can access studio Help topics
by clicking F1 and from the Help menu?
You probably installed the Help content while the Help Viewer was open. Try closing and reopening the Help Viewer.
The layout of the studio Help topics looks strange in the Help Viewer. What can I do?
Try reinstalling the Help Viewer and make sure that you do not change the default path for the library location.
Why doesn't the search find the topic I'm looking for even though I know that documentation
exists?
Avoid using stop words in your search queries. A stop word is a word that occurs frequently in natural language, such
as a or the. If you enter a phrase that contains one or more stop words in the search text box, the Help Viewer doesn't
display any results in the results list.
For example, enter create report and not create a report in the search text box.
The stop word files for Microsoft Help Viewer 1.0 and 1.1 are stored on your local computer in c:\program
files\Microsoft Help Viewer\v1.0\ folder. Depending on which Help Viewer you have installed, the
location may differ.
If you still cannot find the topic you are looking for, try using the following Boolean operators: AND, OR, and NOT.
For more information, see Using Help Content [page 42] under “Search for Topics”.
5.5.4 My Solutions
The My Solutions tool window provides functions that allow you to create solutions and to access the repository. You
must log on to a repository system to create and edit solutions in the studio.
Features
When you open the studio, you first log on to the repository. By default, the My Solutions tool window is displayed
on the left of the developer desktop. You can also open the My Solutions window in the View menu.
You can also access some of these functions from the Administration menu.
See Also
Solution Explorer [page 55]
The Repository Explorer tool window displays SAP content that is released with the public solution model (PSM)
such as business objects, data types, enhancement options, inbound service interfaces, and reuse UIs. You can
explore the content to gain an understanding of the repository structure and the business context and use of SAP
content, which you can reuse and enhance in your solution.
Prerequisites
To display SAP content in the Repository Explorer, you must log on to the repository. For information, see Log on to
the Repository [page 18].
If the system cannot find any entities that match your search term, you can try the following:
● Click the Clear Search button ( ) to search in all namespaces and development units (for
business objects) or usage categories (for data types).
● Enter a different spelling or search term.
● View information — You can hover over an entity in the tree view to display information about the entity such
as the object category or the subelement type. The information also indicates whether write access is allowed
for an entity and whether the entity is deprecated.
● View documentation — You can click a business object and its elements to display comprehensive
documentation in the documentation pane. On the Description tab, you see the business object (element)
documentation; the data type information is displayed on the Data Type tab of the documentation pane and
is also accessible via the Data Types tab as described below.
Code Data Type Context Can only be used as context structure of a code data type.
Core A core data type according to CCTS that has unrestricted usage.
Key Can be used as key in business object node structures, but not in messages.
Message Intermediate Can only be used in message types, but only at intermediate levels and not for the message type
itself.
See Also
About the Public Solution Model (PSM) [page 75]
Look Up the Representation Term of a Data Type [page 91]
The studio enables you to execute queries for SAP business objects and custom business objects to help you better
understand the business object data model.
For custom business objects, you can execute the QueryByElements query, which is generated automatically, and
complex custom queries. For more information, see Create a Query [page 363]
The following table shows you where to access the function:
Procedure
1. To execute a query for SAP business objects, proceed as follows:
a. In the studio, select View Repository Explorer.
b. Select the Business Objects tab and make sure that the Queries button is selected.
c. Select a business object (or search one using the Search field) and expand the tree view.
d. Select a query ( ), right-click it, and select Execute Query.
The Query Parameter Selection window opens.
2. Optional: In the Query Parameter Selection window, you can do the following:
● Add or Remove parameters
● Paste Values from Clipboard into the Lower Boundary field
● Define the Maximum Number of Records
● Calculate the Available Number of Records for Selection
3. To define the selection parameters, do the following:
a. Click the Parameter field to select a parameter.
b. To exclude records from the results, click the Include/Exclude field and select Exclude. The default
value is Include.
c. Click the Option field to select one of the following selection options: Equal to, Between, Contains
Pattern, Less Than, Less Than or Equal to, Greater Than, Greater Than or Equal to.
d. Enter a Lower Boundary Value and an Upper Boundary Value, if required.
4. Click OK to execute the query.
Result
The results list is displayed in the documentation pane. You can use the following options:
● Navigate by Association
Explore the query results by following the associations of the business object. Please note that this is not
possible, if the debugger is active.
● Reopen Search
Click this button to reopen the Query Parameter Selection and adjust the selection parameters.
● Single-Record View
Select a record and press the button to display the record in the Single-Record View window.
● Search window
Search for a string or term in the query results.
● Output Formatting Active
Toggle between the technical view and the user view. If you select Output Formatting Active, the user view is
displayed.
● Generate Code
Click this button to generate the .absl code that executes the query with the selection parameters used.
You can then copy this code into a new or existing .absl file. In case there is already coding in your .absl
file, there may be conflicts due to duplicate imports or variables, which you need to resolve.
If you cannot see all the buttons, click the down arrow on the right or enlarge the query results window.
The Solution Explorer tool window displays a solution and the project items created for this solution, for example, a
business object or a screen. In the Solution Explorer, you can open items for editing and add new items to a solution.
You can also search for files within a solution.
When you double-click a solution in the My Solutions tool window, the solution opens in the Solution Explorer. By
default, the Solution Explorer tool window is displayed on the right of the developer desktop. You can also open the
Solution Explorer in the View menu by clicking Solution Explorer.
In the Solution Explorer window, the solution is displayed with its description (= the name you have given your
solution) and the status information (for example, In Development). Below the solution, you can see all the items
and item objects of the solution.
At the top of the Solution Explorer window, you can: view the properties of your solution and items, add a new item,
refresh your solution, search for specific files within the solution, create correction and close correction during a
production bug fix. The following table describes the icons that are available in the toolbar.
View the properties of the solution and items Refresh the solution
Add a new item to the solution Search for files in the solution
Create a correction during production bug fix Close a correction during production bug fix
The Solution Explorer uses icons in front of the items and item objects to display status information. Depending on
the status, the icons used for items and objects change. For example, added to an item or object means "checked
out by me" and means that the item has no up-to-date runtime objects. As an example, the following table shows
the icons used for business objects:
Runtime objects of business object are up-to- Business object has been checked out by me
date
Runtime objects of business object are not up-to- Business object has been checked out by another
date user
The activation status of the runtime objects of an solution is displayed in the Properties window. For more information,
see Properties Window [page 66].
Project
The project node displays the name of the project and the status of the solution, for example, In Development. When
you create a solution for the first time, the status of the solution is In Development and you can use all available
functions. When the status of the solution changes, for example, to Assembled, you can view the solution, but you
Generic Actions
Depending on the status of your solution, you can perform various actions for an item or the solution by right-clicking
a node or item. Actions that you cannot choose for the solution or item you have selected are grayed out. Here is an
overview of the actions that are available in the Solution Explorer:
● Activate
You can activate an item or solution to generate the runtime objects that are required for an item or the
solution to function. You must activate any new or modified items before you can test them in the SAP cloud
solution.
○ To activate all items of your solution, select Activate All Items .
○ To activate only the new or modified items, select Activate New and Changed Items . This option
speeds up the activation process.
○ To determine if an item has been activated, in the Solution Explorer, select the item. The activation status
is displayed in the Properties.
For more information on the activation of business objects, see Activate a Business Object [page 362].
● Check
You can use the following check functions:
○ For a selected item of the solution:
Right-click the element and select Check.
○ For all items of the solution:
Right-click the project node and select Check Items .
○ For all items and runtime objects of the solution:
Right-click the project node and select Check Items and Runtime Objects . This option checks the
consistency of the design-time files and of the generated runtime objects.
○ For running consistency check in background mode:
1. Right-click the project node and select Check Enable Background Mode .
2. Click on Check Items or Check Items and Runtime Objects to trigger the background
job. When the mode is triggered, you can continue to work on other solutions, and avoid the timeout
errors for large solutions.
3. Click on Check Display Logs to see the results of your check. The system shows the results
in a pop-up window confirming if the consistency check is successful or not.
Click on Check Disable Background Mode to switch to the earlier context menu option that
runs the check in fore-ground mode.
● Check In/Check Out/Check In All Files/Revert
Items that you have checked out (for example, when changing them) are locked by you and other users cannot
edit these items. A red check mark identifies items that you have checked out. When you have finished editing
an item, you can check it in to make it available for other users to edit. You can also check in all items at the
same time by right-clicking the solution and selecting Check In All Files. Items checked out by other users are
identified by a blue user icon. The Properties window displays the user that has checked out the items.
The .absl file that you have changed during production bug fix can be reverted to its previous checked in and
activated version when you use the Revert action.
● Add
You can also open the Add New Item dialog box by clicking the button at the top of the Solution
Explorer tool window.
See Also
Working in the Integrated Development Environment [page 37]
Overview
The Add New Item dialog box displays the installed item templates that SAP provides for solution development. You
can add items such as business objects, different user interface (UI) components, and Web services to your solution.
Availability
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
You can also open the Add New Item dialog box by clicking the button at the top of the Solution
Explorer tool window.
The Add New Item dialog box opens. By default, all items are displayed in the center pane in alphabetical
order.
You can also display items by category by selecting one of the categories from the list in the Installed
Templates pane under SAP:
○ Analytics
○ Business Configuration
○ Data Protection and Privacy
○ Extension
○ Mashups and Web Services
○ Screens
○ Service Integration
When you select an item, a brief description of the item appears in the right pane. You can add the following
items.
File
Installed Template Icon Extension Description How To...
Business Object .bo You can create a business object definition that ... Create a Business
specifies the structure and organization of the Object [page 346]
business object. On the basis of your business
object definition, you can then implement the
business logic and generate screens.
Code List Data Type .codeli Code list data types can, for example, be used in ...Create a Code List
st business objects or business object extensions. Data Type [page 406]
You can define configurable code list data types
via business configuration objects and business
configuration sets.
Form .xdp You can create a print form for a business object. ... Create a Print Form
Print forms are read-only portable document [page 438]
format (PDF) documents that are generated
from data stored in the business object. You can
define the data that you want to include in the
form and design the layout.
Mass Data Run .run A run that specifies the automatic mass ...Create a Mass Data
processing of a business object action. It contains Run [page 467]
the selection criteria and the processing results.
Query .qry You can create a query that contains search ... Create a Query
parameters and fields from different business [page 363]
object nodes. You can then create an object work
list (OWL) that uses your query data in search and
information retrieval operations.
Reuse Library .librar You can create a reuse library and define its ...Reuse Library Quick
y functions to organize the code in your solution or Guide [page 403]
to reuse code in several script files.
Tax Decision Tree .bcctax You can create a tax decision tree for a country. ...Create a Tax Decision
Based on this decision tree, the system Tree [page 341]
determines the tax event for this country when
you create an invoicing document, such as a
customer or supplier invoice.
File
Installed Template Icon Extension Description How To...
Analytical Report .report You can create a report based on an SAP data ... Create a Report
source or based on a custom data source you [page 460]
have created.
Combined Data Source .cds A combined data source combines data from two ... Create a Combined
or more data sources that share common or Data Source
similar characteristics. [page 457]
Data Source .ds You can create a data source that includes key ... Create a Data Source
figures and characteristics and transformation [page 455]
and aggregation rules. You can also reference
other data sources. You can then create a report
that uses your data source. To join or combine
data from different data sources, you can create
joined and combined data sources using the
administrator tool for Analytics.
Joined Data Source .jds A joined data source joins data from two or more ... Create a Joined Data
data sources that share common characteristics. Source [page 448]
Key Figure .kf You can create a calculated or restricted key ...Create a Key Figure
figure based on an SAP data source or based on [page 462]
a custom data source you have created. You can
use the key figure in a report. A calculated key
figure is determined using calculation rules or
formulas. A restricted key figure is restricted to a
specified characteristic value.
File
Installed Template Icon Extension Description How To...
BAC Elements .bac You can create business options, business ... Create a Business
topics, and country options. Option [page 324]
... Create a Business
Topic and Business
Options [page 326]
... Create a Country and
Business Options
[page 329]
Business Configuration .bco You can create a business configuration object ... Create a Business
Object (BCO) as the basis of a business configuration set Configuration Object
(BC set). [page 334]
Business Configuration .bcc You can create a business configuration set (BC ... Create a BC Set
Set set) based on a business configuration object Using an SAP BCO
(BCO). You can then assign your BC set to a [page 332]
business option using the Business Configuration ... Create a BC Set
Wizard. Using a Custom BCO
[page 336]
Business Configuration QA.uico You can create a business configuration view (BC ... Create a Business
View mponent view) for a business configuration set (BC set) to Configuration View
allow administrators to change the values defined [page 337]
in the BC set during fine-tuning. You model the
view using the UI designer.
Implementation Project .bct Fine-tuning project templates provide sample ... Create a Fine-Tuning
Template content for a specific scenario that is defined by Project Template
SAP. The fine-tuning activities you need to [page 340]
complete for the template are explicitly listed.
File
Installed Template Icon Extension Description How To...
Personal Data .pdd You can enable disclosure of personal data stored ... Enable Data
Disclosure in custom BOs. The data protection officer can Disclosure [page 410]
access the data in the Data Protection and
Privacy work center.
Sensitive Personal Data .psd You can define data protection and privacy level ... Enable Read Access
of personal data. The fields defined as sensitive Logging [page 416]
personal data will be enabled for read access ... Enable Personal Data
logging. The fields defined as personal data will for Extension Fields
be enabled for destruction during the data [page 418]
removal process.
File
Installed Template Icon Extension Description How To...
Business Object .xbo You can create business object extensions to ... Create a Business
Extension enhance SAP business objects by adding Object Extension
extension fields to them. You can then add the [page 381]
extension fields to forms, screens, reports, and
search categories. You can also use the extension
fields in script files.
Embedded Component EC.uico An embedded component is a reusable user ... Model an Embedded
mponent interface component that you can add to other Component
floorplans. The parent floorplan influences the [page 618]
behavior of the embedded component. You can
model this component in the UI designer.
Process Extension .xs You can create a process extension scenario to ... Create a Process
Scenario link business contexts to other related business Extension Scenario
contexts. You can then use the Scenario [page 397]
annotation to specify that an extension field is
available for all the business contexts in the
scenario.
References to .ref You can select the customer-specific fields that ... Create References to
Customer-Specific you want to use in script files. Customer-Specific
Fields Fields [page 391]
File
Installed Template Icon Extension Description How To...
Data Mashup .MC.uim You can create a mashup that combines and ... Create a Data
ashup displays data from both internal and external Mashup [page 494]
sources. You can then use the Data Mashup
Builder in SAP's cloud solution to transform or
merge external Web services with internal
business data using industry-standard Web
service protocols.
HTML Mashup .MC.uim You can create a mashup that embeds HTML or ... Create an HTML
ashup JavaScript code in a screen. Mashup [page 497]
Mashup Port Binding PB.uima Create a port binding to add a mashup to your ... Create a Port Binding
shup floorplan. for a Mashup
[page 491]
REST Mashup Web .WS.uim You can create a Web service based on the REST ... Create a Mashup
Service ashup architectural style. For REST Web services, you Web Service
need to know the request URL and any relevant [page 501]
query parameters. You define the REST Web
service using the administrator tools for mashup
and Web service authoring. To integrate the Web
service in a screen, you must add the Web service
to a data mashup.
RSS/Atom Mashup .WS.uim You can create a Web service based on RSS or ... Create a Mashup
Web Service ashup Atom feeds. For RSS or Atom feeds, you need to Web Service
know the end-point URL of the Web service or the [page 501]
WDSL location. You define the RSS/Atom Web
service using the administrator tools for mashup
authoring and Web service authoring. To
integrate the Web service in a screen, you must
add the Web service to a data mashup.
SOAP Mashup Web .WS.uim You can create a Web service based on SOAP. For ... Create a Mashup
Service ashup SOAP Web services, you need to know the WSDL Web Service
location (URL). You define the SOAP Web service [page 501]
using the administrator tools for mashup
authoring and Web service authoring. To
integrate the Web service in a screen, you must
add the Web service to a data mashup.
URL Mashup .MC.uim You can create a mashup that sends data from ... Create a URL Mashup
ashup SAP's cloud solution to the URL of an online [page 492]
service provider. The service provider uses the
data, for example, to perform a search, and the
results are displayed in a new browser window.
File
Installed Template Icon Extension Description How To...
Fact Sheet (FS) FS.uico An FS is a one-page read-only overview of an ... Model a Fact Sheet
mponent object. It displays the object properties, can have [page 601]
different views, and can contain links for
navigating to related objects. You can model this
overview in the UI designer.
Guided Activity GAF.uic A GAF is a floorplan for an activity that can be ... Model a Guided
Floorplan (GAF) omponen divided into a logical sequence of steps. It Activity Floorplan
t consists of a series of screens that guide the user [page 610]
through an activity to complete a specific task.
You can model this floorplan in the UI designer.
Modal Dialog (MD) MD.uico An MD is a small movable and resizable window ... Model a Modal Dialog
mponent that helps users perform a simple task. You can [page 616]
model this dialog in the UI designer.
Object Instance OIF.uic An OIF allows users to create, delete, view, and ... Model an Object
Floorplan (OIF) omponen edit a business object such as an employee, a Instance Floorplan
t purchase order, or a supplier's record. You can [page 605]
model this floorplan in the UI designer.
Object Value Selector OVS.uic An OVS supports users in selecting values for an ... Create an Object
(OVS) omponen input field. An OVS is most commonly called from Value Selector Dialog
t an input field. You can configure an OVS Box [page 608]
component in the UI designer. You can also
configure an OVS Control (an input field with a
value selection helper) in the UI designer and
consume the OVS component.
Object Work List (OWL) OWL.uic An OWL is a list pane that contains business ... Model an Object
omponen objects such as purchase orders or Work List [page 607]
t opportunities. Users can perform tasks on
objects and trigger follow-on processes. You can
embed an OWL in a view. You can model this list
in the UI designer.
Port Type Package PTP.uic A PTP hosts one or more port types. A port type ... Create a Port Type
(PTP) omponen is a blueprint for an inport or an outport. You can Package [page 615]
t create a PTP to facilitate navigation between
components that have inports and outports
within the same PTP without any mapping. You
can configure these components in the UI
designer.
Quick Activity Floorplan QA.QA.u A QAF allows users to quickly perform a self- ... Model a Quick
(QAF) icompon contained or short subtask of a larger task, for Activity Floorplan
ent example, create a bidder within the creation of a [page 603]
request for quotation. A QAF is a simple task-
specific alternative to an OIF. You can model this
floorplan in the UI designer.
Quick Create Floorplan QC.uico A QC allows casual users to quickly create, delete, ... Generate Screens for
(QC, not available for mponent view, and edit a business object record, such as a Business Object
SAP Business an account or an opportunity. A QC is a slide-in [page 370]
ByDesign) window, that allows users to edit the record
without navigating away from the UI they are
currently seeing. UIs that are created with QCs
are intended to be used on tablets and on PCs.
Quick View Floorplan QV.uico A QV is a preview on a thing. A thing is the ... Generate Screens for
(QV, not available for mponent representation of one or several entities in the a Business Object
SAP Business system and is intended to match the data record [page 370]
ByDesign) currently displayed on the UI. The QV combines
several pieces of detailed information on a thing
without navigating away from the UI that the user
currently sees. Data displayed in a QV cannot be
edited. QVs are intended to be used on tablets
and PCs.
Thing Inspector TI.uico A TI allows the user to get a complete view of a ... Generate Screens for
Floorplan (TI, not mponent thing. The TI shows all aspects of a thing and is a a Business Object
available for SAP compact summary of all primary attributes, the [page 370]
Business ByDesign) tags, and the actions that can be carried out. TIs
are intended to be used on tablets and PCs.
Thing Type Floorplan TT.uida A TT describes the general UI properties of a ... Generate Screens for
(not available for SAP taobjec thing, such as its name and various icons on the a Business Object
Business ByDesign) t UI, its binding against a business object, and its [page 370]
key. It is used for navigating between the screens
that are thing-based and for the provisioning of
REST services for a thing.
Work Center (WoC) .uiwoc A WoC groups task-specific activities such as ... Model a Work Center
managing purchase orders or planning and [page 614]
budgeting. Each WoC has multiple views. You can
model a WoC in the UI designer.
Work Center View .uiwocv A view contains information or tasks related to a ... Model a Work Center
iew specific topic. Views can contain a worklist and View [page 612]
can link to other activity floorplans such as QAFs
or GAFs. Views must be assigned to a WoC. You
can model views in the UI designer.
File
Installed Template Icon Extension Description How To...
Communication .csd You can select a set of inbound and outbound ... Define a
Scenario services that allows customers to create Communication
communication arrangements in SAP's cloud Scenario [page 557]
solution to exchange business documents
electronically.
External Web Service .wsid You can create an external Web service ... Integrate an External
Integration integration of type SOAP or REST. You can then Web Service Using
address the Web service in your business logic to SOAP [page 551]
enable access from the SAP cloud solution to a ... Integrate an External
remote application. Web Service Using
REST [page 552]
Internal .pid You can create a service integration definition to ... Configure Internal
Communication exchange data between two business objects Communication
that are located in different deployment units. [page 523]
The definition contains the configuration for
asynchronous communication between the
business objects.
Web Service .webser You can create a Web service based on a business ... Create a Web Service
vice object. Web services enable remote access to the [page 545]
business object data using SOAP-based
communication.
XML File Input .pid You can create an XML schema definition that ... Create XML File Input
allows customers to create an XML file, which can [page 524]
then be used to import third-party data from
other systems into SAP's cloud solution.
Overview
The Properties window displays information about the item in your solution that is currently selected in the Solution
Explorer. When you select the solution, you can view solution properties such as the solution status. When you select
an item such as a business object or a UI component, you can view item properties such as the activation status of
runtime objects.
Features
You can access the Properties window in the View menu by clicking Properties Window or by pressing F4 . You
can view the following solution properties or item properties by selecting the solution project node or an item in the
Solution Explorer.
Solution Properties
Property Description
Advanced
General
Compiler Version Version of the scripting language compiler that is used to check or activate the solution. This field
typically contains two numbers separated by a slash, for example, 1302 / 1211. The first number
indicates the compiler version of the .absl files. The number after the slash indicates the compiler
version of the.bo and .xbo files.
Description Description of the solution defined when the solution was initially created
Last Changed On Date and time when the project was last changed, that is, when an item was last added to or deleted
from the solution
Type Type of the solution defined when the solution was initially created; this property characterizes the
focus and content of a solution.
For a customer-specific solution, this property can have one of the following values:
● Customer-Specific Solution
For information, see Create a Solution [page 165].
● Solution Template
For information, see Create a Solution Template [page 164].
Item Properties
Property Description
Advanced
Local Path Full path of the project item on the client computer
General
Business Object Type Code representation of the type of the business object in the repository
Code
(for business objects
only)
Checked Out By User who has currently checked out the project item
Check Out On Date and time when the project item was checked out
Created On Date and time when the project item was created
Last Changed On Date and time when the project item was last changed
Status
Activation Status Status of the (runtime) objects of an item displayed in the Properties window:
This property can have one of the following values:
● Runtime objects up to date
● Runtime objects out of date
● Runtime objects do not exist
● Runtime objects contain errors
● Check pending/Check not possible
Make sure that the status of the runtime objects is Runtime objects up to date when you
perform runtime tests. Otherwise, you may test on outdated runtime data. To update the runtime
objects, activate the item by right-clicking the item and selecting Activate.
To illustrate the activation status in the Solution Explorer, a red dot ( ) is displayed next to the item
icons whenever the runtime objects are not up-to-date.
For detailed Information about how the status of items and object items is displayed by icons
in the Solution Explorer, see Solution Explorer [page 55].
The Trace Explorer is a tool for gathering and analyzing diagnostic information.
For more information about tracing, see Tracing Quick Guide [page 573].
Features
You can access tracing functions in the studio as follows:
● Functions in the Debug toolbar
The Debug toolbar provides debug functions and in addition functions that allow you to start and stop tracing.
You can also access the Trace Explorer tool window from this toolbar.
You can access the Debug toolbar in the View menu by clicking Toolbars Debug .
● Trace Explorer tool window
The Trace Explorer tool window displays active and completed traces. You can run a local trace, run a trace
for a business user, use incident traces for troubleshooting purposes, and view the results of a recorded trace.
You can access the Trace Explorer tool window in the View menu. You can also access the Trace Explorer tool
window from the Debug toolbar.
Overview
The wizards in the studio guide you through a logical sequence of steps, making it easier and quicker for you to
perform development activities that are complex, unfamiliar, or infrequently performed. All wizards are easy to
access and follow similar user interface (UI) patterns.
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
Wizard Features
The wizards in the studio:
● Guide you through a logical sequence of dependent or independent working steps.
● Consist of three steps or more.
● Contain a review step.
The Review step:
○ Displays all data that you entered in the wizard in the previous steps and all objects that were
automatically generated.
○ Is always the last step, for example, first step (1/3), second step (2/3), Review step (3/3).
○ Is display-only.
You cannot change any entries in the Review step. To change an entry, click Back.
● Remain open until you have finished defining the item and the system has generated the item.
Most generated items appear in the Solution Explorer. When you define BAC elements, you can double-click
the .bac file or right-click the file and select Open to display and change the BAC elements you have defined.
Each wizard step displays the following buttons: Back, Next, Finish, Cancel. The appearance of the buttons depends
on the wizard step displayed, that is, whether the function is available. For example, the Back function is not available
in the first wizard step.
Available Wizards
You can access the following wizards in the studio:
Studio Wizards
Wizard Use
Business Configuration Object Wizard Create a Business Configuration Object [page 334]
Business Configuration Set Wizard ● Create a BC Set Using an SAP BCO [page 332]
● Create a BC Set Using a Custom BCO [page 336]
Code List Data Type Wizard Create a Code List Data Type [page 406]
External Web Service Integration Wizard Integrate an External Web Service Using SOAP [page 551]
Integrate an External Web Service Using REST [page 552]
Mass Data Run Wizard Create a Mass Data Run [page 467]
Tax Decision Tree Wizard Create a Tax Decision Tree [page 341]
The following tables show some of the most frequent icons used in the studio.
Main Menu
Help Menu
Solution Explorer
Generic Actions
Activate Clean
Open Delete
For more information, see Business Objects Quick Guide [page 346] and Add New Item Dialog Box [page 58].
Implementation Manager
For more information, see Implementation Manager Quick Guide [page 153].
See Also
Icon Library (UI Designer) [page 73]
The following tables show some of the most frequent icons used in the user interface designer (UI designer).
For more information about what you can do with the tools, see Introduction to the User Interface Designer
[page 594].
Main Menu
Display<->Edit Activate
Controller
Data Model
The SAP public solution model (PSM) contains all entities in the SAP cloud solution that are released for use by
external consumers. External consumers can be partners who develop solutions on top of the SAP cloud solution
such as add-ons and integration scenarios or administrators who, for example, use SAP data sources to create new
reports. The modular and homogenous architecture of the SAP cloud solution allows SAP to offer external consumers
a highly flexible means of developing additional functionality without modifying the standard solution.
Basic Principles
The SAP Cloud Applications Studio (“studio”) allows SAP partners, resellers, and customers to work with the same
entities that SAP uses in the core development of its cloud solutions and to develop solution capabilities that have
the same look and feel as the SAP standard cloud solutions. The content developed using the studio resides on a
Understanding Deprecation
The current structures and processes defined within the public solution model (PSM) remain stable for the current
and upcoming release. If it is necessary for SAP to make changes to PSM entities to meet technical or business
requirements, SAP uses a deprecation mechanism that allows external consumers to update their solutions in an
appropriate time frame.
SAP plans to make changes to specific business object elements in the future:
● The business object elements are set to deprecated and, if an element is deprecated, all children
are also deprecated. For example, if a business object node is deprecated, all actions, queries, and
elements that belong to this node are also deprecated.
● SAP identifies the use of deprecated elements in a solution, informs the partner or other external
consumer who developed the solution, and provides information about the successor element.
● The external consumer creates a new version of the solution before another SAP release becomes
available.
● The new version of the solution is made available to customers for activation with the new release
of the SAP solution
● SAP revokes the respective business object element.
Deployment Units
A deployment unit is a piece of software that can be operated on a separate physical system, isolated from other
pieces of software. the SAP cloud solutions are organized in deployment units that group semantically related
business objects. For example, the Customer Relationship Management deployment unit groups business objects
such as Campaign, Lead, Opportunity, and Sales Order. The Foundation deployment unit mainly contains master
data objects, such as Material, Employee, and Customer.
Business Objects
A business object is a code representation of a self-contained, independent, real-world business concept, such as a
company, an employee, a sales order, an opportunity, or a product. The definition of a business object describes the
structure and behavior of a real-world business concept. Each business object resides in a deployment unit and
consists of a hierarchy of nodes, which represent the data.
Business object elements can be published for read-only access or for write access; write access means that an
external consumer can create, update, or delete instances of that business object by calling the core services
Create, Update, or Delete.
Data Types
A data type is a classification of a particular type of information.
Enhancement Options
An enhancement option is a repository object provided by SAP for a specific application to allow the standard
behavior of the application to be enhanced without modifying the standard solution. Enhancement options are
defined with metadata and documentation. A distinction is made between single-use enhancement options and
multiple-use enhancement options. If an enhancement option is for single use, it can be implemented only once in
a solution. If an enhancement option is for multiple use, it can be implemented more than once in a solution.
For information about creating an implementation of an SAP enhancement option, see Create an Enhancement
Implementation [page 401].
Embedded Components
An embedded component is a reusable user interface component that you can add to other floorplans. The parent
floorplan influences the behavior of the embedded component.
Data Sources
A data source is an object that provides a multidimensional, analytical view of business data. Data sources are the
basis of analytical report content and are associated with a specific access context or can be unrestricted.
Reuse Libraries
● Basic reuse libraries
The basic reuse libraries of the scripting language extend the scope and functions that you use to implement
your business logic in the studio. These “language-near” libraries provide basic functions that are used quite
often, for example, to retrieve context data, such as the current date or time for the current identity.
For more information, see Basic Reuse Libraries Reference [page 238].
● Reuse libraries for business areas
The reuse libraries for business areas provide additional, very specific services to the scripting language that
are relevant for functions in the SAP solution's business areas, for example, in the Financial Management
business area. These services are all based on entities provided by SAP.
For more information, see Reuse Libraries for Business Areas Reference [page 268].
Extension Scenarios
Extension scenarios enable you to create an extension field in one business context and then add that extension field
to multiple other business contexts. The data stored in the extension field is then passed from one business context
to the next as part of a business process. The following extension scenarios have been predefined by SAP:
● Account - General Information to Lead - General Information
● Account - General Information to Opportunity - General Information
● Lead - General Information to Opportunity - General Information
Overview
The SAP cloud solutions are built using the concept of “business objects” to model the business environment. This
document provides an introduction to the structure and behavior of SAP business objects.
All business logic is implemented in business objects that model real-world objects and processes.
The business object model is the central anchor for script coding, the user interface (UI), forms, and business tasks.
Changes to the business object may require corrections to scripts, UI screens, forms, and so on. Therefore,
when developing an cloud solution, we recommend that you complete the business object design as far as
possible before proceeding.
Deployment Unit
Each business object belongs to a deployment unit, which is a piece of software that can be operated on a separate
physical system, isolated from other pieces of software. For more information, see here [page 187].
The creation of a node implicitly introduces a composition, that is, a relationship between the parent node and the
child node. Compositions can be used to access features of the child node from the parent node (for example, in
action implementations). For each composition, a reverse association to the parent node is created implicitly.
Creating Sub-types
An object or object node can “play” different roles. You have to decide which roles are important from a business
point of view and should be represented explicitly by sub-types.
Analyze all objects and object nodes to determine whether some roles can be merged – this is an indication for the
existence of sub-types. Merging the roles leads to generalized objects or components.
In the element structure these associations are represented by the corresponding reference component.
The status of a business object can determine which actions are allowed.
Queries
A query is a service that returns a list of business object instances based on query parameters. Queries support
sorting, paging, and the use of "search engine" indexes.
See Also
Example: Building a Solution [page 93]
Each element of a business object must be assigned a data type. To homogenize the use of data types, SAP defines
consolidated global data types (GDTs) that represent business-related content in conformance with widely used
Web and business standards. All business objects and service interfaces share this same pool of GDTs.
You can access the data types that are available via the Repository Explorer [page 50]: Data Types.
SAP data types are located in the namespace: AP.Common.GDT (namespace: http://sap.com/xi/BASIS/
Global)..
Data Types
The studio uses the following data types:
Example
The second structured data type consists of content and technical attributes. These are hidden in the studio so that
only the content is visible.
Example
Example
Identifier
You use the ID data type to identify a business object or business concept.
element <ID_name> : ID;
The ID data type has up to 60 characters, is not structured and does not contain the Content element. The data
type supports, for example, upper case conversion and alpha conversion. Alpha conversion fills purely numeric user
input like “4711” with leading zeros to allow better sorting in character fields. For example, if alpha conversion is not
used, an alphabetic sorting would lead to results such as: “1”, “10”, “100”, “1000”, “2”, “20”, “200”, and so on.
Boolean
You use the Indicator data type to identify a Boolean element.
element <some_indicator> : Indicator;
Number
You use the following data types to declare numbers, amounts, quantities, and measures:
element <some_number> : NumberValue;
element <some_amount> : Amount;
element <some_quantity> : Quantity;
element <some_measure> : Measure;
● Use the NumberValue data type for integers.
● Use the Amount data type for money. This is a structured data type that consists of a number and a currency
code (for example: 25 EUR).
● Use the Quantity data type for all other quantities (pieces, length, weight, and so on). This is a structured
data type that consists of a number and a code for the measurement unit (for example: 25 KGM represents
25 kilograms).
● Use the Measure data type for measures (pieces, length, weight, and so on). This is a structured data type
that consists of a number and a code for the measurement unit (for example: 25 MTR represents 25 meters).
Code Lists
A code list is a field with a set of predefined values. SAP provides a large number of code lists as data types that you
can use. The data type name ends with the word “Code” to identify it as a code list.
Some common code lists are:
element <priority_code> : PriorityCode;
element <release_status_code> : ReleaseStatusCode;
element <approval_status_code> : ApprovalStatusCode;
You should use an SAP code list where possible. If no appropriate SAP code list is available, you can define your own
code list data type with your own code list in the studio. There are two ways to create code lists:
● Static code lists. For more information, see Create a Code List Data Type [page 406]
● Configurable code lists. For more information, see Configurable Code Lists.
Most SAP code lists are context-independent. Some of the code lists, however, are context-dependent, that is, the
code values differ depending on the context (for example, country).
The following table shows the values of the WorkAgreementAdministrativeCategoryCode code list of two
different countries.
Procedure
1. In the studio, select View Other Windows Repository Explorer .
2. In the Repository Explorer, select Data Types.
3. In the Search data types window, search for the data type you want to use.
The data type details window opens.
4. Under Overview, you find the representation of the data type.
See Also
Repository Explorer [page 50]
Technical Object
A technical object supports the technical infrastructure or IT Service and Application Management (ITSAM) of the
application platform.
Example of technical objects:
● ObjectIdentifierMapping
Transformed Object
A transformed object provides consumer-friendly services across multiple business objects and their already
existing functionality. A transformed object is used if a view on multiple business objects is required in the
representation of a business object (for example, because the using application requires a business object).
Transformed objects are instantiated at run-time and do not have their own persistence – they rely on the persistence
of the underlying business objects.
Example of transformed objects:
● BusinessDocumentFlow
Dependent Object
A dependent business object is used as a reusable part in another business object. It represents a concept that
cannot stand alone from a business point of view. Instances of dependent objects can only occur in the context of
other business objects.
Examples of dependent objects:
● Attachment Folder
● PartnerAddress
● PriceSpecification
● Text Collection
● Workplace Address
Overview
In this example you are going to build a solution to manage the allocation of car parking spaces to employees in the
SAP cloud solution.
● The solution contains one business object – representing a car park – of which there can be multiple instances.
● The car park business object contains a node for "parking spaces" – of which there can be 0 to n.
● Each parking space is assigned to an Employee ID using an Object Value Selector (OVS) – this allows you to
look up the employees within the company.
● The parking space node has an association to the Employee business object – this allows you to retrieve the
employee's first and last name.
Any software coding or code lines/strings (“Code”) provided in this documentation are only examples
and are not intended for use in a productive system environment. The Code is only intended to better
explain and visualize the syntax and phrasing rules for certain SAP coding. SAP does not warrant the
correctness or completeness of the Code provided herein and SAP shall not be liable for errors or damages
cause by use of the Code, except where such damages were caused by SAP with intent or with gross
negligence.
Tasks
6. Add some data to the car park. First you need an ID to identify your car park. You can then add extra
information, such as a name and the number of car spaces.
element CarParkID : ID;
element CarParkName : LANGUAGEINDEPENDENT_LONG_Text;
element CarParkDescription : LANGUAGEINDEPENDENT_LONG_Description;
element Number_of_ParkingSpaces : IntegerValue;
7. Each car park can have multiple car parking spaces. Therefore, you create a node with a multiplicity of [0,n]
to represent the car spaces within each car park. Each node requires an ID.
node ParkingSpace [0,n] {
element ParkingSpaceID : ID;
}
8. Each car space can be assigned to an employee. Therefore, you create an element of type EmployeeID to
record the employee.
element ParkingSpace_AssignedEmployeeID : ID;
9. To make the connection to the existing employees in the company, you create an association to the SAP
business object: Employee. This enables you to use the data from this business object in your screens. To
use the Employee association you first have to import the namespace of the Employee business object.
import AP.FO.BusinessPartner.Global;
association ToEmployee [0,1] to Employee;
10. You can add some additional information for the car space.
element ParkingSpace_Disabled : Indicator;
element Vehicle_RegistrationNumber : LANGUAGEINDEPENDENT_MEDIUM_Text;
element ParkingSpace_Level : NumberValue;
11. Save and activate the business object.
You can find the complete business object code here [page 106].
On the DataModel tab, you can see that the data field and the binding are created automatically.
7. On the Designer, drag the ParkingSpace_AssignedEmployeeID element onto the second column header of
the list pane. Select No when prompted to use backend text and save your changes.
Add a Toolbar
1. Select the list pane by clicking the area to the left of the first column.
2. In the Property Explorer select AdvancedListPaneVariant: ListPaneVariant.
8. Click OK.
If other users have completed this example, there may be multiple work centers with the same title. In
this case, you may want to give the work center a unique title, such as <your name> – Car Park
Manager.
5. Click OK, then Save and Activate and close the UI designer.
From the OWL you can create new car parks or edit the details of existing car parks.
Further Development
Now that you have developed a solution, you can begin to appreciate the power and flexibility of the studio.
There are many enhancements you could make to this solution. Here are just a few ideas:
● Auto-refresh the OWL after creating a new car park. For more information, see here [page 113].
● Validate the car park on save, so that you cannot assign more than the total number of car spaces. An error
message is displayed to the user if they attempt to save a car park that fails this validation rule. For more
information, see here [page 133].
● Add a field to calculate the number of unassigned car spaces. For more information, see here [page 114].
● Create a read-only car park fact sheet. For more information, see here [page 117].
○ Create a View button on the OWL that links to the carpark fact sheet using object-based navigation
(OBN). For more information, see here [page 123].
○ Create a link from the car park fact sheet to the employee fact sheet using object-based navigation
(OBN). For more information, see here [page 127].
● Extend the employee business object to show the Parking Space ID on the employee fact sheet. For more
information, see here [page 131].
● Add a URL mashup to display the car park location on a map. For more information, see here [page 109].
● Add a form to provide a PDF printout of parking spaces and assigned employees.
● Add date/time information to each parking space. You could then add a cost per day or per hour.
businessobject CarPark
// *Further Development*
// declare an error message that is called if the BO fails validation
// raises Message_Car_Park_Full
// *Further Development*
// define an error message to be displayed if the BO fails validation
// message Message_Car_Park_Full text "The car park is full - no spaces
available";
// *Further Development*
// add an element to display how many parking spaces are available
// element Number_of_ParkingSpaces_Available : IntegerValue;
// declare an action to calculate the available car spaces
// action Update_AvailableParkingSpaces;
}
}
import ABSL;
import AP.FO.BusinessPartner.Global;
// Object that will hold the parameters for our employees' query call.
var paramEmployee;
if (bUpdateEmployee) {
// => Our association to the employee needs to be refreshed.
// Reset it first, since the new employee ID might be invalid.
this.ToEmployee.Reset();
// Now look for the details of the given employee:
// ...connect to the BO Employee's query...
qryEmployees = Employee.Identification.QueryByEmployeeAttributes;
// ...populate the parameters collection for the query call...
paramEmployee = qryEmployees.CreateSelectionParams();
// ...saying that the ID of the employee we're looking for must be the ID indicated by
our user...
paramEmployee.Add(qryEmployees.EmployeeID.content, "I", "EQ",
this.ParkingSpace_AssignedEmployeeID);
// ...and execute the query!
resultEmployees = qryEmployees.Execute(paramEmployee);
// Hopefully we've found an employee to the given ID!
foreach (var oneEmployee in resultEmployees) {
// Since we know that we can have only one employee to the ID, we
// take the first result and exit the loop.
}
}
Overview
In this example you are going to add a URL mashup to the quick activity (QA) floorplan. This mashup will display the
car park location on a map, based on the location information entered.
Prerequisites
● You have completed the example: Building a Solution [page 93]
● The mashup has been created in the SAP cloud solution. For more information, see Mashups Quick Guide
[page 475].
Procedure
1. Add an element on the root level of the Car Park business object to record location information.
element CarParkLocation : LANGUAGEINDEPENDENT_Text;
2. Save and activate the business object.
3. Double-click the quick activity floorplan to open it in the UI designer.
4. Click the Update Metadata button to update the BO metadata.
5. Drag the CarParkLocation from the BO Browser / Data Model onto the Designer tab.
6. Change the label for the field to Car Park Location.
7. On the Controller tab, perform the following actions:
a. Add a new outport with the name URL_Mashup_OutPort and the following settings:
● PortType Package = /SAP_BYD_TF/Mashups/globalmashupsupporttypes
● PortType Reference = Address_Info
b. Bind the Address parameter to the CarParkLocation data field.
c. In the Property Explorer, select the QA floorplan from the drop-down list at the top.
d. Click the Anchor field under Extensibility.
The Anchor Modelling dialog box appears.
e. Click the plus sign to create a stable anchor for the floorplan.
Result
The mashup is available from the Web Services menu on the QA. When you click the mashup, the URL is opened with
the value entered into the Car Park Location field as an input parameter.
In this example you are going to configure the car park object work list (OWL) to refresh automatically when a new
car park instance is saved on the quick activity floorplan (QAF).
Prerequisite
You have completed the example: Building a Solution [page 93]
Procedure
1. Open the object work list (OWL) in the UI designer.
2. On the Controller tab, create a new Inport with the name AutoRefresh_Inport.
3. In the Property Explorer, perform the following actions:
● set the property Events OnFire to the default EventHandler – this event handler executes the
query for the OWL
● enter the name AutoRefresh_LocalEvent in the field Navigation Local Event .
4. Save and activate.
5. Open the quick activity floorplan (QAF) in the UI designer.
6. On the Controller tab, create a new Outport with the name AutoRefresh_Outport.
Operations are executed from top to bottom, so you need to save the new business object instance
before running the default query.
Result
When you save a new car park instance on the QAF, then return to the OWL, the list of car parks is updated with the
car park that you created - you do not have to click Go to run the query again.
In this example you are going to add a field that automatically calculates the remaining car parking spaces available,
based on the total number of spaces and the number of spaces assigned to employees. You will use an action to
calculate the field value and you will call this action from a BeforeSave event on the root node. The result is displayed
as a column on the object work list.
Prerequisite
You have completed the example: Building a Solution [page 93]
Procedure
1. In the studio, open the Car Park business object.
2. In the root node, add an element of type IntegerValue with the name AvailableParkingSpaces.
element AvailableParkingSpaces : IntegerValue;
3. In the root node, declare an action called Update_AvailableParkingSpaces.
action Update_AvailableParkingSpaces;
4. Save and activate the business object.
5. Right-click the Car Park business object and select Create Script Files.
6. Create the Action-Update_AvailableParkingSpaces and also the BeforeSave event for the root node.
7. In the action script file, enter the code to calculate the number of available car parking spaces:
this.AvailableParkingSpaces = this.Number_of_ParkingSpaces-
this.ParkingSpace.Count();
8. Save and activate the action.
9. In the BeforeSave event, enter the code to call the Action-Update_AvailableParkingSpaces.
this.Update_AvailableParkingSpaces();
Result
The available parking spaces are now displayed for each car park. The number will be updated if you edit a car park
and change the total number of car spaces, add a new space, or delete a space. You have to click Go on the OWL to
re-run the query and display the current information.
Overview
In this example you are going to create a fact sheet for a car park instance. The fact sheet (FS) provides a read-only
version of the information entered on the quick activity (QA) floorplan. The main steps in creating a fact sheet are
as follows:
It is intended that the fact sheet will be accessed from a View button on the object work list (OWL). For more
information about creating the button and linking to the car park fact sheet, see here [page 123].
Prerequisites
● You have completed the example: Building a Solution [page 93]
Procedure
1. Right-click the CarPark business object and select Create Screens.
2. Select the fact sheet floorplan and click OK.
3. Double-click the fact sheet to open it in the UI designer.
4. Delete the column on the right.
5. Delete the fields Exldr, Exldr1 and Exldr2.
6. Delete the Edit button.
7. Delete the View All button.
8. Select the IdentificationRegion and edit the FloorplanTitle to include the Car Park ID as a variable.
9. Select the SectionGroup and set the property ShowHeader to false.
10. Select the SectionGroup and select the property Contents > Fields to open the Field Collection Editor and re-
order the fields.
11. Select each field and set the property DisplayType to StaticText.
12. Select each field and edit the Label property.
13. Add a flex layout row below the existing row.
14. From the Toolbox, drag-and-drop an AdvancedListPane into the new row.
15. Edit the property PaneHeader to read Car Spaces.
16. Add a column to the table.
17. Drag-and-drop the following fields from the BO Browser/Data Model onto the table columns:
● ParkingSpaceID
● ParkingSpace_AssignedEmployeeID
● GivenName
● FamilyName
18. Rename the column header labels:
● Parking Space ID
● Assigned Employee ID
● First Name
● Last Name
Overview
In this example you are going to create an object-based navigation (OBN) link from the Car Park Manager object
work list (OWL) to the Car Park fact sheet. You have already configured the fact sheet with an inport that allows for
OBN, now you are going to create an OBN outport to connect to this inport.
Prerequisites
● You have completed the example: Building a Solution [page 93].
● You have completed the example: Create a Fact Sheet for the Car Park [page 117].
Overview
In this example you are going to create an object-based navigation (OBN) link from the Employee ID field on the Car
Park fact sheet to the Employee's fact sheet.
Prerequisites
● You have completed the example: Building a Solution [page 93].
● You have completed the example: Create a Fact Sheet for the Car Park [page 117].
● You have completed the example: Create an OBN to the Car Park Fact Sheet [page 123].
Procedure
1. Open the Car Park fact sheet in the UI designer.
2. On the DataModel tab, add a new data field to the DataList.
3. Select the new data field, select the BO element SAP_ToEmployee and click the Bind button.
19. Click the Designer tab and select the Assigned Employee ID column.
20. In the Property Explorer set the Events > OnClick field to Open_Employee_Factsheet_Handler.
Overview
In this exercise you will extend the Employee business object and then enhance the Employee fact sheet to display
the car parking space assigned to the employee. This involves the following steps:
● create business object extension for the Employee business object
● add an extension field to the business object extension
● enhance the Employee fact sheet
● add the extension field to the fact sheet
● edit the AfterModify script to update the extension field
Prerequisites
● You have completed the example: Building a Solution [page 93]
Procedure
1. In the Solution Explorer, right-click your project and select Add New Item .
2. Select the Business Object Extension template, enter the name Employee_BO_Extension, and click Add.
[Tooltip ("If the employee has been assigned a car parking space, the ID is
displayed here.")]
[Label ("Car Parking Space")]
element Assigned_Car_Parking_Space_ID : Text;
}
5. Save and activate the XBO.
6. In the Solution Explorer, right-click the Employee_BO_Extension and select Enhance Screen.
7. Select the floorplan employeecontactdataqafeco and click OK.
The floorplan is opened in the UI designer.
8. On the Designer tab, select the Basic Information section group.
9. In the Extensibility Explorer, click the Add Extension Field to Section Group button.
10. In the Add Extension Field dialog box, select the extension field to add to the floorplan and click Apply.
Remember to select the Is Display Only check box so that the field will appear as static text.
11. In the Solution Explorer, open the Event-AfterModify script for the Parking Space node.
12. Add the following code at the end of the script file, just before the closing bracket:
foreach (var common in employee.Common)
{common.Assigned_Car_Parking_Space_ID = this.ParkingSpaceID;}
When a car space is modified, this script will update the extension field
(Assigned_Car_Parking_Space_ID) with the ID of the Parking Space.
13. Save and activate the script file.
Result
For employee's that have an assigned car parking space, the ID of the parking space is displayed on the employee's
fact sheet.
Overview
In this example you are going to create a validation script that will check if there are any car spaces available. The
script checks if the number of parking spaces assigned is greater than the total number of parking spaces. If there
are no available spaces, an error message is displayed and you will not be able to save your changes to the car park.
Prerequisites
● You have completed the example: Building a Solution [page 93]
Procedure
1. Edit the car park business object to declare the message and specify the message text.
a. Declare the message after the business object name:
businessobject CarPark_Manager raises Message_Car_Park_Full {
b. Enter the message text at the root node level:
Result
When you edit a car park and create more car spaces than the total number of car spaces, an error message is
displayed and you will not be able to save your changes.
Overview
The localization toolkit is a set of development tools and instructions that enable SAP partners to extend and adapt
the capabilities of the SAP Business ByDesign solution to provide a locally-compliant solution for customers in
countries where a fully-localized SAP country version is not available.
The toolkit enables customers and subsidiaries to implement business processes for a number of localization topics
in these countries, without the need for the implementation of a fully-localized country version. In this way, it is only
necessary to implement the legal and local regulations relevant particular to the business processes required by the
customer or subsidiary rather than all country requirements.
The toolkit comprises tools integrated in the SAP Business ByDesign solution, implemented using the SAP Cloud
Applications Studio, or available as extensibility features such as extension fields. Using the toolkit, you can extend
and adapt existing capabilities, for example, you can implement additional business configuration, such as
accounting principles and chart of accounts for a new country, create tax content for non-localized countries, extend
existing fields, create new reports, or implement different form templates for output documents.
You can refer to SAP Cloud Applications Studio Deployment & Landscape Basics to better understand the
basics of the landscape and the deployment of solution using SAP Cloud Applications Studio.
Availability
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
Overview
The studio supports the full end-to-end lifecycle management of customer-specific solutions. This includes
developing, testing, and deploying your solution as well as creating patches to deliver updates to your customer
There are different scenarios in which you may want to develop a customer-specific solution:
● Developing on a Customer's Test Tenant
You can develop a customer-specific solution on the customer's test tenant. The finalized solution is then
uploaded and activated on the customer's production tenant. For more information, see Lifecycle
Management on a Test Tenant [page 143].
● Developing on Your Development Tenant
The following guidelines and restrictions apply to the development of customer-specific solutions in general:
● We recommend that you develop only one solution per customer.
● The tenant where you develop your solution and the tenant where you upload your solution must be
on the same release.
Development Customer's
Activity Tenant Test Tenant For information, see ...
Create and Maintain Solution With BC Sets Using Yes No Create a BC Set Using an SAP BCO
SAP BCOs [page 332]
Customer-specific solutions for the SAP cloud solution are installed in a multi-tenant environment. The solution
provider needs to ensure that all solutions are of the highest quality and have the lowest possible Total Cost of
Ownership (TCO).
SAP requests you to conform to the criteria described in this document in order to ensure the quality of your solution.
Functional Correctness
You must ensure that your solution has been tested and documentation is provided for all test cases.
Response Time
Where the solution extends an existing user interface, a performance degradation of maximum 10% is acceptable
even if the response time exceeds the target value.
Simple Transactions
● On average end-to-end < 1 s
● 95% end-to-end < 1.5 s
Examples of simple transactions are: Object Work Lists, purchase request, leave request.
Complex Transactions
The end-user response time for complex transactions must be:
● On average end-to-end < 1.7 s
● 95% end-to-end < 2.5 s
Examples of complex transactions are: integrated transactions like order, but also simple analytical content and fact
sheets.
Complex Tasks
To enhance the end-user experience for complex tasks, the following must be true:
● Progress indicator available
● Background processing possible
Examples of complex tasks are: analytical content, planning, multilevel bill of material explosion.
Security
You must implement measures to ensure the security of your solution. Furthermore, your solution must not impact
the security of the SAP cloud solution.
Code Scan
Security code scans are an important measure to minimize security risks. For customer-specific solutions, no code
scans are performed by default. SAP reserves the right to perform code scans of customer-specific solutions in order
to detect possible security risks.
If your solution functionality runs on an external system, you must conduct a security code scan or assign a third
party to conduct a security code scan of the external component. SAP reserves the right to request proof of a
successful code scan.
As there is no default security code scan for customer-specific solutions, you must take action to avoid the top 10
security risks as defined by the Open Web Application Security Project:
● http://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project
Useful guidelines and hints on secure programming can be found in the SAP NetWeaver Developer's Guide:
http://help.sap.com/saphelp_nw2004s/helpdata/en/58/4d767ed850443c891ad27208789f56/
frameset.htm
Backdoors
The solution must be free of intentionally hidden and non-documented features that circumvent security measures
(backdoors).
Vulnerabilities
The solution must prevent typical vulnerabilities such as:
● Missing input validation
● Execution of commands that include not-validated user input
● Parameter tampering
● Cross-site request forgery
● Information leaks (for example, in error messages or hidden HTML fields)
Documentation
Documentation must be provided to describe the following:
● Authorization and roles
● Communication security (including port information)
● User management and authentication
● Secure configuration of the service
● Accessing the security logs
● Configuring authentication policies (for example, behavior after a defined number of failed login attempts)
● Restricting access to specific IP addresses
You must provide customers with updates to the security documentation (for example, security bulletins) when
applicable.
Authorizations
The solution must provide the capability to separate the authorizations (roles) for different types of users (that is,
administrative and non-administrative users). Users must only have the permissions that are required for their work
Data Transfer
The transfer of data to other services or service providers must be configurable and documented.
Testing
Details must be provided of any security-related test activities performed.
Security Settings
Security settings and recommendations must be documented and available to the customer.
Supportability
You must provide for the maintenance and support of your partner solution throughout its entire product lifecycle.
Overview
If the customer has already gone live with the SAP solution, you can develop and test your customer-specific solution
on the customer's test tenant. In this case, development is done on the test tenant and the finalized solution is
uploaded and activated on the customer's production tenant. This document describes the after go live scenario.
For information about how to request a test system, see the documentation of the SAP Solution.
The following graphic gives a schematic overview of the lifecycle management process. The process is explained in
detail below.
Prerequisites
In the SAP cloud solution, your customer has set up the following users for you:
● A business user for testing purposes in the SAP cloud solution on the test tenant.
Process Flow
1. In the studio, you log on to the customer's test tenant and create a solution (Studio Administrator).
2. You develop your solution including the necessary business configuration content (Developer).
You can create BC Sets using SAP BCOs only on your development tenant.
If you have defined BAC elements for your solution, a dialog box opens when you use the Deploy
Business Configuration function. You have to select one of the following options:
● Deploy all business configuration content for your solution
● Deploy only the business configuration content for your solution that is assigned to the
business options you have selected in the business adaptation catalog
This allows you to test both partial and complete activation of your business configuration
content in the development environment.
You then log on to the SAP cloud solution with your business user and perform your tests.
● In the SAP cloud solution, you scope your solution manually (Business User).
To do this, you log on to the SAP cloud solution with your business user. In the Business
Configuration work center, you perform scoping for the business option that you created for your
solution and for the required standard functions of the SAP cloud solution.
You then perform your tests.
4. You assemble and download the solution (Studio Administrator).
After you have performed your tests successfully, in the studio, you log on to the test tenant to assemble and
download your solution. For more information, see the Implementation Manager Quick Guide [page 153].
If you are working on a preproduction tenant and you have used the Deploy Business Configuration
function in the previous step, the system now removes the business configuration content from the
SAP cloud solution.
If you are developing your solution on the customer's preproduction tenant, then you do not need to
upload the solution. Instead, after assembling the solution, go to step 7.
In the studio, you log on to the production tenant and upload the solution. .
6. You activate the solution on the production tenant (Studio Administrator).
After the solution has been successfully uploaded, you activate it on the customer's production tenant.
7. The customer activates your solution by selecting the relevant business option in Scoping.
Follow-On Activities
After the solution has been activated on the customer's production tenant, you can only make changes or corrections
to it by creating a patch. A patch follows the same lifecycle as the original solution, with the exception that the business
option does not need to be selected again.
Overview
If you need to make changes or corrections to a customer-specific solution after you have assembled it, you can
create a patch.
For more information, see Patches [page 166].
Prerequisites
In the studio, you have logged on to the customer's test tenant where you created the original solution and you have
opened this solution.
Only users with the Studio Administrator role can create patches.
Procedure
1. On the Implementation Manager toolbar, click the Create Patch button.
The system creates a patch solution and copies all files in your solution to a new namespace within the patch
solution. The namespace is generated automatically and cannot be changed.
The patch solution is created in the background and this process may take some time. Click Refresh in the
Implementation Manager tool window to update the solution status.
You can always access the patch solution from the original solution by opening the Implementation
Manager and, on the Current Version tab, clicking the Open button next to the Patch Solution field.
You can also navigate to the original solution from the patch solution in the same way.
3. In the patch solution, make your changes. Then activate the patch solution.
4. You can test specific solution content in the studio using the preview function. To test your patch solution in
the SAP cloud solution, you have to enable the solution on the test tenant as follows:
a. In the Implementation Manager, click the Enable button next to the Solution Enablement for Business
User in Cloud Solution field.
The “Disabled” changes to an “Enabled” and the patch solution is enabled on the test tenant instead
of the original solution. For more information, see Enable and Disable Your Solution in the SAP Cloud
Solution [page 167].
If a BC change project is open on the tenant before you enable the patch solution on the test
tenant, you will not be able to merge the change project unless you disable the patch solution.
For more information, see What You Need to Consider When a Change Project Is on the Same
Test Tenant [page 146].
b. In the SAP cloud solution, log on to the test tenant with your business user.
You will be able to see your patch solution in place of the original solution.
c. Complete your testing.
5. On the Implementation Manager toolbar, click the Assemble and Download button.
The system assembles the patch using the namespace of the original solution and downloads it to a .zip file.
This allows you to copy your corrections back to the original solution.
6. In the studio, log on to the production tenant on which the original solution is active, and click the Upload
button on the Implementation Manager toolbar. Select the .zip file containing the patch.
The system uploads the .zip file with your corrections and checks for any compatibility issues. The solution
has the status In Deployment and the solution version number is updated.
7. In the Implementation Manager, select the solution and click Activate.
Before activating the solution, we recommend that you inform the customer of any functions that may
be affected by the update.
If you are developing customer-specific solutions on your customer's test tenant and your customer uses this tenant
for change projects at the same time, both of you need to consider the following information. Otherwise your
customer won't be able to merge the change project to the production tenant.
This information is not relevant when your customer has requested a separate test tenant that is only used for the
change project.
Check this table to find out what needs to be done before the change project can be merged to the production tenant.
Answer the following questions and make a decision:
● Did a solution exist on the production tenant before the change project was created?
● Do you intend to create a solution or patch solution on the test tenant after the change project has been
created?
No, there was no solution. Yes, I'll create a solution. Before the change project can be merged to the production
tenant, you need to do one of the following:
● Complete your solution, assemble and download it,
and upload the solution to the production tenant.
● If you don't want to upload the solution to the
production tenant, disable it for the business user in
the test tenant. For more information, see Enable or
Disable Your Solution in the SAP Cloud Solution
[page 167].
Yes, a solution existed. Yes, I'll create a patch Before the change project can be merged to the production
solution. I'll also enable it for tenant, you need to do the following:
the business user to allow the ● Disable the patch solution for the business user in the
patch to be tested. test tenant.
● Make sure that the original solution is enabled.
Overview
You can develop a customer-specific solution on your development tenant and after having tested, assembled, and
downloaded the solution, you can upload it to the customer's tenant.
The following graphic gives a schematic overview of the lifecycle management process. The process is explained in
detail below.
Process Flow
1. In the studio, you check the current customer assignment and make sure that the ID of the customer for
whom you want to create and develop the solution is displayed (Studio Administrator).
For more information, see Switch a Customer Assignment [page 151].
2. You create a solution (Studio Administrator).
3. You develop your solution including the necessary business configuration content (Developer).
4. You test the solution (Business User).
You can test specific solution content in the studio using the preview function.
You can also test your solution in the SAP cloud solution for the tenant on which you created the solution. As
a prerequisite, you must scope your solution. You have the following options:
● In the studio, you trigger deployment of your business configuration content (Studio Administrator).
This allows you to test both partial and complete activation of your business configuration
content in the development environment.
You then log on to the SAP cloud solution with your business user and perform your tests.
● In the SAP cloud solution, you scope your solution manually (Business User).
To do this, you log on to the SAP cloud solution with your business user. In the Business
Configuration work center, you perform scoping for the business option that you created for your
solution and for the required standard functions of the SAP cloud solution.
You then perform your tests.
5. You assemble and download the solution (Studio Administrator).
For more information, see the Implementation Manager Quick Guide [page 153].
6. After you have performed a tests successfully, you log on to the customer's production tenant in the studio
to upload the solution. You activate the solution on the production tenant (Studio Administrator).
Before activating the solution, we recommend that you inform the customer of any functions that may
be affected by the update. For example, if the administrator at the customer has adapted an analytical
report, this may be affected by any changes you have made to the same report.
7. In the SAP cloud solution, the customer activates a solution by selecting the relevant business option in
scoping.
Follow-On Activities
After a solution has been activated on the customer's tenant, you can only make changes or corrections to it by
creating a patch. A patch follows the same lifecycle as the original solution, with the exception that the business
option does not need to be selected again. For more information, see Create a Patch on Your Development Tenant
[page 149].
Overview
If you need to make changes or corrections to a customer-specific solution after you have assembled it, you can
create a patch.
When you create a patch of a solution on your development tenant, the patch is created in the same solution and
namespace but with a different version number. For more information, see Patches [page 166].
Prerequisites
In the studio, you have logged on to your development tenant where you created the original solution and you have
opened this solution.
Procedure
1. On the Implementation Manager toolbar, click the Create Patch button.
The system creates a patch in the same solution and sets the solution status to In Development. The version
number of the solution is updated to the next higher number.
2. Your can now implement the required changes.
When you have finished making your changes, you can activate and then test your solution.
3. In the Solution Explorer, right-click your solution and choose Activate.
4. To test your solution, you can do one of the following:
● In the studio, trigger deployment of your business configuration content. To do this, in the Solution
Explorer, right-click the Business Configuration node in your solution and select Deploy Business
Configuration.
If you have defined BAC elements for your solution, a dialog box opens when you use the Deploy
Business Configuration function. You have to select one of the following options:
● Deploy all business configuration content for your solution
● Deploy only the business configuration content for your solution that is assigned to the
business options you have selected in the business adaptation catalog
This allows you to test both partial and complete activation of your business configuration
content in the development environment.
You then you log on to the SAP cloud solution with your business user and perform your tests.
● In the SAP cloud solution, you scope your solution manually.
To do this, you log on to the SAP cloud solution with your business user. In the Business
Configuration work center, you perform scoping for the business option you created for your solution
and for the required standard functions of the SAP cloud solution.
You then perform your tests.
When you have finished testing, you can download your solution and then upload it to the customer's tenant.
5. In the studio, in the Solution Explorer, right-click the project of your solution and select Check In All Files.
6. On the Implementation Manager toolbar, click the Assemble and Download button.
The system assembles the patch and downloads it to a .zip file.
7. Log off from your development tenant and then log on to the customer's tenant to which you have uploaded
the patch.
8. In the Implementation Manager, click the Upload button. Select the .zip file containing the patch.
The system uploads the .zip file with your corrections and checks for any compatibility issues.
9. In the Implementation Manager, click the Activate button.
The patch is activated in the cloud solution from SAP.
Overview
If you are developing customer-specific solutions on your development tenant, you can create solutions for more
than one customer. For example, if you are working on a solution for customer A, you can save your solution and
then switch to work on the solution for customer B. For this, you need to switch the customer assignment. Afterwards,
in the My Solutions tool window in the studio, only the solutions of customer B are listed and you can create new
solutions only for this specific customer.
Prerequisites
In the studio, you are logged on to your development tenant.
If your are logged on to your development tenant with a user that has the Developer role, you can only switch
a customer assignment. However, if you want to create a new customer assignment, you need to log on with
a user that has the Studio Administrator role.
Procedure
1. Choose Administration Switch Customer .
2. In the Switch Customer dialog box, check the details of the current customer assignment. Each solution that
you create, will be assigned to this customer. If you want to switch the assignment, you can do one of the
following:
● To switch to an existing customer assignment, select a customer from the list of existing customers.
● To create a new customer assignment, click Create Customer.
a. In the Create Customer dialog box, enter a customer name and the customer ID that SAP has
provided to the customer.
b. Click OK.
c. In the Switch Customer dialog box, choose this new customer from the list.
3. In the Switch Customer dialog box, click OK.
The system logs off and you need to log on again to your development tenant. In the My Solutions window,
only the solutions of the current customer are listed. If you have not yet created any solutions for this
customer, the My Solutions window is empty.
6.6 Administration
Users with the Studio Administrator role can use the Administration toolbar to access a number of administrative
tasks, such as creating and deleting customer-specific solutions or solution templates and managing user sessions.
You can also use the functions for the studio administrator in the Administration menu.
Solution Templates
You can create templates containing reusable items and upload these items to customer-specific solutions.
For more information, see Solution Templates [page 162] and Solution Templates Quick Guide [page 160].
Patches
If you need to make changes or corrections to a customer-specific solution after you have assembled it, you can
create a patch.
For more information, see Patches [page 166].
Maintenance Mode
A customer-specific solution is in maintenance mode, if it has been assembled and downloaded; the solution status
then is Assembled. You can make changes to the solution in a patch; however, you can only make restricted changes
to certain content types. These change and delete restrictions ensure that you do not make changes to a solution
that could lead to loss of data or create inconsistencies or errors on a customer's production tenant.
For more information, see Maintenance Mode [page 170].
Tasks
Create a Solution
You can design and develop customer-specific solutions to enhance the SAP standard cloud solution for a specific
customer. In the studio, you can create a solution in which all items that you develop or changes that you make to
existing entities are stored.
For more information, see Create a Customer-Specific Solution [page 165].
Create a Patch
If you need to make changes or corrections to a customer-specific solution after you have assembled it, you can
create a patch. Depending on the tenant on which you are working, the process of creating a patch is different:
● Create a Patch on a Customer's Tenant [page 145]
● Deletion of locks may result in the loss of changes made by the locking user, and should only be carried
out when absolutely necessary.
● Locks created by the UI designer can only be deleted by the user that created the lock; an administrator
cannot delete these locks.
Delete a Solution
1. Log on to the repository and open the solution.
2. On the Administration toolbar, click Delete Solution and confirm that you want to delete the solution.
You cannot delete a solution on a production tenant. We recommend you switch the solution off by deselecting
it in Scoping. Then report an incident to request assistance from SAP.
Further Tasks
You use the Implementation Manager to manage the lifecycle of customer-specific solutions. The Implementation
Manager enables you, for example, to assemble and download a solution, upload and activate a solution, and create
a patch for a solution. If you are not able to activate a solution, you can carry out different troubleshooting activities
in the Implementation Manager.
For more information, see Implementation Manager Quick Guide [page 153].
You use the Implementation Manager to manage the lifecycle of customer-specific solutions. The Implementation
Manager enables you, for example, to assemble and download a solution, upload and activate a solution, and create
a patch for a solution. If you are not able to activate a solution, you can carry out different troubleshooting activities
in the Implementation Manager.
If the Implementation Manager is not visible in the studio, you can access it as follows:
● To enable the Implementation Manager tool window, click View Implementation Manager .
The tool window provides a view of the solution status and implementation log at each stage in the process.
● To enable the Implementation Manager toolbar, click View Toolbars Implementation Manager .
The toolbar provides buttons that allow you to assemble, upload, and create a patch for your solution.
Lifecycle Management
The studio supports the full end-to-end lifecycle management of customer-specific solutions. This includes
developing, testing, and deploying your solution as well as creating patches to deliver updates to your customer
For more information, see Lifecycle Management of Customer-Specific Solutions [page 138].
Patches
If you need to make changes or corrections to a customer-specific solution after you have assembled it, you can
create a patch.
For more information, see Patches [page 166].
Maintenance Mode
A customer-specific solution is in maintenance mode if it has been assembled and downloaded, that is, the solution
status is Assembled. You can make changes to the solution in a patch; however, you can only make restricted
changes to certain content types. These change and delete restrictions ensure that you do not make changes to a
solution that could lead to loss of data or create inconsistencies or errors on a customer's production tenant.
For more information, see Maintenance Mode [page 170].
Solution Templates
You can create templates containing reusable items and upload these items to customer-specific solutions.
For more information, see Solution Templates [page 162] and Solution Templates Quick Guide [page 160].
Tasks
The activate and assemble functions run as background jobs, and you can continue to work on
other solutions in the system. The download activity, however, is a front-end process.
Depending on the status of the solution, only the relevant action will be available for use. The
following actions will be activated and available for use for:
● Activate: All solutions with In Development status
● Assemble: All solutions that have been successfully activated
● Download: All solutions that have been successfully assembled
c. Click on Activate to activate the solution. The system activates the solution and makes it ready for
Assembly. Once completed, the system sends you an auto-generated e-mail stating the success or
failure of the activation. You can view the details for failed actions by logging on to the studio, and selecting
the Version History tab in the Implementation Manager.
d. Click on Assembly, and the system checks the solution for consistency and then assembles it. Again,
you will receive an auto-generated e-mail with the details of the success or failure of the assembly
process. You can view the details for failed actions by logging on to the studio, and selecting the
Version History tab in the Implementation Manager.
e. After the assembly is completed, click on Download to download the zip file. Enter a file name to save
the template as a .zip file locally.
After the solution has been assembled and downloaded, the status changes to Assembled. The solution is
now locked for further development and any changes can only be made by creating a patch.
During the upload process, the status of the solution is In Deployment. If no errors or warnings are found
during upload, you can activate the solution.
You can restart the process by navigating to the SAP Cloud Applications Studio Implementation Manager
Tenant Status Automated Distribution . You can also check the Information Area for more details on the status
of the distribution of the tenants.
The distribution of solutions can be unsuccessful due to two reasons as shown below:
1. Both the upload and activation of the solution had failed: In this case, you must trigger a restart of the upload
of the solution by clicking on Automated Distribution . Both the upload and activation of the solution is
automated.
2. Only the activation of the solution has failed: In this case, you must login to the relevant tenant and manually
activate the solution.
For both the cases, you must check the version history logs for the respective tenants.
You cannot merge the content of the copy back to the original solution. After having achieved a satisfactory
development status of the copy, you need to repeat all changes in the original solution that you made in the
copy.
1. In the studio, log on to the tenant where you created the solution and open the solution.
2. In the Solution Explorer, right-click the solution and select Activate.
3. In the Solution Explorer, right-click the project and select Check In All Files.
4. In the Implementation Manager, click the Assemble and Download button and then Download a Copy .
5. Enter a description for the copy and save the .zip file locally.
The status of the original solution remains In Development.
6. Optional: If you want to upload the copy to a different tenant, log on to this tenant.
Troubleshooting
If you were not able to activate the solution or patch, try the following:
1. In the Implementation Manager, click Show Log File to display updated log information on the Version
History tab.
If your solution or patch did not contain any errors, click the Activate button to activate the solution or patch
again.
2. If this does not work, click the Reactivate button in the Implementation Manager to generate all the objects in
the solution or patch again.
3. If reactivation fails, create an incident. For more information, see Report an Incident [page 565].
Further Tasks
Users with the Studio Administrator role can use the Administration toolbar to access a number of administrative
tasks, such as creating and deleting customer-specific solutions or solution templates and managing user sessions.
For more information, see Administration Quick Guide [page 151].
If you open a solution or solution template that has been created in a studio version older than 1302, the Migrate
Solution button is displayed in the Solution Explorer.
Business Background
The reason for this is that a new scripting language compiler has been introduced. It offers the following advantages:
● Improves performance, for example, reduces activation time
● Use functions developed for new compiler
● Enables use of SAP HANA
Solution or solution template created in this studio version What you need to do to benefit from the new compiler
SAP Business ByDesign Studio 4.0 Migrate your solution or solution template
SDK for SAP's On-Demand Solutions 1.0 Migrate your solution or solution template
SDK for SAP's On-Demand Solutions 1.5 (1211) Migration not necessary
SAP Cloud Applications Studio August 2013 (1308) Migration not necessary
To check the compiler version of your solution, open the Properties window. The Compiler Version field
typically contains two numbers separated by a slash, for example, 1302 / 1211. The first number indicates
the compiler version of the .absl files. The number after the slash indicates the compiler version of
the .bo and .xbo files.
The Migrate Solution option is also available in the Administration menu. It is grayed if your solution
already uses the current scripting language compiler.
If the solution has errors, these are displayed in the Error List. Resolve the errors and click the
Migration Solution button again.
● If the migration was not successful, you cannot start the migration process again. Please create
an incident instead and ask SAP Support for help.
● Once the solution has been migrated, the migration cannot be reverted.
You only need to replace these data types, if you have used them in AlternativeKey elements.
Data types that you need to replace Data types that you can use instead
BASIS.Global:Identifier AP.PDI.bo:EXTENDED_ID
AP.Common.GDT:Identifier AP.PDI.bo:EXTENDED_ID
BASIS.Global:Name AP.Common.GDT:EXTENDED_Name
AP.Common.GDT:Name AP.Common.GDT:EXTENDED_Name
AP.Common.GDT:LANGUAGEINDEPENDENT_Name AP.Common.GDT:LANGUAGEINDEPENDENT_EXTENDED_Name
AP.Common.GDT:Description AP.Common.GDT:LONG_Description
AP.Common.GDT:Note AP.Common.GDT:LONG_Description
AP.Common.GDT:Text AP.Common.GDT:LONG_Description
AP.Common.GDT:LANGUAGEINDEPENDENT_Text AP.Common.GDT:LANGUAGEINDEPENDENT_EXTENDED_Text
However, you can resolve this ambiguity by adding the name of the Root node or the name of the business
object to the association target. Here is an example:
Wrong: The Target identifier following the to keyword of the FirstTarget association is not
unique.
Correct: Specify whether the association points to the
● root node of the other Target business object (association FirstTarget to
Target.Root)
or to the
● Target subnode of the same business object (association FirstTarget to
Source.Target)
You can create templates containing reusable items and upload these items to customer-specific solutions.
For more information, see Solution Templates [page 162].
Tasks
You cannot merge the content of the copy back to the source template. After having achieved a satisfactory
development status of the copy, you need to repeat all changes in the original that you made in the copy.
1. In the studio, log on to the tenant where you created the template and open it.
2. In the Implementation Manager, click the Assemble and Download button and then Download a Copy .
3. Enter a description for the copy and save the .zip file locally.
The status of the original remains In Development.
4. Optional: If you want to upload the copy to a different tenant, log on to this tenant.
5. In the Implementation Manager, click the Upload button and select the.zip file of the copy.
6. Agree to the terms of the upload disclaimer and click Continue.
The copy is uploaded and opened. The status of the template is In Development and you can continue
developing.
Please note that the solution template and the solution, into which you import the items of the solution
template, must have been created for the same deployment unit. However, if you have created your
solution template in the Foundation deployment unit, the solution can have any deployment unit.
3. In the Implementation Manager, click the Import Solution Template button and select the.zip file of the
template that you have downloaded before.
The items of the template are added to the solution.
Make sure that your solution works well with the replaced or added items, for example, check if the associations are
still valid. When you have finalized your solution, activate it.
Please make sure that the SAP cloud solution from which you have downloaded the solution template matches
the SAP cloud solution to which you want to upload the solution template.
With a solution template, you can organize development content that you want to reuse for customer-specific
solutions. Solution templates enable you to easily start the development of customer-specific solutions, for example,
for a specific industry.
You can import a solution template into the studio version in which it has been created and into the two subsequent
versions, for example:
SAP Solutions OnDemand Studio 1302 SAP Solutions OnDemand Studio 1305 SAP Cloud Applications Studio 1308
(February 2013) (May 2013) (August 2013)
When you import a template into a solution, all items of the template are added to the solution. If an item in the
solution has the same name as in the template, the system replaces the item in the solution with that of the template.
Please note the following exceptions:
● If an item with the same name exists in another folder of the solution, the system doesn't import the item.
● If the template contains a BAC element and the solution already has a BAC element, the system doesn't import
the BAC element of the template.
Overview
You can create templates containing reusable items and import these items into customer-specific solutions. This
allows you to easily start the development of customer-specific solutions by reusing common development content,
for example, for a specific industry.
For more information, see Solution Template [page 162].
Prerequisites
You are logged on to the repository of your development tenant or to the repository of your customer's test tenant
with a user that has the studio administrator role.
Procedure
1. On the Administration toolbar, click Create Solution ( ).
The Create Solution dialog box opens.
2. Select the Solution Template type.
3. Enter the customer and a description for the solution template.
4. Select the deployment unit in which you want to create your template and click OK.
For more information about deployment units, see Deployment Unit (Business Object) [page 187].
5. Enter your contact information and click OK.
Your solution template is created.
If you want to change the partner contact information, please do the following: In the My Solutions
window, right-click the solution and select Solution Properties. The Solution Properties dialog opens,
where you can change the contact information. Click OK to save your changes.
Result
You have created a solution template.
How your solution template is displayed
● In the My Solutions window, the new solution template is displayed as follows: [solution template
description] [solution template name].
● In the Solution Explorer, the solution template is opened and displayed as follows: [solution template
description] (In Development).
You can design and develop customer-specific solutions to enhance SAP's standard cloud solution for a specific
customer. In the studio, you can create a solution in which all items that you develop or changes that you make to
existing entities are stored.
Depending on the tenant that you are working on, the following applies:
● Customer's Tenant
You create your solution for this specific customer on the customer's test tenant.
● Development Tenant
On your development tenant you can develop solutions for different customers. Each time you create a
solution, ensure that this solution is assigned to the correct customer ID. For more information, see Switch
a Customer Assignment [page 151].
To create customer-specific solutions, you must be logged on to the studio with a user that has the Studio
Administrator role.
Procedure
1. Optional: If you are developing on your development tenant, in the Administration menu, choose Switch
Customer.
Check that the ID of the customer for which you want to develop the solution is displayed. If not, select a
different customer or create a new customer assignment.
If you are logged on to your development tenant and you are creating a new solution, the system
automatically creates the solution for the customer that is currently displayed in the Switch
Customer dialog box. Be aware, that only a solution with the correct customer ID can be uploaded to
the corresponding tenant of your customer.
You can also use this function to create a solution template. For more information, see Create a
Solution Template [page 164].
Result
You have created a solution.
How your solution is displayed
● In the My Solutions window, the new solution is displayed as follows: [solution description] [solution name].
● In the Solution Explorer, the solution is opened and displayed as follows: [solution description] (In
Development).
See Also
Mobile Solutions [page 670]
6.7.5 Patches
Overview
A patch is needed if you want to make changes or corrections to a customer-specific solution after it has been
assembled. The customer-specific solution is then in maintenance mode and you can only make restricted changes
for certain content types. For more information, see Maintenance Mode [page 170].
Only users with the Studio Administrator role can create patches.
Patch Types
Depending on the type of customer's tenant where you are developing the creation and handling of a patch works
differently:
● Creating a Patch on a Customer's Test Tenant
When you create a patch of a solution on a customer's test tenant, the system creates a copy of your solution
in a new namespace allowing you to make and test your changes without disrupting the original solution. This
patch type is called a patch solution. When you want to test your patch solution in the test tenant, you first
need to use the Implementation Manager in the studio to enable the patch solution instead of the original
solution in the test tenant.
When you assemble the patch solution, the patch is copied back to the namespace of the original solution.
The patch solution is used for all future updates to the original solution. Any changes you need to make in the
future can be made by creating a new patch again. To do this, open the existing patch solution in the
When you create a new solution on your tenant, this solution is automatically enabled for your business user in the
SAP cloud solution. This means that your solution is visible in the SAP cloud solution when you log on with your
business user on this tenant.
Enable or Disable Your Solution on Your Development Tenant
When you are developing several solutions in parallel on your development tenant, you may want to disable a solution
for your business user in the SAP cloud solution, for example, if this solution affects the solution that you want to
test. To do this, open the solution you want to disable and in the Implementation Manager, click Disable.
Enable or Disable Your Solution on the Customer's Test Tenant
When you create a patch for your solution, the original solution is still enabled for your business user. To test your
patch solution, you need to enable it instead of the original solution. This means that the system automatically
removes the scoping of the original solution and disables the original solution. After logging on to the SAP cloud
solution, you will have to scope your patch solution before you can test it.
The title of this area of the screen shows which solution is currently open, the original solution or the patch
solution (if a patch solution exists). In this example, the original solution is open.
2. In the Solution Enablement for Business Users in Cloud Solution field, click Enable or Disable.
You use the Enable function to make either the original solution or the patch solution visible in the SAP cloud
solution. In the example, if you open the patch solution first and then use the Enable function, you make the
patch solution visible and the original solution is automatically removed and disabled.
You use the Disable function for special scenarios, for example, if your customer has opened a change project
on the test tenant before you created the patch solution. If you want to know more, see What You Need to
Consider When a Change Project Is on the Same Test Tenant [page 146].
If a solution template is being developed on the customer’s test tenant or has been uploaded to this
tenant, it is also automatically enabled. If there is a change project on the same tenant, you to need to
disable the solution template before the change project can be merged to the production tenant.
Check this table to see what happens when you enable or disable a solution:
Enable the patch solution in the SAP The system removes the scoping of the After logging on to the SAP
cloud solution on the test tenant. original solution in the SAP cloud solution and cloud solution with your
disables the original solution automatically. business user, you need to
scope your patch solution
manually.
Enable the original solution in the SAP The system removes the scoping of the patch After logging on to the SAP
cloud solution on the test tenant. solution in the SAP cloud solution and disables cloud solution with your
the patch solution automatically. business user, you need to
scope your original solution
manually.
Disable the patch solution in the SAP The system removes the scoping of the patch
cloud solution on the test tenant. solution in the SAP cloud solution.
Disable the original solution in the SAP The system removes the scoping of the
cloud solution on the test tenant. original solution in the SAP cloud solution.
If you need to disable both the original solution and the patch solution, first disable the solution that
is open. Then open the other solution and disable it. It doesn't matter which solution is open first.
Overview
Test tenants are upgraded two weeks before the production tenants are upgraded, and test tenants are on a higher
release for two weeks. During this period, if a bug is detected in the production tenant from a solution, there are no
mechanisms to create and deploy a patch from the test to the production tenant, as it is not allowed to deploy a
patch from a higher to a lower release. With this feature you can change the .absl files directly in the production or
pre-production tenants to overcome the reported issues.
Prerequisites
● The work center view Production Fix Authorization is already assigned to the Studio developer.
● The solution is scoped with the Deployed status.
Please take into account the following points before you make any changes:
● Changes are allowed only to .absl files. No other content is supported.
● You cannot create or delete already created .absl files.
● You cannot change .absl files belonging to data disclosure items.
● This is supported only for customer-specific solutions. Multi-customer solutions and key-user
solutions are not supported.
● During the duration when you are making the bug fix (Status of the solution is Deployed — In
Correction), the solution is locked. Hence you cannot upload or deploy a patch solution. You also cannot
perform any tenant operation, such as tenant move or copy.
● There is no automatic double maintenance of the code changes to the upgraded test tenant. You must
manually make the corrections in the test tenant which has been upgraded to the higher release.
● The following are additional checks applicable for Pre-production tenants:
○ If the production tenant with this solution is available on the same system as the pre-production
tenant, then bug fixing is not allowed
○ If the test tenant with this solution is available on the same system as the pre-production tenant,
then it’s allowed with a warning – the code change has to be manually maintained in the other test
tenant
Process Flow
1. In the Solution Explorer, click to open a correction patch. The solution is available for editing and the status
of the solution is changed to Deployed - In Correction. Read the Disclaimer pop-up and agree to proceed with
the code changes.
2. Implement the required .absl changes, by using Check Out, Check In, Activate and Revert actions in the .absl
file:
a. Check out the specific .absl file for which the code change needs to be carried out.
b. Perform the .absl code changes as required using the Studio absl editor.
Overview
A customer-specific solution is in maintenance mode, if it has been assembled and downloaded; the solution status
then is Assembled. You can make changes to the solution in a patch; however, you can only make restricted changes
to certain content types. These change and delete restrictions ensure that you do not make changes to a solution
that could lead to loss of data or create inconsistencies or errors on a customer's production tenant.
Deletion
When your solution is in maintenance mode, you can delete the following items:
Business Configuration Object (BCO) Business Configuration Quick Guide [page 314]
Code List Data Type Create a Code List Data Type [page 406]
Mass Data Run Object Mass Data Run Quick Guide [page 463]
Reference to a joined data source created by an administrator Create a Joined Data Source [page 459]
in the cloud solution
Reference to a combined data source created by an Create a Combined Data Source [page 457]
administrator in the cloud solution
Reference to a key figure created by an administrator in the Create a Key Figure [page 462]
cloud solution
See Also
Maintenance of Business Configuration Content [page 322]
Maintenance of Analytics Content [page 453]
Maintenance of Business Objects [page 358]
Maintenance of Business Object Extensions [page 380]
Patches [page 166]
● Scripting Language Reference [page 173] ● Syntax for the Implementation of Business Logic
The scripting language is used to define business [page 210]
objects and business object extensions as well as to You use these methods and keywords to implement
implement the business logic for cloud partner the business logic of your solution. For this task, you
solutions. This lightweight language is easy to learn can also use predefined built-in functions and reuse
and to use with its focused set of features. services:
The keywords, methods and functions of the scripting ○ Built-In Functions [page 276]
language are described in separate sections according ○ Basic Reuse Libraries [page 238]
to the task you want to perform:
○ Reuse Libraries for Business Areas [page 268]
○ Syntax for Business Object Definitions
[page 174] ● Basic Data Types [page 284]
You use these keywords and functions to define The scripting language supports basic data types such
the structure and interface of business objects. as string, numeric and Boolean values. In addition, the
existing metadata of the SAP underlying cloud
○ Syntax for Business Object Extension Definitions
platform for core data types (CDTs) and global data
[page 197]
types (GDTs) is made available.
You use these keywords and functions to define
the structure and interface of business object
extensions.
Any software coding or code lines/strings (“Code”) provided in this documentation are only examples
and are not intended for use in a productive system environment. The Code is only intended to better
explain and visualize the syntax and phrasing rules for certain SAP coding. SAP does not warrant the
correctness or completeness of the Code provided herein and SAP shall not be liable for errors or damages
cause by use of the Code, except where such damages were caused by SAP with intent or with gross
negligence.
You can also refer to SAP Cloud Application Studio Performance Best Practices for more information on
some best practices to keep in mind while creating ABSL scripts.
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
Overview
The scripting language is used to define business objects and business object extensions as well as to implement
the business logic for cloud partner solutions. This lightweight language is easy to learn and to use with its focused
set of features.
The sandbox environment for the scripting prevents a partner who has created erroneous implementations from
damaging data of other users by accident. This kind of sandbox environment is ensured by the script execution
runtime. Security-relevant features, such as direct access to database tables, are strictly controlled or not made
available in the scripting language. Instead, all data access is made available through the business object
infrastructure.
The keywords, methods and functions of the scripting language are described in separate sections according to the
task you want to perform:
● Syntax for Business Object Definitions [page 174]
You use these keywords and functions to define the structure and interface of business objects.
● Syntax for Business Object Extension Definitions [page 197]
You use these keywords and functions to define the structure and interface of business object extensions.
● Syntax for Implementation of Business Logic [page 210]
You use these methods and keywords to implement the business logic of your solution.
For this task, you can also use predefined built-in functions and reuse services. For more information, see the
following documentation:
○ Built-In Functions [page 276]
○ Basic Reuse Libraries [page 238]
○ Reuse Libraries for Business Areas [page 268]
To fully understand the keyword descriptions, it is essential to have a basic understanding of the business object
model and its features, such as associations, actions, and queries.
Model names of SAP entities are in British English according to ISO 11179.
Syntax
The syntax conventions for scripting language are as follows:
Character Description
[] Indicates that you can use none, one, or more of the enclosed options. Do not include the brackets in your option.
| A vertical line between two parts of a statement indicates that only one of these two parts can be used within the
statement.
? Indicates that the symbol (or the group of symbols in parenthesis) to the left of the operator is optional (it can
appear just once or not at all). You can use it as a postfix to “[ ]”.
+ Indicates that something can be repeated at least once or any number of times. You can use it as a postfix to “[ ]”.
* Indicates that something can appear any number of times (and possibly be skipped altogether). You can use it
as a postfix to “[ ]”.
XXX Indicates a placeholder. Replace placeholders with actual values in your code snippet.
Use the keywords and functions listed below to describe the structure and interface of a business object in the studio.
For more information about the general syntax conventions and rules, see Scripting Language [page 173].
Code Completion
You can use CTRL + SPACEBAR at any cursor location to display the valid code completion options for the
current context . If there is only one option, the code is completed at once. The code completion is also activated, if
you enter a period (.) in a path expression or a colon (:), for example, in an element statement.
Comments
You can enter comments using the following syntax:
● comment line
// <comment text>
A comment line starts with two slashes (//) and spans to the end of the current line.
● comment block
/* <comment text>
<comment text>
<comment text>
*/
A comment block starts with a forward slash followed by an asterisk and ends with an asterisk followed by a
forward slash.
List of Annotations
In the following, the annotations are listed in alphabetical order:
Overview
Description It is necessary that the access to specific instances is controlled by certain parameters. If you wish to define
which elements or associations can be used to control access to certain instances, you use the
AccessControlContext annotation.
The access context can only be either Employee or EmployeeOrTerritory.
For element, the data type must always be UUID.
For association, the data type of foreign key must be UUID.
Description Use the action keyword to define an action for a node. Actions carry out the business logic and are
implemented in .absl files.
Description If you want to identify a node uniquely with an identifier that can be read by human beings, you use the
AlternativeKey annotation. You can use this identifier in an association to refer to a business object
node. In addition, this identifier is stored as an additional key field in the database and thus accelerates
enterprise searches and queries.
It is not possible to have more than one alternative key of the same type in a business object node.
Custom business objects contain an implicit alternative key of type UUID for each node, enabling
the node to be used as an association target.
See Also
Association (Business Object) [page 180]
Syntax [<annotat
ion>[(<pa
rameter>)
]?]
Annotation Overview
Label (Business Object) [page 189] content element AlternativeKey, Tooltip, Transient
Tooltip (Business Object) [page 193] content element AlternativeKey, Label, Transient
If the target node is the root node, do not use the target node path in the association definition. If
the target business object is the current business object, do not use the target business object in
the association definition. However, this does not apply if the source and the target node is the root
node of the current business object.
You can mark associations as relevant for access control by adding the annotation
RelevantForAccessControl.
Description Use the businessobject keyword to specify the name and the nodes of a business object. A business object
consists of a root node, which can contain child nodes. Even if not specified, the multiplicity of the root
node is [1,1].
The .bo file that contains the business object definition must have the same name as the business
object itself. Each file contains the definition of a single business object.
Example Business object, message and root node element. The root node raises a specified message:
businessobject BonusRule raises ReferenceInvalid {
message ReferenceInvalid text "Reference is invalid";
element ItemID : ID;
}
Overview
Description If you need to record the changes to a given value of your business object you use the
ChangeHistory annotation. It will control the creation as well as the change of a value.
It can be applied to the keywords:
● businessobject
It works in the same way as for any other node, but here it is applied to the root node of the
business object only, not the whole business object.
● node
The changes of all elements (including the alternative keys used in associations) of this node
are recorded.
● element
The changes of this element are recorded.
If you provided the annotation already to the node of this element you will get an information
message that this annotation is superfluous.
It is not allowed to use this annotation together with the annotation Transient.
● association
The changes of this association are recorded.
This is only supported for associations using an alternative key. For associations based on
valuation please mark the elements used in the valuation with this annotation.
See Also
Enable Change History [page 375]
Description You can use the CrossDeploymentUnit annotation to define an association from a node of a business
object in one deployment unit to a node of a business object in another deployment unit.
Optionally, you can specify the alternative key of the target node with the using keyword.
Overview
Description You can define the node as carrying language dependent descriptions. It will be represent as such in the
Business Object model and can be used in the UI in a way that the description is automatically derived in the
logon language.
Ensure that at least one element or a supplementary component of an element of the node is of the data
type LanguageCode
For the TextCollection dependent object you can use the following:
● MultipleTexts annotation to support different text types
● LanguageIndependent annotation to support language independent text
In order to define the dependent object inclusion node, you have to specify a name. You can either use the
dependent object name itself, for example, TextCollection, or add a specific meaning to the
dependent object name, for example, ProcurementSpecificationTextCollection. If you
include a dependent object in a business object definition several times, you should provide different names
for each of the dependent object inclusion nodes. You can, for example, use the following syntax:
<subordinate node name> + <dependent object name>, such as
ItemAttachmentFolder.
You can add the same dependent object only once to a business object node.
If you choose to add the reuse UI, you need to provide a Type Code to determine the kind of
TextCollection or AttachmentFolder you intend to use. The list of codes which are
supported are as shown below:
● TextCollection
○ 10001 Additional External Comment
○ 10002 Body Text
○ 10005 Rejection Reasons
○ 10006 Detailed Description
○ 10011 Internal Comment
○ 10025 Reason
○ 10026 Purchasing Note
○ 10027 Sales Note
○ 10029 Approval Note
○ 10047 Error Symptom
○ 10071 Work Description
● AttachmentFolder
○ 10001 Standard Attachment
○ 10006 Certificate
○ 10013 Image
○ 10047 Multimedia
○ 10049 Maps
○ 10051 Webpage
Description A deployment unit is a piece of software that can be operated on a separate physical system, isolated from
other pieces of software. The SAP cloud solution is organized in deployment units that group semantically
related business objects, for example, Customer Relationship Management. There is also a special
Foundation deployment unit that mainly contains master data objects, for example, Material, Employee,
and Customer.
Each business object resides in a deployment unit. You can explore SAP business objects that are released
with the public solution model (PSM) and the deployment units in the Repository Explorer tool window. For
more information, see Repository Explorer [page 50].
When a solution is created, the solution has to be assigned to a deployment unit. The business objects that
are created subsequently in the solution are assigned to this default deployment unit. If you want to assign
a business object to a different deployment unit, use the annotation DeploymentUnit at the beginning
of the business object definition.
You can directly access business objects that reside in the Foundation deployment unit from any
deployment unit. However, business objects in the Foundation deployment unit cannot access any
business object residing in another deployment unit, not even by using asynchronous communication. You
can only use a query to read the data of this business object.
For all other deployment units the following applies: You cannot directly change the data of a business
object residing in another deployment unit. However, you can read the data of such a business object by
using a query, the Retrieve method or an association. To change the data of a business object residing
in another deployment unit, use asynchronous, message-based communication. For more information,
see Configure Internal Communication [page 523].
Description Use the element keyword to define an element of a business object node. The element name must be unique
within the node. The element type can be a simple data type, for example, ID, or it can be a structured data
type such as Amount. You can import data types from different namespaces. However, you cannot define
new data types. For more information on importing entities, see Import (Business Object) [page 189].
When defining an identifier element, we recommend you use the ID data type instead of the
Identifier data type. The ID data type always has 60 characters, is not structured and does
not contain the Content element. The data type supports, for example, upper case conversion
and alpha conversion. Alpha conversion fills purely numeric user input like “4711” with leading zeros
from the left side to allow better sorting in character fields. For example, if alpha conversion is not
used, an alphabetic sorting would lead to results such as: “1”, “10”, “100”, “1000”, “2”, “20”, “200”,
and so on.
You can define additional properties of an element by using annotations. For example, the annotation
AlternativeKey defines the key element of a business object node. Key elements uniquely identify a
node and can be used to identify the target of an association. An alternative key, SAP_UUID of type
UUID, is generated implicitly for each node. Therefore, you do not need to define an alternative key for
each node.
Enclose annotations in square brackets.
Overview
See also Syntax for Business Object Extension Definitions [page 197]
Description Use the import keyword to import business objects and data types from namespaces that are available in
the repository. The namespace name is typically a Uniform Resource Identifier (URI) in dot notation (see
example below).
You can use imported business objects and data types in the definition of associations, elements, and
messages. You can reference the imported objects directly by their names instead of using fully qualified
names. If you use a namespace only for one or two sub-entities, you can omit the import statement and
use the qualified name <namespace name>:<name> instead. If there are no conflicts for any entity in
the business object within all imported namespaces, you can omit the relevant namespace, as the system
can identify it automatically.
If you use more than one namespace in your business object definition, we recommend that you
define an alias for each imported namespace and qualify business objects or data types from these
namespaces by using the aliases.
You do not need to import business objects and data types from the namespace of the current project but
you can access them directly by their names.
You can use code completion for importing the namespace as well as for accessing imported objects, that
is, when you select the target business object of an association or the data type of a node element or
message parameter.
See Also
Add a Label and Tooltip to a Business Object [page 361]
Syntax message <message ID> text "<message text>" [: <data type 1>[, <data type
2>[, <data type 3>[, <data type 4>]?]?]?]? ;
Description Use the message keyword to define a message between two business objects. The definition of a message
includes the message ID, the message text, and, optionally, data types of up to four message parameters.
The parameter names are defined by the system.
The limit for a message ID is 30 characters and for a message text is 73 characters. The message ID must
be unique within the business object; use uppercase for letters. You can reference data types from different
namespaces. For more information, see Element (Business Object) [page 188] and Import (Business
Object) [page 189].
Overview
Description You can use the LanguageIndependent annotation together with the TextCollection dependent object
to support language independent text.
If the TextCollection dependent object is assigned to the current node, the LanguageIndependent
annotation defines that no language code must be provided together with the text.
If the user logs on with a different language than the one used during the creation of the text, the same text will
be retrieved.
Description You can use the MultipleTexts annotation together with the TextCollection dependent object to
support different text types.
If the TextCollection dependent object is assigned to the current node, the MultipleTexts
annotation defines if more than one text is allowed.
See Also
Dependent Object (Business Object) [page 185]
Description Use the node keyword to define a business object node and its features, that is, elements, actions, node
associations, child nodes, and raised messages. The name of the node must be unique within the business
object.
For the business object, the root node of the node hierarchy is automatically created. The multiplicity of
the root node is [1,1]. Each direct or indirect child node implicitly contains a ToRoot association.
A node must contain at least one explicitly defined element (not including SAP_UUID, which is implicitly
generated for each node). Elements, actions, associations, and child nodes must have unique names within
the node.
The definition of a child node implicitly introduces a composition, that is, a relationship between a parent
node and a child node. The multiplicity of the child node defines the upper and lower bound of that
composition, that is, how many instances of the child node can be part of the parent node. The multiplicity
of a node can be [0,1], [1,1], [0,n], or [1,n]. If no multiplicity is defined, the multiplicity [0,1] is used by default.
You can use the composition to access features of the child node from the parent node (for example, in
action implementations). For each composition, the reverse ToParent association is created implicitly.
SelectAll and ByElements queries are created automatically for each node. It is not possible to define
new queries in the business object.
Description At least one message ID must follow the raises statement. Following the message ID, you can enter as many
messages as needed. If the message is not part of the same business object, you must also specify the
message group. The name of the message group is identical to the corresponding name of the business
object.
Example ● Raises statement that raises a message from the same business object:
businessobject BonusRuleOne raises DateMissing {
message DateMissing text "Date is missing";
element ItemID : ID;
}
● Raises statement that raises messages from the same business object and messages with different
message groups
businessobject BonusRuleTwo raises BonusRuleOne.DateMissing {
message ReferenceInvalid text "Reference is invalid";
element ItemID : ID;
node Item raises BonusRuleOne.DateMissing, ReferenceInvalid {
element ItemID : ID;
}
action Count raises ReferenceInvalid;
}
Syntax [RelevantForAccessControl[(<parameter>)]?]
Overview
Description You can use this annotation to make sub-nodes separately lockable. This allows you to edit a node while another
user edits another node of the same business object.
Description You can define a tooltip for a business object field. If you then add the field to a screen, the label is displayed
on the screen instead of the field name.
You can translate the tooltip text by exporting it to an XLFF file. For more information, see the Translation
Quick Guide [page 584].
See Also
Add a Label and Tooltip to a Business Object [page 361]
Description You can use the Transient annotation to create transient fields. The data in such a field is not persistent, this
means, it is not saved in the database. A transient field is filled after an AfterLoading event has been executed.
The Transient annotation can be combined with the following annotations:
● Label [page 189]
● Tooltip [page 193]
The valuation keyword is followed by one or several conditions, which are evaluated when the
associations are resolved. You define a condition as follows:
1. You specify the target element.
This element must exist in the target node of the association.
2. You specify one of the following comparison operators:
● == (is equal to)
● < (is less than)
● > (is greater than)
● >= (is greater than or equal to)
● <= (is less than or equal to)
● ! (not equal)
If you want to compare two node elements, you can only use the == operator.
3. You define either an element defined in the source node or a code value.
You can use the AND operator (&&) to connect several conditions. Please note that in this case the OR
operator (|) and the NOT operator (!) are not supported.
In a condition, you can specify elements with non-structured data types only. However, you can use the
element path, for example, Amount.content, to use elements of structured data types.
The valuation keyword cannot be used together with the using keyword and the
RelevantForAccessControl annotation.
Overview
Description If you want to record the creation date and time, along with the identity of the creator and/or the user who made
the last changes, you use the WithAdministrativeData annotation. This annotation only supports the
Business Object definition and the Node definition.
Use the keywords and functions listed below to describe the structure and interface of a business object extension
in the studio.
For more information about the general syntax conventions and rules, see Scripting Language [page 173].
Extension Template
When you create a business object extension, you are presented with a template that includes the extendable nodes.
Taking the Sales Order business object as an example, the extension template begins with the annotation
[Extension] and contains the extendable node Item. The Root node is also extendable, although not explicitly
shown.
import AP.Common.GDT;
import AP.CRM.Global;
node Item {
}
Code Completion
Based on the code you type, code completion presents you with a list of valid options. For example, when you type
a colon (:) after an element name, you will see a list of valid data types. If there is only one valid option, the code is
completed at once.
You can also use CTRL + SPACEBAR to force the code completion function to display the valid options at the
current cursor location.
Comments
You can enter comments using the following syntax:
● comment line
// <comment text>
A comment line starts with two slashes (//) and spans to the end of the current line.
● comment block
/* <comment text>
<comment text>
<comment text>
*/
A comment block starts with a forward slash followed by an asterisk and ends with an asterisk followed by a
forward slash.
List of Keywords
● Action (Business Object Extension) [page 199]
● Business Object (Business Object Extension) [page 199]
● Element (Business Object Extension) [page 201]
● Import (Business Object Extension) [page 202]
● Message (Business Object Extension) [page 203]
● Node (Business Object Extension) [page 204]
● Raises (Business Object Extension) [page 207]
List of Annotations
● Decimal (Business Object Extension) [page 200]
● Label (Business Object Extension) [page 203]
● Reference (Business Object Extension) [page 208]
● Relation (Business Object Extension) [page 208]
● Scenario (Business Object Extension) [page 209]
● Tooltip (Business Object Extension) [page 210]
Description Use the action keyword to define an action for a node. Actions carry out the business logic and are
implemented in .absl files.
You can only use this keyword in business object extensions created on the ESF2 framework.
Description The businessobject keyword specifies the business object being extended.
Syntax [<annotation>[(<parameter>)]?]
Description Annotations are used to add a category or property to an object specified by the subsequent keyword. The names
of the annotations are predefined and can be displayed by the code completion.
Technically, you can combine as many annotations as you want. But not all combinations are possible and not
all of them make sense. For more information, see the list of possible combinations below.
Annotation Overview
Decimal (Business Object Extension) digits, element Label, Scenario, Tooltip, Standard
[page 200] fraction Transient
Label (Extension Node) [page 189] content element AlternativeKey, Tooltip, Both
Transient
Relation (Business Object Extension) list of names element Label, Scenario, Tooltip Standard
[page 208]
Scenario (Business Object Extension) list of names element Decimal, Label, Standard
[page 209] Reference, Relation,
Tooltip
Tooltip (Extension Node) [page 193] content element AlternativeKey, Label, Both
Transient
Description You can declare a decimal value with a specific number of digits before and after the decimal point.
The decimal annotation [Decimal (x,y)] requires two parameters:
● x = the total number of digits allowed, up to a maximum of 29
● y = the number of digits allowed after the decimal point, up to a maximum of 14
The first parameter value must be greater than the second parameter value.
● The default number of digits before and after the decimal point are 7 and 2 respectively.
● When you use negative numbers, the minus sign is counted as a digit. For example,
[Decimal (2,0)] allows 55 and -5 but not -55.
Description Default values are initial values that are used to fill fields automatically when a new instance is created.
The studio supports only static default values such as Boolean values, status information, numeric values,
and free text.
There is no syntax check for default values included in quotation marks.
The default number of digits before and after the decimal point are 7 and 2 respectively.
If you use this data type in a business object extension, the length of the corresponding field
is not restricted to a specific number of characters. Only in business object definitions, the
field length is restricted to 255 characters.
● WebURI
● EmailURI
By importing additional namespaces, you can access additional SAP CodeLists and Identifiers.
You can also use CodeLists that you have defined within your solution.
Description Use the import keyword to import data types from namespaces that are available in the repository. The
namespace name is typically a Uniform Resource Identifier (URI) in dot notation (see example below).
You can use imported data types in the definition of elements. You can reference the imported data types
directly by their names instead of using fully qualified names. If you use a namespace only for one or two
sub-entities, you can omit the import statement and use the qualified name <namespace
name>:<name> instead. If there are no conflicts for any entity in the business object within all imported
namespaces, you can omit the relevant namespace, as the system can identify it automatically.
You can also define an alias for an imported namespace and qualify data types from this namespace by
using the alias.
Description You can define a label for an extension field. If you then add the extension field to a screen, the label is
displayed on the screen instead of the extension field name.
If the element is structured, such as Amount, the label annotation is defined for the .content
element. Please note that you cannot define a label for a structured element that does not contain
a .content element or that contains more than one .content element.
Syntax message <message ID> text “<message text>” [: <data type 1>[, <data type
2>[, <data type 3>[, <data type 4>]?]?]?]?;
Description Use the message keyword to define a message for a business object extension. The definition of a message
includes the message ID, the message text which can include up to four parameters, and the data types of
any parameters used.
The limit for a message ID is 30 characters and for a message text is 73 characters. The message ID must
be unique within the business object extension.
Messages can only be raised in the business object extension where they are defined. In addition, messages
must be assigned to the individual nodes where they are to be called.
Description The node keyword specifies the extendable nodes within a business object.
You can create and add your own custom nodes within a business object extension. However, you must
note that not all standard business objects support these node extensions. For more information on the
list of standard business objects, see below..
Business Object
Name Namespace
AccountingCodingBl http://sap.com/xi/AP/IS/CodingBlock/Global
ockDistribution
AddressSnapshot http://sap.com/xi/AP/FO/Address/Global
BankDirectoryEntry http://sap.com/xi/AP/FO/BankDirectoryEntry/Global
File
BusinessPartnerHier http://sap.com/xi/AP/FO/BusinessPartner/Global
archy
CodingBlockCustom http://sap.com/xi/AP/IS/CodingBlock/Global
Object1
CompanyFinancials http://sap.com/xi/AP/FO/CompanyFinancialsProcessControl/Global
ProcessControl
EmployeeTimeCalen http://sap.com/xi/AP/TimeAndLabourManagement/Global
dar
FinancialAccounting http://sap.com/xi/AP/FinancialAccounting/Global
ViewOfPurchasingD
ocument
FinancialPlanData http://sap.com/xi/AP/FinancialAccounting/Global
FinancialsViewOfCo http://sap.com/xi/AP/FinancialAccounting/Global
ntract
ForeignTradeProduc http://sap.com/xi/FTA/ForeignTradeProductClassification/Global
tClassification
IdentityBusinessRol http://sap.com/xi/AP/PC/IdentityManagement/Global
e
ObjectIdentifierMap http://sap.com/xi/CommunicationServicesManagement/Global
ping
Payment http://sap.com/xi/AP/Payment/Global
PaymentBatch http://sap.com/xi/AP/Payment/Global
ProjectStockOrder http://sap.com/xi/AP/ProjectManagement/Global
AccountingCodingBlockDistribution http://sap.com/xi/AP/IS/CodingBlock/Global
Activity http://sap.com/xi/AP/PC/ActivityManagement/Global
ActivityWorklist http://sap.com/xi/AP/FO/Activity/Global
AddressSnapshot http://sap.com/xi/AP/FO/Address/Global
AttachmentFolder http://sap.com/xi/AP/FO/Address/Global
BusinessActivityIndustryExtension http://sap.com/xi/AP/PC/ActivityManagement/Global
BusinessAttribute http://sap.com/xi/AP/FO/BusinessAttribute/Global
BusinessAttributeAssignment http://sap.com/xi/AP/FO/BusinessAttribute/Global
BusinessAttributeSet http://sap.com/xi/AP/FO/BusinessAttribute/Global
BusinessPartnerRelationship http://sap.com/xi/AP/FO/BusinessPartnerRelationship/Global
BusinessPartnerSolutionExtensions http://sap.com/xi/AP/FO/BusinessPartner/Global
BusinessPartnerVisitingInformation http://sap.com/xi/AP/FO/BusinessPartner/Global
Campaign http://sap.com/xi/AP/CRM/Global
CampaignResponseOption http://sap.com/xi/AP/CRM/Global
CashDiscountTerms http://sap.com/xi/AP/FO/CashDiscountTerms/Global
CodTimeEntry http://sap.com/xi/AP/CRM/Global
CodTimeReport http://sap.com/xi/AP/CRM/Global
ComplaintManagementSalesOrder http://sap.com/xi/AP/CRM/Global
Contract http://sap.com/xi/AP/CRM/Global
CustomerQuote http://sap.com/xi/AP/CRM/Global
DesignRegistration http://sap.com/xi/AP/CRM/Global
ExternalAggregatedCustomerSalesOrderView http://sap.com/xi/AP/FO/CustomerDocumentReplication/Global
ExternalCustomerKPIView http://sap.com/xi/AP/FO/CustomerDocumentReplication/Global
ExternalIdentity http://sap.com/xi/AP/FO/BusinessPartner/Global
ExternalPriceDocument http://sap.com/xi/AP/FO/PriceAndTax/Global
IdentityBusinessRole http://sap.com/xi/AP/PC/IdentityManagement/Global
InstallationPoint http://sap.com/xi/AP/FO/IBase/Global
InstalledBase http://sap.com/xi/AP/FO/IBase/Global
InsurancePolicy http://sap.com/xi/AP/CRM/Global
InsuranceQuickQuote http://sap.com/xi/AP/CRM/Global
InsuranceQuote http://sap.com/xi/AP/CRM/Global
InsuranceRenumerationAnalytics http://sap.com/xi/AP/CRM/Global
Lead http://sap.com/xi/AP/CRM/Global
LeadIndustryExtn http://sap.com/xi/AP/CRM/Global
MaintenancePlan http://sap.com/xi/AP/CRM/Global
MarketingPermission http://sap.com/xi/AP/CRM/Global
ObjectIdentifierMapping http://sap.com/xi/CommunicationServicesManagement/Global
OperatingHours http://sap.com/xi/AP/FO/OperatingHours/Global
Opportunity http://sap.com/xi/AP/CRM/Global
OpportunityIndustryExtension http://sap.com/xi/AP/CRM/Global
OrganisationAddress http://sap.com/xi/AP/FO/Address/Global
PartnerAddress http://sap.com/xi/AP/FO/Address/Global
PdmMaterialIndustryExtn http://sap.com/xi/AP/FO/ProductDataMaintenance/Global
ProductBusinessPartnerRelation http://sap.com/xi/AP/FO/
ProductBusinessPartnerRelationManagement/Global
ProfessionalServicesMasterProject http://sap.com/xi/AP/CRM/Global
ProjectAlert http://sap.com/xi/AP/CRM/Global
Promotion http://sap.com/xi/AP/CRM/Global
Questionnaire http://sap.com/xi/AP/FO/Activity/Global
Route http://sap.com/xi/AP/PC/ActivityManagement/Global
SalesTerritory http://sap.com/xi/AP/PC/SalesTerritoryMgmt/Global
SalesTerritoryIndustryExt http://sap.com/xi/AP/PC/SalesTerritoryMgmt/Global
ServiceIssueCategoryCatalogue http://sap.com/xi/AP/FO/ServiceIssue/Global
ServiceRequest http://sap.com/xi/AP/CRM/Global
SupplierInvoiceRequest http://sap.com/xi/AP/PC/SupplierInvoiceProcessing/Global
TargetGroup http://sap.com/xi/AP/CRM/Global
TextCollection http://sap.com/xi/DocumentServices/Global
UtilitiesBusinessAgreement http://sap.com/xi/AP/CRM/Global
UtilitiesConnectionObject http://sap.com/xi/AP/CRM/Global
UtilitiesPointOfDelivery http://sap.com/xi/AP/CRM/Global
VisitTourPlan http://sap.com/xi/AP/PC/ActivityManagement/Global
WorkplaceAddress http://sap.com/xi/AP/FO/Address/Global
Description Use the raises keyword to declare messages for a business object extension. At least one message ID must
follow the raises statement.
Messages can only be raised in the business object extension where they are defined. In addition, messages
must be assigned to the individual nodes where they are to be called.
Overview
Description The Reference annotation enables you to use an element declared in one business object extension in
another business object extension. You can also use an element in the item node that is declared in the
root node of the same business object extension.
The Reference annotation cannot be combined with the following annotations:
● Decimal
● Relation
● Label
● Tooltip
● Transient
You do not need to include a data type when referencing an element, as the data type is specified
in the original element definition.
Examples 1. Reference from one business object extension to another business object extension
Definition of the first business object extension:
element Test_Extension_Field : Text;
Definition of the second business object extension:
[Reference] element Test_Extension_Field;
2. Reference from an item node to the root node of the business object extension
Definition of the root node:
element Test_Extension_Field : Text;
Definition of the item node:
[Reference] element Test_Extension_Field;
In contrast to the Relation [page 208] annotation, which refers to any business object element, the
Reference annotation refers to a specific element within the same business object.
Examples [Relation(AP.CRM.Global:Opportunity.Item.ItemProduct.ProductKey.ProductI
D)] element MyProductID : ProductID;
[Relation(AP.FO.BusinessPartner.Global:Employee.Identification.EmployeeI
D)] element MyEmployeeID : EmployeeID;
Description A process extension scenario links the data from one business context to other related business contexts.
You create an extension scenario from a list of predefined extension scenarios. For example, you can create
an extension scenario that links the following business contexts:
● Lead - General Information > Opportunity - General Information
● Opportunity - General Information > Sales - General Information
Each extension scenario contains one or more data flows. Each data flow consists of a source and target
business context. This reflects the direction in which data is passed from one business context to the next
as part of a business process.
● Opportunity - General Information > Sales - General Information
○ Opportunity - General Information > Sales Quote - General Information
○ Opportunity - General Information > Sales Order - General Information
Extension scenarios are specific to the node for which they were created. If an extension scenario
was created for the root node, then it can only be called at the root node within the .xbo. Similarly,
an extension scenario created for the item node can only be called from the item node within
the .xbo.
If you now extend any of the business objects involved in the scenario, you can use the annotation
[Scenario] to declare that the element is available to all the business contexts specified in the scenario.
For example, if you add an element to the Lead business object, you can use an extension scenario to make
this element available if you extend the Opportunity, Sales Quote, or Sales Order. When an Opportunity is
created from the Lead, the data for your extension field is passed to the Opportunity. Similarly, when a
Sales Order is created from the Opportunity, the data is passed to the Sales Order.
See Also For a list of all predefined extension scenarios, see Extension Scenarios [page 396].
Description You can define a tooltip for an extension field. If you then add the extension field to a screen, the tooltip is
displayed when you place the cursor on the extension field.
If the element is structured, such as Amount, the tooltip annotation is defined for the .content
element. Please note that you cannot define a tooltip for a structured element that does not contain
a .content element or that contains more than one .content element.
The methods and keywords listed below enable you to implement the business logic for your solution in script files,
such as actions, validations and events. You can implement, for example, BeforeSave events and OnSave
validations, and the actions that you have defined for your business objects. For more information about the general
syntax conventions and rules, see Scripting Language [page 173].
You can also use built-in functions and reuse libraries that extend the scope of the methods described below. For
more information, see the following documentation:
● Built-In Functions [page 277]
● Basic Reuse Libraries [page 238]
● Reuse Libraries for Business Areas [page 268]
Type Handling
The scripting language supports type inference, thereby avoiding the need of explicitly identifying relevant types.
This is especially useful for script files, where elements of existing business objects are accessed either by your own
business objects or by SAP business objects. For structured element types, the code completion enables you to see
the data type’s structure while accessing the elements of the involved business objects.
For more information about the basic data types that the scripting language supports and their behavior, see
Behavior of Data Types [page 284].
Code Completion
Apart from using a period (.) for the code completion of path elements, you can use the key combination CTRL +
J to display all options for the current context. You can use this feature at any cursor location, for example, when
Method Tooltip
The method tooltip displays the documentation of a method and its parameter definitions. The method tooltip
appears when you type an opening parenthesis, which is the method parameter indicator character.
To display the method tooltip, you can also use the key combination CTRL + SHIFT + SPACEBAR whenever
the cursor is located within a method name or a parameter of a method call. If multiple methods with the same name
but different parameters are available, you can choose the appropriate method signature from the list using the up
and down arrow keys. If you use the left and right arrow keys, you can display the definitions of the individual
parameters.
The method tooltip is displayed automatically when you type the parameters of a method. The method parameter
description moves to the next parameter whenever you type a comma (,) before the closing parenthesis.
Comments
The syntax supports single-line and multiple-line (block) comments. A single-line comment starts with two slash
marks (//) and spans to the end of the current line. The block comment, which can span multiple lines, starts with
a slash mark and an asterisk (/*) and ends with an asterisk and a slash mark (*/).
Single-line comment:
// <comment>
Multi-line comment:
/* <comment> */
Code Formatter
The code formatter helps to maintain a clean and readable source code in script files. It offers the following formatting
options:
● Properly indenting lines
● Inserting new lines, for example, before or after a control block
● Inserting spaces, for example, in expressions
When you have opened a script file in the code editor, you can execute the code formatter by selecting
Edit Advanced Menu Format Document . Alternatively, you can press CTRL + K or CTRL + D .
The code formatter formats the whole script file; you cannot use it to format only parts of the code.
Syntax
Simple and complex statements are supported. Complex statements usually contain a code body which is opened
and closed by braces { }. The body, in turn, can contain any type of statement, that is, the statements can be nested.
Simple statements, in contrast, can only be assignments and path expressions, in addition to variable declarations
and the import statement.
You cannot receive and handle messages that have been raised by a different script file containing
implementation code or the business object infrastructure, for example, during the creation of a
business object node instance.
Description An action execution is a special form of a path expression. The code completion offers actions that are
based on business object nodes in the same way as common method calls. You can enter parameters in
parentheses (..). In reuse library method calls, you can also use optional parameters but not in actions that
are based on business object nodes. Even if there are no parameters, you must always use parentheses.
In contrast to reuse service methods, action methods based on business object nodes do not support return
values.
If the multiplicity of the action definition in the business object model is [0,0], you can execute the action
statically by using static path expressions that identify a business object node. If the multiplicity is [1,1] or
[1,n], you can execute the action instance-based. In this case, the instance identifier has to be a collection.
Description Use the Add method to add a single row or an existing collection to the end of a collection.
This method cannot be applied to read-only collections. This is only relevant for code related to form
data type extensions and in case of mass-enabled script files, in which the this keyword represents
an immutable collection of nodes.
Description The arithmetic expressions support the common mathematical operators for addition, subtraction,
multiplication, division, and modulo calculations. Operands can be atomic expressions, such as literals,
variable identifiers, path expressions, or other arithmetic expressions.
You can overwrite the precedence order of the operators by using parentheses.
The operands have to evaluate to the exactly same type. The compiler does not implicitly convert
incompatible types. The plus sign (+) operator is overloaded to allow string concatenation.
Description An assignment assigns the value of the expression on the right to the expression on the left. The expression
on the left must be a variable or an element of a business object instance whereas the expression on the
right can be any kind of expression. For the expressions on the right you can use static path expressions,
for example, if you want to keep a copy of a reference to static query metadata. The default assignment
uses copy semantics.
You can also assign node instances on the right to associations on the left. The node instances on the right
can either be a newly created node instance or a node instance that has been retrieved through a query.
However, this kind of assignment is only possible for modeled associations with [1,1] multiplicity. Node
instances to [1,n] associations, which are implemented and not modeled, are assigned implicitly when new
node instances are created through create-enabled associations.
Description The association access is a special form of the path expression. Associations can be defined to be optional
and the multiplicity can be [0,1], [1,1] or [1,n]. By following an association, you are able to read data that
has been modified but not yet been stored in the database.
There are the following categories of associations: Compositions, intra-business-object associations,
cross-business-object associations and cross-deployment-unit associations. Compositions are
automatically generated associations implemented to allow navigation of the business object node
structure (that is, ToParent, ToRoot, navigation to subnodes). Due to the generated association
implementation, compositions support the [1,n] multiplicity.
Intra-business-object associations link nodes within one business object. Cross-business-object
associations link nodes of separate business objects. Intra and cross-business-object associations can
only have the [1,1] multiplicity.
To exchange data between business objects that are located in different deployment units,
configure an internal communication by using the Service Integration Wizard. For more information,
see Configure Internal Communication [page 523].
When accessing a [1,n] composition, a collection of nodes is returned. Therefore, you cannot access a
member of structured data types of the foreign business object nodes. Instead, you must use the
foreach loop statement to access the individual instances in the returned node collection (see the second
example below).
If the operand on the left of an assignment is an association access path expression followed by an element,
data can also be written to the foreign business object node instance.
If the node type matches the target definition of the association (see the third example below), you can
associate a foreign business object node instance that was just created.
Reading a business object node instances can be performed by either following an association or executing a query.
Updates are simply handled by assignment statements; the path expression on the left points to an element of a
business object node instance. The changes are automatically committed to the context business object once the
script file completes the execution without errors.
The following methods are available for the business object lifecycle:
● Create Instance [page 219]
● Create with Reference Action [page 220]
● Query Execution [page 229]
● Retrieve Instance [page 233]
● Delete Instance [page 222]
● Check Node Existence(IsSet) [page 216]
Description You can use the IsSet () method for [1,1] or [0,1] associations to check whether the association was
set before. Otherwise any access to an association that was not set causes a runtime error.
Description You can use the Clear method for the following scenarios:
● If you have created a collection, you can use this method to remove all rows from the collection.
This method cannot be applied to read-only collections. This is relevant for code related to
form data type extensions and in case of mass-enabled script files, in which the this keyword
represents an immutable collection of nodes.
● You have declared a variable by using the elementsof modifier and you pass initial values to
subelements of the business object node. In this case, you can use the Clear method to remove the
initial values from the subelements.
Syntax var <variable name> : collectionof <static path expression> | <data type>;
Description If you define a collection explicitly, the collection's row type is inferred from the static path expression, for
example, a business object node, or the row type is based on an unstructured data type.
A collection is a standard table that is defined on the basis of business object nodes or node elements, for example,
a collection of opportunities. Collections are generated when instances of business object nodes are returned by the
system. You can obtain a collection of business object nodes in several ways, for example:
● You follow [1,n] composition associations. For more information, see Association Access [page 215].
● You execute a Create with reference action with a collection parameter. For more information, see Create
with Reference Action [page 220].
● You execute a business object node query. For more information, see Query Execution [page 229].
Besides collections generated by the system, you can also define a collection explicitly.
The collection handling methods generally apply their logic to a copy of the collection and return a modified copy of
the original collection. Therefore these methods declare a collection as return value. However, the Add method and
the Clear method behave in a different way. They modify the collection to which they are applied. These methods do
not have any return value.
If you use a method to add or clear a collection or a row in a collection, this only has an impact on the collection
itself. To delete or create new business object nodes, use the Delete or Create operation for business objects.
For more information, see Business Object Lifecycle [page 216].
Description Conditional expressions evaluate Boolean values. The supported operators are shown in the syntax above.
Use arithmetic expressions as operands, which can also be atomic expressions, such as literals, variable
identifiers, and path expressions.
Description The continue statement and the break statement can be used within the code block of loop statements,
such as foreach and while statements.
The break statement immediately exits the enclosing loop statement. The continue statement quits the
current loop iteration and continues with the next iteration at the top of the code block of the enclosing
loop statement. In nested loop statements, however, the break statement only exits the inner loop.
Usually you need to embed the continue statement or the break statement into an enclosing if condition in
order to avoid endless loops or a forced single loop execution.
Description If you use the Count method, the system returns the number of rows in a collection.
You can also assign the data to the node instance after the node has been created. However, if you create
instances of SAP business objects, for some of the business objects you must provide default values in the
parameters at the time the business objects are created.
Description The Create with reference (CWR) action is a special type of action that can only be executed statically and
that directly returns one or more instances of the node to which the action belongs. All CWR actions are
overridden to offer two signatures, one with a single node parameter and one with a collection of nodes.
CWR actions return a single node or a collection of nodes depending on the collection property of the
method call parameter.
Description The implementation language is a statically-typed language that allows you to use declared variables only.
You always need to declare the variable before you can use it in a statement. If you declare a variable within
a code block (so-called variable scoping), that is, within the braces ({...}), the scope of this variable is limited
to this code block.
Variable shadowing is not supported, that is, variables cannot reuse names that are already declared
in an enclosing scope.
The variable type is automatically inferred upon first assignment of the variable. You can assign an initial
value either by specifying a literal or by specifying a path expression, that is, elements of other already
existing variables or elements of the this context. Assignments use copy semantics, that is, a temporary
copy is created when individual elements are accessed using the this context. Node variables have
reference semantics.
Alternatively, you can explicitly specify the variable type in the variable declaration. For this, you can use
basic data types as well as global data types (GDTs).
You can also derive the underlying type of a business object node by using the elementsof modifier followed
by a static path expression that identifies a business object node. This is useful if you define initial node
data that can be passed as a parameter to the Create operation of a business object node. Do not use the
elementsof modifier if you want to derive the type of an element from a static path expression.
Description The Delete operation, which uses the inverse semantics of the Create operation, can only be called in the
instance-based variant and must be applied to business object nodes. The reason is that the instance to
be deleted must be identified by the preceding member path expression. The Delete operation can also be
applied to collections of business object nodes.
Description You can use the Where method to filter a collection in order to return only the rows that meet the criteria.
This method returns a new collection, for example, collection A, which contains a subset of the source
collection, for example, collection B.
Example In the following example, the collection collB is the result of a query that was executed previously:
var mySearchValues : elementsof myBO.Item;
var collA;
mySearchValues.ItemID.content = "Bill";
collA = collB.Where(n => n.ItemID != mySearchValues.ItemID ||!
(n.ItemID.content < 1000 && n.ItemID.content == "Fred"));
var collStrings : collectionof LANGUAGEINDEPENDENT_Text;
//To use the "LANGUAGEINDEPENDENT_Text" GDT , you need to import the
AP.common.GDT namespace first
var collStringsResult;
collStringsResult = collStrings.Where( n => n == "Fred" );
collStringsResult = collStrings.Where( n => n.StartsWith( "Fred" ) );
The statements within the foreach body can make use of the loop variable to access the instance of the
current iteration. For information about how to obtain collections of business object nodes, see Collection
Handling [page 218] .
Syntax Applicable in collection handling when you use the OrderBy and DistinctBy methods:
<function parameter name> => <function parameter name>.<method or
property of inferred type>
Applicable in collection handling when you use the , Where and Remove methods:
<function parameter name> => <function parameter name>.<method or
property of inferred type> <arithmetic expression>
Do not use a function parameter name that you have already used for a declared variable. For more
information, see Declarations [page 221].
Description Use the GetFirst or GetLast method to return the first or last row of a collection.
Description The if statement is a control statement. Depending on the result of the logical expression, the system
executes or skips the statement block. Optionally, else if and else subclauses can be used.
Description The import keyword imports business objects or reuse libraries from namespaces that are available in the
studio in the Repository View. Imports have to be defined at the very top of a script file. You can only import
complete namespaces but no individual entities. If there are naming conflicts between different entity types
in the same namespace, for example, if a reuse library has the same name as a business object, you must
fully qualify the name upon usage.
The namespace syntax in the scripting language is different to the namespace representation in the
Repository View. In the scripting language, the constant http://sap.com/xi prefix of the URL-based
namespaces is omitted and the slash mark (/) is replaced by a period (.).
Imported business objects can be statically accessed by typing the business object name as the root
identifier of a path expression. The local namespace of the solution is imported implicitly, that is, local
business objects can be accessed without an import statement.
If you use more than one namespace, we recommend that you define an alias for each imported
namespace and qualify business objects or data types from these namespaces by using the aliases.
For examples, see Name Qualification [page 227].
Code completion is available for the namespace import, as well as for the static access of imported business
objects and reuse libraries. The code completion for the namespace import always offers the required
amount of subsequent path elements in order to complete the namespace so that the corresponding
entities can be accessed, for example, business objects or reuse libraries.
You can use a literal, for example, as an expression on the right of an assignment or as a parameter of a
method call in a path expression.
In a literal string, you can use a backslash (\) to escape characters, such as carriage returns or quotation
marks (“). You can use the following escape sequences:
● \n (new line)
● \r (carriage return)
● \t (tab)
● \v (vertical tab)
● \f (form feed)
● \\ (backslash)
● \” (quotation marks)
Description The logical operators AND (&&) and OR (||) always evaluate the overall expression to a Boolean value. The
operands themselves are conditional expressions, which in turn are comprised of arithmetic expressions,
finally breaking down to atomic expressions, such as literals, variable identifiers, and path expressions.
You can also use the NOT operator (!) combined with brackets to override the precedence default value of
subexpressions.
Short circuit evaluations are not supported. That is, if in a logical AND or OR expression the value
of the first operand is sufficient to determine the result of the operation, the second operand is still
evaluated.
Description Usually, you can address the imported objects directly by their names instead of using fully qualified names.
However, if more than one object type (for example, a business object node, query, association, or action)
is declared with the same name, you need to fully qualify the objects in order to make them unambiguous.
This is necessary, for example, in the following cases:
● Two namespaces are imported that contain business objects with the same name.
● You have created a business object with the same name as an SAP business object. To reference
the SAP business object, you need to enter the fully qualified name of this business object including
its namespace alias. Without mentioning the namespace, the system will choose your business
object instead of the SAP business object.
● You want to access a business object that has the same name as a reuse service or a message.
● A node name in one business object is the same as a query name in the same business object on
the same level.
If the system discovers such a naming conflict, you can either use code completion to insert the correct
path expression or enter it directly by using two colons (::).
Example Fully qualifying names because two namespaces contain business objects with the same name:
import AP.CRM.Global as CRM;
var sapSalesOrder : CRM:SalesOrder;
var mySalesOrder: SalesOrder;
Fully qualifying names because there are nodes, elements or associations within the same name:
import ABSL;
import AP.FinancialAccounting.Global as fin;
var costObject : fin:FinancialAccountingViewOfCostObject;
var descriptionNodeElements : elementsof
fin:FinancialAccountingViewOfCostObject.Node::Description;
var description :
fin:FinancialAccountingViewOfCostObject.Element::Description;
costObject = fin:FinancialAccountingViewOfCostObject.Create();
descriptionNodeElements.Description.content = "A Description";
descriptionNodeElements.Description.languageCode =
LanguageCode.ParseFromString("EN");
costObject.Association::Description.Create(descriptionNodeElements);
description = costObject.Element::Description;
Syntax <root item>[.<data type element> | business object node feature | method
name [ ( <param>* ) ] ]*
Path expression containing a library function parameter (for example, of a reuse library service) for use in
a variable declaration:
<library>.<library function>.<param>.<...>
Path expressions always start with a root item. The root item can be a variable identifier, the this context,
a static access to an imported business object or a reuse library, as well as a message declared in the
business object definition.
If the root item is a variable of a structured data type, the path expression addresses subelements of this
data type. If the this context and imported business objects are used, all supported business object node
features can be addressed through the path expressions. The business object node features are element
and subelement access, associations, queries, actions, including Create with reference [page 220]
actions, and the Create Instance [page 219] operation and the Delete Instance [page 222] operation. If
the root item is a reuse library or a Web service (library), you must add the reuse service or Web service
operation (library function) and at least the parameter. If the parameter is of a structured type, the
path expression can also include the elements and subelements of this type.
Associations are instance-based and they can therefore only be followed by the this context and by
variables that are typed as business object nodes. In contrast, queries are static entities that have to be
retrieved and executed based on imported business objects. As an action can have the multiplicity [0,0],
[1,1], or [1,n], a query can either be accessed statically or instance-based, which depends on the multiplicity.
For the execution of an action, you can provide parameters to the action method call in the same way as
you can provide parameters for the execution of any reuse library service.
Methods and complete reuse libraries can be bound to certain data types and are then automatically offered
in the code completion. In addition to actions that are defined as part of the business object model and that
belong to a certain business object node, there are also various methods that are available for all
unstructured data types, for example, theToString method.
The following evaluated conditions are available for the root node of the reference business object:
● IsStarted
● IsChanged
● IsCancelled
These conditions return the default condition evaluation result for the root node of the reference business
object.
A query does not take data into account that has been created or changed but has not yet been
saved to the database.
Selection Parameters
Each query defines a set of selection parameters. There may be selection parameters that are not part of
a node’s element structure. Selection parameters are passed as a collection to the query. You can create
an empty selection parameter collection by using the CreateSelectionParams function defined for
the corresponding query. You can also add selection parameters to the collection by using the Add function.
Add requires the following parameters:
● QueryParameterPath identifies a query parameter, for which you define the selection
parameter. QueryParameterPath is a path expression that starts with the query variable
describing the same query that was used to create the selection parameters. It is either followed
by a parameter name or, in case the parameter is structured, by an element path. The complete
path must always point to an unstructured parameter.
● Sign defines whether the selection shall be included in the result set ("I") or excluded from the
result ("E").
● Option is an operator used to compare the values defined in the selection parameters with the
actual values in the business object nodes. Possible values are:
Possible values for the Option parameter and what they mean
GT = Greater LT = Less
● LowValue and HighValue define the actual filter values. HighValue is optional and you can
use it for options that allow for ranges, that is, "BT" or "NB". You can either define these values by
specifying literals or by supplying variables or elements of node instances (for example, by using
this.<ElementName>). The type of the provided values must match the type of the specified
query parameter structure element. Please note that he system does not perform an implicit type
conversion.
The values of the options "CP" and "NP" are patterns that can include the wildcard characters "*"
or "+". You can escape a wildcard character by using the "#" character.
There are cases where you need to query for all instances of a business object node that have an association
to a certain instance of another business node. This you can do by adding a selection parameter for the
source foreign key element of the association. The source foreign key elements of custom business objects
are generated implicitly by the system and cannot be accessed by the script code. However, if you need to
access the source foreign key elements, you can use the association name to define a selection parameter.
For this purpose, the Add function has an additional signature with only two parameters:
● The QueryAssociationPath parameter identifies an association (that is, its foreign key
element) for selection. QueryAssociationPath is a path expression that starts with the query
SAP Cloud Applications Studio – Version May 2018 (1805)
230 © 2018 SAP SE. All rights reserved.
variable describing
• PUthe
B Lsame
I C query as the one that was used to create the selection parameters.
Scripting Languages
The path expression is followed by an association name. Please note that the system supports only
foreign key associations defined at the same node where the query is defined.
Example Definition of business object QueryExample:
import AP.Common.GDT as apCommonGDT;
businessobject QueryExample
{
[AlternativeKey]
element Number : IntegerValue;
element NextNumber : IntegerValue;
element Period : DatePeriod;
element Class : ClassificationCode; // custom code list data type with
values ALPHA and BETA
association ToOtherBusinessObject to Target;
action Test;
}
Definition of business object Target:
import AP.Common.GDT as apCommonGDT;
businessobject Target
{
[AlternativeKey]
element ID : ID;
}
Script code to demonstrate various options to execute queries:
import ABSL;
// get the default query of QueryExample
var query = QueryExample.QueryByElements;
// 1a) Select all instances
// type of resultData is: elementsof BusinessObject::QueryExample
// which allows for direct modifications, access to associations or
actions, for example: result.GetFirst().Test();
var result = query.Execute();
// 1b) Select data of all instances
// type of resultData is: elementsof BusinessObject::QueryExample
// which just includes business object node data and therefore is faster
than 1a)
var resultData = query.ExecuteDataOnly();
// 1c) Count all instances
var rowCoumt = query.Count();
/*
Let's assume that the following instances of the QueryExample business
object exist on the data base. The result variable as well as the
resultData variable have already been filled with data of all instances
at this point in time:
row Count is 4
*/
// 2) Select a range of Period.StartDate
var startDate1 = Date.Create(2013, 02, 01);
var– Version
SAP Cloud Applications Studio startDate2 = Date.Create(2013, 05, 01);
May 2018 (1805)
Scripting Languages P U B L I C • © 2018 SAP SE. All rights reserved.
var selectionParams = query.CreateSelectionParams(); 231
selectionParams.Add(query.Period.StartDate, "I", "BT", startDate1,
startDate2);
7.2.4.32 Raise Message (Business Logic)
Description You can use the raise keyword to raise messages that have been declared in the business object definition.
When you use the Create method, an instance of a message is created that is automatically bound to the
message type.
The Create method has one mandatory parameter: the severity. You have to supply the severity as a string:
● "E" for errors
● "W" for warnings
● "S" for success messages
As additional optional parameters you can supply the values for placeholder variables as declared in the
message text. The type of these values is ANY.
You do not need to import messages if they are declared in the business object definition. They are then
automatically available in the code completion of the current context.
Description You can use the DistinctBy method to delete duplicate rows in a collection according to the specified criteria.
Description You can use the Remove method to remove those rows from the collection that meet the criteria. This
method returns a new collection, for example, collection A, which contains a subset of the source collection,
for example, collection B.
Description This method allows you to reset an association. If, for example, a target node instance has been deleted by
following the association, you must reset the association because the references that point to the deleted
business object are not cleared automatically. Therefore, such invalid references must be explicitly deleted
and every access to an association must be secured by a previous IsSet check call. For information about
the IsSet check for associations, see Check Associations [page 216].
The Reset method can only be applied to foreign key associations and is not available for variables that
are derived from association access.
Description You can use the Retrieve method to read the data of a single node instance or a collection of node instances
of a business object. The Retrieve method enables you to read data that has been modified but not yet been
stored in the database.
As parameters for the method, you can pass a single alternative key or a collection of alternative keys,
which have been declared as variables. The variables, which contain the alternative key values, need to be
of the same type as the alternative keys specified in the business object. If the method is used for a collection
of node instances, it returns a new collection.
Description The use of the return keyword is mandatory in .absl files that were created by using the Service
Integration wizard. The return value has to be of Boolean type.
For each of the four condition evaluations (Relevance, Start, Change, Cancel) that are possible in a service
integration scenario, the Boolean return value must be used to signal the calling process agent about the
evaluation result. To calculate the condition for the current root node instance, you can access the process
context information of this node and its node values.
Description The InReconciliation Boolean indicator specifies conditions that depend on the mode of execution, that is,
the standard message mode or the reconciliation message mode. The reconciliation mode is an error
recovery mechanism that allows it to send a new message, the reconciliation message. This reconciliation
message contains the complete information and cancels all previous erroneous messages.
Example if (InReconciliation) {
...
}
return false;
Service integration allows you to synchronize data between several involved business objects that are located in
different deployment units in an asynchronous way. The business objects exchange the data through XML messages.
You can use the methods listed below to determine for which nodes of the sending business object the data is
transmitted.
Script files can be used for the condition evaluation, which specifies whether the data of a node is part of the cross-
business-object synchronization. Therefore, the .absl files in service integration scenarios support parameters
that are passed in at runtime. Additionally, a Boolean return value is expected that signals to the calling process
agent whether the business object instance is to be considered in the message construction. Furthermore, the
process context is attached to every business object node instance that allows you to check certain status
information related to service integration.
In script files that are executed within a service integration scenario, the context information is read-only. This means
that the system prevents accessible business object nodes and calls of actions from being changed. The information
about the script file signature (that is, the parameters and return values and their corresponding types) is
documented in a comment block at the very beginning of each .absl file. In service integration scenarios,
various.absl file subtypes are involved. This is also documented in the comment.
The following methods are available for service integration:
● Script File Parameter [page 234]
● Return Values [page 234]
● Process Context [page 228]
Description You can navigate along associations that have been set by the user interface but you can also set associated
node instances explicitly. For this, you can use a simple standard assignment expression that on the left
provides a path expression, whose last element is an association. The path expression on the right must
evaluate to the node type that is expected to be the target node of the modeled association. For such
assignments, you can only use modeled associations with [1,1] or [0,1] multiplicity. The expression on the
right can be, for example, an item of a query execution result or a Create operation.
Description You can use the OrderBy or OrderByDescending method to sort a collection in ascending or descending
order according to the specified sorting criteria. By default, collection columns of numeric and byte type
are sorted by their value and columns of string type are sorted as text. You can define the sorting criteria
as action parameters by using a function literal, which refers to the columns of the collection. To define
multiple sorting criteria, add ThenBy or ThenByDescending statements to the expression.
If the row type of a collection is structured, you need to specify the sorting criteria. The sorting
parameters must be an atomic data type, that is, you are not allowed to define a structured attribute
of the collection row type as a sorting parameter. If the row type is unstructured, you can only sort
by row and cannot specify a sorting criteria.
Sorting does not have a permanent effect on business object nodes. Each time a node is read from
the system, all previous sorting results are lost.
Description The switch control statement provides a more convenient option to express if.. else if.. code
blocks that evaluate exactly the same field against different values again and again. The switch type is
limited to non-structured data types. The case clause allows for arbitrary expressions, for example, the
use of variables.
The default clause is optional.
Description The this keyword defines the context in which the script file is executed. You must use the keyword as the
first member of a path expression that accesses the context. The keyword has the type of the business
object node that the script file is assigned to and, at runtime, points to the current instance of such a
business object node. The keyword can define the root of a path expression, just as imported business
objects do for static access. The this keyword itself is immutable and cannot be modified, whereas the
elements of the node represented by this can be modified.
If you use the this keyword in the coding of a mass-enabled script file, this represents a collection
of business object nodes.
The code completion for the business object node specified by this displays instance-based features such
as node elements, associations and instance-based actions including mass-enabled features. Queries and
static actions are not instance-based and therefore you can address them only through static business
object access.
You can use the GetObjectNodeReference() method along with the this keyword to return the
following information about the business object nodes in a solution:
● Node ID of the relevant business object node
● ObjectTypeCode of the business object
● ObjectNodeTypeCode of the node
Description The while loop statement allows you to execute the statement list in the code body as long as the logical
expression evaluates to true.
The basic SAP reuse libraries of the scripting language extend the scope and functions that you use to implement
your business logic in the studio. These “language-near” libraries provide basic functions that are used quite often,
for example, to retrieve context data, such as the current date or time for the current identity.
SAP reuse libraries allow for parameters that are either data types (CDTs or GDTs) or business object node instances.
The return values have to be data types.
To use basic SAP reuse libraries, you need to import the namespace ABSL with the import keyword. For more
information on the import keyword, see Syntax for Implementation of Business Logic [page 210].
The functions of the SAP reuse libraries can always be accessed in a static manner. In addition, most of the libraries
are bound to a certain data type. In this case, the instance of the data type on which the method is executed will be
automatically passed to the method at runtime as the first parameter.
import ABSL;
var globalDateTime = GlobalDateTime.ParseFromString("2008–03–30");
var date = globalDateTime.ConvertToDate():
This SAP reuse library contains a function that you can use to convert a string to a binary value.
Binary.ParseFromString
Binary.ParseFromBase64String
Binary.ToBase64String
This SAP reuse library contains functions that provide context information, for example, the current time in the time
zone of the user or the identity UUID of the user that is currently logged on.
Context.GetCurrentGlobalDateTime
Description Returns the current date and time in Coordinated Universal Time (UTC).
Context.GetCurrentIdentityUUID
Description Returns the Identity UUID of the user currently logged on.
Context.GetCurrentSystemDate
Description Returns the current date in the time zone of the system.
Context.GetCurrentSystemDateTime
Description Returns the current date and time in the time zone of the system.
Description Returns the current time in the time zone of the system.
Context.GetCurrentUserDate
Description Returns the current date in the time zone of the user.
Context.GetCurrentUserDateTime
Description Returns the current date and time in the time zone of the user.
Context.GetCurrentUserTime
Description Returns the current time in the time zone of the user.
Context.GetCurrentUserLanguage
Context.GetCurrentUISwitches
Description Returns the user interface switches (UI switches) of the current solution assigned to the current user.
Context.GetCurrentSystemTimeStamp
Description Returns the time stamp for the current Coordinated Universal Time (UTC) reference time of the system
as a numeric value.
Context.GetSystemURL
Description Returns the URL of the system. If the optional parameter SingleSignOn is set to True, the SSO enabled URL
is returned.
Context.IsProductionTenant
Context.GetAssignedBusinessRoles
Description Returns all the assigned business roles for a logged in user.
Context.IsPatchSolution
This SAP reuse library contains functions that you can use for currency-based amounts. For example, you can
convert an amount from one currency into another.
CurrencyConversion.GreaterEquals
Description Indicates whether or not an amount is greater than or equal to another amount.
You can compare amounts with different currency codes. The result depends on the exchange rate
maintained in the system.
CurrencyConversion.GreaterThan
CurrencyConversion.LessEquals
Description Indicates whether or not an amount is less than or is equal to another amount.
You can compare amounts with different currency codes. The result depends on the exchange rate
maintained in the system.
CurrencyConversion.LessThan
CurrencyConversion.Equals
CurrencyConversion.Add
CurrencyConversion.Subtract
CurrencyConversion.Round
CurrencyConversion.ConvertCurrency
Description Converts an amount into a different currency based on the exchange rate maintained in the system.
Description Spells out an amount. The integer part and the decimal part of a decimal number are spelled out separately
and returned in the respective fields. If you do not provide the language, the logon language is used as a
default.
This SAP reuse library contains a function that you can use to retrieve data from a supplied Business Object and its
nodes that was changed during the given period based on the Platform Change Document service.
● Only the data of those elements and nodes of Custom Business Objects can be retrieved which are
annotated with Change History (Business Object) [page 183].
● The data of SAP Business Objects will also be retrieved if those business objects have the Platform
Change Document service enabled by SAP.
● This annotation can also be applied to extension nodes and their elements. However, it cannot be
applied to Extension Elements.
● This annotation does not work for Dependent Objects.
Description Returns the data from the Platform Change Documents that matches the selection criteria as described
in the note above.
● BusinessObjectName defines the name of the Business Object. If this is a SAP Business Object it
must contain the respective. namespace, e.g,. AP.CRM.Global:Lead.
● NodeID provides the NodeID of the Root node for the requested instance.
● The other four parameters are optional:
○ NodeName: Restricts the result to given node
○ ToChangeDateTime: If no value is given the current date and time is taken
○ FromChangeDateTime: If no value is given 30 days earlier than the ToChangeDateTime is used
○ ChangerUUID: Only the changes made to the respective. user are returned
Example for // get all changes of Custom Business Object MyOwnBusinessObject based
Custom upon own BO Root node ID
Business Object // for node Root and the last month
// made by anybody
var currentUser = Context.GetCurrentIdentityUUID();
var myChanges = ChangeHistory.Read("MyOwnBusinessObject",
this.GetObjectNodeReference().UUID
"Root");
This SAP reuse library contains functions that you can use to compare dates and to perform simple calculations with
dates. Furthermore, it contains other useful date features, for example, services that you can use to determine the
start or end date of a month related to a specified date.
Date.Create
Date.GreaterEquals
Description Indicates whether or not a date is later than or equal to another date.
Date.LessEquals
Description Indicates whether or not a date is earlier than or equal to another date.
Date.LessThan
Date.IsBetween
Description Indicates whether or not a date is between two specified date values.
Date.GetDay
Date.GetWeekday
Date.GetMonth
Date.GetYear
Date.GetWeek
Date.AddDuration
Date.SubtractDuration
Date.Delta
Description Returns the delta duration between two specified date values.
Date.StartOfMonth
Date.EndOfMonth
Date.StartOfYear
Date.EndOfYear
Date.ConvertToGlobalDateTime
Date.ParseFromString
Description Converts a string into a date. The service accepts both the internal format and the ISO format.
This SAP reuse library contains a function that you can use to convert a string into a date and time value.
This SAP reuse library contains functions that you can use to compare durations and to perform simple calculations
with durations.
Duration.Create
Duration.GreaterEquals
Description Indicates whether or not a duration is greater than or equal to another duration.
Duration.GreaterThan
Duration.LessEquals
Description Indicates whether or not a duration is less than or equal to another duration.
Duration.LessThan
Duration.AddDuration
Duration.SubtractDuration
Negative durations are not allowed. Therefore, the first duration value must be greater than the
second duration value.
Duration.ConvertToDays
Duration.ParseFromString
This SAP reuse library contains functions that you can use to compare global date and time values and to perform
simple calculations with global date and time values. Furthermore, it contains other useful global date and time
features, for example, functions that you can use to determine the start or end of a global date and time of a month.
For GlobalDateTime elements, use the data type GLOBAL_DateTime of namespace http://sap.com/xi/
BASIS/Global.
Some functions include the IsUTC parameter. This parameter indicates whether global date and time is passed in
Coordinated Universal Time (UTC) or to the time zone of the user. This parameter is needed because the user
interface does not pass the date and time in UTC but in the time zone of the user.
GlobalDateTime.GreaterEquals
Description Indicates whether or not a global date and time value is greater than or equal to another global date and
time value.
GlobalDateTime.GreaterThan
Description Indicates whether or not a global date and time value is greater than another global date and time value.
Description Indicates whether or not a global date and time value is less than or equal to another global date and time
value.
GlobalDateTime.LessThan
Description Indicates whether or not a global time value is less than another global time value.
GlobalDateTime.Equals
Description Indicates whether or not a global date and time value is equal to another global date and time value.
GlobalDateTime.IsBetween
Description Indicates whether or not a global date and time value is between two other specified global date and time
values.
GlobalDateTime.GetDate
GlobalDateTime.GetTime
GlobalDateTime.GetMonth
GlobalDateTime.GetYear
GlobalDateTime.GetWeek
Description Returns the calendar week of a global date and time value.
GlobalDateTime.GetHour
GlobalDateTime.GetMinute
GlobalDateTime.GetSecond
GlobalDateTime.SubtractDuration
GlobalDateTime.Delta
Description Returns the delta duration between two global date and time values.
GlobalDateTime.StartOfMonth
Description Returns the start of a month related to a global date and time value.
GlobalDateTime.EndOfMonth
Description Returns the end of a month related to a global date and time value.
GlobalDateTime.StartOfYear
Description Returns the start of a year related to a global date and time value.
GlobalDateTime.EndOfYear
Description Returns the end of a year related to a global date and time value.
GlobalDateTime.ConvertToDate
GlobalDateTime.ConvertToDateTime
Description Converts a global date and time value into a date and time value.
Use this function only when an SAP business object uses the DateTime data type in the http://
sap.com/xi/BASIS/Global namespace. Do not use the DateTime data type in your own
business object definitions.
GlobalDateTime.ConvertToLocalDateTime
Description Converts a global date and time value into a local date and time value. You can specify target time zone . If
no time zone is specified, the function converts the global date and time value into the time zone of the
user that is currently logged on.
GlobalDateTime.ConvertToLocalNormalisedDateTime
Description Converts a global date and time value into a local normalized date and time value. You can specify a time
zone. If no time zone is specified, the time zone of the user that is currently logged on is used.
Description Converts a string into a global date and time value. The function accepts both the internal format and the
ISO format.
LanguageCode.ParseFromString
Description Converts a string into a language code. Before the conversion the system checks if the string is a valid
language code. The function accepts ISO codes only.
This SAP reuse library contains functions that deal with local date and time values.
LocalDateTime.ConvertTimeZone
Description Converts a local date and time value from one time zone into another time zone.
LocalDateTime.ConvertToGlobalDateTime
Description Converts a local date and time value into a global date and time value.
Description Converts a string into a local date and time value. The function accepts both the internal format and the
ISO format.
This SAP reuse library contains a function that deals with local normalized date and time values.
LocalNormalisedDateTime.ConvertToGlobalDateTime
Description Converts a local normalized date and time value into a global date and time value.
Overview
This SAP reuse library contains functions that you can use to draw numbers. The drawn numbers are separated by
identifiers that support different number ranges for different object types, for example document types. These
identifiers are called number range objects.
NumberRange.DrawNumber
Description Draws a new number; ideally the next number in the sequence of a given number range object.
The first value in the range always equals to 1; and the last value is 999.999.999.
In cases where the current value has reached the maximum value 999.999.999, the system raises a
message, and the number range is reset to 0. Hence, the next drawn number is 1.
NumberRange.ResetRange
Example NumberRange.ResetRange("RECORD");
var numberRangeObject : ID = "ORDER";
NumberRange.ResetRange( numberRangeObject );
Result: The value of the number range objects RECORD and ORDER is set to 0.
This SAP reuse library contains functions that you can use for integers and decimals.
Numeric.IsNumeric
Numeric.ParseFromString
Description Converts a string into a numeric value. Before the conversion the system checks if the string is a valid
numeric value.
The decimal point can be a dot as well as a comma depending on the locale.
Description Converts a numeric value into a string by rounding it to a given number of decimal places. The string format
depends on the locale of the current user. If you want to ensure that the dot is used as decimal mark
independently of the locale, you need to provide the optional RawRepresentation parameter. This
parameter is useful, for example, when the sting needs to be parsed again into a numeric value using the
Numeric.ParseFromString function.
If you want to ensure that the dot is used as decimal mark consistently, use the following
statement: this.result = this.pi.RoundToString( 2 , true);
This SAP reuse library contains functions for codes and identifiers with implementation type NUMC.
For information about the data types and their implementation type, see the Business Center at https://
www.sme.sap.com under SAP Business ByDesign Community Wiki SAP Business ByDesign Studio Public
Solution Model . You can find the information in the Published Data Types List.
NumericCharacter.ParseFromString
Description Converts a string into a numeric character. Before the conversion the system checks if the string is a valid
numeric character.
This SAP reuse library contains functions that you can use to compare quantities and to perform simple calculations
of quantities. The functions allows to use different units of measure if they are convertible.
QuantityConversion.GreaterEquals
Description Indicates whether or not a quantity is greater than or equal to another quantity.
QuantityConversion.GreaterThan
QuantityConversion.LessEquals
Description Indicates whether or not a quantity is less than or equal to another quantity.
QuantityConversion.LessThan
QuantityConversion.Equals
Description Adds two quantities. You can add quantities of different units of measure (UoM). If you do not specify a
target UoM, the function returns the result in the UoM of the first quantity.
QuantityConversion.Subtract
Description Subtracts a quantity from another quantity. You can substract quantities of different units of measure
(UoM). If you do not specify a target UoM, the function returns the result in the UoM of the first quantity.
QuantityConversion.Divide
This SAP reuse library contains the following functions that you can use, for example, to compare times.
Time.GreaterEquals
Description Indicates whether or not a time value is greater than or equal to another time value.
Time.GreaterThan
Time.LessEquals
Description Indicates whether or not a time value is less than or equal to another value.
Time.LessThan
Description Indicates whether or not a time value is less than another value.
Time.GetHour
Time.GetMinute
Time.GetSecond
Time.Delta
Description Returns the duration delta between two specified time values.
Description Converts a string into a time value. The function accepts both the internal format and the ISO format.
This reuse library contains functions for Universal Unique Identifiers (UUIDs).
UUID.ParseFromString
Example this.result.content =
UUID.ParseFromString("00163E01023602DD88AFE2F34FC4C3F3");
Result: UUID 00163E01023602DD88AFE2F34FC4C3F3
UUID.Generate
This SAP reuse library contains functions for read access logging (RAL).
SensitivePersonalData.WriteDirectAcessLog
Description Writes direct access logs when sensitive personal data is read and sent through one of the channels.
Channels can be, for example, ABSL_MSG.
GetRALLogItem
Description Creates an instance of RAL log item, that will be recorded in the Read Access Log. This context function
can be used only for the fields marked as Sensitive Personal Data.
GetChangeLogInfo
Description Fetches the BO name, Node name, or Node ID when used with the ChangeHistoryEnabled node.
Use this function to delete the ChangeLogHistory attached to the respective node in deletion BADI absl.
PrivateAccountRoot.Account_ID = "XXXX".Concatenate(str);
ChangelogInfo = PrivateAccountRoot.GetChangeLogInfo();
ChangelogInfoCollection.Add(ChangelogInfo);
ChangelogInfo.Clear();
result.ChangeDocumentNodeDetails = ChangelogInfoCollection;
result.ErrorOccurredDuringDestroy = false;
}
return result;
WebServiceUtilities.ExecuteWebService
Descriptio Calls a REST or RSS/Atom mashup Web service. This reuse library focuses on relatively simple Web services
n that can be modeled as a mashup Web service. If you need to control the Web service call in more detail, you can
use the WebServiceUtilities.ExecuteRESTService reuse function.
For more information, see Using a Mashup Web Service in a Script File [page 507].
Descriptio Calls a REST Web service defined in an External Web Service Integration scenario. For more information, see
n Integrate an External Web Service Using REST [page 552].
This reuse library allows you to control the Web service call using a set of parameters. You can, for example,
dynamically create the request body or use specific authentication mechanisms or header parameters.
The following parameters need to be filled:
● CommunicationScenarioName: Name of the communication scenario (.csd) defined in the studio
● ServiceName: Name of the External Web Service Integration scenario (.wsid) defined in the studio
● HttpMethod: Function supports the following HTTP methods: ‘GET’, ‘POST’, ‘PUT’, ‘DELETE’
● ContentType: Specifies the character encoding (for example, text/html) of the request
● ResourceName: Resource name of the rest service that is concatenated to the defined URL in the service
of the communication arrangement
● URLParam: Additional URL parameters that are concatenated to the defined URL in the service of the
communication arrangement
● HeaderParameters: Header parameters of the request
● Body: Body of the request. Body has to fit with defined content type.
After executing the service, the function fills the following parameters in the result structure:
● ReturnCode: Return code of the REST call, for example, 200for success
● Content: Content of the response
● HeaderParameters: Header parameters of the response
● ContentType: Content type of the response
headerParam.Name = "Accept-Language";
headerParam.Value = "de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4";
headerParams.add(headerParam);
urlParam.Name = "listZipCodeList";
urlParam.Value = "20910";
urlParams.add(urlParam);
var result =
WebServiceUtilities.ExecuteRESTService(communicationScenarioName,
serviceName,"GET", "ext/plain", "ndfdXMLclient.php", urlParam, headerParams,
"");
For more information, see Example: Consume a REST Service [page 554].
This function is available only for REST based services, and not for SOAP based services.
The SAP reuse libraries for business areas provide additional, very specific services to the scripting language that
are relevant for functions in the business areas of the cloud solution from SAP, for example, in the Financial
Management business area. These services are all based on entities provided by SAP.
To use an SAP reuse library for a specific business areas, you need to import the namespace of the relevant
business area with the import keyword, for example, import
AP.FO.ProductDataMaintenance.Global;. For more information about the import keyword, see Syntax
for Implementation of Business Logic [page 210].
To use this SAP reuse library, you need to import the AP.IS.CodingBlock namespace.
AccountingCodingBlockAssignmentUtilities.ToMessage
Example FormData.ItemAccountingCodingBlockAssignment =
this.ToItemAccountingCodingBlockAssignment.ToMessage( );
In this example, FormData.ItemAccountingCodingBlockAssignment is
theAccountingCodingBlockAssignment global data type.
this.ToItemAccountingCodingBlockAssignment refers to the
AccountingCodingBlockAssignment subnode of the
AccountingCodingBlockDistribution dependent object.
Result: Accounting coding block assignment.
To use this SAP reuse library, you need to import the AP.FO.Address.Global namespace.
AddressSnapshotUtilities.ToForm
Description Converts an address into a format that can be used in a print form. The data stored in an instance of the
Address Snapshot business object is converted into the FormAddress global data type.
This SAP reuse library contains a service that is based on advanced functions for date and time processing. To use
this library, you need to import the AP.IS.DateAndTime.Global namespace.
DateTimeUtilities.GetNextActiveTimePoint
Description Returns the next active time value based on the calendar, direction (+ or -) and the date and time value
passed.
DateTimeUtilities.MoveTimePoint
Description The MoveTimePoint operation moves a time point by a specified duration either forwards or backwards on
a given calendar. The response structure returns the time point considering working or non-working days
when a calendar is used for calculation. If the operation is used without a calendar, the default (gregorian)
calendar is used.
This reuse library contains a service that is relevant for the Financial Management business area. To use this library,
you need to import the AP.FO.CompanyFinancialsProcessControl.Global namespace.
FinancialsProcessUtilities.GetProcessLockStatus
Description Returns the process lock status for a given accounting transaction date, company and business transaction
type group. Please note that on the user interface of SAP Business ByDesign, process lock is called “Process
Control” and accounting transaction date is called “Posting Date” or “Proposed Posting Date” .
For information about the process lock, see the SAP Business ByDesign Library under Business
Areas Financial Management Financial and Management Accounting General Leger Master
Data Companies View Quick Guide for Companies (General Ledger) Set the Process Control .
This SAP reuse library contains a service that is based on the Set of Books business object provided by SAP. To
use this library, you need to import the AP.FinancialAccounting.Global namespace.
SetofBooksUtilities.GetFiscalYearStartEndDate
Descriptio Returns the start date and the end date of the fiscal year for a given company, set of books, and fiscal year.
n
This SAP reuse library contains a service that is based on the Material business object provided by SAP. To use
this library, you need to import the AP.FO.ProductDataMaintenance.Global namespace.
Description Converts a quantity of a material or product into a different unit of measure or quantity specification.
Example this.quantity_in.content = 1;
this.quantity_in.unitCode = "XPX";
this.unit_out = "EA";
this.quantity_out =
this.toMaterial.QuantityConversion( this.quantity_in, this.unit_out );
In this example, toMaterial refers to the Material business object.
Result: Quantity value, for example, 20 EA
This SAP reuse library contains a service that is based on output management functionality. To use this reuse library,
you need to import the following namespaces:
● AP.Common.GDT
● BASIS.Global
● DocumentServices.Global
Availability
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
OutputManagementUtilities.GetPDF
Descriptio Provides business object data in a portable document format (PDF) document.
n
Example //variables
var FormTemplateLanguage = "E";
var PDF : BinaryObject;
var FormTemplateCode : OutputRequestFormTemplateCode;
FormTemplateCode.content = "ZMEI2TXR_P3JE6"; //Code is Form Template Header
Code
OutputManagementUtilities.CreatePrintQueueItemWithFormTemplate
Descriptio Enables you to create print queue instances based on the form template code, country code, language fields as
n inputs to fetch the corresponding form template. The XML binary content along with the form template is used
to generate the actual PDF content.
This SAP reuse library contains a service that is based on the PriceAndTaxCalculation dependent object
provided by SAP. To use this library, you need to import the AP.FO.PriceAndTax.Global namespace.
PriceComponentUtilities.ToMessage
Example FormData.PriceComponent =
this.PriceAndTaxCalculation.PriceComponent.ToMessage( );
In this example, FormData.PriceComponent is the FormPriceComponent global data
type .this.PriceAndTaxCalculation.PriceComponent refers to the
PriceAndTaxCalculation dependent object.
Result: Form price component.
The SAP built-in functions of the scripting language extend the scope of the syntax for the implementation of your
business logic in a similar way as the basic reuse libraries. However, in contrast to the reuse libraries, you do not
need to import a namespace to use the built-in functions.
Clear All data types except for Boolean data types. Clears a value.
IsInitial All data types except for Boolean data types. Indicates whether a value is initial
or not. Returns a Boolean value.
ToString ● All base types except for string data types Converts a value into a string.
● All non-base types that are not structured For binary values UTF-8 encoding
is used. Invalid byte sequences are
● Amount (http://sap.com/xi/AP/Common/GDT)
replaced by the replacement
● Quantity (http://sap.com/xi/AP/Common/GDT) character (U+FFFD). The
● LOCAL_DateTime (http://sap.com/xi/BASIS/Global) replacement character is shown as
● LOCALNORMALISED_DateTime (http://sap.com/xi/BASIS/Global) a black diamond with a white
question mark.
Example:
if (!this.numericValue.IsInitial()) {
this.string = this.numericValue.ToString();
this.numericValue.Clear();
}
You can use these functions to read the description of numeric code data types or character-based code data types.
If you use a structured data type, the method binds to the structure but not to the content element.
GetDescription
Description Returns the description of a code value in the language of the user. For some data types, for example, if
you use the RegionCode data type, you also need to provide the ListID element.
GetDescriptionInOtherLanguage
Description Returns the description of a code value in a specified language. For some data types, for example, if you
use the RegionCode data type, you also need to provide the ListID element.
GetAllValuesAndDescriptions
Description Returns a collection of values and descriptions for a code data type in the language of the user. For some
data types, for example, if you use the RegionCode data type, you also need to provide the ListID
element.
GetAllValuesAndDescriptionsInOtherLanguage
Description Returns a collection of values and descriptions for a code data type in a specified language. For some data
types, for example, if you use the RegionCode data type, you also need to provide the ListID element.
These functions contain description and processing functions for character strings.
Contains
EndsWith
Find
Description Searches from left to right and returns the position of a substring in a string. Optionally, you can define a
search area by specifying the start position only or by specifying the start position as well as the length of
the search area. If no substring is found, the function returns the value "-1".
The function returns the value “-1” and raises a message if the system encounters one of the following
issues:
● The substring is empty (error message)
● The start position is not within the length of the string (error message)
● The length succeeds the length of the string (error message)
● The source string is empty (information message)
Description Searches from right to left and returns the position of a substring in a string. Optionally, you can define a
search area by specifying the start position only or by specifying the start position and the length of the
search area. If no substring is found, the function returns the value "-1".
The function returns the value “-1” and raises a message if the system encounters one of the following
issues:
● The substring is empty (error message)
● The start position is not within the length of the string (error message)
● The length succeeds the length of the string (error message)
● The source string is empty (information message)
FindLastRegEx
Description Searches from right to left and returns the position of a regular expression pattern in a string. Optionally,
you can define a search area by specifying the start position only or by specifying the start position and the
length of the search area. If no substring is found, the function returns the value "-1".
The function returns the value “-1” and raises a message if the system encounters one of the following
issues:
● The substring is empty (error message)
● The start position is not within the length of the string (error message)
● The length succeeds the length of the string (error message)
● The source string is empty (information message)
For information about the operators that you can use in a regular expression pattern, see the ABAP Keyword
Documentation.
Description Searches from left to right and returns the position of a regular expression pattern in a string. Optionally,
you can define a search area by specifying the start position only or by specifying the start position and the
length of the search area. If no substring is found, the function returns the value "-1".
The function returns the value “-1” and raises a message if the system encounters one of the following
issues:
● The substring is empty (error message)
● The start position is not within the length of the string (error message)
● The length succeeds the length of the string (error message)
● The source string is empty (information message)
For information about the operators that you can use in a regular expression pattern, see the ABAP Keyword
Documentation.
Length
Matches
Description Indicates whether or not the source string matches the regular expression pattern.
The function raises a message and returns the result false, if the system encounters one of the following
issues:
● The regular expression pattern is empty (error message)
● The regular expression pattern is invalid (error message)
● The source string is empty (information message)
ReplaceRegEx
Description Returns all locations in a string with a substring that match a regular expression pattern. Optionally, you
can define a search area by specifying the start position only or by specifying the start position and the
length of the search area.
If the substring is empty or the regular expression pattern is invalid, the function returns the source string
and raises an error message. If the source string is empty, the function returns an empty string and raises
an information message.
For information about the operators that you can use in a regular expression pattern, see the ABAP Keyword
Documentation.
StartsWith
Substring
Description Returns a substring of a string starting at a specified position. Optionally, you can define the length of the
substring.
The function raises a message and returns an empty string, if the system encounters one of the following
issues:
● Either the start position or the sum of start position and length of the substring is not within the
length of the string (error message)
● The length of the substring succeeds the length of the string (error message)
● The source string is empty (information message)
● The start position or the length of the substring is a negative number (error message)
ToLowerCase
ToUpperCase
Trim
Description Deletes leading and trailing characters. It is not relevant for the result, in which order you pass the
characters to the system. If you do not specify a character, the system removes all blank characters.
If the source string is empty, the system raises an information message and returns an empty string.
TrimLeft
Description Deletes leading characters. It is not relevant for the result, in which order you pass the characters to the
system. If you do not specify a character, the system removes all blank characters.
If the source string is empty, the system returns an empty string and raises an information message.
TrimRight
Description Deletes trailing characters. It is not relevant for the result, in which order you pass the characters to the
system. If you do not specify a character, the system removes all blank characters.
If the source string is empty, the system returns an empty string and raises an information message.
This function binds to code and identifier data types with the NUMC implementation type.
You can use the Repository Explorer tool window to explore the SAP data types that are released with the public
solution model (PSM) and their implementation type. For more information, see Repository Explorer [page 50].
ToNumeric
You can use these functions to remove leading zeros from or add leading zeros to numeric identifier data types and
character-based identifier data types.
As a prerequisite for this function, the alpha-conversion indicator for the data type must be set.
AddLeadingZeros
RemoveLeadingZeros
Overview
The scripting language supports basic data types such as string, numeric and Boolean values. In addition, the existing
metadata of the underlying SAP cloud platform for core data types (CDTs) and global data types (GDTs) is made
available.
The implementation type of the particular data type is taken into account during the mapping of CDTs and GDTs to
the basic types of the scripting language. In the studio, you can explore all SAP data types that are released with the
public solution model (PSM) and their implementation type in the Repository Explorer on the Data Types tab. For
more information, see Repository Explorer [page 50].
For more information, see the data type definitions of the World Wide Web Consortium (W3C ) at http://
www.w3.org/TR/xmlschema-2/ .
As a consequence, you do not need to implement validations in your script files to ensure that the user input matches
the data type definition. The SAP web service runtime validates the service input according to the data type definition
(XSD schema validation).
position = string.Find("\"augue\"");
this.ShortNote = string.Substring(position);// result: ""augue" duis …" (40
char)
Syntax
If variables are typed with data types that belong to the same basic type in the scripting language, they are implicitly
converted by the scripting language. For example:
this.ID = this.ShortName;
if ( this.Amount.content > this.IntegerValue) …
If variables are typed with data types that belong to different basic types in the scripting language, they need to be
converted by using conversion functions, for example, ToString(), Numeric.ParseFromString(),
GlobalDateTime.ConvertToDate()..
Behavior
If you perform operations on string variables in your script files, you need to ensure that the length of the result
strings match the data type definition. For example:
// ShortName is typed with LANGUAGEINDEPENDENT_SHORT_Name -> length = 10
// LongName is typed with LANGUAGEINDEPENDENT_LONG_Name -> length = 40
this.ShortName = this.LongName.Substring(0, 10);
The program terminates when saving if the length of the LongName field is greater than 10 characters and no
check exists.
If the content of a variable is outside the range that is specified by the data type definition, the following can occur
as a consequence:
● Program termination, for example, an overflow error
● A system message
● An implicit conversion, for example, a cutoff
Variables of unrestricted length, for example, variables of the LANGUAGEINDEPENDENT_Text data type, are
truncated at a length of 255 characters as soon as they are saved to the database. For texts that are longer
than 255 characters, use the TextCollection dependent object.
For variables that are typed with numerical data types, rounding is performed according to the definition of the target
data type. While the scripting language uses decfloat34 internally, the values are rounded according to the
definition of the data type as soon as the value is assigned to a business object element.
The UI runtime performs upper case conversion and alpha conversion automatically. The scripting language,
however, does not perform these types of conversion automatically. Therefore you need to ensure this in your script
files.
The UI runtime performs a content check of the code list. The scripting language, however, does not perform this
check automatically. Therefore you need to ensure this in your script files.
Overview
The front-end script is the programming language used in the user interface designer (UI designer) to define a set
of rules and the logic of the behavior of UI controls. For example, you can write a front-end script to enable an edit
button only when a field is selected on the user interface. The front-end script must only be used for user interface
related adaptation; it must not contain any business logic.
Front-end scripts are used in the following use cases:
● Dynamic setting of UI properties such as Visible, Enabled, Read-only, Mandatory, and Color
● UI-specific code lists
● Dynamic calls of event handlers (for example, for dynamic OBN links)
Script Execution
All scripts (including calculation rules) are executed in a sequential manner together with all other events by the
event queue processor in the UI runtime on the client. Parallel execution of scripts is not possible. For each execution
of a script, the scripts environment is recreated. All variables, including global variables, are reset.
Syntax
The scripts are defined as part of a UI component model. The UI component models are stored and processed as
XML files; the script sources are stored as character data sections within these UI component models. The character
set of the scripts is based on UTF-8.
Each script and each block used inside control statements is a sequence of statements. For more information, see
Lexical Structure of Front-End Scripts [page 292] and Syntax of Front-End Scripts [page 293].
For more code samples, see Front-End Code Snippets [page 297].
Any software coding or code lines/strings (“Code”) provided in this documentation are only examples
and are not intended for use in a productive system environment. The Code is only intended to better
explain and visualize the syntax and phrasing rules for certain SAP coding. SAP does not warrant the
correctness or completeness of the Code provided herein and SAP shall not be liable for errors or damages
cause by use of the Code, except where such damages were caused by SAP with intent or with gross
negligence.
The lexical structure of the front-end scripts contains identifiers, comments, and literals.
Identifiers
Identifiers consist of:
● Letters: a-z, A-Z
● Digits: 0–9
● Special: underscore ( _ )
Identifiers must start with a letter or an underscore. There is no length restriction for identifiers.
We recommend using reasonable identifiers since parsing times are adversely affected by large identifiers.
Comments
Comments follow Java/C# specification:
● Single line comments start with //. The remainder of the line is considered part of the comment.
● Comments delimited by /* and */. All content between the delimiters is considered part of the comment.
Literals
● String Literals
String expressions begin and end with double or single quote marks, and these string expressions are subject
to backslash escape.
The scripting engine does not support any escape sequences in the literals.
● Numeric Literals
○ -1234: Numeric integers must only contain decimal digits (other characters such as underscore ( _ ) are
not supported).
○ 123.56: Decimals must consist of two strings of decimal digits separated by a period ( . ).
See Also
Syntax of Front-End Scripts [page 293]
The syntax of the front-end script contains variables, statements, and expressions.
Variables
The following variables are supported:
● Global variables prefixed by a $-character
The UI runtime framework automatically adds the following global variables into the script environment:
○ $controller: allows interaction with the UI component controller. For more information, see Global
Variable: $controller [page 307].
○ $data: allows access to and modification of the data of the UI component. For more information, see
Interacting with Runtime Data [page 303].
○ $textpool: allows the use of modeled texts from the text pool of the UI component.
○ $eventArgs: allows accessing event-specific data.
○ $currentrow: for calculation rules of controls used inside iterator elements (for example, cell renderers
in the table control), $currentrow provides access to the list row against which the control is bound.
● Local variables
The basic types that can be used for scripting correspond to the types used by the UI controller:
● boolean
● integer: a 32–bit integer value
● decimal: a 128–bit data type. Compared to floating-point types, the decimal type has a greater precision
and a smaller range, which makes it suitable for financial and monetary calculations.
● string: string literals
● date: date and time
● data object references: references to elements from the data container of the UI component.
The initial type of a variable is determined the first time the variable is assigned a value. Afterwards, only values of
the same type can be assigned.
Constants are not supported.
Statements
Simple statements are as follows:
assignment statement
Syntax assignment :=
reference = expression
Syntax arguments :=
expression
| expression, argument_list
print_statement :=
print expression
| print arguments
Comment The print() statement, although supported, does not have any practical value for the scripts used in the runtime
framework. It is used for internal debugging purposes only.
if statement
Syntax if_statement:
if_predicate block end
| if_predicate block else_block
| if_predicate block elseif_statement
if_predicate:
if expression then
| if expression NEWLINE
else_block:
else block end
elseif_statement:
elseif_predicate block end
| elseif_predicate block else_block
| elseif_predicate block elseif_statement
elseif_predicate:
elif expression then
| elif expression NEWLINE
if ( true )
print 'ok'
end
a=1;
if ( a==2 )
print 'ko' ;
elif ( a==1 )
print 'ok' ;
else
print 'ko' ;
end
a=1;
if ( a==2 )
print 'ko' ;
elif ( a==1 )
b=3;
if ( b==2 )
print 'ko' ;
elif ( b==1 )
print 'ko' ;
else
print 'ok' ;
end
else
print 'else reached' ;
print 'ko' ;
end
unless statement
Syntax unless_statement :=
unless_predicate block end
| unless_predicate block else_block
unless_predicate :=
unless expression then
| unless expression NEWLINE;
else_block :=
else block end
Syntax ternary_statement :=
expression ? statement : statement
Comment In this example, the expression on the left side evaluates to "true".
The assignment statement a=1 is executed.
for statement
Syntax for_statement :=
for_in block end
for_in:
for reference in expression NEWLINE
Comment Only integer ranges in the form 2..5 (last item included) and 2...5 (last item excluded) are supported. All other
expressions will raise a runtime error.
while statement
Syntax while_statement:
while_predicate block end
while_predicate:
while expression NEWLINE
Example i=0
while i<5
print i
i=i+1
end
Expressions
The front-end script interpreter supports the following expressions:
● literals, decimal numbers, integer numbers, constants true and false
● parentheses to indicate precedence
● method invocations
● variables
● unary expressions
● boolean expressions
● relational expressions
● equality expression
All statements are expressions, including methods and variables. The last member pushed onto the stack is
considered as the return value of a method, there is no return statement. The return value of a calculation
rule in the runtime framework is determined in the same way. To return a value from a method or from the
front-end script program, use an expression.
Example
a // will return the value of the variable 'a'
result = a // will also return the value of the variable 'a' because the assignment
statement is an expression and puts 'a' onto the stack
The variable result has been introduced to facilitate adoption of the runtime framework. It is a common
cause of error that after an assignment to result (which is a way of moving a value to the stack), another
statement moves another value to the stack and this is then used as the result of the calculation rule.
Calculation Rules
● Make a Control Read Only Using Calculation Rule
● Accessing Data List Values from Calculation Rules
● Access Description Values of Codes in Scripts and Calculation Rules
Language Constructs
● And/Or/If Clauses
● Break Out of a Loop
Other
● Call Another EventHandler
Any software coding or code lines/strings (“Code”) provided in this documentation are only examples
and are not intended for use in a productive system environment. The Code is only intended to better
explain and visualize the syntax and phrasing rules for certain SAP coding. SAP does not warrant the
correctness or completeness of the Code provided herein and SAP shall not be liable for errors or damages
cause by use of the Code, except where such damages were caused by SAP with intent or with gross
negligence.
Description Gets lead selection data from a list and changes an unbound data model field that is assigned to
attribute SelectedVariant of a pane container. Script is executed OnLeadSelectionChange of
DataList:List in Data Model.
Result: In an object worklist, the displayed preview pane changes when a new line is selected.
Description If a link is clicked in a list, and the lead selection does not change, you need to check the event
argument.
Note that if you have a simple source side dispatching script (only one variable involved), we
recommend using the Eventhandler condition instead of a script.
Description You need to create a variable of type Boolean and initial value "true" at root level. Associate the same
with enabled property of the button. In the OnClick event of the button, associate an EventHandler
of type script and use the following script.
Description Note that the selection applies only to the data which is available on the client.
Example lead = 2
$data.DataList.SetLeadSelectedIndex(lead)
Description This function may be useful for custom radio button groups.
Note that you will have to set the text via a textpool element.
Example $data.DataList.Add( )
$data.DataList.Add( )
for i in 0..($data.DataList.Count-1)
$data.DataList.Get(i).Code = i
$data.DataList.Get(i).Value = "text" + i
end
Calculation Rules
Description In the property dialog of the control, the ReadOnly attribute is available. If you open the editor and
chose the Calculation Rule selection, a script window opens. To insert new lines, use the Shift + Enter
key combination. In the example below, you must make sure to add IssuerBankCode as an
invalidation trigger to execute the script.
Note that the value of the last expression is used as the result of a calculation rule. The actual name
of the parameter does not matter. This will lead to unwanted side effects if you use any expressions
after determining the return value. To avoid this, make sure to do a final expression of the return
value at the end of your script. The recommended name for the parameter is result.
Description If you want to get the current value of a datalist field in a calculation rule, you can use
$controller.Resolve and the relative path of the field in the datalist.
Note that there is limited SAP List Viewer (ALV) functionality for calculated fields in lists. For example,
there is no sorting and grouping.
In the example below, to ensure that the value is always recalculated correctly, you also have to add
the fields LowerBoundaryFiscalYearID_LRL_DE and LowerBoundaryAccountingPeriodID_LRO_DE
as invalidation triggers of your calculation rule.
Example if ( $controller.Resolve("./TestRunIndicator_LRI_DE") )
result = $textpool.Lookup("PTK") //Test
else
result = $textpool.Lookup("PTL") //Update
end
Description You can access the code value description by adding .Description.
Language Constructs
And/Or/If Clauses
Description You can put parts of the and/or/if clause in one row.
Description Useful for conditional breakouts from the loops, such as selecting a checkbox depending on a
condition.
i = 0;
while i < $data.DataList.RowCount
if ( $data.DataList.Get(i).dataField == KeyFigureLeadSelected )
break;
else
$data.ManageExceptions.Get(LeadSelection).checkbox1 =
true;
end
end
i = i + 1;
end
Description The following shows how to call the event handlers "FireIncomingCheck" and
"FireAccountingDocument" from a script.
Description Translatable text should not be hard coded in scripts. You should define a new entry in TextPool with
parameter binding.
Description To format an amount according to a currency code, you need a new statement.
Using $System.Saved
Example if ($controller.Utils.IsInitial($data.$System.Saved))
result = true
else
result = false
end
Description Note that DirtyState is an unbound field that needs to be added under /Root in the data model to
save the dirty state temporarily.
To prevent the context from becoming dirty, for example on executing a business object action (and
thus preventing the work protect popup from being shown), you have to do as follows.
Example 1. Add a script operation before the business object action is executed which saves the current
dirty state:
$data.DirtyState = $data.$System.IsDirty
2. Add another script operation after the business object action is executed which resets the
dirty state to the previous value:
$data.$System.IsDirty = $data.DirtyState
Description You can check if an OBN target configured for a floorplan has a valid UI assigned to the current user.
Example $controller.CheckNavigationTarget("ServiceRequestRootCreateWithRefer
ence")
See Also
Front-End Script Reference [page 289]
Overview
The interaction with runtime data is accomplished by accessing members of the global variable $data. The global
variable $data provides access to the controller data container of the UI component by providing a reference to the
Root structure.
The overall composition structure of the data container is determined at design time. It is not possible to add
additional members to a data structure at runtime.
When you use the following rules to work with data container elements, you acquire references to data element
instances. The data elements are mutable.
Examples:
// access the field 'NameField' underneat the 'Root' structure
nameFieldRef = $data.NameField
Add() Reference Adds a new list row and returns a myListRef = $data.MyList
to new list reference to resulting list row myListRowRef = myListRef.Add()
row instance. myListRowRef.ProductTitle = 'SAP
instances This may only be used with unbound Business ByDesign'
lists. For bound lists, explicitly myListRowRef.Vendor = 'SAP AG'
modeled list operations have to be
used.
Get(rowIdentifie Reference Returns the list row with the rowRef = $data.MyList.Get('12')
r(string)) to the row specified row identifier or null if no
instance such row exists.
Get(index(string)) Reference Returns the list row at the zero- rowRef = $data.MyList.Get(2)
to the row based index of the list.
instance
RowCount integer Returns the number of rows that are count = $data.RowCount
currently available on the client for
this list.
The value may be smaller than
EffectiveRowCount for paged
lists.
The scripting environment is agnostic of the CCTS type system used by the UI layer. Do not use scripting to
construct or format any representation of a data field value which is intended to be presented to an end user.
Use text pool replacements instead.
Once you have acquired a reference to a data field instance, you may work with it like a normal scripting variable.
This means you may assign or retrieve the value.
Additional properties exist for data fields:
Code Code Returns the code value for a code- codeValue = $data.CodeField.Code
value list field. The value of the field itself
(string) contains the key of the code (which
may differ from the code value for
hierarchical code lists). Returns
null if the code list item for the
code has not yet been read or if the
field does not have a code list.
Overview
The $controller global variable enables script developers to access state information of the UI component
controller and to call controller methods.
ErrorOccu boolean Returns a boolean value that indicates whether an error has if($controller.ErrorOccu
rred occurred. rred)
// block executed on
error
end
Transient boolean Returns a boolean value that indicates whether or not a if($controller.Transient
ErrorOccu transient error has occurred. Transient errors are typically ErrorOccured)
rred caused by input validation errors and have to be resolved by // block which executes
the end user before normal processing can resume. on transient error
end
GetCurren string Returns the current logon language of the running session. $data.currLanguage =
tLanguage $controller.GetCurrentLa
nguage();
Utils <object> Returns an object instance which provides general utilities for utils=$controller.Utils
working with all data types. For more information, see General
Utilities for Working with Data [page 308].
StringUtils <object> Returns an object instance which provides utilities for working utils =
with strings. For more information, see Utilities for Working $controller.StringUtils
with Strings [page 309].
Controller Methods
HandleEvent(eventNa Adds the event with the name eventNameto the $controller.HandleEvent('MyEvent'
me(string)) event processing queue of the controller. The )
method invocation is not synchronous.
Utils returns an object instance which provides general utilities for working with all data types.
An object instance with utilities for working with strings is exposed via the global variable
$controller.StringUtils.
Using the Resolve controller method, script developers can use binding expressions to resolve the value of a field.
binding_expression :=
/Root binding_particles
binding_particles :=
binding_particle
| binding_particle binding_particle
binding_particle :=
/{data element name}
| /{list name}[{row identifier}]
| /{list name}/@{row index}
List Rows
List rows can be addressed as follows:
● By providing the row identifier
Example: Assume that a data field named LastName is defined as a member of the list Addresses, which is
defined under the root of the data model, and the row identifier of the row to be addressed is 4711, the
expression /Root/Addresses[4711]/LastName can be used to address the field.
● By providing the (zero-based) row index
Example: Assume that a data field named LastName is defined as a member of the list Addresses, which is
defined under the root of the data model, and the row identifier of the row to be addressed is the fifth row in
the list, the expression /Root/Addresses/@4/LastName can be used to address the field.
Using indices is not a reliable way of addressing rows in lists that may be paged. Unless modeled
otherwise, all bound lists are paged by default.
The development tools provided by the SAP Cloud Applications Studio (“studio”) are presented in an integrated
development environment (IDE) based on Microsoft Visual Studio. The user interface (UI) of the studio is referred
to as the developer desktop. From the developer desktop you access specific features and tools of the development
environment.
Any software coding or code lines/strings (“Code”) provided in this documentation are only examples
and are not intended for use in a productive system environment. The Code is only intended to better
explain and visualize the syntax and phrasing rules for certain SAP coding. SAP does not warrant the
correctness or completeness of the Code provided herein and SAP shall not be liable for errors or damages
cause by use of the Code, except where such damages were caused by SAP with intent or with gross
negligence.
Availability
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
In SAP cloud solutions, business configuration enables prospective or existing customers to evaluate and set up
their system in the production environment to meet company-specific requirements. It also allows customers to
adapt and optimize their solutions at any time as business needs change.
You must create business configuration content for all solution capabilities that you create using the studio. You
create business configuration content in the studio and anchor your solution in the business adaptation catalog
(BAC) so that it is available for activation by customers who buy your solution.
Availability
Business option (mandatory) Create a business option when no selective adaptation ...Create a Business Option
of business configuration content is required. [page 324]
Business topic and business Create a business topic when you need to provide ...Create a Business Topic and
options multiple business options to key users. Business Options [page 326]
Country Define a country if your solution requires country- ...Create a Country and Business
specific scoping for a country that is not supported by Options [page 329]
the SAP standard cloud solution.
Business configuration set Create a BC set to configure the behavior of business ...Create a BC Set Using an SAP BCO
(BC set) processes in your solution and define code list data [page 332]
types that you can use to model fields in a business ...Create a BC Set Using a Custom
object. BCO [page 336]
Create a BC set using an SAP business configuration
object (BCO) to configure the behavior of standard
business processes in the SAP cloud solution.
Business configuration object Create a custom BCO to define solution-specific ...Create a Business Configuration
(BCO) business configuration content on which you can base Object [page 334]
a BC set.
Business configuration view Create a BC view to allow key users to change the values ...Create a Business Configuration
(BC view) defined in a BC set during fine-tuning. View [page 337]
Fine-tuning project template Create a fine-tuning project template to provide sample ...Create a Fine-Tuning Project
content for a specific scenario that is defined by SAP. Template [page 340]
Tasks
For information about the change and delete restrictions for business configuration content in a
solution that is in maintenance mode, see Maintenance of Business Configuration Content
[page 322].
To delete a business configuration object that is used in a business configuration set, you must first
delete the BC set.
For information about the change and delete restrictions for business configuration content in a
solution that is in maintenance mode, see Maintenance of Business Configuration Content
[page 322].
Create a Tax Decision Tree (available for SAP Business ByDesign only)
You can create a tax decision tree to automatically determine a tax event for a country that does not have an SAP
country version in SAP Business ByDesign.
For more information, see Create a Tax Decision Tree [page 341].
Create a Fine-Tuning Project Template (available for SAP Business ByDesign only)
You perform the following tasks in the studio and in the SAP cloud solution in the Business Configuration work center:
● Create a Fine-Tuning Project Template
In the Solution Explorer, click the Add New Item button and select Implementation Project Template.
You can complete a project once the design has been accepted.
2. In the Solution Explorer, right-click the .bct file of the active implementation project template and select
Complete.
Under Edit Activities, the activities are no longer displayed as links.
3. Optional: Check the status of the implementation project template in the studio by doing the following:
a. Open the implementation project template in the studio by double-clicking the .bct file.
b. Check that the status of the implementation project template is Completed, that a completion date
is displayed, and that you can no longer change the description.
● Reopen an Implementation Project Template
Solution Explorer *.bct Reopen
1. In the studio, open the solution that contains the implementation project template you want to reopen.
2. In the Solution Explorer, right-click the .bct file of the completed implementation project template and
select Reopen.
3. Optional: Check the status of the implementation project template in the studio by doing the following:
a. Open the implementation project template in the studio by double-clicking the .bct file.
b. Check that the status of the implementation project template is Active and that no completion date
is displayed.
4. Optional: Check the status of the implementation project template in the SAP cloud solution by doing
the following:
a. In the SAP cloud solution, choose Business Configuration Implementation Projects and select
your project.
b. Check that the Edit Project Scope and Open Activity List functions are available and that the status
of the project is Started.
To check content in the business adaptation catalog (BAC), for example, for testing purposes, you must be
assigned the Business User role and have access rights for the Business Configuration work center. For more
information, see User Setup Quick Guide [page 31].
1. In the SAP cloud solution, in the Business Configuration work center, open the Implementation Projects view.
2. Select a project and click Edit Project Scope .
The Edit Project Scope guided activity is displayed. The business topic or business option you created using
the Business Configuration Wizard is displayed in the Scoping phase under Scoping Element. The description
and scoping questions you defined in the Business Configuration Wizard are displayed in the Questions phase.
If you have defined BAC elements for your solution, a dialog box opens when you use the Deploy Business
Configuration function. You have to select one of the following options:
● Deploy all business configuration content for your solution
● Deploy only the business configuration content for your solution that is assigned to the business
options you have selected in the business adaptation catalog
This allows you to test both partial and complete activation of your business configuration content in the
development environment.
Overview
The full set of the SAP cloud solution's capabilities is outlined in a central business adaptation catalog (BAC). This
catalog organizes and structures the capabilities into a hierarchy of business areas, packages, topics, and options.
Solutions created in the studio require business configuration content that then appears as elements (BAC elements)
in the catalog and allows administrators to implement solutions in the production environment.
Customers work with the SAP cloud solution in the production environment after it has gone live. This environment
contains all elements required to run the customer's business processes using the SAP cloud solution and customers
can adapt the solution in the Business Configuration work center.
Features
When you create a solution in the studio, you must create business configuration content that contains at least one
business option to allow customers who buy your solution to activate the solution in the production environment.
A business option represents the most detailed decision level involved in defining or adapting a solution capability.
Business options can be hidden or can appear in scoping, fine-tuning, and/or the solution proposal. Each business
option specifies a particular way to perform a function. Each business option belongs to a business topic. For
information about how to create a business option, see Create a Business Option [page 324].
Optionally, you can also create the following business configuration content:
● Business topic
A business topic relates to specific functions within an application area. In the standard SAP solution,
examples are Account Management and Time Administration. Each business topic belongs to a business
package and contains a number of business options.
For information about how to create a business topic, see Create a Business Topic and Business Options
[page 326].
● Business configuration set (BC set)
A BC set is a technical container for the configuration settings and corresponding values that are associated
with a business option. The content contained within BC sets is deployed to the runtime environment where
it is loaded into the underlying configuration tables. Each configuration setting within a BC set has attributes
which specify whether it is hidden, visible, or changeable for the customer.
See Also
Business Configuration Quick Guide [page 314]
Overview
When you create a solution in the studio, you must create business configuration content that contains at least one
business option to allow customers who buy your solution to activate the solution in the production environment.
You can assign your business option to a standard business topic or you can create a business topic to which you
add your business options.
Prerequisites
● You have created and opened a solution in the studio. For more information, see Create a Customer-Specific
Solution [page 165].
● You understand the dependencies that exist between the elements in the business adaptation catalog and
the constraints that are applied by the selections that administrators make during scoping. For more
information, see Scoping.
● To check content in the business adaptation catalog, for example, for testing purposes, you must be assigned
the Business User role and have access rights for the Business Configuration work center. For more
information, see User Setup Quick Guide [page 31].
Process Flow
1. In the studio, you create one or more business options.
If you create more than one business option, you group your business options in a business topic. For
information about how to create one business option, see Create a Business Option [page 324]. For
information about how to create more than one business option, see Create a Business Topic and Business
Options [page 326].
2. You define your business options.
a. You provide a scoping question and details about each business option.
During scoping, administrators select or deselect a business option by answering its associated scoping
question. Scoping questions are located in the business adaptation catalog (BAC) at the business topic
level. A scoping question is displayed for each business option in the BAC. In the SAP cloud solution,
customers can review the details you provide about BAC elements on the Overview and Relevance
tabs.
You can only create a BC view for a BC set that uses a custom BCO. You cannot create a BC view for
an SAP BCO.
When you use the Deploy Business Configuration function, a dialog box opens. You have to select one
of the following options:
● Deploy all business configuration content for your solution
● Deploy only the business configuration content for your solution that is assigned to the business
options you have selected in the business adaptation catalog
This allows you to test both partial and complete activation of your business configuration content in
the development environment.
7. You check that your business configuration content appears in the BAC in the SAP cloud solution.
For more information, see Business Configuration Quick Guide [page 314].
Overview
A customer-specific solution is in maintenance mode, if it has been assembled and downloaded; the solution status
then is Assembled. You can make changes to the solution in a patch; however, you can only make restricted changes
to certain content types. These change and delete restrictions ensure that you do not make changes to a solution
that could lead to loss of data or create inconsistencies or errors on a customer's production tenant.
Action Allowed
Change Name No
Change Anchor No
Change Required Scope With restrictions: You can remove the required scope, but you
cannot add required scope.
Change assigned business options With restrictions: see "Maintenance of Business Options"
below
Action Allowed
Change Name No
Change Anchor No
Action Allowed
Change Name No
Action Allowed
Change Name No
Change Description No
Business configuration set field values: Add or delete new rows Yes
Action Allowed
See Also
Business Configuration Quick Guide [page 314]
Lifecycle Management of Customer-Specific Solutions [page 138]
Maintenance Mode [page 170]
8.2.3 Tasks
Overview
You can create a business topic to group business options and provide multiple business options for customers to
customize your solution.
If you want to create more than one business option, you need to create a business topic first to group the business
options. For more information, see Create a Business Topic and Business Options [page 326].
Procedure
1. In the Solution Explorer, do the following:
a. Click the Add New Item button.
The Add New Item dialog opens.
b. Select SAP Business Configuration BAC Elements and click Add.
The Business Configuration Wizard opens.
2. In the Create and Anchor Elements in the Business Adaptation Catalog step, do the following:
● Under Type of Business Configuration, select Business Option.
● Under Basic Information, do the following:
○ Enter a name and a description for the business option and then enter a scoping question.
Your scoping question indicates the functionality of the business option and allows administrators
to decide whether to select the business option during project implementation. For more
information about project implementation, see Implementing a Project — First Implementation.
○ Optional: Select Visible in Fine-Tuning if you want to assign a business configuration set (BC set)
to the business option and you want customers to be able to adapt the field values of the BC set
during fine-tuning; then under Fine-Tuning, do the following:
1. If customers must complete a fine-tuning activity before the solution goes live, select
Mandatory for Go-Live.
2. Enter a description for the fine-tuning activity.
A fine-tuning activity is only mandatory for go-live in the customer system if a BC set that
was created using a custom business configuration object (BCO) is assigned to the
business option. In this case, you must also create a BC view. For more information about
creating a BC view, see Create a Business Configuration View [page 337].
○ On the Overview tab, write a text that describes the function that this element provides and the
benefits of using this element. Aim to write no more than three to five sentences. However, when
additional valuable information is available, you should include it.
○ On the Relevance tab, write a text that describes when or why the customer should select this
element and what are the implications of selecting or not selecting this element. Explain the
relevance of this element in terms of real-world business requirements.
Result
The system has added the business option to the business adaptation catalog (BAC). You can check the result by
logging on to the cloud solution as a business user. You select an implementation project in the Business
Configuration work center and edit the project scope. The Scoping step displays the BAC elements and you can
navigate to the business option you created.
See Also
Business Configuration Quick Guide [page 314]
Overview
You can create a business topic to group business options and provide multiple business options for customers to
customize your solution.
Prerequisites
● You have created and opened a solution in the studio. For more information, see Create a Customer-Specific
Solution [page 165].
● To check content in the business adaptation catalog, for example, for testing purposes, you must be assigned
the Business User role and have access rights for the Business Configuration work center. For more
information, see User Setup Quick Guide [page 31].
If you need to create only one business option, under Type of Business Configuration, select
Business Option. For information about how to create one business option for a solution, see
Create a Business Option [page 324].
Example: The Bank Directory File Upload business topic allows you to upload
a bank directory from a provider of your choice into SAP’s cloud solution. Before
uploading the file, you must ensure that the contents of the file, namely the bank data,
matches the order prescribed in the SAP format.
○ On the Relevance tab, write a text that describes when or why the customer should select this
element and what are the implications of selecting or not selecting this element. Explain the
relevance of this element in terms of real-world business requirements.
Example: The Bank Directory File Upload business topic is relevant if you wish
to upload a bank directory from a provider of your choice.
3. On the Relevance tab, write a text that describes when or why the customer should select this
element and what are the implications of selecting or not selecting this element. Explain the
relevance of this element in terms of real-world business requirements.
c. Optional: If you want the business option to appear in the BAC, select Visible in Scoping and under
Scoping, do the following:
● If your business option provides functionality that is essential for your solution, select
Mandatory and enter a scoping statement that describes the functionality of the business option.
By default, the business option will be in scope when a customer selects the business topic in the
BAC.
● If your business option is not mandatory, enter a scoping question. Your scoping question
indicates the functionality of the business option and allows administrators to decide whether to
select the business option during project implementation.
d. Optional: Select Visible in Fine-Tuning if you want to assign a business configuration set (BC set) to
the business option and you want customers to be able to adapt the field values of the BC set during
fine-tuning; then under Fine-Tuning, do the following:
1. If customers must complete a fine-tuning activity before the solution goes live, select Mandatory
for Go-Live.
2. Enter a description for the fine-tuning activity.
A fine-tuning activity is only mandatory for go-live in the customer system if a BC set that was
created using a custom business configuration object (BCO) is assigned to the business option.
In this case, you must also create a BC view. For more information about creating a BC view,
see Create a Business Configuration View [page 337].
e. Under Anchor Business Option below, you can either accept the selection of Header Element of the
Solution or select SAP Element and then Select Anchor to anchor your business option in the BAC.
Expand the tree and select your business topic, an SAP business topic or business option group and
click OK.
f. Repeat the steps above for each business option and click Next.
The Create Business Options and Assign Solution Content step now displays all business options that
you created on the right.
4. In the Create Business Options and Assign Solution Content step, assign solution content to each business
option by using the arrow buttons or by means of drag-and-drop.
The system displays the solution content you assign under the business option. You can also use the arrow
buttons or drag-and-drop to unassign solution content.
5. In the Review step, check that the information you have entered is correct and then click Finish.
6. In the Solution Explorer, right-click the .bac file and then select Activate to make the business topic available
in the BAC.
Result
The system has added the business topic to the business adaptation catalog (BAC). You can check the result by
logging on to the cloud solution as a business user. You select an implementation project in the Business
Configuration work center and edit the project scope. The Scoping step displays the BAC elements and you can
select the business topic that you created.
If you have created all business configuration content your solution requires, you can trigger deployment of your
business configuration content to be able to use the content in your solution. To do this, right-click your solution and
select Deploy Business Configuration.
When you use the Deploy Business Configuration function, a dialog box opens. You have to select one of the
following options:
● Deploy all business configuration content for your solution
● Deploy only the business configuration content for your solution that is assigned to the business
options you have selected in the business adaptation catalog
This allows you to test both partial and complete activation of your business configuration content in the
development environment.
See Also
Business Configuration Quick Guide [page 314]
Overview
You can define a country and create one or more business options, if your solution requires country-specific scoping
for a country that is not supported by the SAP cloud solution.
Prerequisites
● You have created and opened a solution in the studio. For more information, see Create a Customer-Specific
Solution [page 165].
Procedure
1. In the Solution Explorer, do the following:
a. Click the Add New Item button and click Add.
The Add New Item dialog opens.
b. Select SAP Business Configuration BAC Elements .
The Business Configuration Wizard opens.
2. In the Create and Anchor Elements in the Business Adaptation Catalog step, do the following:
a. Under Type of Business Configuration, select Country and Business Options.
b. Under Basic Information, enter a name and description and then select the country for which your
solution is relevant.
3. In the Create Business Options and Assign Solution Content step, create one or more business options for
your country by doing the following:
a. Click Create Business Option.
The Create Business Option dialog box opens.
b. In the Create Business Option dialog box, under Basic Information, do the following:
● Enter a name and a description for the business option.
● On the Overview tab, write a text that describes the function that this element provides and the
benefits of using this element. Aim to write no more than three to five sentences. However, when
additional valuable information is available, you should include it.
The Time Recording Integrated with Procurement business option allows you to use
time recording for third party service agents, such as consultants and service
technicians. The working times of service agents can then be allocated to procured
services and purchase orders. The recorded times are taken into account in invoice
verification.
● On the Relevance tab, write a text that describes when or why the customer should select this
element and what are the implications of selecting or not selecting this element. Explain the
relevance of this element in terms of real-world business requirements.
The Time Recording Integrated with Procurement business option is relevant if you
want to consider the working time recorded by service agents for invoice verification.
If the Services with Time Sheet Recordings for Projects business option (within the
Service and Non-Stock Material Procurement business topic) is selected, this business
option is automatically included in your scope.
c. Optional: If you want the business option to appear in the BAC, select Visible in Scoping and under
Scoping, do the following:
1. If your business option provides functionality that is essential for your solution, select
Mandatory and enter a scoping statement that describes the functionality of the business option.
If your business option is not mandatory, enter a scoping question. Your scoping question
indicates the functionality of the business option and allows administrators to decide whether to
select the business option during project implementation.
2. Click Select Anchor and anchor your business option in the BAC by expanding the tree and
selecting a business topic or a business option group.
d. Optional: Select Visible in Fine-Tuning if you want to assign a business configuration set (BC set) to
the business option and you want customers to be able to adapt the field values of the BC set during
fine-tuning; then under Fine-Tuning, do the following:
1. If customers must complete a fine-tuning activity before the solution goes live, select Mandatory
for Go-Live.
2. Enter a description for the fine-tuning activity.
When you define a business configuration set (BC set), you must also specify whether
administrators are able to add or delete the values of specific fields. For more information about
creating a BC set, see Create a BC Set with a Custom BCO [page 336].
You must assign all solution content such as business objects and BC sets to a business option
before you trigger test deployment of your solution. If dependencies exist between BC sets defined
in your solution. for example, a value defined in one BC set is referenced in a second BC set, you
must assign both BC sets to the same business option or you must assign the referenced BC set
to a mandatory business option.
5. In the Review step, check that the information you have entered is correct and then click Finish.
6. In the Solution Explorer, right-click the .bac file and then select Activate to make the country and its business
options available in the BAC.
7. Check that the system has added the country and the business options you created to the business adaptation
catalog (BAC) by doing the following:
a. Log on to the cloud solution as a business user.
b. In the Business Configuration work center, open the Implementation Projects view.
c. Select a project and click Edit Project Scope .
The Edit Project Scope guided activity is displayed.
d. In the Country and Type of Business step, click Edit Countries and check that the country you created
is display in the list of available countries.
e. In the Implementation Focus step, select Complete Solution.
f. In the Scoping step, check that the visible business options you created using the Business
Configuration Wizard are displayed.
The business options are displayed in the Scoping Element column under the business topic you
selected as an anchor. The description and scoping questions you defined in the Business
Configuration Wizard are displayed in the Questions step.
When you use the Deploy Business Configuration function, a dialog box opens. You have to select one of the
following options:
● Deploy all business configuration content for your solution
● Deploy only the business configuration content for your solution that is assigned to the business
options you have selected in the business adaptation catalog
This allows you to test both partial and complete activation of your business configuration content in the
development environment.
See Also
Business Configuration Quick Guide [page 314]
Overview
You can create a business configuration set (BC set) using an SAP business configuration object (BCO) to configure
the behavior of standard business processes in the SAP cloud solution. If you create an implementation of an
enhancement option which is for single use only, you can also define a BC set using an SAP BCO so that you can
enhance the filter values.
● You can only create a BC set using an SAP BCO if you are developing the solution on your development
tenant. For information, see Lifecycle Management of Customer-Specific Solutions on Your
Development Tenant [page 147].
● You cannot create BC sets using SAP BCOs in a solution template.
You can also create a BC set using a business configuration object that you have created in the solution. For more
information, see Create a BC Set Using a Custom BCO [page 336].
Prerequisites
● You have created and opened a solution in the studio. For more information, see Create a Customer-Specific
Solution [page 165].
● You have permission to access the business configuration objects (BCO) that are released with the SAP public
solution model (PSM).
You can only use BCOs that are released with the SAP public solution model (PSM).
Under Business Configuration Object, the system displays the deployment unit, the namespace, whether a
fine-tuning activity is available, and a description of the BCO.
3. In the Define the Values of Your Business Configuration Set step, specify the field values of your BC set by
doing the following:
a. In the BCO hierarchy view, select the root node.
If the BCO only has one node, by default, the hierarchy is hidden.
b. In the field columns, specify values for at least all mandatory fields.
An asterisk (*) is used to indicate mandatory fields. Field values must comply with the data type of the
field. You can display information about a field by clicking the field name.
c. Repeat the steps above for each node.
4. In the Review step, check that the information you have entered is correct and that the namespace of your
solution ( /BY*/) is added to the key field; then click Finish.
A new item with the file extension .bcc appears in the Solution Explorer under the project node. If you access
the values you defined for the BCO using the scripting language, for example, you create a query, the key
fields might contain the solution namepace as a prefix, which is also displayed in the Review step of the
Business Configuration Set Wizard.
5. In the Solution Explorer, right-click your business configuration set and select Activate.
The system generates the required business configuration object(s) and data type(s).
6. In the Business Configuration Wizard, in the Create Business Options and Assign Solution Content step, assign
your BC set to a business option by using the arrow buttons or by means of drag-and-drop.
For more information about assigning solution content to business options, see Create a Business Topic and
Business Options [page 326].
7. In the Solution Explorer, right-click your solution and select Deploy Business Configuration to be able to use
your business configuration content in a solution.
The system deploys the business configuration content you created and makes the field values available in
the development environment.
This allows you to test both partial and complete activation of your business configuration content in
the development environment.
Result
You have created a BC set using an SAP BCO and assigned it to a business option.
See Also
Business Configuration Quick Guide [page 314]
Overview
You can create a business configuration object (BCO) and use it as the basis of a business configuration set (BC
set).
Prerequisites
You have created and opened a solution in the studio. For more information, see Create a Customer-Specific Solution
[page 165].
Procedure
1. In the Solution Explorer, do the following:
a. Click the Add New Item button.
The Add New Item dialog opens.
b. Select SAP Business Configuration Business Configuration Object and click Add.
The Business Configuration Wizard opens.
2. In the Create Business Configuration Object step, do the following:
● Under Basic Information, enter a name and description.
● Optional: Select Create Code List Data Type if you want the system to create a code list data type that
can be used, for example, in business objects and business objects extensions.
In this case, only one key field is allowed.
If you want to use a static code list in your solution, you can create a code list data type. For
more information, see Create a Code List Data Type [page 406].
* The data type is displayed if you have selected the Create Code List Data Type option in step
2.
b. Click Finish.
A new item with the file extension .bco appears in the Solution Explorer under the Business
Configuration node.
5. Activate the business configuration object by right-clicking the .bco file and selecting Activate.
Result
You have created a BCO that you can now use as the basis of a business configuration set (BC set). You can reference
the values of this BCO in more than one BC set. For more information, see Create a BC Set Using a Custom BCO
[page 336].
See Also
Business Configuration Quick Guide [page 314]
Create a BC Set Using an SAP BCO [page 332]
Overview
You can create a business configuration set (BC set) using a business configuration object (BCO) that you have
defined in your solution.
You can also create a BC set using an SAP BCO. For more information, see Create a BC Set Using an SAP BCO
[page 332].
Prerequisites
You have created and activated a business configuration object in your solution. For more information about creating
a BCO, see Create a Business Configuration Object [page 334].
Procedure
1. In the Solution Explorer, do the following:
a. Click the Add New Item button.
The Add New Item dialog opens.
b. Select SAP Business Configuration Business Configuration Set and click Add.
The Business Configuration Wizard opens.
You can also right-click your custom BCO and select Create Business Configuration Set.
2. In the Select a BCO Type and Create a BC Set step, do the following:
a. Under Business Configuration Object Type, select Use Business Configuration Object Defined in
Solution.
b. Under Basic Information, enter a name and a description.
c. Under Business Configuration Object, in Name, select the business configuration object on which you
want to base your BC set; then click Next.
You can only use BCOs that you created in the solution.
3. In the Define the Values of Your Business Configuration Set step, specify the field values of your BC set.
● The field values must comply with the data type of the field. You can display information about
a field by clicking the field name.
● As a partner, you cannot enter values in the Key [Code]* field that start with “Z”. This
namespace is reserved for customers.
● When you, as a customer, enter values in the Key [Code]* field, these values should start with
“Z”. This guarantees that your entries cannot be overwritten by content delivered by a partner
solution. If, however, your business requires that you deviate from this recommendation, you
should inform the SAP partner to avoid clashes of content.
When you use the Deploy Business Configuration function, a dialog box opens. You have to select one
of the following options:
● Deploy all business configuration content for your solution
● Deploy only the business configuration content for your solution that is assigned to the business
options you have selected in the business adaptation catalog
This allows you to test both partial and complete activation of your business configuration content in
the development environment.
Result
You have created a BC set based on a BCO that is defined in your solution and assigned it to a business option.
See Also
Business Configuration Quick Guide [page 314]
Create a BC Set Using an SAP BCO [page 332]
Overview
You can create a business configuration view (BC view) for a business configuration set (BC set) to allow
administrators to add new values during fine-tuning or to delete the values of a BC set. You create the view in the
studio and you model the view in the UI designer.
You can only create a BC view for a business configuration set (BC set) that was created using a custom
business configuration object (BCO). You cannot create a BC view for an SAP BCO.
Procedure
1. In the studio, create a business configuration view by doing the following:
a. In the Solution Explorer, activate the BCO for which you want to create the view by right-clicking
the .bco file ( ) and selecting Activate.
b. In the Properties window, make sure that the activation status of the BCO is Runtime objects up to
date.
c. Right-click the .bco file and select Create Business Configuration View.
The Create Business Configuration View dialog box opens.
d. Enter a name for the view, make sure that your BCO is selected, and then click OK.
A new item with the file extension .QA.uicomponent ( ) appears in the Solution Explorer.
e. In the Solution Explorer, open the BC view by right-clicking the .QA.uicomponent file and selecting
Open in UI Designer.
The view opens in the UI designer.
2. Optional: In the UI designer, modify the BC view, for example, change the field labels:
a. On the Designer tab, select the column whose name you want to change and in the Property Explorer,
under Text Information, click the Label field.
b. Click the arrow button and in the Dependent Property Editor, in the Overridden Text field, enter a new
name.
3. In the UI designer, assign your BC view to the Business Configuration work center by doing the following:
a. In the Configuration Explorer, open the Implementation Projects work center view by opening the /
SAP_BYD_APPLICATION_UI/BCTools/WorkCentre/ folder. The file name of the view is
ImplementationProjects_WCView.WCVIEW.uiwocview.
b. In the Extensibility Explorer, select the ImplementationProjects_WCView.ao.uianchor anchor
and click Assign Component to View.
c. In the Type field, select NavigationTarget.
d. In the Component field, select your BC view from the Repository. It is stored in the following folder:
[name of your solution]_BC] SRC [your BC view] . Click OK and Apply.
You can find the name of your solution in the studio: In the Solution Explorer, select your
solution. In the Properties, in the Project File field, there is the name of your solution.
For information about creating a BC set, see Create a BC Set Using a Custom BCO [page 336].
5. Make your BC view available in the business adaptation catalog (BAC) by doing the following:
a. In the Solution Explorer, select your solution and click Add New Item. Select BAC Elements and click
Add.
The Business Configuration Wizard opens.
b. Follow the wizard steps and create a business option or a business topic and more than one business
option.
Make sure that you select Visible in Fine-Tuning and, if appropriate, Mandatory for Go-Live for the
business option to which you want to assign the BC set that you created to make your BC view
accessible in fine-tuning.
c. In the Solution Explorer, right-click the .bac file ( ) and select Activate to make the business option
available in the BAC.
6. Open your BC view for testing in the cloud solution by doing the following:
a. Log on to the cloud solution as a business user.
b. In the cloud solution, in the Business Configuration work center, open the Implementation Projects
view.
c. Select a project and click Edit Project Scope .
The Edit Project Scope guided activity is displayed.
d. Follow the guided activity and answer the scoping question for your business option with Yes.
The business topic or business option you created is displayed in the Scoping phase under Scoping
Element. The description and scoping questions you defined are displayed in the Questions phase.
When you finish the guided activity, the activity you assigned to your business option is added to the
activity list.
e. In the Implementation Projects view, select the implementation project and click Open Activity List .
The Activity List guided activity opens and displays the Prepare phase. Activity List displays all activities
that are mandatory for go-live. You must add any activities that are optional manually. For information
about adding optional activities, see the activity list documentation in the cloud solution.
f. In the Activity List, click Hide Phased List and search for your activity by the activity description you
defined in the studio.
g. Select your activity and click Open .
Your BC view opens and you can test the result.
If you have assigned more than one BC view to the same business option, a fact sheet with the
links to all of the views is displayed when you click the activity.
See Also
Business Configuration Quick Guide [page 314]
Overview
You can create a fine-tuning project template in the studio as part of a solution. Fine-tuning project templates provide
sample content for a specific scenario that is defined by SAP, such as Financials Chart of Account. The fine-tuning
activities you need to complete for the template are explicitly listed.
Prerequisites
You have created and opened a solution in the studio. For more information, see Create a Solution [page 165].
Procedure
1. In the Solution Explorer, right-click your solution and click Add New Item .
The Add New Item dialog opens.
2. Select SAP Business Configuration Implementation Project Template .
3. Enter a name and click Add.
The Create Implementation Project Template dialog opens.
4. In the Create Implementation Project Template dialog, do the following:
a. Enter a name and a description.
b. From the Activity Group list, select the scenario for which you want to create a template, for example,
Financials Chart of Account.
Information about the required scope of the template and the fine-tuning activities you need to
complete is displayed under the name of the activity group (currently: for Financials Chart of
Account).
c. Click OK to save the template.
A new item with the file extension .bct ( ) appears in the Solution Explorer under your solution.
5. Right-click the .bct file and select Activate.
The status of the template changes to Active.
6. Right-click the .bct file and select Open.
The template opens in a document window.
7. Under Scoping and Fine-Tuning, click Edit Project Scope.
The logon screen of the SAP cloud solution opens in your browser. Do the following:
8. Enter the user name and password that you entered when logging on to the repository.
If you have created a fine-tuning project template for the Financials Chart of Account activity
group, select Financial Management and Accounting General Ledger .
d. In the Questions step, answer the relevant scoping questions based on the information displayed under
Activity Group and click Next.
Select Financial and Management Accounting General Ledger General Ledger and
under Income Statement by Function of Expense, select the In Scope checkbox. Confirm the
Review Status popup by clicking Yes.
e. In the Review step, review your scope changes and click Finish.
f. In the Confirmation step, click Close.
9. In the studio, refresh the template by clicking Refresh in the document window and then click Confirm
Milestone: Design Accepted.
In the cloud solution, the Confirm Milestone: Design Accepted view opens.
10. Select Design Accepted and click Confirm to confirm that you have finished defining the scope of your
template. Confirm the Design Accepted popup by clicking Yes.
You cannot move on to the next phases until you have confirmed this milestone. The confirmation
process can take up to 30 minutes.
11. In the studio, refresh the template by clicking Refresh in the document window .
The links to the individual activities that you need to complete are activated.
12. Complete the activity list by clicking the links to open each activity in the fine-tune phase of the implementation
project.
Result
You have created a fine-tuning project template in the studio and predefined the fine-tuning activities for a specific
scenario. You can now complete your implementation project template. For more information, see Business
Configuration Quick Guide [page 314].
See Also
Complete the Activity List [page 344]
You can create a tax decision tree in the studio to automatically determine a tax event for a country that does not
have an SAP country version in SAP Business ByDesign.
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
Prerequisite
You have created and activated the tax content of the country for which you want to create the tax decision tree. For
more information, see Create Tax Content for Non-Localized Countries in the SAP Cloud Applications Studio .
Procedure
1. In the Solution Explorer, do the following:
a. Select the Withholding Tax checkbox if you want to create the decision tree for withholding tax
determination.
b. Click Add New Item. The Add New Item dialog opens.
c. Select Tax Decision Tree and click Add. The Tax Decision Tree Wizard opens.
2. In the Create Decision Tree step, do the following:
a. Add a Name (2 characters only) and a Description.
b. Select a country from the dropdown list and specify a date from which the decision tree is valid.
c. Click Next to go to the next step.
3. In the Define the Decision Tree Structure step, do the following:
a. Click Add Question. The system creates a root node where you can add your first question.
b. Double-click the root node to define the question type. The Question Form dialog opens where you can
choose from three different parameters: Question, Result, and Error.
c. If you select Question and click OK, the system gives you an option to enter a Question, select a Test
Parameter, Comparison Parameters, and Comparison Value.
d. Specify the question and select the required test parameter, comparison parameters, and comparison
value.
Tax Exemption Reason Code Tax Type, Taxable Country, Tax exemption reason code value
Taxable Region
PartnerTaxGroup Taxable Country, Partner Role Withholding Tax Rate Type value for
[values -SF (Ship From), ST (Ship the corresponding tax type selected
To), CF (Contract From), CT in the context parameter
(Contract To)], Tax Type, Taxable
Region
IncomeType Taxable Country, Tax Type Income type value for the
corresponding tax type selected in
the context parameter
e. Click OK.
The system adds the question to the tree.
f. Click Add Question again. The system creates two nodes: True and False. Double-click True to add a
question as above. Similarly add a question to False. Continue the steps till you reach a result or an
error and click OK to finalize your decision tree.
g. Click Next to go to the Review step.
4. In the Review step, check that the information you have entered is correct and then click Finish.
A new item with the file extension .bccxtax ( ) appears in the Solution Explorer under the project node.
5. In the Solution Explorer, right-click the .bccxtax file and select Activate.
6. In the Solution Explorer, right-click your solution and select Deploy Business Configuration to be able to use
your decision tree in a solution.
Result
You have created a tax decision tree, which you can use to determine the tax event when you process an invoicing
document in the SAP Business ByDesign system.
Overview
You can match business requirements to the capabilities of your solution by completing an activity list of the
implementation and project management activities that customers need to perform before the solution can go live.
You do this in the Prepare phase, the Fine-Tune phase, and the Integrate and Extend phase of an implementation
project.
The system generates the activity list based on the scope defined for the implementation project template. The
activity list is divided into separate phases and includes all mandatory implementation and project management
activities that customers need to complete before the solution can go live. You can add optional activities to the
activity list and complete them; most optional activities relate to the Fine-Tune phase but may also relate to other
phases. In the Prepare phase and the Fine-Tune phase, you must confirm milestones that allow you to track the
status of your implementation project template.
Prerequisites
You have created and activated a fine-tuning project template in the studio and you have defined the scope of this
template in the SAP cloud solution. For more information, see Create a Fine-Tuning Template [page 340].
Procedure
1. Open the activity list to complete it for your implementation project template by doing the following:
a. In the studio, in the Solution Explorer, right-click the .bct file and select Open Project Overview.
The logon screen of the SAP cloud solution opens in your browser.
b. Enter the user name and password that you entered when logging on to the repository.
The Project Overview view opens.
c. Check that the description is correct and that the name in the Title field is the name of your
implementation project template with your project namespace as the prefix.
d. Click Open Activity List .
The Activity List guided activity opens and displays the Prepare phase.
To ensure that an implementation project template and its solution remain consistent, always open
an implementation project template in the Project Overview view by using the Open Project
Overview function in the studio.
Some activities contain data that cannot be copied to another system; therefore, they need to
be repeated in other systems. You can identify these activities in the Repetition Required column.
If you complete an activity in the development environment that requires repetition, the
customer must repeat this activity in the production system. Therefore, we recommend that
you provide documentation for these activities in your Solution Documentation. For more
information, see Documentation Types in the SAP Solution
(ESS_CON_PDI_MainDocTypes.xml). and Templates Quick Guide
(TemplatesQuickGuide.xml)..
c. On the Activity List screen, change the status of each completed activity to Closed. To do this, select
each activity, click Change Status , and then select Closed.
The Activity List screen indicates whether an activity is open, in process, or closed.
At the top of the screen, you can view the overall progress for each phase of your implementation
project template. At the bottom of the screen, you can view the total number of activities in the
activity list for the selected phase and the numbers of open, in process, and closed activities.
● Additional Information
Some activities in this phase have additional information to assist customers in
completing them. You can access the additional information either directly in the Help
Center of the relevant activity under Help Resources by clicking Help Center in the
Infobar.
● Mandatory and Optional Activities
By default, the activity list contains only mandatory activities. In the Fine-Tune phase and
the Integrate and Extend phase, you can add optional activities to the activity list.
● Translate Configuration Settings
You can only provide your configuration settings in fine-tuning activities in one language.
● Restore Default Fine-Tuning Settings
To avoid causing inconsistencies, you cannot delete standard fine-tuning settings.
The activities you need to complete in the Integrate and Extend phase depend on the scope of your
implementation project template.
In the studio, you can create your own business object and define its nodes and relevant elements in the business
object definition. After you have defined your business object, you can generate the screens for your business object.
Availability
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
Scripting Language
The scripting language is used to define business objects and business object extensions as well as to implement
the business logic for cloud partner solutions. This lightweight language is easy to learn and to use with its focused
set of features.
For more information, see here [page 173].
Screens
In the Create Screens dialog, you select the screens you want to use for your solution.
For more information see Screen Types [page 353].
Tasks
If you use a template to create a new project item, do not change or delete the extension of the item
name. For example, do not delete the .bo file extension of the business object file.
A new item with the file extension .bo appears in the Solution Explorer.
A document window opens that displays your business object file in a code editor.
Create a Query
In the studio, you can define queries that allow you to access and combine the fields defined in different nodes or
business objects in a single query and to combine data from different business object nodes. You can also use a
query to make a custom business object available in the enterprise search.
For more information about creating a query, see here [page 363].
See Also
Maintenance of Business Objects [page 358]
In the studio, script files are used to implement the business logic for actions, events or validations of business object
nodes.
Depending on whether you are implementing the business logic for business objects or the business logic for
business object extensions, you can create the following script files:
Action —
— Action validation
Features
Actions
An action is an element of a business object node hat describes an operation performed on that node, for example,
setting a status. The action operates on a set of node elements or instances that have been created or changed.
Action script files are provided if you have added actions to your business object definition.
Event
Please note that if a BeforeSave script file has modified a business object node, the system doesn't
execute the code of an AfterModify script file for this same node anymore.
● AfterLoading
You can implement this event to modify transient fields (only available for business objects) of the current
node of a business object. The system executes the AfterLoading event when it reads a node instance of
a business object from the data base.
You cannot use an AfterLoading event to do the following:
○ Read and modify a transient field of another node
○ Modify a persistent field
○ Create or delete a node
○ Call an action
The system doesn't execute an AfterLoading event for a node instance that is being initially created.
To calculate a transient field at this point in time, you can implement an AfterModify event.
Validations
A validation is used to check if particular conditions are fulfilled, such as the conditions for saving a business object
node. Validations can only read data and cannot change any values. The result of a validation must always evaluate
to a Boolean value, that is, to true or false. The system executes validations in no particular order. It executes all
of the validations, that is, even if a validation already returned false, the remaining validations are executed.
You can create the following validation script files:
● OnSave validation
You can use the OnSave validation to check whether a business object can be saved.
Please note that the system always executes the OnSave validation after having executed the
BeforeSave event.
A validation that checks whether the string “0243” is contained in the elemData field:
if (this.elemData.Contains("0243")) {
return(true);
}
else {
return(false);
}
You can create action validation script files only in solutions or solution templates that have been
created with the 1302/1211 compiler version or higher. You can find the compiler version in the
Properties window of your solution.
Mass Enablement
You can specify whether a script file is to be executed for multiple instances of business object nodes, which is
referred to as mass enabling.
If you work with mass-enabled script files, consider the following:
● To mass enable a script file, you select the Mass Enable checkbox in the Create Script Files dialog box. For
more information, see Define the Business Logic for a Business Object [page 369].
● If you want to modify a mass-enabled script file so that it can only be executed for single instances of business
object nodes, you need to delete the script file first and then re-create it.
Maintenance Mode
You can delete a script file when your solution is in maintenance mode. For more information, see Maintenance Mode
[page 170].
If you use the this keyword in the coding of a mass-enabled script file, this represents a collection of business
object node references.
Performance Checks
This feature provides you with suggestions on how to avoid dumps and improve performance of ABSL scripts,
business objects, business object extensions, mass data runs, and the solution itself. Right-click on
any .absl, .bo, .xbo, and .run file in the solution and click Run Performance Checks.
When you run a check on scripts, business objects, business object extensions, and mass data runs, the system
displays the list of tips that will enhance your system performance, and allows you to directly work on the script
without moving away from the screen. When you run a check on the solution, due to the large volume of objects
involved, the system runs a background job and sends you an e-mail with the list of tips and the particular lines where
you can implement the improvements.
8.3.2.2 Queries
Overview
A query is a service operation that can be used for search and information retrieval operations. It is defined at a
business object node and has selection parameters. The result structure is defined by the business object node the
query is specified for; however, it may also include elements from different business object nodes.
You can use queries to display business object data directly in an object worklist (OWL) using the user interface
designer (UI Designer) or to access the data using the scripting language. For more information about the usage in
UI designer, see Model an Object Work List [page 607] and Configure a Query [page 639].
Default Query
By default, each business object node of a custom business object has a query called QueryByElements. The query
contains all elements of the node as selection parameters and the query result contains instances of this node. In
general, the QueryByElements query has a linear dependency on the number of instances in the business object
node (t = O(n), where n is the number of business object instances in the database).
The QueryByElements query is a simple query and does not provide full-text indexing. We therefore recommend
that you use the default query when:
● The expected number of node instances or collections is small, for example, for an object with configuration
data, or when the execution frequency is low.
● The selection parameter list contains an equal condition on an element that is the alternative key of the node.
An alternative key is supported by an index so the runtime dependency is t = O(log n).
If you define an association in your business object as relevant for access control by using the
RelevantForAccessControl annotation and you use the default QueryByElements query, error
messages related to role-based access management (RBAM) might occur if you use the query to control
access. These RBAM error messages are suppressed when you create a complex query in your solution.
Complex Query
A complex query is a custom query that allows you to access and combine data from different business object nodes
or business objects in a single query. Complex queries support full-text indexing for all query elements (t = O(log n).
We therefore recommend that you define a complex query when a large number of records is expected in the node.
In the studio, you can create queries using the Query Wizard. For information, see Create a Query [page 363]. When
you define a query, you must specify which business object fields to include in the query. You can also specify which
elements you want to:
● Include as search parameters
● Use in text search
● Display in the query result
If an [1,n] association is defined for an element, you cannot use the field in the query result. We therefore recommend
that you select the most detailed node as the parent node. For more information about associations in business
object definitions, see Association [page 180].
If you want to implement instance-based access control for the results displayed in an object worklist
(OWL), you must create a complex query. You cannot create a default query for this scenario. For
information about defining access control, see Define Access Control [page 365].
Executing Queries
● Execute Function in Script Files
The studio enables you to create screens for your business object. In the Create Screens dialog, you are prompted
to select the screen types you want to use. For information on how to create screens, see Generate Screens for a
Business Object [page 370].
You can select the following screen types:
Fact Sheet
Quick View
Quick Create
Thing Inspector
Overview
When you create the screens for your business object in the studio, you are asked to select the screen navigation
you want to use. The following sections describe the two types of navigation that are available (object-based and
thing-based navigation) and help you decide when to use what.
Object-Based Navigation
This is the navigation pattern used in SAP Business ByDesign.
When you use object-based navigation, you enter the application via work center and work center view to get to the
object work list. Then you leave the object work list to work on quick activity or object instance floorplan screens.
The following graphic shows the various screens that you can create for object-based navigation:
Screens Using Object-Based Navigation: (1) Work Center, (2) Work Center View, (3) Object Work List, (4) Quick Activity, (5) Object
Instance, (6) Object-Based Navigation
Thing-Based Navigation
This is the navigation pattern used in the other solutions. The fundamental integral part of thing-based navigation is
a thing.
What Is a Thing?
For the thing ABC Corporation, the thing type would be Business Partners.
When you use thing-based navigation, you also navigate via a work center and a work center to an object worklist as
in object based navigation. However, in thing-based navigation, you can call up quick view and quick create screens
without leaving the object work list or go to a thing inspector screen.
The following graphic shows the various screens that are part of thing-based navigation:
Screens Using Thing-Based Navigation: (1) Work Center, (2) Work Center View, (3) Object Work List, (4) Quick Create (QC), (5)
Quick View, (6) Thing Inspector, (7) Thing Type, ES = Enterprise Search; FD = Feeder
See Also
Generate Screens for a Business Object [page 370]
Screen Types [page 353]
Overview
A customer-specific solution is in maintenance mode, if it has been assembled and downloaded; the solution status
then is Assembled. You can make changes to the solution in a patch; however, you can only make restricted changes
to certain content types. These change and delete restrictions ensure that you do not make changes to a solution
that could lead to loss of data or create inconsistencies or errors on a customer's production tenant.
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
association ToBonusPlan
to BonusPlan using ID —>
association ToBonusPlan
to BonusPlan
● Changing the target of an
existing using clause
association ToBonusPlan
to BonusPlan using ID —>
association ToBonusPlan
to BonusPlan using ID2
Multiplicity of node see see see The following changes are allowed:
comments comments comments [0,1] —> [0,n]
[1,1] —> any
[1,n] —> [0,n]
The following changes are not allowed:
[0,1] —> [1,1] or [1,n]
[0,n] —> any
[1,n] —> [0,1] or [1,1]
Multiplicity of association see see see Only the following multiplicity is allowed:
valuation comments comments comments [0,n]
Association valuation condition Yes Yes not Changing the conditions within a valuation
applicable expression is allowed.
8.3.3 Tasks
In the code editor of the studio, you define your business object by describing the namespace and by adding business
object elements. To describe the structure and interface of the business object, you use specific keywords and
functions.
For more information on the syntax of business objects, see Syntax for Business Object Definitions [page 174].
Procedure
1. Select the document window of your business object.
In the code editor, the following information is displayed:
● The import statement for the AP.Common.GDT SAP namespace that contains the standard data
types:
import AP.Common.GDT as apCommonGDT
You can import further namespaces so that you can use SAP business objects and data types when
you define elements and associations.
● The businessobject keyword and the name of your business object, for example, BonusRule.
The names of the .bo file and of the business object must be identical. Do not change the name
of the business object in the coding.
2. Define the nodes of your business object and their features, such as elements, actions, and associations with
other nodes.
In the following simple business object definition, the ID element is specified for the root node of the
BonusRule business object:
import AP.Commmon.GDT as apCommonGDT;
businessobject BonusRule {
element ItemID : ID;
}
For more information about the keywords that you can use, see Syntax for Business Object Definitions
[page 174].
3. In the File menu, click Save.
Result
You have defined your business object and can now activate it. For more information, see Activate a Business Object
[page 362].
Overview
You can define a label and a tooltip for a business object field. If you then add the business object field to a screen:
● the label is displayed on the screen instead of the field name
● the tooltip is displayed when you place the cursor on the field
Result
In the Solution Explorer in the studio, right-click your screen and select Preview Screen. You are prompted to log on
to the cloud solution.
The label is displayed for the business object field. The tooltip is displayed when you place the cursor on the field.
See Also
Label (Business Object) [page 189]
Tooltip (Business Object) [page 193]
Once you have entered the business object definition in the code editor and saved it, you need to activate the business
object. This ensures that the runtime objects are generated that are required for the business object to function.
Prerequisites
You have defined your business object in the code editor. For more information, see Enter a Business Object
Definition [page 360].
Procedure
In the Solution Explorer, right-click your business object and select Activate.
The content of your business object is activated.
In the studio, you can define queries that allow you to access and combine the fields defined in different nodes or
business objects in a single query and to combine data from different business object nodes. You can also use a
query to make a custom business object available in the enterprise search.
You can use these queries to include the query data in an object worklist (OWL) and to access information from
different nodes and business objects using the scripting language. You must create a query to implement instance-
based access control for the results displayed in the OWL.
If you define an association in your business object as relevant for access control by using the
RelevantForAccessControl annotation and you use the default QueryByElements query, error
messages related to role-based access management (RBAM) might occur if you use the query to control
access. These RBAM error messages are suppressed when you create a complex (custom) query in your
solution.
Prerequisites
● You have created and opened a solution in the studio. For more information, see Create a Customer-Specific
Solution [page 165].
● You have created and activated at least one custom business object in your solution. For information, see
Business Objects Quick Guide [page 346].
● To make a custom business object available in Enterprise Search:
○ The custom business object must contain a description field and a date field.
○ Create a screen scenario.
For more information, see Generate Screens for a Business Object [page 370].
The parent node is the starting point for the field selection in the Select Query Fields step. If
a [1,n] association is defined for a field, you cannot use the field in the query result. Therefore,
we recommend that you select the most detailed node as the parent node. For more
information about associations, see Syntax of Business Object Definitions [page 174].
In the Navigation Target UI field, select the quick In the Thing Type field, select the thing type floorplan
activity floorplan (.QA.uicomponent) of your (_TT) of your solution.
solution. Additionally, you can also select Enable Feed, if you
When you select the Operation, the Inport field is filled want to reference the business object in the Feed view.
automatically.
c. Click Next.
4. Optional: If you want to enable read access logging for sensitive personal data, select Log Sensitive Personal
Data.
5. In the Select Query Fields step, select the fields you want to include in the query.
6. In the Define Query Parameters step, refine the properties of each query parameter.
a. Optional: Change the parameter field name.
b. Optional: Select the Selection checkbox if you want to include the parameter as a search parameter.
e. Click Next.
7. In the Review step, check that the information you have entered is correct and then click Finish.
A new item with the file extension .qry appears in the Solution Explorer.
8. In the Solution Explorer, right-click the business object and select Activate.
Result
You have created a custom query in your solution. In the Solution Explorer, a [query name].qry file ( ) is
displayed. You can now use the scripting language to:
● Access your query
● Set the query parameters in order to be able to return a list of business object instances based on these
parameters
● Execute the query
For more information, see Execute a Query to Explore a Business Object [page 53].
See Also
Define Access Control [page 365]
Overview
In the studio, you can implement instance-based access control for a business object you created by referencing an
SAP business object for which an access context is defined.
Access rights in the cloud solution are based on work center and work center views. For each view, an access context
is predefined that defines for which business data administrators can restrict user access rights, for example, by
company, site, sales, or employee. For example, if business users have access rights for a work center view but
Prerequisites
● An SAP access context exists that you can use for your use case.
For more information about access contexts and access restrictions, see the relevant documentation of the
cloud solution.
● An SAP business object exists with the necessary access context and an access control list (ACL) is directly
assigned to this business object.
Procedure
1. In the studio, define a business object with an association that is marked as relevant for access control by
doing the following:
a. Create a business object, for example, with the name AccessControlByCompany, and enter your
business object definition.
For information about creating and defining a business object, see Business Objects Quick Guide
[page 346].
b. Add an element to the business object root node that you use to find the relevant business object
instance.
You want the access context to be controlled by company, so you define a Company element
of type ID:
element Company : ID;
c. Add an association to the business object that is used for access control and mark the association with
the annotation [RelevantForAccessControl].
● For each business object, you can only use one association that is relevant for access
control.
● The source node of the association must be the root node.
● The target node of the association must be root node of the target business object, that
is, the controlling business object.
● The target business object must have an association that is relevant for access control.
● The target of this association must be the AccessControlList dependent object.
d. Add a status element to the business object root node to handle errors, typically
ConsistencyStatusCode:
element Consistent :ConsistencyStatusCode;
2. In the studio, create a query using the Query Wizard to include the query data in an object worklist (OWL).
For information about creating a query, see Create a Query [page 363].
For correct instance handling, a query based on Fast Search Infrastructure (FSI) is necessary. By
default, the query includes the ACL data even if you do not select this information.
Query = CompanyFinancialsProcessControl.QueryByCompany;
Selection = QueryCreateselectionParams();
Selection.Add(Query.CompanyID, “I”, EQ”, this.Company.Content);
QueryResults = Query.Execute(Selection);
In this example, access is controlled by company and the query uses the company at the
root node as the basis for selection.
b. Find the relevant instance in the query and set the association to this instance.
c. For error handling, set a status on the business object root node.
if (this.For_Access_control.IsSet ()){
this.Consistent = “3”;
}
else{
this.Consistent = “2”;
}
In this example, the consistency status codes are “2” for consistent and “3” for
inconsistent.
Result
You have defined an association for access control, defined the access context for the work center view, and defined
access control for the screens for which you want to restrict access rights. You can now manage access rights for
business users in the cloud solution. For information, see Assign Access Rights [page 368].
Overview
If you have implemented instance-based access control for a business object you created in the studio, you can
restrict read and write access in the SAP cloud solution on the basis of a work center view's access context.
In the SAP cloud solution, administrators can assign access rights to each employee who has a user in the system.
For example, if an employee should only see data for a specific company and the company access context is assigned
to a work center view, you can assign or restrict access to company-specific data for this view.
Prerequisites
You have defined associations that are relevant for access control in your business object and assigned the SAP
business object that controls access to the work center views. For information, see Define Access Control
[page 365].
Procedure
1. In the SAP cloud solution, disable the access rights of all users for the relevant work center views.
a. Open the Application and User Management work center User and Access Management Business
User subview.
b. Select the user whose access rights you want to assign using the access control settings you have
defined for your business object; then click Edit and choose the Access Rights option to open the
access rights editor.
c. On the Work Center and View Assignment tab, find your work center in the list of available work centers
and clear the Assigned to User checkbox.
d. Save your changes and log off from the system.
Your changes are applied the next time you log on.
2. In the studio, update the authorization and access rights by doing the following:
● In the Solution Explorer, right-click your solution and select Update Authorization and Access Rights.
You must disable the access rights of all users before you update authorization and access rights in
the studio.
For more information about assigning access rights to business users in the SAP cloud solution, see
Business Users Quick Guide under Assign Access Rights.
For more information about access contexts and access restrictions in the SAP cloud solution, see
User and Access Management under Access Restrictions.
Overview
To define the business logic for your business object in the studio, you use event, action and validation script files.
For more information, see Actions, Events, and Validations [page 349].
Prerequisites
● You have saved the relevant business object.
● In order to define actions, you must have added them to your business object definition before. For more
information, see the action [page 177] keyword in Syntax for Business Object Definitions [page 174].
Procedure
1. In the Solution Explorer, right-click your business object and select Create Script Files.
2. In the Create Script Files dialog box, for each of the business object nodes, select the events and validations
that you want to implement.
The system selects actions by default.
5. In the code editor, select the script file you want to edit and enter the code for the event, validation, or action.
For more information about the methods and keywords you can use, see Syntax for Implementation of
Business Logic [page 210].
6. Save your script files.
Overview
In the studio, you can generate screens in the SAP cloud solution based on your business object definitions, for
example, work centers, floorplans, and fact sheets.
In the studio, you can generate screens in the SAP cloud solution based on your business object definitions. For
example, you can generate work centers, floorplans, and fact sheets. These screens then automatically contain an
initial set of the fields that you have defined for your business object. The screens behave according to the business
logic that you have implemented for your actions and events. You use the user interface designer to enhance the
screens and adapt them to your needs.
You can also use your generated screens for mobile solutions. For more information, see step 3 of this
document and Mobile Solutions [page 670].
Availability
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
Prerequisites
● If you generate screens based on an SAP business object, the business object must be released for the SAP
public solution model (PSM).
● If you generate screens based on your business object, the business object must be activated. For more
information, see Business Objects Quick Guide [page 346].
You can change your selection in the Property Explorer of the UI designer. For more information, see
Mobile Solutions [page 670].
4. Select either the screen types you want to create or a whole screen scenario with navigation paths.
You can select the following screen types:
● Object Instance Floorplan (OIF)
● Quick Activity Floorplan (QAF)
● Fact Sheet (FS)
● Object Work List (OWL)
● Object Value Selector (OVS)
● Work Center View (WOCVIEW)
● Quick View (QV), not available for SAP Business ByDesign
● Quick Create (QC), not available for SAP Business ByDesign
● Thing Inspector (TI), not available for SAP Business ByDesign
● Thing Type (TT), not available for SAP Business ByDesign
For detailed information on the various screen types, see Screen Types [page 353].
Screen Scenario with Thing-based Navigation (not available for SAP Business ByDesign)
If you select Screen Scenario with Thing-based Navigation (not available for SAP Business ByDesign), the
system generates the following screens and the navigation paths that you need to be able to navigate from
one screen to the next:
Object Work List, Quick Create, Quick View, Thing Inspector, Thing Type, Work Center, and Work Center View.
5. Click OK.
Result
In the Solution Explorer, the files for the screens are listed. The system also creates a port type package file (.ptp
file) that contains the navigation, for example, from the object work list to the quick activity floorplan.
To view a screen, right-click a screen file and select Preview Screen. To edit a screen, right-click a screen file and
select Open in UI Designer. For more information, see Introduction to the User Interface Designer [page 594].
Overview
Object Work Lists (OWL) generated for custom business objects allow you to export the OWL data to a Microsoft
Excel file. The file is based on a standard template, which you cannot change. However, you can format the generated
spreadsheet as required.
Prerequisites
● You have opened your solution containing an active custom business object.
● You have created a floorplan scenario with navigation.
Procedure
1. Log on to the SAP cloud solution and select Application and User Management Business Users .
2. Select you user and select Edit Access Rights .
3. In the Work Center and View Assignment view, select the work center you have created and assign it to your
user. Click Save and Close.
4. Log off from the SAP cloud solution. Log on again and navigate to the work center you have assigned to your
user.
The work center you have created is displayed. It contains an Export button.
5. Click New and create several instances of your business object. .
6. Complete the fields and select Save and then Close to get to the entry screen again.
Result
Microsoft Excel opens. The data records are displayed on a spreadsheet. You can save the data as it is or format it
to suit your requirements.
See Also
Example: Export OWL Data to Excel [page 373]
Overview
In this example, you create a solution with a custom business object. You generate a screen scenario with object-
based navigation and test the work center in the SAP cloud solution. After that, you create data records, which you
export to Microsoft Excel.
Procedure
1. Create a solution and generate the floorplan scenario.
a. Log on to the studio and create a new solution.
b. In the Solution Explorer, click the Add New Item button.
The Add New Item dialog opens.
c. Select Business Object, enter a name (for example, OWL_EXPORT.bo) and click Add.
The Business Object Selection dialog opens.
d. Enter the following code:
import AP.Common.GDT;
businessobject OWL_EXPORT {
[Label("Identifier")] element ID:ID;
[Label("Name")] element name:LANGUAGEINDEPENDENT_MEDIUM_Name;
[Label("Description")] element
description:LANGUAGEINDEPENDENT_MEDIUM_Description;
[Label("Start Date")] element start_date:Date;
[Label("End Date")] element end_date:Date;
[Label("Amount")] element amount:Amount;
[Label("Title")] element title:AcademicTitleCode;
}
Save and activate the business object.
e. Right-click your solution and select Create Screens.
The Create Screens dialog opens.
f. Select a screen scenario, enter a Short ID, and click OK.
The screens are generated and the corresponding files are displayed in the Solution Explorer.
2. Assign the work center and perform a test.
d. Log off from the SAP cloud solution. Log on again and navigate to the work center you have assigned
to your user.
The work center is displayed. It contains an Export button.
Export Button
e. Click New.
f. Create several instances of your business object. Complete the fields and select Save and then
Close to get to the entry screen again.
Entry Screen
Data Records
Result
Microsoft Excel opens. The data records are displayed on a spreadsheet. You can save the data as it is or format it
to suit your requirements.
Download
Overview
You can use an embedded component to ensure that a change history is written for all changes made to your custom
business object. After adding the embedded component to your business object, you can display the change history
in the SAP cloud solution on the Changes tab of your work center. All changes such as add, create, and delete are
displayed in a list.
Prerequisites
● You have created users with the Developer and Business User roles. For more information, see User Setup
Quick Guide [page 31].
● You have created and opened a solution in the studio. For more information, see Create a Customer-Specific
Solution [page 165].
● You have created a business object or business object extension in your solution and entered a business
object definition. At least one element/node/association in your business object is annotated with
ChangeHistory. For more information, see Business Objects Quick Guide [page 346].
● You have created an object instance floorplan (OIF) for your business object. For more information, see
Generate Screens for a Business Object [page 370].
You can copy the name and namespace from the BO Browser/Data Model but copy and paste
does not work. You can also copy and paste the namespace from the Solution Properties in the
studio.
See Also
Create a BC Set Using an SAP BCO [page 332]
8.4 Extensibility
Business object extensions enable you to enhance business objects that are provided by SAP by adding extension
fields to them.
After you create and activate a business object extension, you can add the extension field to the corresponding
forms, screens, reports, and search categories.
Availability
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
Tasks
For more information about this task, see here [page 387].
See Also
Process Extension Scenario Quick Guide [page 395]
Syntax for Business Object Extension Definitions [page 197]
Maintenance of Business Object Extensions [page 380]
Overview
A customer-specific solution is in maintenance mode, if it has been assembled and downloaded; the solution status
then is Assembled. You can make changes to the solution in a patch; however, you can only make restricted changes
to certain content types. These change and delete restrictions ensure that you do not make changes to a solution
that could lead to loss of data or create inconsistencies or errors on a customer's production tenant.
Decimal annotation No No No
See Also
Business Object Extensions Quick Guide [page 378]
8.4.1.3 Tasks
Overview
You can create an extension for an SAP business object (business object extension) and add new fields to the
extendable nodes of this business object. The extendable nodes are automatically provided in a template, to which
you can add additional fields.
Prerequisites
You know how to work with business objects and how to use the scripting language.
Procedure
1. In the Solution Explorer, expand your solution, right-click your project file, and select Add New Item .
The Add New Item dialog appears.
2. Select Business Object Extension.
3. Enter a Name for your business object extension and click Add.
Example
This example shows an extension of the Lead business object provided by SAP. Two text elements, Test_Text1
and Test_Text2 , have been added to the business object extension – one at the root level and one at the item level.
import AP.Common.GDT;
import AP.CRM.Global;
[Extension] businessobject AP.CRM.Global:Lead {
element Test_Text1:LANGUAGEINDEPENDENT_EXTENDED_Text;
node Item {
element Test_Text2:LANGUAGEINDEPENDENT_EXTENDED_Text;
}
}
See Also
Syntax for Business Object Extension Definitions [page 197]
Business Object Extensions Quick Guide [page 378]
Scripting Language [page 173]
Business Objects Quick Guide [page 346]
Overview
You use event script files and validation script files to define the business logic for your business object extension.
For more information about events and validations, see Actions, Events, and Validations [page 349].
Prerequisites
The extended business object must be activated if you want to access an extension field in your script file.
If you use the this keyword in the coding of a mass enabled script file, this represents a collection
of business object node references.
4. Click OK.
In the Solution Explorer, script files with the file extension .absl appear below the corresponding nodes of
your business object. Each script file is opened on a tab page in the code editor.
5. In the code editor, select the script file you want to edit and enter the coding.
For more information about the methods and keywords you can use, see Syntax for Implementation of
Business Logic [page 210].
6. In the File menu, click Save.
7. In the Solution Explorer, right-click the script file and select Activate.
This function is not available for solution templates. For more information, see Solution Templates
[page 162].
Prerequisite
You have created and activated a business object extension that contains at least one extension field.
Procedure
1. In the Solution Explorer, right-click the business object extension (.xbo file) and select Enhance Screen.
If you want the field to be read-only, select the Display Only check box.
6. Click Apply.
7. Click the Save button.
8. Click the Activate button.
The Activate Worklist dialog appears.
9. Select the screen you have modified and click OK.
See Also
Create a Business Object Extension [page 381]
You can add an extension field to the business object’s corresponding forms. You can either add the extension field
to an original form, or you can create a copy of a form and add the extension field to the copy.
This function is not available for solution templates. For more information, see Solution Templates
[page 162].
Feature Matrix
This documentation covers the SAP Cloud Applications Studio (“studio”) as a whole; therefore it describes
all features that are available within the studio. Not all of these features are available for every cloud
solution from SAP. Before using a particular feature, please consult the Feature Matrix to determine
whether the feature is available for the cloud solution from SAP for which you are creating your solution.
For details, see Feature Matrix [page 25].
Prerequisites
● You have created a solution.
Procedure
1. Switch on admin mode
In the studio, right-click your solution and, in the Administration menu, select Switch On/Off Admin Mode.
2. Create a Copy of a Form (optional)
You can create a copy of a form and add the extension fields to the copy.
This option is useful if you want to be able to print different versions of a form. Example: Depending on
the selection by the business user, the preview is to show the standard print form or the extended print
form.
a. Right-click your business object extension (.xbo file) and click Enhance Form.
The Enhance Form dialog appears.
b. Click Copy Form.
The Form Template Maintenance screen appears.
If you are not already logged on to the SAP solution, you will be prompted to log on.
To speed up the search, click Advanced. Enter the template name or template group and click
Go.
If you are not already logged on to the SAP solution, you will be prompted to log on.
c. Select the form template to which you would like to add the extension field and click Add Field and
Edit Easy Form Editor .
The Easy Form Editor screen appears.
d. In the Sections area, select the section to which you would like to add an extension field.
The Details area lists the fields that can be added to the section.
Additional Activities
To view the form template in the SAP solution, business users must create a form template rule.
For more information, see “Create a Form Template Rule“ in the “Form Template Selection Quick Guide" in the
documentation of the SAP cloud solution.
See Also
Create a Business Object Extension [page 381]
You can add an extension field to a data source that is based on the same business object as the extension field. You
can then add the field to any reports based on the data source.
This function is not available for solution templates. For more information, see Solution Templates
[page 162].
The following table shows whether an extension field can be used as a key figure or characteristic.
Date Characteristic
Indicator Characteristic
List Characteristic
Text Characteristic
Time Characteristic
Prerequisite
The business object extension has been activated.