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 API specifically for managing purchase-related entities. The "Purchase Return" resource with the "Get by Key (Select)" operation allows users to retrieve a specific purchase return document identified by its unique key (DocEntry). Additionally, it supports selecting specific fields to be returned, optimizing data retrieval by limiting the response to only necessary information.

Common scenarios where this node is beneficial include:

  • Fetching detailed information about a particular purchase return document for auditing or processing.
  • Retrieving only certain fields of a purchase return to reduce payload size and improve performance.
  • Integrating SAP purchase return data into workflows that require selective data extraction.

Practical example:

  • A user wants to get the total amount and vendor code of a purchase return with DocEntry 1234. They specify DocEntry as 1234 and Select as "DocTotal,CardCode" to fetch only those fields.

Properties

Name Meaning
DocEntry The unique identifier (number) of the purchase return document to retrieve.
Select Comma-separated list of fields to return from the purchase return document (used as $select in OData query). Example: "DocEntry,CardCode,DocTotal"

Output

The output is a JSON object representing the purchase return document retrieved from the SAP Service Layer API. The structure depends on the selected fields specified in the Select property; if no selection is made, the full document is returned.

Example output JSON snippet when selecting specific fields:

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

If the node encounters an error during the request, the output JSON will contain an error field with the error message.

The node does not output binary data.

Dependencies

  • Requires connection credentials to the SAP Service Layer API, including:
    • Base URL of the SAP Service Layer.
    • Username and password for authentication.
    • Company database name.
  • The node performs a login POST request to obtain session cookies used for subsequent API calls.
  • No additional external dependencies beyond the SAP Service Layer API and valid credentials.

Troubleshooting

  • Authentication errors: If login fails, verify 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 API may return a 404 or similar error. Confirm the document key is valid.
  • Malformed Select string: Ensure the Select property contains valid field names separated by commas without extra spaces or invalid characters.
  • Network issues: Connection timeouts or SSL errors can occur if the SAP Service Layer endpoint is unreachable or has certificate issues. Check network connectivity and SSL settings.
  • API permission issues: The authenticated user must have sufficient permissions to read purchase return documents.
  • Error messages returned in the output's error field should be reviewed to diagnose specific problems.

Links and References

Discussion