AS ABAP Release 758, ©Copyright 2024 SAP SE. All rights reserved.
ABAP - Keyword Documentation → ABAP - Rules for ABAP Cloud → Contract Rules for ABAP Released APIs → C1 Contract Rules → C1 Contract Rules for API Consumers →C1 Contract Rules for Consuming Structures
API providers can add or change non-key elements in global types as structured DDIC types or CDS entities. These types can be released APIs themselves or can be used for typing attributes or method parameters of released classes or interfaces. Also the position of non-key elements can be changed. This impacts all operations with APIs that rely on a certain number of components of a structure and on their position. Main examples are:
Includes
Including a released structure into another structure.
Possible Problems
Error, when a component is added that already exists.
Mitigation
Include a released structure only by renaming its components with suffixes.
Assignments and Comparisons
Assignments and comparisons between data objects that are typed with the released structured type and data objects that are typed otherwise can occur for:
Possible Problems
Depending on the change all kinds of errors might occur. The following allowed changes in particular can affect the rules for processing structures fundamentally:
Mitigation
No assignments or comparisons between released structures and data objects that are typed otherwise. No usage of otherwise defined structures in ABAP SQL. The various CORRESPONDING mechanisms can be used to mitigate the problem, but they are not failsafe in all situations.
Unstructured Access
Processing the content of a released structure without addressing single components as for example:
Possible Problems
Depending on the change (see above) all kinds of errors might occur.
Mitigation
No processing of released structures without accessing single components.
Field Symbols
Addressing released structures with field symbols by using:
Possible Problems
When the addition CASTING is used, deep components must appear with exactly the same type and position in the assigned structure.
Mitigation
No casting assignment of released structures to field symbols.
RFC
Passing released structures to remote RFMs.
Possible Problems
Deep components are not supported in RFC.
Mitigation
No passing of released structures to remote RFMs.