Skip to Content
author's profile photo Former Member
Former Member

Structures

Can anyone please tell me how does the values get

populated in a structure during run time when there is

no value present in the structure?

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Aug 01, 2006 at 05:52 PM

    Hi Kevin, That's right, structures don't have data. They only represent what the data should look like with types and lengths. Say for example you have a database table MARA, you have a screen with fields of MARA but they are referencing a structure XMARA. In the program, there is a data statement for XMARA.

    data: Xmara type mara.

    Then somewhere later in the code, there will be a select statement or something that will move the data into the structure.

    
    select single * from mara
                        <b>into xmara</b>
                               where matnr = p_pmatnr.
    
    

    This is how the data is moved from a db table to a structure.

    Regards,

    Rich Heilman

    Add comment
    10|10000 characters needed characters exceeded