‎2009 Apr 03 6:19 AM
Hi Experts,
I call RFC from VB (VS 2005) for uploading data from SQL Server to SAP Ztable. Connection and even RFC call works fine but I dont understand how I can pass SQL table to RFC in my VB code.
Can you give me your thoughts or any links for sending table to RFC...it is array insert..
Thanks in advance..
Yogesh
‎2009 Apr 03 6:32 AM
Hello,
Create a internal table in SAP which is having the same format of SQL table and assign this table as input paratmer in RFC.
Regards,
Mukund
‎2009 Apr 03 6:34 AM
Hello,
In RFC function module there is an option of "Tables". Assign your SQL table to internal table of SAP in this parameter.
Regards,
Mukund
‎2009 Apr 03 6:46 AM
Thanks Mukund for your reply,
I have tested RFC in Zprogram & it works fine when I pass ITAB to it..but i dont understand How I can pass my SQL table in VB code.
*****CODE IN ABAP*
*CALL FUNCTION 'Z_REMOTE_FUNCTION'*
*TABLES*
*it_tables = <TABLE_NAME_FROM_SQL>*
*EXCEPTIONS*
*NOT_FOUND = 1*
*INSERT_FAILURE = 2*
*OTHERS = 3*Awaiting for your reply,
‎2009 Apr 03 6:50 AM
Hello Yogesh,
****CODE IN ABAP
CALL FUNCTION 'Z_REMOTE_FUNCTION'
TABLES
it_tables = <TABLE_NAME_FROM_SQL>
EXCEPTIONS
NOT_FOUND = 1
INSERT_FAILURE = 2
OTHERS = 3
Are u calling this RFC in VB code. If yes then create a table of same strucutre of SAP table in VB code and pass that table to "it_tables". Only the structure should be the same.
regards,
mukund
‎2009 Apr 03 7:01 AM
Yes, Mukund I did the same.
We pass ITAB in ABAP to RFC, in VB it is recordset (dataset, runtime work area with data from SQL) but it gives error...as no data found ..
Do you have any idea about this ?
‎2009 Apr 03 11:37 AM
Check these threads.
[Thread1|http://www.programmingtalk.com/showthread.php?t=21399]
[Thread2|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/calling-customized-rfc-function-module-via-vb-548294]
Rhea.
‎2009 Apr 03 1:48 PM
thank you rhea..its useful
Edited by: Yogesh Umtol on Apr 3, 2009 2:49 PM