Actions45
- Inventory Gen Entrie Actions
- Inventory Gen Exit Actions
- Inventory Transfer Request Actions
- Product Tree Actions
- Production Order Actions
Overview
This node interacts with the SAP B1 Service Layer 8 for production-related documents, specifically supporting operations on various resources including Inventory Gen Exit. The "Create Cancellation" operation allows users to create a cancellation document for an existing Inventory Gen Exit document identified by its DocEntry. This is useful in scenarios where an inventory exit needs to be reversed or voided due to errors, changes in stock movement, or business process adjustments.
Practical examples:
- Canceling an incorrect inventory exit that was recorded by mistake.
- Reversing an inventory exit due to returned goods or stock adjustments.
- Automating cancellation workflows in SAP B1 from n8n when certain conditions are met.
Properties
| Name | Meaning |
|---|---|
| DocEntry | The unique identifier (document entry number) of the Inventory Gen Exit document to cancel. |
Output
The node outputs JSON data representing the response from the SAP B1 Service Layer after attempting to create the cancellation document. The structure typically includes details about the newly created cancellation document or error information if the operation fails.
Example output JSON structure:
{
"DocEntry": 12345,
"DocumentStatus": "Cancelled",
"Message": "Cancellation document created successfully"
}
If an error occurs, the output JSON will contain an error field with the error message.
Dependencies
- Requires connection to SAP B1 Service Layer 8 API.
- Needs credentials including base URL, username, password, and company database name.
- The node performs login to SAP B1 Service Layer to obtain session cookies before making requests.
- Requires proper API authentication configured in n8n credentials.
Troubleshooting
- Authentication errors: Ensure the provided SAP B1 credentials (username, password, company DB) are correct and have sufficient permissions.
- Invalid DocEntry: If the specified DocEntry does not exist or is invalid, the API will return an error. Verify the document ID before running the node.
- Network issues: Connection failures may occur if the SAP B1 Service Layer URL is unreachable or SSL certificates are invalid. Check network connectivity and consider disabling strict SSL verification if necessary.
- Operation not supported: Using the "Create Cancellation" operation on unsupported resources or invalid document states may cause errors.
- Error messages: The node returns error messages from the SAP B1 API in the
errorfield of the output JSON. Review these messages to diagnose issues.
Links and References
- SAP Business One Service Layer Documentation
- SAP B1 Inventory Gen Exit Object Reference
- n8n HTTP Request Node Documentation (for understanding request handling)