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 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})/CreateCancellationDocumentendpoint.
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
DocEntrydoes 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
errorfield. Use these messages to diagnose issues.
Links and References
- SAP Business One Service Layer Documentation
- SAP Service Layer API Reference - Purchase Orders (example link; check your SAP version)
- OData Query Options (for
$selectand$filterusage)
This summary focuses exclusively on the Purchase Order resource and the Create Cancellation operation as requested.