The SAP Spool Read tool is used to extract the spool data generated from running SAP Transaction Codes (T-Codes) and SAP Reports directly into Alteryx. The SAP spool saves the output of a report in a file that can be viewed in SAP or exported out of SAP.
In this blog we will show you how to use the SAP Spool Read tool to extract data from the MM (Material Management ) Purchasing Documents by Document Number (T-code ME2N) into Alteryx.
This blog will be split into 2 parts.
In the first part, we will take a look at the Purchasing Document Report in SAP and generate a spool.
In the second part, we will look at how the SAP Spool Read tool can be used to extract the spool output 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 Purchasing Document by Document Number (T-Code ME2N)
The SAP Purchasing Document Reports are some of the most commonly used transactions in SAP ECC and SAP S/4HANA. The transactions provide a number of ways for users to list Purchasing Document information; ME2N lists Purchasing documents by document number.
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 Scope of List allows you to select various layout options.
The Program menu allows you to chose how the report is executed.
When the transaction is executed the results are retrieved based upon the selections specified above.
To generate a spool the Execute in Background should be selected.
Select the default Printer as the Output Device. This can vary but common options are LP01 and LOCAL.
Click on the Green tick Continue button.
Schedule the job; for example Immediate.
Once the Save button has been clicked this window closes and the following message will appear at the bottom of the selection screen.
Select Own Jobs from the Systems Menu.
In the Job overview page the following fields are important when we configure the ACS Spool Read Tool. Job Name, Job Created By, Start Date and Start Time.
To view the spool output in SAP . Select the row by clicking on the check box and then select Spool.
Select the Spool row and display.
2. Extract the Purchasing Documents by Document Number (T-Code ME2N) using the SAP Spool Read tool in Alteryx
So, we now have a run the Purchasing Document by Document Number transaction in SAP ECC or SAP S/4HANA and saved the output to a SAP spool request.
There are a number of ways in which we can replicate the output of the Purchasing Document by Document Number in Alteryx.
One option is to use the SAP Report tool to extract data directly from ME2N.
Other options include using the SAP Table Data tool to extract data from tables EKKO and EKPO or
another option would be to define an SAP Query (T-Codes SQVI / SQ01 / SQ02 / SQ03) referencing tables EKKO and EKPO and use the SAP Query tool to extract the data into Alteryx.
In this blog we the SAP Spool Read tool will be used.
Let's take a look at the construction of an Alteryx workflow using the SAP Spool Read tool to extract data from the Purchasing Documents by Document Number (T-Code ME2N) 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.
The SAP Job name and run details that were generate in SAP (see Section 1 point 8 above ) are entered into the Selection Parameter on the Selection Tab.
Once the Raw Preview Button is clicked the spool is retrieve from SAP .
The line containing the header fields needs to be identified. Click on the relevant row and then select Add Header Row No from the context menu. After the header row has , click the Confirm Layout button to review the formatted output.
The Header Row number can be seen in the Parameters tab.
The report columns can be seen in the Fields tab, unrequired fields can be deselected here.
Finally, an Alteryx browse tool is added to the workflow.
When the workflow is run the data extracted from the MM Purchase Document by Document Number transaction (T-Code ME2N) 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.