XQL - Xtract Query Language
A few years ago I developed XQL, the Xtract Query Language (XtractQL), which got integrated in various Theobald products in the meatime in order to dynamically retrieve SAP business data by using a simple query language. The XtractQL syntax combines elements from the SQL and ABAP languages and can be used on:
- SAP tables/objects and their metadata
- Funktion modules (BAPIs)
- BW cubes
- SAP queries
- MDX statements
A XtractQL .NET Data Provider is supported by the ERPConnect library from Theobald Software.
The following examples show how XtractQL can be used.
Table
Select the first five records from table T001W where the field FABKL has a value of US.
SELECT TOP 5 * FROM T001W WHERE FABKL = 'US'
SELECT * FROM MARA WITH-OPTIONS(CUSTOMFUNCTIONNAME = 'Z_XTRACT_IS_TABLE')
SELECT MAKTX AS [ShortText], MANDT, SPRAS AS Language FROM MAKT
SELECT TOP 30 LIPS-LFIMG, LIPS-MATNR, TEXT_LIKP_KUNNR AS Kundennummer
FROM QUERY 'S|ZTHEO02|ZLIKP'
WHERE SP$00002 BT '0080011000'AND '0080011999'
Function Module
XQL query to discover the metadata for the Export parameter collection of function module SD_RFC_CUSTOMER_GET.
DESCRIBE FUNCTION 'SD_RFC_CUSTOMER_GET' GET EXPORTS
DESCRIBE QUERY 'G|ZTHEO1|ZTHEOSQUERY' GET FIELDS
EXECUTE FUNCTION 'SD_RFC_CUSTOMER_GET'
EXPORTS KUNNR='0000003340'
TABLES CUSTOMER_T INTO @RETVAL;
The Syntax of XtractQL and Examples (for ERPConnect Services)