on 11-03-2006 3:31 PM
Hi,
Im trying to develop iviews using sap portal netweaver pdk2.0 and .NET2003 .Im able to add destination in a portal from the server explorer,for connecting to R3 server im creating a portal destination and setting the alias sucessfully also,and it gets complied without error,but when i try to run the iview it gives me the following error:
Server Error in '/EPApp2000' Application.
-
You must set a connection before doing a call.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: SAP.Connector.RfcException: You must set a connection before doing a call.
-
Following is the peice of that I have written to execute the Bapi.
private void Page_Load(object sender, System.EventArgs e)
{
sapProxy11.Connection = SAP.Connector.SAPLoginProvider.GetSAPConnection(this);
//sapProxy11.Connection = SAP.Connector.SAPLoginProvider.OpenSAPConnection(
this.sapProxy11.Bapi_Bank_Getlist("DE",10,out salesList,ref bapI1011_LISTTable1);
Table1.DataSource = bapI1011_LISTTable1;
Table1.DataBind();
Response.Write("Hello World");
}
The GetSAPConnection() method is expecting a System.web.ui.page object as parameter. But since we are writing a component, the 'this' has the Component object.
Regards,
Babu
Hi Babu,
As .NET PortalComponent is a UserControl and not ASP .NET Page, I think you should call to GetSAPConnection() method with parameter this.Page .
Regards,
Rima.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.