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

Export Table from ABAP Method

Former Member
0 Likes
4,583

Hello Experts,

I have created one class which contains a method having one import parameter and one export parameter.Export parameter is of type table, say iTab

In the code of the method, i called one RFC which has one table parameter. Ex.-


method get_data.
call function z_test
    Exporting 
         name = 'AAA'
    Tables
         list = iTab. 
endmethod.

But when I compile the method, it is showing me the error that "iTab is not a internal table, occurs specification is missing".

Then I Used another internal table instead of iTab. Error was not came, but I am not understanding how to assign this new internal table to export parameter of a method.

Thanks in Advance,

Prashant Jagdale

1 ACCEPTED SOLUTION
Read only

praveen_hannu
Contributor
0 Likes
2,279

Hi

How did you declare your internal table itab[]. In Methods, its better declare type table of.

Regards

Praveen

8 REPLIES 8
Read only

Former Member
0 Likes
2,279

Hi!

how you declare ITAB ?

try use

list = itab[].

Read only

praveen_hannu
Contributor
0 Likes
2,280

Hi

How did you declare your internal table itab[]. In Methods, its better declare type table of.

Regards

Praveen

Read only

0 Likes
2,279

Hi Praveen,

I have declared my iTab in my method as "type table of"

Thanks,

Prashant

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,279

Just create a table type and use it in the method signature.

Then while passing to the fm, either change the tables parameter of fm to export parameter referd to table type.

or pass it like

tables

tab = it[].

Read only

0 Likes
2,279

Hi Keshav

declare the itab as follow.

data iTab type AAA OCCURS 0.

BEST REGARDS

Marco

Read only

0 Likes
2,279

Hello Menegazzo,

When i add occurs 0 in declaration, it give me a error that "OCCURS is no longer supported on OO Context"

Thanks,

Prashant

Read only

0 Likes
2,279

Hi Keshav,

I tried using iTab type <Table_Name> in method signature and used


TABLES
   LIST = ItAB[]

But no success....Again Error - "iTab is not a internal table, occurs n specification is missing"

when i declare another internal table inside method using type table of and assigned to list. No error comes but I am not understanding how to pass these values of newly created internal table to method's export parameter.

Any help??

Thanks in Advance,

Prashant

Read only

Former Member
0 Likes
2,279

Created Table type using SE11