If a query via ODBC, BAPI or IDocs is not an option for you, or if you only want data from specific transactions in SAP, I finally found a solution using SAP GUI Scripting.
The procedure is as follows:
1. Generate a VBS script with SAP GUI Scripting, where you run the transaction and export the data to an excel data table (XLSX)
2. Include the VBS script in your JSL code
3. Import the data from the excel table to JMP
4. Do your data analysis in JMP
This of course only works, if SAP GUI Scripting is enabled.
If you want full automation, you need to automatically login to SAP.
I hope this helps! It worked for me
Best
Victor