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: 

How to have a generic typed column in a database table

deepak_kantia
Discoverer
0 Kudos

Hi,

I have to create a table with one column which should be able to hold values of any data type. At runtime I will get values from different fields of different tables.

Any idea how to achieve thi as there is no generic data type available with ABAP which can store other types without loss of information.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

How about storing as STRING?

Regards

RIch Heilman

2 REPLIES 2

0 Kudos

Hi,

Try RAW(1 to 255 bytes) or RAWSTRING(more than 256 bytes) which are byte sequence. and should be ableto store any kind of data.

Or even LRAW but you need one extra field beforethis field for storing its length andwe cannot have more than 3 fields of this type in a table.

Regards,

Sesh

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

How about storing as STRING?

Regards

RIch Heilman