Ansicht
Dokumentation
ABENC1_CONSUMER_RULES_ELEM - C1 CONSUMER RULES ELEM
Vendor Master (General Section) Vendor Master (General Section)This documentation is copyright by SAP AG.
C1 Contract Rules for Consuming Elementary Types
The data type of
- DDIC domains or DDIC data elements
- components of DDIC structures and DDIC database tables or elements of CDS entities
- public types of global ABAP classes or interfaces
are allowed to be changed as follows:
- Integer types INT1, INT2, INT4 or b, s, i can be replaced by integer types of a larger value range.
- The length of data types CHAR, SSTRING, DEC, CURR, QUAN, DF16_DEC, DF34_DEC or c, p can be increased.
- The number of decimal places of data types DEC, CURR, QUAN, DF16_DEC, DF34_DEC or p can be increased.
All these changes result in an enhanced value range compared to the original data type. A consumer must be able to handle larger values. This impacts all operations with elementary data objects that are typed with such a type as well as operations with structured data that contain components of such a type.
Operations with Elementary Data Objects
When working with elementary data objects of one of the above types the behavior after an allowed type change depends on the type, the operand position and the content.
Possible Problems
Examples for possible problems are:
- In assignments of data objects that have a changed type to data objects whose type is not changed, content can be cut off or overflow exceptions may occur.
- In statements that require compatible data types, syntax errors can occur. Examples are:
- Assignments between data reference variables.
- Access to internal tables with an elementary line type using a table key.
- Importing data from data clusters with IMPORT.
- In statements that require lossless assignments, exceptions can occur. Examples are:
- Host variables in read positions of ABAP SQL.
Mitigation
When declaring data objects always refer to the released data types itself. Do not refer to self defined types. Use data objects referring to released types only at operand positions, where changing the type cannot produce an error.
Operations with Structures
Changing the data type of a component of a structure changes the technical type of the complete structure. This has a large impact since there are many operand positions, where compatibility is required for structures and generally, the same errors can occur that result from changing the elements of structures described below and the same mitigations apply.
Vendor Master (General Section) General Material Data
This documentation is copyright by SAP AG.
Length: 3732 Date: 20240511 Time: 191833 sap01-206 ( 46 ms )