SAP Data Retrieval

(1 review)

home

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 - max_count, name.
      • max_count - 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 - max_count, name.
      • name - defining the String that the material's name have to start with
      • max_count - 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 -customer_number, sales_organization
      • customer_number - Specifies the customer number for sales orders.
      • sales_organization - 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

TypeExample
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onSep 6, 2018
Asset overview

Asset versions for 2.1.x

Asset versions
VersionActions
2.1.4

Categories

Products
SAPNo values left to add