Google
 

Saturday, April 26, 2008

SAP Netweaver

1.0 Introduction

In the present era, where companies are struggling to unite various heterogeneous environments in their organizations and maintain a lower Total Cost of Ownership (TCO) NetWeaver comes as a solution to all their problems. SAP NetWeaver is the latest advancement in the mySAP Technology, which was developed as an Artificial Intelligence (AI) shell that accepts standard comments, literally as they are spoken, by domain experts.

Another unique feature of NetWeaver™ that makes it stand out amongst other software technologies is its modularity. The knowledge engineer can more easily create "digestible chunks" of modules or sub-dependency networks, which help to keep the overarching dependency network from becoming potentially incomprehensible because of apparent complexity. This text is aimed at explaining SAP NetWeaver architecture and its interoperability with Microsoft.NET and IBM WebSphere. In addition it aims at bringing out all the advantages that are associated with SAP NetWeaver.

Net Weaver in simple words is an application and Integration platform in which Web Services play a major role and which is open for Non-SAP applications and platform. It is used by organizations to improve productivity and enhance efficiency by making all the resources that are available in an enterprise to work collectively. The SAP customers to bring heterogeneous environments at one platform use SAP NetWeaver. In addition, it enables customers to use the already existing systems without putting in much investment. Further in the near future, the various corporate sectors and Organizations have to take a decision for some common platform; could be Microsoft .NET, IBM Websphere or SAP NetWeaver. Irrespective of the choice that they make, SAP NetWeaver is the one that integrates with all the three technologies.


Read This Nugget
As it’s name suggests, Enterprise Core will contain the inward, enterprise processes that make the enterprise work. The outward, collaborative processes will not be included in Enterprise Core. They will be included in what is called Enterprise Extensions.

SAP NetWeaver attains the process of integration by integrating all the available heterogeneous resources of the existing system and unifying them into a homogeneous form. This integrated information forms the basis of total, comprehendible, focused solution as desired in an enterprise

2.0 NetWeaver Object Model and Enterprises Architecture


This section focuses on overview of the object model of NetWeaver. This basic knowledge facilitates the organizations in constructing an apprehensible knowledge base. The various components that are present in NetWeaver Object Model are Data Links, Dependency Networks, Nodes and in some cases, evaluation groups. Each of these components and their function in the NetWeaver Object Model is described below:


Data Links: These objects of the NetWeaver function to request data about the real-world objects. They can also be defined as the objects that have one-to-one relation with the real-life objects and can be logically and mathematically manipulated. Thus, making the knowledge representation in NetWeaver simple as well as insightful. Moreover, these objects are reusable and can be referred as and when required.


Dependency Networks: The dependency networks in NetWeaver play the central role in formulating the representation of the problem. These dependency networks are used to interconnect different objects in the object model. Therefore, they are considered to be the most important factor in the object model of NetWeaver. Using the "New Network" that is present in the network window can create a new dependency network. Also, new dependency networks can be added in the object model in the later stages without creating any interference with the already existing knowledge base.


Nodes: Nodes function to form the relation between data links and dependency networks. Nodes are classified into logical nodes and functional nodes. The logical nodes define the dependencies of the network on its antecedents and the functional nodes are used to construct the mathematical relation in the data links.


Evaluation Group: An evaluation group is a user-defined collection of networks. An evaluation group specifies a collection of networks that are conceptually relevant to one another and that the knowledge base designer wants to see evaluated as a set.


3.0 Interoperability of SAP NetWeaver with Microsoft .NET


SAP along with Microsoft is creating a development kit, which enables to create Iviews inside Microsoft Visual Studio.


The Iviews help in integrating information and functions from a wide range of sources in an enterprise portal. It helps in developing portal content on your preferred platform. It also helps in accessing and gathering Information consistently. This is achieved by integration of SAP Knowledge Management and data management tools such as Microsoft Content Management Server. This integration centralizes the Knowledge base and helps in coordination of processes, which cover various Technologies e.g., SAP NetWeaver supports an environment in which SAP Exchange Infrastructure and Microsoft BizTalk Server can exchange information.


