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

data types

Former Member
0 Likes
828

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
Read only

Former Member
0 Likes
775

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

we do have STRING datatype in abap

data : str type string.

5 REPLIES 5
Read only

Former Member
0 Likes
776

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

we do have STRING datatype in abap

data : str type string.

Read only

Former Member
0 Likes
775

Nothing wrong.

and there is strind data type

data v_str type string.

Read only

rodrigo_paisante3
Active Contributor
0 Likes
775

hi

data str type string value 'character'.

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

write / str.

write / st.

It will show character, both

Read only

Former Member
0 Likes
775

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

Read only

Former Member
0 Likes
775

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