Skip to Content

Get Pernr

Hi,

I've written an abap program using the logical database PNP to select the employees record using the statement 'Get pernr'. I would like to know if there are ways to get the total number of records that can be selected.

Thanks,

Francis

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Oct 10, 2005 at 03:39 PM

    Thats not passible. Imagine having a select statement, there is no way of getting the number of resulting rows ahead the statement. you have tp process the select statement twice, first to get the amount, and then to ge tthe rows. in the first step you can optimize the select with count(*), but nevertheless, it is executed twice. So you have to execute the logical database in advance, there are funcion modules to do that. For performance reasons, thats not a good choice.

    On the other hand, when the get event is triggered and your program is getting the first rowm most work by the database is done and you're only fetching row by row.

    Add a comment
    10|10000 characters needed characters exceeded

    • Another possible solution:

      • get the last employee id from the table that contains the sequence numbers (don't know the table out of the head)

      If you are interested I can try to look this up...

      This will not be completely correct but it might be a enough to make an estimation

      Cheers,

      Wim

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.