0

I am trying to have multiple OPTIONS when I try to get data from python to SAP tables. As I showed below, the only option is LGNUM = '376'. How can I have more options here? Thank you!

table = 'LTAP'
**options = [{ 'TEXT': "LGNUM = '376'"}]**
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 = 10, )
pp.pprint(result['DATA'])
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
felix12
  • 11
  • 4
  • In SAP GUI, people see number `376`, but In database it's stored `0000000376` (padded with zeroes) – Sandra Rossi Jun 04 '21 at 14:23
  • Thanks for your reply. Here I mentioned more options means other fields in the same SAP table. like VLTYP, VLPLA etc. – felix12 Jun 07 '21 at 00:46
  • 1
    Like `LGNUM = '376' AND VLTYP = '1'`? – Sandra Rossi Jun 07 '21 at 05:52
  • 1
    Does this answer your question? [RFC\_READ\_TABLE passing "options" and "Fields" parameters (c#)](https://stackoverflow.com/questions/27633332/rfc-read-table-passing-options-and-fields-parameters-c). The syntax for pyrfc does not differ from C# – Suncatcher Jun 07 '21 at 09:35

1 Answers1

0

options = [{ 'TEXT': "LGNUM = '376'"}, {'TEXT':"BUDAT = '2022'}]

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 19 '22 at 15:19