0

I managed to connect to SAP ABAP via Python, using PyRFC and RFC_READ_TABLE.

I am trying to figure how to querying a table by a Date column using the parameter OPTIONS.

I know the query should be the same syntax as in C# RFC, but I didn't find anything about filter by interval (bigger then / smaller then).

For example in SQL I can use:

where date > 2022.3.3

Thank you.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Mark
  • 51
  • 6
  • The parameter `OPTIONS` of `RFC_READ_TABLE` takes exactly the same text as in SQL after `WHERE`, except that `OPTIONS` is a table with lines of 72 characters so better define one condition per line. Also, in ABAP-based tables, the dates are stored in format as 8 characters YYYYMMDD (in Gregorian calendar). So a valid value for `OPTIONS` parameter (which also works after SQL `WHERE`) is: `DATE > '20220303'` in line 1, `AND DATE < '20221231'` in line 2, etc. – Sandra Rossi May 31 '23 at 11:24

1 Answers1

0

You can put below statement into OPTIONS:

DATE GT '20220303'
  • GE: Greater or equal
  • LT: Less then
  • LE: Less or equal
mkysoft
  • 5,392
  • 1
  • 21
  • 30