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 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})/Cancel POST 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 DocEntry number 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

Discussion