I am facing an issue while fetching user data from the USR02 table using RFC_READ_TABLE in SAP using JCO library. The goal is to retrieve active users(exclude expired users), so I am applying the following filter in the OPTIONS
parameter:
GLTGB >= '20250311' OR GLTGB = '00000000'
I include GLTGB = '00000000'
because some users have this value (empty) in their GLTGB field.
I am getting the following error in one of our clients servers (S4HANA):
Caused by: com.sap.conn.jco.AbapException: (126) OPTION_NOT_VALID: OPTION_NOT_VALID Message 000 of class SAIS type E, Par[1]: DB_Error, Par[2]: USR02
at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.execute(MiddlewareJavaRfc.java:1909)
However, the same query is working in some other ECC and S4HANA systems. Not sure about the client SAP version. Is there any other way to compare this value?