Chapter 7. Bringing Services to Life with SAP NetWeaver

In This Chapter

  • Understanding services and the service repository

  • Looking over WSDL, the language of services

  • Taking a modeling approach to development

  • Understanding patterns and frameworks

  • Exploring modeling tools

Two big goals of enterprise computing today are to reduce the cost of your standard business processes and to enable you to launch business innovations with a lower investment. To do that, you have to find a bridge from technology to business strategy. That's where SAP NetWeaver comes in.

SAP NetWeaver is the technological underpinning of mySAP ERP.

Understanding exactly how SAP NetWeaver allows you to model business processes and define services that get your work done is important to your understanding of the potential of ERP.

In this chapter, you read all about how services are stored, organized, named, and assembled into solutions. You also discover some of the techie aspects of creating services, namely something called Web Service Description Language (WSDL), which is the language used to build services. Finally, we explore an approach to applications development called modeling.

Working with Services

As you may have gathered by now, ESA-enabled ERP is all about services. In the following sections, we dig into the concept of where your local services are "kept." Services are not just kept in your own enterprise system; services are universal. If you want to find a service offered by someone else (such as a business partner like a bank or shipping company), you need to understand how all services are named and have an understanding of how services are organized.

A home for services: The service repository

Deep within SAP NetWeaver lies the service repository, where all services live. It's like a dormitory for services. The repository can hold thousands of services related to ERP and your business processes. mySAP ERP 2005 shipped with a few hundred services, and there will be hundreds more in early 2006. Because you just can't get enough services, even more will follow in years to come for ERP, mySAP CRM, mySAP SCM, and so on.

Finding a service with solution maps

When you talk about getting an ERP solution, the discussion doesn't start with technology such as ESA and SAP NetWeaver. It starts by looking at your business objectives. From there, you need to define the business processes that support those objectives and then identify the services that support those processes.

To help you get from the business process to an individual service and even to the technical specification of that service (the so-called Web Service Description Language), SAP provides you with business scenario-driven industry solution maps (see Figure 7-1). These maps outline the processes in a solution (such as ERP or CRM) or the processes in an industry (such as chemicals or the public sector).

Here's an example. Say that your business needs better financial information about its customers. You want to create a simple Web page where the customer service representative can enter the customer's name and get a list of the current balances on the customer's account, all credit notes issued to that customer, payments received, and so on.

The mySAP ERP Solution Map.

Figure 7-1. The mySAP ERP Solution Map.

Just where do you find the services to support this new application? Start with a solution map. This lays out all the business processes in an organization.

This example involves generic financials functionality, so the ERP Solution Map fits the bill. Figure 7-1 shows a solution map, which is created from within the Solution Composer.

Because you want financial information about your customer, you click the line labeled Financials. The solution map drills down to show the processes supported by the Financials functionality (see Figure 7-2).

The Financials functionality in mySAP ERP.

Figure 7-2. The Financials functionality in mySAP ERP.

All the financial information about your customer would be in Financial Accounting, and more specifically, in the general ledger. Click the General Ledger link, and a list of all the services available is displayed (see Figure 7-3).

List of services for General Ledger.

Figure 7-3. List of services for General Ledger.

In the list of services that are available under General Ledger, the following services that you need to complete your process are available

  • CustomerAccountCurrentBalanceQueryResponse service, which looks up a customer balance.

  • CustomerAccountBalancedItemsQueryResponse, which lists the clearing transactions made to a customer account in a given period. Clearing entries (for example, payments) and the items that they cleared (for example, invoices or credit memos) are displayed together.

Deducing the functionality of the services from the way they're named is pretty simple. In fact, the naming conventions for services are critical because they help you find and use the services.

Naming services

Naming services isn't quite like naming your bouncing baby girl. (What was Madonna's mother thinking?) On the contrary, the naming and design rules for ESA services are founded on a very solid rationale. With naming rules, you get

  • Efficient interaction with Solution Manager

  • Consistent inventory of services

  • Recognition of identical or similar services

  • Harmonization of service inventory

  • Maximized reusable services

The first step in defining a service is to look at the business requirement that drives the service. In this example, if you want to see the outstanding balance of a customer, the name of the transaction is CustomerAccountCurrentBalanceQueryResponse.

The CustomerAccountCurrentBalance part of the service name is fairly easy to understand, but what does QueryResponse mean? For each service, the naming reflects not only what you get but also how the service is used. In this example, the service sends a query and requires a response; hence QueryResponse.

Other services may provide a notification or actually perform a function such as change or add a new order to the system, so the service name would reflect that function.

