Sales Analysis in COPA

Hi,
To my understanding data from fields Customer Groups 1-5 and Condition Group 1-5 get copied to sales orders and invoices for sales analysis.
My question is that does the data have to be copied into a sales order and invoice for SALES ANALYSIS or can it be done using different fields such as ATTRIBUTES 1-10 for SALES ANALYSIS in COPA.
Thanks

What fields do you want to come up in the sales analysis report?
My question is that does the data have to be copied into a sales order and invoice for SALES ANALYSIS
Do you mean doing so in ECC..?

Similar Messages

  • COPA Sales Analysis

    Hi,
    To my understanding data from fields Customer Groups 1-5 and Condition Group 1-5 get copied to sales orders and invoices for sales analysis.
    My question is that does the data have to be copied into a sales order and invoice for SALES ANALYSIS or can it be done using different fields such as ATTRIBUTES 1-10 for SALES ANALYSIS in COPA.
    Thanks

    answered

  • Getting error while doing sales planning in COPA

    Hello Friends,
    While i m doing the sales planning in COPA via KEPM, I am getting the dump for ABAP Feilds regarding Volume and Weight.
    Error has been stated below.
    Runtime Errors CONVT_OVERFLOW
    Except. CX_SY_CONVERSION_OVERFLOW
    Date and Time 19.03.2008 16:16:40
    Short dump has not been completely stored (too big)
    Short Text
    Overflow when converting from "1.12036e+12"
    What Happned?
    Error in the ABAP Application Program
    The current ABAP program "SAPLKEAB" had to be terminated because it has come across a statement that unfortunately cannot be executed.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_CONVERSION_OVERFLOW', was not caught in
    procedure "GET_WEIGHT_AND_VOLUME" "(FORM)", nor was it propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated that the exception would occur, the current program is terminated.
    The reason for the exception is:
    When attempting to convert the value "1.12036e+12", an overflow occurred.
    As i m getting the ABAP Error while making the sales planning for Finished Product

    My guess - because I don't know your system - is the system is looking for one particular type of value, but is being fed a different one. While trying to convert, the value foes into data overflow.
    Check:
    1. If the planning is in Alternative Units of measure and this alternative is well defined in the material master.
    2. If a standard conversion routine has been assigned to any of the values and the conversion routine is not consistent with the data type / data element.
    3. Check your upload file / data. Is there a column defined there that should contain data of a specific type (decimals, or number formats, etc.) but is not the case.
    4. If all else fails, you need an ABAPer to decode the error for you.
    Cheers.

  • Sales Analysis Report - Items -- blank result

    Hi,
    I'm testing a setup and running the sales analysis report. It works for the Customer version but I get no results when running on Items.
    I'm on SBO 2007A SP01 PL07. There are open and closed invoices for inventory items; no credit memos have been posted. All Item type invoices.
    When I run by Customer, I get the correct data - open and closed invoices for that customer.
    When I run by Items, I get no results. The date range is the same for both reports.
    When I run the purchase analysis on Items, I get data for the same items I am trying to see in the sales analysis.
    Any ideas what could be causing this?
    Thank you,
    Heather

    HI Gordon,
    I left the default settings: 
    - Annual Report, Invoices, Individual Display, No Totals
    - Posting Date:  whole fiscal year
    - Main selection:  left blank/default (group = all, no properties)
    I have double/triple/quadruple-check even the Secondary SElection to make sure there's nothing there.
    I have also run it on Due Date instead of Posting Date, still no results (if run on Items).
    As I mentioned, the selection criteria is what I want but for some reason that one version, Items, does not work. The other 2 tabs work with the same selection.
    Heather

  • Sales Analysis Report service warehouse wise

    Dear Experts,
    I've configured 4 service warehouses to an item  in SAP B1 8.8 PL:16.  And now I want to see sales analysis report of that particular item against each service warehouse. But from the Sales Analysis or purchase analysis report I can't able to see service warehouse wise sales quantity & amount.
    N.B.-Those items are created as Sales & Expense item only, no inventory.
    Plz help.
    Subrata

    Hi Subrata,
    in this case you need a customized report trough Query or through Crystal Report.
    regards,
    Fidel

  • XL-Reporter - sales analysis including row discount and document discount

    Hello World!
    In XLR I want to report all item-sales to customers grouped by item-groups based on invoives.
    Since I am interested only in net amounts (without tax, freight and other expenses) and discounts I use 'S0_LineTotal' as attribute.
    'SO_LineTotal' includes the discount of each item-row in the document.
    The row selection is as follows:
    FACT
    ARDT(Code = "ARCreditMemo","Invoice")
    FIG(SO_DocType = "I")
    ITM( * ) 
    Group By ITM.ItmsGrpCod
    The problem is that I also have to include the document discount 'OINV.DiscSum' in the result.
    In combination with the row selection specified above the attribute 'Total Discount' delivers no results (always 0).
    In the standard SAP report 'Sales - AR/Sales reports/Sales Analysis' the total discount is averaged to all items in the matrix of a document.
    How can I achieve this in my XL-Report?
    Thank you very much for your support!
    Frank Romeni
    Edited by: Frank Romeni on May 15, 2008 3:55 PM
    Edited by: Philip Eller on May 29, 2008 8:53 AM

    Hello,
    To get this, I tried drag following information from Report composer:
    Under Sales tab, choose Items(Display more atrributes to choose Item Group), Document Number(choose this one because same items may have different discount in different documents), Discount % Per Row(light dimension),Discount % Per Document(light dimension), Row Total(measure).
    Drag the Item Group to the Group region.
    Run the report and the result should be all items are grouped by item Group and discounts and total in different document for each item will be listed.
    Hope this helps you.
    Regards,
    Maggie An
    SAP Business One Forum Team

  • Manually closed DN appear with value 0 on sales analysis - items

    Hello everyone,
    When i manually close a Delivery Note (DN) using Data->Close that DN still appears on my sales analysis -> customer. (using the filter -> Delivery Notes)
    However when i use sales analysis -> items i only get the list of items contained on that DN. All the columns (quantity, sales amount, gross profit, etc) are with zero values.
    Is there any way of showing those values on the sales report? Or any other report? Is this standard system behavior? Shouldn't the items disappear completely then? What is the purpose of showing them without any further information?
    Looking forward to be hearing from you.
    Regards,
    Sérgio Romã

    Hello Gordon,
    Thanks for the quick reply.
    The business process requires me to close the DN manually:
    The customer has something like 4000 employees that are created as customers. Each of those employees has a pre-defined creditline amount. DNotes can be created for each employee until that amount. On the second week of every month i need to close all these DNotes (i am doing this using an addon that runs based on schedule defined in a user table and that closes all DN that meet certain conditions) so that i can add more DNotes to each employee. At the end of every month i have another addon that totals all DN added that month (closed and open) and creates a single service invoice for a customer (defined in each employee).
    So i need to close them manually because i cannot copy them to a consolidation partner (release of employee creditline and invoicing occur at the different moments during the month).
    My disagreament with the system behavior is the following:
    - I get the correct the results if i create a sales analysis -> customer. If they don't result in a sales transaction they shoudn't appear on this report either. (according to the logic you presented)
    - Sales analysis -> Item. The item lines appear with zero. Once again, if it is not a sales transaction they shoudn't appear at all (according to the same logic). The system is doing the same thing as if the DN has been copied to an invoice which is a wrong behavior. This is a different situation and the item detail should be visible on the sales analysis report.
    What do you think?
    Regards,
    Sérgio Romã

  • Sales Analysis Item Tab Function Not Showing Orders Dollars

    Hello Gurus of SAP B1.
    This pertains to SAP B1 SP 00 PL 16 Version 8.8. 
    While doing the Sales Analysis function under Sales A/R > Sales Reports > Sales Analysis > Item Tab, the system does not report on the dollars for the day when I select "Orders" or "Delivery Notes'.  The system does display the proper dollars when I select "Invoices" on the "Item" Tab. 
    And the "Invoices" and "Orders" and "Delivery Notes" buttons display correct dollars on the other tabs for Customer and Sales Employee...so why not on the "Items" tab???
    Does anyone know why this might be happening and/or how to fix this???
    Thanks in Advnace - Zal

    Thanks for the quick reply Gordon - hope things are continuing to go well in your new endeavors &;-D
    Well that is really strange that items is handled that way - I have created SQL to get the results but I always like to balance out to what SAP B1 is reporting.  My SQL detail and grand totals are fine by Customer and I have been able to reconcile in that manner, but wanted to reconcile by items also.  I am certain I have done it before in SAP 2007A...
    Has there been a change to the item/sales order table in Version 8.8???
    Take care my FFF - Zal

  • Sales Analysis Item Tab Displays Zero Dollars for "Orders"

    This pertains to SAP B1 SP 00 PL 16 Version 8.8.
    While doing the Sales Analysis function under Sales A/R > Sales Reports > Sales Analysis > Item Tab, the system does not report on the dollars for the day when I select "Orders" or "Delivery Notes'. The system does display the proper dollars when I select "Invoices" on the "Item" Tab.
    And the "Invoices" and "Orders" and "Delivery Notes" buttons display correct dollars on the other tabs for Customer and Sales Employee...so why not on the "Items" tab???  Strange that a button would be displayed which does not work...
    Does anyone know why this might be happening and/or how to fix this???
    Does SAP plan on fixing this in any upcoming patch levels???
    Regards - Zal
    Responses received from SAP B1 Core Forum:
    Sales Analysis Item Tab Function Not Showing Orders Dollars

    Thanks for the quick reply Gordon - hope things are continuing to go well in your new endeavors &;-D
    Well that is really strange that items is handled that way - I have created SQL to get the results but I always like to balance out to what SAP B1 is reporting.  My SQL detail and grand totals are fine by Customer and I have been able to reconcile in that manner, but wanted to reconcile by items also.  I am certain I have done it before in SAP 2007A...
    Has there been a change to the item/sales order table in Version 8.8???
    Take care my FFF - Zal

  • Sales Analysis Query

    Dear Experts,
    Want to Sales Analysis Query same as Sales Analysis in SAP
    In standard SAP when we run report with anual slection criteria for eg, 01/04/2010 To 31/03/12
    it's show in one column not display in compare with Quaterwise & Monthwise report.
    Result for query is
    Customer Code, Customer Name, Year2010 (Sales), Year2011 (Sales), Year2012 (Sales)
    Please help me.
    BR
    Deep

    Ok........
    It was my query mistake.......
    Please try this......
    SELECT Distinct T0.CardCode,T0.CardName, 
    (isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2006%' then T4.LineTotal else 0 end))
          FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2006',
    (isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2007%' then T4.LineTotal else 0 end))
          FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2007',
    (isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2008%' then T4.LineTotal else 0 end))
          FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2008',
    (isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2009%' then T4.LineTotal else 0 end))
          FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2009',
    (isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2010%' then T4.LineTotal else 0 end))
          FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2010',
    (isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2011%' then T4.LineTotal else 0 end))
          FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2011',
    (isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2012%' then T4.LineTotal else 0 end))
          FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2012'
    FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
    Group By SUBSTRING((CONVERT(VARCHAR(11),T0.DOCDATE,106)),8,11), T1.ItemCode, T0.CardName, t0.CardCode
    Regards,
    Rahul

  • Sales Analysis "No Data"

    Hi,
    I am having a problem shortly after upgrading to SBO 2007A. The sales analysis report of a client reports "No Data" when executed under the Items tab with the Invoices selection criteria. The report works under deliveries or orders criteria but when invoices are selected no data is displayed. The report works with no problems under the Business Partners and Sales employee tabs. What could the problem be?
    Kind regards,
    Anthony

    Dear Anthony,
    For the issue you have mentioned, please check the following.
    Please make sure to choose collation setting of:
    SQL_Latin1_General_CP1_CI_AS
    when installing MSSQL 2005 Server.
    In order to check what the collation is set to in your server, please
    run the following query:
    Collation of your Server:
    select SERVERPROPERTY ('collation')
    (This query gets the collation settings of MSSQL 2005 System Database
    "Master")
    Expected answer : SQL_Latin1_General_CP1_CI_AS
    In case you have already installed the MSSQL 2005 server with any
    collation other than SQL_Latin1_General_CP1_CI_AS please follow the
    steps below:
    Change your server collation to SQL_Latin1_General_CP1_CI_AS.
    You can find Microsoft's instructions for changing an SQL server
    collation here:
    http://msdn2.microsoft.com/en-us/library/ms179254.aspx
    Please note that collation settings of Database "Master" needs to be
    changed only. All SAP Business One Databases must not be changed! These
    must remain on SQL_Latin1_General_CP850_CI_AS.
    If you need any clarifications with this process please refer to an
    Expert Empowerment Session "SQL 2005 Server Collation settings" at
    https://websmp203.sap-ag.de/~sapidb/011000358700000050892007E/ or
    http://service.sap.com/smb/sbo/support -> Archive: Empowerment Sessions
    Note: 987436
    Regards,
    Raghu N
    SAP Business Forums Team

  • Sales Analysis for a certain period

    Hello Experts,
    In standard Sales Analysis Report, when we run report for a certain period for "Customers" and when we run the report with same parameters for "Items" it gives different results.
    Can anybody please guide me, why these results are different whereas we are using the same parameters in both the Tabs i.e. Customers & Items.
    Thanks & Regards,
    SN

    Hi Shazad,
    One possible reason is that you have service type documents in that period. In such case, the document total appears in Customers tab, but not in the Items tab.
    Could this be the case?
    I hope that helps.
    Regards,
    Toni

  • Sales Analysis Comparative

    Dear Experts,
    Hope you are having a great day. I just wanted to confide my problem in regards to my formula for generating the correct GP based on the sales analysis report from sap, for comparative purposes.
    Sales Analysis Report Screenshot from SAP
    The result query generates this:
    As you can see, GP%1 is positive, but on the SAP Analysis it is negative. Is there anyone who could help me generate the correct formula for that?
    Here's the query formula:
    Select
    a1.AM,
    a1.[AR Inv1],
    b1.[AR Inv2] ,
    a1.Year1_Qty,
    b1.Year2_Qty,
    a1.Year1_Amt as 'Total AR Invoice',
    b1.Year2_Amt as 'Total AR Invoice2',
    a1.Year1_GP as 'Gross Profit',
    b1.Year2_GP as 'Gross Profit 2',
    (a1.Year1_GP/NULLif(a1.Year1_Amt,0))*100 as 'GP%1',
    (b1.Year2_GP/NULLif(b1.Year2_Amt,0))*100 as 'GP%2'
    from
    Many thanks for the help..
    Best Regards,
    JZA

    Hello Sir,
    Here's the complete query.
    declare @Date1 datetime
    declare @Date2 datetime
    declare @Date3 datetime
    declare @Date4 datetime
    SET @Date1 = /* t7.DocDate */ '[%0]'
    SET @Date2 = /* t7.DocDate */  '[%1]'
    SET @Date3 = /* d7.DocDate */ '[%2]'
    SET @Date4 = /* d7.DocDate */  '[%3]'
    Select
    a1.AM,
    a1.[AR Inv1],
    b1.[AR Inv2] ,
    a1.Year1_Qty,
    b1.Year2_Qty,
    a1.Year1_Amt as 'Total AR Invoice',
    b1.Year2_Amt as 'Total AR Invoice2',
    a1.Year1_GP as 'Gross Profit',
    b1.Year2_GP as 'Gross Profit 2',
    NUllif(a1.Year1_GP/(a1.Year1_Amt),0)*100 as 'GP%1',
    NUllif(b1.Year2_GP/(b1.Year2_Amt),0)*100 as 'GP%2'
    from
    select
    a.SlpName 'AM', COUNT(distinct a.DocNum) 'AR Inv1',
    SUM( a.Qty)'Year1_Qty', sum(a.Amt) 'Year1_Amt', sum(a.GP) 'Year1_GP' -- , SUM(a.[GP %]) as 'GPercent'
    from
           select t4.SlpName 'SlpName',  t7.docdate ,
           t7.docnum,t3.itemcode,
           CASE when t7.CANCELED = 'Y' then t3.Quantity*-1
           Else t3.Quantity
           end 'Qty',
           CASE when t7.CANCELED = 'Y' then (T3.[LineTotal]- (T3.[LineTotal]* ( ISNULL(T7.DiscPrcnt,0)/100)) )*-1
           else T3.[LineTotal]- (T3.[LineTotal]* ( ISNULL(T7.DiscPrcnt,0)/100)) end 'Amt',
           CASE when t7.CANCELED = 'Y' then T3.[GrssProfit]*-1   
           else T3.[GrssProfit] end 'GP',
           CASE when t7.CANCELED = 'Y' then  ((T3.[GrssProfit] / ((nullif(T3.[LineTotal],0)) - ((T3.[LineTotal])* (ISNULL(T7.DiscPrcnt,0)/100))))*100)*-1
           else (T3.[GrssProfit] / ((nullif(T3.[LineTotal],0)) - ((T3.[LineTotal])* (ISNULL(T7.DiscPrcnt,0)/100))))*100 end as 'GP %'
           from INV1 t3
           left outer join oinv t7 on t3.docentry = t7.docentry
           left outer join oslp t4 on t7.SlpCode = t4.SlpCode
           left outer join OITM t8 on t3.itemcode = t8.itemcode
           where
          t7.docdate >= '[%0]' and t7.docdate <= '[%1]'
           UNION
           select t4.SlpName 'SlpName', T9.docdate ,
           t9.DocNum, t5.itemcode,t5.Quantity*-1 'Qty',
           CASE when t9.CANCELED = 'Y' and t9.DocStatus = 'C' then (T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100)))*-1
                when t9.CANCELED = 'C' and t9.DocStatus = 'C' then (T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100)))
                when T9.CANCELED = 'N' and T9.DocStatus = 'C' then (T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100)))*-1
                when T9.CANCELED = 'N' and T9.DocStatus = 'O' then (T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100)))*-1
           else(T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100))) end'Amt',
           T5.[GrssProfit]*-1  'GP',
           CASE when t9.CANCELED = 'Y' then  ((T5.[GrssProfit] / ((nullif(T5.[LineTotal],0)) - ((T5.[LineTotal])* (ISNULL(T9.DiscPrcnt,0)/100))))*100)*-1
           else (T5.[GrssProfit] / ((nullif(T5.[LineTotal],0)) - ((T5.[LineTotal])* (ISNULL(T9.DiscPrcnt,0)/100))))*100 end as 'GP %' 
           from ORIN t9
           Left outer join RIN1 t5 on t9.docEntry = t5.DocEntry
           left outer join oslp t4 on t9.SlpCode = t4.SlpCode
           left outer join OITM t8 on t5.itemcode = t8.itemcode
           where
            t9.docdate >= '[%0]' and t9.docdate <= '[%1]'
        ) A
        group by a.SlpName
    )A1
    full  join
    select
    a.SlpName 'AM', COUNT(distinct a.DocNum) 'AR Inv2',
    SUM( a.Qty)'Year2_Qty', sum(a.Amt) 'Year2_Amt', sum(a.GP) 'Year2_GP' --, SUM(a.[GP %]) as 'GPercent'
    from
           select t4.SlpName 'SlpName',  t7.docdate ,
           t7.docnum,t3.itemcode,
           CASE when t7.CANCELED = 'Y' then t3.Quantity*-1
           Else t3.Quantity
           end 'Qty',
           CASE when t7.CANCELED = 'Y' then (T3.[LineTotal]- (T3.[LineTotal]* ( ISNULL(T7.DiscPrcnt,0)/100)) )*-1
           else T3.[LineTotal]- (T3.[LineTotal]* ( ISNULL(T7.DiscPrcnt,0)/100)) end 'Amt',
           CASE when t7.CANCELED = 'Y' then T3.[GrssProfit]*-1   
           else T3.[GrssProfit] end 'GP',
           CASE when t7.CANCELED = 'Y' then  ((T3.[GrssProfit] / ((nullif(T3.[LineTotal],0)) - ((T3.[LineTotal])* (ISNULL(T7.DiscPrcnt,0)/100))))*100)*-1
           else (T3.[GrssProfit] / ((nullif(T3.[LineTotal],0)) - ((T3.[LineTotal])* (ISNULL(T7.DiscPrcnt,0)/100))))*100 end as 'GP %'
           from INV1 t3
           left outer join oinv t7 on t3.docentry = t7.docentry
           left outer join oslp t4 on t7.SlpCode = t4.SlpCode
           left outer join OITM t8 on t3.itemcode = t8.itemcode
           where
           t7.docdate >= '[%=2]' and t7.docdate <= '[%3]'
           UNION
           select t4.SlpName 'SlpName', T9.docdate ,
           t9.DocNum, t5.itemcode,t5.Quantity*-1 'Qty',
           CASE when t9.CANCELED = 'Y' and t9.DocStatus = 'C' then (T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100)))*-1
                when t9.CANCELED = 'C' and t9.DocStatus = 'C' then (T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100)))
                when T9.CANCELED = 'N' and T9.DocStatus = 'C' then (T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100)))*-1
                when T9.CANCELED = 'N' and T9.DocStatus = 'O' then (T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100)))*-1
           else(T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100))) end'Amt',
           T5.[GrssProfit]*-1  'GP',
           CASE when t9.CANCELED = 'Y' then  ((T5.[GrssProfit] / ((nullif(T5.[LineTotal],0)) - ((T5.[LineTotal])* (ISNULL(T9.DiscPrcnt,0)/100))))*100)*-1
           else (T5.[GrssProfit] / ((nullif(T5.[LineTotal],0)) - ((T5.[LineTotal])* (ISNULL(T9.DiscPrcnt,0)/100))))*100 end as 'GP %' 
           from ORIN t9
           Left outer join RIN1 t5 on t9.docEntry = t5.DocEntry
           left outer join oslp t4 on t9.SlpCode = t4.SlpCode
           left outer join OITM t8 on t5.itemcode = t8.itemcode
           where
           t9.docdate >= '[%2]' and t9.docdate <= '[%3]'
        ) A
            group by a.SlpName
    ) B1
    on a1.am = b1.am
    I am almost done analyzing one whole month sales analysis. Now the problem I got upon testing is
    this 1st query combined from OINV and ORIN. Wherein the result I got has a discrepancy from ORIN with docnum = 100120
    Query
    select t4.SlpName 'SlpName',  t7.docdate ,
    t7.docnum,t3.itemcode,
    CASE when t7.CANCELED = 'Y' then t3.Quantity*-1
    Else t3.Quantity
    end 'Qty',
    CASE when t7.CANCELED = 'Y' then (T3.[LineTotal]- (T3.[LineTotal]* ( ISNULL(T7.DiscPrcnt,0)/100)) )*-1
    else T3.[LineTotal]- (T3.[LineTotal]* ( ISNULL(T7.DiscPrcnt,0)/100)) end 'Amt',
    CASE when t7.CANCELED = 'Y' then T3.[GrssProfit]*-1
    else T3.[GrssProfit] end 'GP',
    CASE when t7.CANCELED = 'Y' then  ((T3.[GrssProfit] / ((nullif(T3.[LineTotal],0)) - ((T3.[LineTotal])* (ISNULL(T7.DiscPrcnt,0)/100))))*100)*-1
    else (T3.[GrssProfit] / ((nullif(T3.[LineTotal],0)) - ((T3.[LineTotal])* (ISNULL(T7.DiscPrcnt,0)/100))))*100 end as 'GP %'
    from INV1 t3
    left outer join oinv t7 on t3.docentry = t7.docentry
    left outer join oslp t4 on t7.SlpCode = t4.SlpCode
    left outer join OITM t8 on t3.itemcode = t8.itemcode
    where
    t7.docdate >= '2014.07.31' and t7.docdate <= '2014.07.31'
    and T4.SlpName = 'PPM'
    UNION
    select t4.SlpName 'SlpName', T9.docdate ,
    t9.DocNum, t5.itemcode,t5.Quantity*-1 'Qty',
    CASE when t9.CANCELED = 'Y' and t9.DocStatus = 'C' then (T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100)))*-1
    when t9.CANCELED = 'C' and t9.DocStatus = 'C' then (T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100)))
    when T9.CANCELED = 'N' and T9.DocStatus = 'C' then (T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100)))*-1
    when T9.CANCELED = 'N' and T9.DocStatus = 'O' then (T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100)))*-1
    else(T5.[LineTotal]- (T5.[LineTotal]* ( ISNULL(T9.DiscPrcnt,0)/100))) end'Amt',
    T5.[GrssProfit]*-1  'GP',
    CASE when t9.CANCELED = 'Y' then  ((T5.[GrssProfit] / ((nullif(T5.[LineTotal],0)) - ((T5.[LineTotal])* (ISNULL(T9.DiscPrcnt,0)/100))))*100)*-1
    else (T5.[GrssProfit] / ((nullif(T5.[LineTotal],0)) - ((T5.[LineTotal])* (ISNULL(T9.DiscPrcnt,0)/100))))*100 end as 'GP %' 
    from ORIN t9
    Left outer join RIN1 t5 on t9.docEntry = t5.DocEntry
    left outer join oslp t4 on t9.SlpCode = t4.SlpCode
    left outer join OITM t8 on t5.itemcode = t8.itemcode
    where
    t9.docdate >= '2014.07.31' and t9.docdate <= '2014.07.31'
    and T4.SlpName = 'PPM'
    RESULT:
    But if I am just going to run query for ORIN only this is the result.
    As you can see there are two items in ORIN for docnum 100120, while if i unite it with OINV the result for 100120 only returns 1 data. Kindly help.
    And thank you so much sir for viewing my query.
    Best Regards,
    JZA
    Message was edited by: JZA

  • Sales Analysis on Item Delivery issue

    Hi Experts,
    I have another Issue regarding Deliveries at the same Client I posted this message on a few minutes ago:
    "Delivery Document not closed even though Invoice is linked"
    This issue relates to the Sales Analysis Report. When we open the Sales Analysis report on the Items Tab and select Monthly report, Delivery Notes, Individual Display and No Totals we get the report with 0 quantities for all the months selected even though there is deliveries for these items.
    Any help will be appreciated.
    Thanks,
    Marli

    Hi Marli,
    Something must be wrong within the B1 database.  You may need to restore the latest copy of the db to do more testing.
    It might be a bug or human error.
    Thanks,
    Gordon

  • Sales analysis by document shipping code (Logistics - Ship to)

    I wish to either sort the Sales Analysis report by the BP Shipping Address (of documents) or create a similar report through XL Reporter (current version is 2007A PL:38)
    Basically, we have a need to report a particular customer's recent purchases (date range) of a specific line of items (item range) filtered by one specific shipping address (customer has one billing address and several shipping addresses).
    The Sales Analysis report seems very static in the sense that you cannot add additional fields to the output of the report (after being generated) via the Forms Setting button.  Also, while the Items tab of the Sales Analysis report satisfies part of need to report by date, range, item range and customer range, but we can not filter or drill down effectively to know what items were shipped to specific drop location (ship-to-address).
    In XLR, I have only had success in filtering dimensions (not light dimensions).  I suspect I could bring the Business Partner and Ship-to Code to the Selection area and filter the BP by CardCode (this is a dimension) and then manually create an expression similar to OINV ( ShipToCode = "PlaceXYZ" ) with the intention of filtering the results by the document ship-to code.
    If XLR is used, I would like to be able to filter by "closed" A/R Invoices only if someone could help with this aspect as well.
    I seem to have hit a stumbling block with these two avenues so I would greatly appreciate some assistance.  Thanks in advance.
    Best regards,
    Pat
    P.S.  If anyone knows of any good online resources for XL Reporter could you please share a link?

    Hi Pat,
    Based on what you need to do, I suggest you just using query since it has the greatest flexibility.  If you concern about the format, QLD can be used for basic formatting so that you can have a "Report".
    Thanks,
    Gordon

