Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Attila
Active Participant
7,899

Overview

    • Motivation
    • Prerequisites
    • Defining the customizing table
    • Authorization setup
    • Maintain configuration data

 

Motivation

You want an SM30 like maintenance view on BTP.

To control the behavior 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.

Attila_30-1711297697603.png

Attila_31-1711297729716.png

Refresh the browser to see the new Space.

Attila_33-1711297784104.png

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.

Attila_34-1711297870471.png

  • 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.

Attila_0-1711297997773.png

Attila_1-1711298027505.png

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.

Attila_2-1711298100948.png

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

Attila_3-1711298122715.png

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

Attila_4-1711298166078.png

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.

Attila_5-1711298206362.png

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

Attila_6-1711298271922.png

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.

Attila_7-1711298340472.png

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.

Attila_8-1711298367775.png

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.

Attila_0-1711298532394.png

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

Attila_1-1711298561583.png

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.

Attila_2-1711298620192.png

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

Attila_3-1711298646174.png

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

Attila_4-1711298734781.png

Attila_5-1711298810995.png

Attila_6-1711298852224.png

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

Attila_7-1711298877526.png

Attila_8-1711298890779.png

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

Attila_9-1711298920574.png

Attila_10-1711298940696.png

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.

Attila_11-1711299032553.pngAttila_12-1711299048896.png

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.

Attila_13-1711299095600.png

Attila_14-1711299151944.png

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.

Attila_15-1711299176196.png

Nice things done easy! 🤓

11 Comments
Labels in this area