Here's another example of how this service naming works. A Customer Credit Fact Sheet presents all credit- and collection-relevant customer data to the user at a glance. The Credit Fact Sheet may be needed, for example, by people in roles such as Sales Manager, Credit Manager, or Collection Clerk. The Credit Fact Sheet requires information from a credit management application, as well as information from accounting (specifically payment behavior, payment history, and sales volume).

The name of this service is CustomerCreditFactSheetQueryResponse, which could be broken down into more specific services: DunningLevelCustomerCreditFactSheetQueryResponse (in which dunning equals payment history, for the nonfinancial among you) and SalesVolumeCustomerCreditFactSheetQueryResponse, for example.

What's handy about this naming convention is that it expresses things in business terms, not programming terms. That makes services easy to locate and call from the services repository, whether you're an IT person or a guy sitting at a desk. It's another example of the way that mySAP ERP helps everybody around the water cooler speak the same language.

A Web Service Description Language Primer

In this section, we switch perspectives to that of the person who is setting up all of these services, rather than the person using them. To get into some of the more techie stuff about services, you need to see how services are called via the Web Service Description Language (WSDL). First, we tell you what WSDL is, and then we show you how it works.

WSDL revealed

Think of Web services as a flexible and configurable plug and socket for applications, just like the plug that you use to connect your computer to a wall outlet.

When one application wants to allow other applications to connect and access some of its functionality or data, it describes the way that its plug works by using a standard form called Web Service Description Language (WSDL). Other applications take a quick look at the description and then plug in.

After the connection is made, WSDL also describes commands that control the flow of information over the connection. The information moves back and forth as messages formatted in XML, a standard language that can describe almost any data format.

Like HTML and HTTP, Web services are based on a standard definition that is not controlled by any one company. That's one of the reasons that Web services became so popular so quickly. Another reason is that Web-service connections between applications are much cheaper to create and maintain than earlier approaches to making those same connections. Unlike some of those earlier methods, Web services are reusable, which means that one Web service can be used by any number of other applications. And, one application can provide many different Web services.

An example of WSDL in action

Here's how WSDL works with enterprise services on the nitty-gritty technical level. The pleasant surprise here is how relatively simple this all is, compared to previous application programming interfaces (APIs). That simplicity results from stating things in business parameters, rather than in programming code.

Note

A WSDL definition typically contains the following key pieces of information:

  • A description/format of the input messages.

  • The semantics of the message being passed to the underlying systems

  • A description/format of the output messages

  • The endpoint for the service, that is, the service's URL

Take a look at a very simple example. Say you are creating a service that allows customers to check the availability of a seat on a plane. First, you need to define the input criteria; in this case, this is the input the system needs in order to check the availability of a seat. The name of the service follows the standard naming convention, so it is called FlightSeatAvailabilityQuery_In.

Using the integration builder tool of SAP NetWeaver (see Figure 7-4), you can easily define the overall service.

Defining the overall service.

Figure 7-4. Defining the overall service.

Tip

Note in Figure 7-4 that there is a column labeled Namespace. Enterprise services are all grouped together in so-called namespaces, which are a closed set of names or a place where a set of names is stored. Namespaces are typically identified via a URL. You can use namespaces to resolve naming conflicts.

Namespaces are comparable to a directory in Windows that helps you organize files. In this example, a namespace called http://sap.com/xi/XI/Demo/Airline acts like a directory, available to any customer. You place a specific Web service in this namespace called FlightSeatAvailablityQuery.

