Ansicht
Dokumentation
ABENOO_OBS_STRUCT_DEF_ANON_2 - OO OBS STRUCT DEF ANON 2
CPI1466 during Backup TXBHW - Original Tax Base Amount in Local CurrencyThis documentation is copyright by SAP AG.
Cannot Use Anonymous Components in Structures
You cannot declare anonymous components
when you define a structured data object using the DATA, CLASS-DATA, STATICS, or CONSTANTS statements in ABAP Objects.
In ABAP Objects, the following statements cause an error message:
DATA: BEGIN OF struc,
'Text Literal',
space(10) [TYPE c],
text(10) TYPE c VALUE 'Text Field',
END OF struc.
Correct syntax:
DATA: BEGIN OF struc,
text1(12) TYPE c VALUE 'Text Literal',
blanks(10) TYPE c VALUE IS INITIAL,
text2(10) TYPE c VALUE 'Text Field',
END OF struc.
Cause:
You should be able to address each component in a structure explicitly. If you declare
literals, or the special name space in the structure definition, nameless text fields are included
as components. For literals, the initial and value correspond to the content of the literal. For space,
the system creates a text field filled with spaces. These anonymous text fields cannot be addressed
explicitly in programs. In particular, structures never contain components with the name space.
You can only access anonymous components using the structure name and offset/length addressing. You
can easily replace these nameless components with named components. Named components increase the function
of anonymous components by allowing them to be accessed explicitly, without limiting their role as, for example, as filler fields.
CL_GUI_FRONTEND_SERVICES - Frontend Services rdisp/max_wprun_time - Maximum work process run time
This documentation is copyright by SAP AG.
Length: 2118 Date: 20240328 Time: 224557 sap01-206 ( 49 ms )