cancel
Showing results for 
Search instead for 
Did you mean: 

Getting RFCMarshalException in sending the Byte() to the CRM server

Former Member
0 Kudos

Hello

I am using the Dotnet Connector to make RFC calls to Backend system. I am making a call to the function module called 'INSERTINTOQUEUE' from a dotnet client application.

i am getting an error "System exception thrown while marshaling .NET type System.Byte[] to RFCTYPE_BYTE"

InnerException "Source array was not long enough. Check srcIndex and length, and the array's lower bounds."

Can you please help in geetting out of this. Soltuon will be appreciated.

Thanks in advance !!

Best regards

Shankar

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hey Shankar

It is because of sending an array of incorrect size....

Thank you

Best Regards

Jothi

0 Kudos

And are'nt you giving me points 😄

Former Member
0 Kudos

Thank you Jothi

Former Member
0 Kudos

And what can you do to avoid this error?

which changes do you have to make?

thanks.

Joke

Former Member
0 Kudos

Hello Joke

I was facing an error while sending an Byte array to one of the function module present in the backend ABAP system via RFC.

Marshalling happens from BYTE[] to RFCTYPE_BYTE. But In order to convert to RFCTYPE_BYTE., your source array should be of predefined length ie 32000 bytes. If the source array size is less than 32000, then you will get an error as I have reported in the oroginal post.

So when you are converting Dotnet Type to SAP Type, you need to define the source array of length 32000.

Regards

Shankar

Answers (0)