‎2008 May 29 9:50 AM
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
‎2008 May 29 9:57 AM
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
‎2008 May 29 9:52 AM
PRESS F1 AND USE THE SAP HELP FIRST. ITS A SIMPLE THING TO DO!!!!!!
‎2008 May 29 9:54 AM
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.
‎2008 May 29 9:56 AM
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.
‎2008 May 29 9:56 AM
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.
‎2008 May 29 10:00 AM
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.
‎2008 May 29 9:57 AM
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
‎2008 May 29 10:03 AM
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
‎2008 May 29 10:12 AM
‎2008 May 29 10:13 AM
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