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

field string

Former Member
0 Likes
521

how to define a field string with specific size help me pls

3 REPLIES 3
Read only

former_member189059
Active Contributor
0 Likes
500

You cannot have a string with a particular size, but you can use the char data type

data: test(60).

or

data: test(60) type char.

Read only

Former Member
0 Likes
500

declare the string as

Data: var type string .

there is no size for string ..

use char for specified no of char

Read only

Former Member
0 Likes
500

Hi Pandu,

Field String resmbles the Structures that you write in C.

for eg. DATA : f1(20) type c,

Look at the following code which illustrates field string:

The MOVE Statement Treats a Field String Name without a Component Name like a Variable of Type C

report zfields.

data: fs(4) value 'ABCD',

begin of str,

c1(1),

c2(2),

c3(1),

end of str.

str = fs. "str will hold char 4 variable

write: / str, "writes ABCD all together

/ str-c1, str-c2, str-c3. "writes A BC D with gaps