Gross Profit Calculation for Documents

Hi,
Can anyone tell me the SQL for calculating the Gross Profit for a document? I have a requirement to create an alert when the Gross profit % is below 20% or greater than 70%.
Many Thanks
Martin

Try this:
SELECT T0.DocNum, T0.CardCode, T0.DocDate, T0.DocTotal, T0.GrosProfit, (T0.GrosProfit/T0.DocTotal) * 100 'Profit%'
FROM ordr T0
WHERE (T0.GrosProfit/T0.DocTotal > 0.7) OR (T0.GrosProfit/T0.DocTotal < 0.2)
You can replace ordr with some other table if you do not want to calculate sales order.

Similar Messages

  • Gross Invoice amount for document type KR & RE

    Please help in understanding SAP Table & Field name that stores Gross invoice amount for document type KR (Non PO invoice) and RE(PO Invoice)

    Hi,
    Check Table RBKP & Field name RMWWR for Gross invoice amount & BLART for document type.
    Regards,
    Biju K

  • Table containing the gross profit variables for an invoice

    I would be grateful if anyone knows  the name of the table that holds the gross profit figures for an invoice as my client has an invoce showing incorrect gross profit figures
    Thank you
    For you help
    Elaine

    Hi Elaine,
    Gross Profit figures are based on values stored in the INV1 table (fields GrossBuyPr, GrssProfit, GrssProfSC, GrssProfFC, GrossBase). Then the Gross Profit is computed based on the method set in AdministrationSystem initializationDocument Settings General Tab.
    Regards,
    Vítor Vieira

  • Approval Template by Gross profit Percentage for entire Document

    I'm trying to figure out how to create an approval template that would require an approval if the entire Sales order falls below a minimum gross profit percentage. I did find a built in function that I can require approval if any single line items drop below minimum, but I haven't been able to find a way to either select the gross profit percentage or access the needed fields to calculate the GPP.
    Thanks in advanced

    Hi Nick
    You can give an approval template of the gross profit percentage at the document level in the sales order but not at the row level, it will suit if the condition one to one relationship exists. Thought on the queries and formatted searches might help.
    HTH
    Thanks & Regards
    baskar

  • A/R Credit Memo Gross Profit calculated incorrectly

    My client created an A/R Credit Memo by opening an A/R Invoice and copying to the A/R Credit Memo.  They deleted all the rows in the credit memo, changed the type to Service, typed a description, added the correct G/L account, and entered the total amount.  The controller of the company looked at the Sales Analysis for the Business Partner by clicking on the graphic icon on the BP form.  He noticed the Gross Profit for the above credit memo showed the exact gross profit as the original invoice from which it was copied, except the value was negative.  The original gross profit was -$73,777 so the Sales Analysis report was significantly incorrect.  I think this is a bug in how the gross profit was calculated on the credit memo.  Am I correct?

    Gordon,
    I totally agree with you.  I told them to not do this any more. 
    I was just wondering if maybe the calculation should be been performed using the final numbers on the Credit Memo instead of using numbers from the original invoice.  Should I raise this issue to SAP?

  • One or more profit center for document

    Hi guru,
    is there in profit center customizing something where I can decide if, for a document, it is possible posting one or more profit center? More precisely, is it possible to set from customizing if in a document there must be only one profit center  for all item?
    Thanks
    Regards

    Hi,
    Do you mean to say that you want to verify that within one documents all document items have the same profit centre? In this case, you can build a validation via OB28.
    Regards,
    Eli

  • Need Report for gross profit anaylsis for the month

    Hi gurus,
    i need this report coding as the client has not provided me much information regarding this.selection screen.Company code ,plant code,materialcode,material type,period,fiscal year.this report format should be in alv .
    Sp pls send me the coding for this.
    Urs
    pradeep

    Check below transaction codes and it may be useful
    Customer Analysis- Sales - MC+E
    Customer Analysis- Cr. Memo - MC+I
    Deliveries-Due list - VL04
    Billing due list - VF04
    Incomplete Billing documents - MCV9
    Customer Analysis-Basic List - MCTA
    Material Analysis(SIS) - MCTC
    Sales org analysis - MCTE
    Sales org analysis-Invoiced sales - MC+2
    Material Analysis-Incoming orders - MC(E
    General- List of Outbound deliveries - VL06f
    Material Returns-Analysis - MC+M
    Material Analysis- Invoiced Sales - MC+Q
    Thanks
    Seshu

  • Gross profit concept

    Hi Experts,
    Can you describe to me the GP concept in B1 ? is it changed from old version to newest version ?
    Pls advice
    Rgds,
    RK

    Hi,
    Check  the help document for gross profit i.e
    SAP Business One lets you calculate the gross profit according to the method you define during application configuration. The gross profit for each document row is calculated and then totaled for the entire document.
    To calculate the gross profit in a sales document, from the menu bar choose  Goto  Gross Profit .
    Note
    Gross profit calculation is only active if you have selected the Calculate Gross Profit checkbox in  Administration  System Initialization  Document Settings  General .
    End of the note.
    Gross Profit of Order Window Fields
    Note
    This topic includes explanations of some of the fields and other elements in this window.
    End of the note.
    Base Price By Displays the base price in accordance with the price list.
    The default value is defined in  Administration  System Initialization  Document Settings  General  Calculate Gross Profit  Base Price Origin .
    If required, you can choose a different price list.
    Other additional prices are:
    Last Purchase Price u2013 the last price at which you bought the item.
    Last Evaluated Price u2013 the price calculated in the last run of the Inventory Valuation report.
    Item Cost u2013 the current item cost in the relevant warehouse; see  Item Master Data  Inventory Data .
    Gross Profit SAP Business One calculates the difference between the sales price and the base price for each item in the sales document. If the result is negative, the row is highlighted in red.
    Profit % SAP Business One calculates the gross profit in percent.
    When you configure the application, you can choose between two different calculation methods:
    The gross profit can be displayed on the basis of the ratio of the gross profit to the sales priceof the item.
    The gross profit can be displayed on the basis of the ratio of the gross profit to the cost priceof the item.
    If you change data in this window, confirm your changes by choosing Update and OK.
    Note
    When you configure SAP Business One, you can set it up so that an internal mail is sent automatically to specific users when a particular gross profit is exceeded.
    End of the note.
    Note
    If you manage stock using perpetual inventory and the base price calculations are set to Item Cost, the application recalculates the base price if the item cost changes when you copy a base document to a target document.
    End of the note.
    Note
    If you manage perpetual inventory and use the FIFO valuation method, the application always takes the cost of the next available layer, regardless of the quantity.
    End of the note.
    Example
    Qty = 15 Cost = 12 oldest layer (next layer to use)
    Qty = 20 Cost = 40
    Qty = 10 Cost = 9
    If the quantity is 40, the item cost that SAP Business One uses for the gross profit calculation is 12.
    End of the example.

  • Wrong Gross Profit

    Hi All,
    I have created an A/R Invoice, now when I see the gross profit report it shows wrong base price (zero) and wrong gross profit.
    Base Price By was Last Purchase Price.
    I am using Manage by Batch No. option.
    While A/R Invoice I have selected respective Batches.
    But the system has picked up the base price from one transaction which I did not select in Batch selection.
    For particular Item there were 3 Incoming trasactions, 2 were opening balance with respective value and last was also opening balance but with value zero.
    The valuation method is FIFO.
    Can anyone explain me
    1.Why the zero value has been picked up in the gross profit calculation and
    2.How can I correct this value to have correct base value and correct gross profit ?
    Thanks,
    Samir Gandhi
    Edited by: Samir Gandhi on Dec 5, 2008 5:57 PM

    Hi Samir,
    Please give the dates of those 3 Incoming transactions.  FIFO calculation will always pick the earliest possible transaction which haven't be offset yet.
    Thanks,
    Gordon

  • Negative Gross Profit figure - Sales Analysis by Employee

    Forum,
    I have a system on 8.81 PL08. When running the sales analysis by sales employee and select one employee in particular the gross profit figure is showing a negative value. 
    Why would this be negative?
    The system is currently configured as follows:
    GP calculated - Profit/Base Price
    The block negative stock option is also selected.
    Regards,
    Juan

    Hi Juan,
    Negative value in the gross profit is due to wrong gross profit calculation in the document. If you get detail of the transaction, you will know why.
    Thanks,
    Gordon

  • Item Cost as Base Price in calculating gross profit

    Hi All,
    We're using FIFO as item evaluation method. If "Item Cost" has been set up as the base price origin for gross profit, where does SB1 get the value for the gross profit base price for an invoice?
    I know it is not from any price list, and it is not from oitw.avgprice.  Is this item cost calculated using FIFO?
    Thanks in advance.

    Hi,
    Your assumption is correct. It is item cost calculated using FIFO.
    Thanks,
    Gordon

  • Gross Profit Deviation in ROI Calculator

    Hi,
    I would like to ask what does Gross Profit Deviation percentage in ROI Calculator mean? What does it mean when it ask you how many deals generates less than the acceptable gross profit?
    Hope someone could answer my questions.
    Annalyn Sanchez
    Pages:

    Hi,
    Your question is not clear.Nevertheless i give under a generic answer which you may adapt / infer:
    The ROI is calculated based on the Net profit.But this net profit can include non operating income like interest on securities,dividend income etc.So a threshold is defined for gross profit [this is earned out of operations but is calculated before charging general overhead,selling expenses etc as per policy] .
    The deviation is the difference between the actual gross profit minus the threshold.
    The term "deal" in your question is not clear.Assuming it connotes a "Project" the gross profit is "gross per profit earned out of a project" [out of a portfolio].Here the ROI from the project could be healthy,but this could be due to other than the revenue from the operations,in which case the gross profit will be less.This may fail against the threshold;as such cant be considered say for financing  by  Lending institutions,banks etc or in arriving at the projection  of the results,fund flow etc.Hence possibly the question "how many deals generates less than the acceptable gross profit?".
    Regards.
    Ramesh

  • Gross profit for service invoices

    Hi Dear;
    how can i set gross profit for the service invoices?
    best regards;

    Hi Dany,
    Currently Business One can only work with Gross Profit on Items. However, in future release 8.8 version, methods for calculating gross profit have been improved. Users can calculate gross profit for both item and service types invoices.
    Regards,
    Candice Ren
    SAP Business One Forums Team

  • Recurring document - FBD1 with incorrect due-date calculation for AP

    Hi Gurus,
    in our ECC 6.0 system we are creating with F.14 FI-documents (SAPF120) based on recurring documents (created with FBD1) for various purposes (e.g. Recurring entries for IC-business).
    Therefore it's important that the system provides in the final processing of the recurring documents the correct net-due-date in the AP-document based on the document date and the payment term included in the AP-masterdata (LFB1-ZTERM).
    Problem:
    The processed FI-document contains the correct payment term but the calculated net-due-date with regards to the document date (BKPF-BLDAT) isn't correct. A Dummy-Update of the FI-document with FB02 on field BSEG-ZTERM provides finally the correct net due date but this a not recommended solution.
    Any ideas how to solve that issue???
    Thanks for replies.
    BR, Bernd

    Hi Vishnu,
    the defined payment term is
    fix day: 15
    additional month: 1.
    Default for baseline date is posting date
    Therefore the expectation is that net due date is calculated for posting date
    e.g. : 01.02.2012 to 15.03.2012.
    The line item after processing in FI-document shows :
    Posting Date : 01.02.2012
    Bline Date:   01.02.2012
    Days/percent: 35
    Net due date: 07.03.2012 (dd.mm.yyyy)
    That's wrong according to my understanding of the payment term definition.
    BR, Bernd

  • Plant and Profit center wise Turnover and  gross profit for the Month for s

    Hi
    We need a report Plant and Profit center wise Turnover and
    gross profit for the Month for selected month and GL's
    We are using new GL. but our bi system old version.
    SAP_BW -- 7                      Patch:SAPKW70015
    BI_CONT - 703                    Patch:SAPKIBIIP7
    Do you have any idea or experiences which data source and data target required to full fill this requirement?
    Thanks
    Ramana P

    Hi
    You need to check if you really the report Plant wise and if yes, then check if the Accounting Transactions are maintained at Plant Level in your source system i.e. in R3.
    Ideally it should be Business area or Functional Area or Controlling area which are maintained in Accounting Transactions. You will also the relevant details for these Characterisitics + Profit Center in the NEW GL Accounting data sources.
    Cheers
    Umesh

Maybe you are looking for