The SAP Report tool is used to extract data from SAP Transaction Codes (T-Codes) and SAP Reports directly into Alteryx. In this blog we will show you how to use the SAP Report tool to extract data from the PM (Plant Maintenance) Order Data transaction (T-Code IW39) into Alteryx.
This blog will be split into 2 parts.
In the first part, we will take a look at the Display PM Order transaction in SAP.
In the second part, we will look at how the SAP Report tool can be used to execute the Display PM Order Display transaction from within Alteryx.
If you would like to follow the steps described in this blog, you will need:
If you have access to Alteryx Gallery and would like to download the workflow presented in the blog, click here.
1. The SAP Display PM Order transaction (T-Code IW39)
The SAP Display PM Order transaction is one of the most commonly used transactions in SAP ECC and SAP S/4HANA. The transaction provides a number of ways for users to search for and display plant maintenance order related data.
The Find Variant button retrieves any variants associated with the transaction. The variant is a powerful piece of functionality in SAP. It allows a user to save the selection criteria entered into the transaction selection screen and reuse it when running the transaction.
The Order Status section allow you to retrieve orders base on different statuses.
The Order Selection section provides a range of selection fields to select orders.
The Others area is used to control the Layout that is used to present the transaction output. If no Layout is explicitly selected, then a default Layout is used. You can also limit the number of records displayed in the output.
When the transaction is executed the results are retrieved based upon the selections specified above. The output is displayed using the selected (or default) Layout.
2. Execute the Display PM Order transaction (T-Code IW39) using the SAP Report tool in Alteryx
So, we now have a basic understanding of how the Display PM Order transaction works in SAP ECC or SAP S/4HANA.
There are a number of ways in which we can replicate the output of the Display PM Order transaction in Alteryx.
One option is to use the SAP Table Data tool to extract data from tables AFKO and AUFK.
Another option would be to define an SAP Query (T-Codes SQVI / SQ01 / SQ02 / SQ03) referencing tables AFKO and AUFK and use the SAP Query tool to extract the data into Alteryx.
In this blog though, we are going to use the SAP Report tool. The SAP Report tool is one of our Advanced Tools and unlike the SAP Table Data tool and SAP Query tool it requires the installation of a DVW Function Module on your SAP system to use it.
Let's take a look at the construction of an Alteryx workflow using the SAP Report tool to extract data from the Display PM Order (T-Code IW39) transaction.
The SAP ECC system to be accessed is selected on the Parameters tab of the SAP Logon tool. Details of the selected SAP system along with the credentials of the logged in user are passed to the other tools in the workflow.
Transaction Code, IW39 is selected on the Parameters tab of the SAP Report tool. The screen shot below shows the "final state" configuration of the SAP Report tool ready for workflow execution.
In the steps below, we will show you how configure the SAP Report tool to extract data from the SAP PM Order Display (T-Code IW39) transaction.
The initial state of the SAP Report tool looks like this:
The Object Type drop down list supports Report and Transaction Code (T-Code). For this example, we will select Transaction Code.
Use the Search String field to enter the technical name of the Report or the Transaction Code. For this example, we will specify Transaction Code, IW39.
Click the Search button to trigger the search for the entered Report or Transaction Code.
The results of the search are displayed in the Select Report drop-down list.
Select Variant is a key feature of the SAP Report tool. If Variants have been defined for the selected Report or Transaction Code in SAP, they are available for selection from the Select Variant drop down list.
Selection of a Variant automatically applies the order/status selection criteria and list output settings to the extract.
If you select a Variant, you do not need to manually define the order/status selection criteria and list output settings etc. in the SAP Report tool.
For our example, we will not select a Variant and will apply our selection settings manually.
Once the Report or Transaction Code is confirmed, the Filters tab is automatically populated with the available selection criteria.
If a Variant is selected, the Filters tab can be ignored. We have chosen not to use a Variant so the IW39 transaction selection criteria are entered manually using the Filters tab. You can also copy the filter values from a variant by clicking the Copy button.
We want to extract data based on the following criteria:
The criteria translate into the SAP Report tool as follows:
Note: Date should be entered in the format of "YYYYMMDD"
We now need to address the format of the output.
The SAP output is not presented in a format that can be immediately used within Alteryx.
To convert the output to a format that can be used within Alteryx go to the Sample Data tab and click the Raw Preview button. The SAP Report tool retrieves a sample extract of data from the selected Report or Transaction.
We need to identify where the Header starts in the output.
In our example, the Header starts at row number 2. The Header Row No field can be entered manually or by clicking on row number 2 in the Sample Data tab and using a right-mouse click to display a context menu. Select Add Header Row No from the context menu.
After the header row has , click the Confirm Layout button to review the formatted output.
You can also deselect any fields you would like to ignore in the Fields tab.
Finally, an Alteryx browse tool is added to the workflow.
When the workflow is run the data extracted from the PM Order Display transaction (T-Code IW39) is output in a format ready for further analysis.
© COPYRIGHT 2003 - 2023 DE VILLIERS WALTON LIMITED. ALL RIGHTS RESERVED.
SAP® Business Suite, SAP® BusinessObjects™, SAP® BW, SAP® SuccessFactors are the trademarks or registered trademarks of SAP SE in Germany and in several other countries.