Created
May 21, 2013 17:42
-
-
Save viniciustavanoferreira/5621716 to your computer and use it in GitHub Desktop.
Run Time Type Identification (example).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*&---------------------------------------------------------------------* | |
*& Report Z_RTTI_VTF | |
*& | |
*&---------------------------------------------------------------------* | |
*& | |
*& | |
*&---------------------------------------------------------------------* | |
REPORT Z_RTTI_VTF. | |
TYPES in_type TYPE i. | |
DATA: in_var TYPE in_type, | |
descr_ref TYPE ref to cl_abap_typedescr. | |
START-OF-SELECTION. | |
descr_ref = cl_abap_typedescr=>describe_by_data( in_var ). | |
WRITE: / 'Nome de tipo absoluto:', descr_ref->absolute_name. | |
WRITE: / 'Categoria de dado:', descr_ref->type_kind. | |
WRITE: / 'Tamanho:', descr_ref->length. | |
WRITE: / 'Decimais:', descr_ref->decimals. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment