-
Notifications
You must be signed in to change notification settings - Fork 3
Source: Database
This source type reads constants data from an SAP database table.
The Database source
expects to receive the table name as parameter.
When using the database content
you have to couple it with the internal format.
This table is expected to conform to a specific well-defined format. New custom tables should be created using 2 include structures:
-
ZABAK_DB_KEY
(with the primary key flag set) ZABAK_DB_FIELDS
Custom tables can have any desired name.
Please see report ZABAK_DEMO
for an example.
In order to be able to edit its content through transaction SM30, the delivery class and maintenance view options and screens can be set according to the table's specific needs. You may want some constants to be maintained directly in PRD (with the proper authorization group set) while others to be maintained in DEV and sent to PRD through a transport request. You may even want to include it in a project's SE34 table cluster.
Field | Key | Description |
---|---|---|
MANDT | X | Client (automatically filled by SAP) |
SCOPE | X | Project/Program/Other identifier |
FIELDNAME | X | Field name |
CONTEXT | X | Context (to allow for multiple uses of the same field in the same program) |
IDX | X | Index (only relevant for ranges) |
UE_SIGN | Sign (I/E) | |
UE_OPTION | Option (EQ/NE/BT/NB/CP/NP/LT/LE/GT/GE) | |
UE_LOW | Low | |
UE_HIGH | High |
MANDT | SCOPE | FIELDNAME | CONTEXT | IDX | UE_SIGN | UE_OPTION | UE_LOW | UE_HIGH |
---|---|---|---|---|---|---|---|---|
100 | ZPROJA_PROG1 | BUKRS | FROM | 0 | I | EQ | 1000 | |
100 | ZPROJA_PROG1 | BUKRS | TO | 0 | I | EQ | 2000 | |
100 | ZPROJA_PROG2 | WAERS | 1 | I | EQ | EUR | ||
100 | ZPROJA_PROG2 | WAERS | 2 | I | EQ | USD | ||
100 | ZPROJA_PROG3 | WRBTR | LEVEL1 | 1 | I | BT | 0 | 999 |
100 | ZPROJA_PROG3 | WRBTR | LEVEL2 | 1 | I | GE | 1000 |
The sample data above defines the constants for Project A. It defines 3 case scenarios comprising 5 different constants:
- BUKRS: Program ZPROJA_PROG1 needs to send something FROM company 1000 TO company 2000;
- WAERS: Program ZPROJA_PROG2 needs a range of currencies with only EUR and USD;
- WRBTR: Program ZPROJA_PROG3 needs to distinguish between two levels: LEVEL1 for values between 0 and 999 and LEVEL2 for values greater or equal to 1000.