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: 

CI include in structure

Former Member
0 Kudos

Hello,

I have defined a type as follows.

types: begin of var.

include structure xxx.

types: data1 like table1-field1,

data2 like table2-field2,

end of var.

Now i need to add a CI include in this type, so that when the include is implemented, i dont need to add the fields separately here again. I cannot write include structure CI_AFVU for example. Could someone pls pls tell me how to do this?

Regards,

Suraj

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi.

Is your CI_AFVU a structure, means you can open it as structure in SE11?

I tried

types: begin of var.
include structure CI_DPR_PROJECT.
TYPES: data1 like bcos_cust-destinat,
data2 like bcos_cust-client,
end of var.

and it worked fine.

Regards,

Timo

4 REPLIES 4

Former Member
0 Kudos

Hi.

Is your CI_AFVU a structure, means you can open it as structure in SE11?

I tried

types: begin of var.
include structure CI_DPR_PROJECT.
TYPES: data1 like bcos_cust-destinat,
data2 like bcos_cust-client,
end of var.

and it worked fine.

Regards,

Timo

0 Kudos

Hello Timo,

The code you have written works fine, but not for empty structures.

The problem here is that CI_AFVU is a customer include, which is an empty structure, to which the customer can add any number of fields. The issue here is that there is no way of knowing how many fields will be added. So I have to include this empty structure in the types.

Any way of doing that?

Regards,

Suraj

Former Member
0 Kudos

Hi Suraj Shenoy,

U can use the field symbols to declare a strcuture dynamically.

0 Kudos

Could you pls give a code sample?

Regards,

Suraj