Getting a COUNT of unique document numbers loaded

What do i need to use in the Mapping in order to get the following results :-
I am loading from a Purchase Order Item table (with Purch.Ord. number as the key). As this is an item detail table, there will be multiple records for 1 purchase order no. the result i need is a COUNT of the unique list of PO numbers loaded from this table. how can i achieve this ?
even if i load from the PO header table (which will give me unique PO numbers for each record), how do i get the COUNT of records loaded from the table and use that result to put into my data warehouse target ?
thanks for any replies in advance !

thanks for the answer Igor. you have partially answered my question (as i am a newbie to OWB, i have to test out your suggestion to see if i can achieve the results you mentioned).
maybe an example will make my question clearer.
Assume 1 have records for 2 POs in table PURCHORD:-
PONUM POITEMNO PRDCODE QTY
10000 001 PRD_A 10
10000 002 PRD_B 2
10001 001 PRD_A 5
10001 002 PRD_B 1
10001 003 PRD_C 10
the result i expect if i extract records from this table i => 2 unique Purchase Orders (my measure in the Cube is count of POs)! it is basically a COUNT on the "DISTINCT (GROUP by PONUM)". i just can't figure out how to implement this in OWB.
thanks again

Similar Messages

  • How to get a count of unique records

    How do you get a count of unique records? Looking only for one number, not a list..so if the data is:
    ID
    ===
    1234
    1234
    1234
    1236
    1236
    1237
    Then, the count total will be one field called 'ID' with the value '3' in it..
    All I know how to do is get a count that will count all records, or do it in two queries. Looking to do this in one query statment..
    Thanks..

    Just a small clarification...
    Concatenation could potentially give wrong result, depending on the data.
    For example...
    sudhakar@ORCL>ed
    Wrote file afiedt.buf
      1  with t1 as
      2  (select 'AA' c1, '101' c2 from dual union
      3  select 'AA1' c1, '01' c2 from dual union
      4  select 'AA101' c1, null c2 from dual union
      5  select 'BB2' c1, '345' c2 from dual union
      6  select 'AA101' c1, null c2 from dual union
      7  select 'BB2' c1, '345' c2 from dual union
      8  select 'BB234' c1, '5' c2 from dual
      9  )
    10* select count(distinct c1 || c2) from t1
    sudhakar@ORCL>/
                        2IMHO, the required answer will be...
    sudhakar@ORCL>ed
    Wrote file afiedt.buf
      1  with t1 as
      2  (select 'AA' c1, '101' c2 from dual union
      3  select 'AA1' c1, '01' c2 from dual union
      4  select 'AA101' c1, null c2 from dual union
      5  select 'BB2' c1, '345' c2 from dual union
      6  select 'AA101' c1, null c2 from dual union
      7  select 'BB2' c1, '345' c2 from dual union
      8  select 'BB234' c1, '5' c2 from dual
      9  )
    10* select count(distinct c1 ||'.'|| c2) from t1
    sudhakar@ORCL>/
                             5
    sudhakar@ORCL>vr,
    Sudhakar B.

  • Using series for UDO document numbering

    Hey All,
    Does anyone know what else I need to do to implement series numbering on my UDO document? I have added the following line during the UDO registration:
    oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES
    And I have a docnum field on my custom form but I keep getting an error message stating document numbering must be setup for this form and the text box is empty.
    How do I get the autonumber to populate that text box?

    You haveee to declare the tables and link them. Mine usualy looks like this
    Dim oUserTable As SAPbobsCOM.UserTable
            Dim Rs As SAPbobsCOM.Recordset
            oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
            oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
            oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
            oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO
            oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
            oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
            oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tYES
            oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tYES
            oUserObjectMD.ChildTables.TableName = "DSH1"
            oUserObjectMD.Code = "DEAL"
            oUserObjectMD.LogTableName = "ADSH"
            oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES
            oUserObjectMD.Name = "Sheet" '"SM_DEAL_SHEET"
            oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_Document
            oUserObjectMD.TableName = "ODSH"
            lRetCode = oUserObjectMD.Add()
    Then i usualy do all the binding in the screen painter. Do it once off. But when you load the document you must also say what it will browse by
    oForm.DataBrowser.BrowseBy = "DealNo"
    Mine does not populate the box when in add mode. But if i scroll through the old records that have been added it shows the recorde number and all the relvant detail. Under document numbering in SAP make sure that it has created your series.....you should see it there
    Hope this helps.

  • How do you get word count to print at the end of a document in Pages?

    How do you get word count to print at the end of a document in Pages?

    Pages v5 does not provide a user assignable word count variable. With some AppleScript, and a paste operation from the clipboard, you can have locale punctuated word count in this format: 7,803 — anywhere in your document. The following AppleScript works with Pages '09 v4.3 through Pages v5.5.2 on Yosemite.
    I would suggest that you copy paste the following AppleScript into your [Apple] Script Editor and save it (suggestion) wordcnt.applescript. Then, follow this with an option+Save As… and this time set the File format to Script Bundle, or Application with hidden extension — saved to your Desktop. Provided you have a Pages document open, you are then a double-click from the ability to paste your current word count into Pages.
    Note: If you have Pages word count display enabled, it will automatically count your pasted value as another word which initially may deceive on true word count at the time the script was run.
    AppleScript
    --- copy below this line ---
    property locale : "en_US.UTF-8" -- In Terminal, use the locale command to see yours
    if not ApplicationIsRunning("Pages") then
         display dialog "Pages must be running to use this utility."
         return quit
    end if
    tell application "Pages"
        tell body text of front document
            set wordCnt to count words
            -- Don't want punctuated numbers? Remove the single quote from printf format
            set the clipboard to (do shell script "export LC_ALL=" & locale & "; printf \"%'d\" " & wordCnt)
        end tell
    end tell
    on ApplicationIsRunning(appName)
         tell application "System Events" to set appNameIsRunning to exists (processes where name is appName)
         return appNameIsRunning
    end ApplicationIsRunning

  • 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.

  • I get a please wait message, and the pdf document never loads?

    I get a Please Wait message, and the pdf document never loads. i have the latest version on my mac- no luck!

    windows xp version x1 the latest.  trying to open  in gmail.
    On Mon, Feb 17, 2014 at 1:23 PM, Claudio González

  • How to get Page Count of pdf in Document library in EventHandler

    Hi,
    How to get Page Count of pdf in Document library once uploaded has been done and i would like to update the page count value in document library column of the corresponding file.
    I should achieve it in Event handler.
    Which even should i use, either ItemAdded or "ItemUpdated "?
    Thanks & Regards
    Poomani Sankaran.

    Hello,
    If you are looking for file download or view count then event handler will not work. You need to enable the analytic report to your site. Once you enable it then you can see the report within a browser or you can also create custom webpart to show count
    of specific file.
    http://blogs.msdn.com/b/ecm/archive/2010/05/03/web-analytics-in-sharepoint-2010-insights-into-reports-and-metrics.aspx
    http://sharepoint.stackexchange.com/questions/34611/count-of-files-under-a-folder-in-a-document-library
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How do you get a word and character count of a document in Pages for Mavericks

    How do you get a word and character count of a document in Pages for Mavericks?

    Hi jonathan,
    I struggled with this one as well, as i'm finishing up a PhD thesis and word counts are incredibly important. Through trial and error i found out that words like 'e.g.' and 'i.e.' count as two words and an ampersand (&) doesn't count at all. That being said, i didn't like the fact that the word count always included footnotes and i was dismayed that i couldn't get an accurate count of words in the main body of my text. That all disappeared yesterday when, by chance, while i was copying a completed chapter and pasting it into my main document, i discovered that Pages can indeed give you an accurate word count excluding the footnotes!  Here's all you need to do:
    1. In pages 5.2, make sure that the Word Count function is first enabled by selecting View --> Show Word Count from the Pages Menu Bar. (If it's already enabled, it will read View --> Hide Word Count, so if that's what it says, then no need to do anything.)
    2. Once enabled, check the Word count that's currently showing at the bottom of the page. That's the word count including your footnotes.
    2. Now, place your cursor anywhere within the current document, then hit command+A (for Select All).
    3. Viola! Your word count now shows the actual number of words within the body of the text only, excluding footnotes!
    Hope that helps!

  • Exclude few document numbers from the load

    Hi All,
    I am trying to load data from a datasource in R3, (its a FM generic datasource). There are millions of records but I want to exclude few document numbers from the load. Does anyone know how to exclude? I have that field name in the selections
    Thanks in advance,
    shresh.

    Hi Shreesh,
    EIther you can write a Routine at the Infopackage level or do the FULL load upto PSA & then you can restrict the data by writing a start routine in the Transformation between this Datasource & your Data Target like
    DELETE SOURCE_PACKAGE where SOURCE_FIELDS-ABC = "give your restriction here"
    where ABC is the Source field name.
    Hope it helps!
    Regards,
    Pavan

  • TS3991 why are 2 of my Numbers documents not loading from icloud They appear in faded grey and I can't open them ? How do I recover them ?

    why are 2 of my Numbers documents not loading from icloud They appear in faded grey and I can't open them ? How do I recover them ?

    You may have to try deleting all the music from your phone (by going to Settings>General>Usage>Music, swipping All Music and tapping Delete), then sync it all back on with iTunes in order to fix this.

  • Where can i get reversal documents numbers for any documents

    Hi,
    pls tell me where can i see all reversal documents numbers eg: invoice document number..
    like that , may i know any tables and t-codes .
    thanks..

    this sounds like an interview question...
    FI documents are stored in table BKPF, if a document is reversed, the reverse document number will be stored in BKPF-STBLG
    SD invoice => table VBRK => field to check: SFAKN
    MM invoice => table RBKP => field to check: STBLG
    etc.
    as you can see for each type of document you'll find the information is separate tables

  • Array of unique random numbers - help?

    basically, i'm trying to create a BINGO card.
    i stared learning Java a week ago and am finding it easy to learn and use....at least so far.
    my instructor gave me the assignment to created a BINGO card. so i used the system.out.format command to make 5 tab fields, 8 spaces each ("%8s %8s %8s %8s %8s", "B", "I", "N", "G", "O"). although the assignment only wanted me to think numbers out of thin air, just to use as examples, i went above and beyond with the idea to make a BINGO card generator that could actually function.
    then i started the random number sequences, using the Math.random() command. all told, there are 24 of these in the program, one for each number on a bingo card. the field in the middle is the FREE space, so it has no Math.random command.
    in BINGO, each letter (one of my five tab fields) can have a number in ranges of 15. B is 1 to 15, I is 16 to 30, etc. it looks similar to this:
    B I N G O
    9 19 39 57 66
    3 28 32 51 74
    3 29 FREE 46 70
    14 28 43 55 67
    9 24 35 59 62
    as you can tell, i'm having trouble with actually making unique random numbers so that none repeat.
    is there a command or string or something to help me accomplish this?

    The best way I've come up with is to use an object to store the numbers that implements Collection--like ArrayList...
    Then you load it with the range of numbers that you want and call, shuffle() on the object, that will randomize your range of numbers and then you can choose the quantity you want from the storage object. So let's say you need 25 number in the range of 1 to 100:
    Add the numbers (you have to use classes so I would do Integers) 1 to 100;
    call shuffle()
    pull back the first 25 numbers
    This will guarantee that each number is distinct and in a random order.
    If you need multiple sheets populated, you can just call shuffle() between population of each sheet.
    package Junk;
    import java.util.ArrayList;
    import java.util.Collections;
    class Junk{
      private ArrayList<Integer> l;
      Junk(){
        l = new ArrayList<Integer>();
      public void loadList(int s, int e){
        for(int i=s; i<=e; i++){
          l.add(new Integer(i));
      public void randomizeList(){
        Collections.shuffle(l);
      public void printList5(){
        for(int i=0; i<5; i++){
          System.out.println(l.get(i));
      public static void main(String[] args){
        Junk j = new Junk();
        j.loadList(10,99);
        j.randomizeList();
        j.printList5();
        System.out.println();
        j.randomizeList();
        j.printList5();
    }

  • Cannot open Pages documents that I've worked on.  I open a new document, work on it, then save and close it.  When I try to open the document again, I get the following message: The document "[name]" could not be opened. The file isn't in the correct form

    I cannot open Pages documents that I have worked on and saved.  When I try to reopen Pages documents that I've saved, I get the following
    message:
    "The document “[name of document]” could not be opened. The file isn’t in the correct format.
    The file might be corrupted, truncated, or in an unexpected format."
    I have downloaded the latest update to iWork, but that doesn't help.
    I use Mac OSX 10.6.7
    I am using Pages '09 version 4.0.5 (852)
    If anyone can help, I would greatly appreciate it.
    Best regards,
    New York Mac User

    A few general trouble shooting tips that may apply here:
    1. If you used Software Update to do the OS update(s) to reach 10.6.7, go to http://support.apple.com/downloads/ and download and apply the Mac OS v10.6.7 Combo Updater. The Combo Updater contains some fixes that were not included in the incremental updaters used by Software Update.
    1a. Check that you have the current version of Pages (and of the other iWork applications) installed. All three applications' current version numbers end in .0.5
    2. A common cause of malfunctioning applications is a corrupted preferences file (.plist file). Your Pages '09's plist is at yourname > Library > Preferences > com.apple.iWork.pages.plist
    Quit Pages, locate the file and Drag it to the Desktop (or to the Trash).
    Restart Pages and attempt to open one of the files.
    If all is well, Trash the plist file and empty the Trash.
    If there's no change, AND you've made changes to the Preferences that you wish to keep, drag the file back to its previous location, replacing any new one that has been created.
    Regards,
    Barry

  • PO ref i need Table Data from GR,IR & Account Document Numbers

    Hi Fi/Co Family Please give me valuable suggestion ,
    Through PO Number we will get GR Number in TC: ME23, how can I get from table data with reference PO to GR, IR and Accounting Document Numbers.
    Regards,
    Venkat

    hi
    if ur problem is to find the document number only, then go to tcode me23n and give ur PO number and click on PO history tab on item details.
    hope it works.award if useful.

  • How to get the number of created document?

    Hi all,
    My first program in ABAP works very well. Thanks to all who helped me
    I would like only one function to it.
    The program read data from excel file and generates document using BDC. 
    I use this statement:
    call transaction 'F-65' using bdcdatafile
    I count the number of documents which have been generated or refeused because of error using the sy-subrc function.
    if sy-subrc <> 0.
        counter for errors
    else.
        counter for generated documents
    endif.
    Finally program displays these number on the last screen and the user knows if there everything is ok. For example this is a sample screen:
    1. OK.
    2. OK.
    3. Error.
    Number of imported documents (2)
    Errors (1)
    However, I would like to add one information to these screen. If the document is saved it gets its own number.
    Is any possibility to get this number for displaying?
    Maybe there is a function which returns this number.
    I want to get the scren like this:
    1. OK. Document No. 10000001
    2. OK. Document No. 10000002
    3. Error
    Best regards
    Arek

    The document number should be being passed back via a message.  You need to specifiy to return any messages in the messtab when calling the transaction.
    DATA: MESSTAB type table of BDCMSGCOLL WITH HEADER LINE.
    call transaction 'F-65' using bdcdatafile
                            messages into messtab.
    Messtab will have the messages after the call, you can then read this internal table and check for the success message, usually the document number is in the first variable field, MSGV1.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Youtube videos not showing up on safari

    When I go on youtube the videos aren't playing. Instead there is a black screen and a message came up saying that a script could not be run. Now, nothing is still working please help.

  • Firefox won't display toolbars.

    Firefox will only display the one bookmarks toolbar. I've tried options show more than one toolbar, add toolbar. I've tried uninstalling and starting fresh. I've tried downloading 3rd party toolbars like shoutcast radio, and it will show as an add-on

  • HOW TO CONNECT  SQL DEVELOPER FROM REMOTE DATADASE 11g SEREVER

    HI WE ARE USEING ORACLE 11g AS PRODUCTION DATA BASE SERVER ON (O.S -WINDOWS SERVER 2008 WITH JAVA 1.5) I WANT TO CONNECT ORACLE 11g(PRODUCTION DATA BASE) FROM THE SQL DEVELOPER(VERSION -sqldeveloper-3.0.03.45)--- installed on (WINDOWS XP PROFESSIONAL

  • All items in the exc. inv. 90 dtd 01.10.2009 of ven. 200380 has been recd

    Hi experts, It is a case of imported consignment.  We have received one invoice for 100 nos.  We are receiving  it partially into our premises.  The excise invoice no. is 90 dtd. 01.10.2009.  We did  successfully gate entry &  GRN for first lot - 10

  • BDC not creating automatic delivery for consignment fill up in VA01

    Hi, I am doing BDC for consignment fill up in VA01. When munually run VA01, it automatically creating delivery. But when run BDC ( call transaction ) it's not creating automatic delivery. why ? I am giving below fields.. Sales org. distribution chann