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 Invoice resource and the Delete operation, it allows users to delete a purchase invoice identified by its unique document entry number (DocEntry). This is useful in scenarios where a purchase invoice needs to be removed from the system due to errors, cancellations, or other business reasons.
Practical examples include:
- Automatically deleting erroneous purchase invoices during data synchronization.
- Cleaning up test or temporary purchase invoices created during automated workflows.
- Removing purchase invoices that have been superseded or invalidated.
Properties
| Name | Meaning |
|---|---|
| DocEntry | The unique identifier (number) of the purchase invoice to delete. |
Output
The node outputs a JSON object representing the response from the SAP Service Layer after attempting to delete the specified purchase invoice. Typically, this will contain confirmation of deletion or an error message if the operation failed.
If the deletion is successful, the output JSON usually contains status information confirming the removal. If there is an error (e.g., the DocEntry does not exist), the output JSON will contain an error field with the error message.
No binary data output is produced by this operation.
Example output on success:
{
"Message": "Document deleted successfully"
}
Example output on error:
{
"error": "Document not found"
}
Dependencies
- Requires connection to an SAP Business One Service Layer endpoint.
- Requires 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 be accessible from the n8n environment.
- No additional external dependencies beyond the SAP Service Layer API and valid credentials.
Troubleshooting
Common issues:
- Invalid or missing
DocEntry: Ensure theDocEntrycorresponds to an existing purchase invoice. - Authentication failures: Verify that the provided SAP credentials are correct and have sufficient permissions.
- Network connectivity: Confirm that the SAP Service Layer endpoint is reachable from n8n.
- Session expiration: The node logs in at each execution, but long-running workflows might require re-authentication.
- Invalid or missing
Common error messages:
"Document not found": The specifiedDocEntrydoes not exist; verify the ID."Unauthorized"or authentication errors: Check credentials and user permissions."Connection refused"or timeouts: Check network access and SAP Service Layer availability.
Resolving these typically involves verifying input parameters, credentials, and network settings.
Links and References
- SAP Business One Service Layer Documentation
- SAP Service Layer API Reference
- n8n Documentation on HTTP Request Node (for understanding underlying HTTP requests)