cancel
Showing results for 
Search instead for 
Did you mean: 

CurrentRow' threw an exception of type 'SAP.Middleware.Connector.RfcInvalidStateException'

sunandy
Discoverer
0 Kudos
735

Facing the issue "CurrentRow = '((SAP.Middleware.Connector.RfcTable)).CurrentRow' threw an exception of type 'SAP.Middleware.Connector.RfcInvalidStateException'"

when I get the data from SAP RFC in .NET. below is the code.

using SAP.Middleware.Connector;

using System;

using System.Collections.Generic;

using System.Data;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

namespace saptest

{

public partial class _Default : Page

{

protected void Page_Load(object sender, EventArgs e)

{

RfcDestination dest = RfcDestinationManager.GetDestination("SE37");

// Create function object.

IRfcFunction func = dest.Repository.CreateFunction("ZFDLKNA1");

func.SetValue("P_KUNNR", "17990");

// Send Data With RFC Table/Structure

IRfcTable getDataSAP = func.GetTable("IT_KNA1");

getDataSAP.SetValue("KUNNR", "P_KUNNR")

try

{

//getDataSAP.Invoke(GlobalData.rfcDestination);

}

catch (Exception ex)

{

}

}

}

}

Please help me to resolve the issue.

Accepted Solutions (0)

Answers (0)