PackagePackagetypeA library you install and call yourself.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

abap-gencust

A generic customizing table pair and reader class for ad hoc configuration parameters in ABAP, replacing a new table, view and access routine per parameter, with values per user or key date.

New customizing parameters in a project usually mean a new table, a view, a view cluster and an access routine each time. This replaces them with one generic pair of header and item tables, keyed by a purpose key, holding single values, structure-like parameters or multi-value parameters, and read through a reader class that a factory instantiates and that returns an object saying whether a value was found rather than the value alone. An item key can also carry an organisational level, a valid-from date and a user id, so a setting can be switched on for one user during a test phase or from a key date onwards. There are two identical table pairs: one is normal customizing with a link to the transport system, the other has none and is meant for maintaining values directly in the production system. Validating values against domains or check tables stays outside it, which the maintainer leaves to normal customizing features.

Facts

Last pushLicenceGPL-3.0

Where it sits

Lives in
Provides
ConfigurationABAPConfigurationcapabilityPer-environment settings without per-environment code — profiles, layered configuration, and bindings resolved from the platform at start-up.
Requires
abapGitabapGitartifactInstalls the repository into the ABAP system; the README names abapGit as the install method, before the view maintenance dialogues are generated.

Who is behind it

Jörg KrauseJörg KrausePersonMaintains this
In the atlas: maintains 5, contributes to 6
@jrgkraus
maintainer

What it declares

Every artifact

Type
Package
Origin
Independently maintained

As a package

Where it runs
Inside its host
Distributed through
abapGit

Connections2

README

quoted from jrgkraus/abap-gencust under GPL-3.0, read
jrgkraus/abap-gencust/README.mdOn GitHub

General customizing table for ABAP

Use case

If there is a need for new customizing parameters in customer projects, we usually create tables, views, view clusters, access routines and so on. What if we used one single table for this? We would have an unique access module and could store as many parameters as we want using an access key.

Real-life experiences

I used this approach for many years in a mid-range implementation with about 3000 Users. It makes the developing more straightforward when it comes to use settings stored in the database. After 4 years, about 250 different parameter keys accumulated in our generic table. In case we have special requirements such as proper validation of values against domains or check tables, we continue using normal customizing features, but in case of simple setup parameters, the generic table is very helpful.

Features

  • General customizing tables
  • Possibility to set validity dates and user ids (for testing)
  • Usage with our without change requests (customizing or non-customizing)
  • Possibility to store structure-like parameters (see ZP_GENCUST_DEMO_STRUCTURE)
  • Possibility to store multi-value parameters (see ZP_GENCUST_DEMO_MULTIPLE)

Installation

  • Download the repository and install it with ABAPGIT
  • Generate view maintenance dialogues
    • ZDB_GENCUSTHD, ZVI_GENCUSTIT: Delivery class is C, so the dialogues will create with recording routine
    • ZDB_GENCUSTHD2, ZVI_GENCUSTIT2: Delivery class is A, so no recording routine will be included

Usage notes

Maintaining the tables

There are two (identical) sets of customizing tables: ZDB_GENCUSTHD ZDB_GENCUSTIT and ZDB_GENCUSTHD2 ZDB_GENCUSTIT2. The latter ones are tables with no transport link. They are intended for maintaining directly in the production system (for example, if material numbers, customer codes, address numbers ore anything else concerning master data is to be stored). The others are normal customizing with link to the transport system.

I recommend creating two view clusters, for each pair of tables one. See the example here:

view cluster view cluster (item)

We also created parameter transactions (based on SM34) to quickly maintain the data.

The header table contains the following fields:

  1. Purpose key: the general access key for this parameter set
  2. SAP Module: The top-level ERP module (MM, PP...) where the parameter is used
  3. Description of the parameter
  4. Description that contains info on the organization level that is being used (could be plant, company key or even a concatenation of levels such as sales org / distr. chan / division)

The item table has the following:

  1. Purpose key
  2. Org level: a general-purpose key (20 chars) to qualify the setting. Could be a "real" org. level but also any another structural characteristic from the business model
  3. Optional key: in some cases, a single key is not sufficient. Here, this key comes handy
  4. Valid from: This special parameter can be used to make a row valid from a specific date on. It could be helpful if you want to activate a new feature on a key date
  5. User: This is for the test phase of the project. One can activate the setting only for a specific user
  6. Counter: If a multi-value parameters is required, use the counter and create several lines with the same key but incremental counter. Make sure to not mix values with counters and those without for one purpose key
  7. Inactive: activating this checkbox wil make the reader class not consider the row
  8. Parameter value: 255 characters to store the value of the parameter
  9. Parameter description: if needed, each parameter can be described here
Using the reader class

The reader class is instantiated by a factory:

  settings_reader =
    cond #(
      when input = abap_true
        then zcl_gencust_factory=>get_main_nocust( parameter_purpose )
        else zcl_gencust_factory=>get_main( parameter_purpose ) ).
        

As shown in the example, there are two options: instantiate the customizing variant (ZDB_GENCUSTHD ZDB_GENCUSTIT) or the non-customizing one.

Reading the values

    data(settings_value) = settings_reader->single( plant ).

The read methods implement the return pattern, thus they return an object that can be used to get the value that has been read, but also to determine if a value exists or not.

    if settings_value->is_ok( ).
      cl_demo_output=>display( |Value found: { settings_value->get_value( ) }| ).
    else.
      cl_demo_output=>display( settings_value->get_error( ) ).
    endif.
Demo reports

Refer to the ZP_GENCUST_DEMO* reports to learn more about how to use the features

GPL-3.0, read
Configuration
  1. config-managementTheme, CSS and CSP settings of abap2UI5 pages kept in tables
  2. abaKLibrary for managing ABAP constants from registered sources
  3. aqoABAP application options as a structure with a generated editor
  4. abap-dynamic-assignmentFramework for runtime parameters, ranges and value mappings in ABAP
  5. abap-tvarvcHelper class for reading TVARVC parameters and select-options

Details

Sources3
dotabapdiscovered herechecked
github.com/jrgkraus/abap-gencusttree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viadotabap
first seen in the atlas
ecosystem and domainabap, operations-and-runtime
abaplint
issues under its own abaplint configuration688
lines1,837
statements922
objects53
files54
analysed, main
abaplint version2.120.84
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:jrgkraus-abap-gencust
JSON
/artifacts/jrgkraus-abap-gencust.json
MCP
Connecting an agent