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

how to

Former Member
0 Likes
2,097

How to pass table in RFC function module......

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,066

There is no difference in coding part for the RFC function module. The only thing you need to take care is the table/structure you are referencing has to be present in the data dictionary. I mean if you want to get table from external system then declare structure of that type in Abap dictionary and use in the tables tab of function module.

Hope this helps.

How to pass table in RFC function module......

21 REPLIES 21
Read only

Former Member
0 Likes
2,066

Hi,

the same way as you pass it to FM.

regards

vijay

Read only

Former Member
0 Likes
2,066

Hi,

Same as you pass to any Function Module with the structure defined in the definition.But can you give me more information.

Read only

Former Member
0 Likes
2,066

Hi ND,

Same as in normal function module.

Are you facing any issues ?

Lanka

Read only

Former Member
0 Likes
2,067

There is no difference in coding part for the RFC function module. The only thing you need to take care is the table/structure you are referencing has to be present in the data dictionary. I mean if you want to get table from external system then declare structure of that type in Abap dictionary and use in the tables tab of function module.

Hope this helps.

Read only

0 Likes
2,066

Thanks everybody..i am using it in starting new task code.........it gives me some error like cannot be referenced etc..i made structure .....shud i use LIKE or TYPE or something else

Read only

0 Likes
2,066

Hi,

You can use <b>LIKE</b>if its a table structure & <b>TYPE</b>for any Type-Pools or Type-group reference.

Read only

0 Likes
2,066

you can use LIKE.

regards

vijay

Read only

0 Likes
2,066

it gave me same mesage when i tried..is there any special care to be taken...some how ..i need that table to be passed back to main prgm

Read only

0 Likes
2,066

Hi,

Can you give the code so that i can check here.Or you can do a Where-used-list on the RFC to see how this is used in other programs(SAP standard once) & use it that way.

Read only

0 Likes
2,066

First define the structure U want to pass.

and use LIKE.

U need not explicitly do anything to get back the table

back to your program. Just fill the table in the FM and

U'll get the entries into your called program.

Read only

0 Likes
2,066

Thanks all..I will try out the same in my system again and let u know the feedback and accoringly award points

Read only

0 Likes
2,066

Please clarify for using " starting new task" and then calling some fnction...is it necc tht the function is of RFC type...

Read only

0 Likes
2,066

Yes.. the "starting new task" extension is for RFC calls.. to quote SAP " It Starts the function module func asynchronously in a new session. In contrast to normal function module calls, the calling program resumes processing as soon as the function module is started in the target system. It does not wait until the function module has finished."

Regards,

Suresh Datti

Read only

0 Likes
2,066

i m still facing problems "Flat types may only be referenced using LIKE for table parameters" and "Only tables with simple line structure are allowed in RFC"..please let me know wat needs to eb done

Read only

0 Likes
2,066

Hi,

how you created the table parameter.

itab like <b>ztab</b>.

how you declared ZTAB. please let me know..

regards

vijay

Read only

0 Likes
2,066

i created zitab structure having 5 fields each of type char 15...in se11 ..datatype....did i go wrong anywhere

Read only

0 Likes
2,066

Hi ND,

you should create it as table line type not structure.

go to SE11.

choose <b>Data type</b> radiobutton

and give some name z* and <b>create</b>

then choose table type.

then in <b>line type</b> just give your structure and using the table type which you have created from the above steps.

itab like <b>ztabline</b>.

regards

vijay

Read only

Former Member
0 Likes
2,066

Hi,

This will work....

Create a table type using SE11 with the structure u have defined and then use Type statement to define your table.

Kindly provide some reward points if this helps.

regards,

Sumeet Mishra

Read only

0 Likes
2,066

thanks all but still facing problems

Read only

0 Likes
2,066

what is the problem..

and can you just show your declarations...

regards

vijay

Read only

abdul_hakim
Active Contributor
0 Likes
2,066

It is just like in normal fm..

Abdul