cancel
Showing results for 
Search instead for 
Did you mean: 

calling BAPI from .net

Former Member
0 Kudos

Hi All,

I need some information for connecting front end (.net) and backend(SAP R/3). I want to access the SAP DB from .net to view the product details. Please do suggest me which interface or procedure will be better for this task.

regards

PSNG

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

@@ Dorian

Man, you don't have to install VS 2003 in order to use Softwise's SAP® Explorer & Proxy Generator, for it is the purpose of the tool! If you to install VS 2003 too, then there's no use of it - use .Net Connector instead.

@@ Jurgen

How about the licensing for WCF LOB Adapter? Many thanks

@@ Vijay

You don't have to install .Net Connector and of course there's no need to expose the remote-enabled function as webservice when you have Softwise's SAP® Explorer & Proxy Generator.

I'll quote Dorian about the nice thing I know about RFC :

"The .Net Connector makes use of RFC communications. If you are moving a huge amount of data, then this will be the faster of the two. It also works with older SAP systems. The target on the SAP system is a remote-enabled function module (Bapi) and does not need the web service to be enabled"

So, Vijay, if you are using VS 2005 or above, and willing to achieve what Dorian has written, Softwise's SAPExplorer is there to ease your life.

(please reward points if usefull)

Former Member
0 Kudos

PSNG, I believe I have the best solution for your problem.

Try to install Softwise's SAPExplorer to grab the Remote Enabled Function Modules/BAPI to the .NET realm. I works like the SAP Connector in the VS 2003.

Just choose the function desired, right-click on it and choose "Create Proxy", then the Function will be created in your .NET Solution under the folder "BAPIS".

SAPExplorer is usefull if you use VS 2005 or VS 2008.

Trust me, it's that easy

former_member192283
Participant
0 Kudos

Hi

As i am new for calling RFC from the .Net connecter.

In the above thread suggested to use the .Net Connector for accesing the RFC.

I have couple of questings like.

If i use the .Net Connecter , still is it required to expose the RFC as Webservice or not?

or

If i use the Softwise's SAPExplorer , still is it required to install the .Net Connector and expose the RFC as webservice in the SAP R/3 end.

Please explain if my question is wrong.

Regards

Vijay

Dorian
Participant
0 Kudos

Vijay:

The two approaches use different technology; it's mostly a matter of personal preference which you use, subject to the system constraints below.

The .Net Connector makes use of RFC communications. If you are moving a huge amount of data, then this will be the faster of the two. It also works with older SAP systems. The target on the SAP system is a remote-enabled function module (Bapi) and does not need the web service to be enabled.

The Enterprise Explorer makes use of HTTP web services. It is slower than RFC, as the message is sent in XML format with a SOAP envelope. However, unless you have a lot of data being passed, this shouldn't be an issue. This approach only works with SAP systems of version 6.20 or later. The target on the SAP system is a web service. If you want to call functions / Bapi's that are not web-enabled, you must create your own web service "wrapper" for these functions - this isn't hard, there is a wizard provided by SAP to do this.

The .Net Connector is, I believe, going to fade away in the future, and the web service approach is the one that will be used by SAP for future systems.

At the Visual Studio end, there are some mionor differences between coding for RFC connections and web service connections, but the basic principle is the same - i.e. you generate a proxy class for the remote function you are calling, then use that proxy class in your VS code.

If you use the Web Service approach, you don't need the .Net Connector or the Softwise connector.

If you use the .Net Connector or Softwise connector for the RFC approach, you don't need the Enterprise Explorer plug-in or the Web Services on the SAP end. Using RFC approach, you need either the .Net Connector or the Softwise connector, but not both. However, you DO need VS 2003 to use the .Net Connector, as it does not work with later VS versions.

Regards,

D.

Edited by: Dorian Salmon on May 29, 2008 8:13 AM

Former Member
0 Kudos

Hi,

