Ted's SharePoint

Less Is More

导航

<2012年5月>
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

Blog Stats

文章分类

档案

相册

多媒体

SharePoint Bloggers

SharePoint Sites

Login

Connect SAP R/3 4.6C and SharePoint 2003 - Part II: Define SAP Proxy

Connect SAP R/3 4.6C and SharePoint 2003 - Part II: Define SAP Proxy

In previous tip, I described how to set up the testing/development environment for connecting SAP 4.6c and SharePoint Portal Server 2003 in order to meet the business needs of displaying SAP data on SharePoint sites.

The case study's objective to create two web parts. One web part retrieves and displays the customer list staring with some characters from SAP IDES database via RFC interface. The second web part displays the order list of a customer from IDES via BAPI interface. These two web parts can be connected. When user selects a customer on the first web part, the second web part will display the order list accordingly.

The key starting point of accessing SAP data is to define a SAPProxy, which is "generated from a standard Web Service Description Language (WSDL) file, a WSDL file included in an SAP interface repository (IFR), or from an SAP server. At run time, the SAP .NET Connector uses these classes to perform and manage communication between the .NET application and the SAP server." In our first web part, we will invoke one of RFC functions the SAP proxy class provides to get the customer data like below figure shows.



So far we have a Sharepoint testing server installed with SAP .net connector 2.0.1 and JRE 1.4 and I have a SAP IDES(say, IP: xxx.xx.xx.xx, Client number:800, System number:0) with a developer-right user name and password. (IDES stands for Internet Demonstration and Evaluation System, which is a demo system of SAP, so for testing and studying, we start to use IDES as our back end SAP system.) Now we can go to this testing server and open VS 2003 to implement below steps.

1. Create a New WebPart Library Project named "SAPCustomerWebParts"

2. Solution Explorer, right click solution "SAPCustomerWebParts" and Add New Item

3. Select SAPConenctor icon, add a new SAP proxy named "SAPProxy1"



4. Click Server Explorer on design view window of SAPProxy1, a node SAP will appear on server explorer tree with other server data source nodes. If this SAP icon does not appear, just right click server explorer and click refresh. If you have installed SAP .net connector, SAP node should be there.



5. Under SAP node, there is a child node called "Application Servers" , right click it and Add new SAP Application Server

6. A window popped up like below Define DestinationType as Custom Logon Settings, input SAP user name such as "tedteng" (you must request your SAP admin add a developer user for you), set the client number in my case is "800" (if you do not know, ask your SAP admin. at this point, I made a mistake because I had little knowledge of SAP on this configuration), set AppServerHost as the ip address like my case' SAP IDES server ip or its servername like seccoides in my company, and then define SystemNumber as 0.



