Skip to Content
0
Former Member
May 17, 2004 at 01:25 AM

RFQ RFC didn't return data

56 Views

Hi all,

I am using .NET connector to connect to the RFC of RFQ, BS01_RFQ_GETDETAIL

I can connect to it successfully in SE37, with return data store in a table named RFQ_Items. However, when I connect to it through .NET connector, nothing return...

Is there anything I wrote wrong in my code? pls help, thx a lot~!

//Export

private SapDemo.BAPIADDRESS tblRfqAddress = new SapDemo.BAPIADDRESS();

private SapDemo.BS01MMHEAD tblRfqHeader = new SapDemo.BS01MMHEAD();

//Table

protected SapDemo.BS01MMHDTXTable tblRfqHeaderTexts;

protected SapDemo.BS01MMITEMTable tblRfqItem;

protected SapDemo.BS01MMSCHEDULETable tblRfqItemSchedule;

protected SapDemo.BS01MMITEMTXTable tblRfqItemTexts;

protected SapDemo.BAPIESUHTable tblRfqItemLimits;

protected SapDemo.BAPIESUCTable tblRfqItemContractLimits;

protected SapDemo.BAPIESLLTable tblRfqItemServices;

protected SapDemo.BAPIESLLTXTable tblRfqServiceTexts;

protected SapDemo.BAPIRET2Table tblReturn;

protected System.Web.UI.WebControls.Label lblMessage;

protected System.Web.UI.WebControls.DataGrid DataGrid1;

private void btnSearch_Click(object sender, System.EventArgs e)

{

// Declare parameters here

SAPProxy1 proxy = new SAPProxy1();

try

{

proxy.Connection = SAP.Connector.SAPLoginProvider.GetSAPConnection(this);

// Call methods here

try

{

proxy.Bs01_Rfq_Getdetail("","","X",this.txtRfqNo.Text,"","","",

out this.tblRfqAddress,out this.tblRfqHeader,ref this.tblReturn,

ref this.tblRfqHeaderTexts,ref this.tblRfqItemContractLimits,

ref this.tblRfqItemLimits,ref this.tblRfqItemSchedule,

ref this.tblRfqItemServices,ref this.tblRfqItemTexts,

ref this.tblRfqItem,ref this.tblRfqServiceTexts);

}

catch(RfcSystemException rse)

{

this.lblMessage.Text = "error";

}

// Now update Data Bindings. On WinForms this will be automatic, on WebForms call the following line

this.DataBind();

}

catch(Exception ex)

{

// If SAPLoginProvider.GetSAPConnection(this) cannot get a connection, we might get an error. // Normally this can be ignored as it will automatically will force a relogon.

Response.Write("Error occurs...");

Response.Write(ex.Message);

}

}

Regards,

Ming