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: 

TABLES statement

Former Member
0 Kudos

Hi all,

In a report please tell me what the below statements will do an what is the use of this two statements

DATA:

TABLES:

Regards

Ajay

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

DATA: is used to define any variables. These variables can be internal tables or fields (char, integer , Num)

TABLES: is used to define a database table which are going to be used in the program.

With Rgds,

S.Barani

9 REPLIES 9

Former Member
0 Kudos

PRESS F1 AND USE THE SAP HELP FIRST. ITS A SIMPLE THING TO DO!!!!!!

Former Member
0 Kudos

Hello,

DATA: is used to define any variables. These variables can be internal tables or fields (char, integer....)

TABLES: is used to define a database table that is used in the program.

For instance:

Data: it_bkpf LIKE bkpf OCCURS 0. --> an internal table that save the information of the bkpf

Tables: bkpf. --> define the use of the table bkpf in the program.

Former Member
0 Kudos

Hi ajay,

DATA statement is used to declare a variable with some type.

Example:

DATA: sum type i.

here sum is the variable and 'i' is the integer type.

coming to TABLES statement ........

it will give u the structure of that table.

u can use that declared table any where in ur program.

try to find answers in google or sap help.

Regards,

kk.

Former Member
0 Kudos

Hello.

It doesn't do anything but declaring Data dictionary tables so you can work with them in your programs or internal objects (DATA) such as internal tables, work areas, variables and so..

I suggest you to start learning abap from the begining.

0 Kudos

Tbales statement creates a structure, having same name as the dictionary object .

TABLES MARA.

This satment now creates one structure MARA for me in my program.

Former Member
0 Kudos

Hi,

DATA: is used to define any variables. These variables can be internal tables or fields (char, integer , Num)

TABLES: is used to define a database table which are going to be used in the program.

With Rgds,

S.Barani

Former Member
0 Kudos

Hi,

Here is an example.

TABLES : ZRPM_ITEM_SUM.

  • ------ DECLARATION OF INTERNAL TABLE --------- *

DATA : ITAB1 TYPE TABLE OF ZRPM_ITEM_SUM,

ITAB2 TYPE TABLE OF TY_ITAB2.

DATA : WA_ITAB TYPE ZRPM_ITEM_SUM OCCURS 0 WITH HEADER LINE.

so as we see,

data statement is used to declare any variable or create internal table etc.

while in ur report,the table being used in written under REPORT.

Thanks

Reward points if helpful

Edited by: Malvika Sharma on May 29, 2008 11:04 AM

Edited by: Malvika Sharma on May 29, 2008 11:06 AM

raymond_giuseppi
Active Contributor
0 Kudos

Look at [sap help online-search|http://help.sap.com/search/sap_trex.jsp]

Regards

Former Member
0 Kudos

the use of the tables statement..

this statement create the buffer of the data base table..

suppose in a program there may be a chance to call a database for about 4 times......if u donot use this statement it will hit the database 4 times but it is not good for the performance...if u use the tables statement it will creates the buffer and this will fetch the data form the buffer 4 times and it will hit the data base 1 time for filling the buffer it is good for performance..

regards,

venkat