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 use table types in ddic table

Former Member
0 Kudos

can i include a table type in dictionary table?

8 REPLIES 8

former_member776318
Participant
0 Kudos

Hi,

The answer is no.

Table-Types are meant to provide reference structures & attributes to the internal-tables in ABAP programs.

They are not intended for the use in the creation of an ABAP Dictionary Table.

Regards,

Saurabh

0 Kudos

HI,

THEN HOW TO HOLD MULTIPLE VALUES FOR A SINGLE FIELD ,SAY FOR EXAMPLE WE HAVE A FIELD PHONE IN THAT A MOBILE A PERSON CAN HAVE MANY MOBILE NOS, IN THAT CASE HOW TO HOLD THE MULTIPLE RECORS.

0 Kudos

In internal tables you can do this (use a table in a table), but in the Data Dictionary, you would either make the mobile phone number field a part of the key, or create a second table for the phone numbers (and extend the key there).

Like KNA1 (key = KUNNR) and KNB1(Key = KUNNR and BUKRS).

I think there is a miscommunication in this thread regarding the term "Table type". If it is meant to be "of the type table". As in "Can you use a table in a dictionary table?".

0 Kudos

hi edwin,

here we say that as we can place a strtucture as a field while creating a database table which can hold only a single value so we create a datatype using the table type and in the line type if u specify a structure then we can get a internal table type which we are trying to place it in the database table field so it can have multiple values in it, but this is not possible since table types cannot be place as fields in database tables so i am searching for an alternative solution in which a field can hold multiple values. the answer which u have given is not clear can u give it elobrately.

ex :

i have created domain d1 with attributes int 4 set its length 10,

using the above domain i create 2 data elements de1 and de2 where de1 is mobile and de2 is landline.

using the above data elements i create a structure s1 having the components mobile and landline.

using the above structure i create a table type t1.

till here its fine .

this when used can hold multiple values.

but my intention is that as it can hold multiple values so i shall place it in the database table which i want to create .

but this is not allowed so can u give me an alternative solution.

Former Member
0 Kudos

Hi Ram,

You cannot include a Table Type in a Table. Because you create a Table Type only with the reference of a Table, as a Table Type is nothing like a proxy of a table and you can use their structure.

Hope your question has been answered. If so please close this thread as answered.

Former Member
0 Kudos

Hi,

While creating structure in SE11, we can assing table type by inlcuding it. It is known as Deep Structure.

In our ABAP program we can assign multiple values to the intrenal table. Let me know further info required.

Regards,

Bysani.

0 Kudos

hi vasu,

thats fine i to know that read my question carefully i need to place the deep structure in the database table which is not possible so i require alternative method for having multiple fields in my field.

0 Kudos

If it is not existing yet, you will need to create a new table with a larger key (including the numbers in the key).

Cheers,

Edwin.