Deviation in Discount on AR Document

I am setting up an approval process whereby when a user changes the established discount that a client is allowed on an AR Marketing Document the process gets triggered.
I have managed to set it up document by document using the various table and field names but want something more elegent. As that the discount field has the same Field Index for all AR Documents and it is a Title Field I should be able to use
SELECT DISTINCT 'TRUE'
WHERE $[24.0.0] !=  (Select Discount from OCRD where cardcode = $[$4.0.0])
no matter if I change the discount or not I always get an internal error message but the transaction still gets posted.
what's up with this then???
Richard

Hello Richard,
What is your business process.  Sales Order > Delivery > AR Invoice?
Is there only one Delivery or Invoice per Sales Order or Multiple.
Have you restricted access for the user to change Row level totals / unit price / discount.  This will also be required.  This can be done through Authorizations > Sales A/R > Change Row Amounts ..set it to NO Auth
I just remembered that when using Numeric Form field values in a Divide operation you need to explicitly convert them to Decimal to get a result.  so I have tested this and you may please try
SELECT 'TRUE'
WHERE (CAST($[$42.0.number] AS DECIMAL(10,3))/CAST($[$22.0.number] AS DECIMAL(10,3))* 100) >
(Select Discount from [DBO].[OCRD] where CardCode =
$[$4.0.0])
Please let me know
Suda

