In the last issue of the SHAREPoint Kompendium Magazin (Band 6, 2014) I published an article in German about the brand new ECS Web Service Designer for SharePoint 2010/2013 from Theobald Software. The application is a desktop windows application allowing you to visually design SAP driven Web Services for SharePoint.
Schlagwort-Archive: Theobald Software
How To Use The New SQL-Like Query Language XtractQL To Retrieve SAP Business Data
Theobald Software released a new product suite called ERPConnect Services for SharePoint 2010. The product contains a new kind of query language named XtractQL to query SAP business data in a SQL-like manner. XtractQL or XQL is a combination of SQL and ABAP language syntax statements to simplify querying SAP systems.
XtractQL allows querying SAP objects like tables, BW-Cubes and SAP Queries. In addition XtractQL executes function modules (BAPIs) and returns metadata for objects. It can even execute MDX statements. Each XQL query is returning a data table object as result set. In case of the execution function modules the caller must define the returning table explicitly. XtractQL is very useful in situations where you want or need to handle dynamic statements.
ERPConnect Services for SharePoint 2010 (ECS) provides an additional tool, the XtractQL Explorer (see screenshot below), to learn more about the query language and to test XQL queries. You can use this tool independent of SharePoint 2010, but you need access to a SAP system.
The screenshot shows different samples of XQL queries. The following list shows a couple of other samples of XQL queries you can use in your SharePoint applications:
SELECT TOP 5 * FROM T001W WHERE FABKL = ‚US‘
This query selects the top 5 records of the SAP table T001W where the field FABKL equals the value US.
SELECT * FROM MARA WITH-OPTIONS(CUSTOMFUNCTIONNAME = ‚Z_XTRACT_IS_TABLE‘)
This query selects all records and fields of the SAP table MARA using a custom SAP function module to retrieve the data called Z_XTRACT_IS_TABLE.
SELECT MAKTX AS [ShortDesc], MANDT, SPRAS AS Language FROM MAKT
This query selects all records of the SAP table MAKT. The result set will contains three fields named ShortDesc, MANDT and Language.
SELECT TOP 30 LIPS-LFIMG, LIPS-MATNR, TEXT_LIKP_KUNNR AS CustomerID
FROM QUERY ‚S|ZTHEO02|ZLIKP‘
WHERE SP$00002 BT ‚0080011000‘AND ‚0080011999‘
This statement executes the SAP Query „S|ZTHEO02|ZLIKP“ (name includes the workspace, user group and the query name). As you can see XtractQL extends the SQL syntax with ABAP or SAP specific syntax elements. This way you can define fields using the LIPS-MATNR format and SAP-like where clauses like „SP$00002 BT ‚0080011000‘AND ‚0080011999‘“.
SELECT * FROM BWQUERY ‚0D_DECU/VARDEMO01‘
WHERE MAT03 EQ ‚M03‘, SALESORG BT ‚1000‘ AND ‚3000
This query executes a query against a specific SAP BW cube using a where clause.
DESCRIBE FUNCTION ‚SD_RFC_CUSTOMER_GET‘ GET EXPORTS
This query returns metadata about the export parameters of the SAP function module.
DESCRIBE QUERY ‚G|ZTHEO1|ZTHEOSQUERY‘ GET FIELDS
This query returns metadata about the defined SQP Query.
EXECUTE FUNCTION ‚SD_RFC_CUSTOMER_GET‘
EXPORTS KUNNR=’0000003340′
TABLES CUSTOMER_T INTO @RETVAL;
This query executes the SAP function module SD_RFC_CUSTOMER_GET and returns as result the table CUSTOMER_T (defined as @RETVAL).
ERPConnect Services runtime provides three kind of libraries to integrate with your application: Silverlight, Desktop and SharePoint client library. See product documentation for more information.
Here an example of how to use the libraries in code, e.g. within a web part project:
using ERPConnectServices;
…
ERPConnectServiceClient client = new ERPConnectServiceClient();
DataTable dt = client.ExecuteXQL(„SELECT TOP 50 * FROM MAKT“);
The ExecuteXQL method call of the ERPConnect Service Application in SharePoint will execute the XtractQL command against the defined SAP system.
There is also another way to use XtractQL. ERPConnect Services for SharePoint 2010 includes a Visual Studio 2010 Designer plugin. Similar to the LINQ to SQL designer, the ECS designer creates automatically code for you, see screenshot below:
You will find more information about the XtractQL syntax and ERPConnect Services for SharePoint 2010 product itself at the website of Theobald Software. There is also an evaluation version available.
http://www.theobald-software.com/de/products/erpconnectservices.htm
How To Integrate SAP Business Data Into SharePoint 2010 Using BCS Services And BCS Connector From Theobald Software
The Business Connectivity Services (BCS) of SharePoint 2010 provide a great way to fully integrate external data into the SharePoint. In most cases developers are integrating SQL database tables into the BCS services. But how do we connect to a SAP system? How do we integrate real world SAP business data like tables and function modules or BAPIs into SharePoint?
The answer is just a few clicks away. Theobald Software just released the ERPConnect Services (ECS) for SharePoint 2010 product suite and the product includes a great tool named BCS Connector. The BCS Connector allows developer to create SAP-driven BDC models in minutes with just a couple of clicks.
The BCS Connector application can be installed on client machines and will connect remotely to the SharePoint BCS service application. In this post I will give you an overview of the tool by creating a BDC model with an entity called Customer. We will also create two operations for the entity, a Finder and SpecificFinder method. Both methods are using the SAP built-in function module SD_RFC_CUSTOMER_GET. This is a very simple SAP function returning a list of customers.
To create a new BDC model, first you must enter the SAP and the SharePoint connection data after starting the BCS Connector application (see screenshot for SAP connection below).
Once you have entered the SAP connection data press the OK button and start adding your new BDC entity. To add an entity that is connected to a SAP function module SD_RFC_CUSTOMER_GET press the New button on the lower left side. A new wizard dialog will pop up. Select Function and press the Next button.
Then search for the function module and press the Next button to select the structure of our new BDC entity.
The last wizard page shows us a list with all possible entity structures available for this function module. Select the table CUSTOMER_T, including our customer data, and press the Finish button.
Now we have created our new entity Customer, but we still need to rename the entity from CUSTOMER_T to Customer. Each entity in BCS services must define at least two operations or methods, a so called Finder method to return a list of entities and a SpecificFinder method to return a specific entity within the list.
You also need to define the identifier fields within the entity by clicking the checkbox for the field KUNNR (Customer ID). You may also rename the field or all fields. Next, we create the Finder method by clicking the New button.
The Finder option is already selected. Just press the Finish button and the BCS Connector is automatically creating everything else and will open afterwards the Edit Operation dialog.
This dialog allows you to define the return parameter, input parameters and filters for the entity operation. Actually to execute the SAP function module SD_RFC_CUSTOMER_GET we need to define a value for the input parameters KUNNR or NAME1. For demonstration purpose I just define a name pattern for field NAME1. This query returns all customers that starts with T. What you can define as input parameter depends on the function itself. Clicking on the Preview button displays a list of all filtered customers.
In the same way we are creating the SpecificFinder method:
So, finally we have created a new entity with two entity operations and now we are able to save it on the SharePoint server. Just press the Save Model button. This will result in a new BDC model created on the server:
You can find the BDC models within the Central Administration of SharePoint 2010.
So far we just created a model, but we also want to display the customer data within an external list. We can create an external list using the SharePoint Designer or the BCS Connector. I will show you the second option. Switch to the External Lists tab of the ribbon bar and click on the New External List button.
The New External List dialog has pre-selected all values. Click on the Create button and you are done. You may also change the name of the external list. The final external list looks as follows:
That was really easy and you can even export the BDC Model to Visual Studio 2010 and do additional customizing.
Further information about the product ERPConnect Services and BCS Connector can be found here:
http://www.theobald-software.com/en/products/erpconnectservices.htm