Skip to Content
0
Former Member
Jun 15, 2006 at 09:11 PM

Getting marshaling .NET type 0 to RFCTYPE_CHAR

309 Views

Hi,

Our .NET application makes a standard RFC call (BAPI_ACC_DOCUMENT_POST) to SAP. When the

same call is repeated in a loop, after a couple of calls, we get the following error:

Exception {"System exception thrown while marshaling .NET type 0 to RFCTYPE_CHAR"} System.Exception {SAP.Connector.RfcMarshalException}

InnerException {"Unable to cast object of type 'System.Decimal' to type 'System.String'."} System.Exception {System.InvalidCastException}

This error happens from the .NET connector generated proxy code:

object[]results = null;

results = this.SAPInvoke("Post",new object[] {

DocumentHeader,CustomerCPD,ContractHeader,AccountGl,AccountReceivable,AccountPayable,AccountTax,CurrencyAmount,Criteria,Valuefield,RealEstate,Extension1,Extension2,Return0,PaymentCard,ContractItem });

Does anyone have any idea on why this could be happening? I suspect this is a bug in the SAP .NET connector itself.

Thank you in advance for your help.

Sudha