orkungedik/SAP-basis-dataset huggingface dataset:
## 4.2.14.1.8.2  Manage Incidents
## Incident Management System
As a provider of a SaaS solution, you should establish an incident management system, such as SAP Resolve, so that consumers can report issues.
If consumers of your SaaS solution run into problems, they need to be able to contact the provider of the software in a standardized way.
## Information to Identify ABAP System and Consumer Tenant for Incident Processing
To process an incident, you have to identify the ABAP system and tenant, where the consumer issue has occurred. Therefore, the following information is required:
- SAP Fiori launchpad URL In the SAP Fiori launchpad user actions menu, the SAP Fiori launchpad URL of a consumer tenant is
displayed as Server in the Settings dialog. See Settings .
- System Details In the user actions menu, information about the ABAP system and tenant is displayed in section System in
the About dialog. See About .
The system name and description are of particular interest.
## Information to Reproduce the Customer Issue
To reproduce the consumer issue, the following information should be provided:
- Application details In the user actions menu, information about the SAP Fiori application is displayed in the About dialog in the Application section. See About . The application title and technical component ID are of particular interest.
- Error details The error message is displayed in the SAP Fiori application or as a status code of the HTTP request that is
failing.
- Business user details In the user actions menu, the name and email address identifying the business user of the consumer are displayed in the Settings dialog in the User Account section. See Settings .
- Step-by-Step Description of the User Actions and Input To reproduce the customer issue, you need detailed information about the user actions that lead to the
error, and, if possible, user input that was performed during these steps.
## 4.2.14.1.9  Dismantle
As soon as a consumer unsubscribes from the SaaS solution, an immediate tenant decommissioning process takes place while taking a 'grace period' of 30 days into account, according to the following legal obligations:
<!-- image -->
During the grace period
- The tenant access is blocked for the consumer and for the SaaS provider as well in the support use case.
- The provider can restore the tenant in the Landscape Portal . SeeRestore Consumer Tenants.
After the end of the grace period, the tenant and all related data are irreversibly deleted and cannot be restored anymore.
Once the last consumer unsubscribes from the SaaS solution, the provider needs to delete the empty system in the BTP cockpit.
Alternatively, as a SaaS solution operator, your can use the Subscription Management Dashboard in the provider subaccount to unsubscribe tenants centrally without triggering unsubscription in the consumer subaccount. See Using the Subscription Management Dashboard.
## 4.2.14.3  Landscape Portal
The Landscape Portal acts as a central tool to allow service providers to perform administration tasks such as hibernating systems, creating test tenants and support users, selecting systems for a pre-upgrade, but also lifecycle management operations such as building, deploying and updating product versions, and even guides you through the configuration and deployment of multitenant SaaS solutions.
| ADMINISTRATION TASKS                                                                                                                                         | ADMINISTRATION TASKS                                                    | ADMINISTRATION TASKS                                 |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|------------------------------------------------------|
| Systems                                                                                                                                                      | Tenants                                                                 | Operations                                           |
| Select systems for pre-upgrade Stop and re-start systems Schedule regularly recurring system stops/starts Create support users Create and install namespaces | Create or delete test tenants Restore deleted recently consumer tenants | Monitor all operations triggered in Landscape Portal |
## PRODUCT LIFECYCLE MANAGEMENT
- Register product name
- Check if product version is ready for delivery
## SOLUTION CONFIGURATION
- Guided configuration of a SaaS solution
- Trigger and monitor deployment of SaaS solution to Cloud Foundry
For more information about how to access and use the Landscape Portal, see Landscape Portal.
- Build product version based on templates for different use cases (eg new release deliveries, support packages\_)
- Deploy product version to systems
## 4.2.14.4  Extending SaaS Applications
Learn more about extending SaaS applications.
## Providing Business Add-Ins [page 1293]
You, as an SAP partner, want to provide your customers with business add-ins (hereafter called BAdIs) so that customers can add their own business logic to your business processes by using the Custom Logic app.
Configuring Predefined Custom Fields [page 1298]
## 4.2.14.4.1  Providing Business Add-Ins
You, as an SAP partner, want to provide your customers with business add-ins (hereafter called BAdIs) so that customers can add their own business logic to your business processes by using the Custom Logic app.
This document describes the steps required for releasing a BAdI that can be used by key users of the Custom Logic app. The following steps are required:
- Create an enhancement spot for your BAdIs.
- Create the BAdI definition. This includes the interface definition and filter definitions.
- Release the BAdI definition.
- Provide an example implementation for your BAdI.
- Register the BAdI definition for the Custom Logic app.
After following these steps, your customers will be able to create BAdI implementations using the Custom Logic app.
## 4.2.14.4.1.1  Creating an Enhancement Spot for BAdIs
## Context
Creating an enhancement spot for your BAdIs allows you to group BAdI definitions that you want to register for the Custom Logic app together in one place.
## Procedure
Create a BAdI enhancement spot in ABAP Development Tools (ADT) using the creation wizard, as described in Creating BAdI Enhancement Spots.
## 4.2.14.4.1.3  Providing an Example Implementation
Provide an example implementation of your BAdI for your customers. Note that only one example implementation is allowed. The example code must be written in restricted ABAP because this is the template for the key users, and the key users are only allowed to write restricted ABAP code.
As you can only use the ABAP language version ABAP for Cloud Development in your example class, it could happen that you write code that isn't allowed to be used by key users. To prevent this from happening, please create an implementation of your BAdI in the Custom Logic app on your test system. If you don't see syntax errors on the UI, your example code is written in restricted ABAP . Have a look at the code reference for key users here: Statements in ABAP for Key Users [page 2738].
## 4.2.14.4.1.4  Releasing the BAdI Definition
## Context
Maintain the release status for development objects.
## Procedure
1. Right-click the development object in the Project Explorer and choose API State . Select Add Use SystemInternally (Contract C1) .
2. Set the visibility to Use in Key User Apps .
3. Maintain the release status in a similar way for the BAdI definition, the BAdI interface, and for all data types that are used in the BAdI method signature.
## 4.2.14.4.1.5  Registering the BAdI Definition
## Context
To make your BAdI available in the Custom Logic app, follow the steps below.
## Procedure
1. Right-click on your BAdI definition in the enhancement spot detail screen and choose Custom Logic .
2. Select Check to verify that your BAdI was implemented correctly. In case error messages appear, fix the root cause of the errors. Then, select Register .
3. Choose a transport request and select Finish . Y our BAdI definition has now been registered.
4. To deregister your BAdI, right-click on the BAdI definition and select Custom Logic . Then, choose Deregister . Click Next , choose a transport request and select Finish . Now, the BAdI has been deregistered.
##  Note
Do not deregister a BAdI that was already shipped to customers. There could be existing implementations that are no longer visible when the BAdI is gone.
Remember to deregister the BAdI that is registered for Custom Logic first before deleting it. If you delete the BAdI without deregistering it, you'll receive an error message preventing you from saving the enhancement spot. You can go back to the last active version by closing the enhancement spot without saving.
## 4.2.14.4.2  Configuring Predefined Custom Fields
The predefined extension field framework allows you, as an SAP partner, to equip your SaaS applications with the support of customer-specific extension fields. Customers can extend partner applications with customerspecific extension fields once the application has been deployed on SAP BTP ABAP environment multitenancy.
An extensible partner application contains fields which are marked as predefined extension fields. Those fields are part of application but invisible in OData Services by default. You can enable the predefined custom fields in ABAP development tools for Eclipse and configure the extension fields using the Fiori app Configure Predefined Custom Fields .
## Related Information
Working with Predefined Field Enablings
Configure Predefined Custom Fields [page 2741] Manage API Snapshots [page 2656]
## 4.2.15  Released Components and Objects
To establish lifecycle independence of SAP code and your own applications as well as extensions built in the ABAP environment, you can only use released components and reuse services, together with a cloudoptimized scope of the ABAP language. Those components and reuse services form the public, upgrade-stable interface of the ABAP environment. Any other object or service that is not released can't be used for your own development.
In this chapter, you can learn more about released APIs from the ABAP language, technical APIs, and released services.
## 4.2.15.1  ABAP Language
Get an overview of all the objects and services of the ABAP programming language that were released for use in the ABAP environment.
You can use them for basic programming techniques such as data handling and database access. Note that not all objects and services that you know from the ABAP on-premise environment are available (or available in the same way).
## More Information and Help
For more detailed information about the objects and services listed here, go to the ABAP Keyword Documentation (ABAP language help) or, in the relevant development object in ABAP Development Tools (ADT), directly to ABAP Doc.
To access the ABAP language help from the source code editor, position your cursor on an ABAP statement for which you need help, and press F1 .
<!-- image -->
## 4.2.15.1.1  ADT Class Execution
Easily execute ABAP classes directly in ABAP Development Tools (ADT) without having to launch a service.
```
 Sample Code CLASS zcl_example_class DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_example_class IMPLEMENTATION. METHOD if_oo_adt_classrun~main. out->write( 'Hello World!' ). ENDMETHOD. ENDCLASS.
```
For more information, see the ABAP Doc comments of the IF\_OO\_ADT\_CLASSRUN interface in ABAP Development Tools (ADT).
## 4.2.15.1.2  ABAP Managed Database Procedures (AMDP)
Use this class-based framework for managing and calling stored procedures or database procedures as AMDP procedures.
For more information, see the ABAP Keyword Documentation.
## 4.2.15.1.3  Arithmetic
Get an overview of the service classes that support arithmetic features such as conversions and random number generators.
For more information about numeric calculations, see the ABAP Keyword Documentation.
## 4.2.15.1.4  Compression/Decompression
You can compress and decompress data using the gzip format.
For more information, see the ABAP Doc comments of the classes in package SABP\_GZIP in ABAP Development Tools (ADT).
## 4.2.15.1.5  Database Access
You can use locators and streams to access large binary or large character objects (BLOB and CLOB) in the database.
For more information, see the ABAP Keyword Documentation.
## 4.2.15.1.6  Date/Time and Time Stamp Processing
To handle and convert time stamps, use the following classes:
- CL\_ABAP\_DATFM
- CL\_ABAP\_TIMEFM
- CL\_ABAP\_UTCLONG
- CL\_ABAP\_TSTMP
For more information, see the ABAP Doc comments for these classes.
For more information about handling time stamps, see System Class for Time Stamps in Packed Numbers and System Class for Time Stamp Fields in the ABAP Keyword Documentation.
## 4.2.15.1.8  Runtime Type Information
Implement the Runtime Type Services (RTTS) using a hierarchy of type description classes that contain the methods for Runtime Type Creation (RTTC) and Runtime Type Identification (RTTI).
Using these system classes, you can do the following:
- Determine type information of existing instances and type names in the ABAP type system at runtime.
- Define new data types at runtime.
For more information, see the ABAP Doc comments of class CL\_ABAP\_TYPEDESCR and its subclasses in the ABAP Development Tools (ADT).
## 4.2.15.1.9  Security
To support secure dynamic programming in ABAP, use class CL\_ABAP\_DYN\_PRG .
For more information, see the ABAP Doc comments of this class in ABAP Development Tools (ADT).
## 4.2.15.1.10  String Processing
Use the following classes to process strings:
- CL\_ABAP\_[STRING|CHAR]\_UTILITIES Provides auxiliary functions for string/character processing
- CL\_ABAP\_CONV\_CODEPAGE For code page conversion of strings/characters
- CL\_ABAP\_[REGEX|MATCHER] For regular expression processing For more information about regular expressions, see the ABAP Keyword Documentation.
For more information about these classes, see their ABAP Doc comments in ABAP Development Tools (ADT).
## 4.2.15.1.11  Structure Processing
You can use the system class CL\_ABAP\_CORRESPONDING to assign components between structures or between internal tables with dynamically specified mapping rules. Methods are available for simple assignments, assignments of default values, and for using a lookup table.
For more information, see the ABAP Keyword Documentation.
## 4.2.15.1.12  System Information
To get technical information such as the current user, language, or time zone, use class CL\_ABAP\_CONTEXT\_INFO .
To query for released objects, use the CDS view I\_APIsForSAPCloudPlatform .
For more information, see the relevant ABAP Doc comments in ABAP Development Tools (ADT).
## 4.2.15.1.13  XML/XSLT/ST
You can handle and process XML data using XSLT or ST programs.
For more information about how XML data can be created and read in ABAP, see the ABAP Keyword Documentation.
## 4.2.15.1.14  Access to System Structure SY
Access to the system structure SY is restricted to read access to the following components:
BATCH , DBCNT , FDPOS , INDEX , LANGU , MANDT , MSGID , MSGNO , MSGTY , MSGV1 , MSGV2 , MSGV3 , MSGV4 , SYSID , SUBRC , TABIX , and UNAME .
##  Note
Access to all other components is not allowed because they are related to either obsolete or unsupported features.
For more information, see ABAP System Fields in the ABAP Keyword Documentation.
You can use class CL\_ABAP\_CONTEXT\_INFO to retrieve information about the user session, for example, technical user name, business user name, time zone, and so on. The built-in function utclong\_current generates a UTC time stamp from the current system time and the current system date in accordance with POSIX standards.
The XCO time library also offers SY representations, especially when it comes to time and date retrieval. For more information about XCO , see Time Library [page 1706].
## 4.2.15.2  Change Document Solution
You can document changes made to a commercial object, such as the time, the content and the way changes are made, by logging these changes in a change document.
<!-- image -->
##  Example
You can use the change document to simplify the change history analysis for auditing in Financial Accounting .
Every application object type has its own change document object type, which is called the Change Document Object . T o log changes to a commercial object in a change document, you must define the Change Document Object for the commercial object type. The Change Document Object definition contains the tables which represent a commercial object in the system.
##  Note
- Specifiy for each table, whether a commercial object contains only one (single case) or several (multiple case) records. For example, an order contains an order header and several order items. In
- general, one record for the order header and several records for the order items are passed to the change document creation when an order is changed.
- If a table contains fields with values referring to units and currency fields, the associated table, containing these units and currencies, can also be specified.
- The object ID identifies a given commercial object. You can retrieve all changes made to a commercial object using this key.
## Change Document Structure
- Change Document Header
The change document header is the part of the change document which contains general information about the changes made. The document header is identified by object class name, the object ID and a change document number (automatically provided by the runtime system). The change document header contains information about who made the changes, when they were made, what type of changes were made (update, insert or delete operation) and if they were real or planned changes. Starting with Release 6.20 information about the system language and the length of the table key of the documented table are saved here as well. The header data is stored in table CDHDR .
- Change Document Item
The change document item contains the old and new values of a field for a particular change, and a change flag, that presents the kind of change. The change flag can take the following values:
- U = Update Changed data. (Log entry for each changed field which was flagged in the Dictionary as change document relevant .
- I = Insert
Data Inserted.
Changes: Log entry for the whole table record. Planned changes: Log entry for each table record field.
- D = Delete Data were deleted (log entry for the whole table record).
- E = Individual field documentation at Delete Delete a table record with field documentation. One log entry per field of the deleted table entry.
- J = Individual field documentation at Insert Insert a table record with field documentation. One log entry per field of the inserted table entry.
## 4.2.15.2.1  Authorization Checks
## Authorization Check for Change Document Object Maintenance
Use method IF\_CHDO\_OBJECT\_TOOLS\_REL~CHECK\_AUTHORIZATION to run an additional authorization check.
IV\_OBJECT. IV\_DEVCLASS and IV\_ACTIVITY get passed as import parameters. The return parameter RV\_IS\_AUTHORIZED must be set to ABAP\_TRUE if the check is successful.
## 
```
Example  Sample Code
```
```
CLASS zcl_chdo_test_auth DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_chdo_test_auth IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA: lv_is_authorized type abap_bool. TRY. " iv_object : Change document object name " it_activity : Activity to be checked. Possible values '01' = create, "                                                       '02' = change, "                                                       '03' = read, "                                                       '06' = delete " it_devclass : development class of change document object cl_chdo_object_tools_rel=>if_chdo_object_tools_rel~check_authorization( EXPORTING iv_object        = 'ZCHDO_TEST' it_activity      = '03' it_devclass      = 'ZLOCAL' RECEIVING rv_is_authorized = lv_is_authorized ). ENDTRY. IF lv_is_authorized IS INITIAL. out->write( |Exception occurred: authorization error.| ). ELSE. out->write( |Activity can be performed on the change document object.| ). ENDIF. ENDMETHOD.
```
```
ENDCLASS.
```
## Authorization Check for Reading Change Documents
When a change document object is generated, you receive the CL\_&lt;change document object name&gt;\_CHDO class with method IF\_CHDO\_ENHANCEMENTS~AUTHORITY\_CHECK without implementation. You can create your own authority check for reading change documents written for this change document object. The authority check for reading change documents are successful if parameter RV\_IS\_AUTHORIZED = 'X' is returned.
## 4.2.15.2.2  Managing Change Document Objects
To maintain a change document object during design time, the ABAP Development Tools UI editor for change document objects should be used. For more information, see Working with Change Document Objects.
You can use class CL\_CHDO\_OBJECT\_TOOLS\_REL if you want or have to maintain change document objects programmatically.
For more information, see
- Creating a Change Document Object [page 1308]
- Updating a Change Document Object [page 1313]
- Deleting a Change Document Object [page 1318]
- Reading a Change Document Object Definition [page 1320]
## Related Information
Working with Change Document Objects
## 4.2.15.2.6  Archiving Change Documents
You can archive change documents together with their application documents.
## Prerequisites
1. A change document object is available (see Working with Change Document Objects) and it's implemented to create change documents (see Writing Change Documents [page 1322]).
2. There is an archiving object to archive current application documents (see Working with Archiving Objects.
## Procedure
1. Add the archiving class CHANGEDOCU to the archiving classes of your archiving object using ABAP Development Tools (ADT):
<!-- image -->
2. Update the write class of your archiving object to archive change documents.
<!-- image -->
##  Note
String &lt;YOUR\_ARCH\_OBJECT&gt; is for your archiving object. String &lt;YOUR\_CD\_OBJECTCLASS&gt; is for your change document object.
##  Note
To read change documents from the archive, consider Reading Change Documents [page 1328].
## 4.2.15.2.7  How to Use the Fiori Reuse Library for Change Document Solution
You can use the Reuse Library to implement a reusable component that can display change documents.
## Context
To be able to use the reusable components, you need to adapt the code that can be found in your manifest.json file.
##  Restriction
Mind that the Fiori reuse library is only released for the OData V2 protocol.
## Procedure
1. Adapt your &lt;manifest.json&gt; file and add the sap.nw.core.changedocs.lib.reuse library under the sap.ui5 section:
```
 Sample Code "sap.ui5": { "resources": { "js": [], "css": [] }, "componentUsages": { "ChangedocReuseComponent": { "name": "sap.nw.core.changedocs.lib.reuse.changedocscomponent" } }, "dependencies": { "minUI5Version": "1.65.0", "libs": { "sap.ui.core": { "lazy": false
```
```
}, "sap.ui.generic.app": { "lazy": false }, "sap.suite.ui.generic.template": { "lazy": false }, "sap.ui.comp": { "lazy": false } }, "components": { "sap.nw.core.changedocs.lib.reuse": { "lazy": true } } },
```
2. Adapt your &lt;manifest.json&gt; file and add the component as section on your page:
##  Sample Code
```
"pages": { "ObjectPage|TravelProcessor": { "entitySet": "TravelProcessor", "defaultLayoutTypeIfExternalNavigation": "MidColumnFullScreen", "component": { "name": "sap.suite.ui.generic.template.ObjectPage" }, "embeddedComponents": { "changedoccomponent": { "id": "changedoccomponent", "componentUsage": "ChangedocReuseComponent", "title": "{{reuseTitle}}", "settings": { "objectClass": [ "<MY_CHANGE_DOC>" ], "objectId": "{parts: [{path: '<MY_OBJECTID>'}], formatter: 'sap.nw.core.changedocs.lib.reuse.changedocscomponent.arrayFormatter'}", "startDate": "1900-01-01T00:00:00" } } } } }
```
##  Note
Make sure to replace strings &lt;MY\_CHANGE\_DOC&gt; with your own change document object and &lt;MY\_OBJECTID&gt; with your own Object id which were also used to create change documents.
3. Adapt your &lt;i18n.properties&gt; file and add:
```
 Sample Code … #XTIT: Reuse component title
```
```
reuseTitle =Change Documents …
```
##  Note
Manual tests of the reuse library using SAP Business Application Studio is not possible. Create and test your app finally before implementing the reuse app. Test the reuse app after deployment.
After your app was deployed successfully to an SAP Business Technology Platform system, the updated BSP application and the SAP Fiori Launchpad app descriptor item will appear under your created package in Eclipse.
4. Update your IAM App. For more information, see Defining an IAM App for the Business Service [page 898].
5. Once created, maintain the Change Document OData Service . Go to the Service tab and add the Change Document Log OData Service by naming the OData V2 service type and add the following service name: APS\_CHANGE\_DOCUMENTS\_SRV 0001 ( Note: make sure to add all 11 spaces in between 'SRV' and '0001' ).
6. Create a new Business Catalog. For more information, see Creating a Business Catalog [page 899]
Having created the business catalog, you have successfully implemented a reusable component to display your change documents.
## 4.2.15.2.8  How to Use the Fiori Reuse Library
You can use the Reuse Library to implement a reusable component that can display change documents.
For more information on how to use the Fiori reuse library in a Fiori elements app, see Fiori Elements Integration OData V2 [page 1338](for OData V2 apps) and Fiori Elements Integration OData V4 [page 1340](for OData V4 apps).
## 4.2.15.2.8.1  Fiori Elements Integration OData V2
You can implement the reusable component from the Reuse Library in a Fiori Elements app in order to display change documents.
## Context
To be able to use the reusable components, you need to adapt the code that can be found in your manifest.json file.
## Procedure
1. Adapt your &lt;manifest.json&gt; file and add the sap.nw.core.changedocs.lib.reuse library under the sap.ui5 section:
2. Adapt your &lt;manifest.json&gt; file and add the component as section on your page:
```
 Sample Code sap.ui5": { "dependencies": { "libs": { " sap.nw.core.changedocs.lib.reuse": { "lazy": true } }, "components": {} }
```
## 
```
Sample Code
```
```
"pages": { "ObjectPage|TravelProcessor": { "entitySet": "TravelProcessor", "defaultLayoutTypeIfExternalNavigation": "MidColumnFullScreen", "component": { "name": "sap.suite.ui.generic.template.ObjectPage" }, "embeddedComponents": { "changedoccomponent": { "id": "changedoccomponent", "componentUsage": "ChangedocReuseComponent", "title": "{{reuseTitle}}", "settings": { "objectClass": [ "<MY_CHANGE_DOC>" ], "objectId": "{parts: [{path: '<MY_OBJECTID>'}], formatter: 'sap.nw.core.changedocs.lib.reuse.changedocscomponent.arrayFormatter'}", "startDate": "1900-01-01T00:00:00" } } } } }
```
##  Note
Make sure to replace strings &lt;MY\_CHANGE\_DOC&gt; with your own change document object and &lt;MY\_OBJECTID&gt; with your own Object id which were also used to create change documents.
3. Adapt your &lt;i18n.properties&gt; file and add:
```
 Sample Code … #XTIT: Reuse component title reuseTitle =Change Documents …
```
##  Note
Manual tests of the reuse library using SAP Business Application Studio is not possible. Create and test your app finally before implementing the reuse app. Test the reuse app after deployment.
After your app was deployed successfully to an SAP Business Technology Platform system, the updated BSP application and the SAP Fiori Launchpad app descriptor item will appear under your created package in Eclipse.
4. Update your IAM App. For more information, see Defining an IAM App for the Business Service.
5. Once created, maintain the Change Document OData Service . Go to the Service tab and add the Change Document Log OData Service by naming the OData V2 service type and add the following service name: APS\_CHANGE\_DOCUMENTS\_SRV 0001
##  Note make sure to add all 11 spaces in between 'SRV' and '0001'
6. Create a new Business Catalog. For more information, see Creating a Business Catalog Having created the business catalog, you have successfully implemented a reusable component to display your change documents.
## 4.2.15.3  Currency Conversion
The ABAP Core Data Services (CDS) provide the built-in function CURRENCY\_CONVERSION to convert different currencies to a common target currency.
For more information, see CDS DDL - CDS View Entity, Unit and Currency Conversion Functions in the ABAP Keyword Documentation.
To customize this conversion function, you can use API class CL\_EXCHANGE\_RATES to load the current exchange rates into your system for a correct conversion. Class CL\_EXCHANGE\_RATES is based on the business API function modules BAPI\_EXCHRATE\_CREATEMULTIPLE and BAPI\_EXCHANGERATE\_SAVEREPLICA .
API class CL\_EXCHANGE\_RATES provides PUT methods to write exchange rates to the corresponding customizing persistence. For more information, see the ABAP Doc comments in the class implementation.
Note that aside from use in CDS, the class additionally provides two methods to convert currencies.
## Example
To learn how to obtain and store exchange rates from an official source, see the detailed example at https:/ / github.com/SAP-samples/cloud-abap-exchange-rates .
```
 Sample Code @EndUserText.label: 'Price (in US American Dollars)' currency_conversion( client => client, amount => amount, round => '', source_currency => currency, target_currency => cast('USD' as abap.cuky), exchange_rate_type => cast('M' as abap.char(4)), exchange_rate_date => cast($session.system_date as abap.dats) ) as PriceInUSD
```
## 4.2.15.4.1  Accessing Holiday and Factory Calendar Tables Using VDM-Compliant CDS Views
You can access the factory calendar and holiday calendar tables using VDM-compliant CDS views.
The VDM-compliant CDS views used here are CDS views that were created in SAP\_BASIS and belong to the component BC-SRV-ASF-CAL .
The following CDS views access the factory- and holiday calendar tables:
## CDS View
| I_PublicHolidayCalendarBasic   | General information about holiday calendars                                                                                                        |
|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
| I_PublHolidayCalendarBasicText | Maintained description for holiday calendars                                                                                                       |
| I_PublicHolidayCalendarVH      | Value help for holiday calendars containing the holiday cal- endar ID, legacy holiday calendar ID, the validity start and end date and description |
| I_FactoryCalendarBasic         | General information about a factory calendar                                                                                                       |
| I_FactoryCalendarBasicText     | Maintained description for factory calendars                                                                                                       |
| I_FactoryCalendarValueHelp     | Value help for factory calendars containing the factory calen- dar ID, legacy factory calendar ID, the validity start and end date and description |
##  Note
The CDS views mentioned here should be differentiated from the C1-released VDM CDS views created by SAP S/4HANA . An example for a C1-released CDS view is I\_FactoryCalendar . C1-released VDM CDS views refer to the tables of the factory- and holiday calendar used previously. They don't belong to component BC-SRV-ASF-CAL . For this reason, the name addition BASIC was introduced for the new version of the CDS views, as can be seen below.
## 4.2.15.5  Lock Objects
When you activate a lock object in the ABAP Dictionary, the system automatically creates function modules for setting locks ( ENQUEUE\_&lt;lock object name&gt; ) and releasing locks ( DEQUEUE\_&lt;lock object name&gt; ).
## Using Lock Objects
Since the direct usage of these function modules is not permitted, the function module calls are wrapped in a generic API to set and release locks.
- Use class CL\_ABAP\_LOCK\_OBJECT\_FACTORY to do the following:
- Create a lock object instance using method GET\_INSTANCE
- Release all locks of the current LUW using method DEQUEUE\_ALL
- Use the created lock object instance to do the following:
- Set a lock using method ENQUEUE
- Release a lock using method DEQUEUE
For more information, see the ABAP Doc comments of class CL\_ABAP\_LOCK\_OBJECT\_FACTORY and interface IF\_ABAP\_LOCK\_OBJECT . The interface IF\_ABAP\_LOCK\_OBJECT also contains constants to be used for parameterization of lock methods.
##  Sample Code
data lv\_value type &lt;type of lock object parameter 1&gt;.
## Description
```
lv_value = <value for lock parameter 1>. data(lr_lock_object) =  cl_abap_lock_object_factory=>get_instance( exporting iv_name = <name of lock object> ). try. lr_lock_object->enqueue( it_parameter =  value #( ( name = <name of lock parameter 1> value = ref #( lv_value ) ) ) it_table_mode = value #( ( table_name = <table name> mode = if_abap_lock_object=>cs_mode-<constant for lock mode>) ) ). catch cx_abap_lock_failure into data(lr_exc). <exception handling code> endtry. <application code> try. lr_lock_object->dequeue( ). catch cx_abap_lock_failure into lr_exc. <exception handling code> endtry.
```
## 4.2.15.6  Number Range Solution
Many business applications require unique numbers, for example, to complete the keys of data records. In order to get numbers from an interval, a number range object must be defined which can contain different properties. In addition, intervals containing the numbers, must be assigned to the number range object. Numbers can be generated from existing number range intervals.
##  Note
Creation, change, and deletion of number range objects and intervals require developer role authorization. Changes to objects and intervals can only be performed in the same software layer.
## 4.2.15.6.1  Maintaining Number Range Objects
To maintain a number range object during design time, the ABAP development tools for Eclipse UI editor for number range objects can be used. For more information, see Working with Number Range Objects.
Class CL\_NUMBERRANGE\_OBJECTS provides methods for maintaining number range objects.
For more information, see
- Creating Number Range Objects [page 1352]
- Changing Number Range Objects [page 1354]
- Deleting Number Range Objects [page 1355]
- Reading Number Range Objects [page 1355]
## Related Information
Working with Number Range Objects
## 4.2.15.6.1.2  Changing Number Range Objects
Use method CHANGE to update number range objects.
Import and export parameters are the same as in the CREATE method.
<!-- image -->
## 4.2.15.6.1.3  Deleting Number Range Objects
Use method DELETE to delete number range objects.
Import Parameters
| Parameter Name   | Field Name   | Value Help                      |
|------------------|--------------|---------------------------------|
| OBJECT           |              | Number Range Object             |
| CORRNR           |              | Correction number for transport |
```
 Sample Code … lv_object = 'Z_TEST_03'. lv_corrnr = 'SIDK123456'. … cl_numberrange_objects=>delete( EXPORTING object = lv_object corrnr = lv_corrnr ). …
```
## 4.2.15.6.1.4  Reading Number Range Objects
Use the READ method to read the attributes of a number range object.
Import Parameters
| Parameter Name                   | Field Name   | Value Help                      |
|----------------------------------|--------------|---------------------------------|
| LANGUAGE                         |              | Language for the object texts   |
| OBJECT                           |              | Number Range Object             |
| Export Parameters Parameter Name | Field Name   | Value Help                      |
| ATTRIBUTES                       |              | Number Range Object Definition. |
|                                  | OBJECT       | Number Range Object.            |
|                                  | DTELSOBJ     | Data element for sub-object.    |
| Parameter Name   | Field Name   | Value Help                                                                                                            |
|------------------|--------------|-----------------------------------------------------------------------------------------------------------------------|
|                  | YEARIND      | Flag, whether number range object is to-year relevant.                                                                |
|                  | DOMLEN       | Domain, which determines the length of the numbers.                                                                   |
|                  | PERCENTAGE   | Percentage of numbers remaining in an interval after having identified in which number assignment a warning is given. |
|                  | CODE         | Transaction code to call interval mainte- nance (obsolete for ABAP CP).                                               |
|                  | BUFFER       | Buffering type for number assignment.                                                                                 |
|                  | NOIVBUFFER   | Number of numbers in the buffer.                                                                                      |
|                  | NRSWAP       | Selecting the flag prevents intervals from automatically starting from the beginning at the upper limit.              |
|                  | NRCHECKASCII |                                                                                                                       |
| INTERVAL_EXISTS  |              |                                                                                                                       |
| OBJ_TEXT         |              | Texts for objects for change document object creation.                                                                |
|                  | LANGU        | Language.                                                                                                             |
|                  | TXT          | Description of object, long text.                                                                                     |
|                  | TXTSHORT     | Description of object, short text.                                                                                    |
<!-- image -->
## 4.2.15.6.2  Maintaining Intervals of Number Range Objects
The class CL\_NUMBERRANGE\_INTERVALS provides methods for maintaining intervals of number range objects. Will the APIs be used by a business user, assign the SAP\_CA\_BC\_IC\_LND\_NUM\_PC (Number Range Management - Configuration) business catalog to a proper business role and - if required - restrict it to specific number range objects.
For more information, see
- Creating Intervals of Number Range Objects [page 1357]
- Changing Intervals of Number Range Objects [page 1359]
- Deleting Intervals of Number Range Objects [page 1360]
- Reading Intervals of Number Range Objects [page 1360]
## 4.2.15.6.2.2  Changing Intervals of Number Range Objects
Use the UPDATE method to change number range intervals.
Import and export parameters are the same as in the CREATE method.
```
 Sample Code … lv_object = 'Z_TEST_03'. *   intervals ls_interval-nrrangenr  = '01'. ls_interval-fromnumber = '00000002'. ls_interval-tonumber   = '19999998'. ls_interval-procind    = 'U'. APPEND ls_interval TO lt_interval. ls_interval-nrrangenr  = '02'. ls_interval-fromnumber = '20000002'. ls_interval-tonumber   = '29999997'. APPEND ls_interval TO lt_interval. … CALL METHOD cl_numberrange_intervals=>update EXPORTING interval  = lt_interval object    = lv_object subobject = ' ' IMPORTING error     = DATA(lv_error) error_inf = DATA(ls_error) error_iv  = DATA(lt_error_iv) warning   = DATA(lv_warning) …
```
## 4.2.15.6.2.3  Deleting Intervals of Number Range Objects
Use the DELETE method to delete number range intervals.
Import and export parameters are the same as in the CREATE method.
```
 Sample Code … lv_object = 'Z_TEST_03' *   intervals ls_interval-nrrangenr  = '01'. ls_interval-fromnumber = '00000001'. ls_interval-tonumber   = '19999999'. ls_interval-procind    = 'D'. APPEND ls_interval TO lt_interval. ls_interval-nrrangenr  = '02'. ls_interval-fromnumber = '20000000'. ls_interval-tonumber   = '29999999'. APPEND ls_interval TO lt_interval. … CALL METHOD cl_numberrange_intervals=>delete EXPORTING interval  = lt_interval object    = lv_object subobject = ' ' IMPORTING error     = DATA(lv_error) error_inf = DATA(ls_error) error_iv  = DATA(lt_error_iv) warning   = DATA(lv_warning). …
```
## 4.2.15.6.2.4  Reading Intervals of Number Range Objects
Use the READ method to get the properties of number range intervals.
Import Parameters
| Parameter Name   | Field Name   | Value Help                          |
|------------------|--------------|-------------------------------------|
| NR_RANGE_NR1     |              | Interval Number (internal interval) |
| NR_RANGE_NR2     |              | Interval Number (external interval) |
| OBJECT           |              | Number Range Object                 |
| SUBOBJECT        |              | Sub-object                          |
<!-- image -->
```
EXPORTING object       = lv_object nr_range_nr1 = ' ' nr_range_nr2 = ' ' subobject    = ' ' IMPORTING interval     = lt_interval. …
```
## 4.2.15.6.2.5.1  IAM App Creation and Settings
To publish a business catalog, you need to create a new IAM app first in case you do not use an already existing one.
1. Create a new IAM app under the Cloud Identity and Access Management folder.
2. Add an IAM app name as well as a description and press Next .
3. Choose a corresponding transport request and press Finish .
4. Open the created IAM app and add the previously deployed Business Application Studio app as Fiori Launchpad Descr Item ID . Finally, press Publish Locally .
5. Now assign the IAM app to a new or already existing business catalog and an according description. Press Finish .
6. Complete the process by publishing the business catalog to the system. Press Publish Locally .
## Business Role Settings
1. Log onto the staging landscape of the Steampunk system and create a new business role or use an existing one.
2. Assign the previously published business catalog to the business role and press Save .
3. In order to run your application properly, your business role should contain the following business catalogs:
4. Go back to the Fiori Launchpad Home view and find your application by searching via App Finder in the drop-down menu of your account icon on the upper right corner of the screen. Now you can also pin the app on your home screen.
<!-- image -->
## 4.2.15.6.2.5.2  Authorization Object S\_NUMBER
## Prerequisites
- You need access to the authorization role S\_NUMBER for the number range app.
- You need access to an authorization role of the ZTK\_NR3 object .
To make objects available for business partners in the SAP BTP ABAP environment, you need to create an I AM app and assign the authorization S\_NUMBER to this app in the authorization settings. Here, all available objects will be listed, though they don't need to be released objects.
<!-- image -->
Afterwards, you create a business catalog and assign the created IAM application to it.
Next, you need to assign a user to the catalog in the I AM app. In the Fiori Identity and Access Management menu, you can navigate to the Business Catalog maintenance view. Here, you are able to assign a business user to the created business catalog. Now as a user you are able to only see objects that were assigned to this catalog and keep all other objects private.
In parallel to this setting, you still need an assignment to the number range catalog to be able to see number range objects. In the number range catalog, you can navigate to the restriction settings to edit the readability and changeability restrictions for individual objects.
## 4.2.15.7  Customer Data Browser
With this app, you can view SAP BTP ABAP environment data owned by the customer.
## Key Features
You can use this app as a self-service to:
- View business data owned by customers.
- View the data of custom fields.
- View the technical names and business names of fields.
- Configure filter criteria and sort data.
- Configure display columns.
- Get the total number of records.
- Export data visible in the application to a spreadsheet.
- Provide controlled and restricted access to users (Admin user feature).
## Component for Customer Incidents
If you need support or experience issues, please report an incident under component BC-SRV-APS-CDB .
## Supported Device Types
- Desktop
- Tablet
## Related Information
Customer Data Browser Objects [page 1371]
Read Access Logging [page 1372]
Security Audit Log [page 1372] Accessing the App [page 1376] Data Visibility Based on Restrictions [page 1373] Working wtih the App [page 1378] FAQs [page 1380]
## 4.2.15.7.1  Customer Data Browser Objects
Customer Data Browser is a self-service application that you can use to view data that belongs to CDS views and database tables allowed for user access by SAP or by the customer.
The CDS views and database tables allowed for user access by SAP in the Customer Data Browser app are called Customer Data Browser objects.
You can create Customer Data Browser objects using the ABAP Development Tools (ADT). For more information, see Working with Customer Data Browser Objects.
## CDS View Coverage
In keeping with the SAP BTP ABAP Environemnt guidelines, the Customer Data Browser application primarily displays data using published CDS views (of the type contract C1) that are relevant to this environment.
For application areas which do not have good coverage of published CDS views, SAP may provide database tables as a temporary solution to display the data. After the relevant CDS views are published, SAP may disable the corresponding tables.
As part of continuous review and update of application content, the number of allowed Customer Data Browser objects available in the application are projected to increase with every upcoming release.
## Disclaimer
The use of the Customer Data Browser application may conflict with the data protection policies of your organization. The authorization concept does not support any filtering by the Data Controller or by typical attributes reflecting the purposes of processing. In addition, a download of the data is a transfer in a software/ environment that is potentially not secured . Hence, before using the Customer Data Browser application, please ensure that you follow the data protection Policies in your organization.
## Related Information
Customer Data Browser [page 1370] Read Access Logging [page 1372]
## 4.2.15.7.2  Read Access Logging
## Use
In Read Access Logging (RAL), you can configure which read-access information to log and under which conditions.
SAP delivers sample configurations for applications.
The BC/BC-SRV-APS-CDB/Template for Preview Access captures information related to viewing and accessing data.
In the following configurations, fields are logged in combination with additional fields, in the following business contexts:
| Channel             | Configuration                                  | Fields Logged                                       | Business Context                                                       |
|---------------------|------------------------------------------------|-----------------------------------------------------|------------------------------------------------------------------------|
| SAP Gateway (OData) | BC/BC-SRV-APS-CDB/ Template for Preview Access | Username ( SY-UNAME ) Request URL ( :Request URL )> | Log viewing and accessing data along with the search fil- ter criteria |
##  Note
See SAP Note 3351781 for information about the template RAL configuration file for Customer Data Browser.
## Related Information
Customer Data Browser [page 1370] Security Audit Log [page 1372]