SAP Service Layer (Purchases) icon

SAP Service Layer (Purchases)

Todas las entidades de Purchases de SAP Service Layer

Overview

This node integrates with the SAP Service Layer to manage various purchase-related entities, specifically here focusing on the Purchase Return resource with the Create operation. It allows users to create new purchase return documents in SAP by sending a JSON payload representing the purchase return details.

Common scenarios where this node is beneficial include automating the creation of purchase return records as part of procurement workflows, handling returns of goods to suppliers, or integrating external systems that trigger returns based on business logic.

For example, a company receiving defective goods can automatically generate a purchase return document in SAP by providing the necessary data via this node, streamlining the return process and ensuring accurate record-keeping.

Properties

Name Meaning
JSON Body The JSON content sent as the request body to create the purchase return document. This should contain all required fields and values according to SAP's Purchase Returns API schema.

Output

The node outputs an array of JSON objects corresponding to each input item processed. Each output item contains:

  • json: The response from the SAP Service Layer API after attempting to create the purchase return. This typically includes the created purchase return document details or error information if the request failed.
  • pairedItem: Metadata linking the output to the respective input item index.

If the creation is successful, the output JSON will contain the newly created purchase return document data as returned by SAP. If there is an error, the output JSON will contain an error field with the error message.

The node does not output binary data.

Dependencies

  • Requires connection credentials for the SAP Service Layer API, including:
    • Base URL of the SAP Service Layer endpoint.
    • Username and password for authentication.
    • Company database identifier.
  • The node performs a login request to obtain session cookies used for subsequent API calls.
  • No additional external dependencies beyond the SAP Service Layer API and valid credentials.

Troubleshooting

  • Authentication errors: If login fails, verify the provided username, password, and company database are correct and that the SAP Service Layer endpoint is reachable.
  • Invalid JSON Body: Ensure the JSON body matches the expected schema for creating a purchase return in SAP. Malformed or incomplete data will cause API errors.
  • Network issues: Connection problems or SSL certificate issues may cause request failures. The node disables strict SSL verification (rejectUnauthorized: false), but network connectivity must be stable.
  • API errors: The SAP Service Layer may return errors related to business rules (e.g., invalid document data, missing mandatory fields). Review the error messages returned in the output JSON to identify and fix these issues.

Links and References


This summary focuses on the "Purchase Return" resource and the "Create" operation, describing how the node sends a JSON payload to create a purchase return document in SAP via its Service Layer API.

Discussion