Application Development 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: 

run time data types

Former Member
0 Kudos
141

Hello every body,

i want to create a run time data type CHAR_10

IS THERE ANY WAAY like

create data dataref type ('C').

this statement creates a data reference of type C

but can i specify CHAR_10

create data dataref type ('CHAR_10')??????

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
71

Please try it this way.



data: dataref type ref to data.

create data dataref type ('C') length 10.

Regards,

Rich Heilman

0 Kudos
71

BTW, Welcome to SDN!

Regards,

Rich Heilman

0 Kudos
71

Hi

thank you very much but problem is that i am getting data element or data type like 'CHAR_10' AND I want to create a run time data type sometihng like the below but it does not execute.

create data dataref type 'CHAR_10'.

waht i do if at run time i am getting the data type in character string.

Former Member
0 Kudos
71

Hi,

Try using the field-symbols..

FIELD-SYMBOLS: <FS> TYPE ANY.

DATA: V_CHAR(10) VALUE 'TEST'.

ASSIGN V_CHAR TO <FS>.

WRITE: / <FS>.

Thanks,

Naren

Thanks,

Naren