Similar Messages

  • Discount percentage deviates from discount total due to rounding *

    When I copy an AP invoice to a credit memo, there is * discount -0.01 CAD on the credit memo and a remark: Discount percentage deviates from discount total due to rounding *.
    Can someone please explain why this is happening?

    Hi,
    You need to check the F1 Online help
    goto the search option and enter the keywords  > 'Rounding Method'
    Here is the extract :
    By Document
    Select this option, if you want to work without using rounding account and without rounding definitions for each currency. For each sales document, determine whether it should be rounded. Choose Administration ® System Initialization ® Document Settings ® Per Document tab. Choose the required documents and select the Automatic Rounding for Document.
    The differences created as a result of the rounding are displayed in the Discount field of the marketing documents.
    You can define that SAP Business One will display a rounding remark. Choose Administration ® System Initialization ® Document Settings ® General tab and select the Display Rounding Remark. This way, whenever you create a rounded document, an asterisk (*) appears n the Discount field and the remark u201CDiscount percentage deviates from discount total due to roundingu201D appears in the Remarks field of the document.
    Hope it helps.
    Kind Regards,
    Jitin Chawla
    SAP Business One Forum Team

  • Trade discount in marketing document

    Dear SAP Prod. Dev.Col. Teams,
    Currently trade discount in marketing document is not posted to journal entry. The customer want it because they want to have the discount is applied in the marketing document rather than in the payment document.
    Manual journal entry is not acceptable since it will add new effort meanwhile the software like SAP B1 is intended to ease the daily working and make their working time efficient and effectively.
    Please give a concern to this request.
    Thanks and Rgds,

    I managed to solve it using WA

  • Line Discounts on Sales Documents

    Hi All,
    On a current implementation, our client offers a standard discount to each of his customers. This discount is across all items but will differ for each customer. I have set this up in the OCRD.Discount field against the BP. This works fine but only calculates at document total level, not at line level.
    The client needs to show their clients a list price, item discount and net price, so this solution is not acceptable.
    Without using any coding, the only solution I can think of is to set up BP Special Prices for each client, but this seem like a huge overkill?
    Is there a way of coding to pick up a discount from a UDF in the client record to populate the line discount field on the marketing document, unless there is already a BP Special Price in existance for the client / product?
    Any help would be appreciated.
    Kind regards,
    Ian

    Hi Dave & Suda,
    Thanks for your input. To clarify, the client has a number of standard discounts raising in 2.5% from 25% to 60%, so by my calcualtion, this would require 14 different price lists.
    Whilst this is acheivable and has the benefit of rolling any price increases / decreases through from the master price list, it will not deliver the required information at item line level.
    The sales document will show the list price as the discounted price from the price list, not he list price from the matser price list and the discount.
    i.e. if PART A has a list price of £10.00 and is on 'discount price list 20%' @ £8.00 when the item is drawn down for a client assocuated to this price list, it will show as a price of £8.00 not £10.00 less 20% giving a net price of £8.00.
    For this reason, it will not work in this instance.
    This leaves one option using the standard system functionallity, as far as I can see, which is to generate a customer special price list for each client, holding all stock records at their relevant discount %.
    Based on the fact they have approx 1500 client & 1500 stock records this would equate to 22,500,000 records, and this worries me!
    Also, the mechanisam for copying these is obly viable by customer group (already used for somthing else) or properties, which would mean reserving 14 for this reason alone.
    I am sure the better solution would be to use a UDF on the customer record card to contain their discount% and use a formatted search to populate this into the discount field at line level, if there is nothing there already.
    I just don't have the coding skills to do this and wondered if anyone could give me a head start.
    Many thanks,
    Ian

  • Extra Discount in Marketing Documents - Formatted Search

    Hello All,
    I am trying to add a UDF for "Extra Discount" in the marketing documents. I have tried to attach a formatted search on the document total to calculate the final value after this extra discount has been specified. However, the formatted search doesnt work and I get an "Internal Error".
    The scenario mentioned underneath will explain the requirement:
    <b>Default Option in SAP:</b>
    Customer                               C0001
    Item        |       Price     |        Discount       |      Tax      |     Total
    I0001      |       100         |        10%           |       VAT@4   |   90
    Total                                    90
    Discount                     5%    4.5
    Tax Amount                         3.42
    Doc Total                             88.92 
    <b>Requirement:</b>
    Customer                               C0001
    Item        |       Price    |         Discount     |        Tax        |   Total
    I0001       |      100      |           10%           |       VAT@4  |    90
    Total                                    90
    Discount                     5%    4.5
    <u>Extra Discount            2%    1.8</u>
    <b>Tax Amount                         3.348
    Doc Total                             87.048</b>
    Is it possible to have this scenario mapped in SAP Business One using formatted search without using SDK/Customization?
    Regards,
    Gyanesh Rupani

    Hello Jimmy,
    The client wants the extra cash discount to be visible on the invoice itself. I have tried creating the UDFs and assigned appropriate FS to them to change the document total. However, the issue is that the moment the document total is affected, the discount (available by default in marketing documents footer) automatically gets changed proportionally!
    So, for eg. if an invoice is for 1000 USD and I give a discount (system field) of <b>10%</b> to a customer and 5% as cash discount (UDF), with the help of FS, the invoice amt automatically gets changed to 850 USD but the discount field also automatically gets changed to <b>15%</b>!
    This is the inbuilt functionality of SBO - so if someone can help me overcome this, I will be very grateful.
    Regards,
    Gyanesh

  • Discounts on MIRO documents

    Hi friends,
    When User does MIRO they enter frieght cost in the gl account tab.
    When we make the payments through automatical payment program system calculates discount on the freight also.
    We do not want system to calculate the discounts on the amount entered in the GL account tab , how do we do that.
    Please advise

    Hi
    I think it is not possible. Because, the discount calculation is purely based on the Vendor line item...when you do the posting with frieght, both material amount and frieght amount will be in different line items having only one vendor line item.
    regards
    ramana

  • 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

  • Cash discount amount field in MIRO and FI document

    Hi ,
    In MIRO we are overwriting the cash discount amount but for some reason in  the FI document instead of the overwritten cash discount amount SAP is taking the payment term and calculating the discount.
    Any solutions to correct this?
    Thanks

    Hi,
    I need to manually populate the discount amount in field:  INVFO-WSKTO (Cash Discount Amount in Document Currency) while capturing FB60/MIRO and not the automatically calculated discount amount(that one is working fine.).
    Thanks,
    Themba

  • Billing document for cash discount

    Dear all,
    It was observed in GL Cash discount that billing document  bearing no:
    xxxxxxxxxx  was posted in paisa etc, client want to make it round
    please advise, where we have to change.
    Thanks & Regards,
    satishkumar.m

    Dear Satishkumar,
    The rounding will be taken place in the sales documents it self through maintaining the roundingoff condition type (DIFF) in the pricing procedure.
    I hope this will help you,
    Regards,
    Murali.

  • Payment Terms with discount

    FI Gurus,
    I recently created  a new payment terms with a discount of 1 percent if paid within 10 days. Payable net if paid after. Everything has been going fine, up until I had a payment with a invoiced ate of Nov. 2008. I have the configuration to calculate the discount based on docuement date and not posting date. When I entered the invoice I even got a warning message that the discount for this invoice was expired. Which it gave me the confidence that I was on the right track. Then I went into the line item details and saw that the discount did not take place. But then when I went to pay the invoice thru BF system deducted the 1 percent. I then went to the account details and there was a discount showing. Did I missed anything during configuration?
    Your suggestion will be greatly appreciated.

    Maximum cash discount was checked in FBZP

  • Add invoice from xml -- wrong vatsum -- wrong discount -- wrong doctotal

    hi,
    i save my invoice as a draft, save this draft as xml and then add my invoice.
    The way until xml goes fine. But when i add the invoice the systems calculates wrong vatsums.In due to that there will be a discount on the document and a wrong doctotal.
    When i adding my draft manually as invoice everything works well. Is this a bug? Does anybody know how to solve it?
            oInvoice = moSBOCompany.GetBusinessObjectFromXML(sOLDTAXdraftFilename, 0)
            oInvoice.DocumentsOwner = moSBOCompany.UserSignature  'empID
            RetVal = oInvoice.Add
    best regards
    Markus

    Hi Markus,
    Have you checked the information in the Xml file is correct?
    Have you tried to create the same invoice with DI API without using xml?
    If you are sure you are doing the same thing and the results are not the same please open a message for support, they will investigate it.
    Regards
    Trinidad.

  • Deviation From Budget in Alert management

    Hi,
    I set Budget Amount INR.10000 and Document  is Purchase Order i set alert through email ,int.when i add purchase document the PO value is exceed INR10000 (Ex:20000) .But Alert Message not triggered.
    Thank u
    sridhar

    Hi Gordon Du,
    I set Predefined alert for Buget deviation amount INR.10000, selected document is Purchase Order and send alert Receipt To manager user,email check box is selected in alert management . When i enter PO Above the deviation amount (Example INR.15000) mail should trigger to appropraite email id. And Additional information in buget setting  are -General setting-Buget Tab- selected Block  deviation from budget ,selected monthly budget and all chec box is selected Ex:PO,GRPOand Account.
    thank you
    sridhar.

  • How to track discounts given

    Hello,
    How can one track discounts given to customers either by G/L entries or built in SAP reports?  Upon testing this feature it looks like at invoicing the entry is all booked at the discounted totals with no entry make to a G/L discount account.
    Thanks,

    Hi,
    Discount in sales documents have no relation with G/L discount account. That account is only for cash discount from payment term.
    Therefore the best available report is by you own either use SQL query or Crystal Report.
    Thanks,
    Gordon

  • Discount on AR Invoices

    Hi all,
    Is there any way to change discount on AR invoices?  We need to process AR invoices and we would like to try without discount, but the system wonu2019t let us take the discount off?
    Any advice please?
    Edited by: Matthew Brigley on Oct 29, 2009 12:34 PM

    Hi....
    When he speaks off, to discount concerns? discount level of detail (per line) or discount for the document?
    The online discount can be modified whenever we have the authorization to do so and that the field is parameterized as an asset, while the total level of discount to understand that it can always be amended.
    Best regards,

  • Discount are reflecting with wrong sign in COPA Reports..

    HI,
        We have checked the +/- sign in one of the conditon type which is assigned to Value fields VV210(Discount and markdowns).
    Now due to this check mark values of discount from Billing document are reflecting as negarive in COPA reports which is wrong. For the Debit memo's all values should reflect in COPA as positive, but for discount it is reflecting as negative.
    So now we are having almost 400+ invoices which are having this issue. So how can we correct this sign in COPA. Is there any way that can help us to change the sign from - to +.
    Kindly suggeset...
    Regards....

    In the rules of engagement, you will see that he most important rule is to SEARCH before you request a question.
    It is the hallmark of a good configurer that he will search high and low for a solution.
    Your question is not complicated, but it is very involved, and has been answered on this forum before, more than once.

