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

Passing an internal table to report from function module

Former Member
0 Likes
1,274

Hello Abap Gurus,

I am writing a RFC function module and i want to pass an internal table which is made up of fields from different tables .

Please help me in getting this done.

Waiting for reply.

Thanks and regards,

Sravanthi Reddy.

8 REPLIES 8
Read only

karol_seman
Active Participant
0 Likes
882

Hi,

if you need to pass a data from internal table into a function module you need to create a structure (data type) and then use this structure to create table type(data type). Both objects can be created in tcode SE11.

Regards,

Karol

Read only

0 Likes
882

Hi Seman,

Other than creating the structure is there any other way to pass an internal table to report fromfunction module.

Please help me in finding the solution for this.

Thanks,

Sravanthi Reddy.

Read only

0 Likes
882

you may use memory : EXPORT ... TO MEMORY... in the function module, and IMPORT ... FROM MEMORY ... in the report.

Read only

0 Likes
882

you may use memory : EXPORT ... TO MEMORY... in the function module, and IMPORT ... FROM MEMORY ... in the report.

If we are talking about RFC function module we cannot use it (the function module is used in different system than report).

Yes, there are also other possibilities. You have possibility to not specify table type in the function module. Then it will use automatically the type you are using in your report when you call FM.

You can also look at FM TABLE_ENTRIES_GET_VIA_RFC which is reading data from any DDIC table and passing values back ...

Regards,

Karol

Read only

0 Likes
882

way to pass an internal table to report from function module.

So, it's no more a problem of RFC, or I don't understand ;-). btw, interesting FM.

Read only

0 Likes
882

Hi Karol and Sandra,

Thanks for your valuable answers..

Both my function module and Report are in same system. I just want to get the data in internal table in function module into my report.

Please help me with your inputs.

Thanks,

Sravanthi Reddy.

Read only

0 Likes
882

Okay. So: you may use memory : EXPORT ... TO MEMORY... in the function module, and IMPORT ... FROM MEMORY ... in the report.

Read only

0 Likes
882

Hi

Function module normally have Export and import and Tables parameter.

So you ca nuse this parameters to pass the data back to your report.

Please chek it for more info on function modules:

http://help.sap.com/saphelp_46c/helpdata/en/9f/db98ef35c111d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm

Regards

Neha