In an FDR scenario, we can iterate over a set of values and ingest the data. The iteration process takes place looping in between a set of key values. Here in this example, we considered SAP VBAK (Sales Document: Header Data) table and VBELN (Sales and Distribution Document Number) column as one of the primary keys.
Steps involved:
- Create a Query using static values
- Create a variable using an output Query
- Add the created variable in a Query
- Run the FDR using an output Query
1. Create a Query using static values:
- Click the QUERY STUDIO
- Hover on Query Builder snippet and click on Query.
- This action navigates to the Query page.
- Let’s select RD Datastore from the Profile drop-down list.
- Add the required values and click on the Save.
- An Additional saving options pop-up window is displayed.
- Under the Query Name text field, let’s add VBAK using 3 values.
- Select the desired folder path and click on Save.
- A toaster message VBAK using 3 variables saved successfully! is displayed.
2. Create a variable using an output Query:
- Hover and click on Variable Explorer.
- This action navigates to the Variable Explorer
- Click on Variable Builder.
- This action navigates to Variable Builder
- Add the Variable Name, and Description text fields and select the Variable Type drop-down list.
- Select Output from query for Input options.
- Select VBAK using 3 values for the Select Query.
- Click Test Variable
Note: Here, the Selected Query is updated accordingly.
- A Results for USR_VBAK Variable with 3 values pop-up window is displayed that shows the variables list.
- Close this window.
- Click on Save.
- A toaster message ‘VBAK Variable with 3 values’ Variable Created Successfully is displayed.
3. Add the created variable in a Query:
- Click the QUERY STUDIO
- Hover on Query Builder snippet and click on Query.
- This action navigates the user to the Query page.
- Select SAP ECC Livewire from the Profile drop-down list.
- Click the Navigator
- Search for VBAK table and click on it.
- This action loads the table.
- Click the Local Filter.
- A Local Filter Expression for VBAK pop-up window is displayed.
- Drag the Available Fields option and select VBELN(Sales and Distribution Document Number) column from the drop-down list.
- Drag the Available Operators and select Like from the drop-down list.
- Click the Variable icon.
- A Variables pop-up window is displayed.
Note: By default, Predefined variables tab is selected.
- Select the User defined variables tab and select the variable USR_VBAK Variable with 3 values which loads the metadata slide screen.
- Click on Test Result.
- The list of values is loaded in the Result text field.
- Click Ok to load the variable.
- The expression VBELN LIKE ‘~ ~USR_VBAK Variable with 3 values # #’ is updated accordingly.
- Click on Save to save the filters.
- The Local Filter icon is turned green which indicates the filter condition is added successfully.
- Click on Save.
- An Additional saving options pop-up window is displayed.
- Add SAP VBAK Variable Query under the Query text field.
- Click on Save.
- A toaster message SAP VBAK Variable Query saved successfully! is displayed.
4. Run the FDR using an output Query:
- Click the SCENARIO STUDIO
- Hover on the Scenario Builder snippet from the left pane options.
- Click theFunctional Data Recon.
- From the Data Source tab, let’s drag and drop Queries.
- Double tap on the Read data from <Query>
- A Read data from Query pop-up window is displayed.
- Let’s checkbox SAP VBAK Variable Query to display the Metadata for SAP VBAK Variable Query.
- Click the Select button to save the Query widget.
- Drag and drop SAP Table icon onto the FDR page.
- Double tap on Read data from Table.
- A Read data from Table pop-up window is displayed.
- Select Connection Name as SAP ECC Livewire from the drop-down list.
- Click the Navigator.
- A Navigator slide screen is displayed.
- Search for VBAK and click on it.
- The VBAK table is loaded.
- Click the Select button to save the SAP Table widget.
- Click the Reconciliation tab.
- Drag and drop the Map source & target fields icon onto the FDR session page.
- Double tap the Map source & target fields widgets.
- A Map source & target fields pop-up window is displayed.
- Select the required keys and click on Save.
- A Confirm action pop-up window is displayed.
- Click the Verified button to save the Map source & target fields widget.
- Click on horizontal ellipses icon.
- Click on Iterative Ingestion icon.
- An Iterative Ingestion pop-up window is displayed.
- Enable Source Iterative Ingestion toggle to display the Available Variables.
- Select USR_VBAK VARIABLE with 3 values.
- Click on Save to save the iterative ingestion.
- Click the Execute Now icon to run the FDR scenario.
- Here the FDR is failed and it loads exceptions.
Note: Here the iteration and ingestion process take place in the background.