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

How to have a generic typed column in a database table

deepak_kantia
Associate
Associate
0 Kudos
351

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
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
270

How about storing as STRING?

Regards

RIch Heilman

2 REPLIES 2
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Kudos
270

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

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
271

How about storing as STRING?

Regards

RIch Heilman