So far, so good. So what's going on in the underlying code? There are three operations in this particular namespace (see Figure 7-5):

  • An input message, containing input parameters (the way you specify how to go about gathering data) for the operation.

  • An output message, containing output parameters (how you make the results of an operation available to users) for the operation.

  • A fault (no, we're not laying blame here), which describes what's returned in the case of an exception. In programmers' lingo, an exception is a problem or set of conditions that causes the microprocessor to stop in its tracks and use a different routine to deal with the problem.

Defining the input.

Figure 7-5. Defining the input.

You input an airline ID, the connection ID (the flight number), and the date of the flight. The exact formats are defined in the Type column (see Figure 7-6).

All this is easy to define; the difficult part is to convert this into WSDL. Using the WSDL tab shown in Figure 7-7, you can automatically generate the WSDL.

The output data.

Figure 7-6. The output data.

What becomes of this WSDL file? When someone wants to set up a system to use a service, he requests the WSDL file, which tells him the location of the service and the function calls, and how to access these calls. Then he uses the information in the WSDL file to form a SOAP (Simple Object Access Protocol) request to your computer.

WSDL is complex, and folks have developed numerous tools to create the WSDL files. Specifically, SAP has developed the integration builder tool of SAP NetWeaver to make the generation of this code as simple as possible.

The WSDL data.

Figure 7-7. The WSDL data.

Modeling with Enterprise Services

Modeling for computers has nothing to do with fashion and glamorous folks walking down runways. In computer terms, modeling refers to a whole new way to create applications that doesn't involve yards of spaghetti code. It's so simple, it makes the process practically child's play.

Modeling basics

Modeling means turning data sources, relationships, interface elements, and so on into visual objects and icons that you can move around a page. You can use modeling to manage the technical complexity underlying ERP functionality. Modeling describes what a program should do by defining relationships between simplified components, rather than piling up mounds of code. For a user-interface modeling system, for example, the components used for modeling might be buttons and text boxes. After the relationship between the components is described (or modeled), the description (called a model) is then used to generate the program.

Note

In most model-driven environments, a little traditional code has to be written here and there, but most of the application is generated by the model. This means that when it comes time to fix or improve the program, you have much less complexity and code to understand and maintain. Trust us: This is a huge leap forward in reducing your total cost of ownership (TCO). If you don't believe us, just ask your IT person. Plus, code generated by these tools tends to have fewer bugs and requires less upkeep than code written the old-fashioned way.

To institute a model-driven approach, SAP created a new programming model, along with the basic building blocks that programmers use to create programs. The new model bridges Enterprise Services Architecture and SAP NetWeaver so that programmers have a ready-made pattern for matching the way you design applications (Enterprise Services Architecture) with the tool you use to build them (SAP NetWeaver). The way that this new programming model comes to life is through the SAP Composite Applications Framework (SAP CAF), the SAP NetWeaver tool for building composite applications.

This programming model has its very own goals, which are to

  • Increase the use of modeling in application development to create relationships between services so that you can create applications automatically, instead of programming each one by hand. This speeds development and makes programs easier to change.

  • Increase the number of reusable components in an application. One set of tools would be used to manage master data in all applications, for example. You might create a tax engine to perform tax calculations. Commonly used functions could be carried out with shared components and standard approaches.

  • Use the portal as the interface for all products.

  • Accelerate user interface (UI) development by using patterns —reusable combinations of components and processes that appear over and over again when you're creating applications. Patterns are a great way to give programmers a head start in creating applications.

  • Employ business-process management tools to control and customize the behavior of programs. This means that you get a clearer separation between process control and business logic.

  • Use one nice, consistent approach across all applications to address such challenges as reporting, integrating desktop applications, and accessing data.

  • Adopt a single approach to storing all different kinds of data.

At its heart, this new programming model maximizes the amount of each program that is made up of reusable components, anticipates as many potential variables as possible, and provides a standard method for dealing with them. The result of such a model is a new kind of software that is far less costly to develop and far easier to change and maintain.

Patterns, models, and frameworks

A few decades of experience have shown how applications should be constructed. The way different types of software work, including many user interface designs, is fairly similar in key ways: They follow certain patterns.

Programmers have recognized this and developed so-called software patterns that work in concert with models and frameworks. Patterns, models, and frameworks — what the heck are those? Don't worry: In the following sections, we explain it all.

Starting with a pattern

Note

Think about the software programs you use every day. Many programs have menus along the top; you click the menu and a list of commands is displayed for you to choose from. These commonly occurring types of user interfaces are examples of patterns. The concept of patterns is really pretty simple. They provide a way to do something that includes general steps that are frequently the same, and specific choices that change based on the specific action.

Another example would be the search pattern: In a section of your application window is an area for your input. This could be a simple text box like the one displayed on a Google Web page or a more form-like structure, such as the one you use when you book your flight to Hawaii. You click a Search button to get your search results. When you know how to operate one search engine, you know how to use them all.

Patterns are a win-win deal: They make a programmer's job easier because there is less code to write, and they make users happy because the users know what to do in many situations and what results to expect.

SAP developments tools, such as the Composite Application Framework (CAF) or Visual Composer, simplify your life by making heavy use of patterns, especially in the area of user interfaces. A developer selects a pattern, which does most of the work of creating the application, and then fills in the details of the kind of field that each record should contain and how the information should be displayed.

Note

Putting models to work

Modeling is the second magic bullet that SAP provides for developers. It turns out that you can think of most applications as involving the basic elements of user interfaces, including roles, processes, objects, services, and, in the case of composite applications, underlying systems.

SAP allows developers to specify the behavior of an application by defining relationships between the elements. This means picking and choosing between high-level elements, such as roles or processes, and linking them to data. Then developers can link data to screens, and so on. (When we say high-level, we mean that these elements have a lot of functionality included in them already. This functionality is described and controlled by what is called metadata, which is a fancy way of saying data that describes what a program should do.)

The reason that this is called model-driven development is that the program is created by changing a description (metadata) of what the program should do. This metadata is used to generate the code that lies under the covers.

So how do patterns and models fit together? You can think of patterns as predefined models. If you look at the search pattern, you find that it has four elements: a UI (user interface) element for your input, a Search button, a data source that can be queried, and a UI list element where the results appear (also called output). The relationship between the four elements is predefined: When the button is clicked, the program gets the data from the input field(s) and sends it as a query to the data source, which returns a list of results that are handed over to the output element in the UI.

Note

Erecting a framework

OK, here's the next technical concept: An environment that enables you to do model-driven development and to use patterns is called a framework. A good example of such a framework is the SAP CAF.

To a developer, the SAP CAF is actually a big modeling environment that allows you to define a program in terms of a standard set of model elements that are grouped together into patterns. (Remember patterns, which we describe in the previous section?) Developing the application is generally much faster, and maintaining it is much cheaper because a model is usually easier to update than code.

In this discussion, we emphasize the use of patterns in the user interface. But it's important to recognize that patterns can be used at any level of the application where you discover a common structure. The way that certain parts of the application logic work, the way that data is retrieved from a database, or the way that processes are implemented may be done using patterns. Using process patterns, as it turns out, is one of the most productive ways to speed application development.

Visual Composer: The modeling whiz kid

Simply put, SAP NetWeaver Visual Composer enables you to happily drag and drop objects that represent data sources and interface elements to create content for a portal. Assume you're a manager who wants a personal portal page that displays the monthly sales totals for each salesperson on your team. Using Visual Composer, you simply drag a portal page into your work-space (called the storyboard) from an interface elements list. Then you fill that storyboard with contents from the sales information database. You can build queries without knowing a whit of query language, simply by assembling icons and elements from various lists.

Even if you're programming-phobic — say a business consultant, analyst, process expert, or writer of a For Dummies book — you can use SAP NetWeaver Visual Composer to make a diagram of just what you want a page to do. Then this clever application not only presents the content, but also creates iViews (reusable and configurable portions of a page in a portal) that come ready to be deployed. In a nutshell, SAP NetWeaver Visual Composer is about as easy as sketching out what you want on a napkin and getting it delivered to your desktop in minutes.

One of the chief benefits of this approach is that it dramatically reduces the amount of time that the IT department has to spend on content assembly and maintenance. Instead, this is left to the business experts. While these folks may not know the first thing about how to code, they completely understand the business process they're trying to model.

Tip

Entire business processes, and not just content, can be modeled in this way. Essentially, you can create multiple pages that track a process in depth by creating iViews and bundles of iViews on a similar theme (called business packages). No programming required.

Do-it-yourself modeling

Have you ever tried to buy something online and had something about your order that was really weird? Maybe you wanted the standard size but in an nonstandard color? Suddenly, the whole ordering process fell apart. That's because you asked the system to make an exception to all the preprogrammed guidelines somebody fed into it.

Traditionally, in technology-land, exceptions to a routine procedure you've predefined are hard to handle. ESA and SAP modeling tools, however, make exception handling much easier.

Here's an example. Say you ordered something within the Procure2Pay business process. When the package arrives, you open it, only to find that somebody shipped you the Jx-HHG69 rather than the Jx-HKG67. The next step in the system may be to submit the invoice, but you need to do something exceptional, namely, return the package and adjust the record in the system.

In the past, this would involve getting on the phone to somebody in purchasing, shipping, or accounting — or all three. With ESA and modeling tools, you can handle it all by putting together your own solution (which is referred to as WrongPackage2ReturnDelivery).

Using Visual Composer, you can

  • Browse the enterprise services that live in the services repository. In this example, the following services might come in handy: Purchase OrderDetailsByRequester, PurchaseOrderDetailsByTrackingNumber, ReturnGoodsReceipt, and GetReturnAddress.

  • Connect the services with easy-to-use UI templates.

  • Compile the whole shebang. Voila`! You've built your own solution that can be run in the SAP NetWeaver Portal.

ESA Is Open to Working with Other Tools

Because Web services offer open standards (meaning standards that have a publicly available set of specifications so they can be used by anybody), ESA is open, too. That openness allows it to work with a variety of non-SAP technologies quite happily.

Microsoft and SAP: Logical bedfellows

Microsoft is committed to open standards, just as SAP is. Microsoft has made some of its products open-source so that they can cozy right up to Web services. This makes several Microsoft products a perfect match for ESA-enabled ERP.

How Microsoft opened the door to open-source

Microsoft has made Office products open through something called IBF (Information Bridge Framework). A framework, in object-oriented developer-speak, is simply a reusable design structure that you can use to make building applications easier. The main goal of IBF is to make users of Office products more productive, which it does by allowing Office to consume (or use) Web services.

SAP provides Web services through its ESA-enabled ERP; IBF is what allows Office products to connect with ERP functions.

Mendocino closes the loop

Mendocino is a set of employee and manager self-service applications that connect Office and ERP. To help you understand how it works, here are some ways you might use Mendocino in your business:

  • Time management: You can use the Outlook calendar to streamline time reporting to an enterprise time-reporting program (see Figure 7-8).

  • Budget monitoring: This allows you to get SAP budget reports in your Outlook inbox and work with them offline. You can be proactively alerted to time-critical budget information.

  • Leave management: This lets you receive leave requests via your Outlook calendar.

  • Organization management: With this tool, you can get up-to-date info about employees via mySAP ERP HCM using Microsoft Office InfoPath forms. (InfoPath is a set of tools you can use to create dynamic forms that are used to gather and share data across your business processes.)

  • Personnel change requests: Reports can be sent from mySAP ERP HCM through Excel or Outlook to keep you up to date about promotions, bonuses, new positions, and more.

All the Office programs can be integrated with your enterprise applications and data. You can customize the Microsoft Research pane so that it is specific to your ERP-related data, for example. All Office applications have easy connectivity with e-mail to exchange documents. You can deliver business analytics through Excel and smart documents in Word.

Note

See Chapter 3 for more about Mendocino.

Visual Studio: One size fits all

SAP is a leader in several things, and one of them happens to be model-driven development.

Taking a peek at Project Mendocino.

Figure 7-8. Taking a peek at Project Mendocino.

Note

See the section "Modeling with Enterprise Services," earlier in this chapter, to refresh your memory about modeling.

Some folks use something called Unified Modeling Language (UML) as a general-purpose modeling language. It's the one-size-fits-all approach. But SAP chose to go with domain-specific languages expressed in eXtensible Markup Language (XML) to support various forms of automation. Domain-specific languages have built-in assumptions about the context of your application. For example, SAP models business applications, but other folks model computer games or telephone networks. Domain-specific languages are smarter. As a consequence, they offer a faster, less expensive, and more reliable approach to application development.

SAP uses domain-specific languages as the basis of its modeling tool, Visual Composer. The purpose of this is to model business applications powered by enterprise services.

PDF forms

Adobe is another technology giant committed to open standards through Web services. This means that it's easy to use interactive PDF forms in the world of service-enabled ERP.

Specifically, SAP has integrated Adobe Interactive PDF forms into SAP NetWeaver. An application such as mySAP ERP HCM can use these electronic forms to submit requests and handle reporting. With Adobe Interactive PDF forms, you can stay in complete compliance with all the requirements established for paper forms. Electronic forms are easy to back up for recordkeeping, and you can e-mail them or use them from mobile devices.

Using these interactive forms, financial-services providers, for example, can easily create interactive loan applications complete with customer names and addresses, and even include mortgage rates based on the customer's credit score and geographic region. Applicants complete the forms at their convenience and return them. The digital forms then automatically update the enterprise's application with new information. This avoids costly and often error-prone manual data entry.

Using these virtual forms, your enterprise can get more efficient and reduce the total cost of SAP ownership. That's because you can leverage business-critical information in extended forms-based processes to

  • Reach customers with dynamic, personalized, intelligent processes in the common currency of business: forms and documents

  • Collaborate more effectively with partners and share information in forms and documents more securely and intelligently

  • Improve internal efficiencies through automated form processes

  • Provide an auditable form process history and help to ensure that documents aren't tampered with to meet demanding regulatory requirements

  • Maintain and protect document integrity through advanced user controls and document security

Note

You can read more about Adobe integration in Chapter 3.

Other Web service—compliant tools

Any development tool and programming language that can understand Web services can be used with ESA-enabled ERP. Of course, this means that your programmer won't get the full benefits provided by the SAP NetWeaver tools, but he can use the tool that's familiar and easy to use.

Tools from Microsoft, IBM, BEA, Borland, and Eclipse and programming languages including Java, C/C++, Visual Basic, C#, Python, PHP, and PERL are just some examples of this handy interoperability.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.62.105