please keep also in mind that if you use the Web Service approach you would have to handle the transactions by your own, you must create the Web Service as a stateful Web Service and use cookies in order to commit the transactions, that requires some coding in VS. Make sure that you run at least at Web Application Server 6.40, the old Web Service Interface from Web Application Server 6.20 is not recommended for production use by SAP and the Web Service Creation Wizard came with Web Application Server 6.40 (I think SP1 or SP2). Another point you have to keep in mind is that you use a certified solution for accessing SAP from .NET, that can be the .NET Connector or you can also use the WCF LOB Adapter from Microsoft (you can find the eval version at http://www.microsoft.com/downloads/details.aspx?FamilyID=f3ea0659-b0ed-4d5a-891e-53268128a5f0&Displa..., Microsoft is currently in the process of certification for this adapter. The WCF LOB Adapter can be used with BizTalk but also a stand alone adapter and enables you to connect to a SAP system from 4.6 up to ECC by using RFC, BAPI, IDoc, and tRFC.

- Juergen

former_member192283
Participant
0 Kudos

Hi Salmon,

Thanks for your valuble points.

I have got idea between two things. I would like to explain my business scenorio for your u.

MW3 platform is built on Microsoft Office SharePoint Server 2007 technology. There are 3 datacenters, each hosting a SharePoint Server 2007 farm consisting of several front-end servers, application servers, a database cluster and other supportive servers (e.g. mail servers).

Each farm hosts a knowledge sharing portal, a collaboration portal, a personal host site and some shared services. All these portals contain business documents in different formats, various types of lists and also web pages. Web pages can contain various content and also components called web parts. Web parts allow us to integrate any information from any business line system into a single user interface u2013 SharePoint, which allows to display all necessary information to users, based on their roles and also to personalize the presented information based on their personal preferences. Thatu2019s the way we would like to use to present the information about all opportunities, engagements and tasks stored in SAP system, related to a given user.

So , we need to display the information about the opertunities , engagements and tasks stored in SAP system, related to the given user. By using Sare point server by accessing the RFC's in SAP system.

For share point server also can i use the following options or is there any better way to implement or integrate. if not which is the better option in the following choices.

1) SAP .Net Connector

2) Using Webservice.

Please let me know where i can get the step by step documentation for this integration.

Because intended to know the following questions to implements this.

Why to use .Net Connecter?

Why to use webservice

When to use .Net Connector? when to use webservice?

How to use .Net connector? How to use webservice?

What the limitations & benefits of using the .Net connector and webservice.

What is the setup required for using .Net Connector or Webservice?

Environment is:

In Microsoft side:

MicrosoftOffice SharePoint Server 2007

Windows Server 2003

Windows SharePoint Services 3.0

SQL Server 2005 is the relational database used for storing all content, data, and configuration information

The core and development-platform operating system services include:

Microsoft .NET 2.0 Framework, including:

ASP.NET 2.0 master pages, content pages, and Web Parts

Pluggable service-provider models for personalization,membership, navigation, and enhanced security

Database access services

Internet Information Services

Windows Workflow Foundation

Windows desktop indexing and search services

In SAP Side

ECC6.0

CRM 2005 & CRm 2007

Please give the step by step implementation process for each of the option .

Kindly give the answers which i have specified above.

Regards

Vijay

Dorian
Participant
0 Kudos

Hi Vijay:

Sounds like an interesting project .......

Forgive me if I sound kinda rude here, but both Jürgen & I have shared with you our ideas and experiences, which should (a) help you make some decisions about how to proceed and (b) give you some starting points for doing your own research. As far as your request goes for a

step by step implementation process for each of the option

the best I can do right now is tell you to hit the SDN forum topics for more information, plus read some of the SAP documentation at http://help.sap.com.

If you really want me to produce a blueprint for you, I would be happy to do so; however it will be on a chargeable consulting basis - that is, after all, the business I am in!

Regards,

D.

Former Member
0 Kudos

Hi PSNG,

depending on your SAP release and your SAP landscape you have different choices.

- You can use the SAP Connector for Microsoft .NET for calling BAPIs from .NET, please keep in mind that the design time is only supported in VS 2003 so you would have to create the proxies in VS 2003 which then can be used in VS 2005/2008.

- You can use Web Services if your SAP System is running on SAP Web Application Server 6.40 or higher.

- You can use a middleware product like BizTalk or XI/PI for exposing the BAPIs as Web Service

- You can use the WCF LOB Adapter for SAP from Microsoft

- You can use third party adapters

Hope this helps, if you need more help let me know.

- Juergen