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

SapFunction

The SapFunction is used to call a remote capable module function in SAP (e.g.: BAPIs).

Since a function call can return not only one data record, but several tables, there is the possibility to filter out the desired values via an SQLite query.

 

Attributes:

AttributeRequiredBeschreibung
IdYesUnique Id in the query tree. The Id should not have the name of a result table from the function return values.
DependsOnNoOptional dependency on one query node
FunctionYesFunction name
StatementNoSQLite query. The primary data set has the node ID as table name. The other result tables from the function call are taken over with the same name.
ParametersNoThe parameters expected by the function call. Implicit parameters can be passed. Only scalar parameters or another structure sublevel are supported.
ResultFiltersNoList of result processing

 

Examples

Determination of the posting period:
In the following example, the posting period is determined for a date. The node has a dependency on another node (Date), which in this case has a row with the value “2022-12-22” in the Today column.

--- !SapFunction
Id: Postingperiod
DependsOn: Date
Function: BAPI_COMPANYCODE_GET_PERIOD
Parameters:
  COMPANYCODEID: 2000
  POSTING_DATE: ${Today}
Statement: Select FISCAL_PERIOD as Period, FISCAL_YEAR as Year From Postingperiod

Result:

TodayPeriodYear
2022-12-22122022

 

Customer Search:

In the following example, a customer is searched for from an IDES system by specifying the email address and sales organization. The email address is passed as a structure parameter.

--- !SapFunction
Id: Customersearch
Function: BAPI_CUSTOMER_SEARCH
Parameters:
  PI_ADDRESS:
    INTERNET: mark.knopf@amsoso.de
  PI_SALESORG: 1000
  PI_SEARCH_FLAG: 1
Statement: Select PE_CUSTOMER as Customer from Customersearch

Result:

Customer
0000001360
Inhaltsverzeichnis