Skip to Content

Custom Code List Data Types in the Studio

In many projects, new code list data types are required for custom business objects or business object extensions. A typical example is a field that types or categorizes a business object instance. If you use a code list data type for a business object field, for example, a value help and an input check are automatically available on the UI.

 

As of release 1302, a new item type called Code List Data Type is available in the SAP Solutions OnDemand Studio, which can be used for this use case. This document describes the different ways of defining code list data types in the studio and helps you decide when to use which option.

Prior to 1302, you could define custom code list data types in the studio in two different ways:

  1. You define a business configuration object (BCO) and select the ‘Create Code List Data Type’ checkbox. You create the code list values by defining a business configuration set for the BCO.

    Customers can adjust the code list values in the following ways:
    • You have defined several BC sets for the same BCO and assigned them to different business options:
      By selecting the required business options in the scoping process, customers activate the code list values relevant for their process.
    • You have defined a BCO, a BC set and a business configuration view in your solution:
      Depending on whether you have selected the ‘Values can be added/deleted in Fine-Tuning’ option in the BC set, customers can add new code values (in the customer namespace Z*) or delete delivered code list values.
  2. You define a BC set and, under ‘Business Configuration Object Type’, select ‘Create Implicit Business Configuration Object’.

    Customers may adjust the code list values in the following way:
    You have defined several BC sets for the same BC set parameter and assigned them to different business options: By selecting the required business options in the scoping process, customers activate the code list values relevant for their process.

In both cases, you must assign the BC set(s) to a business option. Once the business option is selected to be included in the scope, the code list values are deployed to the runtime when you deploy the business configuration content.

As of release 1302, it is no longer possible to create BC sets with an implicit BCO. However, existing BC sets are still supported. Instead, there is a new item type called Code List Data Type, which you can use to define a static code list data type. This cannot be changed by the customer.

 

The Code List Data Type item type has the following advantages:

  • You do not need to assign it to a business option or perform a BC deployment.
  • After activation, it is instantly available for use.
  • It is activated much faster than BCOs (on average, more than five times).
  • The code values of a code list data type item are available as constants in ABSL scripting. Have a look at the following example:

More details on code list data types can be found in the related chapter in the studio documentation (link). In the following table, different aspects of custom code list data types are compared.

BC Set with
Implicit BCO
BCO with
BC Set
Code List
Data Type
Available in SAP Business ByDesign StudioYesYesNo
Available in SAP Cloud Developer Studio
(= SDK for SAP's on-demand solutions)
YesYesNo
Available in SAP Solutions OnDemand Studio*Creation no
longer possible
YesYes
Customer can influence code list values by selecting business optionsYesYesNo
Customer can adapt code list values in fine-tuningNoYesNo
Assignment to business option and BC deployment requiredYesYesNo
Constants for code list values available in ABSLNoNoYes
Average time required for activation

1 min

1 min

~ 10 sec

* The SAP Solutions OnDemand Studio version 1302 is the successor product both for 'SAP Cloud Developer Studio' (used for SAP Customer OnDemand) and for 'SAP Business ByDesign Studio' (used for SAP Business ByDesign).

Summary

If customers do not need to adapt code list values, you should use the Code List Data Type item type to speed up activation and deployment of your solution. In case customers need to adjust code list values, you should use a business configuration object with a BC set (and BC view).

Tags: