cancel
Showing results for 
Search instead for 
Did you mean: 

.Net SAP Integration

Former Member
0 Kudos

Hi,

My scenario is .Net to SAP using SAP PI7.0.

Sender : .Net

Receiver : ECC6.0

What are the steps to be done to pass the Data from .Net to SAP and response SAP to .Net

regards,

kalpana

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Sender SOAP Adapter

Receiver RFC/IDOC/ABAP proxies.

IR

Step 1:

Create the Sender Datatypes for Request & Response

step2:

Create the MT for Req & Res

Step3 :

Create OB Message Interface ( Syncronous)

Step4 :

Import FM/BAPI

step5 :

Request Mapping : Sender Req MT--> FM Req

Response Mapping : FM Res----->Sender Res MT

Step6:

Interface Mapping

ID

Step1 :

Configure Sender Soap Adapter

Step2 :

Configure Receiver RFC Adapter

Step 3: Configure Sender Agreement, receiver determination,Interface determination,Receiver agreement

Step 4:

Create WSDL file.( ID->tools-Defien webservice)

save the file as .wsdl file

Give the file to sender system

.Net

Create a proxy class using a WSDL and

use it in a Client Program in .NET : (assuming Maths as the WSDL and Webserice name)

1.) Place maths.wsdl in C:/Sample/ folder

2.) Open Visual studio command prompt using the Start Menu

Start->Programs->Microsoft Visual Studio 2005->Visual Studio Tools->Visual Studio 2005 Command Prompt

3.) In the Command prompt go to that directory

> C:

> CD\

> CD Sample

> wsdl maths.wsdl /out:"c:\sample"

4.) The previous step will create a file called Maths.cs , go to that folder and confirm this

5.) Open Microsoft Visual Studio 2005, open the Client application where this webservice needs to be called

6.) If your Client application is a web application, the see if the website has a folder called "App_Code"

If not then create this folder. Right Click on this folder and click on "Add Existing Item"

7.) Browse to C:/sample and select the Maths.cs file

8.) If your client is a Desktop application , just add this file in a similar manner to the project(no need of creating any folder)

9.) After the file gets added, open Maths.cs file

10.) Add a namespace to it for convinience

eg:

namespace SAP

{

}

This should come before the Class Declaration and close it after the class

eg: See the red lines

namespace SAP

{

/// <remarks/>

[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]

[System.Diagnostics.DebuggerStepThroughAttribute()]

[System.ComponentModel.DesignerCategoryAttribute("code")]

[System.Web.Services.WebServiceBindingAttribute(Name = "Equi_get_NotifBinding", Namespace = "http://Equipment_Get_Notifications")]

public partial class Equi_get_NotifService : System.Web.Services.Protocols.SoapHttpClientProtocol

{

functions.

}

}

11.) Save the Maths.cs file

12.) Open the Webform or windows form code where this webserive will be called

13.) The webservice will now be available here under the SAP namespace

so when u type "SAP." u will get all the classes in it.

Add credential in this code as shown below

eg:

private void GetNotifications()

{

try

{

SAP.Equi_get_NotifService ser1 = new SAP.Equi_get_NotifService(); //This is the Webserive Proxy class

SAP.Equi_get_Notif_Request req = new SAP.Equi_get_Notif_Request(); //Request Class

req.Equipment = SAPID;

req.Date = Calendar1.SelectedDate;

System.Net.CredentialCache ch = new System.Net.CredentialCache(); //Adding Credentials for authentication on webservice server

System.Net.NetworkCredential cr = new System.Net.NetworkCredential("xisuper", "infotech");

ch.Add(new Uri(ser1.Url), "Basic", cr);

ser1.Credentials = ch; // Assing this Credential to the ProxyClass.Credentials property as shown here

SAP.Equi_get_Notif_ResponseNotifications[] res = ser1.Equi_get_Notif(req); //Call the webservice, res is the responce object

GridView1.DataSource = res;

GridView1.DataBind();

}

catch (Exception ex)

{

Response.Write(ex.Message);

}

}

Regards,

Jayasimha JAngam

Former Member
0 Kudos

So did you come up with such a husge reply in a time interval of one minute?

The question was just how to connect .Net with XI how come you are able to answer the partcular requirement even with the exact coding?

Stop gaming for points in SDN.

Shame on you!!!

Answers (4)

Answers (4)

Former Member
0 Kudos

LOL, If all of us observe the thing behind is .

https://www.sdn.sap.com/irj/sdn/profile?userid=3864117

What ever the Poster posted is Answered by One Person Only(Upto Now 5 posts) and he got 10 Points each and every time even though the Correct Ans were given by many People......

guys keep maintain reality and Honesty

Regards

Seshagiri

Former Member
0 Kudos

Hi guys..

can u clearly observe this forum.. a qeury was posted by

8:24 and answered by 8:25 and he got 10 points

when you observe this he is doing some nusense and he came first and

he is in first position now.. what to do and i dont want to mention his name and this is not the right as i think post it gnetly..

regards

shs

former_member183906
Active Contributor
0 Kudos

your .NET Application is Web based application, you can expose it as Webservice.

.NET People will pick the data from Dbase using their application and will send the data to XI by using our XI Details like Message Interface and Data type structure and all.

So we can Use SOAP Adapter or HTTP in XI..

If you use HTTP for sending the data to XI means there is no need of Adapter also. why because HTTP sits on ABAP Stack and can directly communicate with the XI Integration Server Directly

If you are dealing with the Webservice and SAP Applications means check this

Refer this link which explains a Webservice scenario with XI:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5474f19e-0701-0010-4eaa-97c4f78d...

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2131 [original link is broken] [original link is broken] [original link is broken]

Former Member
0 Kudos

Hi

SAP PM, there are several function modules available, that would allow to read and change equipment and other data, e.g. BAPI_EQMT_DETAIL, BAPI_EQMT_CREATE, BAPI_EQMT_MODIFY, ...

If there are modules available for all the data you want to exchange, then there's no need to do any ABAP development.

These modules can be called by external systems in several ways:

you can use the SAP .NET connector to call them directly

you can expose these modules in SAP as webservices, then you can call them via http and XML

you can use the SAP Exchange Infrastructure (XI) to call them, also via http and XML. In XI you can define mappings etc. if needed.

The SAP .NET connector supports MS VS 2003, unfortunately it's not completely clear, if also newer VS versions will be supported.

Perhaps you should start to get some remote access to our ICC testsystems through the RACK service. By doing this you would get access to some SAP Backend Systems that contain the PM modules, to SAP XI and you would be able to download and check the SAP .NET connector.

reffer the below mentioned link .

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0123164-9b30-2b10-a086-b8a7f973... ---step by step .