Skip to Content
0

Persistent class Query Ordering

Mar 14 at 01:45 PM

52

avatar image

Hello...

I am using persistent class for custom logs.

Everything is working OK, but I need one suggestion.

My code:

DATA(lv_query) = cl_os_system=>get_query_manager( )->create_query( i_filter = |APPID = PAR1 AND GUID16 = PAR2| i_ordering = ??? ).

DATA(lt_obj) = /ktr/ca_sys_logs=>agent->if_os_ca_persistency~get_persistent_by_query(i_query = lv_queryi_par1 = _appidi_par2 = _uuid).

For creating the QUERY I use two parameters for APPID and GUID16. and that is for query parameter i_filter. That is OK! For that query I get internal table with more rows and my problem is that I want to sort this table by one column!

I think that parameter I_ORDERING in method create_query is for that purpose....or not?

Can anyone show me an example how to use parameter I_ORDERING syntax?

Thanks in advance!

Best Regards

Robert

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Horst Keller
Mar 14 at 04:45 PM
1
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hello Mr. Keller...

Thank you very much for solution! Now it is working!

DATA(lv_query)   = lv_manager->create_query( i_filter   = |APPID = PAR1 AND GUID16 = PAR2|
                                             i_ordering = |SORTID DESCENDING| ).

Best regards!

1

And I added that to the query example :-)

1