Ansicht
Dokumentation

ABENCASTING_IMP_EXP_ABEXA - CASTING IMP EXP ABEXA

ABENCASTING_IMP_EXP_ABEXA - CASTING IMP EXP ABEXA

Addresses (Business Address Services)   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

Field Symbols, Casting

This example demonstrates how castings are performed when the type is specified implicitly and explicitly.

Source Code

Execute

Description

An implicit casting is performed in the first part of the method main. The field symbol fs1> is completely typed with the local program type t_date. The field sy-datum can be handled as a structure using the addition CASTING of the statement ASSIGN. This assignment would not be possible without the CASTING addition, since sy-datum is not compatible with the type of the field symbol.

An explicit casting is performed in the second part of the method main. The field symbol fs2> is completely generic. A cast is performed to the local program type t_date for the field sy-datum using the addition CASTING of the statement ASSIGN. The field symbol fs2> can now be handled like a structure but does not recognize components. For this reason, it must be assigned to another field symbol fs3>, component by component.






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 1267 Date: 20240510 Time: 101324     sap01-206 ( 31 ms )