Application Development 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: 

.Net connector throws RfcTypeConversionException: cannot convert Byte[] into BCD[7:2]

Former Member
0 Kudos

Hi

we are using the .Net Sap connector to call BAPIs from our .Net application.

We used .Net Connetor 2.x in the past without issues.

We now switched to .Net Connector 3.x (64bit, v 3.0.19) and we now see the following issue with one of the BAPIs:

When we call Invoke() for one specific Z-BAPI, then this calls fails and the .Net Connector throws the following exception:

SAP.Middleware.Connector.RfcTypeConversionException with message text
"FIELD ZZBZHLGNET of STRUCTURE ZMODUS_VZZBEPP (SETTER): cannot convert Byte[] into BCD[7:2]"

This issue occurs only for one BAPI - all the others can be called successfully.

Can you please help?


Thank you

2 REPLIES 2

iftah_peretz
Active Contributor

Hi,

The fact this is happening for only one Bapi means that the problem is with the Bapi and not the connector, in my opinion.

Change the type you are passing to the Bapi that corresponds to the field ZZBZHLGNET of structure ZMODUS_VZZBEPP and ask your ABAP guy (if you aren't him) to see that the Bapi is similar to other working ones (RFC-able etc.) and to see what he can do with that structure.

0 Kudos

and "cannot convert Byte[] into BCD[7:2]" says all... (BCD = number of type P in ABAP)