7.Then a node "10.20.130.29" (AppServerHost's value) will appear on under node of "Application Servers". Under this new node, there are two children nodes: BOR and Functions. In SAP, BOR stands for Business Object Repository and Functions for RFC / BAPI functions. RFC stands for Remote Function Calls and BAPI for Business Applcaition Programming Interface.



8. Right click Functions node, Add function filter with "RFC_CUS*" as the value of filter. Then there are four SAP RFC functions starting with "RFC_CUS" will appear under the Functions node.

9. Right click a node named "RFC_Customer_Get" (this SAP RFC function is to get a list of customers), then click Add to Designer, a retrieving data window pops up. This retrieving function need the Java Run Environment.



10. Then the SAPProxy1 designer window will be like below:



11. Initial SAPProxy1 use below codes:

    SAPProxy proxy = new SAPProxy1();
    SAPDestination dest =
        new SAPDestination("your sap server ip or name", youSapClientNumber,systemNumber,"yourSAPUserName","yourSAPPassword");
        //here just for demo, we use fix SAP user account, in real world, we may choose SharePoint Single Sign On function to replace above code;
    SAPCustomerWebParts.BRFCKNA1Table customer_T = new BRFCKNA1Table();
    try
    {
        proxy.Connection
            = new SAP.Connector.SAPConnection(dest);
        proxy.Rfc_Customer_Get("",//customer ID
        searchText,//customer name
        ref customer_T);
     }
    catch (Exception ex)
    {
        ...
    }
    finally
    {
        proxy.Connection.Close();
    }




BRFCKNA1Table customer_T is SAP table but it can be transferred to ADO DataTable. So you will easily to use it as you use .net data tables.

Next we will come back to .net world to create web parts. I will describe in next tip.

Last tip:Connect SAP R/3 4.6C and SharePoint 2003 - Part I: Prepare Environment 
,  http://ms.mblogger.cn/tedteng/posts/18392.aspx 

posted on 2005年10月16日 16:54

Feedback

# Connect SAP R/3 4.6C and SharePoint 2003 - Part II: Define SAP Proxy 2005-10-16 17:00 Ted's SharePoint

# Sharepoint: Connecting SAP with SharePoint 2005-10-17 19:16 Romeo Pruno

Qui potete trovare interessanti articoli su come implementare uan configurazione "two-way" tra WSS e...

# 回复: Connect SAP R/3 4.6C and SharePoint 2003 - Part II: Define SAP Proxy 2005-12-1 7:57 Julian Andres Sanchez

Hi!!

I had trying the steps of this article, but when I try to open nodes function it show me a popup message ("You are not authorized to logon to the target system.").
I logon with administrator and my system is: R/3 4.0B.
I had looking the directory in the server and did not appear "/sap/bc/soap/rfc", I think the version of my system did not support this behavior because this directory not exist.

I have a question: this behavior only work with 4.6C or I have to publish the rfc in some directory? How??????.

# To Juliam 2005-12-6 15:23 ted

Yes. rfc is 4.6c function. I have no idea about 4.0B. Suggest you to contact your SAP admin.

# 回复: Connect SAP R/3 4.6C and SharePoint 2003 - Part II: Define SAP Proxy 2006-5-2 17:39 Luis

We cannot read the images. Have you this with images in another format (word, other...)?

Thanks

# 回复: Connect SAP R/3 4.6C and SharePoint 2003 - Part II: Define SAP Proxy 2006-6-15 22:53 Eric B

Ted,

Have you or anyone else done SSO between Sharepoint Portal and SAP? We're trying to do that but the built in SSO doesn't appear to do what we need. We have thousands of users who don't actually have logon accounts in SAP, so they don't have a username and pwd to store in the SSO DB. What I need is a token to pass from Sharepoint (authenticating against Active Directory) that SAP will accept...have you done anything like that?

Thanks in advance.

-eric

# To eric 2006-6-20 13:06 ted

To eric,

For SSO between SAP and SharePoint, Microsoft has a white paper regardig this. They implemented the Personal Info Web part.

Ted

# 回复: Connect SAP R/3 4.6C and SharePoint 2003 - Part II: Define SAP Proxy 2006-12-21 17:14 tt

i havent found runtime

# 回复: Connect SAP R/3 4.6C and SharePoint 2003 - Part II: Define SAP Proxy 2007-7-3 21:19 Manik Mittal

Hi,

I want to integrate my SAP Netweaver BI 7.0 (2004S) reports with the Microsoft Office Sharepoint Server 2007. Can you please suggest me some solution, which requires minimal effort and can be done very fast?

Thanks and Regards,
Manik Mittal

# 回复: Connect SAP R/3 4.6C and SharePoint 2003 - Part II: Define SAP Proxy 2008-6-18 17:31 fugang

I had down the SAP.NET Connector 2.0,but can't installed ..and alert "You must first install the Visual Studio.NET 7.1 integeated developmet environment (IDE)"...
my Visual Studio.net's version is 2008! please tell me the reason ! thank you!

Title  
Name  
Url
Verify Code  
Comments   

请不要发表可能给我们带来伤害的政治言论,谢谢配合