Skip to Content
author's profile photo Former Member
Former Member

Retrieve a persistent object without the primary key


I'm a new developer with SAP/ABAP and I play with the persistent objects. I would know if it's possible to find an object in a table with another field than the primary key or without field to retrieve all lines in a table. Can you help me?

Thanks a lot.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 21, 2011 at 05:11 PM

    You can use Query services to get the persistent objects using other fields. Read more about query services on help at:


    Naimesh Patel

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Naimesh Patel

      So, if I understand, the persistent classes represents a single row and there is no way to generate a code which is able to find several lines. If I want to have this kind of functions I must to implement them manualy with the method if_os_ca_persistency~get_persistent_by_query. I think than that is missing. I'm a fan of Ruby On Rails and I think than ActiveRecord will miss me.

      Thanks for your answer.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.