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 Type for String...

Former Member
0 Likes
545

Hi,

I need to hold text data in an internal table.

So I created a structure as follows:

data: begin of str,

val type c,

end of str.

later when I go and add text values to the internal table,it displayes only the first character of the texts that I append.

How do I define the length of "C"?or which data type can I use to store strings of variable length?

Could someone pelase help me with this?

Thanks,

Sudha.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
503

Try this,

data: var1 type string.

TYPE C - Stores only 1 char by default. You may declare fixed length by saying

DATA: VAR1(10) TYPE C.

To store variable length use TYPE STRING.

Thanks,

SKJ

2 REPLIES 2
Read only

Former Member
0 Likes
504

Try this,

data: var1 type string.

TYPE C - Stores only 1 char by default. You may declare fixed length by saying

DATA: VAR1(10) TYPE C.

To store variable length use TYPE STRING.

Thanks,

SKJ

Read only

0 Likes
503

Thanks a lot...

Sudha.