orkungedik/SAP-basis-dataset huggingface dataset:
## 4.2.15.9.2.3.11  IF\_BALI\_FREE\_TEXT\_GETTER
If a free text is read from an application log, an object instance of interface IF\_BALI\_FREE\_TEXT\_GETTER is returned. It contains the interface IF\_BALI\_ITEM\_GETTER .
## Public Attributes
| Name                                                | Description                                                                          |
|-----------------------------------------------------|--------------------------------------------------------------------------------------|
| CATEGORY (from IF_BALI_ITEM_GETTER)                 | Category of the item Contains fixed value: IF_BALI_CONSTANTS=>C_CATE- GORY_FREE_TEXT |
| LOG_ITEM_NUMBER (from IF_BALI_ITEM_GETTER)          | Serial number which is the position of the free text in the log                      |
| SEVERITY (from IF_BALI_ITEM_GETTER)                 | Severity of the free text ('Error', 'Warning', etc)                                  |
| DETAIL_LEVEL (from IF_BALI_ITEM_GETTER)             | Detail level of the free text (number between '1' and '9' or ' ')                    |
| TIMESTAMP (from IF_BALI_ITEM_GETTER)                | UTC time stamp of the free text creation                                             |
| CONTEXT_STRUCTURE_NAME (from IF_BALI_ITEM_GET- TER) | Data dictionary name of the context structure                                        |
## Public Methods
Get the content of the free text:
GET\_MESSAGE\_TEXT (from interface IF\_BALI\_ITEM\_GETTER)
## Name
## Description
| Returning parameter                                        |                                            |
|------------------------------------------------------------|--------------------------------------------|
| MESSAGE_TEXT                                               | Content of the free text                   |
| Get the context data of the free text:                     |                                            |
| GET_CONTEXT ( from the interface IF_BALI_ITEM_GETTER) Name | Description                                |
| Exporting parameter                                        |                                            |
| CONTEXT                                                    | Structure that is filled with context data |
## 4.2.15.9.2.3.13  IF\_BALI\_ITEM\_SETTER
## Context
If a new item, such as a message or an exception, is added to an application log, its object instance contains the interface IF\_BALI\_ITEM\_SETTER.
## Public Attributes
| Name     | Description                                                                                                                                                                                                                     |
|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| CATEGORY | Category of the item Possible values: • IF_BALI_CONSTANTS=>C_CATEGORY_MESSAGE: Item is a message • IF_BALI_CONSTANTS=>C_CATEGORY_FREE_TEXT: Item is a free text • IF_BALI_CONSTANTS=>C_CATEGORY_EXCEPTION: Item is an exception |
## Public Methods
Check whether the item can pass an item filter:
CHECK\_PASSING\_ITEM\_FILTER
| Name                | Description                                        |
|---------------------|----------------------------------------------------|
| Importing parameter |                                                    |
| ITEM_FILTER         | Reference to the item filter that is being checked |
| Returning parameter |                                                    |
| FILTER_PASSED       | If set, the item can pass the item filter          |
## 4.2.15.9.2.3.14  IF\_BALI\_MESSAGE\_GETTER
If a message is read from an application log, an object instance of interface IF\_BALI\_MESSAGE\_GETTER is returned. It contains the interface IF\_BALI\_ITEM\_GETTER .
## Public Attributes
| Name                                              | Description                                                                        |
|---------------------------------------------------|------------------------------------------------------------------------------------|
| CATEGORY (from IF_BALI_ITEM_GETTER)               | Category of the item Contains fixed value: IF_BALI_CONSTANTS=>C_CATE- GORY_MESSAGE |
| LOG_ITEM_NUMBER (from IF_BALI_ITEM_GETTER)        | Serial number which is the position of the message in the log                      |
| SEVERITY (from IF_BALI_ITEM_GETTER)               | Severity of the message ('Error', 'Warning', etc)                                  |
| DETAIL_LEVEL (from IF_BALI_ITEM_GETTER)           | Detail level of the message (number between '1' and '9' or ' ')                    |
| TIMESTAMP (from IF_BALI_ITEM_GETTER)              | UTC time stamp of the message creation                                             |
| CONTEXT_STRUCTURE_NAME (from IF_BALI_ITEM_GETTER) | Data dictionary name of the context structure                                      |
| ID                                                | Message ID                                                                         |
| NUMBER                                            | Message number                                                                     |
| Name       | Description                 |
|------------|-----------------------------|
| VARIABLE_1 | Message variable 1          |
| VARIABLE_2 | Message variable 2          |
| VARIABLE_3 | Message variable 3          |
| VARIABLE_4 | Message variable 4          |
| COUNT      | Count of cumulated messages |
## Public Methods
Get the message text of the message (the output of ABAP command MESSAGE ):
GET\_MESSAGE\_TEXT (from interface IF\_BALI\_ITEM\_GETTER):
Name
Description
| Returning parameter                                       |                                            |
|-----------------------------------------------------------|--------------------------------------------|
| MESSAGE_TEXT                                              | Text of the message in the logon language  |
| Get the context data of the message:                      |                                            |
| GET_CONTEXT (from the interface IF_BALI_ITEM_GETTER) Name | Description                                |
| Exporting parameter                                       |                                            |
| CONTEXT                                                   | Structure that is filled with context data |
## 4.2.15.9.3  How to Use the Fiori Reuse Library
You can use the Reuse Library to implement a reusable component that can display an application log.
For more information on how to use the Fiori reuse library in a freestyle app, see Freestyle App Integration [page 1484].
For more information on how to use the Fiori reuse library in a Fiori elements app, see Fiori Elements Integration OData V2 [page 1486] (for OData V2 apps) and Fiori Elements Integration OData V4 [page 1487] (for OData V4 apps).
## 4.2.15.9.3.2  Fiori Elements Integration OData V2
You can implement the reusable component from the Reuse Library in a Fiori Elements app in order to display an application log.
## Context
In order to implement the reusable component in a Fiori Elements app, you first have to add the application log reuse component to your manifest.
## Procedure
1. Open the manifest.json file of the application and locate the sap.ui5 section.
2. Add the sap.nw.core.applogs.lib.reuse.smarttemplate component:
3. Next, you need to add the smarttemplate component of the application log reuse library to an ObjectPage . In the manifest.json file, you have to add the application log reuse component as an embedded component to your ObjectPage :
```
 Sample Code "sap.ui5": { "dependencies": { "libs": { "sap.nw.core.applogs.lib.reuse": { "lazy": true } }, "components": {} }, "componentUsages": { "ApplicationLogs": { "name": "sap.nw.core.applogs.lib.reuse.smarttemplate", "lazy": true } }
```
```
 Sample Code Snippet (embeddedComponents) "embeddedComponents": { "appLog": { "id": "<enter an ID>", "componentUsage": "ApplicationLogs", "title": "<the name of the tab>", "settings": { "logHandle": "{LogHandle}", "persistencyKey": "<your content>" } }
```
<!-- image -->
4. You can set the following parameters:
- log handle : The application log handle
- Optional persistencyKey : Set a personalization key which is then used to set app-specific variants for SmartTable . This parameter is optional. The default value is defined in the Application Log app. Make sure not to change the key value again, since users might lose their variants.
5. Here are some examples for binding:
- logHandle : {myOdataServiceLogHandle}
- logHandle : {path: 'myOdataServiceLogHandle'}
After your app was deployed successfully to an SAP BTP ABAP environment system, the BSP application and the SAP Fiori Launchpad app descriptor item will appear under your created package in Eclipse.
6. Now, you need to create a new IAM App . Follow the instructions described here: Defining an IAM App for the Business Service [page 898].
7. Once created, you need to maintain the Application Log OData Service to call your application log data. To do this, go to the Service tab and add the Application Log OData Service by naming the service type OData V2 and add the following service name: APL\_LOG\_MANAGEMENT\_SRV 0001 . Please make sure to add all 13 spaces in between SRV and 0001 . Now, go to the Authorization tab and maintain your log objects / sub objects for the authorization object S\_APPL\_LOG .
8. Finally, you need to create a new Business Catalog . Please follow the procedure described here: Creating a Business Catalog [page 899]
Having created the business catalog, you have successfully implemented a reusable component to display your application logs.
## 4.2.15.9.3.3  Fiori Elements Integration OData V4
You can implement the reusable component from the Reuse Library in a Fiori Elements app in order to display an application log.
## Context
To implement the reusable component in a Fiori Elements app, you first have to add the application log reuse component to your manifest.
## Procedure
1. Open the manifest.json file of the application and locate the sap.ui5 section.
2. Add the sap.nw.core.applogs.lib.reuse library under dependencies:
3. Next, you need to add a reuse component as embedded component to your manifest. Each reuse component instance is defined for an object page belonging to an app based on SAP Fiori elements. The reuse component is realized by a section that contains a custom subsection, which in turn contains the content of the reuse component. These sections, like any other custom sections, can be placed as described here: Extension Points for Sections on the Object Page.
4. Open the manifest.json file of the application and locate the object page within your targets section.
```
 Sample Code "sap.ui5": { "dependencies": { "libs": { "sap.nw.core.applogs.lib.reuse": { "lazy": true } } } }
```
```
 Sample Code "ZTS_APL_C_APPL_LOG_OVERVIEWObjectPage": { "type": "Component", "id": "ZTS_APL_C_APPL_LOG_OVERVIEWObjectPage", "name": "sap.fe.templates.ObjectPage", "options": { "settings": { "editableHeaderContent": false, "contextPath": "/ZTS_APL_C_APPL_LOG_OVERVIEW", "content": { "body": { "sections": { "customSectionReuse": { "title": "Log Reuse Component", "embeddedComponent": { "name": "sap.nw.core.applogs.lib.reuse.applogs", "settings": { "logHandle": "{log_handle}", "tableType": "ResponsiveTable" } }, "position": { "placement": "After", "anchor": "someOtherSection" } } } } } } } }
```
## 5. Settings :
- persistencyKey : The component you embed uses the SmartFilter and SmartTable control. Both controls allow you to configure them interactively. You can also store a current set of configuration settings as a named variant. By providing a value for the persistencyKey parameter, you make sure that the variants that get created in your application become visible only to the users of your application, and not to all users of the component in all applications.
- showHeader : Display or hide the header with information about the log object, the log subobject, the creator, and the creation date.
- showFilterBar : Display or hide the SmartFilter bar.
- tableType : Specifies the type of table that you can create in the SmartTable control. Possible values are: Table (default), which shows a grid table, and ResponsiveTable , which shows a responsive table. If you use the tableType setting within an object page, it's recommended to use the ResponsiveTable value. This value doesn't work in combination with the tree view.
- showAsTree : Display log messages as a tree. Make sure the Level of Detail is maintained for all log messages. The table supports up to 9 expandable levels.
- detailLevel : Filter out less relevant log messages. If set, only log messages of the log levels you've specified are displayed. An example: if you've specified the detailLevel: "1,2,3" , then only log messages with detail level 1, 2, or 3 are displayed.
- showContextFields : By default, the dynamic context fields of a log are not visible in the reuse component. If this parameter is set to true , the context fields will also be displayed. Be aware, however, that an additional second round trip is needed to fetch the metadata of the context fields.
- sortOrder : Possible values of the sort order are: ASC (Ascending. The oldest log is shown first. This is the default) and DESC (Descending. The newest log is shown first)
## 4.2.15.10  Data Archiving
Data archiving is used to extract data from the database, write it to archive files and delete the data from the database tables.
Data archiving is needed for data volume management. Usually, you want to remove data from the database which is not needed for your daily business anymore, but needs to be retained.
## Steps to implement a data archiving solution
1. Create a storage manager implementation to store the archive data to an external storage system [page 1490]
2. Select data and write it to archive files [page 1491]
3. Delete data from the database [page 1493]
4. Read archived data [page 1496]
5. Reload archived data into the database [page 1499]
6. Create a definition for archiving an object in ADT
7. Perform data archiving [page 1501]
For data archiving in ABAP Cloud the Archive Development Kit ( ADK) provides released APIs or interfaces for all of these steps, which can be used in your implementation to archive content of your own tables.
## 4.2.15.10.6  Archiving Classes
Archiving classes are used to archive object instances of reuse objects together with the business object instances in your application to which the reuse object instance belongs. If your application includes such reuse objects, and if SAP offers a released archiving class for the reuse object, you can easily integrate the archiving class into your archiving object:
- Enhance the archiving object by adding the archiving class to your archiving object in the ADT editor
- Enhance the write class by registering the object instance of the reuse object via a released method belonging to the archiving class
- Use the released read functionality belonging to the archiving class to read the data of the reuse object
## 4.2.15.10.7  Perform Data Archiving
Productive data archiving is a mass data processing and should therefore always be performed in the background, decoupled from the transactional business process. For background processing, regular performing and monitoring of data archiving runs, the Application Job framework is recommended to use. For that, an application job catalog entry with at least one application job template is required for each data archiving step:
- Write data to external storage
- Delete data from custom database tables
##  Note
Both data archiving steps need to run in independent scheduled application jobs.
The application job catalog entry contains the implementation of the data archiving step: it uses the released corresponding ADK runtime API. For logging, the application log in the context of an application job can be used. Related monitoring is embedded in the application job apps.
All APIs for data archiving provide a test mode parameter. If this parameter is set, no changes are performed on the database and no data is stored via the storage manager. Applications themselves need to expose a test mode parameter to the user. They need to take care that no database changes are performed in their part of the write, delete, and reload ABAP classes in case the test mode option is chosen.
## Related Information
Application Jobs [page 1382]
Application Logs [page 1417]
## 4.2.15.11  Output Management
## Printing [page 1502]
Find out how to create a print queue item API.
## Print Forms [page 1503]
ADS Rendering in ABAP environment
Emailing [page 1512]
## 4.2.15.11.1  Printing
Find out how to create a print queue item API.
You can use the method CREATE\_QUEUE\_ITEM\_BY\_DATA with the class CL\_PRINT\_QUEUE\_UTILS to create a print queue item of a queue. One print queue item has one main document and can have either no or a variable amount of attachments. The method CREATE\_QUEUE\_ITEM\_BY\_DATA has the following importing parameters:
- IV\_QNAME : Name of the print queue
- IV\_PRINT\_DATA : Print document contained in xstring format
- IV\_NAME\_OF\_MAIN\_DOC : Name of the main document
- IV\_NUMBER\_OF\_COPIES : Number of copies
- IV\_PAGES : Number of pages
- IT\_ATTACHMENT\_DATA : List of attachments within the structure. This includes the name and the attachment data in xstring
If a print queue item has been created successfully, it returns the ID of the item with the parameter RV\_ITEMID . In case of any errors, you can find the error messages in the exporting parameter EV\_ERR\_MSG .
<!-- image -->
##  Example
```
CLASS zcl_pq_test DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_pq_test IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA: l_print_data TYPE xstring. l_print_data = |…|. DATA(lv_qitem_id) = cl_print_queue_utils=>create_queue_item_by_data EXPORTING iv_qname            = '…' iv_print_data       = l_print_data iv_name_of_main_doc = '…'. out->write( lv_qitem_id ). ENDMETHOD. ENDCLASS.
```
## Related Information
Maintain Print Queues [page 2819] Integrating SAP BTP ABAP environment and Local Printers [page 2999]
## 4.2.15.11.2  Print Forms
ADS Rendering in ABAP environment
The Adobe Document Services (ADS) can render Adobe XML Forms (XFA) to PDF documents and other print formats. The application sends the data and the form template using a secure connection and the service returns the rendered document. The rendered documents can be used by your applications for the screen output or for the output into the print queue. For more information, see Maintain Print Queues [page 2819].
For more information, see Connecting the SAP Forms Service to ABAP.
## 4.2.15.11.2.1  Retrieve Stored Form Templates
Using ABAP development tools for Eclipse, you can upload form templates designed with the Adobe LiveCycle Designer directly to the system. See Working with Forms.
The class CL\_FP\_FORM\_READER enables the usage of uploaded form templates during runtime.
## Initiate the Form Template Reader
Initiate the class by providing the name of the uploaded form template.
```
 Sample Code data(lo_reader) = cl_fp_form_reader=>create_form_reader( 'MY_FORM' ).
```
## Read Stored Attributes
The reader class offers the following read-only methods to retrieve the stored attributes.
| Method Name        | Output Type   | Description                                                        |
|--------------------|---------------|--------------------------------------------------------------------|
| get_data_optimized | fpoptimize    | Is data optimization enabled for the connected Form Data Provider? |
| get_font_embed     | fpfntemb      | Is font embedding automatically ena- bled when rendering the form? |
| get_fdp_name       | fpdpname      | The name of the connected Form Data Provider                       |
All of these methods do not support any additional import parameters.
## Read Layout Content to be Used by ADS Rendering Call
The reader class also enables you to retrieve the layout.
The GET\_LAYOUT method has the following returning parameters:
Parameter
Definition
| RV_LAYOUT   | Resulting XMLas XSTRING   |
|-------------|---------------------------|
## 4.2.15.11.2.4  PDF Merger API
You can use a class-based API to merge the content of different PDF files into a single PDF file. The result file contains all pages of the source files in the sequence of the original files.
If you want to merge PDF files, you require an instance of class CL\_RSPO\_PDF\_MERGER . T o create this instance, class CL\_RSPO\_PDF\_MERGER provides the method CREATE\_INSTANCE . After using this method, the following two steps are necessary:
- With method ADD\_DOCUMENT you can add the data of a PDF document to the list of files you want to merge. You should call this method for each source file.
- With method MERGE\_DOCUMENTS you can start the merge process. The method returns the data of the merged document.
```
 Sample Code ... " Create an instance of the PDF merger class DATA(l_merger) = cl_rspo_pdf_merger=>create_instance( ). " Add the data of the first PDF document to the list of files which shall be merged l_merger->add_document( l_data_of_first_pdf ). " Add the data of the second PDF document l_merger->add_document( l_data_of_second_pdf ). TRY. " Merge both documents and receive the result DATA(l_merged_PDF) = l_merger->merge_documents( ). CATCH cx_rspo_pdf_merger INTO DATA(l_exception). " Add a useful error handling here ENDTRY. ...
```
If you try to merge damaged documents, or documents that don't fulfill the requirements of the PDF merger, an exception of type CX\_RSPO\_PDF\_MERGER is raised. The exception object contains the following attributes that contain more information regarding the problem:
- DOCUMENT\_INDEX : The index of the PDF document that was responsible for the exception
- ERROR\_CODE : The internal error code of the exception
- ERROR\_TEXT : The description text of the error code
The PDF merger has the following restrictions:
- It can only handle PDF files.
- It can't handle encrypted PDF files. Usually, you can check whether a PDF file is encrypted by checking the Security section of the file properties. Another possibility is that you open the file with a text editor and search for the key word Encrypt , which marks an encrypted file.
- It can't handle damaged PDF files. For example, if parts of the file are missing, or if some bytes were changed, the file can't be processed. PDF files are usually binary data, so any conversion like a code page conversion damages the file.
- Further restrictions can be found in SAP note 2264208 .
## Related Information
Class and Interface of the PDF Merger API [page 1511]
## 4.2.15.11.2.4.1  Class and Interface of the PDF Merger API
Class CL\_RSPO\_PDF\_MERGER uses interface IF\_RSPO\_PDF\_MERGER . Find out which public methods it contains.
## Context
The following public methods exist in interface IF\_RSPO\_PDF\_MERGER :
## CREATE\_INSTANCE (static)
Create an instance of the PDF merger class.
| Name                | Description                                                      |
|---------------------|------------------------------------------------------------------|
| Returning parameter |                                                                  |
| MERGER_INSTANCE     | PDF merger instance: A reference to interface IF_RSPO_PDF_MERGER |
## ADD\_DOCUMENT
Add a PDF document to the list of files that you want to merge.
| Name                | Description                                                     |
|---------------------|-----------------------------------------------------------------|
| Importing parameter |                                                                 |
| DOCUMENT            | Data of the PDF document that you want to merge (type XSTRING ) |
## MERGE\_DOCUMENTS
Merge all PDF documents into a single PDF file.
| Name                | Description                                 |
|---------------------|---------------------------------------------|
| Returning parameter |                                             |
| MERGED_DOCUMENT     | Data of the merged document (type XSTRING ) |
| Exceptions          |                                             |
| CX_RSPO_PDF_MERGER  | Exceptions of the PDF merger                |
## Related Information
PDF Merger API [page 1510]
## 4.2.15.11.3  Emailing
## 4.2.15.11.3.3  Email Address Check
The class CL\_MAIL\_ADDRESS implements the interface IF\_MAIL\_ADDRESS and allows the user to check if it contains a syntactic valid email address in the input string according to the standard RFC 5322.
## Create an Email Address instance
| Method          | Description                                                                                    |
|-----------------|------------------------------------------------------------------------------------------------|
| Create_instance | Provides an email address instance.                                                            |
| validate        | Validates whether a string is a syntactic valid mail address (according to RFC 5322 Standard). |
## Methods
<!-- image -->
```
Catch cx_bcs_mail into data(lx_err). "exception handling endtry. Data(lv_address_valid) = lo_mail_address->validate( ).
```
## 4.2.15.12.1  Maintaining Dimensions
Class CL\_UOM\_DIM\_MAINTENANCE provides methods for maintaining a dimension.
##  Caution
Changing the initial set of configurations has implications. Before proceeding with any change, familiarize yourself with the warnings in Units of Measurement [page 1517].
For more information, see the following sections.
## Creating a Dimension [page 1519]
Use method CREATE to create a new dimension.
## Changing a Dimension [page 1521]
Use method UPDATE to change an existing dimension.
## Deleting a Dimension [page 1523]
Use method DELETE to delete a dimension.
## Reading a Dimension [page 1524]
Use method READ to read a dimension.
## Maintaining the Translation of a Dimension [page 1526]
Use method MAINTAIN\_TRANSLATION to maintain the translation of a dimension for a particular language.
## Deleting the Translation of a Dimension [page 1528]
Use method DELETE\_TRANSLATION to delete translation of a dimension for a particular language.
## 4.2.15.12.1.1  Creating a Dimension
Use method CREATE to create a new dimension.
##  Caution
Changing the initial set of configurations has implications. Before proceeding with any change, familiarize yourself with the warnings in Units of Measurement [page 1517].
## Import Parameters
| Parameter Name   | Field Name   | Value Help                         |
|------------------|--------------|------------------------------------|
| DIM_CRE_TS       |              | Structure for creating a dimension |
|                  | DIMID        | Dimension key                      |
| Parameter Name   | Field Name                  | Value Help                                                                 |
|------------------|-----------------------------|----------------------------------------------------------------------------|
|                  | TXDIM                       | Description of the dimension key                                           |
|                  | LENGTH                      | Length exponent of the dimension                                           |
|                  | MASS                        | Mass exponent of the dimension                                             |
|                  | TIME                        | Time exponent of the dimension                                             |
|                  | CURRENT                     | Electric current exponent of the dimen- sion                               |
|                  | TEMPERATURE                 | Temperature exponent of the dimen- sion                                    |
|                  | MOLE_QTY                    | Mole quantity exponent of the dimen- sion                                  |
|                  | LUMINOSITY                  | Light exponent of the dimension                                            |
|                  | HASUNITSWITHTEMPERATURESPEC | Indicates whether the dimension has units with a temperature specification |
|                  | HASUNITSWITHPRESSURESPEC    | Indicates whether the dimension has units with a pressure specification    |
## Export Parameters
Parameter Name
## Value Help
| ERROR   | Space : No error   |
|---------|--------------------|
|         | 'X' : Save error   |
<!-- image -->
##  Note
Class exception CX\_UOM\_ERROR is raised to check the integrity of the data import parameters.
##  Sample Code
```
CLASS zcl_uom_dimension_create_test DEFINITION PUBLIC FINAL CREATE PUBLIC. PUBLIC SECTION. INTERFACES if_oo_adt_classrun. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS.
```
```
CLASS zcl_uom_dimension_create_test IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA(lo_dim) = cl_uom_dim_maintenance=>get_instance( ). DATA(ls_dim) = VALUE cl_uom_dim_maintenance=>ty_dim_cre_ts( dimid = 'ZNEWDI' txdim = 'New Dimension' mass  = 89 ). TRY. lo_dim->create( EXPORTING dim_cre_ts = ls_dim IMPORTING error      = DATA(lv_error) ). CATCH cx_uom_error INTO DATA(lo_error). out->write( |Exception raised| ). out->write( lo_error->get_text( ) ). ENDTRY. IF lv_error = abap_true. out->write( |Error occurred while saving the data in the database| ). ENDIF. ENDMETHOD. ENDCLASS.
```
## 4.2.15.12.1.3  Deleting a Dimension
Use method DELETE to delete a dimension.
##  Caution
Changing the initial set of configurations has implications. Before proceeding with any change, familiarize yourself with the warnings in Units of Measurement [page 1517].
## Import Parameters
| Parameter Name   | Value Help    |
|------------------|---------------|
| DIMID            | Dimension key |
## Export Parameters
Parameter Name
ERROR
Value Help
Space
: No error
'X'
: Save error
##  Note
Class exception CX\_UOM\_ERROR is raised to check the integrity of the data import parameters.
##  Sample Code
```
CLASS zcl_uom_dimension_delete_test DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_uom_dimension_delete_test IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA(lo_dim) = cl_uom_dim_maintenance=>get_instance( ). TRY. lo_dim->delete( EXPORTING dimid = 'ZNEWDI' IMPORTING error = DATA(lv_error) ). CATCH cx_uom_error INTO DATA(lo_error). out->write( |Exception raised| ). out->write( lo_error->get_text( ) ). ENDTRY. IF lv_error = abap_true. out->write( |Error occurred while deleting the data from the database| ). ENDIF. ENDMETHOD. ENDCLASS.
```
## 4.2.15.12.1.5  Maintaining the Translation of a Dimension
Use method MAINTAIN\_TRANSLATION to maintain the translation of a dimension for a particular language.
##  Caution
Changing the initial set of configurations has implications. Before proceeding with any change, familiarize yourself with the warnings in Units of Measurement [page 1517].
## Import Parameters
Parameter Name
Value Help
| LANGUAGE   | Language key                     |
|------------|----------------------------------|
| DIMID      | Dimension key                    |
| TXDIM      | Description of the dimension key |
## Export Parameters
Parameter Name
Value Help
ERROR
Space
: No error
'X'
: Save error
##  Note
Class exception CX\_UOM\_ERROR is raised to check the integrity of the data import parameters.
##  Sample Code
```
CLASS zcl_dim_maintain_transl_test DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_dim_maintain_transl_test IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA(lo_dim) = cl_uom_dim_maintenance=>get_instance( ). TRY. lo_dim->maintain_translation( EXPORTING language = 'F' dimid    = 'ZNEWDI' txdim    = 'Dimension FR' IMPORTING error = DATA(lv_error) ). CATCH cx_uom_error INTO DATA(lo_error). out->write( |Exception raised| ). out->write( lo_error->get_text( ) ). ENDTRY. IF lv_error = abap_true. out->write( |Error occurred while updating the data in the database| ). ENDIF. ENDMETHOD. ENDCLASS.
```
## 4.2.15.12.1.6  Deleting the Translation of a Dimension
Use method DELETE\_TRANSLATION to delete translation of a dimension for a particular language.
##  Caution
Changing the initial set of configurations has implications. Before proceeding with any change, familiarize yourself with the warnings in Units of Measurement [page 1517].
## Import Parameters
| Parameter Name   | Value Help    |
|------------------|---------------|
| LANGUAGE         | Language key  |
| DIMID            | Dimension key |
## Export Parameters
Parameter Name
Value Help
ERROR
Space
: No error
'X'
: Save error
##  Note
Class exception CX\_UOM\_ERROR is raised to check the integrity of the data import parameters.
```
 Sample Code CLASS zcl_dim_delete_transl_test DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_dim_maintain_transl_test IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA(lo_dim) = cl_uom_dim_maintenance=>get_instance( ). TRY. lo_dim->delete_translation( EXPORTING dimid    = 'ZNEWDI' language = 'F' IMPORTING error = DATA(lv_error) ).
```
```
CATCH cx_uom_error INTO DATA(lo_error). out->write( |Exception raised| ). out->write( lo_error->get_text( ) ). ENDTRY. IF lv_error = abap_true. out->write( |Error occurred while updating the data in the database| ). ENDIF. ENDMETHOD. ENDCLASS.
```
## 4.2.15.12.2  Maintaining Units of Measurement
Class CL\_UOM\_MAINTENANCE provides methods for maintaining units of measurement.
##  Caution
Changing the initial set of configurations has implications. Before proceeding with any change, familiarize yourself with the warnings in Units of Measurement [page 1517].
For more information, see the following sections.
```
Creating a Unit of Measurement [page 1529]
```
Use method CREATE to create a unit of measurement.
## Changing a Unit of Measurement [page 1532]
Use method UPDATE to change a unit of measurement.
```
Deleting a Unit of Measurement [page 1535]
```
Use method DELETE to delete a unit of measurement.
## Reading a Unit of Measurement [page 1536]
Use method READ to read a unit of measurement.
Maintaining the Translation of a Unit of Measurement [page 1538]
Use method MAINTAIN\_TRANSLATION to maintain the translation of a unit of measurement for a particular language.
## Deleting the Translation of a Unit of Measurement [page 1540]
Use method DELETE\_TRANSLATION to delete translation of a unit of measurement for a particular language.
## 4.2.15.12.2.3  Deleting a Unit of Measurement
Use method DELETE to delete a unit of measurement.
##  Caution
Changing the initial set of configurations has implications. Before proceeding with any change, familiarize yourself with the warnings in Units of Measurement [page 1517].
## Import Parameters
Parameter Name
UNIT
## Export Parameters
Parameter Name
Value Help
ERROR
Space
: No error
'X'
: Save error
##  Note
Class exception CX\_UOM\_ERROR is raised to check the integrity of the data import parameters.
##  Sample Code
```
CLASS zcl_uom_unit_delete_test DEFINITION PUBLIC FINAL CREATE PUBLIC. PUBLIC SECTION. INTERFACES if_oo_adt_classrun. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_uom_unit_delete_test IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA(lo_uom) = cl_uom_maintenance=>get_instance( ). TRY. lo_uom->delete( EXPORTING unit = 'ZYX' IMPORTING error = DATA(lv_error) ). CATCH cx_uom_error INTO DATA(lo_error).
```
Value Help
Internal unit of measurement
```
out->write( | Exception raised | ). out->write( lo_error->get_text( ) ). ENDTRY. IF lv_error = abap_true. out->write( |Error occurred while deleting the data from the database| ). ENDIF. ENDMETHOD. ENDCLASS.
```
## 4.2.15.12.2.5  Maintaining the Translation of a Unit of Measurement
Use method MAINTAIN\_TRANSLATION to maintain the translation of a unit of measurement for a particular language.
##  Caution
Changing the initial set of configurations has implications. Before proceeding with any change, familiarize yourself with the warnings in Units of Measurement [page 1517].
## Import Parameters
| Parameter Name   | Value Help                                           |
|------------------|------------------------------------------------------|
| LANGUAGE         | Language key                                         |
| UNIT_INT         | Internal unit of measurement                         |
| COMMERCIAL       | Commercial/external measurement unit format          |
| TECHNICAL        | Technical measurement unit format                    |
| TEXT             | Description of a unit of measurement (optional)      |
| LONG_TEXT        | Long description of a unit of measurement (optional) |
## Export Parameters
Parameter Name
## Value Help
| ERROR   | Space : No error   |
|---------|--------------------|
|         | 'X' : Save error   |
##  Note
Class exception CX\_UOM\_ERROR is raised to check the integrity of the data import parameters.
##  Sample Code
```
CLASS zcl_uom_maintain_transl_test DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_uom_maintain_transl_test IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA(lo_uom) = cl_uom_maintenance=>get_instance( ). TRY. lo_uom->maintain_translation( EXPORTING language   = 'F' unit_int   = 'ZYX' commercial = 'zyx' technical  = 'zyx' text       = 'FR transl' long_text  = 'FR transl' IMPORTING error = DATA(lv_error) ).
```
```
CATCH cx_uom_error INTO DATA(lo_error). out->write( | Exception raised | ). out->write( lo_error->get_text( ) ). ENDTRY. IF lv_error = abap_true. out->write( |Error occurred while saving the data in the database| ). ENDIF. ENDMETHOD. ENDCLASS.
```
## 4.2.15.12.2.6  Deleting the Translation of a Unit of Measurement
Use method DELETE\_TRANSLATION to delete translation of a unit of measurement for a particular language.
##  Caution
Changing the initial set of configurations has implications. Before proceeding with any change, familiarize yourself with the warnings in Units of Measurement [page 1517].
## Import Parameters
Parameter Name
Value Help
| LANGUAGE   | Language key                 |
|------------|------------------------------|
| UNIT_INT   | Internal unit of measurement |
## Export Parameters
Parameter Name
ERROR
##  Note
Class exception CX\_UOM\_ERROR is raised to check the integrity of the data import parameters.
Value Help
Space
: No error
'X' : Save error
##  Sample Code
```
CLASS zcl_uom_delete_transl_test DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_uom_delete_transl_test IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA(lo_uom) = cl_uom_maintenance=>get_instance( ). TRY. lo_uom->delete_translation( EXPORTING language   = 'F' unit_int   = 'ZYX' IMPORTING error = DATA(lv_error) ). CATCH cx_uom_error INTO DATA(lo_error). out->write( | Exception raised | ). out->write( lo_error->get_text( ) ). ENDTRY. IF lv_error = abap_true. out->write( |Error occurred while saving the data in the database| ). ENDIF. ENDMETHOD. ENDCLASS.
```
## 4.2.15.12.3  Retrieving Standard Units of Measurement
Class CL\_UOM\_CONTENT\_HANDLER provides methods for reading the standard units of measurement and dimensions delivered by SAP. With this functionality, you can check the standard units of measurement provided by SAP and adjust any custom changes accordingly.
For more information, see Reading Standard Dimensions and Units of Measurement [page 1541].
## 4.2.15.12.4  Conversion Functions for Units of Measurement
Class CL\_UOM\_CONVERSION provides methods for simple conversion functions for units of measurement.
For more information about the methods on class API level, see the following sections in this documentation.
For information about the built-in function UNIT\_CONVERSION on CDS view level, see Handling of Amounts and Quantities in the ABAP Data Models Guide, and CDS DDL - CDS View Entity, Unit and Currency Conversion Functions in the ABAP Keyword Documentation.
## 4.2.15.12.4.2  Determining the SI Unit
Use method SI\_UNIT\_GET to determine the SI unit.
## Import Parameters
| Parameter Name   | Value Help          |
|------------------|---------------------|
| DIMENSION        | Dimension key       |
| UNIT             | Unit of measurement |
## Export Parameters
| Parameter Name   | Value Help                       |
|------------------|----------------------------------|
| SI_UNIT          | Base unit/SI unit of a dimension |
## Exceptions
Exception Name
| DIMENSION_NOT_FOUND   | Dimension is not defined              |
|-----------------------|---------------------------------------|
| UNIT_NOT_FOUND        | Unit of measurement is not maintained |
| SI_UNIT_NOT_FOUND     | SI unit is not defined                |
## 
Value Help
```
Sample Code CLASS zcl_uom_conversion DEFINITION PUBLIC FINAL CREATE PUBLIC. PUBLIC SECTION. INTERFACES if_oo_adt_classrun. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_uom_conversion IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA(lo_unit) = cl_uom_conversion=>create( ). lo_unit->si_unit_get( EXPORTING dimension           = 'MASS'
```
```
unit                = 'G' IMPORTING si_unit             = DATA(lv_si_unit) EXCEPTIONS dimension_not_found = 1 unit_not_found      = 2 si_unit_not_found   = 3 OTHERS              = 4 ). IF sy-subrc = 0. out->write( lv_si_unit ). ENDIF. ENDMETHOD. ENDCLASS.
```
## 4.2.15.12.4.3  Determining the Conversion Factors
Use method UNIT\_PARAMETERS\_GET to determine the data conversion factors of a unit.
## Import Parameters
| Parameter Name   | Value Help          |
|------------------|---------------------|
| UNIT             | Unit of measurement |
## Export Parameters
| Parameter Name   | Value Help                                  |
|------------------|---------------------------------------------|
| DECIMALS         | Number of decimal places for rounding       |
| DIMENSION        | Dimension key                               |
| NUMERATOR        | Numerator for conversion to SI unit         |
| DENOMINATOR      | Denominator for conversion to SI unit       |
| EXPONENT         | Base ten exponent for conversion to SI unit |
| ADD_CONST        | Additive constant for conversion to SI unit |
| DECAN            | Number of decimal places for number display |
| FAMUNIT          | Unit of measurement family                  |
## Exceptions
Exception Name
UNIT\_NOT\_FOUND
## 
```
CLASS zcl_uom_conversion DEFINITION PUBLIC FINAL CREATE PUBLIC. PUBLIC SECTION. INTERFACES if_oo_adt_classrun. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_uom_conversion IMPLEMENTATION. METHOD if_oo_adt_classrun~main. lo_unit->unit_parameters_get( EXPORTING unit           = 'G' IMPORTING decimals       = DATA(lv_decimal) dimension      = DATA(lv_dimension) numerator      = DATA(lv_numerator) denominator    = DATA(lv_denominator) EXCEPTIONS unit_not_found = 1 OTHERS         = 2 ). IF sy-subrc = 0. out->write( lv_dimension ). out->write( lv_decimal ). out->write( lv_numerator ). out->write( lv_denominator ). ENDIF. ENDMETHOD. ENDCLASS.
```
Value Help
Unit of measurement is not maintained
```
Sample Code DATA(lo_unit) = cl_uom_conversion=>create( ).
```
## 4.2.15.12.4.4  Converting Fraction to Fraction with a 5-Digit Numerator/Denominator
Use method CONVERT\_TO\_FRACT5 to convert a fraction to a fraction with a maximum of 5-digit numerators/ denominators.
If the numerator or denominator contain more than 5 digits, the result will be an approximation as close as possible.
## Import Parameters
Parameter Name
Value Help
| NOMIN   | Nominator input   |
|---------|-------------------|
| DENOMIN | Denominator input |
## Export Parameters
Parameter Name
| NOMOUT   | Nominator output (5-digit max.)   |
|----------|-----------------------------------|
| DENOMOUT | Denominator output (5-digit max.) |
## Exceptions
Exception Name
CONVERSION\_OVERFLOW
##  Sample Code
```
CLASS zcl_uom_convert_to_fract5 DEFINITION PUBLIC FINAL CREATE PUBLIC. PUBLIC SECTION. INTERFACES if_oo_adt_classrun. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_convert_to_fract5 IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA: lv_nomin   TYPE f VALUE 999998, lv_denomin TYPE f VALUE 999999. DATA(lo_unit) = cl_uom_conversion=>create( ). TRY. lo_unit->convert_to_fract5( EXPORTING nomin    = lv_nomin denomin  = lv_denomin IMPORTING nomout   = DATA(lv_nomout) denomout = DATA(lv_denomout) ). CATCH cx_uom_error INTO DATA(lo_error).
```
Value Help
Value Help
Unit of measurement is not maintained.
```
out->write( |Exception raised| ). out->write( lo_error->get_text( ) ). ENDTRY. out->write( lv_nomout ). out->write( lv_denomout ). ENDMETHOD. ENDCLASS.
```
## 4.2.15.14  Communication Management
Get an overview of the ABAP classes and methods you can use to access communication scenarios, communication systems, communication arrangements and communication users.
The following classes and methods allow you to read communication scenarios, communication systems, communication arrangements and communication users.
These classes and methods can only be used if the authorizations are defined via standard COM catalogs.
Communication Scenarios
| Class/Method               | Description                                                   |
|----------------------------|---------------------------------------------------------------|
| CL_COM_SCENARIO_FACTORY    | Factory class for IF_COM_SCENARIO_FACTORY                     |
| IF_COM_SCENARIO_FACTORY    | Allows you to query and retrieve communication scenarios      |
| IF_COM_SCENARIO            | Allows you to read attributes of communication scenarios      |
| Communication Users        |                                                               |
| Class/Method               | Description                                                   |
| CL_COM_USER_FACTORY        | Factory class for IF_COM_USER_FACTORY                         |
| IF_COM_USER_FACTORY        | Allows you to query and retrieve communication users          |
| IF_COM_USER                | Allows you to read attributes of communication users          |
| Communication Systems      |                                                               |
| Class/Method               | Description                                                   |
| CL_COM_SYSTEM_FACTORY      | Factory class for IF_COM_SYSTEM_FACTORY                       |
| IF_COM_SYSTEM_FACTORY      | Allows you to query and retrieve communication systems        |
| IF_COM_SYSTEM              | Allows you to read attributes of communication systems        |
| Communication Arrangements |                                                               |
| Class/Method               | Description                                                   |
| CL_COM_ARRANGEMENT_FACTORY | Factory class for IF_COM_ARRANGEMENT_FACTORY                  |
| IF_COM_ARRANGEMENT_FACTORY | Allows you to query and retrieve communication arrange- ments |
| IF_COM_ARRANGEMENT         | Allows you to read attributes of communication arrange- ments |
## 4.2.15.15  Proxy API for SAP Build Process Automation
With the proxy API, you can start workflows of the workflow capability within SAP Build Process Automation out of your ABAP Environment.
The overall starting point is the class CL\_SWF\_CPWF\_API\_FACTORY\_A4C. Once you have the API object of interface IF\_SWF\_CPWF\_API, see the ABAP documentation on supported actions.
## Prerequisites
You've executed the integration steps in your ABAP environment. See Integrating SAP Build Process Automation [page 3037].
## 4.2.15.16  XCO Library
The XCO ('Extension Components') library is a general-purpose development library for ABAP aimed at providing a highly efficient ABAP development experience. The Cloud Platform (CP) edition of the XCO library is specifically designed to support ABAP development scenarios in the new SAP BTP ABAP environment.