I am new to python. I want to pull data from SAP System. I have created a connection with SAP system using below code and trying to pull data using SQL query:
select col1,col2,col3 from table_name where col1= 2019
Program:
import pyrfc
from pyrfc import Connection
conn = Connection(ashost='myhost', sysnr='00', client='000', user='xxx', passwd='***')
fields = ['col1','col2','col3']
table = 'table_name'
where = ['col1=2019']
MaxRows =5
fromrow = 0
tables = conn.call("RFC_READ_TABLE", QUERY_TABLE=table, FIELDS = fields,OPTIONS=where,ROWCOUNT = MaxRows,ROWSKIPS=fromrow)
Is there any direct way to write SQL query (how we write in Oracle/SQL)?
The above code gives data in dict form and runs very slow.