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, including Purchase Tax Invoices. Specifically, for the Purchase Tax Invoice resource and the Cancel operation, it sends a request to cancel an existing purchase tax invoice identified by its DocEntry. This is useful in scenarios where a previously recorded tax invoice needs to be invalidated or reversed due to errors, changes in the transaction, or compliance reasons.

Practical examples:

  • Automatically cancel a purchase tax invoice when a related purchase order is voided.
  • Integrate cancellation workflows into your ERP automation to maintain accurate financial records.
  • Use in audit processes to programmatically reverse incorrect tax invoices.

Properties

Name Meaning
DocEntry The unique identifier (number) of the purchase tax invoice document to be canceled.

Output

The node outputs a JSON object representing the response from the SAP Service Layer API after attempting to cancel the specified purchase tax invoice. This typically includes confirmation details or error information.

If the cancellation is successful, the output JSON will contain the updated state of the purchase tax invoice or a success message.

If an error occurs, the output JSON will include an error field with the error message describing what went wrong.

No binary data output is produced by this operation.

Example output on success (simplified):

{
  "DocEntry": 123,
  "Canceled": true,
  "Message": "Purchase tax invoice canceled successfully."
}

Example output on error:

{
  "error": "Document not found or already canceled."
}

Dependencies

  • Requires connection to an SAP Service Layer instance.
  • Needs credentials including base URL, username, password, and company database name.
  • The node performs login to SAP Service Layer to obtain session cookies before making API calls.
  • No additional external dependencies beyond the SAP Service Layer API and valid credentials.

Troubleshooting

  • Common issues:

    • Invalid or missing DocEntry: Ensure the document number exists and is correct.
    • Authentication failures: Verify that the provided SAP credentials are correct and have sufficient permissions.
    • Network or SSL errors: Check connectivity to the SAP Service Layer endpoint and SSL certificate validity.
    • Document state errors: Attempting to cancel a document that is already canceled or closed may result in errors.
  • Error messages and resolutions:

    • "Document not found": Confirm the DocEntry value corresponds to an existing purchase tax invoice.
    • "Unauthorized" or "Authentication failed": Recheck credentials and user permissions.
    • "Cannot cancel document in current status": The document might be in a state that disallows cancellation; verify document status in SAP.
    • "Network Error": Ensure the SAP Service Layer URL is reachable and no firewall blocks exist.

Links and References


This summary focuses on the Purchase Tax Invoice resource and the Cancel operation as requested, based on static analysis of the provided source code and property definitions.

Discussion