‎2008 Feb 28 5:41 AM
what is table type. how to create it, where and how to use the table type
‎2008 Feb 28 5:46 AM
Hi,
u can create table type in se11,
go to T.code se11,
select data type radio button,
provide name 'ztab_type',
create,
in the pop up screen select table type radio button,
provide short description,
provide structure name in the line type,
then save and activate.
y means,
in the report we can use this as work area for the defined structure.
seshu.
seshu.
‎2008 Feb 28 5:46 AM
Hi,
u can create table type in se11,
go to T.code se11,
select data type radio button,
provide name 'ztab_type',
create,
in the pop up screen select table type radio button,
provide short description,
provide structure name in the line type,
then save and activate.
y means,
in the report we can use this as work area for the defined structure.
seshu.
seshu.
‎2008 Feb 28 5:48 AM
Table types describe the structure and functions of internal tables in the ABAP program.
it is similar to a row in a table.
to create it:
1.go to se 11.
2.in the data type u have an option of table type.
generally it will be used in form printing
‎2008 Feb 28 5:49 AM
1. Using transaction SE11 2. Select option Data Type and Create. 3. System prompts a screen whether you need to create a Data Element or Structure or Table Type. 4. Select Table Type. You can treat Table type as defining an internal table globally which can be accessed across all objects in ABAP Environment.
‎2008 Feb 28 5:51 AM
Hi
goto se11 transaction--->select datatype-->give name -
>create.
now u will get a pop up in that there is a radio button called TABLE TYPE -->continue.
now give short description and in line type give a structure which already exists.
u can create a structure through se11 only--->instead of TABLE TYPE u can select STRUCTURE-.
and call that in table type.
u can use table type as internal table.
‎2008 Feb 28 6:04 AM
Hi,
Table types are DDIC objects which are used to create internal tables, they act as data type for creating internal tables.
suppose SPFLI_T is a table type then if you use
DATA: it_spfli type spfli_t.
this creates a internal table to be used with in your program.
Table types does not have a physical table in the database.(They dont occupy memory in the database)
Structure is just set of fields.. it contains no data. The fields in structure can be viewed in SE11 transaction
Refer this for TABLE TYPE
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
STRUCTURE
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2d74358411d1829f0000e829fbfe/content.htm
Steps to create table type:
1.Go to se11and select data type radio button.
2.give the name starting with 'ZXXXXXXX'.
3.select create button.one window will be opened.
4.mention short discription and give the structure in line type.
5.we can use existing structure also,if strucure is not there after naming the structure doubleclick on that.
6.A popup is through asking to create ,select ok
7.there give the discription and component fields
8.Activate the structure and after that come back and activate table type also.
Cheers,
vasavi.
kindly reward if helpful.
‎2008 Feb 28 7:22 AM
Hi
Table Types
A table type describes the structure and functional attributes of an internal table in an ABAP program.
A table type describes the structure and functional attributes of an internal table in ABAP. In ABAP programs you can reference a table type TTYP defined in the ABAP Dictionary with the command DATA is created in the program with the attributes defined for TTYP in the ABAP Dictionary.
A table type is defined by:
i)its line type, that defines the structure and data type attributes of a line of the internal table
2)the options for managing and accessing the data ( access mode) in the internal table
3) the key ( key definition and key category) of the internal table
Creating Table Types
Procedure
1)In the initial screen of the ABAP Dictionary, enter the table type name in field Data type and choose Create.
A dialog box appears in which you must define the type category.
2)Select Table type and choose Choose.
The maintenance screen for table types appears.
3)Enter an explanatory short text in the field Short text.
You can for example find the table type at a later time using this short text.
Now define the structure of a row of the table type (row type), the options for accessing data in the defined internal table (access mode) and the key of the table type.
4)Enter the row type of the table type on the Row type tab page. You can refer to an existing type (data element, structure, table, view, table type) or directly enter the row type.
If you want to refer to an existing type, you must mark the Row type radio button and enter the name of the type in the field below it.
If you want to enter the data type, field length and possibly the number of decimal places directly, you must mark the Built-in type radio button. Entries are now possible in the fields Data type, Number of places and Decimal places.
If you want to use a reference type as row type, mark the radio button Reference type and then Referenced type. Enter the name of the referenced type. This can be the name of a class or an interface, a generic reference to ANY, OBJECT, or DATA or a reference to a type defined in the Dictionary. If you want the reference type to be a predefined Dictionary type, choose Reference to predefined type. Select the type, the number of places and possibly the number of decimal places.
5)On the Access tab page define the access mode of the table type.
This defines how to access the data in an internal table defined by the table type in ABAP programs.
6)Define the key of the table type on the Key tab page.
The key of a table type is defined by the key definition and the key category.
If you select Key components, you can define the key of the table type directly in the input area with the same name. This option is only possible if the row type of the table type is a structure, table or view.
You can display all the components of the row type with Select components. Select the components you want to copy to the key and choose .
7)Save the table type.
You are asked to assign the table type a development class. You can change this development class later with Goto ® Object directory entry.
😎 Activate
Reference Type
A reference type is a reference to a different type.
There are several kinds of reference types:
1)Reference to a class or an interface
2)Reference to a type defined in the Dictionary
3)Generic reference to ANY, OBJECT, or DATA. A reference of type ANY can point to objects as well as to data.
4)Reference to a predefined Dictionary type including the length specification and possibly the decimal places
Access Mode
The access mode defines how to access the data in the internal table defined by the table type when performing key operations (READ TABLE, INSERT TABLE, MODIFY TABLE, COLLECT). In particular, it defines whether key accesses (see Keys of Table Types) to the internal table are allowed.
Possible access modes are:
Standard table:
The key access to a standard table uses a sequential search. The time required for an access is linearly dependent on the number of entries in the internal table.
You should usually access a standard table with index operations.
Sorted table:
The table is always stored internally sorted by its key. Key access to a sorted table can therefore use a binary search. If the key is not unique, the entry with the lowest index is accessed. The time required for an access is logarithmically dependent on the number of entries in the internal table.
Index accesses to sorted tables are also allowed. You should usually access a sorted table using its key.
Hash table:
The table is internally managed with a hash procedure. All the entries must have a unique key. The time required for a key access is constant, that is it does not depend on the number of entries in the internal table.
You cannot access a hash table with an index. Accesses must use generic key operations (SORT, LOOP, etc.).
Index table:
The table can be a standard table or a sorted table.
Index access is allowed to such an index table. Index tables can be used to define the type of generic parameters of a FORM (subroutine) or a function module.
not specified:
The table can be a standard table, a sorted table or a hash table. The set of valid operations on such a table is the intersection of the valid operations for these three access modes.
You cannot access tables of this type with index operations
Key Definition of a Table Type
When a table type is defined, the key to be used for the table type must be specified.
You have the following options:
1)Standard key: The structure of the key depends on the row type category. In a structured row type, the standard key consists of all the character-like components of the table row. In an elementary row type or reference type as row type, the standard key consists of the entire table row. If the row type is a table type, the standard key is empty. Note that an empty key is only allowed for access mode Standard table.
2)Row type: The key consists of all the fields of the row type.
3)Key components: The key is explicitly defined by selecting components (fields) of the row type. This is only possible if a structure, table or view was selected as row type.
4)Key not specified: The key is not specified
Key Category
The key category defines whether the internal table defined by the table type may only contain keys with a unique key or whether the key may have duplicates.
The following key categories may be defined:
1)unique: This table type may only contain records with a unique key.
2)non-unique: A table with this table type may also contain records that do not have different keys for the table type.
3)not specified: The key category is unique or non-unique
If it is helpful rewards points
Regards
Pratap.M
‎2008 Feb 28 11:01 AM
Table type : It is a internal table that is used in the globally.
Creation : Goto se11---> select datatype--> Give any name -
>create.
Select TABLE TYPE radio button -
> continue.
Give line type(give a structure which already exists).
‎2008 Feb 29 9:28 AM
Hi,
A table type describes the structure and functional attributes of an internal table in ABAP. In ABAP programs you can reference a table type TTYP defined in the ABAP Dictionary with the command DATA is created in the program with the attributes defined for TTYP in the ABAP Dictionary.
A table type is defined by:
1. its line type, that defines the structure and data type attributes of a line of the internal table
2. the options for managing and accessing the data ( access mode) in the internal table
3. the key ( key definition and key category) of the internal table.
The row type is defined by directly entering the data type, length and number of decimal places or by referencing a data element, structured type ( structure, table or view) or other table type. Or the row type can be a reference type.
CREATING THE TABLE TYPE:
1. Go to SE11
2. Data Type: enter table type name.
3. A pop up appears , choose Table Type.
4. Enter Short text
5. Enter thr row type
6. Define the key table type on the Key tab pag.
7. Save the table type. You are asked to assign the table type a development class. You can change this development class later with Goto ® Object directory entry.
8. Activate F8.
Regards,
kavitha
‎2008 Feb 29 9:36 AM
Hi,
1) In SE11 in Data Type Enter your Table type's name.
2) Click Create; Choose Table Type
The maintenance screen for Table types appears.
3) In Row Type , you can specify : a Data type/Data element/Structure
4) You can change:
The access mode as desired on the Access category.
Define the Key of the table type on the Key tab page.
5) Save and Activate the table type.
To start off, create a ztab_type with Structure, say zrow_type.
The Table type can be used in a pgm :
data it_tab type ztab_type.
data wa_tab type zrow_type.
regards,
sreelakshmi
‎2011 Apr 29 2:52 PM