‎2008 Mar 25 3:21 AM
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.
‎2008 Mar 25 4:38 AM
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.
‎2008 Mar 25 3:27 AM
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.
‎2008 Mar 25 3:30 AM
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.
‎2008 Mar 25 4:32 AM
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...
‎2008 Mar 25 4:36 AM
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
‎2008 Mar 25 4:38 AM
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.
‎2008 Mar 25 5:14 AM
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...
‎2008 Mar 25 5:18 AM
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.