Application Development and Automation 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: 
Read only

Define table

Former Member
0 Likes
1,330

Hello Expert's,

i created one zreport in this report i used ekpo and mara table ,but i don't define the tables .

But i excuted this report all the records come my out put screen.

so sir which tables are define in a reports please tell me. I am very confuse.

Thanks

Ratnesh Ghursaria

9 REPLIES 9
Read only

Former Member
0 Likes
1,304

could you post the code you have written..

Thanks,

Adi

Read only

Former Member
0 Likes
1,304

Hi Ratnesh,

TABLES statement creates a structure with the same data type and the same name as a database table, a view, or a structure from the ABAP Dictionary.

TABLES statement is used if you want to define input/output fields on a screen with reference to database tables, views, or ABAP Dictionary structures .

Regards,

Goutham.

Read only

Former Member
0 Likes
1,304

Hi Ratnesh,

Not able to understand ur question can u explain it a bit more clearly and if possible provide the code along wid tht.

кu03B1ятu03B9к

Read only

former_member191735
Active Contributor
0 Likes
1,304

Simply, Unless you want to use the fields of table on selection screen you dont have to use tables statement.

It is not required to define tables statement. if you want to define the table statement you can also define them using tables statement. Press F1 for help.

You can also define like: TYPES: MARA TYPE MARA. This statement also works in the same way that as tables statement

Read only

Former Member
0 Likes
1,304

Hi ,

To use an SAP database table for manipulation in your program you dont have to define the table in your program ..So, in ur case..the system recognises the two standard database tables and fetches the data from the tables.

Regards

Vasavi Kotha

Read only

Former Member
0 Likes
1,304

Hi Ratnesh ,

Tables decleration is not necessary if you want to select data from the tables . What the decleration tables does is that it creates a work area for that table in your program which can be accessed with the same name as the table .

Now a days tables decleration is used when you need to declare select options , this also can be avoided , but in that case you will have to provide F4 help for the select options in the program.

Regards

Arun

Read only

nkr1shna
Contributor
0 Likes
1,304

Hi Ratnesh,

When you use select statement using INTO clause there is NO need to define tables statement in the program.

In your case you must have created internal tabe containing fields from two SAP tabes and must be using "select field1 field2 into <interna table> from .... construct.

In this case there is no need to define "Tabes" statement in the report.

Regards

Krishna

Read only

Former Member
0 Likes
1,304

Hi Ratnesh,

It is not at all necessary to get output from ekpo and mara table that you should declare these table through tables statement.

Tables Statement is required when you are using Select-Options or Parameters statement refering database field and fetching data from database table where <Tablename> = value entered in selection screen.

By declaring Tables you are telling runtime environment that you will be using a structure same as of type mara or ekpo.

For eg. for the following piece of code to work, a declaration Tables: mara is must

data: v_mtart type mtart.

select-options v_matnr for mara-matnr.

select mtart

from mara

into v_mtart

where matnr in v_matnr.

endselect.

Regards

Vinod

Read only

Former Member
0 Likes
1,304

Hi,

Tables decleration is not necessary if you want to select data from the tables . What the decleration tables does is that it creates a work area for that table in your program which can be accessed with the same name as the table .

When you use select statement using INTO clause there is NO need to define tables statement in the program.

TABLES statement creates a structure with the same data type and the same name as a database table, a view, or a structure from the ABAP Dictionary.

TABLES statement is used if you want to define input/output fields on a screen with reference to database tables, views, or ABAP Dictionary structures .

Regards,

Jyothi CH.