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

Non-charlike structure

Former Member
0 Likes
2,185

hi gurus, i am declaring a field symbols, when i debug the code the <fs> is having a value Non-charlike structure, some of its components has a numerical data type, and i need it as char, any ideas?

tnx tnx

regards,

zry

4 REPLIES 4
Read only

Former Member
0 Likes
1,286

Hi,

Can you paste your code here?

Thanks.

Read only

Former Member
0 Likes
1,286

Hi Zry,

When a field symbol's type is any structure, then in the debug mode it shows 'Non-charlike structure'. This simply means that your field symbol is a structure. If you want it to be Char, then declare it as type char. For example,

FIELD-SYMBOLS: <fs> TYPE char32.

Regards,

Vinodh.

Read only

Former Member
0 Likes
1,286

Hi mara,

Field symbols offer functionality similar to pointers in other programming languages. It does not occupy memory for the data object, it points to the object that has been assigned to the field symbol. maybe your field symbol is pointing to a NON-CHARLIKE structure..anyway this is just my theory...

Nagmamahal,

Leonard Chomi.

Read only

Former Member
0 Likes
1,286

The FIELD-SYMBOLS statement declares a field symbol <fs>.

it has 2 methods ..

1. ... typing

2. ... STRUCTURE struc DEFAULT dobj

you are using 1 method ..

<b>DATA wa1 TYPE c LENGTH 512.

FIELD-SYMBOLS <scarr1> STRUCTURE scarr DEFAULT wa1.

<scarr1>-carrid = '...'.</b>

but you want 2 method

<b>

DATA wa2 TYPE c LENGTH 512.

FIELD-SYMBOLS <scarr2> TYPE scarr.

ASSIGN wa2 TO <scarr2> CASTING.

<scarr2>-carrid = '...'.</b>

Note

Field symbols declared using the addition STRUCTURE are a mixture of typed field symbols and a utility for casting structured data types. You should use the additions TYPE or LIKE for the FIELD-SYMBOLS statement to type field symbols, while the addition CASTING of the ASSIGN statement is used for casting.

reward points if it is usefull .

Girish