‎2007 Jun 12 7:12 AM
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
‎2007 Jun 12 7:19 AM
‎2007 Jun 12 7:21 AM
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.
‎2007 Jun 12 7:38 AM
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.
‎2007 Jun 12 7:51 AM
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