PlantScanner - SAP Service Layer icon

PlantScanner - SAP Service Layer

Interact with SAP Service Layer API

Actions26

Overview

This node integrates with the SAP Service Layer API to manage and retrieve data related to various SAP resources. Specifically, for the Production Order resource with the Get All operation, it fetches multiple production order records from the SAP system. Users can apply OData filters, skip a number of records, select specific fields, and expand related entities in the response.

This node is beneficial in scenarios where you need to automate retrieval of production order data for reporting, synchronization with other systems, or monitoring manufacturing workflows. For example, a manufacturing company could use this node to pull all production orders created after a certain date or filter by warehouse code to analyze workload distribution.

Properties

Name Meaning
Filters An OData filter string to narrow down the returned production orders (e.g., WarehouseCode eq 'WH001' or CreationDate ge '2024-03-20'). Optional.
Skip Number of records to skip before starting to return results. Useful for pagination. Default is 0.
Select Comma-separated list of fields to include in the response. Leave empty to get all fields. Example: ItemCode, ItemName, PurchaseItem, SalesItem. Optional.
Expand Comma-separated list of related entities to expand in the response. Example: DocumentLines, Attachments2. Optional.

Output

The output is an array of JSON objects representing production orders retrieved from the SAP Service Layer. Each object contains fields corresponding to the selected properties or all fields if none were specified.

Example structure of one item in the output json field:

{
  "DocEntry": 12345,
  "Status": "Planned",
  "ItemCode": "PROD001",
  "Quantity": 100,
  "PlannedStartDate": "2024-06-01T00:00:00",
  "PlannedEndDate": "2024-06-10T00:00:00",
  ...
}

If the Expand property is used, related entities will be included as nested objects or arrays within each production order object.

The node does not output binary data.

Dependencies

  • Requires connection credentials to the SAP Service Layer API, including:

    • Base URL of the SAP Service Layer endpoint.
    • Company database name.
    • Username and password for authentication.
    • Optional language setting.
  • The node uses HTTPS requests with disabled SSL certificate verification (rejectUnauthorized: false) to communicate with the SAP Service Layer.

  • No additional external dependencies beyond standard HTTP client libraries bundled with n8n.

Troubleshooting

  • Failed to get session cookie: This error indicates that login to the SAP Service Layer failed, possibly due to incorrect credentials or network issues. Verify your API credentials and connectivity.

  • Operation not supported: If you specify an unsupported operation or resource, the node will throw an error. Ensure you select valid combinations.

  • OData filter syntax errors: Incorrectly formatted filter strings may cause the SAP API to reject the request. Validate your OData filter expressions carefully.

  • Empty or incomplete responses: Check if the Skip parameter is set too high or if filters exclude all records.

  • SSL certificate warnings: The node disables SSL verification; if your SAP server uses self-signed certificates, this avoids connection issues but consider security implications.

Links and References


This summary covers the static analysis of the node's execute method for the Production Order resource with the Get All operation, based on the provided source code and input property definitions.

Discussion