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, specifically here focusing on updating a Purchase Credit Note. The "Update" operation allows users to modify an existing Purchase Credit Note by specifying its unique identifier (DocEntry) and providing the updated data in JSON format.

Common scenarios for this node include:

  • Adjusting details of a Purchase Credit Note after it has been created, such as correcting amounts, dates, or line items.
  • Automating updates to credit notes based on external triggers or workflows.
  • Synchronizing changes from other systems into SAP Business One via the Service Layer API.

Practical example:

  • A company receives a corrected invoice from a supplier and needs to update the corresponding Purchase Credit Note in SAP automatically. Using this node, they provide the DocEntry of the note and the new data in JSON, and the node sends the update request to SAP.

Properties

Name Meaning
DocEntry The unique identifier (number) of the Purchase Credit Note to update. Required.
JSON Body The JSON content representing the fields and values to update in the Purchase Credit Note.

Output

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

The output structure is:

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

No binary data is produced by this node.

Dependencies

  • Requires connection credentials to the SAP Service Layer API, including:
    • Base URL of the SAP Service Layer endpoint.
    • Username and password for authentication.
    • Company database name.
  • The node performs a login request to obtain session cookies used for subsequent API calls.
  • The SAP Service Layer must be accessible from the n8n environment.

Troubleshooting

  • Authentication errors: If login fails, verify that the base URL, username, password, and company database are correct and that the SAP Service Layer is reachable.
  • Invalid DocEntry: Providing a non-existent or incorrect DocEntry will cause the update to fail. Confirm the ID corresponds to an existing Purchase Credit Note.
  • Malformed JSON Body: Ensure the JSON body contains valid fields and data types expected by the SAP Service Layer for Purchase Credit Notes.
  • Network issues: Connection timeouts or SSL errors may occur if the SAP Service Layer endpoint is unreachable or uses self-signed certificates. The node disables strict SSL verification but network connectivity must be stable.
  • Error messages returned in the output JSON under error field should be reviewed to understand specific API-level problems.

Links and References

Discussion