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: 

Passing Internal Table to a Function Module.

Former Member
0 Kudos
986

I am new to Web Dynpro Abap. Using the Function Builder, I am trying to pass an Internal Table (IT) as an import parameter into my Function Module (FM), fill it within the FM and be able to recieve the filled IT back as an Export parameter from the FM to my program. My problem here is that I do not know how to specify the Internal Table as an import OR export parameter for a Function Module, I tried using the Table Tab, but it says that is obsoleted.

Anyone! Thanks.

6 REPLIES 6

Former Member
0 Kudos
271

Hi,

This question is more related to General ABAP forum. Please choose the right forum to get quicker response.

You have to create DDIC table types same as your internal table type and then mention these types in importing and exporting params data types.

Have a look at FunctionModules help documentation or existing function modules for more help.

Regards

Manas Dua

vaibhav_tiwari
Contributor
0 Kudos
271

Hi,

You can still create an internal table in FM using table tab. or define a table type in data dictionary and use that as the type of import parameter to be declared as table.

Regards,

Vaibhav

0 Kudos
271

Thanks, My Internal Table though comprises of fields from different table sources. How do i go about defining this on the Table tab.

0 Kudos
271

Hi,

You want to pass the internal table to FM inside WD component and that table contains fields from diff table, right?

Open the FM through SE37. Goto 'Tables' tab of FM. Create table of type mentioned in the 'Associated Type' column of the FM. Fill the internal table with data and pass the internal table to FM.

You can create Table type with different fields through SE11.

I hope I interpreted your question correctly.

Regards,

Saket.

0 Kudos
271

For a little more clarity, Supposing I want to pass an internal table (IT) named IT_ASS_LOC with a field called ASSET_ID (CHAR4) and another called LOCATION_ID ( CHAR3). The ASSET_ID field will hold ID records from the Assets table in DDIC while the LOCATION_ID field will hold data from the Locations table. in DDIC. This Internal Table will be filled using a Join SQL statement in a Function Module and passed back to the program.

How do I declare this IT on the tables tab.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos
271

Moderator Note: This thread wasn't related to Web Dynpro ABAP. Therefore I moved it to ABAP General.