2014 Mar 03 1:40 PM
Hi Gurus,
I would like to know how could I code the WHERE statement with a SELECT OPTION, in Persistence Class ?
Currenlty, I would like to code this kind of request :
DELETE FROM ziTab
WHERE zdate IN so_date.
Do you know, how could I code it ?
Many thx for helps.
Best regards.
Rachid.
Hi Gurus,
I would like to know how could I code the WHERE statement with a SELECT OPTION, in Persistence Class ?
Currenlty, I would like to code this kind of request :
DELETE FROM ziTab
WHERE zdate IN so_date.
Do you know, how could I code it ?
Many thx for helps.
Best regards.
Rachid.
2014 Mar 03 2:04 PM
How about something like this:
data: ziTab2 like ziTab.
SELECT * from ziTab
appending table ziTab2
WHERE zdate IN so_date.
2014 Mar 03 2:28 PM
Sorry Glen,
Unfortunately, I am trying to find the correct syntax to use a SELECT OPTION in a Query Request of Persistence Class:
Something like that:
SELECT-OPTIONS so_date FOR sy-datum .
DATA lo_query_manager TYPE REF TO if_os_query_manager .
DATA lo_query TYPE REF TO if_os_query .
DATA lo_agent TYPE REF TO zca_persistence_zint_rsbankinv.
DATA lo_base TYPE REF TO zcb_persistence_zint_rsbankinv.
DATA lo_rsbankinv TYPE REF TO zcl_persistence_zint_rsbankinv.
DATA lo_table TYPE osreftab .
DATA ls_table TYPE REF TO zcl_persistence_zint_rsbankinv.
DATA ls_tmp TYPE REF TO object .
DATA lv_string TYPE string .
DATA lo_exception TYPE REF TO cx_root .
TRY .
lo_agent = zca_persistence_zint_rsbankinv=>agent.
* Create Query
lo_query_manager = cl_os_system=>get_query_manager( ).
lo_query = lo_query_manager->create_query( i_filter = 'ZEXDAT IN PAR1' ).
lo_table =
lo_agent->if_os_ca_persistency~get_persistent_by_query(
i_query = lo_query
i_par1 = so_date
).
LOOP AT lo_table INTO ls_tmp.
ls_table ?= ls_tmp .
lv_string = ls_table->zget_all_fields( ).
WRITE lv_string.
ENDLOOP.
CATCH cx_root INTO lo_exception.
lv_string = lo_exception->get_text( ).
WRITE lv_string.
ENDTRY.
But I have an error message :
Syntax error when parsing a query : Excepected symbol 'IN' (row: O, column: 7)Any idea ?
2014 Mar 03 10:21 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |