SAP / .NET Interoperability

How to integrate SAP into .NET applications like SharePoint

Hauptmenü

Zum Inhalt springen
  • Startseite
  • About me

Suchen

Schlagwort-Archive: SQL-like

März 19, 2012

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

  • Veröffentlicht in ASP.NET (MVC), Development, General, SAP, SharePoint, Silverlight
  • Verschlagwortet mit ERPConnect, ERPConnect Services, Query Language, SAP, SAP R/3, SharePoint, SQL-like, Theobald Software, XQL, XtractQL
  • Hinterlasse einen Kommentar

Beitragsnavigation

Kategorien

  • ASP.NET (MVC)
  • ASP.NET (Web API)
  • Development
  • ERPConnect Services
  • Excel
  • General
  • SAP
  • SharePoint
  • Silverlight
  • Theobald Software
  • WPF

.NET .NET Data Provider .NET Development .NET Integration Active Directory Add-in Addin Addon ADO.NET ADO.NET Data Services ASP.NET ASP.NET Build Providers ASP.NET MVC BAL BCS Build Providers Business Connectivity Services business logic C# C# 3.0 Compiler Custom Windows authentication DAL Data Access Data Access Layer data access logic Data Provider entity ERPConnect ERPConnect Services Excel Extension Methods Form Validation Internet LINQ LINQ to ERP LINQ to SAP mindmap mind mapping MSN MVC Office Office 2007 Parser Query Querying data Query Language Quotes repository roles RolesWindowsPrincipal SAP SAP and .NET SAP integration SAP R/3 Scanner SharePoint SharePoint 2010 Silverlight Stock Quote Stock Quotes T4 engine T4 template Theobald Software Validation Validation Controls Validator Toolkit VBA Web Web developement Web Development webservice Windows authentication XQL XtractQL

Archiv

  • Dezember 2014
  • Juli 2014
  • Februar 2014
  • Februar 2013
  • Januar 2013
  • März 2012
  • September 2011
  • Mai 2011
  • April 2011
  • Januar 2011
  • November 2010
  • Oktober 2010
  • August 2010
  • März 2010
  • Januar 2010
  • September 2009
  • Juni 2009
  • Mai 2009
  • Januar 2009
  • Juli 2008
  • Januar 2008
  • August 2007
  • Juli 2007
  • September 2006
  • 0
Bloggen auf WordPress.com.
Datenschutz & Cookies: Diese Website verwendet Cookies. Wenn du die Website weiterhin nutzt, stimmst du der Verwendung von Cookies zu.
Weitere Informationen, beispielsweise zur Kontrolle von Cookies, findest du hier: Cookie-Richtlinie