In this article
Overview
You can use this Snap to execute the SAP Business API (BAPI) with the given input data. The BAPI input schema and output schema must correctly map data into the SAP BAPI.
Snap Type
SAP Execute Snap is a Write-type Snap that writes data that is read from SAP.
Prerequisites
Have the SAP BASIS administrator setup the user to be used in the appropriate SAP clients with certain set of authorizations. To execute a BAPI as part of your application program, you must have the appropriate authorizations set up in respective master records. The documentation provided with the BAPI contains information about the required authorizations. Any attempts to execute a BAPI that fail as a result of insufficient authorization are reported back to the calling application.
Limitations and Known Issues
None.
Support for Ultra Pipelines
Works in Ultra Pipelines.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document | Min: 0 Max: 1 |
| Document that conforms to the input view schema of the Snap. The document attributes are matched to the SAP BAPI metadata, any matching attributes are provided to the BAPI program at execution, and any non-matching attributes are ignored. Only some BAPIs may be able to process without input. Refer to your BAPI documentation for the BAPIs that correctly processes with no input data. |
Output | Document | Min: 1 Max: 1 |
| Document which represents the record structure of the retrieved BAPI output definition. The documents are populated using the result data of each BAPI call for each document passed into this Snap. If the Snap has no input document, only one output document result is created. |
Error | Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab. Learn more about Error handling in Pipelines.
SAP BAPIs do not enforce standard error messaging, so error views of Snaps that immediately follow the SAP Execute Snap should be set to discard the error data and continue. Otherwise, your pipeline will not run. |
Snap Settings
Asterisk (*) - indicates a mandatory field.
Suggestion icon () - indicates a list that is dynamically populated based on the configuration.
Expression icon ( ) - indicates whether the value is an expression (if enabled) or a static value (if disabled).
Field Name | Field Type | Description |
---|---|---|
Label* | String | Specify a unique and meaningful name for the Snap. Default Value: SAP Execute |
BAPI List configuration | Use this field set to configure the list of BAPIs to return. This field set contains the following fields:
| |
BAPI List config key | Dropdown list | Select a key to configure the BAPI list that is being returned. The available options are:
Default Value: OBJECTTYPE |
BAPI List config value | String | Define a value to configure the BAPI list that is being returned. Learn more about object types Default Value: |
BAPI* | String/Expression/Suggestion | Specify the BAPI on the SAP server to be executed. This is the ABAP name. Default Value: N/A |
Start Stateful Call Sequence | Checkbox | Select this checkbox to create a stateful session for calling one (or more) BAPIs. You must use the Session ID if you want to create a stateful call sequence. Ensure to select this checkbox for the Snap where you define your first BAPI call in the Pipeline. Do not select the Commit after BAPI execute checkbox for this Snap, to extend the stateful session and call more BAPIs using this Pipeline (downstream to this Snap). 'Sequence' implies that the output from a BAPI call is needed for the next BAPI call to run. Default Value: Not selected |
Commit after BAPI execute | Checkbox | Select this checkbox to end the stateful session and commit when no exception is raised; else, the BAPI controls the commits. Ensure to select this checkbox for the Snap where you define your last BAPI call in the Pipeline. Do not select the Start Stateful Call Sequence checkbox for this Snap. Do not select both Start Stateful Call Sequence and Commit after BAPI execute checkboxes for all other BAPI calls between the first and the last calls in the sequence. For example, Second BAPI call in a 3-call sequence; Second, Third, and Fourth BAPI calls in a 5-call sequence. Default Value: Not selected |
Session ID | String/Expression | Specify the string to identify a specific session. All Snaps in a specific stateful call sequence must be in the same session ID, and there should be only call sequence running in a session at a time. If you do not provide any session ID, the Snap runs in its own session. Default Value: [None] |
Date conversion format | String/Expression | Specify the format to convert string input values into SAP date/datetime fields. The format string uses the same syntax as the Java SimpleDateFormat class. Default value: yyyyMMdd |
Output date time as Text | Checkbox | Select to output date and time as a String data type instead of a DateTime object. Default value: Not selected |
Error handling | Use this field set to define error path and values for handling errors. If any error paths and their error values match a corresponding value in the output document, then the document is routed to the error view (if enabled), or the Snap fails (if error view is disabled). Any newly created SAP Execute Snaps will add the default value above to provide a default for error handling. The Snap will not by default fail/route anything to the error view if the RETURN[*].TYPE value is 'E' in case the error handling is undefined | |
Error path | String/Expression | Specify the error path to which the errors should route. Default Value: $RETURN[*].TYPE |
Error value | String/Expression | Specify the value for the error. Default Value: E |
Max request attempts* | Integer | Specify the maximum number of SAP connection attempts in case of a failure. When you specify 0, the Snap makes infinite connection attempts. Default Value: 3 |
Request retry interval | Integer | Specify the time in seconds to wait before retrying the request. Example: 5 |
Route errors | Checkbox | Select this checkbox to write configuration errors to the error view. If the error is non-recoverable, especially connection errors such as exception handling would be routed to the error view with relevant information. Default value: Deselected |
Reload Function Metadata | Checkbox | Select this checkbox to reload the metadata (latest schema) for the current BAPI function before executing the BAPI function. Loading of metadata may take some time depending on the network speed. Default value: Deselected |
Snap Execution | Dropdown list | Select one of the three modes in which the Snap executes. Available options are:
Default value: Execute only |
Examples
The following examples include: one to retrieve data successfully, one to insert data successfully in SAP using the applicable BAPI, one to show an error.
Downloads
See Also
- http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec8464ac011d1894e0000e829fbbd/content.htm for a description of BAPI.