Maybe you are looking for

  • Getting duplicates in Case  and Count clause in Report Generation

    Hi all, let me explain the Base first (just the Section which is in the scope of this code )then ill go to code and my problem.i have a Set of Pre-defined Tasks in *"TASK"* Table.i have a system which will provision the User Request by allotting the

  • When I try to update iTunes 10.3, Insufficient Privileges error. C:\programData\{429CAD59-35B1-4DBC-BB6D-1DB24-6563521}\x86\DIFxAPI.dll

    When I try to update iTunes 10.3, the installer finishes downloading but then this message appears "errors occured while installing updates. If the problem persist, select Tools, "just download" and instal them manually" so I go and do that, select T

  • How to update Elements value inside existing xml file

    Hi Gurus, Am somehow new to java and working on xml with java, i have a scenario where i want to update the elements of my existing xml file, i know its possible as i have posted one code on this forum which updates the values of the arrtibutes of ex

  • Regarding Message Mapping

    Hi All, The problem is I have created 2 Message Mappings and Two Message Interfaces Two Messages Mappings and Message Interfaces are activated successfully, my question is which Message Mapping will execute among them(Message Mapping). If it Executes

  • Problem with registering/activation

    Hi! I ordered Photoshop Elements as the retail version with a box and disc (like putting those things on my shelf ) and installed it a couple of hours ago. As asked too, I created an Adobe ID (using right now) and registered Photoshop Elements in my