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, specifically here focusing on Purchase Credit Notes. The "Cancel" operation allows users to cancel an existing purchase credit note by specifying its unique identifier (DocEntry). This is useful in scenarios where a previously issued credit note needs to be invalidated or reversed due to errors, changes in transactions, or other business reasons.

Practical examples include:

  • Automatically cancelling a purchase credit note when a supplier issues a correction.
  • Integrating cancellation workflows into larger automated purchasing or accounting processes.
  • Managing document lifecycle states directly from n8n without manual intervention in SAP.

Properties

Name Meaning
DocEntry The unique identifier (number) of the Purchase Credit Note to cancel. Required for this operation.

Output

The node outputs the JSON response returned by the SAP Service Layer API after attempting to cancel the specified Purchase Credit Note. This typically includes confirmation of the cancellation or details about the updated document status.

If an error occurs during the request, the output JSON will contain an error field with the error message describing what went wrong.

No binary data output is produced by this operation.

Dependencies

  • Requires connection credentials to the SAP Service Layer API, including:
    • Base URL of the SAP Service Layer endpoint.
    • Username and password for authentication.
    • Company database name.
  • The node performs a login request to obtain session cookies used for subsequent API calls.
  • The SAP Service Layer must be accessible from the environment where n8n runs.
  • Proper permissions in SAP are required to perform cancellation operations on Purchase Credit Notes.

Troubleshooting

  • Authentication failures: If login credentials are incorrect or the SAP Service Layer is unreachable, the node will fail at the login step. Verify credentials and network connectivity.
  • Invalid DocEntry: Providing a non-existent or incorrect DocEntry will result in an error from the SAP API indicating the document was not found.
  • Permission errors: Insufficient user permissions in SAP may cause the cancellation request to be rejected.
  • API errors: Any other API-level errors will be returned in the output's error field. Review the error message for details.
  • Session handling: The node relies on session cookies obtained at login; if sessions expire or cookies are invalid, re-authentication is needed.

To resolve errors, ensure all input parameters are correct, credentials have sufficient rights, and the SAP Service Layer endpoint is properly configured and reachable.

Links and References

Discussion