Anypoint Exchange

Home to the complete listing of connectors, templates, examples and APIs.
Discover and use proven assets built by the MuleSoft ecosystem, or add assets to a private
tenant of Anypoint Exchange for collaboration and sharing of internal best practices.

Learn more
Sign up
SAP Data Retrieval

SAP Data Retrieval

(1 review)

Illustrates how to use Mule Runtime to build a simple HTTP application using APIKit to fetch data from SAP. After reading this document, creating and running the example in Mule, you should be able to leverage what you have learned to create an HTTP request-response application that is able to retrieve requested data from your SAP instance.

This example can also be used while configuring any of our Anypoint SAP Templates for retrieving Customers / Materials / Sales orders data

Example

This application uses the APIKit Router component to route HTTP requests to the exact flow defined by resource and method. The application then prepares an XML request for the SAP connector using the HTTP input parameters. The response is then transformed to JSON and returned to the user.

Set Up and Run the Example

As with other examples, you can create template applications straight out of the box in Anypoint Studio. You can tweak the configurations of these use case-based examples to create your own customized applications in Mule.

Follow the procedure below to create, then run the SAP data retrieval application.

  1. Open the Example project in Anypoint Studio from Anypoint Exchange.
  2. Go to Global Elements and open SAP Connector element. Fill in your SAP credentials.
  3. Run the application.The APIKit console should start and you can choose which endpoint you want to call.
    • GET /customers - Returns customer data from a SAP instance according to the specified parameters. Users are able to define two HTTP query parameters - maxcount, name.
      • maxcount - Defines the maximum count of the retrieved customers.
      • name - Defines the String that the customer's name have to start with.
    • GET /materials - Returns materials data from SAP instance according the specified parameters. Users are able to define two HTTP query parameters - maxcount, name.
      • name - defining the String that the material's name have to start with
      • maxcount - Defines the maximum count of the retrieved materials.
    • GET /salesOrders - Returns sales orders data from SAP instance according the specified parameters. Users should define two HTTP query parameters -customernumber, salesorganization
      • customernumber - Specifies the customer number for sales orders.
      • salesorganization - Specifies the sales organization for sales orders.
  4. Click the resource which you want to use, specify the parameters and click the GET button.
  5. The retrieved data structure appears. If the data in SAP instance does not match your criteria, "No data found" message is returned.

Reviews

Download
Log into Anypoint Platform to download this asset

Overview

Type
Example
Created by
MO
MuleSoft Organization
Published onJun 22, 2017

Versions

VersionRuntime version
1.4.13.x
1.3.53.7