cancel
Showing results for 
Search instead for 
Did you mean: 

NCo 3 crashes when invoking functions that return a time field

Former Member
0 Kudos

I'm using NCo 3 (.NET 2 target framework) with Visual Studio 2010. When I invoke a function that returns time fields (like BAPI_ALM_ORDER_GET_DETAIL) NCo crashes with the following message:

SAP.Middleware.Connector.RfcTypeConversionException: Cannot convert 240000 into TIME (HHmmss)

I'm currently using NCo version 3.0.0.42. Is there a newer version? Obviously this is a bug inside the NCo library which I can't fix from the outside rendering the connector almost useless.

Is this a known problem? Does anyone know if it is already fixed in newer revisions of NCo?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Seems to be fixed in 3.0.2.0 available for download.

Former Member
0 Kudos

I'm using NCo 3.02 (.NET 4 target framework) with Visual Studio 2010.

When I invoke a function that returns date fields (like BAPI_SALESORDER_GETLIST) NCo crashes with the following message:

SAP.Middleware.Connector.RfcTypeConversionException: Cannot convert DOCDATE....

Below is the code I'm using:

Dim customer_orderAPI As IRfcFunction = ecc.Repository.CreateFunction("BAPISALESORDER_GETLIST")

customer_orderAPI.SetValue("CUSTOMER_NUMBER", "0000020000")

customer_orderAPI.SetValue("SALES_ORGANIZATION", "ARCO")

customer_orderAPI.SetParameterActive("MATERIAL", False)

customer_orderAPI.SetParameterActive("DOCUMENT_DATE", False)

customer_orderAPI.SetParameterActive("DOCUMENT_DATE_TO", False)

customer_orderAPI.SetParameterActive("PURCHASE_ORDER", False)

customer_orderAPI.SetParameterActive("TRANSACTION_GROUP", False)

customer_orderAPI.SetParameterActive("PURCHASE_ORDER_NUMBER", False)

customer_orderAPI.SetParameterActive("MATERIAL_EVG", False)

customer_orderAPI.Invoke(_ecc) 'I receive the error in this line

Dim table As IRfcTable = customer_orderAPI.GetTable("SALES_ORDERS")

Dim returnCode As String = customer_orderAPI.GetStructure("RETURN").GetString("TYPE")

If (returnCode.Equals("E") Or returnCode.Equals("A")) Then

Console.WriteLine(customer_orderAPI.GetStructure("RETURN").GetString("MESSAGE"))

Else

Console.WriteLine("*********** SUCCESS **********")

Console.WriteLine("Number of orders is .", table.RowCount)

End If

Does anyone know what is the issue and how to fix it?

Former Member
0 Kudos

Could you post more of the error message? In the next line the reason why the convert failed should be mentioned.