on 05-14-2007 11:34 AM
I am using SP-Dot net connector 2.0 and using it to access data from SAP . I have written webservice having webmethods which returns datasets .
I am intialising connection strings to sap through application variable in initialise method
public SapWebService()
{
//CODEGEN: This call is required by the ASP.NET Web Services Designer
InitializeComponent();
sapProxy21=new SAPProxy2(Application.Get("ConnectionStringSapRetail").ToString());
//VendornameCls=new SAPProxy1(Application.Get("ConnectionStringSapRetail").ToString());
VendornameCls=new SAPProxyVendDetails(Application.Get("ConnectionStringSapRetail").ToString());
I have web methods like
[WebMethod(Description="Gets Staff's Loan balance where only balance is to be fetched based on SPGL indicator (Returns datatable) ",EnableSession=true , CacheDuration=0 , BufferResponse=true )]
public System.Data.DataSet BAPI_AP_ACC_GETKEYDATEBALANCEForAllSPGL( string VendorCode )
{
int VendorCodeLength = VendorCode.Length;
int BalanceZeros =10-VendorCodeLength;
int pad =0;
for (pad=0;pad < BalanceZeros ; pad=pad+1)
VendorCode="0" + VendorCode;
sapwebapplication.BAPIRETURN returnobj =new BAPIRETURN();
sapwebapplication.BAPI3008_3Table lineitemTbl = new BAPI3008_3Table();
VendorKeyBalance.Bapi_Ap_Acc_Getkeydatebalance("0","1000",System.DateTime.Today.ToString() ," " ,VendorCode,out returnobj ,ref lineitemTbl);
System.Data.DataTable AdvanceTable;
AdvanceTable = new System.Data.DataTable();
AdvanceTable = lineitemTbl.ToADODataTable();
//change column names and delete columns
int y;
int m;
AdvanceTable.Columns.Remove("Loc_Currcy");
AdvanceTable.Columns.Remove("Lc_Bal");
AdvanceTable.AcceptChanges();
m=AdvanceTable.Columns.Count-1;
for (y=m; y >=0; y--)
{
if (AdvanceTable.Columns[y].ColumnName.ToString()=="Sp_Gl_Ind")
AdvanceTable.Columns[y].ColumnName="SPGL";
if (AdvanceTable.Columns[y].ColumnName.ToString()=="T_Curr_Bal")
AdvanceTable.Columns[y].ColumnName="Balance";
if (AdvanceTable.Columns[y].ColumnName.ToString()=="Db_Cr_Ind")
AdvanceTable.Columns[y].ColumnName="DR_CR";
}
System.Data.DataSet Ds;
Ds= new DataSet();
Ds.Tables.Add(AdvanceTable);
return Ds;
When I hosted the application in many servers with win2003 and XP , it is fetching data from SAP .
SAP is behind firewall .
However when I hosted it in production server few days it worked . Now it is not giving any error however It is not fetching any data from SAP R/3 .
Firewall settings , port openings evrthing is fine .
Can any one please help ?
Regards
Bhat
Hi Bhat,
I used to face similar issues when i worked on sap.net connector. one best way to deal such kind of issues is recreate the the proxy. i mean delete the proxy you created and create again. i hope it will solve your issue.
cheers
ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi bhatnp ,
As you say taht i worked for few days it must wok now also. it might be Network address problem or Firewall problem.
regards,
Sachin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please let me know what is network address problem ?
I had used microsoft network monitor tool and it is clearly showing activity between dot net application server and sap servers . Since R/3 is load balanced , response comes from any sap r/3 servers . This also proves that Firewall is not blocking any data in between .
Since you have worked on these issues , please let me know what fire wall settings and network settings needs to be looked into .
Thanks in advance .
Regards
Bhat
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.