Additionally, SAP Web Application Server, which is a component of SAP NetWeaver, supports platform independent Web services and the same Web services as standards as Microsoft, including Extensible Markup Language (XML), Simple Object Access Protocol (SOAP), Web Services Description Language (WSDL), and Universal Description, Discovery, and Integration (UDDI). For Microsoft .NET, SAP’s .NET connector provides a highly scalable and reliable communication infrastructure, as well as a Microsoft Visual Studio .NET Add-In to simplify development.


4.0 Interoperability of SAP NetWeaver with IBM WebSphere


Interoperability of SAP NetWeaver with IBM WebSphere takes at People, Information and process level. This interoperability helps in developing portal content on your preferred platform thus saving investments. SAP NetWeaver supports groupware and collaboration products such as Lotus. It helps in accessing and gathering Information consistently. This is done by integration of SAP Knowledge Management and data management tools such as IBM Content Manager. It also centralizes the Knowledge base and helps in coordination of processes, which cover various Technologies e.g., SAP NetWeaver supports an environment in which SAP Exchange Infrastructure and IBM WebSphere Business Integration can exchange information. As mentioned earlier, SAP Web Application Server, a component of SAP NetWeaver, supports platform-independent Web services and other primary technology standards including J2EE Connector Architecture (JCA) and Java Message Service (JMS). SAP Java Connector is a toolkit that allows a Java application to communicate with any SAP system. It combines an easy-to-use API with extraordinary flexibility and performance. The package supports both, Java-to-SAP, as well as SAP-to-Java calls. Customers using IBM WebSphere can easily access existing business objects and integrate their applications with any SAP application.


5.0 Creating an ASP .NET Web Application Using the SAP .NET Connector


SAP.NET Connector along with Microsoft.NET can be used to create Web Applications. The following example illustrates creating .NET project using Microsoft Visual Studio. NET. Here, a client application reads and displays customer data from an SAP System using a search value and then displays it in a data grid.


The example uses the function module RFC_CUSTOMER_GET, which requires that customer data exist in the target SAP System, for example, in IDES. Although it is possible to rename all development objects and generated proxy classes, default names are used in this example. This example is provided as part of the connector sample code (DNCWebApp).


