Actions88
- Purchase Credit Note Actions
- Purchase Invoice Actions
- Purchase Delivery Note Actions
- Purchase Down Payment Actions
- Purchase Order Actions
- Purchase Quotation Actions
- Purchase Request Actions
- Purchase Return Actions
- Purchase Tax Invoice Actions
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
Selectproperty; only those fields will be present. - If an error occurs during the request, the output JSON contains an
errorfield 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 specifiedDocEntrydoes 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 theSelectproperty 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 theerrorkey. Review these messages to diagnose issues.
Links and References
- SAP Business One Service Layer Documentation
- OData Query Options (for
$selectusage) - n8n Documentation on Creating Custom Nodes