12-06-2005 9:09 AM
Hi,
I found a code in a sample code like this:
Append wa to struc.
There's only one field which type is "string" in "wa". And structrue "struc" has several fields. After this code executed, each fields of structure "struc" has values which are part of value in wa.
How can this happen? Where can I find corresponding materials?
Thanks!
12-06-2005 9:30 AM
Hi Zheng,
If the string is say 50 chars, and you have data upto 40 chars...
Now if structure is having fields, and the total length of structure is say 35 chars...
The statement 'Append wa to struc', will result in the value of string(40 chars) simply fall into the consequtive fields of struc (35 chars)...
Hope you understand...
Regards,
Raj
12-06-2005 9:30 AM
Hi Zheng,
If the string is say 50 chars, and you have data upto 40 chars...
Now if structure is having fields, and the total length of structure is say 35 chars...
The statement 'Append wa to struc', will result in the value of string(40 chars) simply fall into the consequtive fields of struc (35 chars)...
Hope you understand...
Regards,
Raj
12-06-2005 9:41 AM
the workarea wa has a lenght of 20 characters say. Structure has a length of 25 char say.
now, wa has data as 11002sapindiaabap.
when use append wa to struc the following happens.
struc-field1 = 11002
struc-field2 = sap
struc-field3 = india
struc-field4 = abap
So, u will see that struc fields get populated with data.
Pl. award appropriate points.
12-06-2005 9:54 AM
check out the following link.
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/79/c554d3b3dc11d5993800508b6b8b11/frameset.htm">Assignment Between Structure and Single Field</a>
Regards
Raja