cancel
Showing results for 
Search instead for 
Did you mean: 

SAP, Windows 8, .Net Framework 4.5

Former Member
0 Kudos

Hi Forum..

i'm a newbee in SAP and I intent to develop a Windows 8 app with C#. Net Framework 4.5 in Visual Studio 2012.

Which tools does I need that the app could interact with the SAP system? The .Net Collector. the Netweaver, ...or what else!?

I'm thankful for some help and also for tipps, handsons and homepages round about SAP applications..

Andi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

there are no special tools required to develop an Windows Store App with connects to a SAP-System.

It's easy to generate a web service out of a SAP BAPI - link.

If you want to check, if the web service run correct you could use SOAP UI. The handling is describes here.

To insert the WSDL of the web service in Visual Studio - there is a wizzard in the project explorer, which is accessible with a right-click:

A examplary code (...only HTTP...) in the application to use the web service:

*include the web service over binding

using SAPWebService;

*instantiate the binding

var binding = new BasicHttpBinding();

binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;

binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;

*define the address of the WSDL web service

var address = new EndpointAddress("http://server:port/sap/WebService");

*instantiate the client with binding & address

WebServiceClient client = new WebServiceClient(binding, address);

*set SAP-Username and -Password

client.ClientCredentials.UserName.UserName = "uname";

client.ClientCredentials.UserName.Password = "pword";

*instantiate the request

WebServiceRequest request = new WebServiceRequest();

*set a input-variable for the web service

request.PoNumber = inputTextBox.Text;

*define the class of the request

request.EntrysheetHeader = new Bapiessr[0];

*call the web service with the request as input-varibale

WebServiceResponse response = await client.WebServiceAsync(request);

*write the desired output-varibale in a textbox

outputTextBlock = response.EntrysheetHeader[0].SheetNo;

I hope this will be helpful