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

how to include structures in internal tables

Former Member
0 Likes
2,463

hi,

i want to include some structures in internal tables.

could you please tell me how can i do?

for eg: i want to include structures:

BLFA1,

BLFB1,

BLFM1.....

thanks,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
996

Hi Venu,

if you include BLFA1, BLFB1, BLFM1 in one internal table it will give error saying that some thing(i mean some field) already declared, so to aviod that use required fields and create the internal table...

there are some common fields in all these structures, so either you make sure there are no common fields in between them. or else it will keep on telling that already defined...

just take a decision,

what is your requirement..

Regards

vijay

Hi Venu,

if you include BLFA1, BLFB1, BLFM1 in one internal table it will give error saying that some thing(i mean some field) already declared, so to aviod that use required fields and create the internal table...

there are some common fields in all these structures, so either you make sure there are no common fields in between them. or else it will keep on telling that already defined...

just take a decision,

what is your requirement..

Regards

vijay

4 REPLIES 4
Read only

Former Member
0 Likes
997

Hi Venu,

if you include BLFA1, BLFB1, BLFM1 in one internal table it will give error saying that some thing(i mean some field) already declared, so to aviod that use required fields and create the internal table...

there are some common fields in all these structures, so either you make sure there are no common fields in between them. or else it will keep on telling that already defined...

just take a decision,

what is your requirement..

Regards

vijay

Read only

Former Member
0 Likes
996

Hi Venu,

Check this out...

DATA: BEGIN OF int_table OCCURS 0.

INCLUDE STRUCTURE BLFA1.

END OF int_table.

Regards,

Arun Mohan

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
996

Normally we would do something like this.



data: begin of itab occurs 0.
        include structure blfa1.
        include structure blfb1.
        include structure blfm1.
data: end of itab.

But in this case the structures contain some like fields, which makes the above declariation impossible. In order to have all feidsl of those structures in your internal table, you will need to list the manually.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
996

Hi Venu,

You can declare as...

DATA: BEGIN OF IT_BLFA1 OCCURS 0.

INCLUDE STRUCTURE BLFA1.

END OF IT_BLFA1.

DATA: BEGIN OF IT_BLFB1 OCCURS 0.

INCLUDE STRUCTURE BLFB1.

END OF IT_BLFB1.

DATA: BEGIN OF IT_BLFM1 OCCURS 0.

INCLUDE STRUCTURE BLFM1.

END OF IT_BLFM1.

I guess this is what your are looking.