Skip to Content
avatar image
Former Member

RFQ RFC didn't return data

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    May 17, 2004 at 08:57 PM

    Hi Sheung Ming Lun:

    I can not find this BAPI in our system but I am guessing that you might have to pad some zero in front of your this.txtRfqNo.Text. Let's say, if the ref number is 10 digits, you need to input as 0000012345 instead of just 12345. SAP GUI automatically format your input but .Net connector and RFC protocol will not format them.

    Add comment
    10|10000 characters needed characters exceeded