Sales Reports showing Different Net Sales

Hi All,
Here is three queries, which are sowing different net sales. But both should return same values. Please correct me.
select sum( nvl(c.extended_amount,0) * nvl(b.exchange_rate,1)) SALES
from ra_salesreps a
,ra_customer_trx_all b
,ra_customer_trx_lines c
where a.salesrep_id(+) = b.primary_salesrep_id
and b.customer_trx_id(+) = c.customer_trx_id
and c.line_type='LINE'
AND b.complete_flag like 'Y'
and (b.trx_date between TO_DATE('2010/12/01 00:00:00', 'yyyy/mm/dd hh24:mi:ss')
and TO_DATE('2011/11/30 23:59:59', 'yyyy/mm/dd hh24:mi:ss') )
AND b.primary_salesrep_id = 1040;
SELECT SUM(nvl(c.extended_amount,0)*nvl(b.exchange_rate,1 )) net_amount,
FROM hz_cust_accounts hca,
hz_parties hp,
ra_customer_trx_all b,
ra_customer_trx_lines_all c,
ra_cust_trx_types_all d
WHERE b.bill_to_customer_id = hca.cust_account_id
AND b.customer_trx_id = c.customer_trx_id
AND b.cust_trx_type_id = d.cust_trx_type_id
AND hca.party_id = hp.party_id (+)
AND c.line_type='LINE'
AND b.invoice_currency_code like 'USD'
AND hca.primary_salesrep_id = 1040
AND b.trx_date BETWEEN to_date('2010/12/01 00:00:00', 'yyyy/mm/dd hh24:mi:ss')
AND to_date('2011/11/30 23:59:59', 'yyyy/mm/dd hh24:mi:ss')
HAVING SUM(DECODE(d.TYPE, 'INV', (nvl(c.extended_amount,0)*nvl(b.exchange_rate,1)), 'DM', (nvl(c.extended_amount,0)*nvl(b.exchange_rate,1)),0 )) BETWEEN TO_NUMBER(-999999999) and TO_NUMBER(999999999);
SELECT
SUM(nvl(y.extended_amount,0)*nvl(x.exchange_rate,1 )) net_amount
FROM hz_cust_accounts hca,
hz_parties hp,
hz_party_sites hps,
hz_cust_acct_sites hcas,
hz_cust_site_uses_all hcsu,
hz_locations hl,
ra_customer_trx_all x,
ra_customer_trx_lines_all y,
ra_cust_trx_types_all z
WHERE hca.party_id = hp.party_id
AND hp.party_id = hps.party_id
AND hcas.party_site_id = hps.party_site_id (+)
AND hps.location_id = hl.location_id (+)
AND x.bill_to_customer_id = hca.cust_account_id(+)
AND hcas.cust_account_id = x.bill_to_customer_id
AND x.customer_trx_id = y.customer_trx_id
AND x.cust_trx_type_id = z.cust_trx_type_id
AND x.ship_to_site_use_id = hcsu.site_use_id(+)
AND hcas.cust_acct_site_id(+) = hcsu.cust_acct_site_id
AND x.invoice_currency_code like 'USD'
AND y.line_type='LINE'
AND x.trx_date BETWEEN TO_DATE('2010/12/01 00:00:00', 'yyyy/mm/dd hh24:mi:ss')
AND TO_DATE('2011/11/30 23:59:59', 'yyyy/mm/dd hh24:mi:ss')
AND hca.primary_salesrep_id = 1040;
Thanks & Regards,

Hello,
The answer from Caveman is correct, the DRB - tcode ALO1 (that is the letter o not a zero) retains some of the document flow of archived data.
Do not use transaction VPAR as that archives data related to preference determination and transaction VF07 does not show document flow.
If you have implemented the PBS modules to view archived data, they retain the document flow information and you can view the data exactlly how it looked before it was archived.
Hope this helps.
Best Regards,
Karin Tillotson

