/FRE/DB_CL_TS_CDM - Services to handle persistent storage of CDM-data
General Data in Customer Master General Material DataThis documentation is copyright by SAP AG.
Functionality
The class /FRE/DB_CL_TS_CDM reads and changes time series in the database.
A time series can belong to different KPRMs and thus can have different interfaces. Therefore, the genericinterface parameter for the public methods of class /FRE/DB_CL_TS_CDM are able to handle different interfacesfor different KPRMs. Interfaces for KPRMs that have previously been introduced are logged in Customizing tables. Subsequent format changes may cause errors.
Relationships
Example
Notes
Definition of KPRM Data
KPRMs (Key figure PaRMeter) are time series of SAPF&R, such as consumption data or stock or planning data. The time series consist of header data andbucket data. Each bucket contains all the data delivered for a single period of time. The periodicaldata can consist of a single value (for example, number of pieces in stock),or a flat structure containing a set of values.
To handle the time series properly, a suitable table type and its data structure have been set up (seebelow). To address the individual requirements of the KPRMs, these structures are built on a set ofrules that allows the integration of an individual structure for additional (header) attribute fields and the integration of the individual structure for periodic data.
Building rules for Table Types of KPRM-Data
Each imported time series of a KPRM must be transferred to the called methods of the class /FRE/DB_CL_TS_CDM to store it in the database or to delete it from the database. Similarly, the export parameter of an KPRM must be filled via a data transfer from the called read-method.
The following rules enable the correct mapping of the data structures.
Elements on the Highest Level
The KPRM data is transferred into and out of this class as a table with different KPRM values. Its line structure must supply the following field names on the highest level:
- KPRM
Type: /FRE/KPRM
- TIME_SERIES
Type: Table type of the TIME_SERIES field
Table Type of the TIME_SERIES Field
The table type of the TIME_SERIES field must be built in the following manner:
- Fixed key-field-structure /FRE/TS_PLD_HEADER_KEY_STY
- LOCID type /FRE/LOCID
- MATID type /FRE/MATID
- GRANULARITY type /FRE/TSTP
- Fixed field name for the buckets of the time series
- BUCKETS type table type of the buckets
- Freely definable structure for additional header attribute fields enhanced by a fixed structure for the validity period of the time series
Table Type of the Buckets
The table type's bucket structure for the time series must fulfill the following prerequisites:
- Fixed attributes to define the time period of a bucket
structure /FRE/TS_TSTMP_TABLE_STY
- Freely definable flat structure of a bucket row
Additional fields, structures or tables are ignored.
Freely Definable Structure for Additional Header Attribute Fields
This structure has a fixed component for the validity period and an additional structure for the additional header attributes:
- Fixed attribute fields for the validity period of the time series
structure /FRE/TS_PLD_HEADER_ATT_TST_STY
- TS_FROM
- TS_TO
- Free definable structure for additional attribute fields
Elements Must Exist in DDIC
All application-specific components mentioned above, such as:
- Table type of the time series - freely definable structure for additional attribute fields
- Table type of the buckets - freely definable flat structure of a bucket row
must be defined in the data dictionary (DDIC) to be processed properly. Otherwise they will either be ignored or will raise an exception.
Handling of Field Symbols Within the Public Methods of the Class
* Hierarchy of ALL INBOUND-time series tables
*
* TABLE: ET_TS_LEVEL type IS_TYPES-TTY_TS_LEVEL
* |
* +-- Row type: ES_TS_LEVEL type line of IS_TYPES-TTY_TS_LEVEL
* | -> data reference INDEPENDENT from ET_TS_VALUES
* |
* +-- Field: locid component of ES_TS_LEVEL
* +-- Field: matid component of ES_TS_LEVEL
* +-- TABLE: ts_comp_buckets component of ES_TS_LEVEL
* | |
* | +-- Row type: ES_TS_COMP_BUCKETS line of ET_TS_COMP_BUCKETS
* | | -> data reference INDEPENDENT from ET_TS_COMP_BUCKETS
* | |
* | +-- Field: tstfr component of ES_TS_COMP_BUCKETS
* | +-- Field: tstto component of ES_TS_COMP_BUCKETS
* | |
* | +-- STRUC: BLOB to be compressed on DB-table
* | -> Type identical to ES_VALUE_TB_OUT, see below
* |
* +-- STRUC: ES_HEADER_ATT type IS_TYPES-STY_HEADER_ATT
* | | -> data reference INDEPENDENT from ES_TS_LEVEL
* | |
* | +-- Field: ts_from component of ES_HEADER_ATT
* | +-- Field: ts_to component of ES_HEADER_ATT
* |
* +-- Field: ts_from_tss component of ES_TS_LEVEL
* +-- Field: ts_to_tss component of ES_TS_LEVEL
*
*
* ATTENTION:
*
* ASSIGNMENTS of COMPONENTS are not EXPORTABLE.
*
* ASSIGN in caller:
*
* 1. TSTFR, TSTTO to ES_TS_COMP_BUCKETS
* 2. TS_FROM, TS_TO to ES_HEADER_ATT
* 3. TS_FROM_TSS, TS_TO_TSS to ES_TS_LEVEL
* 4. TS_COMP_BUCKETS to ES_TS_LEVEL
*
**********************************************************************
*
* Hierarchy of the BLOB (Outbound table to DB)
*
* TABLE: ET_VALUE_TB_OUT type IS_TYPES-TTY_VALUE_TABLE_OUT
* |
* +-- Row type: ES_VALUE_TB_OUT type IS_TYPES-STY_VALUE_TABLE_OUT
*
*
**********************************************************************
Further information
ABAP Short Reference PERFORM Short Reference
This documentation is copyright by SAP AG.
Length: 8932 Date: 20120526 Time: 054237 triton ( 126 ms )






