Infor Lawson S3 DME Data Query URL Generator
This generator builds Lawson S3 DME data query URLs for the LSF 9 and 10 Data servlet and for older Environment 8 servers. You get curl and PowerShell versions to test from a workstation. DME runs a read-only query against a Lawson file through Lawson security, so you get data without direct database access.
Fill in
Element names without the table prefix
Leading index key values in index order, separated by =
%3D is an encoded =
1. LSF 9 / 10 Data servlet (GET)
GET https://lawson.example.com/servlet/Router/Data/Erp?PROD=PROD&FILE=GLTRANS&INDEX=GLTSET1&KEY=100=2025&FIELD=COMPANY;FISCAL-YEAR;ACCT-PERIOD;ACCT-UNIT;ACCOUNT;BASE-AMOUNT&SELECT=ACCOUNT%3D1000&MAX=500&SORTASC=ACCOUNT&OUT=CSV
2. Legacy Environment 8 DME program
# Older Lawson Environment servers ran DME as a CGI program. # Windows servers use dme.exe; check the cgi-lawson path on your web server. GET https://lawson.example.com/cgi-lawson/dme.exe?PROD=PROD&FILE=GLTRANS&INDEX=GLTSET1&KEY=100=2025&FIELD=COMPANY;FISCAL-YEAR;ACCT-PERIOD;ACCT-UNIT;ACCOUNT;BASE-AMOUNT&SELECT=ACCOUNT%3D1000&MAX=500&SORTASC=ACCOUNT&OUT=CSV
3. GEN example: check queued batch jobs
# QUEUEDJOB lives in the GEN data area, not the application product line. # STATUS value taken from a LawsonGuru forum example; confirm job status codes on your system. GET https://lawson.example.com/servlet/Router/Data/Erp?PROD=GEN&FILE=QUEUEDJOB&FIELD=JOBNAME;USERNAME;STATUS;STOPDATE&SELECT=STATUS%3D34&MAX=500&OUT=CSV
4. curl test (basic authentication)
# Prompts for the password. Behind SSO this may return a logon HTML page instead of data. curl -s -u "lawsonuser" "https://lawson.example.com/servlet/Router/Data/Erp?PROD=PROD&FILE=GLTRANS&INDEX=GLTSET1&KEY=100=2025&FIELD=COMPANY;FISCAL-YEAR;ACCT-PERIOD;ACCT-UNIT;ACCOUNT;BASE-AMOUNT&SELECT=ACCOUNT%3D1000&MAX=500&SORTASC=ACCOUNT&OUT=CSV"
5. PowerShell equivalent
$cred = Get-Credential -UserName "lawsonuser" -Message "Lawson login" $url = "https://lawson.example.com/servlet/Router/Data/Erp?PROD=PROD&FILE=GLTRANS&INDEX=GLTSET1&KEY=100=2025&FIELD=COMPANY;FISCAL-YEAR;ACCT-PERIOD;ACCT-UNIT;ACCOUNT;BASE-AMOUNT&SELECT=ACCOUNT%3D1000&MAX=500&SORTASC=ACCOUNT&OUT=CSV" $resp = Invoke-WebRequest -Uri $url -Credential $cred -UseBasicParsing $resp.Content | Out-File -FilePath ".\GLTRANS.txt" -Encoding utf8
The Router Data path and the PROD, FILE, FIELD, SELECT, MAX, SORTASC and OUT parameters follow LawsonGuru forum examples for LSF. INDEX and KEY are standard DME parameters, but check them in the Data service documentation for your LSF release before relying on them. URL-encode special characters in SELECT (= as %3D, & as %26, spaces as %20). Field names are 4GL element names without the table prefix. The servlet returns data in the formats your release supports, and SSO can intercept direct calls and return a logon page. Only read data your Lawson security role allows.
Get your DME calls checked for your LSF release
Send us the calls you use, with your LSF version and SSO setup, and we will return corrected URLs and a tested script pattern.
Optional. The tool and every export work without this. No spam.
How to use it
Enter your server URL and product line, then the file you want to read, for example GLTRANS or EMPLOYEE. List the fields with semicolons, using element names without the table prefix: COMPANY, not GLT-COMPANY. Choose an index from the data dictionary and put the leading key values in KEY, separated by equals signs in index order. With GLTSET1, KEY=100=2025 means company 100, fiscal year 2025. Add a SELECT condition to filter further, encoded for a URL. Set MAX so a test call cannot pull a whole table, and choose CSV or XML output. Paste the URL into a browser session that is already signed in, or use the curl or PowerShell block.
Parameters and what they do
Each parameter maps to one part of a query: product line is the data area, FILE is the table, FIELD is the column list, INDEX and KEY choose the access path and its starting key, SELECT is the filter, SORTASC is the sort order and MAX is the row limit. Using an index whose leading keys match your filter keeps the call fast, because Lawson can read a narrow key range instead of scanning the table.
- PROD: product line, for example PROD or TEST, or GEN for environment files
- FILE: Lawson file name from the data dictionary
- FIELD: semicolon-separated element names
- INDEX and KEY: index name and leading key values separated by =
- SELECT: filter condition, URL-encoded
- MAX, SORTASC, OUT: row limit, sort field, output format
Worked example
Finance wants 2025 transactions for account 1000 in company 100. Set FILE to GLTRANS, INDEX to GLTSET1, KEY to 100=2025, SELECT to ACCOUNT%3D1000 and FIELD to COMPANY;FISCAL-YEAR;ACCT-PERIOD;ACCT-UNIT;ACCOUNT;BASE-AMOUNT. Start with MAX=500 to check the shape of the result, then raise it. GLTSET1 starts with COMPANY and FISCAL-YEAR, so Lawson reads only that range. For balances rather than detail, read GLAMOUNTS with GAMSET1 instead, which returns one row per account string with 13 period buckets.
Gotchas
A login page instead of data usually means single sign-on intercepted the call. Test from a signed-in browser first, then deal with authentication for scripts. Empty results often come from using the 4GL prefix in FIELD, putting KEY values in the wrong order, or forgetting to encode = in SELECT. Environment files such as QUEUEDJOB sit in GEN, not your application product line. DME respects Lawson security, so a service account sees only what its role allows. For anything other than reads, use the Transaction (AGS) service instead.
Frequently Asked Questions
What is a Lawson DME call?
DME is Lawson's data query service. A DME call is an HTTP request that names a product line, file, fields, optional index, key and select filter, and returns matching records as XML or delimited text. It runs through Lawson security, so it only returns data the user is allowed to see.
What is the DME URL in LSF 9 and 10?
In LSF the Data service is called through the Router servlet at /servlet/Router/Data/Erp, followed by query parameters such as PROD, FILE, FIELD, SELECT, MAX, SORTASC and OUT. Older Environment 8 servers used a CGI program under cgi-lawson. Check the exact path on your web server.
Is there a Lawson query wizard for building these URLs?
Lawson tools such as Design Studio and the Lawson add-ins for Excel help build data queries. This generator gives you the same kind of URL as plain text, so you can test it in a browser, curl or PowerShell. Check generated URLs against your release's Data service documentation.
Why does my DME call return no rows?
Common causes are using prefixed field names such as GLT-ACCOUNT, KEY values out of index order, an unencoded = in SELECT, the wrong product line, or a security role with no access to the file. Remove SELECT and KEY first, keep MAX small, then add filters back one at a time.
If you want staff to ask Lawson questions in plain English, using DME behind the scenes with Lawson security intact and running on your own servers, we can build that.
Related Tools
Infor Lawson S3 AGS Transaction Call Generator
Fill in the product line, form token, event, function code and form fields to get a Lawson Transaction (AGS) call URL you can test in a non-production product line.
Other ERPsInfor Lawson S3 GL and AP Table Reference (GLTRANS, GLAMOUNTS, APINVOICE)
The Lawson S3 General Ledger, Accounts Payable and Cash Ledger tables report writers use, with field prefixes, primary index keys and common joins.
Other ERPsInfor Lawson S3 HR and Payroll Table Reference
The Lawson S3 Human Resources, Personnel Administration, Payroll, Benefits and Time Accrual tables with field prefixes, primary index keys and common joins.
More Developer Tools tools
See all- Infor Lawson S3 GLAMOUNTS Trial Balance SQL Generator
- Infor Lawson S3 LSF System Utilities and Batch Command Reference
- Infor Lawson IPA Process Designer Activity Node Reference
- SAP Sales Order ABAP SELECT Generator (VBAK, VBAP, VBFA)
- SAP Sales Order Create BAPI ABAP Generator (BAPI_SALESORDER_CREATEFROMDAT2)
- SAP ABAP Open Items SELECT Generator
- SAP ACDOCA SQL Query Generator
- SAP QM Inspection Lot ABAP SELECT Generator
- SAP Quality Notification Pareto SQL Query Generator
Keep exploring
Free tools
- Infor Lawson S3 AGS Transaction Call GeneratorFill in the product line, form token, event, function code and form fields to get a Lawson Transaction (AGS) call URL you can test in a non-production product line.
- Infor Lawson S3 GLAMOUNTS Trial Balance SQL GeneratorFill in company, fiscal year and period to get ready-to-run SQL for Lawson S3 GL balances from GLAMOUNTS and GLUNITS, with a GLTRANS reconciliation query.
- Infor Lawson S3 HR and Payroll Table ReferenceThe Lawson S3 Human Resources, Personnel Administration, Payroll, Benefits and Time Accrual tables with field prefixes, primary index keys and common joins.