Motivation

You want an SM30 like maintenance view on BTP.

To control the behaviour of the business process You implemented on BTP or S/4HANA Cloud Public ABAP Environment (Steampunk/Embedded Steampunk), You need to expose a customizing as a developer to the functional people. This is all a natural and a primary demand of an SAP software implementation. We did this previously generating a maintenance view which makes possible to maintain the customizing table content by functional people in transaction SM30. In the cloud we do not have SAP GUI, so we need to approach this somehow.

Your possibilities are as follows.

Feature NameS/4HANA Cloud Public Edition ABAP EnvironmentBTP ABAP EnvironmentS/4HANA onPremise 2023
Custom Business Objects, up to a 2-level hierarchy, like a view cluster. YesNoYes
Business Configuration Maintenance Object, with optional language dependent text table and Transport feature included.YesYesYes
Custom implementation, can be boosted with open source RAP GeneratorYesYesYes

Custom Business Configuration (CBC) in fact is nothing else than a RAP BO service on top of a customizing table, which is then exposed via an SAP standard generic Fiori Application, like SM30 in SAP GUI. All the RAP artifacts can be generated by the ABAP Repository Object Generator. Which is fast.

Prerequisites

Access to the Customizing – Business Configuration Fiori Application.

If not already done, create a role out from the SAP_BR_BPC_EXPERT role template and assign it to Your and to the functional user.

01_Create_Role-1-1024x281 Custom Business Configuration
10_New_Role_with_User_Assignment-1-1024x468 Custom Business Configuration

Refresh the browser to see the new Space.

20_CBC-Tile-1024x488 Custom Business Configuration

As You can see not only manual maintenance is possible, but You can upload in mass from excel.

Let’s switch to the development part in ADT.

Important prerequisite: at least one Software Component of type Business Configuration is required with a corresponding Structure and underlying Development package in the system. 

kep-4 Custom Business Configuration
  • DevOps / architect / lead developer colleagues are responsible to manage the creation of it in real life scenario
  • Remark: On BTP ABAP Trial Environment You have neither access to this, nor it is possible to work in local packages.
  • On Your own BTP ABAP instance please follow SAP Help documentation for gCTS and Software Components.

If this is not set up, you can’t create and transport customizing, due the Transport Service API will not work w/o an instance driven by the generated RAP BO.

Defining the customizing table

Due the Custom Business Configuration app is a generic Front-end implementation, it will take the field label texts from the data elements. So, we need to create some including a proper text if not already done.

Scenario: Our need is to provide a customizing to maintain wire materials, and at the same time activate it to be used in a custom business process.

30_data_element-1024x226 Custom Business Configuration
40_data_element-1024x234 Custom Business Configuration

After creating the required data elements we need the persistency for the business configuration.

Likewise in SAP GUI and SM30, here we can also define a language dependent text table for the code descriptions, so that when the user logges in a given language, the corresponding descriptions can be maintained and displayed on the given language by default. But more is possible, You will see.

Therefore we create two tables in ADT:

  • Table with the wire material codes
  • Table with the code descriptions

Material Code Table

@EndUserText.label : 'Wire Material'
@AbapCatalog.enhancement.category : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #C
@AbapCatalog.dataMaintenance : #ALLOWED
define table ztc_sapdev_wirem {

  key client            : abap.clnt not null;
  key wire_material     : zde_sapdev_wire_material not null;
  configdeprecationcode : config_deprecation_code;
  last_changed_at       : abp_lastchange_tstmpl;
  local_last_changed_at : abp_locinst_lastchange_tstmpl;

}

Note #C and #ALLOWED they are prerequisites like the client field !

For REST resources we need timestamps for eTag handling, which is needed for concurrency control and keeping consistency. Just add the changed_at fields at the end, so that RAP runtime can manage this out of the box.

Note the configdeprecationcode field as well. This makes us available the built-in feature of Cusom Business Configuration to make a record obsolete or invalid.

60_config_deprecation_code Custom Business Configuration

In case You like to buffer the table, and activate change history, the table settings are available here:

70_table_settings-1024x505 Custom Business Configuration

From audit and accountability perspective we always turn on Change History for customizing tables. Please mark Log Changes!

80_log_changes Custom Business Configuration

In SAP GUI You can directly access record or field level change documents from SM30, this is a separate Fiori application on BTP.

