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

append Structure to a structure

Former Member
0 Likes
505

i have 3 different structures.

i have to append them into one structure and then make database call.

whats themost feasible way to do it

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
479

Hi,

Are the structure defined in the data dictionary or in program.

If it is in program, do like :

TYPES: BEGIN OF t_day,

work(8) TYPE c,

free(16) TYPE c,

END OF t_day.

DATA BEGIN OF week.

INCLUDE TYPE t_day AS monday RENAMING WITH SUFFIX _mon.

INCLUDE TYPE t_day AS tuesday RENAMING WITH SUFFIX _tue.

INCLUDE TYPE t_day AS wednesday RENAMING WITH SUFFIX _wed.

...

DATA END OF week.

If it is in dictionary,

You can use the .Include or append structure feature for that.

Regards,

Renjith Michael.

3 REPLIES 3
Read only

Former Member
0 Likes
479

Hi,

1.Just use .INCLUDE -


structure name to include antother structure in to the structue.

2.Add two structures into one and make database call.

Regards,

If helpful reward with points(Don't forget).

Read only

Former Member
0 Likes
480

Hi,

Are the structure defined in the data dictionary or in program.

If it is in program, do like :

TYPES: BEGIN OF t_day,

work(8) TYPE c,

free(16) TYPE c,

END OF t_day.

DATA BEGIN OF week.

INCLUDE TYPE t_day AS monday RENAMING WITH SUFFIX _mon.

INCLUDE TYPE t_day AS tuesday RENAMING WITH SUFFIX _tue.

INCLUDE TYPE t_day AS wednesday RENAMING WITH SUFFIX _wed.

...

DATA END OF week.

If it is in dictionary,

You can use the .Include or append structure feature for that.

Regards,

Renjith Michael.

Read only

Former Member
0 Likes
479

An append structure can only be assigned to one table or structure.

If you want to append the same fields to several tables or structures, you can store these fields in an include structure - reusability is possible.