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: 

internal table

Former Member
0 Kudos
116

Hi,

I want to declare an internal table or structure which has all the fields as in table scustom. how to go abt it?

1 ACCEPTED SOLUTION

abdulazeez12
Active Contributor
0 Kudos
98

Hi

DATA: itab like scustom occurs 0 with header line.

Cheers

Shakir

7 REPLIES 7

abdulazeez12
Active Contributor
0 Kudos
99

Hi

DATA: itab like scustom occurs 0 with header line.

Cheers

Shakir

Former Member
0 Kudos
98

Hi,

Types: begin of ty_itab,

matnr type mara-matrn,

.....

end of ty_itab.

or

types: begin of ty_itab.

include type mara.

types: end of ty-itab.

data: lt_itab type table of ty_itab.

data: wa_itab type ty_itab.

regards,

Santosh Thorat

Former Member
0 Kudos
98

data : itab like scustom occurs 0

piyush_mathur
Active Participant
0 Kudos
98

Hi Chaitra,

Refer below statement :

DATA : ITAB TYPE STANDARDTABLE OCCURS 0 WITH HEADER LINE.

OR

DATA : BEGIN OF ITAB OCCURS 0.

INCLUDE STRUCTURE STANDARDTABLE

DATA : END OF ITAB

Regards,

Piyush

Former Member
0 Kudos
98

Hi,

Internal table:

data: itab TYPE TABLE OF mara WITH HEADER LINE.

Structure:

Data : wk TYPE mara.

Former Member
0 Kudos
98

Hi

Hope it will help you.

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.).

Hashed tables

This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index.

The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always

have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for

processing large amounts of data.

TYPES VECTOR TYPE HASHED TABLE OF I WITH UNIQUE KEY TABLE LINE.

TYPES: BEGIN OF LINE,

COLUMN1 TYPE I,

COLUMN2 TYPE I,

COLUMN3 TYPE I,

END OF LINE.

DATA ITAB TYPE HASHED TABLE OF SPFLI

WITH UNIQUE KEY CARRID CONNID.

reward if help.

Former Member
0 Kudos
98

Hi Chaitra,

You can declare the data as follows:

-


DATA: it_scustom LIKE TABLE OF scustom

WITH HEADER LINE.

-


Herer it_scustom will work both as internal table as well as structure.

ok teke care & try the code if necessary.