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

Multiple rows

Former Member
0 Likes
814

Hi, I initially created a custom transparent table called ZCUSTOMER_DETAILS with the following fields:

KEY_FIELD1

FIELD1

FIELD2

FIELD3

FIELD4

in ECC6, is it possible to define table type for FIELD1 to FIELD4 and use the table type in the custom transparent table:

KEY_FIELD1

TABLE_TYPE1 (contains FIELD1, FIELD2, FIELD3, FIELD4)

The goal is to have only one row defined by KEY_FIELD1 in ZCUSTOMER_DETAILS but KEY_FIELD1 can have multiple details via TABLE_TYPE1.

Is this possible? I tried to use data type STRUCTURE and TABLE TYPE but I'm getting errors. Haven't done it before so I'm not sure if I am not doing it properly or its just really not possible.

Please help.

Thanks and kind regards.

5 REPLIES 5
Read only

former_member195698
Active Contributor
0 Likes
734

You can add a structure to a Transparent table using "Include".

Check ABAP Help to get details on that.

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ebc9446011d189700000e8322d00/frameset.htm

Section .- Tables -> Making changes to Tables - > Inserting an Include

Section .- Tables -> Table fields - > Includes

But you cannot have a Deep Structure for a "Transparent Table".

If you want to store multiple records for a key, you can use the concept of "data clusters in the database"

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bf8358411d1829f0000e829fbfe/content.htm

You can create a transparent table just like INDX table and store data as cluster using export and import from database

Aj

Edited by: Abhishek Jolly on Jul 8, 2009 11:02 PM

Read only

Former Member
0 Likes
734

Blumtain,

What you have described is not possible in a transparent table. You see, a transparent table will have a table in the underlying database. And AFAIK, no database system supports such a table.

However, you can build such an internal table within your ABAP program.

If you have only one key field, but want to have multiple detail records, then you must create a second key field and populate that field with a serial number just so you will have unique records.

Read only

Former Member
0 Likes
734

Hi,

Just create separate tables for multiple entries and maintain them using the Foreign key concept.

This will ensure that your date is consistent.

Regards

Karthik D

Read only

Former Member
0 Likes
734

Hi:

It is possible to make the table type.

Do like this

First create a transparent table containing the fields FIELD1, FIELD2, FIELD3, FIELD4.

2nd create a table type

- put the first fields as KEY_FIELD1

- append structure as created in the 1st step.

Hopefully I have cleared my point and would helpful for you.

Regards

Shashi

Read only

0 Likes
734

Hi Dude..

this Multiple row are possible in INFO _CUBES.. it is not possible in transprant table.

you can store the data with foreign key relation ship using different tables. other wise you can do

do that with internal table concept..

Regards,

GSANA