Skip to Content
1
Former Member
Jun 26, 2009 at 11:03 AM

RTTS - Dynamic Structure/Type Generation

42 Views

Hi,

my apologies if this question has been asked before and in the wrong forum.

Is it possible to dynamically create a structure/type of variable length without using a fixed type? e.g. I want to create a structure with 4 'fixed' fields followed by a number of variable entries dependent upon an external source. I would normally do something like ..

types : begin of ty_data,

matnr type matnr,

werks type werks,

lifnr type lifnr,

menge_01 type menge_d,

menge_02 type menge_d,

.

.

.

end of ty_data.

data : it_data type sorted table of ty_data with unique key ...

I want to define he whole structure dynamically at runtime.

Could someone point me to a blog/bar/exit or better still give me an answer?

Thanks in advance