0
votes

I have a problem. I am trying to get data from SAP using a desktop app developed. When i connect to the VPN and run the application it runs smoothly with no errors, but when a customers try to run it from his machine it receive the folowing error and the application crashes. Can someone help me with this.

2019-03-25 15:22:29,581 [9] FATAL SAP_TO_DB.Connection - SAP.Middleware.Connector.RfcSerializationException: End mark of RFCID.TableContLZ not found. at SAP.Middleware.Connector.RfcConnection.ReadRfcIDEnd(RFCID rid) at SAP.Middleware.Connector.RfcConnection.ReadUpTo(RFCGET readState, RfcFunction function, RFCID toRid) at SAP.Middleware.Connector.RfcConnection.RfcReceive(RfcFunction function) at SAP.Middleware.Connector.RfcFunction.RfcDeserialize(RfcConnection conn, IRfcIOStream stream) at SAP.Middleware.Connector.RfcFunction.RfcCallReceive(RfcConnection conn, IRfcIOStream stream, RFCID rid) at SAP.Middleware.Connector.RfcFunction.RfcCallReceive(RfcConnection conn) at SAP.Middleware.Connector.RfcFunction.Invoke(RfcDestination destination) at SAP_TO_DB.Connection.GetOnlyData(String tableName, String userName, String password, String client, String serverName, String sysNo, String optionString, Int32 rowSkips, Int32 rowCount, IRfcTable fields)

Edit: when testing on the same vpn he gets another error:

2019-03-26 14:28:16,039 [1] FATAL SAP_TO_DB.MainForm - SAP.Middleware.Connector.RfcCommunicationException: destination Custom_destination_ failed when calling RFC_METADATA_GET -- see log for details at SAP.Middleware.Connector.RfcRepository.Execute(RfcFunction function) at SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadataNew(String name) at SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadata(String name) at SAP.Middleware.Connector.RfcRepository.GetFunctionMetadata(String name) at SAP.Middleware.Connector.RfcRepository.CreateFunction(String name) at SAP_TO_DB.Connection.GetOnlyHeader(String tableName, String userName, String password, String client, String serverName, String sysNo, String tableFileName, Boolean isDescriptionTable) at SAP_TO_DB.MainForm.button2_Click(Object sender, EventArgs e)

There is not much about this anywhere, therefore any help is more than welcome

1

1 Answers

1
votes

These are two separate problems:

First problem "End mark of RFCID.TableContLZ not found." Most probable reason is that the data got corrupted/truncated on the network layer. If you activate RFC trace on backend side and in the .NET program, you can compare the response data that was sent by the backend and the data that was received by the .NET program. (RFC trace contains a binary network dump, if the level is high enough.)

If the traces differ, the data was modified during network transmission. If they are the same, that means the backend system already sent corrupted data. --> Open an SAP ticket in that case to have it investigated.

Second problem "Custom_destination_ failed when calling RFC_METADATA_GET" Could it be that the parameter RfcRepository.UseRoundtripOptimization is set to true, but your customer's backend does not yet support it? (See note 1456826 for the necessary prerequisites for using this feature.)

If that is not the problem, again an RFC trace would be helpful.