Similar Messages

  • Cost element and Line item reports show different actual costs

    Hi PS experts,
    My client has an issue pertaining to actual cost reports. The cost element report shows actual costs $42,000 for one WBS and when I double click to see details the value it shows is $2100. Even when I checked line item report for this WBS the value is $2100. What could be the reason for getting different values? If some one throw some light on this it would be great helpful to me
    Regards,
    Laxminarsimha

    Laxminarsimha
    The values in CJI3 should be correct and will include all postings (e.g. Settlement values) and possibly Actual Revenues unless a filter is in place - so take this as being your correct figure to start with.
    Your drilldown will show the same value as CJI3 because it is CJI3
    Any cost element report you are using is probably correct for what you are asking - is this a Standard Cost Element Report you are using or is it bespoke
    One thing to be careful of when you drilldown on Cost Element Reports is that you do not always get the a make up of the value you have drilled down
    e.g.
    Cost Element Report was run for Period 1 to 6 2008 and shows £100.00
    You drilldown and sometimes the drilldown automatically shows ALL line items e.g £500.00 (not just the values for periods 1 to 6 of 2008 which you may expect £100.00)
    In the past I've removed the drilldown capability from bespoke cost element reports to prevent drilldown to the line item report (which is CJI3) because of this problem.
    Usually where values for a a number of periods only (not total costs) was required
    Other factors to consider
    Revenues/Settlements may be excluded from Cost Element Report but will not be excluded from CJI3 unless you specifically restrict
    You need to identify which types are postings are missing from the Cost Element Report (what is common...cost element, dr/cr indicator, business transaction)
    I've also hit the mistake in the past where I've asked for periods 1 2007 to period 3 2008 and instead of giving me just over a years worth of actual it gave me actuals for periods 1 to 3 for 2007 and 1 to 3 for 2008.
    Hope this helps
    Steve

  • Credit for Returns showing different Net values...

    Hi,
    I used VF03 to see a billing document, it was a Credit for Returns and it had one line item. It showed the Net value as say 25000.00. I clicked that line item and then clicked the icon at the bottom "Item Pricing Condtn" and in the next screen under the "Conditions tab" , the net value shown is like 15676.00.
    Why is the Net Value different from what was shown in the first screen ? What may be happening ? Any tips ?
    And also the net value in the first screen then changes when you move back to the first screen !!
    So everytime when you open the document  in VF03 it shows 25000.00 and then when u return to that screen (after above mentioned steps) it shows the new value 15676.00.
    thnks
    Edited by: sdnuser1 sdnsurname on Sep 17, 2010 9:09 PM

    Hi SDNuser,
    Check if any routine is written for calculation of any condition type in pricing unde requirements, Altcalctype or Altcalcbaseval.
    Also check if some logic has been implemented in User exit RV60AFZZ, for billing document pricing under forms:
          USEREXIT_PRICING_PREPARE_TKOMK     
          USEREXIT_PRICING_PREPARE_TKOMP                 
    Regards

  • Usage Report and Audit Log report showing different totals

    I am trying to understand the differences displayed in two similar reports. The first report is an 'Audit Log' Report and it is displaying the number of Resource Account creations over a time period. The second report is a Usage Report using the exact same criteria (objectType = Resource Account and Action = Create). The totals I get back are VASTLY different. Can anyone explain? Is this a known bug?

    Hi,
    In any report we don't show the storage policies information. In Cost report if the storage policies have different rate factors then we will show the split for the storage information. But in usage report , rate factors will not be applicable as we don''t show the cost details. Hope this clarifies your question. Please let us know if you need more information.
    Thanks,
    Lakshmi

  • Xl reporter shows different result before and after Period-End Closing.

    Hi SAP experts,
    We have an issue with XL Reporter. When we ran Period-End closing and ran XL - PL Period & YTD (with the same parameters), XLR shows nil in the Actual YTD column and the monthly figures are out by a big difference (example pre-rollover it was $110K after rollover it shows negative $12M).
    This happens on 2 different clients running 2 different SAP B1 (2007A PL 42 and 8.8 PL 13) on the same XL Reporter which is possibly the default XL report that comes with the installation.
    I don't have any idea why the XLR is running 2 different figures altogether when running the same XLR using the same parameter before and after rolling the year over. The default SAP B1 P&L report stays the same before and after the rollover, I would have expect that the same would happen with the XLR.
    Please advise.
    Regards,
    Didy Arfiono

    Hi Julie,
    Thanks for the reply. I'm not entirely sure what you mean by excluding a certain transaction for closing entries as this would defeat the whole purpose of PEC which as you stated was to transfer P&L balances to retained earnings account to be carried forward.
    I've check at some guides including one from Orchestra Team (http://www.youtube.com/watch?v=e4tUo774eXg) and so far the process that I've done is exactly what it is.
    Regards,
    Didy

  • Two same reports showing different output ??

    Hi
    Irregularity in two reports
    I developed a vendor liabilities aging report with lfa1-lifnr not maindatory,
    lfb1-bukrs obligatory , bsik-budat obligatory & report is working fine with
    total & all months total are displayed . I want to display por org.
    I added a new field LFM1-ekorg (Pur. Org ),
    ( no other table except lfm1 has ekorg field, link is using lifnr )
    after that report is showing less lifnr and also month amount and total is varying.
    I fetched lifnr, ekorg from lfm1 the for all entirs in bsik with lifnr equality & then
    lifnr from lfa1.
    I checked a database tables.
    Why so ?? Please

    Hi,
    Well am not sure if i understood your question properly. May be its something to do with order of selection from the tables. If so try like this
    select lifnr ekorg
    from lfm1
    into it_lfm1
    where ekorg = p_ekorg.
    select *
    from bisk
    into corresponding fields of it_bisk
    for all entries in it_lfm1
    where lifnr = it_lfm1-ekorg
    bukrs in s_bukrs
    budat in s_budat.
    By this way you can use purchase organisation also in the report.
    Regards,
    Vik

  • MB5B & MRN9 Report showing different values

    Hi All,
    I am facing a problem when i am running MB5B & MRN9 report on back date, In both the reports stock is displaying correct but there is some difference in value. Material is managed by moving average price. Please provide your valuable inputs.
    Thanks
    Rashid

    hello !
    The transaction MRN9 is not designed to display the stock quantities and values for each date in a month. The transaction MRN9 only displays the quantity and value to the 'period end' which refers to entered field 'key date' or displays the actual quantity and value if the 'key date' refers to actual period. These data are selected from database tables MBEW (actual) or MBEWH (historical periods).
    If you will get the quantities and values for a special date (not a period end) you should use transaction MB5B which is additional selecting the documents posted until 'selection date' with option 'valuated stock'= 'X'.
    The transaction MRN9 provides a comparision of stock values for a selected period end with the values according to 'new calculated price' from functions 'determine lowest value' or 'FIFO-price' and is calculating the 'devaluation value'. This devaluation is normaly done only for a period end date(especially at end of fiscal year).
    If your are using the function of 'determine lowest value' (transactions MRN0, MRN1, MRN2, or function 'FIFO-valuation' (transaction MRF1) you can store the calculated 'lowest price' of 'FIFO-price' in one of available fields(tax price1-3, commercial price1-3) in material master. (please see also SAP documentation).
    You can also see the notes for this as well.
    590699     MRN9 Connection to key date and stock data
    486442     Lowest value: Significance of key date
    I hope these informations will help to understand the functions of transaction MRN9.
    Good luck!
    Plauto

  • MB5B shows different opening quantity when we select diffferent Stock Type

    Dear All,
    I am trying to run report MB5B - Stock on posting date with 2 different Stock Types:
    - Storage Loc/Batch Stock
    - Valuated Stock
    But the report shows different opening quantity,total receipt, total issue, but closing quantity is ok.
    Could you pls tell me the reason?
    Thanks
    Cao Huy

    Hi,
    MB5B transaction is used to display the stock on posting date
    It is not possible to view at the same time both Valuated stock and special stock. This is radio button input control,so any one of the stock type only possible to display the material document.
    This report display the material and plant vise material document number and total stock and total issue etc for the example,
    Plant            1256  test plant
    Material         TH1
    Description    steel rod
    Stock on 01/01/2010                   0.000  PC
      Total Receipts                      29.500  PC
      Total Issues                         3.000- PC
    Stock on 12/31/9999                   26.500  PC
    SLoc MvT S Mat. Doc.  Item Pstng Date          Quantity BUn
    TEST 101   5000003029    1 12/23/2009            1.000  PC
    TEST 101   5000003039    1 12/31/2009            1.000  PC
    Regards,
    thiru

  • Historical reporting...reports are different?

    I'm looking at 2 reports for a 24 hour period trying to figure out the total amount of calls handled by the system. The reports are:
    Contact Service Queue Activity Report and Traffic Analysis.
    CSQ Activity Report shows the number of calls handled, abandoned, and dequeued. Traffic analysis just shows 1 bar with total calls.
    Even if I add up all the calls from the activity report, it doesn't match the number on the traffic analysis. What's up with this?
    For example - Yesterday I had roughly 1475 calls including about 50 abandoned calls from the activity report. The traffic analysis shows 1741 calls.
    Any ideas?

    Hello,
    Although there exists some bugs regarding Historical Reporting discrepancies, I've found that most of the times the differences are caused just because the different reports show different information.
    For example, the differences between Traffic Analysis Contact Service Queue Activity Report might be because of this:
    The Contact Service Queue Activity Report includes abandoned ICD calls. (This report counts an ICD call as abandoned if the caller hangs up while queued for a CSQ or CSQs). The IVR Application Performance Analysis Report includes abandoned ICD calls and abandoned IVR calls. (This report counts a call as abandoned if the call ends before it is answered by an agent or before it is marked as handled by a workflow.)
    Another example are the the differences between Traffic Analysis and Called Number Summary Report:
    The Traffic Analysis Report will show any new call received into the UCCX system. For example an inbound call from the PSTN will increase the TA report. This new call will also increase the Called Number Summary Report. However, let's say the agent transfers the call to another agent or back to the CSQ. This will add a second call to the Called Number Summary Report but will not increase the TA report.
    I'm not sure if this will explain the difference on your case or all cases, but I've seen it's the one that confuse most people.
    Please check this FAQ which explains each report and that description might give you an idea if the reports really show a discrepancy or they just show different information:
    http://www.cisco.com/univercd/cc/td/doc/product/voice/sw_ap_to/apps_3_1/english/admn_app/hist_rep/hradvch4.pdf
    HTH. If you really think it could be a bug it would be better to open a TAC case.
    Pablo

  • Actual cost showing different

    Hi Expert,
    The actual cost showing different in two report cji3 & cn41.Plz help me.
    Thanks

    I did whatever you have suggested me.but i have not found desired result.
    scenario is- In cn41 report
    suppose the actual cost in wbs is 6649095
    But under this network & activity level the actual cost is 6461522
    In cji3 report at network activity level the actual cost is 6461522 & the actual cost of wbs is also 6461522
    Plz guide me why cn41 report showing different actual cost at wbs level.
    regards

  • Standard report show the confirmed quantity in sales order

    Hello
    i'd like to know t-code for report show the confirmed quantity and the remaining quantity of sales order
    For example : i create sales order with quantity (1000) and the quantity of material in storage location 600 , so i want report display the confirmed quantity ( 600) and the remaining quantity (400)
    Thanks

    Search the forum before posting.  Check in VA05
    G. Lakshmipathi

  • Report showing Contract, sales order and invoices created

    Hii All,
    Is there any standard report showing the sales contract, sales orders created with reference to contract and the invoices with some relevant details such as customer, material, invoice value etc.
    If i go to VF05 and then select the a line and see the document flow, i get the contract number, sales order number.

    Hi,
       You need to create a report of this requirement only through development.
    Rgds,
    Sivarajesh. J

  • Report viewer web part, show different report everyday (rotate .rdl files)

    We have a report viewer web part on sharepoint site (intranet), which is working fine and showing the report (.rdl file).
    We want to show different report everyday by looping through a list of 4 or 5 important reports  (from sharepoint document library) that can be displayed on our intranet. We have limited space on the intranet to display the report (we have custom built
    reports that will fit in the allocated space).
    Our .net guy says he can do image rotations by custom web part but not sure how to use the .rdl files..
    Has anyone got any ideas on how to achieve this.

    We have a report viewer web part on sharepoint site (intranet), which is working fine and showing the report (.rdl file).
    We want to show different report everyday by looping through a list of 4 or 5 important reports  (from sharepoint document library) that can be displayed on our intranet. We have limited space on the intranet to display the report (we have custom built
    reports that will fit in the allocated space).
    Our .net guy says he can do image rotations by custom web part but not sure how to use the .rdl files..
    Has anyone got any ideas on how to achieve this.

  • Report to show different currencies

    Dear Experts,
    Currently my report shows value in local currency.
    In my report I need to show the PO Value, GR Value etc in local, order and group currency. While investigating the underline Cube and DSO's, I find the following:
    1. There is no 0Curtype object in the DSO or corresponding values coming from Datasources.
    2. Each record has an Exchange Rate attached to it.
    3. All the PO values are converted to local currency. Say a PO is ordered in CAD and the local currency is USD. Now in the transformation the PO Value is converted to local currency using the program PERFORM LOC_CURR_CONVERT which uses the Process Keys, Order_Val, Doc_Date, Order_Curr, Loc_Curr, Exchg_Rate.
    4. This is done for other key figures too.
    Questions:
    1. Which the best way to approach this requirement and how to achieve the objective of showing the report in local, order and group currency? Do I need to make changes in the design if the cube, dso or only at report level and how? pls provide detail steps.
    2. In the DSO or Cube's I do not see any Group Currency mentioned? What is Group Currency and how do I achieve it?
    Thanks,
    Jainu

    Hi Jainu
    There is no need to change the Cube or DSO's design. Firstly Group currency is usually the global reporting currency used by your client. Usually it is USD if your client is based out of North America. Secondly you need to define different currency conversion types. For that go to RSCUR transaction and define a currency translation type.
    - It can be AS02 (Month Average Rate) or AS01(Month End FX Rate) or M (Daily exchange rate) type based on your requirement.
    - These values will be available in the TCURR table in your system and will be transferred from SAP R/3 to your BI system.
    - In the Currency Translation type definition choose Exchange Rate type in the exchange Rate tab.
    - In the currency tab choose "Source currency from Data Record, Target urrency as "Fixed Target Currency" and choose USD in the F4 help.
    In the Time Ref tab choose Fixed Time Ref and Current Date.
    Activate and move this translation type from Dev to Production in a transport. In order to do a currency conversion using this translation type in your query, choose your key figure and in the conversions tab, choose the conversion type and the Target Currency will automatically get populated as USD. When you run this query after these settings it will return your key figure values in USD. Remember that in the TCUR table your conversions should be maintained for all currencies to USD for this to happen and your READ_EXCHANGE_RATE function module should be defined.
    This is a generic approach and does not need any cube or DSO change.

  • Show report in different currency depending on user parameter

    hi all,
    i'm trying to show my report in different currency, depending on users given parameter.
    i hold my account balance in USD based. User should select one parameter, in which currency they want to see their account balance. (e.g. EURO, GBP ...) and depending on their selection, i want to convert USD based info into chosen currency, by fetching field from currency table and making some calculation.
    also i want to include in report currency($, £ ...) accordingly ().
    how can i achieve this, has somebody any suggestion to me?
    thanks in advance.
    bogi.

    hi,
    i think i need to explain my problem more detailed. anyone who has suggestion, please help me.
    i have 3 tables account, times and currency.
    - times table has time_key, date, day_of_week fields.
    - account table has - account_balance and time_key_FK fields.
    - currency table has currency_type, amount, time_key_FK fields.
    1. i have function decode(:Currency,'USD',account_balance,'EURO',--here i want to replace my calculation CALC1---)
    CALC1- this calculation need to some calculation like this: account_balance * (fetched field from this sql)(select amount from currency, account where currency.currency_type='EURO' and account.time_key_FK=currency.time_key_FK)
    i tried to do this, but discoverer plus doesn't let me make condition and calc. i'm very confused.
    2. after i achieve this query, somehow i want to display on worksheet on which currency is it based. can i get parameter value, and show this value as in column heading?
    tnx!!!

Maybe you are looking for

  • How to set Reader to open in new window

    I have .pdf documents into which I have inserted links to other .pdf documents using pdfEdit995 (I am a 77-year-old recording monumental inscriptions, not very computer literate and not able to afford expensive applications !) The links look like :-

  • When i return from back up copy contacts, it comes...

    Hei. I have a problem. Our phone/ E75/ went to peaces, but before that we made back up copy to Ovi PS Suite. Computer went broken, but we got everything to hard disk-Mobile Backup- external data storage. I download Noki to computer. I started to move

  • Diadem View does not reload saved data correctly

    I am not sure what is going on but my data which is loaded contains multiple groups with the same channel names.  This data is from a repetitive test so the data in all the files is similar.  I create tabs in view for each data group and plot five ch

  • Why RAM Preview 2x faster on Macbook Pro vs Desktop PC?

    Hello everyone, I RAM Previewed a few seconds of an AE CS6 project on a Desktop PC I recently had custom-built, and was distraught to discover it was twice as slow as previewing the exact clip on my Macbook Pro. The project involves simple 3D camera

  • Order By on toplink queries.. how to?

    Greetings I use jdev 10.1.3 to create my apps. I also use toplink. I have the default findAll methods that I use to read an entire table into a list. I can then write a comparator and sort the list. My question is there a way to do effectively an ord