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 purchase-related documents in SAP Business One. Specifically, for the Purchase Quotation resource and the Update operation, it allows users to update an existing purchase quotation by specifying its unique identifier (DocEntry) and providing the updated data in JSON format.

Common scenarios where this node is beneficial include:

  • Automating updates to purchase quotations based on external triggers or workflows.
  • Synchronizing purchase quotation data from other systems into SAP Business One.
  • Modifying details such as pricing, quantities, or supplier information in purchase quotations programmatically.

Practical example:

  • A procurement system detects a change in supplier pricing and uses this node to update the corresponding purchase quotation in SAP Business One automatically.

Properties

Name Meaning
DocEntry The unique identifier of the purchase quotation to update.
JSON Body The JSON content representing the fields and values to update in the purchase quotation.

Output

The node outputs the JSON response returned by the SAP Service Layer after attempting to update the purchase quotation. This typically includes the updated purchase quotation object or an error message if the update failed.

The output structure is:

{
  "json": {
    // Updated purchase quotation data as returned by SAP Service Layer
  },
  "pairedItem": {
    "item": <index_of_input_item>
  }
}

No binary data output is produced by this operation.

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.
  • The SAP Service Layer API must be accessible and properly configured to accept requests from n8n.

Troubleshooting

  • Authentication errors: If login fails, verify that the provided credentials (username, password, company DB) are correct and that the SAP Service Layer endpoint is reachable.
  • Invalid DocEntry: Ensure the DocEntry corresponds to an existing purchase quotation; otherwise, the update will fail.
  • Malformed JSON Body: The JSON body must conform to the expected schema for purchase quotations in SAP Business One. Invalid or incomplete JSON may cause errors.
  • Network issues: Connection problems or SSL certificate issues can cause request failures. The node disables strict SSL verification (rejectUnauthorized: false), but network connectivity must still be ensured.
  • Error messages: Errors returned from SAP Service Layer are included in the output JSON under an error field. Review these messages for specific causes.

Links and References

Discussion