Procedure of Creating an ASP .NET Web Application Using the SAP .NET Connector:
1. Open Microsoft Visual Studio .NET.
2. Create a new C# Web form project:Choose New. New Project. Visual C# Projects. ASP .NET Web Application.
You can also create a project in any other common programming language for .NET, for example, in Visual Basic .NET. In this case, you must add the SAP .NET proxy classes as a separate project in the Microsoft Visual Studio .NET solution.
3. Rename the form Webform1.aspx to Default.aspx.
4. Add Web controls to your Web form.
5. Add proxy classes to connect the Web applications to your SAP server.
a. In the Solution Explorer, right-click on your project.
b. Choose Add. Add new item.
c. Select Web Project Items.
SAP Connector Class and choose Open.
The SAP .NET Connector Wizard opens.
d. Decide from where you want to generate the proxy classes.
Proxies can be created from
- Web Services Description Language (WSDL) files that originate in an SAP interface repository (IFR)
- An SAP server
- Standard WSDL files
e. Select the client proxy object type and select beautify names option.
f. Select the Remote Function Modules (RFM) you want to use in your proxy object.
You can use search filters to look for the Remote Function Modules. In the example, enter the search argument RFC_CUST* in Name-Filter and select RFC_CUSTOMER_GET.
g. Add the modules to your proxy object and choose NEXT.
The proxy classes for the referenced table and structure types are automatically created and added to the project.
6. Build the solution with Build. Build Solution.
7. Create an SAP Login page to support user name and password authentication
a. In the Solution Explorer, right-click on your project.
b. Choose Add. Add new item.
c. Select Web Project Items. SAP Login Form
Leave the name as SAPLogin1.aspx.
8. Set the system connection information in the destination object of the SAPLogin1.aspx page:
a. In the Solution Explorer window find the item SAPLogin1.aspx and double-click on it to bring it up in the designer.
b. Look for the component destination1 on the bottom of the form.
c. Click on the destination component and set the properties for connecting to your SAP system (for example AppServerHost and System Number). The other properties like client, Password and username will be set from the login page.
9. Data bind the data grid to BRFCKNA1Table:
BRFCKNA1Table is the parameter of RFC_CUSTOMER_GET that contains the list of customers.
a. Select SAP Table Wizard from the SAP proxy toolbox and Drag Drop it to your working area. In the dialog box, select BRFCKNA1Table.
b. Select the data grid, and under Properties change Data Source to BRFCKNA1Table using the drop down list.
c. Customize the list of columns displayed on the data grid by modifying the Columns collection property.
10. On the default.aspx page, double-click the Button control you added earlier to create an event handler for the control.
11. Add the connect code to your project:Select Connect code from the SAP proxy toolbox.
Drag Drop it in the source code of your event handler. A fragment of sample code is then inserted. It connects to the SAP server using the authorization settings from the Proxy Wizard. Normally, you must change these settings.
The syntax for the application will be
private void btnSearch_Click(object sender, System.EventArgs e)
{
// Declare parameters here
SAPProxy1 proxy = new SAPProxy1();
try
{
proxy.Connection =
SAP.Connector.SAPLoginProvider.GetSAPConnection(this);
// Call methods here
proxy.Rfc_Customer_Get("", txtCust.Text, ref brfcknA1Table1);
// Now update Data Bindings. On WinForms this will be automatic, on
// WebForms call the following line
this.DataBind();
}
catch(Exception ex)
{
// If SAPLoginProvider.GetSAPConnection(this) cannot get a connection,
// we might get an error.
// Normally this can be ignored as it will automatically will force a
// relogon.
}
}
12. Build and run the application.
The browser window opens and you are redirected to your SAPLogin1.aspx login page.
13. Enter connection data (for example user, password and client).
If you select SAVE this login information will be stored as an encrypted cookie on your computer and will provide an alternative single sign-on capability the next time you wish to access the site. If you do not select SAVE, the login information will still be saved in the ASP .NET session state but will be lost once the browser is closed.
14. Enter a search argument, for example A* in the Textbox field and choose Search. Thus we create an ASP.NET Application using Visual Studio .NET using Proxy classes to connect to the server and Binding the DATA GRID. Your application connects to the SAP System and displays the requested data in the Data Grid.


6.0 Using the SAP Java Connector


SAP’s new Java middleware, the SAP Java Connector (JCO) allows customers and partners to easily build SAP-enabled components in Java. JCO supports both inbound (Java calls ABAP) and outbound (ABAP calls Java) calls in desktop and server applications.


In this Sample Program we connect to SAP and call two BAPIs.


Import statements: Any program using JCO should contain the following import statement:

import com.sap.mw.jco.*;

Otherwise, you have to fully qualify each class and interface which is very inconvenient.

Connecting to SAP

JCO.Client mConnection;
A connection (or session) with SAP is handled by class JCO.Client
try

{ mConnection =

JCO.createClient("400", //

SAP client "c3026902", // userid

"********", // password

"EN", // language

"iwdf5020", // host name

"00"); // system number

mConnection.connect();

}

catch (Exception ex) {

ex.printStackTrace();

System.exit(1);

}
"A Client object is created via a call to createClient(). You can use a specific application server (as in the above code) or a server group (load balancing)." REFER the JCO Javadoc for the overloaded createClient() method for the latter possibility.


"The Client class's connect () method tries to log on to SAP. If that fails for any reason, an exception is thrown. If the call succeeds, we can now stay connected for as long as we like. When we are done, we can call disconnect () to explicitly log off."

No comments:

counter customizable free hit