Create a counter(in a query) by how many unique items are in a document num

Hi,
Is there a way for me to create a counter(in a query) by how many unique items are in a document number?
If you look at the bold amounts below they have two unique item numbers 3 & 11. Because of that data is being duplicated in the InfoSet. The Subtotal needs to be 13500 instead of 27000. The two subtotals above are correct. I was thinking if I can create a create a counter(in a query) by how many unique items are in a document number (in this case it would be 2). And then if i divide Quantity by that counter, i shall get the correct value of 13500.
How can i do this?
Thanks
Doc Num                  Item #       Quantity
5900001759     11     2,700
5900001759     11     5,400
5900001759     11     2,700
5900001759     11     2,700
5900001759          13,500
5900001890     7     2,700
5900001890     7     5,400
5900001890     7     2,700
5900001890     7     2,700
5900001890          13,500
5900002176     3     2,700
5900002176     11     2,700
5900002176     3     5,400
5900002176     11     5,400
5900002176     3     2,700
5900002176     11     2,700
5900002176     3     2,700
5900002176     11     2,700
5900002176          27,000          
                         54,000

Create a New Calculated Key Figure
From the context menu for the Formula Variable, choose New Variable
Choose the Processing type as Replacement Path
In the next screen, select the Characteristic Info Object based on which the number of documents is to be displayed in the report (For example: Document Number / Order Number).
Choose Next.
In the Replace Variable with drop down box, choose Attribute Value.
In the Attribute drop down, select Characteristic Reference (Constant 1).
Choose Next.
On the Save Variable page, an overview of the settings made for the variable will be displayed.
Confirm the entries and Choose Finish.
Open the formula variables directory and use Drag & Drop to transfer the formula variable
To avoid the warning message, the formula variable is multiplied by 1
The most important step here is to set the Time of Calculation to After Aggregation in the KF properties.
(by Default the Time of Calculation is set to After Aggregation)
The new calculated key figure is available under Calculated Key Figure in the Key Figure directory, and can be included in the query definition using Drag & Drop.
Hope this help
Rgds

