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, including Purchase Requests. Specifically, for the "Delete" operation on a Purchase Request, it sends a DELETE HTTP request to remove a purchase request identified by its unique document entry number (DocEntry). This is useful in scenarios where you need to programmatically delete purchase requests from SAP Business One via n8n workflows.

Practical examples:

  • Automatically deleting obsolete or erroneous purchase requests.
  • Cleaning up test data after automated testing.
  • Integrating with other systems that trigger deletion of purchase requests based on business rules.

Properties

Name Meaning
DocEntry The unique identifier (document entry number) of the purchase request to be deleted.

Output

The node outputs a JSON object representing the response from the SAP Service Layer API after attempting the deletion. If successful, this typically contains confirmation details or an empty response indicating the resource was deleted. In case of failure, the output JSON includes an error field with the error message describing what went wrong.

Example output on success might be an empty object {} or a confirmation message. On error:

{
  "error": "Error message describing the issue"
}

No binary data output is produced by this operation.

Dependencies

  • Requires connection to SAP Service Layer with valid credentials: base URL, username, password, and company database name.
  • The node performs a login POST request to obtain session cookies used for subsequent API calls.
  • The SAP Service Layer API must be accessible from the environment where n8n runs.
  • Requires an API key credential or equivalent authentication configured in n8n to provide these SAP credentials securely.

Troubleshooting

  • Authentication errors: If login fails, check the SAP credentials (username, password, company DB) and network connectivity to the SAP Service Layer.
  • Invalid DocEntry: If the specified DocEntry does not exist or is incorrect, the API will return an error. Verify the document entry number before running the node.
  • Permission issues: Ensure the SAP user has sufficient permissions to delete purchase requests.
  • Network/SSL issues: The node disables SSL verification (rejectUnauthorized: false) which may cause warnings; ensure your SAP Service Layer endpoint is reachable and properly secured.
  • API errors: Any API error messages are returned in the output JSON under the error key. Use these messages to diagnose issues such as locked documents, dependencies preventing deletion, or invalid states.

Links and References


This summary focuses on the "Delete" operation for the "Purchase Request" resource as requested.

Discussion