Maybe you are looking for

  • Making iSight work with Windows Vista on VirtualBox

    I have a MacBook Pro with Windows Vista installed on the VirtualBox platform. The only problem I have is that it will not work with the iSight camera. I need the cam for video conferencing on a webring, and I do have to run the ring in Windows. When

  • Moving system from old internal drive to new internal drive! Best Method.

    Hi all. I know this is probably a no-brain er for you guys, but I have just reinstalled my Leopard O/S on my MP plus all my software, hardware, drivers, files, emails etc. but I now wish to put this nice new pristine system on my newest Hard Drive. M

  • Refresh rate for Numeric Indicator

    I have application that displays 60 16 bit word of data in Hex format on the screen simulatanousely as I receive block of data at at approximately 10,000 times a second through USB. Obviously, at this 10,000Hz rate, it is an over-kill in terms of the

  • How do i pass a daqmx task from labview to matlab using the math interface toolkit?

    I want to use DAQMX functions from Matlab using the Math Interface Toolkit (MIT). How can I have a labview function output (return) the DAQMX task to matlab via the MIT? I want to do this so I can start a DAQMX task in Labview from a matlab function

  • Single not in XML file

    Hi everyone... i have a small problem...i would like to read one node in my xml file.... What is the easyest way to do that...i tried the following code...but i hot null result.. import java.io.*; import javax.xml.*; import javax.xml.parsers.*; impor