Actions88
- Purchase Credit Note Actions
- Purchase Invoice Actions
- Purchase Delivery Note Actions
- Purchase Down Payment Actions
- Purchase Order Actions
- Purchase Quotation Actions
- Purchase Request Actions
- Purchase Return Actions
- Purchase Tax Invoice Actions
Overview
This node integrates with the SAP Service Layer to manage various purchase-related documents, including Purchase Requests. Specifically, the "Create Cancellation" operation for Purchase Requests allows users to create a cancellation document for an existing purchase request identified by its unique document entry number (DocEntry). This is useful in scenarios where a purchase request needs to be formally canceled within SAP, ensuring proper tracking and compliance.
Practical examples:
- Automatically cancel a purchase request when a related business process is aborted.
- Integrate cancellation workflows from external systems into SAP via n8n.
- Batch cancel multiple purchase requests based on certain criteria.
Properties
| Name | Meaning |
|---|---|
| DocEntry | The unique identifier (number) of the purchase request document to create a cancellation for. |
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.
Output structure example (simplified):
{
"DocEntry": 12345,
"CancellationStatus": "Created",
"Message": "Cancellation document successfully created."
}
If an error occurs, the output JSON will contain an error field with the error message.
Dependencies
- Requires connection credentials to the SAP Service Layer API, including:
- Base URL of the SAP Service Layer.
- Username and password for authentication.
- Company database name.
- 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 that the SAP Service Layer base URL, username, password, and company database are correct and that the user has sufficient permissions.
- Invalid DocEntry: Providing a non-existent or incorrect
DocEntrywill result in an error from the SAP API. Confirm the document ID exists before attempting cancellation. - Network issues: Ensure the SAP Service Layer endpoint is reachable from the n8n instance and that SSL certificates are valid or properly handled.
- API errors: The node returns error messages from the SAP API in the output JSON under the
errorkey. Review these messages to understand issues such as invalid operations or missing data.
Links and References
- SAP Business One Service Layer Documentation
- SAP Service Layer API Reference (example link; check your SAP version)
- n8n HTTP Request Node Documentation (for understanding underlying HTTP calls)