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

RFC

Former Member
0 Likes
1,049

Hi,

i have created a RFC which takes the customer no and some other fields as input and gives the output. as for now, it it takes single customer as input.How to make it to take multiple customers as input...so that it should give output for all the related customers....

thanks,

Santosh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,017

HI ,

In the RFC,Use this code.

table:kna1.

Ranges:custno for kna1-kunnr.

loop at it_cust.

custno-sign = 'I'.

custno-option = 'EQ'.

custno-low = it_cust-custno.

append custno.

endloop.

select * from kna1 where kunnr in custno.

Hope it helps santosh.

7 REPLIES 7
Read only

Former Member
0 Likes
1,017

Hi,

In your FM TABLES tab pass internal table which take customer numbers.

So at the time of using FM, you can pass all customer nos. to internal table and can pass internal tabler to FM.

But Inside of the FM you have to change the logic according to multiple customers.

Read only

Former Member
0 Likes
1,017

HI,

step 1:First create structure with customer as single field.

step 2:Remove the customer no: from the Import parameter of rfc

step 3:Go to the table tab of the rfc and create a table which refers to the structure created in step1

step4:Now u can enter N number of customers and u can procees it in ur RFC.

Reward if helpful.

Regards,

VODKA.

Read only

0 Likes
1,017

Hi vodka,

i did changes as u told.But i am confused how to change logic in select query...could you pls help me out there..

Thanks...

Read only

0 Likes
1,017

Hi Santosh,

Please give the query that you are using now so that we can modify it and give it bak or u can change like this.

Thanks arjun

Read only

Former Member
0 Likes
1,018

HI ,

In the RFC,Use this code.

table:kna1.

Ranges:custno for kna1-kunnr.

loop at it_cust.

custno-sign = 'I'.

custno-option = 'EQ'.

custno-low = it_cust-custno.

append custno.

endloop.

select * from kna1 where kunnr in custno.

Hope it helps santosh.

Read only

0 Likes
1,017

hI Vodka,

thanks for your ans. I have one more issue now. actually in one Function group, i have created 6 RFC's. rfc2 and rfc3 has same table declaration. so if i activate first rfc or any other rfc, it saying a syntax error that..the table knmt is already declared. what might be the problem..where did i go wrong....Thanks...

Read only

0 Likes
1,017

Hi santosh,

If all the RFC's are in the same fuction group,then remove the line Tables:knmt in ur FM and then activate.