Wie können wir Ihnen helfen?
< Zurück
Drucken

EmbedQuery

The EmbedQuery filter executes a separate query tree for each incoming row and appends the result in a new column as a record.

This makes it possible, for example, to obtain the position data for a table variable. In the results area of the suxxesso Data Manager, the corresponding sub-data set can be displayed by clicking on the blue text.

 

Attention:
Since the subtree is executed for each row, long query times may occur if the calling node returns many rows. It is recommended to limit the number of rows during editing.

 

Attributes:

AttributeRequiredDesscription
QueryYesId of the target node of the subtree to be executed
NewColumnNameNoAlternative column name. By default, the node id specified in Query is taken as the column name.
ParametersNoList of column names that are provided as Implicit parameters. By default, all columns are available as parameters.

 

Example

In this example, the items for a document number are searched for from the tables for material orders (EKKO, EKPO). First, 2 document numbers are retrieved from EKKO. The document numbers are used via an implicit parameter in the Positions query node.

--- !SapQuery
Id: Head
Select: EKKO~EBELN
From: EKKO
QueryLimit: 2
ResultMapping:
  - EKKO~EBELN~Document
ResultFilters:
  - EmbedQuery:
      Query: Positions
 
--- !SapQuery
Id: Positions
Select: EBELP TXZ01 MENGE
From: EKPO
Where: EBELN = '${Document}'
ResultMapping:
  - EKPO~EBELP~Position
  - EKPO~TXZ01~Material
  - EKPO~MENGE~Amount

Result:

DocumentPositions
3000000004Position Material     Amount
1       Desk Pads   1,000
2       Mouse Pads 1,000
3000000005Position Material                 Amount
1       IDES Consumer Products/IDES 1,000
2       IDES Consumer Products/IDES 1,000

Inhaltsverzeichnis