Skip to Content
0
Former Member
Jan 15, 2008 at 03:53 PM

Passing a table from Excel VBA to RFC FM?

857 Views

Calling an RFC function module from Excel/VBA I am trying o pass an array of text strings to one of the tables of the unction module and I am getting Run-time error '13' which says "Type mismatch".

In the following example 'myarray' is the array which has been defined as Dim myarray(999) As String and 'intab' is the table.

If call_dynamic Then

result = fns.Z_JE_VALIDATE(Exception, file_name:=file_name, _

errors:=errors, intab:=myarray, messages:=messages)

the_exception = Exception

Else

MyFunc.exports("FILE_NAME") = file_name

MyFunc.exports("INTAB") = myarray

MyFunc.imports("ERRORS") = errors

MyFunc.imports("MESSAGES") = messages

result = MyFunc.Call

the_exception = MyFunc.Exception

What is the correct syntax for defining and passing an array to the rfc function?

Any help will be greatly appreciated.

Thanks ... Jameel