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: 

How to pass internal table with data in ABAP OO

Former Member
0 Kudos

Hi experts ,

Here is the problem...

I create a screen 100 and use the internal table to get data from database, and then press the button on screen 100 , it will call screen 200.

I use ABAP OO code in screen 200, and i want to keep the internal table with data that i get from the sceen 100 parts, but it seems that it just supports to create a new internal table and get data from database in ABAP OO. That means i need to create a new table to save the data in internal table ? Or there is any other solution something like exporting or memory id ...

ps . the internal table in screen 100 is declared in global area, the beginning of the code.

Please give me some advice, thanks a lot!

Regards ,

Claire

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You need to pass the table as Importing parameters to the Method you have written in screen 200.

santhosh

3 REPLIES 3

Former Member
0 Kudos

To pass a table to a class create a method (importing or exporting) with type table (reference type).

Former Member
0 Kudos

Hi,

You need to pass the table as Importing parameters to the Method you have written in screen 200.

santhosh

Former Member
0 Kudos

I have already know how to do, here is my code:

METHODS fill_tree importing itab2 like itab1.

CALL METHOD: me->fill_tree exporting itab2 = itab1.

In METHOD fill_tree,

declare

data: itab3 TYPE STANDARD TABLE OF itab,
itab3[] = itab1[].

It is useful to me, thanks a lot.