Count of Documents

Hi,
How can we calculate count of documents using New Calculated key figure apart from  using replacement path.
Thanks
krish

Hi ,
Instead of doing it at the front end . You can simply write a routine in the end routine .
Please check the code suggested by me in the below post :
Re: Count of Sales Doc
In the front end you can do the following :
Create a formula (In Rows) and assign a value =1 and then save.
Now in Aggregation tab fill the below details :
Exception Aggregation : Select counter for all detailed values.
Ref. Characteristic: select the object for which you want the count ( billing document etc ).
Number of documents count in BEx
Thanks
Kamal
Edited by: kamal mehta on Jan 19, 2012 2:59 PM

Similar Messages

  • Retrieve document count in document library

    Guys, I'm trying to figure out how I can get the document count in a document library. I suspect we've reached the magical number of 5000 documents in a library which causes sync issues, and I need a way to find out if this is the case. I spend the last
    45 minutes searching the web for a solution just to count the documents in a library, but apparently, Sharepoint does not offer an easy way to view this information. I've found custom webparts and even apps to get the document count, but they require some
    in-depth Sharepoint knowledge I don't have.
    One of the sites I found:
    http://www.c-sharpcorner.com/UploadFile/anavijai/how-to-get-the-number-of-items-inside-the-folder-in-sharepoi/
    Is there another "easy" way to view the amount of documents stored in the document library ona Sharepoint Online site? I tried to use the "Browse with explorer" button to count al the documents. It works, but it counts about 4800 documents,
    so it probably does not count all the items stored.

    Hi Tom,
    According to your description, my understanding is that you want to retrieve the document count in document library.
    I suggest you can query all document in all folders using Client Object Model. Before you use Client Object Model, you need to install the SharePoint Componments SDK firstly.
    Here is a code snippet for your reference:
    ClientContext clientContext = new ClientContext("your site");
    Microsoft.SharePoint.Client.List spList = clientContext.Web.Lists.GetByTitle("Documents");
    clientContext.Load(spList);
    clientContext.ExecuteQuery();
    if (spList != null && spList.ItemCount > 0)
    Microsoft.SharePoint.Client.CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXml =
    @"<View Scope='RecursiveAll'>
    <Query>
    <Where><Eq><FieldRef Name='FSObjType' /><Value Type='Integer'>0</Value></Eq></Where>
    </Query>
    </View>";
    ListItemCollection listItems = spList.GetItems(camlQuery);
    clientContext.Load(listItems);
    clientContext.ExecuteQuery();
    Console.WriteLine(listItems.Count);
    Console.ReadKey();
    Here are some detailed articles for your reference:
    SharePoint Server 2013 Client Components SDK
    Complete basic operations using SharePoint 2013 client library code
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Zhengyu Guo
    TechNet Community Support

  • How to count FI documents according to its doc type?

    Hello everybody,
    The following posting is about ways to count FI documents according to its doc type, company code and year.
    At first, I was said that there is the table NRIV, wich gives the info when set with the 'object' parameter RF_BELEG. From this extract I can get the number of the last FI doc posted according to its CC, doc type and year. However, I am still missing the info when the doc type is 'external'. Could you see a solution?
    Thanks!
    Stan B

    hi Stan,
    go to SE16, enter BKPF, enter the document type you want to know (and company code and fiscal year and whatever) and click on Number of entries.
    hope this helps
    ec

  • Measuring point,counter & meas document

    What is the concept of Measuring point,counter & meas document in regard to PM ?

    Hi,
    Measuring Points are  measurement of physical condition like temprature pressure, and consumption like fuel, and reading like hour meter , speedometer etc.
    measuring points just like as log book of equipment
    it is created by ik01, against technical object with  characterstics of which we want to take measurment reading
    and  when actual reading are recorded against measuring point  , a document is genrated called measurment document
    it is crated by ik11, ik14 , ik34  against measuring point
    regards
    Jitender Suhag

  • Count of document

    Hi,
    Can anyone tell me how to find out the count of documents and line item count for a particular ccompany code and a definite date range.
    pls help me out

    Hi,
    the LIS report is only for order documents and the screen selection is not modified. You can create new LIS reports.
    The best solution (and the faster !!) is to create abap query with corresponding tables (VBAP, LIPS and VBRP + Check with status VBUP).
    And, in abap query, you'll find a counter (in ALV list, this is standard then with that functions with Tcode SE16n).
    I hope that's help you.
    Regards,
    Lionel

  • Repository service for counting downloaded documents

    Hi, 
        I want to write a repository Service for counting downloaded documents.
    In addRepositoryAssignment method, for which resource event type I have to register.
    (i.e)
      mgr.getEventBroker().register(this, ResourceEvent.??);
    or any other way to do this.
    Regards
    Ganesan S

    Hi Ganesan,
    Seems you have an index on the resources.
    I had a look into the repository service implementation on the blog. THis is what could be the reason:
    In <b>received</b> method you catch the GET resourceEvent (<b>first</b> hit). Then you get the resource in question and change/increment the property on this resource. For TREX in fact you change the resource. The event is catched by the IndexService and the TREX asks the CM for the document (<b>second</b> hit).
    I would suggest to store the hitcount in an Application property (this does not change the resource and fires no ResourceEvents) as here (could be some compilation errors - I haven't tested it but it should work):
    public void received(IEvent event) {
      IResourceEvent myEvent = (IResourceEvent) event;
      try {
        IResource res = myEvent.getResource();
        // get the app property service
        IRepositoryService repositoryService = repServiceFactory.getRepositoryService(res, IWcmConst.APP_PROPERTIES_SERVICE);
        IApplicationProperties aApplicationProperty = (IApplicationProperties) repositoryService;
        /// app property name
        PropertyName propertyNameHitCount = new PropertyName("http://sapportals.com/xmlns/cm","hitscount");
        //get the old value...
        IAppProperty hitcountOld = aApplicationProperty.getProperty(propertyNameHitCount, res);
        long hitcount_l = 0;
        if(hitcountOld!=null)  {
          hitcount_l = hitcountOld.getLongValue().longValue();
        hitcount_l++;
        // set the new value...
        AppProperty aAppProperty = new AppProperty(propertyNameHitCount, new Long(hitcount_l), null, true);
        aApplicationProperty.setProperty(aAppProperty, res);
      } catch (Exception e) {
        e.printStackTrace();
    I hope Detlev is ok with my solution
    Romano

  • Xpath count of documents having value

    Hi
    Is there a way to count items with certain field value in a document library?
    I have a custom list (ListA) and a custom document library (LibraryB). LibraryB's documents are linked to ListA with ListA's ID (one or more document(s) belong to a one list item). In LibraryB folders are enabled so linked document may be in the LibaryB's
    'root' or in sub folder (by desing only one folder deep structure is in use - this is for enabling some security settings per folder if needed).
    In customized web part (ListA and LibraryB in AggreageDataSource) something like this works if the documents are all in the root folder - current() is in context of ListA:
    <xsl:variable name="NoOfAttachments" select="count(/dsQueryResponse/LibraryB/Rows/Row[substring-after(@ListALink.,'#')=current()/@ID])"></xsl:variable>
    ListALink is a lookupvalue to ListA (ID of ListA). Subfolder's name is know, it is a field name in ListA. Linked documents may be in the root or in the subfolder. I use NoOfAttachments later on for displaying attachments icon if NoOfAttachments>0.
    How would the NoOfAttachments value be calculated using xpath if document is in a subfolder?

    Hi Janne,
    Please create a lookup type column in ListA to look up "ListALink(Count Related)" from LibraryB, then listA will show the current listA item referenced count by LibraryB, see if this also could achieve your goal.
    http://pawansatope.blogspot.kr/2012/01/how-to-create-count-related-lookup.html
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Daniel Yang
    TechNet Community Support

  • Head count planning document

    Hi ,
    Please help me with the head count or personal planning document as I need to give the presentation for the same
    with one of our client.
    I will appreciate if documents are sent on my mail id rather links to sap are given.
    Word document can also help.
    My mail id [email protected]
    Regards
    Chicky

    No answer came for this, so closing it.

  • Can I create a list which counts the number of documents of a specific metadata type by the folder they are stored within?

    Running SP2013 Foundation. My users interact by uploading documents to personal folders within a document library, selecting the type of document they have uploaded via a lookup column and SP list. I have two levels of view in my library, a top level view
    and an in-folder view which contains the metadata and standard document information like version and modified date etc.
    Currently I am able to count the total number of documents that have been uploaded of a particular document type against my document type list, but I would also like to include folder along with document type to thoroughly track document returns by folder
    name. The desired output being a list with a count of document type uploaded by folder name.
    I have tried creating an associated user column at the top level view and also uploading an associated user and folder name list.
    Is this possible and how would I go about this?
    Many thanks for any assistance

    Hello MJH9J,
    Thank you for your question.
    We are currently looking into this issue and will give you an update as soon as possible.
    Thank you for your understanding and support.
    Best Regards,
    Zhengyu Guo
    Zhengyu Guo
    TechNet Community Support

  • How to get the count of items(folders or documents) in a SharePoint document library and for a folder in any SharePoint document library?

    I need to get a count of documents and folders in a selected document library(the item for EventRecievers for event deleting) and the count of documents in a selected folder(the item for EventRecievers for event deleting) to determine whether the item(document
    library or folder) is empty or not, as I need to use this condition for one of my custom EventReceivers.
    Can you please suggest me the code to do the same?

    Hi.
    Try this:
    class Program
    static void Main(string[] args)
    using (SPSite site = new SPSite("http://z2012net"))
    using (SPWeb web = site.OpenWeb())
    SPList l = web.Lists["List001"];
    List<FolderInfo> res = new List<FolderInfo>();
    getListCount(l.RootFolder, ref res);
    private static void getListCount(SPFolder sPFolder, ref List<FolderInfo> res)
    SPQuery query = new SPQuery();
    query.Folder = sPFolder;
    res.Add(new FolderInfo() { ItemCount = sPFolder.ItemCount, Name = sPFolder.Name, Url = sPFolder.Url });
    SPListItemCollection items = sPFolder.ParentWeb.Lists[sPFolder.ParentListId].GetItems(query);
    foreach (SPListItem item in items)
    if (item.FileSystemObjectType == SPFileSystemObjectType.Folder)
    SPFolder f = sPFolder.ParentWeb.GetFolder(item.UniqueId);
    getListCount(f, ref res);
    class FolderInfo
    public string Url { get; set; }
    public string Name { get; set; }
    public int ItemCount { get; set; }
    Regards,
    Bubu
    http://zsvipullo.blogspot.it
    Please mark my answer if it helped you, I would greatly appreciate it.

  • Looking for way to count a specific document hits(Not with Activity Report)

    Hello,
    I have a certain Word document that I want to count how many users opened it. I am aware of the Portal Activity Report but this report tracks only iViews/pages ect. and my document is inside a KM iView which contains many other documents and I want to count just that specific Word document.
    Is there a KM property that can be created or a service that can be applied in order to count this document's hits by users?
    Message was edited by: Roy Cohen

    I have created a repository service which count document hits using a custom property defined.
    We are using NW04SP12.
    This is our code:
    ========================================
    package com.hesa;
    import java.util.Collection;
    import java.util.Iterator;
    import com.sapportals.wcm.WcmException;
    import com.sapportals.wcm.crt.component.IReconfigurable;
    import com.sapportals.wcm.crt.component.StartupException;
    import com.sapportals.wcm.crt.configuration.ConfigurationException;
    import com.sapportals.wcm.crt.configuration.IConfiguration;
    import com.sapportals.wcm.repository.IProperty;
    import com.sapportals.wcm.repository.IResource;
    import com.sapportals.wcm.repository.Property;
    import com.sapportals.wcm.repository.PropertyName;
    import com.sapportals.wcm.repository.ResourceException;
    import com.sapportals.wcm.repository.manager.IRepositoryManager;
    import com.sapportals.wcm.repository.manager.IResourceEvent;
    import com.sapportals.wcm.repository.manager.IResourceEventReceiver;
    import com.sapportals.wcm.repository.manager.ResourceEvent;
    import com.sapportals.wcm.repository.service.AbstractRepositoryService;
    import com.sapportals.wcm.repository.service.ServiceNotAvailableException;
    import com.sapportals.wcm.util.events.IEvent;
    public class SampleService extends AbstractRepositoryService implements IResourceEventReceiver, IReconfigurable {
      private static final String TYPE = "com.hesa.kmtest.SampleService";
      private Collection repositoryManagers;
      public SampleService() {
         super();
      public String getServiceType() {
         return SampleService.TYPE;
      protected void startUpImpl(Collection repositoryManagers) throws ConfigurationException, StartupException {
         this.repositoryManagers = repositoryManagers;
         Iterator it = repositoryManagers.iterator();
         while (it.hasNext()){
           try {
              addRepositoryAssignment((IRepositoryManager) it.next());
           } catch (ServiceNotAvailableException e) {
              e.printStackTrace();
      protected void shutDownImpl() {
         Iterator it = repositoryManagers.iterator();
         while (it.hasNext()){
           try {
              removeRepositoryAssignment((IRepositoryManager) it.next());
           } catch (WcmException e) {
              e.printStackTrace();
      protected void addRepositoryAssignment(IRepositoryManager mgr) throws ServiceNotAvailableException {
         try {
           mgr.getEventBroker().register(this, ResourceEvent.GET_TEMPLATE);
         } catch (WcmException e) {
           e.printStackTrace();
      protected void removeRepositoryAssignment(IRepositoryManager mgr) throws WcmException {
         mgr.getEventBroker().unregister(this, ResourceEvent.GET_TEMPLATE);
      public void received(IEvent event) {
         IResourceEvent myEvent = (IResourceEvent) event;
         try {
           IResource res = myEvent.getResource();
           PropertyName propertyNameHitCount = new PropertyName("http://sapportals.com/xmlns/cm","hitcount");
           Property propHitCount = new Property(propertyNameHitCount,new Integer(0));
           if (res.getProperty(propertyNameHitCount)!=null) {
                IProperty oldHitCount = res.getProperty(propertyNameHitCount);
                String sOldHitCount = oldHitCount.getValueAsString();
                int iOldHitCount = Integer.parseInt(sOldHitCount);
                iOldHitCount++;
              propHitCount = new Property(propertyNameHitCount,new Integer(iOldHitCount));
              res.setProperty(propHitCount);       
         } catch (ResourceException e) {
           e.printStackTrace();
      public void reconfigure(IConfiguration arg0) throws ConfigurationException {
    ========================================
    Remember, you must activate this service in the correct repository (System administration -> System configuration -> Knowledge Management -> Content Management -> Repository Managers -> CM Repository).
    These changes requires that you restart the server.
    I think this could help you.

  • Document Count

    Hello Gurus,
    I have a requirement to display the document count of Document numbers.
    I am querying on an infoset, which has a Cube and an DSO. The cube contains header data. Hence there is 1 count against the document number. The DSO holds item details, which would have more than 1 item per document number.
    When I execute the query I would like to see Count = 1, against Doc no. 10001, which has 3 line items in the DSO. Instead its showing the Count = 3.
    Is there a way around for this.
    Thanks in advance

    Hi,
        Just refer this document,
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/009819ab-c96e-2910-bbb2-c85f7bdec04a
    Hopefully this will work on Infoset also.
    Regards,

  • Counting Posted docuemnt in FI based on Document Type

    Hello Team,
    As a part of audit trail...I need to count all the posted FI documents based on document type and Company code. Table BKPF does not meet my requirement as it takes lot of time to count the documents and even not possible to get the break-up. is there any report / T.Code with with i can achieve my purpose.
    Please reply.

    Hi,
    1. Go to T-code TAANA and click on Start table analysis (F8).
    2. Enter BKFP as table name and click the push button "Analysis variant". In the next popup,  click     on "Ad Hoc Variant" button.
    3. Select the fields Company code, Fiscal year, Doc type and continue.
    4. Select the new variant and continue.
    5. Select the run in background option and proceed.
    6. Click on Immediate and the save the job
    7. Click on Job (F9) to see the job status
        Once job finish click on back
    8. Double click on AD-HOC to see the results.
    Regards
    Rohidas Shinde

  • Count the number of a certain document type in a document-set

    The Content types allowed in my Document-Set are document type A and document type B. How can I count the number of document type A in the document-set with workflows? I need to know if there is at least one document of type A inside the
    document-set. With “Item child count” condition in workflows I can only count the total number of the documents and not the number of specific document type.

    Hi pax123,
    According to your description, my understanding is that you want to count the number od the documents based on Content Types.
    As a workaround, you can create two columns to store the count of documents for your two content types. Then create a loop action to loop all documents, if content type is equal to your content type A, do a calculate to plus 1 to the numberA, then update
    the column numberA. Do a same if condition in the loop for your content type B.
    How to loop through all items
    http://blog-sharepoint.blogspot.com/2010/01/sharepoint-looping-workflow-how-to-loop.html
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • How many times a document (item) visited

    Hi,
    is there an option to see / show how many times ,like hit count, a documents viewed by the users? if not, is there anybody who has achieved this,
    Thanks in advance..

    Hi,
    This is very simple job.
    If you want this to be achieved using the JSP use the following code.
    <%!
    int iCount = 0;
    %>
    <%
    iCount = iCount + 1;
    %>
    If you want to achieve in HTML just have a look @ the following link.
    http://www.hit-counter-download.com/
    Regards,
    Vijay.B

Maybe you are looking for

  • How to display long text in smartforms

    Hi experts, Iam trying to display long text into smartforms.I got the long text into ITAB frm database in the abap program.In the form interface how to define the variable?In the long text i have 6 lines. points guaranteed cheers kaki

  • Pull Vendor Data

    I have a request to pull Vendor information from a table(s) that will list the VN/OA/PI partner with the address associated with each.  Please advise if you are aware of any method to gather this data. Thanks - points will be rewarded.

  • Installing 10.6 on iMac using MacBook Pro install DVD

    Hi I have a 24inch intel 2 core iMac from early 2008 with 10.5.6 installed and I just bought a MacBook Pro with Snow Leopard. I want to upgrade my iMac to 10.6 but before I purchase it I wanted to check if my apps etc would work. I used the MacBook P

  • Insert columns of one array into another

    how can one insert columns of an array into another array at every odd place of that array in which insertions are to be made? In short, columns of one array to be inserted into another array bt possibly in between the already initialised array.  Sol

  • Why isn't 0 degrees on Angle Finder with the buttons side up?

    I find it kind of silly that Angle uses the NON flat side of the phone for 0 degrees. With the iPhone sitting on the volume buttons and mute switch how are you suppose to get a good reading. Plus now my phone wants to fall over so I can't let it sit