Skip to Content
0
Former Member
Jan 31, 2012 at 08:39 AM

Getting the type of field

803 Views

Hello all,

I am using the RTTS functionality to get some structure types (the structure is defined in type of interface )

the issue here that I need the type and I mange to get it with the following code but I am not sure

that this is the right way ,maybe you will have better suggestion since I am count here on '='....

lr_structdescr ?= cl_abap_structdescr=>describe_by_data( if=>str01 ).
lt_components = lr_structdescr->get_components( ).

    SPLIT lr_datadescr->absolute_name AT '=' INTO TABLE lt_type_path.
    lv_line = LINES( lt_type_path ).
    READ TABLE lt_type_path INTO ls_type_path INDEX lv_line.

and in ls_type_path i will get the type of the field.

Thanks,

Joy