Type Checks and Type Compatibility
For historical reasons, the types of field symbols and parameters in subroutines or function modules can be defined with the STRUCTURE addition.
The following extra rules are checked in a UP after defining the type with STRUCTURE when assigning data objects, i.e. for the DEFAULT addition in the FIELD-SYMBOLS statement, for ASSIGN and when passing actual parameters.
BEGIN OF struc1,
a(1)
BEGIN OF struc2,
a(1) TYPE X.
INCUDE struc3.
END OF struc2.
BEGIN OF struc3,
b(1) TYPE X,
c(1) TYPE C,
END OF struc3.
Since the type compatibility can differ in a UP and an NUP, the type compatibility rules of the calling program are valid in an NUS for checking the parameters. This means that if an NUP calls a UP, the type compatibility is defined as in the NUP. Conversely, the Unicode check is activated if a UP calls an NUP.
Use the categories used in the Dictionary when using these types with
Structure Enhancements.