2009 Mar 24 11:21 AM
Hi,
I have defined two tables T1 and T2 in the catalog (se11). I am testing a method where I need to read records of the T1 table and write information into T2 table.
I find an error if I define in my method:
tables: T1
I do not know if it is necessary to export/pass the tables T1 and T2 through my method.
Any suggestion will be well appreciated.
Thanks in advance.
Regards,
Giovanni
2009 Mar 24 11:42 AM
Tables Statement cannot be used in Methods.
Create an internal table in the Method.
Data:Itab type table of T1.
Regards,
Gurpreet
2009 Mar 24 11:42 AM
Tables Statement cannot be used in Methods.
Create an internal table in the Method.
Data:Itab type table of T1.
Regards,
Gurpreet
2009 Mar 24 12:58 PM
>
> Tables Statement cannot be used in Methods.
> Create an internal table in the Method.
>
>
Data:Itab type table of T1.
>
> Regards,
> Gurpreet
While that might solve the original posters problem,it is not correct. The replacement for
TABLES: t1.
SELECT * FROM t1...
is
DATA: ls_wa TYPE t1.
SELECT * INTO ls_wa FROM t1...
The TABLES statement declares a FLAT structure not an internal table.
matt
2009 Mar 24 3:06 PM
I tried to replicate the same senario table statement it gave syntax error.Then i tried changing the tables statement.It worked.I know that tables statement creates work area with the same as table name give.
I agree with what you say is correct but it was just the answer that would resolve the problem for above question as he had two tables to work with.
Thanks for your inputs.The informations about the alterante usage of tables in class was good.Thanks sir
Regards,
Gurpreet