‎2008 Jun 09 11:21 AM
Hi,
What is field string and what's the difference between Field String and Work Area ?
‎2008 Jun 09 11:25 AM
HI,
String is aprimitive data type .
Whereas work area is a line(ie used for storing single record only) type of an internal table.
Hope it helps you.
Reward points if helpful.
Regards,
Mukul
‎2008 Jun 09 11:37 AM
Hi,
Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol can point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol.
Field-symbols can increase performance to work with internal tables. If you use u2018ASSIGNINGu2019 command instead of u2018INTOu2019 SAP wonu2019t have the cost of copying current table row into work area.so it wil increase ur performance...
regards,
dhaya.
‎2008 Jun 09 11:41 AM
Hi Dhaya,
i am asking about FIELD STRING , not about FIELD SYMBOL.
‎2008 Jun 09 12:51 PM
Hi Vishal
We can say FIELD STRING is also an work area, but in field string we can have our fields defined i.e. we can restrict number of fields here.
Eg. Begin of fs (occurs 0/with header line),
f1 type kna1-kunnr,
f2 type kna1-name1,
end of fs.
Here by adding the clause 'occurs 0', memory will allocates to the fieldstring/wa i.e. definition of body.
By adding the clause 'with header line', fs acts as body as well as work area.
WORK AREA is one which represents all the fields of the referenced one.
Eg. wa like kna1 (occurs 0 / with header line).
The clauses 'occurs 0', 'header line' means the same as above.
If u find it useful, reward me plz.
Thanks
Suren
‎2008 Jun 09 1:05 PM
hii,
field string is a variable of type string..you can have work area as field string..
& work area can be of any type ..its just a line of an internal table..so it will follow the structure of an internal table.but only as one line of it.
reward points if useful
thx
twinkal.