on 2022 Jan 12 9:34 AM
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.
Request clarification before answering.
User | Count |
---|---|
52 | |
6 | |
6 | |
6 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.