Hi Thorsten
It is a old post ( 2 months ) and I think you have already found the solution. If not , then you can check the below solution .
There's a new class CL_LIB_SELTAB in the package SHDB_TOOLS
We have to use this private class in our program to . Below, I'm giving a simple example
As the class is a private class , call the method "NEW" to get its instance . pass the selection-options in the parameter it_sel. Now, in the next step you can call the method SQL_WHERE_CONDITION passing the actual field name . here you can use alias name or anything which will be treated as a field name in hana. I have passed 'A.MATNR' assuming that A is the alias name of the HDB table . While executing I have passed 2 parameters , one with NE option and another with GT option. Please see the screenshot how the values are getting returned. Please check and let us know whether this works for you
------------------------------------------------------------------------------------------------------------------------
REPORT ZTEST.
TABLES: MARA .
SELECT-OPTIONS S_MATNR FOR MARA-MATNR.
DATA: O_COND TYPE REF TO CL_LIB_SELTAB,
H_HANDLE TYPE REF TO CL_ABAP_TABLEDESCR,
L_COND TYPE STRING.
CALL METHOD CL_LIB_SELTAB=>NEW
EXPORTING
IT_SEL = S_MATNR[]
RECEIVING
RR_REF = O_COND
.
CALL METHOD O_COND->SQL_WHERE_CONDITION
EXPORTING
IV_FIELD = 'A.MATNR'
RECEIVING
RV_COND = L_COND
.
BREAK-POINT.
------------------------------------------------------------------------------------------------------------------------------------------Image may be NSFW.
Clik here to view.