‎2009 Jun 12 11:09 AM
hi gurus ,
i have one task to do on RTTI . Please anybody can explain what is RTTI , RTTC and RTTS . please give one sample example to learn these concepts . thanks
‎2009 Jun 12 11:21 AM
RTTS = RTTI + RTTC.
[Run Time Type Services|https://wiki.sdn.sap.com/wiki/x/1ac]
[Run Time Type Identification|; - example thread
[Run Time Type Creation|https://wiki.sdn.sap.com/wiki/x/zaQ]
You can find more in SCN about it (sepecially in Wiki).
Some concept and example about [RTTI|http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3145358411d1829f0000e829fbfe/frameset.htm]
Regards
Marcin
Edited by: Marcin Pciak on Jun 12, 2009 12:23 PM
‎2009 Jun 12 11:26 AM
Hello
You may have a look at:
[Creating Flat and Complex Internal Tables Dynamically using RTTI |https://wiki.sdn.sap.com/wiki/display/Snippets/CreatingFlatandComplexInternalTablesDynamicallyusingRTTI]
Regards
Uwe
‎2022 Feb 23 3:38 AM
Hi ,
You can go through the hyper-link given below
RTTS.
Kindly find the sample program to understand RTTI and RTTC concepts.
Thanks and Regards,
Aditya Mane
PARAMETERS P_table TYPE tabname.
DATA : ty_struct TYPE REF TO cl_abap_structdescr,
final_table TYPE REF TO data.
FIELD-SYMBOLS: <fs_table> TYPE ANY TABLE.
ty_struct ?= cl_abap_typedescr=>describe_by_name( p_name = p_table ).
TRY.
CALL METHOD cl_abap_tabledescr=>create
EXPORTING
p_line_type = ty_struct
* p_table_kind = TABLEKIND_STD
* p_unique = ABAP_FALSE
* p_key =
* p_key_kind = KEYDEFKIND_DEFAULT
RECEIVING
p_result = DATA(t_table).
CATCH cx_sy_table_creation.
ENDTRY.
CREATE DATA : final_table TYPE HANDLE t_table.
ASSIGN : final_table->* TO <fs_table>.
SELECT * FROM (p_table) UP TO 10 ROWS INTO TABLE <fs_table> .
cl_demo_output=>display( <fs_table> ).