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: 

structure declaration

Former Member
0 Kudos
127

Can i put an include(of a SAP table) during my structure definition ? I know that is possible in an internal table definition, but something got me wrong when i try to insert a include into a structure, see bellow :

BEGIN OF E_COMP,

INCLUDE ZM098, "other SAP table

SOMA(5) TYPE P,

DATA TYPE D,

END OF E_COMP.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
82

Please try it like this.



data: begin of e_comp.
        include structure zm098. "other SAP table
data: soma(5) type p,
      data type d.
data: end of e_comp.

Regards,

Rich Heilman

9 REPLIES 9

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
83

Please try it like this.



data: begin of e_comp.
        include structure zm098. "other SAP table
data: soma(5) type p,
      data type d.
data: end of e_comp.

Regards,

Rich Heilman

Former Member
0 Kudos
82

data : BEGIN OF E_COMP,

INCLUDE structure ZM098. "other SAP table

data :SOMA(5) TYPE P,

TYPE D,

END OF E_COMP.

regards

srikanth

Former Member
0 Kudos
82

You need to mention the keyword STRUCTURE after INCLUDE.

i.e. INCLUDE STRUCTURE ZM098.

-Kiran

Former Member
0 Kudos
82

Try like this

DATA:BEGIN OF E_COMP,

INCLUDE ZM098. "other SAP table

DATA: SOMA(5) TYPE P,

TYPE D.

DATA: END OF E_COMP.

If useful reward points.

Regards,

Vasanth

Former Member
0 Kudos
82

HI,

Check it out

replace the include statement with

INCLUDE STRUCTRE ZM098.

Regards,

Naveen

manuel_bassani
Contributor
0 Kudos
82

Hi Andre,

the following code should work


DATA  BEGIN OF E_COMP,

      INCLUDE STRUCTURE ZM098.

DATA: SOMA(5) TYPE P,
      DATA TYPE D,

      END OF E_COMP.

Regards, Manuel

Former Member
0 Kudos
82

hai

Check the bellow Structure Declaration

the changes in bold characters

<b>data: begin of e_comp.

include structure zm098.

data: soma(5) type p,

data type d.

data: end of e_comp.</b>

Thanks & regards

Sreeni

Former Member
0 Kudos
82

HI Andre.



REPORT zarun_2.

DATA   : BEGIN OF e_comp <b>OCCURS 0</b>. "Internal table with header line
        INCLUDE STRUCTURE emara. <b>"Include Structure in MARA table</b>
DATA  :  soma(5) TYPE p,
         data    TYPE d,
         END  OF  e_comp.



Regards,

Arun Sambargi.

0 Kudos
82

hi all,

Tks for those who answered me, but the right addiction was it :

TYPES : BEGIN OF E_COMP.

INCLUDE STRUCTURE ZM098.

TYPES : TESTE LIKE ZM098-VALOR_01,

END OF E_COMP.

tks everybody,

André