Let us start by creating and naming a new operation.
Add the activity Execute Table via drag & drop to the flow chart.
In this case we select some columns of the SAP table using the Table Field Selection Dialog. Alternatively you can set the field Custom Function to use a function module for table extraction.
In the Search Table Dialog you can search for an SAP table using the Search button and select it in the search results.
To map the output data in the Execute Table Activity dialog you first have to define the necessary data types and parameters. You can do this on the overview page using the functions Custom Data Types and Parameters.
Create a new custom data type SAPCustomer. You have the option either to manually define the properties using the New button or to import the structure fields required via the Import function.
You can select the SAP table in the Import Properties Dialog.
You can select and deselect the structure fields required in the Import Properties Dialog. In the field Property Name you can change the name.
Confirm your entries with the OK button.
What you have to do then is to define a output or return parameter. If you have more then one result parameter, you have to set them as output. This output parameter will contain the result when the web service is executed.
Optional: you can also define an input parameter that can be used later as filter.
Once you have finished these steps you can map your output data in the Execute Table Activity Dialog.
In the section Output Mapping click on New to create a new output Mapping. As target the previously defined parameter SAPCustomers is selectable. As source the table RESULT is selectable. The output fields can be mapped in the section Mapping Expression by clicking the button at the right side.
As source and target fields have the same name, you can use the function Automap to automatically make the mapping.
If you only want to extract the SAP table without any filter functions you can deploy the new created web service directly to your SharePoint server.