Importing SAP query data
The SAP Query action allows you to import data directly from SAP queries; the imported data is written to a new table.
You can:
- Create different types of reports such as basic lists, statistics, and ranked lists
- Output can include lists on screens in table format, ALV grids, downloadable spreadsheets, and downloadable flat files
- Easily edit available filters
On the Configuration tab:
-
Review the selected SAP connection and query.
-
Indicate the maximum rows for query results.
-
Apply optional query rules.
-
Indicate filter options.
-
Preview the output table.
Possible applications include:
- Create customized reports in SAP with little or no knowledge of ABAP programming
- Write queries to get reports quickly without requiring assistance from software developers
- Define queries in SAP and use this action to run those queries and return data
- Join multiple SAP tables, apply filters, and use this action to return the output of that operation
- Return SAP data and blend with other datasets to build a DG workflow
Import data from a SAP query
- Drag the SAP Query icon onto the design surface.
-
On the Connections tab
, enter a Name and a Description to identify this import adapter, then specify the input SAP and output database table options:
Input -
- For SAP Connection, select the SAP in which the data is being queried, or choose New SAP Connection to establish a connection to another SAP. After selecting the connection, click the Connection button
to open it.
- The Selected Query field displays the query chosen from the SAP; use the search tools below this field to locate the query. When the query is selected, the Variant field is enabled, allowing you to optionally select a variant.
- In the search tools -
- Use Search Name to locate a query by name; by default, the wildcard character (*) includes all query names.
- Use Search User Group to locate a query based on the user group that has access to it; by default, the wildcard character (*) includes all defined user groups.
- Indicate whether to search the Global Workspace or your Local Workspace.
- Click the Search button
to locate any queries matching your current search selections.
- To select a query from the results list, click on the query, then click Select.
Output -
- For Database Connection, specify the database to which the data is being imported, then enter a Table Name for the new table being created.
- Indicate whether the output table should be deleted following successful execution of the macro containing the import action.
- For SAP Connection, select the SAP in which the data is being queried, or choose New SAP Connection to establish a connection to another SAP. After selecting the connection, click the Connection button
- On the Configuration tab
:
- For Max Rows, indicate the maximum number of rows to return from the query.
- Indicate whether an error is generated when the query is unable to return any data based on the filter selections
- Indicate whether there is no limit placed on the number of rows returned from the query.
- Click the Edit icon
to specify your filter options.
Multiple filters can be defined using each option. Each filter you add should include -
- Sign
- Include - the result set matching this filter is returned
- Exclude - the result set not matching this filter is returned
- Option - the operator placed on the sign
- Value from - the lower limit value
- Value to - the upper limit value
Some options require only one value, in which case the “Value to” box is not needed. For example, if “=” is selected under the options, then the second value is not necessary.
As you define the filters, the number of filters defined using each variable is displayed in the No. of Filters column.
- Sign
- Use Preview to display the resulting data based on the query, which includes the last SAP error reported.
- Group columns by dragging column headers.
- Set the Grid Maximum.
- Click Refresh to redisplay the rows; you can also select Enable auto refresh to refresh the screen following each change to the arrangement of the rows.
Last modified: Thursday December 19, 2024