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

include in internal tables

Former Member
0 Likes
373

Hi,

i want to include 2 structures in my internal table.

i try this:

data: begin of anlab occurs 0.

include structure anla.

include structure anlb.

data: end of anlab.

I get an syntax-error because some fields a declared double (what is correct).

Then i tried this:

data: begin of anlab occurs 0.

include structure anla as anla RENAMING WITH SUFFIX _A.

include structure anlb as anlb RENAMING WITH SUFFIX _B.

data: end of anlab.

This works, but i have some double fields

like MANDT_A with MANDT_B and BUKRS_A with BUKRS_B.

Is there any way to include 2 structures wich include double fields?

thanks.

Regards, Dieter

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
344

1. Create a strcuture with fields you needed in ANLB as Y_ANLB

then


data: begin of anlab occurs 0.
include structure anla.
include structure Y_ABALB.
data: end of anlab.

2. otherwise


data: begin of anlab occurs 0.
include structure anla.
data : AFABE like anlb-AFABE.
.....
....
....
....

data: end of anlab

a®

1 REPLY 1
Read only

former_member194669
Active Contributor
0 Likes
345

1. Create a strcuture with fields you needed in ANLB as Y_ANLB

then


data: begin of anlab occurs 0.
include structure anla.
include structure Y_ABALB.
data: end of anlab.

2. otherwise


data: begin of anlab occurs 0.
include structure anla.
data : AFABE like anlb-AFABE.
.....
....
....
....

data: end of anlab

a®