SAP Service Layer (Purchases) icon

SAP Service Layer (Purchases)

Todas las entidades de Purchases de SAP Service Layer

Overview

This node interacts with the SAP Service Layer to manage Purchase Orders and other related purchase entities. Specifically, for the Purchase Order resource with the Get by Key (Select) operation, it retrieves a single purchase order identified by its unique key (DocEntry) and allows selecting specific fields to return.

This is useful when you want to fetch detailed information about a particular purchase order from SAP but only need certain fields rather than the entire record, optimizing data transfer and processing.

Practical example:
You have a purchase order number and want to retrieve just the supplier code and total amount without fetching all details. Using this node with the "Get by Key (Select)" operation, you specify the DocEntry of the purchase order and set the Select property to "CardCode,DocTotal". The node returns only those fields.


Properties

Name Meaning
DocEntry The unique identifier (number) of the purchase order to retrieve. Required.
Select Comma-separated list of fields to return from the purchase order (used as OData $select).

Output

  • The output is a JSON object representing the purchase order data retrieved from SAP.
  • The structure depends on the fields requested in the Select property; only those fields will be present.
  • If an error occurs during the request, the output JSON contains an error field with the error message.
  • No binary data output is produced by this operation.

Example output JSON snippet (assuming Select = "DocEntry,CardCode,DocTotal"):

{
  "DocEntry": 123,
  "CardCode": "V1000",
  "DocTotal": 1500.00
}

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 POST request to obtain session cookies used for subsequent requests.
  • No additional external dependencies beyond the SAP Service Layer API and valid credentials.

Troubleshooting

  • Authentication errors:
    If login fails, check that the base URL, username, password, and company database are correct and that the SAP Service Layer is accessible.

  • Invalid DocEntry:
    If the specified DocEntry does not exist, the SAP API will return an error. Verify the purchase order number is valid.

  • Incorrect Select fields:
    Specifying invalid or misspelled field names in the Select property may cause the API to reject the request or return incomplete data. Confirm field names against SAP documentation.

  • Network or SSL issues:
    The node disables strict SSL verification (rejectUnauthorized: false). If you encounter network errors, ensure connectivity and consider certificate trust settings.

  • Error messages in output:
    Errors are returned in the output JSON under the error key. Review these messages to diagnose issues.


Links and References

Discussion