on 08-17-2009 5:00 PM
guys,
i am trying to understand the amount of work needed on the .NET side when calling a SAP web service from our .NET application. I have already created a FM in SAP and converted that FM into a Web service. It simply tries to get customer details like account balance and customer address from SAP.
Now, how do i integrate it into our existing .NET application. I understand that I would have to provide a url in my code that contains the sap server address, client no., web service name etc but what else needs to go into my .NEt code. Can someone please provide an example code in .NET that calls a webservice in SAP??? Please please help.
Thanks
Hi,
please have a look at the following article:
Best regards,
André
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
basis vasis,
Here is a simplified code snippet:
string I_CUSTOMER = txtCustNo.Text;
DHD.wsGetInvoices.Z_SD_VALIDATE_DATAService wsGetInvoices = new DHD.wsGetInvoices.Z_SD_VALIDATE_DATAService();
DHD.wsGetInvoices.BAPIRETURN RETURN = new DHD.wsGetInvoices.BAPIRETURN();
DHD.wsGetInvoices.ZSSD_CUST_LINE_ITEMS_WEB[] LineItems = new DHD.wsGetInvoices.ZSSD_CUST_LINE_ITEMS_WEB[0];
NetworkCredential credentials = new NetworkCredential();
credentails.UserName = "";
credentials.Password = "";
wsGetInvoices.Z_SD_VALIDATE_DATA(I_CUSTOMER,ref LineItems);
foreach(DHD.wsGetInvoices.ZSSD_CUST_LINE_ITEMS_WEB item in LineItems)
{
this.lblName.Text = item.NAME1.ToString();
}
hope it helps,
jpcosa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
when you consume webservice in .net it will create a class and methods, you need to consume it and pass the data using it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.