Application Development and Automation 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: 
Read only

define internal table

Former Member
0 Likes
684

hi everybody

how to define an internal table which will include 4 different structures?

TYPES: BEGIN OF ty_accfile.

INCLUDE STRUCTURE t,

INCLUDE STRUCTURE bbkpf.

INCLUDE STRUCTURE bbseg.

TYPES: END OF ty_accfile.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
649

Hi,

Try like this....



types : begin of typ_input,
            wa_string type string,
           end of typ_input.
           
types : begin of typ_input1,
            wa_string1 type string,
           end of typ_input1.    
           
data : gt_input type typ_input,
       gt_input1 type typ_input1.         
             
DATA: BEGIN OF gt_output OCCURS 0.
             include structure gt_input.
             INCLUDE STRUCTURE gt_input1.
DATA: end of gt_output.

DATA : itab type table of  gt_output.

Hope it will helps

5 REPLIES 5
Read only

Former Member
0 Likes
650

Hi,

Try like this....



types : begin of typ_input,
            wa_string type string,
           end of typ_input.
           
types : begin of typ_input1,
            wa_string1 type string,
           end of typ_input1.    
           
data : gt_input type typ_input,
       gt_input1 type typ_input1.         
             
DATA: BEGIN OF gt_output OCCURS 0.
             include structure gt_input.
             INCLUDE STRUCTURE gt_input1.
DATA: end of gt_output.

DATA : itab type table of  gt_output.

Hope it will helps

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
649

data: itab type table of ty_accfile.

Read only

Former Member
0 Likes
649

Hi,

When you are including 4different structures...you should aware about the fields of those structures...if any common field exists within those structures...then system will not allow you to that....

Arunima

Read only

0 Likes
649

Hi Arunima

In fact Im having the internal table which includes 4 structures, where there are common fields

So how I should handle it?

Read only

Former Member
0 Likes
649

DATA:

it_itab type standard table

of ty_accfile

initial size 0.