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

Add fields to Structure

Former Member
0 Likes
477

hi,

i have structure that i use in some program before

and i wont to use it now in new program but with 1 more field

there is somthing that i can do beside build new structure.

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
448

types: begin of new_structure.
include structure old_structure.
types: new_field type p,
end of new_structure.
3 REPLIES 3
Read only

Former Member
0 Likes
449

types: begin of new_structure.
include structure old_structure.
types: new_field type p,
end of new_structure.
Read only

Former Member
0 Likes
448

Hi,

You can add the field directly if it is a Z structure.If it is a standard structure,then create the structure in your program as follows:

types:begin of struct,

include structure <struct name>,

newfield type c,

end of struct.

Read only

Former Member
0 Likes
448

Try this:

DATA: BEGIN OF st_newstructure.
        INCLUDE oldstructure.
        DATA: newfield LIKE ddic-field.
DATA: END   OF st_newstructure.

It will work fine in your program