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 purchase-related documents in SAP Business One. Specifically, for the Purchase Order resource and the Create Cancellation operation, it creates a cancellation document for an existing purchase order identified by its unique document entry number (DocEntry). This is useful when you need to programmatically cancel purchase orders within your SAP system via n8n workflows.

Typical use cases include:

  • Automating cancellation of purchase orders based on external triggers or business rules.
  • Integrating SAP purchase order cancellations into broader ERP or supply chain automation processes.
  • Reducing manual effort and errors by handling cancellations through automated workflows.

Properties

Name Meaning
DocEntry The unique identifier (number) of the purchase order to create a cancellation document for. It specifies which purchase order will be cancelled.

Output

The node outputs the JSON response returned by the SAP Service Layer API after attempting to create the cancellation document. This typically includes details about the newly created cancellation document or error information if the operation failed.

The output structure is:

{
  "json": {
    // Response data from SAP Service Layer for the cancellation creation
  },
  "pairedItem": {
    "item": <index_of_input_item>
  }
}

No binary data output is produced by this operation.

Dependencies

  • Requires connection to an SAP Business One Service Layer instance.
  • Needs credentials including base URL, username, password, and company database name to authenticate against the SAP Service Layer.
  • The node performs a login request to obtain session cookies used in subsequent API calls.
  • The SAP Service Layer must support the POST /PurchaseOrders({DocEntry})/CreateCancellationDocument endpoint.

Troubleshooting

  • Authentication Errors: If login fails, verify that the SAP Service Layer URL, username, password, and company database are correct and that the user has sufficient permissions.
  • Invalid DocEntry: If the specified DocEntry does not exist or is invalid, the API will return an error. Confirm the document number before running the node.
  • API Endpoint Not Found: Ensure the SAP Service Layer version supports the cancellation creation endpoint for purchase orders.
  • Network Issues: Check connectivity to the SAP Service Layer server and ensure no firewall or SSL issues block requests.
  • Error Messages: The node returns error messages from the SAP API in the output JSON under the error field. Use these messages to diagnose issues.

Links and References


This summary focuses exclusively on the Purchase Order resource and the Create Cancellation operation as requested.

Discussion