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: 

data types

Former Member
0 Kudos
130

hi ,

is the declaration wrong?

data str(10) type c value 'character'.

write:/ str.

and dont we have string data type in abap,,,

thank you

praveen

1 ACCEPTED SOLUTION

Former Member
0 Kudos
77

there is nothing wrong with that declaration, whats the problem??

we do have STRING datatype in abap

data : str type string.

5 REPLIES 5

Former Member
0 Kudos
78

there is nothing wrong with that declaration, whats the problem??

we do have STRING datatype in abap

data : str type string.

former_member181962
Active Contributor
0 Kudos
77

Nothing wrong.

and there is strind data type

data v_str type string.

rodrigo_paisante3
Active Contributor
0 Kudos
77

hi

data str type string value 'character'.

data st(10) type c value 'character'.

write / str.

write / st.

It will show character, both

Former Member
0 Kudos
77

Hi Praveen,

Strings allocate the memory at the runtime , whereas character type is static memory allocation .

Generally for the text lines we will use string types

<b>Reward pts if found usefull :)</b>

regards

Sathish

Former Member
0 Kudos
77

Hi,

Nothing wrong.

data str(10) type c - For this you will ahve to specify the charecter length, in this case 10.

dara str type string - Length specification is not required.

Regards,

Shruthi R