Skip to Content

How can this be realized?

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!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2005 at 09: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2005 at 09: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 06, 2005 at 09:54 AM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.