Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Persistent class Query Ordering

robert_ktr
Explorer
0 Kudos

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

1 ACCEPTED SOLUTION
3 REPLIES 3

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!

horst_keller
Product and Topic Expert
Product and Topic Expert

And I added that to the query example 🙂