[SAP CRM] How to get just the hit count of objects with a database query?

Hello,
i need help. For performance reasons I dont want to get the query result with all the objects from the database. I just want to send a request / query to the database in order to know how many entries are there available with my search parameters.
At the moment I load all the objects via class cl_crm_bol_dquery_service and the method get_query_result in an internal collection. And after that I call the method size in my collection object. But to gain better performance I just want to know the count. With standardized select statements I would take the select count statement, but in this case it is not possible.
So I tried to call the retrieve_hit_count method, but I will receive the exception cx_sy_no_handler anytime.
I would be very pleased to receive an answer <removed by moderator>.
Thank you very much!
Marcus
Edited by: Thomas Zloch on Feb 16, 2011 1:45 PM - priority normalised

It will be 0 before the call method statement and 1 during exception handling.
The exception starts in CL_CRM_BOL_DQUERY_SERVICE=>RETRIEVE_HIT_COUNT when the system tried to perform the following statement:
  Return hit count if already available
    rv_hit_count = me->handle->get_hit_count( ).
The handle variable seems to be empty. But why?
Edited by: Marcus Findeisen on Feb 17, 2011 9:24 AM
Edited by: Marcus Findeisen on Feb 17, 2011 9:27 AM

Similar Messages

  • How to get all the values of a variable with F4 with checkboxes to select

    Dear Experts,
    After Executing a query by giving let 3 values(Out of 10 Values) to a variable.
    To give 2 more input values to the same variable(i.e.,total I wanted to give 5 inputs this time ),after refreshing the query,for that variable if I click F4, I am seeing the historical values(i.e.,3) and remaining 7 values also But with out any Check Boxes besides them to select the 2 inputs.
    In the same F4 Screen, If I click all values(an Icon at The bottom),then also Im seeing but no check Box.
    I hve tried by deleting the Delete Personalization also,but no use.
    Please tell me How to get all the values with F4 with check boxes to select ,whatever I want??
    Thanks in advance

    Take a look at the InfoObject and go to the Business Explorer tab. If the 'Query Def. Filter Value Selection' is set to 'Only Values in InfoProvider', you're only going to get the values in F4 that exist in the InfoProvider, not everything in the Master Data. This would need to be changed to the value of 'Values in Master Data Table' if you want it to show everything possible when F4 is chosen.
    Likewise, you're going to need to look at the query and go to the Advanced tab for the InfoObject. Make sure that the radio button for 'Values in Master Data Table' is selected. If not, then you should change that selection.

  • How to get just the key from a database ?

    Hello, the sample at FAQs was not enought to me...
    My code to retrieve just the key (Exists this record ?).
    //     Checks if the ticket exists in the database.
    BOOL     CDSDBBD::TicExist(     char     *pcaTicCod)
         int          iResult;
         int          iLen;
         Dbt          dbtKey;
         Dbt          dbtData;
         char     caError[256];
         iLen     =     strlen(pcaTicCod);
         dbtKey     .set_data((void*) pcaTicCod);
         dbtKey     .set_size(iLen);
         dbtData     .set_flags(DB_DBT_PARTIAL);
         dbtData     .set_dlen(0);
    //     dbtData     .set_size(0);
    //     dbtData     .set_doff(0);
    //     dbtData     .set_data(NULL);
         try
              iResult     =     m_pdbTic->get(NULL, &dbtKey, &dbtData, 0);
         catch(DbException &e)
              m_pdbRafCal->err(e.get_errno(), "Error!");
              sprintf(caError,     e.what());
         catch(std::exception &e)
              m_pdbRafCal->errx("Error! %s", e.what());
              sprintf(caError,     e.what());
         if(iResult != 0)
              return     FALSE;
         return     TRUE;
    all times i got "Db::get: Invalid argument".
    Thanks,
    DelNeto

    Thanks Alexander.Gorrod, the return value, from get, was "-858993460", but the error code at exception was "-30999", that is DB_BUFFER_SMALL. The final code look like this:
    memset(&dbtData, 0, sizeof(dbtData));
    dbtData.set_flags(DB_DBT_USERMEM);
    dbtData.set_ulen(0);
    try
    // You can then call get as you would normally:
    iResult = m_pdbTic->get(NULL, &dbtKey, &dbtData, 0);
    catch(DbException &e)
    if(e.get_errno() == DB_BUFFER_SMALL)
    return TRUE;
    catch(std::exception &e)
    sprintf(caError,     e.what());
    return FALSE;
    Thanks for the tip,
    DelNeto

  • Getting just the date out of MySQL with CF8

    I have a mysql table that includes a column 'intakeDate' set to the data type of DATE. When entering, it creates a record of YYYY-MM-DD. When I query the database with Coldfusion for the date of 2004-06-10, I get the result of {ts '2004-06-10 00:00:00'}. Fine and dandy for people in my timezone, but I found that if my users are in any timezone west of Eastern, the date slips back to the day before and their 'time stamp' is 23:00:00 (or appropriate offset). How can I get Coldfusion to just return to my Flex application only the value inside the table and not its ts version with midnight attached. Again, the table is set to only DATE and not TIMESTAMP or DATETIME so there are no time values entered. Also, mind you that this is being sent to a Flex application's manage class. Since some of this information deals with shot records and medical records, date is very important.
    I tried the MySQL function of DATE but it doesn't change the output.
    <cfquery name="list" datasource="#request.dsn#">
        Select DATE(intakeDate) as intakeDate FROM pets
    </cfquery>
    RESULTS IN:
    {ts '2010-12-29 00:00:00'}   {ts '2010-11-18 00:00:00'}    {ts '2009-12-28 00:00:00'}   {ts '2009-10-03 00:00:00'}   {ts '2009-07-13 00:00:00'}   {ts '2009-10-03 00:00:00'}    {ts '2008-06-01 00:00:00'}   {ts '2008-02-09 00:00:00'}   {ts '2003-03-01 00:00:00'}
    {ts '2004-06-10 00:00:00'}   {ts '2003-03-01 00:00:00'}    {ts '2004-06-01 00:00:00'}   {ts '2001-06-01 00:00:00'}   {ts '2010-04-01 00:00:00'}   {ts '2011-04-06 00:00:00'}    {ts '2011-04-06 00:00:00'}    {ts '2004-11-01 00:00:00'}    {ts '2010-05-04 00:00:00'}, etc
    I've been googling it all day and nothing I see if working.
    Thank!

    Thanks for pointing that out. I was playing DATE_FORMAT to convert to a string
    DATE_FORMAT(p.intakeDate, '%Y-%m-%d') as intakeDate

  • How to get around the stop in playback associated with search?

    Why does the search function stop playback? If you are listening to an album by one artist and want to search for music by another artist, say, to load onto an iPod, playback of audio will stop after the last track to by the first artist ends. It doesn't switch to a track in the artist you searched for's catalog, it just entirely stops.
    This is highly annoying. Is there a way to tell Itunes to just keep playing when searching for other music? I would prefer to have it keep playing songs by the first artist selected, but if there's only a way to make it jump to whichever one a search is performed, that's fine too.

    Not really, though I suppose you can always clear the search box before the current track comes to an end if you notice. This one trips me up from time to time too. I generally try to play tracks from the Music source and use other playlists for maintenance.
    tt2

  • How can I get just the text to resize, rather than the entire web page?

    I used to be able to re-size just text on a webpage by typing Ctrl + +. Today, the entire webpage re-sizes, and when I move to another page it reverts. (I see this mostly in Facebook.). Why did this change, and can I go back to having just the text re-size?

    ''How can I get just the text to resize -- zoom text only''
    steps
    #"Alt" if no menu bar, then
    # View > Zoom > Zoom Text Only
    Zoom text of web pages - MozillaZine Knowledge Base
    :http://kb.mozillazine.org/Zoom_text_of_web_pages
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small>

  • I downloaded pictures onto my iPhone from computer twice by mistake now when i uncheck/sync then check and sync again  i keep getting two lots of pics..how can i get just the one set again? thnx

    I downloaded pictures onto my iPhone from computer twice by mistake now when i uncheck/sync then check and sync again  i keep getting two lots of pics..how can i get just the one set again? thnx

    You're welcome.
    All photos transferred from your computer are stored in the iPhone's Photo Library regardless if you select a single album or folder of photos to be transferred or multiple albums or folders. The photos on the albums or folders of photos include a pointer to the original photos stored in the Photo Library. The photos are not duplicated taking up double the storage space. This way you can view the photos in an album or folder of photos only by selecting the album or folder, or all photos in all albums or folders by selecting Photo Library.
    Makes more sense when transferring multiple albums or folders of photos which cannot be changed when transferring only a single album or folder of photos.
    The same applies with iTunes and music playlists. A song can't be in a playlist unless it is in the main iTunes library. Placing a song in a playlist does not duplicate the song.

  • How do I turn on my ipad, I just got it and I don't know how to get to the home screen. Also, is itunes free on the ipad

    How do I turn on my ipad, I just got it and I don't know how to get to the homescreen. Everytime I turn it on there is a black screen, the white charger, and the blue itunes circle. Also, are itunes free.?

    You must activate the iPad within iTunes on your computer. Make sure you have the latest version of iTunes on your computer (read the minimum requirements for the iPad printed on the iPad box) and connect the iPad to your computer with the supplied cable to a 2.0 USB port - not a port on a hub- a port on your computer. iTunes should start and take you through the process.
    iTunes on the iPad is a store where you purchase media - it is not the music player. The iPod app is the music player. Both apps are pre installed on the iPad.

  • How do I get just the homepath?

    I have this code:  
    $user = 'MyUser'
    $getU = Get-ADUser $user -Properties homedirectory
    It works but it returns a lot of data, DistinguishedName, GivenName, etc...etc.... and it returns HomeDirectory.   It looks like this in the output
    HomeDirectory     : \\USR-FS02\MyUser$
    how do I get just the \\USR-FS02\MyUser$   ???
    mqh7

    To get just the value of the homedirectory property of $getU:
    $getU.homedirectory
    or
    $getU | select -ExpandProperty homedirectory
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • My mozilla firefox search engine always defaults to amazon...how do I get just basic mozilla firefox search screen with out the default to amazona?

    My mozilla firefox search engine always defaults to amazon...how do I get just basic mozilla firefox search screen with out the default to amazon.com for everything ?

    Change the search plugin in the search bar to something else and you can search with that.

  • SAP CRM - How does Communication Station work?

    Hi Experts,
    Can anybody tell how the communication station work in SAP CRM?
    For example if the service agent has performed the service at the field or customer location and uses the mobile client device to confirm the service, how does the data gets synchronised with the CRM server? How the connection to the communication station work?
    Thanks a lot!
    Regards,
    Swathi

    Hello Swathi,
    Commstation sits between your mobile client and CRM server and acts as a channel of regulating  the data exchange.
    On your mobile client, the application data is saved in IDES and when you need to sync that data with the CRM server, you need to run Conntrans.
    Conntrans first connects with Commstation(which is a separate system) and then commstation allows conntrans to sync the data with Server. Commstation is basically a system which hosts a SAP CRM Transfer Service(a COM+ application).
    On your client system, the first thing that conntrans does is initialize this transfer service on commstation and then the further data exhcnage takes place.
    Commstation also doesn't allow CRM to be loaded with synchronization requests from several client machines. Imagine 1000 conntrans users sync the data with the same CRM server at the same time. Now you don't want the CRM server to be unnecessarily loaded with such sync requests. To limit this data exchange wherein only several(lets say 10) clients are allowed to sync the data via conntrans at 1 time, commstation comes in handy. As and when 1 conntrans session finishes and resources are deallocated on commstation, another client system can sync the data.
    In the dcomcnfg->COMApplications->SAP CRM Transfer Service, right click and check the properties. Resource pooling is handled via this COM application on Commstation.
    Hope that explains the function of Commstation to you
    Thanks,
    Rohit

  • How does the hit counter work?

    hi
    a while ago i made a web site with a hit counter on it
    i wrote the hit counter using php and a flat text file to store the number of hits
    i experienced a number of problems
    1. if someone visited the site more than once, the hit counter would go up each time they visited. this is not really desired as i really only want to know how many unique hits i get
    2. web bots and web crawlers would also make the counter go up
    does the hit counter that iweb generates suffer from this problem?
    how does it work - from total hits or only unique hits?
    does anyone know it web crawlers effect the counter?
    thanks!

    It is a hit counter and will register even when you visit the website.
    I found this annoying, so I ditched the iWeb hit counter and went to Bravenet and downloaded a visit counter instead. You can customise your design and can have a visit counter instead of a hit counter and you can also set it to ignore your own hits - so if you want to visit your site to see how it looks it won't register your hit. The hit counter will register each time and for every page, whereas a visit counter will just register the visit to the first page and then thats it. If you use Bravenet it will give you stats too.
    I am sure you can get hit counters and visit counters from lots of other sources though.

  • How to get all the values from the dropdown menu

    How to get all the values from the dropdown menu
    I need to be able to extract all values from the dropdown menu; I know how to get all those values as a string, but I need to be able to access each item; (the value in a dropdown menu will change dynamically)
    How do I get number of item is selection dropdown?
    How do I extract a ?name? for each value, one by one?
    How do I change a selection by referring to particular index of the item in a dropdown menu?
    Here is the Path to dropdown menu that I'm trying to access (form contains number of similar dropdowns)
    RSWApp.om.GetElementByPath "window(index=0).form(id=""aspnetForm"" | action=""advancedsearch.aspx"" | index=0).formelement[SELECT](name=""ctl00$MainContent$hardwareBrand"" | id=""ctl00_MainContent_hardwareBrand"" | index=16)", element
    Message was edited by: testtest

    The findElement method allows various attributes to be used to search. Take the following two examples for the element below:
    <Select Name=ProdType ID=testProd>
    </Select>
    I can find the element based on its name or any other attribute, I just need to specify what I am looking for. To find it by name I would do the following:
    Set x = RSWApp.om.FindElement("ProdType","SELECT","Name")
    If I want to search by id I could do the following:
    Set x = RSWApp.om.FindElement("testProd","SELECT","ID")
    Usually you will use whatever is available. Since the select element has no name or ID on the Empirix home page, I used the onChange attribute. You can use any attribute as long as you specify which one you are using (last argument in these examples)
    You can use the FindElement to grab links, text boxes, etc.
    The next example grabs from a link on a page
    Home
    Set x = RSWApp.om.FindElement("Home","A","innerText")
    I hope this helps clear it up.

  • How to get(copy) the contents i.e the cell of an excel sheet to other excel

    How to get(copy) the contents i.e the cells of an excel sheet to another excel sheet.
    I can read the contents i.e the text in the cells and able to display it in the Java console
    i want these contents to be copied to another excel sheet with the cells data.
    I am using Java Swing for the UI, POI framework for the excel work.
    Please anyone suggest some code to this requirement.

    [spreadsheets with poi|http://poi.apache.org/spreadsheet/converting.html] Hi
    on the poi apache site there's a number of good examples...
    I started with poi only a week ago, but just from reading these examples
    (especially SS Usermodel code) i managed all i needed to know (so far).
    kind regards
    BB
    Edited by: BugBunny on Feb 22, 2010 4:36 AM

  • How to get on the apple seeding program?

    How to get in the apple seeding program. I really want to to test apples new iOS software.

    Yes, but if you're not already a developer you shouldn't be testing beta software.
    You shouldn't test beta versions of iOS on your day-to-day phone. You should have dedicated phone just for testing and it needs to be registered with Apple.
    Being part of the developer program and having access to iOS betas is not intended for just curious, non-developer people. It is for real developers who need to test their own apps on future versions of the OS and provide detailed feedback to Apple for bug fixing.
    If you're just curious about new OSs, don't bother.

Maybe you are looking for

  • Tv shows on my nano

    I purchased some tv shows on itunes, but they won't transfer to my nano

  • Unable to start remote desktop connection broker

    somehow I could no longer start remote desktop connection broker service. I noticed that Windows image acquisition (WIA) service could be started manually and then it stopped by itself. I am not sure if they are related or not. From event viewer, I s

  • Podcast Main page in other Languages ??

    How could I swith to french main podcast page to, for instance, US main podcast page or any language available in iTunes ? Hum, Maybe it's allow to do this ? Thanks

  • Radio Application

    I would like to know how I can get a radio application for my blackberry.

  • Can I run job PROGRAMs in process chain under my user-id?

    Hi! I have a following problem. When schedule PROCESS CHAIN, then all JOBs are created with my user-id, but programs in STEPs are running with default system user-id (in our case - it's BWADM). Is it possible to make a setup that programs (i.e. steps