If You are interested how, read the SAP Help.

Text table

@EndUserText.label : 'Wire Material Texts'
@AbapCatalog.enhancement.category : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #C
@AbapCatalog.dataMaintenance : #ALLOWED
define table ztc_sapdev_wiret {

  key client            : abap.clnt not null;
  @AbapCatalog.textLanguage
  key langu             : abap.lang not null;
  @AbapCatalog.foreignKey.keyType : #TEXT_KEY
  @AbapCatalog.foreignKey.screenCheck : false
  key wire_material     : zde_sapdev_wire_material not null
    with foreign key [0..*,1] ztc_sapdev_wirem
      where client = ztc_sapdev_wiret.client
        and wire_material = ztc_sapdev_wiret.wire_material;
  local_last_changed_at : abp_locinst_lastchange_tstmpl;

}

The syntax might be tricky, but the result is the same as You define a text table in SE11 with a foreign key relationship, except one point: @AbapCatalog.foreignKey.screenCheck annotation has a value false.

Code completion is a great help 😉.

We arrived at the stage to create the Business Configuration Object finally.

Right-click Your customizing table in the project explorer to generate the ABAP repository objects.

90_generate_repo-1 Custom Business Configuration

Select Maintenance Object. Continue with Next, then choose the desired package.

100_Maintenence_Object Custom Business Configuration

As You can see the option Add Deprecate Actions is selected by default because we added the configdeprecationcode field.

The option Add Data Consistency Check triggers automatic validations against domain fixed values if any behind the data elements used for the component of the customizing table, or checks for foreign keys only in case You add annotation: @AbapCatalog.foreignKey.screenCheck : true. In our case it was not needed.

Description will appear on the Fiori UI.

110_Scenario Custom Business Configuration

Enter the technical name of the Business Configuration Maintenance Object , this is what the Business Experts can also search in the Fiori App like the Description in previous step.

120_Maintenence_Object_Name Custom Business Configuration

Review the rest of the names whether You, Your development guideline or ATC checks are ok with it 😊.

After the generation You’ll find the generated ABAP artefacts in the package next to the table.

130_generated_objects Custom Business Configuration

It is important to Publish the service binding, so that Your oData service is accessible.

140_service_binding-1024x302 Custom Business Configuration

Did You know ?
The generator generates all the required API calls into the behaviour implementation class to initiate the Transport procedure of the customized entries? Good snippets (: !

Authorization setup

By default, the Edit button is disabled. This is because additional authorizations are required to edit the configuration.

160_conf_disabled-1024x276 Custom Business Configuration

The RAP generator also created us the required IAM Apps (Kind of Authorization Profile using legacy terms), but they are not part of any business catalog and role yet.

Following is the assignment flow for authorizations in the cloud:

IAM App – Catalog – Role – User

170_IAM_App_for_TableAccess-1024x371 Custom Business Configuration

As first step we need to assign the IAM app to an existing / new business catalog. In our case we create a new one.

180_assign_IAM_app_to_new_catalog-1024x473 Custom Business Configuration
190_new_business_catalog-1024x520 Custom Business Configuration
200_new_iamp_to_catralog_assignment-1024x572 Custom Business Configuration

To be able to use this Catalog in Development System, publish it locally. Do it for the IAM App as well.

205_Publich_IAM_App-1024x245 Custom Business Configuration
210_Publich_Catalog-1024x223 Custom Business Configuration

Let’s switch back to the FLP. Create a Business Role, Assign the Business Catalog and Users.

220_Create_Role_for_Customizing-1024x615 Custom Business Configuration
230_Assign_Role_To_User-1024x387 Custom Business Configuration

This itself is still not enough , You need to Maintain Restrictions.

The below two steps are just for demonstration purpose, in real life You need to align on the fine granularity of data access.

kep-8-1024x183 Custom Business Configuration
kep-9-765x1024 Custom Business Configuration

Now we connected the user to the required authorization. Let’s try to edit our customizing.

Maintain configuration data

Let’s switch back Custom Business Configuration App to add some entries.

150_FLP_CBC Custom Business Configuration
240_Edit_Configuration-1024x490 Custom Business Configuration

You can navigate to the details, and can edit the descriptions not only in Your logon language, but in all available languages. This better comparing to SM30.

kep-10-1024x708 Custom Business Configuration

Nice things done easy! .

Share this content: