Application Development 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: 

How can this be realized?

former_member207732
Participant
0 Kudos

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!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

athavanraja
Active Contributor
0 Kudos

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