cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Tables from one method to another method.

Former Member
0 Kudos

Hi All,

I'm creating a Web-Dynpro program in which I wouild like to passing an internal table from one method to another method within the same View.

Is this possible? And if so, how can I set it up.

Thank you.

Paul

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Of course. Internal tables can be passed like any other variables. Just the same as passing an internal table as a parameter in a function module or class method. Nothing special. Just be sure to declare the interface of the method with a table type for the internal table.

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks!!

Former Member
0 Kudos

Hi Paul ,

I hope u wud be clear with passing table from one method to another now .U may also wish to see this WIKI

Link: [Passing table parameters|https://wiki.sdn.sap.com/wiki/display/WDABAP/Passingtableparameterfromoneviewtoanotherview+locally]

I hope it wud help u .

regards,

amit

Former Member
0 Kudos

Amit,

The Wiki you are referring to talks about passign internal table between two different views, but the query here is two pass internal table between two methods of the same view.

Thanks,

Radhika.

Former Member
0 Kudos

Radhika ,

I had directed Paul to follow the steps stated in the thread .

In addition , he can also find that WIKI , helpful , if internal table need to be passed between two different view:)

there is nothing wrong in sharing info which is linked or similar to the context

regards,

amit

Former Member
0 Kudos

While you create your method create an Importing parameter at the top .( Make sure the type should be table type ). Now while calling this method you can pass your internal table

prasenjit_sharma
Active Contributor
0 Kudos

Hello Paul,

There are two ways.

1, Create a parameter in the called method using the table type of the internal table.

2. to create an attribute in the view, this way the table becomes global and can be accessed from any method inside the view.

Regards

Prasenjit