Skip to Content
0
Former Member
Jun 12, 2009 at 12:46 PM

Define type from existing table with new field

725 Views

Hi all,

I am using transparent table dis_tobjs_cosp in a program. I want to append a field to the end of the transparent table, my_flag(1) type c, to create a new type. My exisiting code is:

DATA: BEGIN OF ty_mytype.

INCLUDE TYPE dis_tobjs_cosp.

DATA: my_flag(1) TYPE c,

END OF ty_mytype.

As we all know...this isn't really a type. I believe I have an internal table of 10 rows with a header line. I want the type because I need to pass the internal table through subroutines using a type statement and I keep getting an error. What is the proper way to define the type using an existing transparent table without having to define all the fields from scratch?

Mat