Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RTTI

Former Member
0 Likes
777

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

3 REPLIES 3
Read only

MarcinPciak
Active Contributor
0 Likes
716

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

Read only

uwe_schieferstein
Active Contributor
0 Likes
716

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

Read only

0 Likes
716

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> ).