Similar Messages

  • Need FM/BAPI to get how many line items per given FI document...

    Hello Experts,
    IS there an available FM or BAPI to get how many line items there is for a given
    FI document? We are avoinding BSEG because of the performance.
    Hope you can help me guys. Thank you and take care!

    Hi,
    Not sure if there is a specific FMs or BAPIs whose specific purpose is to just count FI document lines. But you can use a number of FMs to read an FI document.
    i.e. FI_DOCUMENT_READ - pass the document keys (BUKRS, BELNR, GJAHR) and retrieve the T_BSEG table to get the document lines. Then you can just use DESCRIBE statement to get the number of lines in T_BSEG.
    Also, based on experience, I never had any problems with BSEG as long as I am providing the complete keys for an FI document (BUKRS, BELNR, GJAHR). But if you are trying to avoid BSEG, you can use the secondary index tables like BSIS , BSAS, BSAD, BSID, BSIK, BSAK to improve performance.
    Regards,
    Oscean Tortona

  • How many SECONDARY INDEXES are created for CLUSTER TABLES?

    how many SECONDARY INDEXES are created for CLUSTER TABLES?
    please explain.

    There seems to be some kind of misunderstanding here. You cannot create a secondary index on a cluster table. A cluster table does not exist as a separate physical table in the database; it is part of a "physical cluster". In the case of BSEG for instance, the physical cluster is RFBLG. The only fields of the cluster table that also exist as fields of the physical cluster are the leading fields of the primary key. Taking again BSEG as the example, the primary key includes the fields MANDT, BUKRS, BELNR, GJAHR, BUZEI. If you look at the structure of the RFBLG table, you will see that it has primary key fields MANDT, BUKRS, BELNR, GJAHR, PAGENO. The first four fields are those that all cluster tables inside BSEG have in common. The fifth field, PAGENO, is a "technical" field giving the sequence number of the current record in the series of cluster records sharing the same primary key.
    All the "functional" fields of the cluster table (for BSEG this is field BUZEI and everything beyond that) exist only inside a raw binary object. The database does not know about these fields, it only sees the raw object (the field VARDATA of the physical cluster). Since the field does not exist in the database, it is impossible to create a secondary index on it. If you try to create a secondary index on a cluster table in transaction SE11, you will therefore rightly get the error "Index maintenance only possible for transparent tables".
    Theoretically you could get around this by converting the cluster table to a transparent table. You can do this in the SAP dictionary. However, in practice this is almost never a good solution. The table becomes much larger (clusters are compressed) and you lose the advantage that related records are stored close to each other (the main reason for having cluster tables in the first place). Apart from the performance and disk space hit, converting a big cluster table like BSEG to transparent would take extremely long.
    In cases where "indexing" of fields of a cluster table is worthwhile, SAP has constructed "indexing tables" around the cluster. For example, around BSEG there are transparent tables like BSIS, BSAS, etc. Other clusters normally do not have this, but that simply means there is no reason for having it. I have worked with the SAP dictionary for over 12 years and I have never met a single case where it was necessary to convert a cluster to transparent.
    If you try to select on specific values of a non-transparent field in a cluster without also specifying selections for the primary key, then the database will have to do a serial read of the whole physical cluster (and the ABAP DB interface will have to decompress every single record to extract the fields). The performance of that is monstrous -- maybe that was the reason of your question. However, the solution then is (in the case of BSEG) to query via one of the index tables (where you are free to create secondary indexes since those tables are transparent).

  • Exchange 2010 SP3 - How many Calendar Items/Folders can you create under "all public folder"

    Hi,
    Is there a limitation on how many calendar items/folders you can create under "all public folder" in Exchange 2010 SP3?
    Thank you

    I don't believe you can create calendar items under the root folder, but it's been so long since I worked with a system that had public folders that I'm not sure.  If you mean "a folder that can contain calendar items", that is not a calendar
    item itself.
    Now, I believe your underlying question is, "How many folders can be created at the root level of the public folder hierarchy?"  If so, there is no simple limit that I know of (you can have thousands, if you really want), but management gets
    pretty unruly with the more that you have.  I normally recommend that you create sub-folders to logically meet your requirements, then have each of these with more folders (normally that only specific groups of users will be able to access or add items
    to).  And anyone will tell you that you want to restrict anyone from creating their own folders at the root level.  In fact, this is the default setting for a new Exchange 2010 installation.
    I'll add that you really should stop trying to use public folders, since there are newer technologies (SharePoint, for instance) that work much better and are much easier to use.

  • How to filter results from 4 dynamic list menus depandant on how many of them are selected

    I have a search page with a form with 4 list menus and 1 submit that post the results to the results page. I can create a record set that either retrieves the correct data from my database if a selection is made from all four menus Or i can create the recordset if only 3 menus have a selection or the same for 2 menus and 1 menu. However i want the user to be able to make a selection from either 1, 2, 3 or all 4 of the menus and the exact data be retrieved. At present if i try to combine the recordset using AND and ORs the results are not specific enough, for example the 4 menus are Location, Type, Price & Style if a user selects from all 4 i only want to retrieve data that matches all 4 criteria, but at the same time if the user selects only 2 of the menus the i want it to retrieve data that matches specifically those 2 variables. I´m not actually sure if i should be creating a more advanced sql query of if its the php side of things that i need to look at. This is my first dynamic site so please be aware i´m still a learner where php and sql is concerned. Please can anyone help?  

    Hey there,
    Thanks for replying,
    I too am using Dreamweaver recordset, my local server is XAMPP ( apache php mysql), i´have pasted my sql recordset below to give an idea of what i´m trying to do, however this does not work as i´m trying to select the exact data based on 4 menus PRICE TYPE LOCATION and BEDS, and also want the search to work if the user only selects options from either 1, 2, 3 or 4 of the menus, with the code as it is if the user select only two options from 2 of the menus the results don´t just find (for example) all results for location AND price they find all results for the location varibale OR the price variable rather than a match for both, if you see what i mean?
    Any suggestions?  
    SELECT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number`
    FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid
    WHERE (location=varloc AND price = varprice AND type=vartype AND beds=varbed ) OR (price=varprice AND location=varloc AND type=vartype) OR  (price=varprice AND location=varloc AND beds=varbed) OR (price=varprice AND beds=varbed AND type=vartype) OR  ( location=varloc AND type=vartype AND beds=varbed) OR  (price=varprice AND location=varloc) OR (price=varprice AND type=vartype) OR (price=varprice AND beds=varbed) OR (type=vartype AND location=varloc) OR (type=vartype AND beds=beds) OR (location=varloc AND beds=varbed) OR (price = varprice OR beds=varbed OR type=vartype OR location=varloc)
    ORDER BY detailstable.trueprice ASC
    Look forward to receiving your thoughts,
    Linda
    Date: Wed, 21 Oct 2009 14:36:33 -0600
    From: [email protected]
    To: [email protected]
    Subject: how to filter results from 4 dynamic list menus depandant on how many of them are selected
    Hiya,
    I'm just doing my first dynamic site too, and am at a similar level to yourself.
    Can you give us more info re the site. What software, eg Dreamweaver etc are you using, and is your server using PHP or ASP etc?
    For what I've used, I amended the SQL side of things in the recordset in Dreamweaver. That way, you can test the SQL as you're setting up the recordset.
    Let me know how you're going on anyway
    Cheers
    Andy
    >

  • Find how many archive logs are generated and backup through RMAN

    friends,
    how many arhcive logs are generating between 2 consecutive backups through RMAN.
    Ur help is really appricated.
    Thanks

    Sorry, I misunderstood the question
    I think you are not asking how many logs are generated since last backup. My initial repy was the answer for this
    The answer of you question on 10G R2 is like below. Query groups your archivelog backup sessions and counts the logs in one session which is the number of generated archivelog file between two backup session/.
    select session_key,count(sequence#) from V$BACKUP_ARCHIVELOG_DETAILS group by session_key order by 1 desc
    Coskan Gundogar
    http://coskan.wordpress.com

  • How many itunes accounts are allowed per computer?

    Hi, I'm trying to figure out the best way to handle configuring all 80 of the iPads my business is purchasing.  I know there is a limit of 10 devices per iTunes account.  How many iTunes accounts are permitted per computer? I tried to just create 8 apple ids, which I was able to do online.  But when I try to sign in to those on iTunes, once I get to the part where I verify with a credit card, I can not get past the 3rd one. I have previously signed in with 2 other accounts on my machine, so I'm wondering if there is a limit of 5 accounts per computer.  Can anyone verify?  If that's true, what suggestions do you have for how to get around or best manage this situation?
    I'm not as much of a techie as I should be.. but thanks in advance for your help!!

    Hi allisonwfrom nc,
    The limit you are referring to is for a single personal Apple ID (not for multiple users) that is allowed to be associated with a total of 10 devices (up to 5 computers and the rest on iOS devices). Example you can have 5 computers and 5 iOS devices, 3 computers and 7 iOS devices, but not 6 computers and 4 iOS devices.
    From http://www.apple.com/legal/itunes/us/terms.html#SERVICE
    Association of Associated Devices is subject to the following terms:
    i) You may auto-download iTunes Auto-Delivery Content or download previously-purchased iTunes Eligible Content from an Account on up to 10 Associated Devices, provided no more than 5 are iTunes-authorized computers.
    Again this is for a single user. For multiple users like in schools or businesses you need to use VPP to purchase multiple licenses. http://www.apple.com/business/vpp/
    APP STORE PRODUCT USAGE RULES
    ( i )If you are an individual acting in your personal capacity, you may download and sync an App Store Product for personal, noncommercial use on any iOS Device you own or control.
    ( ii ) If you are a commercial enterprise or educational institution, you may download and sync an App Store Product for use by either (a) a single individual on one or more iOS Devices used by that individual that you own or control or (b) multiple individuals, on a single shared iOS Device you own or control. For example, a single employee may use an App Store Product on both the employee's iPhone and iPad, or multiple students may serially use an App Store Product on a single iPad located at a resource center or library. For the sake of clarity, each iOS Device used serially by multiple users requires a separate license.
    If you are an educational institution or business you will want to enroll in Apple's Volume Purchase Program (VPP) which allows a single Apple ID to purchase multiple licenses of an app.
    There is a free OS X program called Apple Configurator that you can use to distribute the VPP codes to your fleet of iPads. Apple Configurator uses a single Apple ID to install apps on your iPads. Configurator will also allow you to install free apps on multiple iPads using a single Apple ID.
    There are a few things I recommend you do to get started:
    First I would watch the iOS Deployment Model Videos on the left side of this page:
    http://www.apple.com/education/resources/information-technology.html
    Then I recommend you read through these two guides:
    iOS 6 Education Deployment Guide
    http://images.apple.com/education/docs/ios_6_education_deployment_guide.pdf
    Apple Configurator Help Guide
    http://help.apple.com/configurator/mac/1.0/
    This will give you a solid foundation for managing iPads with Apple Configurator. Once you read through these guides you will likely have more specific questions that you can post to these forums.
    Hope this answers your question!
    ~Joe

  • MM: Purchase requisition line Items - How many line items can we use

    Hi all,
    1. Purchase requisition Line items  (How many line items can we use?), is there any restrictions.
    2. While creating PO with only one tax code for the related PR to input Tax code (without selecting  line Items).
    Regards,
    Sudheer

    Hi
    There is no limitation for number of items in PR.
    Tax code is always applicable for individual item only.It cannot be selected form the whole PO.
    Regards
    Dev

  • How to khow how many foreign key are referenceing the primary key

    sir i would like to know that how many foreign key are referencing the primary key of a table
    is any command to know the table name
    please suggest
    thanks in advance..

    In the query below, table_name is the name of the table whose primary key is referenced.
    SELECT b.owner owner
    ,b.constraint_name foreign_key
    ,b.constraint_type constraint_type
    ,b.table_name referencing_table
    ,b.r_constraint_name primary_key
    ,c.table_name referenced_table
    ,c.column_name referenced_column
    FROM all_constraints a
    ,all_constraints b
    ,all_cons_columns c
    WHERE a.owner = b.owner
    AND a.table_name = :table_name
    AND a.constraint_type = 'P'
    AND b.r_constraint_name = a.constraint_name
    AND b.constraint_type = 'R'
    AND c.constraint_name = a.constraint_name
    AND c.owner = a.owner;
    If the name of the primary key is known, the query below
    select * from all_constraints where constraint_type = 'R' and r_constraint_name = :pk_name

  • I have a presentation to make to a customer and need to know how many educational apps are there for the iPad/iPod?

    I have a presentation to make to a customer and need to know how many educational apps are there for the iPad/iPod? More specifically special education apps.
    Thanks

    Keep in mind as well that not all apps are "created equal".  Some are really good, and others are not very good.  You might also want to look at some education sites for recommendations.  An example of a general iPads in education forum is
    http://ipadeducators.ning.com/
    but I imagine some exist for special education needs as well.  Our healthcare organization is using some apps for working with autistic children and find them very helpful. 

  • How many cooling fans are in 13" MacBook Pro retina?

    I just got a late 2013 13" MacBook Pro with retina display and I'm wondering how many cooling fans are in the machine. I've noticed when I use iTunes to play music/movies or use the iTunes visualizer, it gets hot. I've seen the videos on the retinas and I've notived that the 15" model  has two and I can't find any videos or pictures indicating whether the 13" has one or two. I know that the openings on the side are to bring in air and then pushes it out where the screen and the keyboard meet. I notice a lot of hot air coming out more towards the right of the machine than the left. I had a mid 2012 non-retina Pro but I had it replaced as it had too many issues and I know when I used it, it didn't get as hot when I did this stuff. I'm just making sure in case it's an issue, even thought I got this new MacBook on Monday 6/9/14. I'm also guessing it heats up faster since its a smaller machine and the components are a lot closer. And I understand that playing games or doing something that requires a lot of processing or graphics power will cause the machine to heat up since it's requiring so much from the machine. Like I said, I want to avoid having issues with this one. My last MacBook had three logic boards, two hard drives, hard drive cable, hard drive bracket, and clam shell replaced in less than a year of purchase in September 2013. When the hard drive crashed last week for no apparent reason last week, I took it to Apple on Monday this week and they finally made the choice to replace it completely and I upgraded to a retina just by paying the difference.

    This is my mac's info. I got it as a gift from australia. Initial 3 months it gave me a superb service, but recently it's having a major overheating issue,it shoots up up to 87 degrees. Is it possible that any other components are damaged somehow? Usually the temperature shoots up while I play online streamings.

  • Can anybody tell me how many text elements are there in sap scripts?

    hi all,
    can anybody tell me how many text elements are there in sap scripts?

    Hi,
    Do you mean that you want to know how many Text-elements are there in a specific Script or you want to know how many max Text-Elements a script can have?
    I believe there is no limit on this......
    To know all the Text Elements in a Script......goto SE71....press F4 Help on Script Name....Choose Last option for Custom developed Scripts.....and you can open the complete Script details & Code in a Line Editor...After that you can serach/look for the text elements

  • Getting the page size and knowing how many pages they are in PDF file

    Hi There,
    when i do this script (
    var myPDFFile = File.openDialog(["Choose a PDF File"]); ) 
    with JS via Windows it is used for opening a new PDF file when i import this file i need to
    get the page size and how many pages they are in PDF file. but i dont know how to do it.
    please help me.

    Ask here: http://forums.adobe.com/community/indesign/indesign_scripting

  • Hallo. My computer can't see my iPhone 4 when I open iTunes. iPhoto sees my iPhone as a device, but can't see its photos, although it recognizes how many photos there are. Some help? Thanks

    Hallo.
    My computer can't see my iPhone 4 when I open iTunes. iPhoto sees my iPhone as a device, but can't see its photos, although it recognizes how many photos there are. Some help?
    Thanks

    Did you also read that same link you provided and see this "With iTunes 10.3 or later and iOS 4.3.3 or later, "?
    Iphone 3G does not support ios 4.3

  • How many Delta types are availabvle in Lo Extraction

    How many Delta types are available in Lo Extraction
    please tell me i am facing in every interview.
    Thanks in advance,
    Ashok V

    hi
    now three types of update methods are available in Lo extraction
    <b>A.Direct Delta:-</b> In case of Direct delta LUW’s are directly posted to Delta Queue (RSA7) and we extract the LUW’s from Delta Queue to SAP BW by running Delta Loads. If we use Direct Delta it degrades the OLTP system performance because when LUW’s are directly posted to Delta Queue (RSA7) the application is kept waiting until all the enhancement code is executed.
    <b>B.Queued Delta:</b> - In case of Queued Delta LUW’s are posted to Extractor queue (LBWQ), by scheduling the V3 job we move the documents from Extractor queue (LBWQ) to Delta Queue (RSA7) and we extract the LUW’s from Delta Queue to SAP BW by running Delta Loads. Queued Delta is recommended by SAP it maintain the Extractor Log which us to handle the LUW’s, which are missed.
    <b>D.Un serialized V3 Update: -</b> In case of Un serialized V3 update LUW’s are posted to Update Queue ( SM13 ), by scheduling the V3 job which move the documents from Extractor queue ( LBWQ ) to Delta Queue ( RSA7 ) and we extract the LUW’s from Delta Queue to SAP BW by running Delta Loads. Since the LUW’s are not moved in a Serial fashion from Update queue to Delta queue if we have any error document it considers the subsequent documents and no sorting of documents based on the creation time. It improves the OLTP system performance as it forms a segment for one language.
    hope this will solve your problem
    nagarjuna

Maybe you are looking for

  • Searchable PDF Unreadable...

    I have created two versions of a PDF. One is a serachable PDF, using IRIS and the other is a standard PDF. Why is the searchable PDF unreadable in the AR IOS version? That is, why are the pages blank? I should mention the searchable PDF is readable i

  • IOS Remote and Home Sharing problems with iTunes 10.6.3

    I'm having a problem with Home Sharing and the iOS Remote app accessing iTunes since the 10.6.3 update. I have the following: 2011 Mac Mini Server running Lion 10.7.4 and iTunes 10.6.3 IPhone 4 running iOS 5.1 iPad 2 running iOS 5.1.1 Latest model Ap

  • OpenGL 3D touch detection

    Hey, so I might be completely stupid and missing something big, or I just suck at googling. I've built a 3d interface on the iphone where you can move in the world like a 1st person shooter. I've been wanting to implement a feature where the user can

  • CS6 returns wrong  version number?

    Hi all, In Javascript, "apps" global object return "photoshop-60.032". alert(apps); result is below... fireworks-10.0,fireworks-11.0,fireworks-12.0,aftereffects-11.0,ame-4.0,ame-5.0,ame-6.0,aud ition-5.0,bridge-2.0,bridge-3.0,bridge-4.0,bridge-5.064,

  • Mail is triggering to all

    hi am triggering the standard apprisal workflow WS12300122 its triggering mail to all .In the workflow log i have checked in the task it is coming as all users can process the task. but i want the mail should trigger to only one person.      how to r