cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

create Internal Table through SE11

Former Member
0 Likes
2,488

Dear a::

Can I create an Internal Table through SE11 and use in my report ? How ?

Thanks & Regards

Vinayak Deosthali.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

hi vinayak,

u can't create an internal table using se11..But u can create structures using se11 and use those structures in ur report..

in se11 use datatype radio button to create structures and use the same..

<b>Internal tables</b> are structured data types provided by ABAP/4.

They cannot be accessed outside the program environment.

<b>Purpose of internal tables</b>

Internal tables are used to reorganize the contents of database tables according to the needs of your program

Internal tables are used to perform calculations on subsets of database tables.

The number of lines in an internal table is not fixed.

Internal tables exist only during the run time of a program.

<b>syntax for internal tables:</b>

<b>1.</b>In this method an internal table is created with reference to existing structure ( another internal table or Dictionary object).

Eg: DATA ITAB LIKE SFLIGHT OCCURS 10 WITH HEADER LINE.

<b>2.</b>

Create an internal table data object directly with the 'DATA' statement.

Eg: DATA : BEGIN OF ITAB OCCURS 0,

COLUMN1 TYPE I,

COLUMN2 TYPE I,

COLUMN3 TYPE I,

END OF ITAB.

Message was edited by: Ashok Kumar Prithiviraj

Answers (11)

Answers (11)

Former Member
0 Likes

I am afraid that I'd have to agree with IBM and disagree with the posters here, and say that it <b>is</b> possible to create an itab through SE11.

Go to SE11, select the "Data Type" radio button, and create a table with a line type of sflight. Then run this code.

PROGRAM ztst.

DATA: z_sflight TYPE z_tbl.
DATA: wa LIKE LINE OF z_sflight.

SELECT *
FROM sflight
INTO TABLE z_sflight.

LOOP AT z_sflight INTO wa.
  WRITE : / wa-carrid.
ENDLOOP.

Former Member
0 Likes

Hi,

You can not create an internal table directly in SE11.

However, you can create a structure in SE11 and use it to create an internal table in your program.

ex.

If structure XYZ is present in dictionary,

you can create an internal table as follows.

TABLES : XYZ.

DATA : BEGIN OF t_xyz occurs 0.

INCLUDE STRUCTURE XYZ.

DATA : END OF t_xyz.

This approach is useful when you need a number of internal tables with same structure.

Hope this helps..

Regards,

Shashank

Former Member
0 Likes

Hi All,

Thanks for the prompt reply. I am also having the same concept. But this question was asked in IBM Interview last week In Pune and the interviewer told that this is possible through SE11. so I ask the same .

Thanks once again.

With regards

Vinayak

Former Member
0 Likes

Hi Vinayak,

As per the forum etiquette,u may pls award points

to helpful answers by clicking the STAR

on the left of that reply.

Cheers

Sunny

Former Member
0 Likes

Hi Vinayak,

We can't create internal tables using SE11.

we can define internal tables in Program only.

*Internal tables provide a means of taking data storing it in working memory in ABAP.

*In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs.

*Internal tables are a standard data type object which exists only during the runtime of the program.

*They are used to perform table calculations on subsets of database tables and for re-organising the contents of database tables according to users need

Hope this will help you.

Cheers

Sunny

hymavathi_oruganti
Active Contributor
0 Likes

the <b>table type</b> option in se11 serves the same purpose.

u can see that in <b>data type</b> option

Former Member
0 Likes

Hi Vinayak

Understand that internal tables are for only in programs.

For example if you want to use some SAP defined ar your own Z or Y tables, you generally copy the data into an internal table and manipulate.

For declaring an internal table.

TYPES: begin of line
          connid LIKE spfli-connid,
          carrid LIKE spfli-carrid,
        .....
        .....
       end of line.

Data: itab TYPE standard table of line with header lne.

<b>for populating data</b>

select connid carrid
into table itab
from spfli
 

jayanthi_jayaraman
Active Contributor
0 Likes

hi,

You cannot create Internal table using SE11.

But you can create database tables uisng SE11.

Internal table is something which we will use in the report/program.

For Eg..

MARA is the database table.

In the report,if we declare

data itab type standard table of mara.

itab will be our internal table.

But it won't contain any data which is the database table Mara.

To populate content into it,we need to code

select * from mara into table itab.

This above code will make the internal table contains data of the database table MARA.

Kindly reward points by clicking the star on the left of reply,if it helps.

Check this links for info about database.

http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm

vinod_gunaware2
Active Contributor
0 Likes

hi

U can not create internal table in SE11.

U can create DATABASE table

Or STucture

OR Table type

Which can be use in report or BSP applicaton or SMART forms.

U can use above in ur report to declare internal table.

U can use Pattern->structure.

Hope this will be useful.

Regards

vinod

Former Member
0 Likes

Hi,

The Tcode SE11 is used for creation of Permanent Database tables only.

Following are Different ways to create Internal Tables:

1.Data :Itab like sflight occurs 0 with header line

Here you are declaring internal table, which is similar to sflight i.e., itab like sflight i.e., you are referring to existing table (like).

(By default internal table created with this declaration is without header line).

2.Data :Begin of itab occurs 0.

Include structure sflight

Data :End of itab

(Internal Table created with this type of declaration is similar to declaration done in ‘a’ type the only difference is by default internal table created by this type is with header line)

3.Data :Begin of itab occurs 0

carrid like sflight-carrid,

connid like sflight-connid,

fldate like sflight-f1date

End of itab.

By default internal table created by this type of declaration is with header line. In this type of declaration, you are using only those fields from database table, which you require for processing.

4.Data :Begin of itab occurs 0

carrid like sflight-carrid,

connid like sflight-connid,

bookid like sbook-bookid

id like scustom-id,

End of itab.

Here you are combining fields from three different tables in one internal table.

5.Data :Begin of itab occurs 0

Carrid1 like sflight-carrid,

End of itab.

Here you are specifying different field names.

I think now you got some Idea Regarding Internal tables.

Regards,

Ashok

Former Member
0 Likes

Hi Vinayak,

Creation of internal tables through SE11 is not possible.

Internal table is created at run time to store the data temporarily. It is destroyed

as soon as the program execution is finished.

You can create a ZTable or a table type in SE11 and then declare an internal table of type Ztable or table type.

Hope it helps...

Lokesh

Pls. reward appropriate points

Former Member
0 Likes

You cannot create an internal table in SE11, but you can create an internal table type using this transacation.

To create an internal table type, Select option 'Data type' in SE11 and create. Select 'Table type' on being prompted for the type to create.

You can use this in your program while creating an internal table, as follows:

DATA itab type standard table of <typename>.

Hope this helps.

Sudha

Former Member
0 Likes

Hi vinayak,

1. SE11 is for creating

actual / physical / database tables

and not internal table.

2. internal table is

a kind of variable only,

(but in the format/structure of table with

many fields and many rows)

3. to use in code, we can define like this.

data : itab like table of t001 with header line.

or

data : begin of itab occurs 0,

bukrs like t001-bukrs,

matnr like mara-matnr,

end of itab.

regards,

amit m.