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 Invoices. Specifically, for the Purchase Invoice - Cancel operation, it allows users to cancel an existing purchase invoice by specifying its unique identifier (DocEntry). This is useful in scenarios where a purchase invoice was created in error or needs to be invalidated due to changes in the purchasing process.
Practical examples:
- Automatically canceling a purchase invoice when a related order is canceled.
- Integrating cancellation workflows into larger automation processes to maintain accurate financial records.
- Reversing invoices that were mistakenly posted without manual intervention.
Properties
| Name | Meaning |
|---|---|
| DocEntry | The unique numeric identifier of the purchase invoice 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 invoice. This typically includes confirmation of the cancellation or details about any errors encountered.
The output structure is:
{
"json": {
// Response data from SAP Service Layer regarding the cancellation request
},
"pairedItem": {
"item": <index_of_input_item>
}
}
If the operation fails, the json field will contain an error property with the error message.
No binary data output is produced by this node.
Dependencies
- Requires connection to an SAP Service Layer instance.
- Needs credentials including base URL, username, password, and company database name.
- The node performs a login request to obtain session cookies before making API calls.
- The SAP Service Layer API must support the
/PurchaseInvoices({DocEntry})/CancelPOST endpoint.
Troubleshooting
- Authentication errors: If login fails, verify the provided credentials (username, password, company DB) and network connectivity to the SAP Service Layer.
- Invalid DocEntry: Ensure the
DocEntrynumber corresponds to an existing purchase invoice; otherwise, the API will return an error. - Permission issues: The user account used must have sufficient permissions to cancel purchase invoices.
- API endpoint errors: Confirm that the SAP Service Layer version supports the cancel operation on purchase invoices.
- Network or SSL errors: The node disables strict SSL verification (
rejectUnauthorized: false), but network issues or firewall restrictions may still block requests.
Common error messages are returned in the output's error field and should be reviewed to adjust inputs or environment accordingly.
Links and References
- SAP Business One Service Layer Documentation
- SAP Service Layer API Reference
- OData Protocol Overview (for understanding query options like
$selectand$filter)