I am trying to get data by using python connect SAP system. Here I have question about how to filter one specific field IS NOT EMPTY?
For example below, how to filter the field QNAME is not empty. In SAP, we can easily set. Thanks a lot!
table = 'LTAP'
options = [{ 'TEXT': "LGNUM = '586'" and "VLTYP = 'GPA'" and "NLTYP = 'PD2'"}]
fields = ['TANUM','VLTYP','VLPLA','NLTYP','NLPLA','QDATU','QNAME']
pp = PrettyPrinter(indent=4)
rowskips = 0
print("----Begin of Batch---")
result = conn.call("RFC_READ_TABLE",
QUERY_TABLE = table,
DELIMITER='|',
FIELDS = fields,\
OPTIONS = options,
ROWSKIPS = rowskips,
ROWCOUNT = 50 )
pp.pprint(result['DATA'])