SAP Service Layer (Purchases) icon

SAP Service Layer (Purchases)

Todas las entidades de Purchases de SAP Service Layer

Overview

This node integrates with the SAP Service Layer to manage various purchase-related documents in SAP Business One. Specifically, for the Purchase Invoice resource and the Reopen operation, it allows users to reopen a previously closed or canceled purchase invoice by its unique identifier (DocEntry). This is useful in scenarios where a purchase invoice needs to be reactivated for further processing or correction after being closed.

Practical examples include:

  • Reopening a purchase invoice that was mistakenly closed before final approval.
  • Reactivating a canceled purchase invoice to correct errors or update details.
  • Automating workflows that require toggling the status of purchase invoices based on business rules.

Properties

Name Meaning
DocEntry The unique numeric identifier of the purchase invoice to reopen. Required for this operation.

Output

The node outputs JSON data representing the response from the SAP Service Layer API after attempting to reopen the purchase invoice. The structure typically includes the updated purchase invoice object or an error message if the operation fails.

Example output JSON structure (simplified):

{
  "DocEntry": 123,
  "DocStatus": "Open",
  "CardCode": "C0001",
  "DocTotal": 1000.00,
  ...
}

If an error occurs, the output JSON will contain an error field with the error message:

{
  "error": "Error message describing what went wrong"
}

The node does not output binary data.

Dependencies

  • Requires connection to an SAP Business One Service Layer endpoint.
  • Needs credentials including base URL, username, password, and 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

  • Common issues:

    • Invalid or expired credentials causing login failure.
    • Incorrect DocEntry value leading to "not found" errors.
    • Network connectivity problems preventing access to the SAP Service Layer.
    • Insufficient permissions for the user to perform the reopen operation.
  • Common error messages:

    • "Unauthorized" or "Login failed": Check credentials and ensure they are correct.
    • "Document not found": Verify the DocEntry corresponds to an existing purchase invoice.
    • "Operation not allowed": Confirm the document can be reopened (e.g., it is currently closed or canceled).
    • "Network Error": Ensure the SAP Service Layer URL is reachable and no firewall blocks exist.
  • Resolution tips:

    • Double-check all credential fields and test connectivity outside n8n if possible.
    • Validate the DocEntry input carefully.
    • Review SAP Business One user permissions related to purchase invoice management.
    • Enable detailed logging in n8n to capture full error responses for diagnosis.

Links and References

Discussion