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

RFC function module to count records in DB table

Hello all over there,

I need RFC enabled FM to count amount of data records in another SAP's database table.

I've tried to use FM: DB6_DIAG_COUNT_TABLE_ENTRIES but I got an error:

ORA-00942: table or view does not exist

when I supplied 'TABLESCHEMA' as import parameter.

Do you have an idea what is the purpose of this parameter?

Best regards,

Martin

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2004 at 12:46 PM

    Hallo Martin,

    you could use the EM_GET_NUMBER_OF_ENTRIES. You just have to write your table name into the input table IT_TABLES in the TABNAME field. The thing is also RFC-enabled.

    I hope this works for you.

    Cheers, Gerard White.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 27, 2004 at 01:33 PM

    I have tried the same RFC.

    Use "SAPR3" as the table schema. It is the owner of the SAP database in DB2. I think this might only work in DB2, have not tried other databases. Be aware that DB6_DIAG_COUNT_TABLE_ENTRIES counts the entries in all clients, i.e. it is not a client dependent count. It is a count at the physical data level, and does not take into consideration any client fields.

    If you find any other RFC to count table entries, including the possibility to include a where clause, I would be most interested. Something like a variant of RFC_READ_TABLE but that returns a record count only, and not the data itself.

    cheers

    Thorsten.

    Add a comment
    10|10000 characters needed characters exceeded

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.