Choose query fields from a recording
If you are not familiar with the tables you need to use, and you are familiar with transactions in SAP, you can find the tables by recording an SAP transaction.
Fields that are in structures, instead of tables, will not be included in the recording.
After you choose the fields, you narrow the data set that you want to download by specifying criteria.
Choose the creation method and log on to SAP
- Click the File tab, and then click New.
- Click Query.
- Under Choose a Creation Method, click Create from Recording.
- On the Winshuttle Studio logon screen, do one of the following:
- Click the SAP system box and then click the SAP system you want to log onto.
- Click Advanced SAP Logon. In the SAP Logon box, choose your SAP system, and then type your client number, user name, and password.
Tip: To save your credentials for future sessions, check the Save as auto logon credentials box and type a name for the credentials in the Auto logon name box. The next time you log on to SAP from Studio, you will see your Auto logon name in the SAP system box and your other credentials. All you have to do is click the logon button.
- Click OK.
Select the tables and fields
- In the Transaction Code box, type the T-code you want to record.
- In the Recording Description box, type a description for the recording. The description must be unique.
- In the Data type box, choose the type of result file you want to use for the downloaded data:
- Excel worksheet
- Access database file
- Text file
- XML Form (for web services)
- SQL Server file
- SharePoint list
Note: The account that you use to write to SQL Server must have db_owner or db_ddladmin membership on the database that contains the target table.
- Click Create Script.
The SAP GUI opens.
- Record the transaction. Be sure to enter data for all the fields that you want to include in your query.
Tip: If you do not want to commit the data to SAP, exit out of SAP GUI instead of clicking Save.
After you complete the recording, Query opens on the Workspace tab.
- Under Data Dictionary, click the arrow next to Recorded Transaction Codes (RC), and then click the arrow next to your recording.
- Drag a table to the workspace, or double-click it.
The fields that you changed during the recording are already selected.
Note: Some of the tables might contain only fields such as check boxes. Click the table, click Inspect Table, and confirm that the table contains fields that you want. If it does not, click the red x in the upper right corner of the table to remove it from the query.
- Check the Output box for each additional field that you want to download data from SAP.
- Check the Criteria box for each field you want to use to define the data set that you are downloading.
For example, if you want to tell Query to return material data based on a range of material numbers, check the Criteria box for the MARA.MATNR field.
The next step is to define criteria.