Get Example source ABAP code based on a different SAP table
Field Symbols, Cast Structures This example demonstrates how field symbols are cast.
ABAP_SOURCE_CODE DEMO CL_DEMO_FLD_SMBLS_STRUCTURE
ABAP_DESCRIPTION The structures line1> and line2> are cast to the number string 0123456789>. The structure is then accessed using the corresponding field symbol and the components are output individually. It should be noted that the date component contains an invalid date after the assignment, which is only used here for demonstration purposes. The structures are cast using the ASSIGN CASTING> statement. The obsolete addition STRUCTURE> of the statement FIELD-SYMBOLS> , replaced by ASSIGN CASTING>, is shown here as a comment.