Calculation Of invoice amount

I got Invoice_Amount two ways By Joining Some tables
First way
Tables:
wsh_delivery_details
wsh_delivery_assignments
wsh_new_deliveries
The Query :
select max(wnd.STATUS_CODE) Status, wnd. DELIVERY_ID INV_NO,
Max(wdd.DATE_SCHEDULED) Inv_Date, Max(wdd.CUSTOMER_ID) CUSTOMER_ID, sum(nvl(wdd.SHIPPED_QUANTITY,0) * nvl(wdd.UNIT_PRICE,0)) Inv_Amt
from wsh_delivery_details wdd, wsh_new_deliveries wnd ,wsh_delivery_assignments wda
where wdd.DELIVERY_DETAIL_ID= wda.DELIVERY_DETAIL_ID
and wda.DELIVERY_ID=wnd.DELIVERY_ID
group by wnd. DELIVERY_ID
Second way
Tables:
ra_customer_trx_lines_all
ra_customer_trx_all ct
Query:
select max(cl.CUSTOMER_TRX_ID) Cust_trx_no ,max(ct.TRX_NUMBER) ct_trx
,cl.INTERFACE_LINE_ATTRIBUTE3 INV_No,max(cl.CREATION_DATE) Inv_date,
sum(cl.QUANTITY_INVOICED* cl.UNIT_SELLING_PRICE) inv_amt ,
Max(cl.SALES_ORDER) Ord_No ,Max(cl.SALES_ORDER_DATE) Order_date ,max(ct.TRX_DATE)
ct_TRX_DATE,Max(ct.SOLD_TO_CUSTOMER_ID) ct_SLDtoCust
from ra_customer_trx_lines_all cl,ra_customer_trx_all ct
where cl.CUSTOMER_TRX_ID=ct.CUSTOMER_TRX_ID
group by cl.INTERFACE_LINE_ATTRIBUTE3
Note:cl.INTERFACE_LINE_ATTRIBUTE3 is INV number.
But invoice Amounts are different. Why it is so? Shall i apply any more
conditions? Why same Data(ie selling price and Quantity) storing in two tables(ra_customer_trx_lines_all,wsh_delivery_details)?

Hi Mike,
U r using transaction types to generate your distributions, right?
Try to insert distribution info for each of your invoices in the table ra_interface_distributions_all, specifying REC, REV and TAX (tax where applicable) lines.
Hope this will solve your prob.
Vik

Similar Messages

  • Calculation of partial amount

    My problem is How the total amount of the invoice can be found and partial amout...and how to calucalte it
    it is stated that enter will be there in BSEG-REBSG..but hwen i goto that table the DMBTR value is filled...
    can anyone explain below part...
    FI documents would be internally numbered. So, program to generate .txt file should provide for preventing invoices from being captured for more than the payable amount. For example, if amount credited to vendor is Euro 10,000 vide FI (and invoice verification in MM) document number 330000567. If partial amount of Euro 2000 has already been paid against this invoice, system should prevent user from entering this invoice with amount of more than Euro 8000 that is still payable.
    Program should look for (field / table) REBZG / BSEG (Number of the Invoice the Transaction Belongs to) in vendor line items (posting key 31 & 25, 50). System populates this field with invoice number against which partial amount is paid or other adjustment (debit memo amount, for example) happens. Please remember that system does not update this field when entire invoice amount is settled in the last out going payment/other adjustment document.
    Program should calculate balance amount to be paid based on:
    1. Vendor credited & expense debited vide (posting key 31,32,34 -39) for given invoice number (Document type K0,K1,KI, Number range 34,11,12)    MINUS
    2. Partial payment/ other adjustments, as per REBZG / BSEG referred above, made against the invoice number entered.
    Program should prevent entry for an amount that is more than the balance amount to be received (calculated as per points 1 and 2 above).
    It follows that if the balance calculated is full amount of the invoice (i.e. partial payments have not been received or other adjustments not done), then program should allow entry for the full invoice amount. (This will be relevant in case of MRP invoices).
    After once it validates..it will send a txt file ..with entries given...

    dear i dont know much about FI but in this case of partial payment u have to search for the document in BSID and BSAD .
    If it is the case of partial payment then BSID-BELNR doc u will find a  field BSID-REBZG in which you will find the refrence field which is havving the BSAD-BELNR location . this is how it is mapped .
    what is your ful req is not much cleared to me ,
    rgd aryan

  • Payment batch shows some invoice amount in rounding ....in AP

    For a supplier a check of 1000$ is applied to 10 invoices containing standard and credit memo type. But the total amount for all the 10 invoices were 1400 including the standard invoice amount minus the credit memo amount. 400 were in the rounding line. There was no rounding account assigned or rounding rule applied and when checking the options for supplier, the calculation level: none and rounding: nearest for this supplier. Previously the supplier had no problem and is currently active. What might be the problem and how to solve to this issue? Please show some light on....thanks in advance....Andrea.
    Message was edited by:
    user455555

    I am facing, the same problem. I would appreciate if you could mail me the solution if problem has be resloved on your side.
    eagerly waiting for your response.
    Thanks
    [email protected]

  • Rate - How to get the total invoice amount?

    Hi Experts,
    I need assign the 'total invoice amount' to an operand then do some discount calculation. The question is how I could get it. I tried COMPUT99, but it doesn't get anything.
    Thank you,

    Hi - Why don't you use DISC*  ( discount ) variant programs instead of comput99 , you can create a custom variant and fetch the invoice value from ERDK .
    Regards,
    Shekhar

  • GST calculation and Invoice History Instance

    Hi experts,
    I really need your help here.
    My decimal places settings:
    amount 2
    price 5
    rates 6
    quantities 0
    percent 2
    units 2
    My 1st question:
    How SAP calculates the GST 7%?
    I worked out this formula by seeing from SAP results:
    Exc. Rate 1.408000
    Line Total USD 714.80
    Tax USD 50.04
    Total USD 764.84
    My customer A/P Invoice (from supplier) tax is 70.46 but in SAP it is 70.45 meaning SAP is actually taking 714.801.4080007/100 = 70.45 rather than USD50.40*1.408000
    I tested with more than 15 invoices and the results are the same (meaning either one cent extra or less). My customer wanted to kill me so badly why SAP is behaving like this. Check this invoice:
    Exc. Rate 1.373000
    Line Total USD 225.00
    Tax USD 15.75
    Total USD 240.75
    If you used the same formula as mentioned above, we should get 21.62475 but when I looked into the entry created by SAP it shows 21.63. Why? Is it because of round up? 5 rounded up and 7 became 8, 8 rounded up and 4 became 5, 5 rounded up and 4 became 5 and finally 5 rounded up and 2 became 3? What should I do for my customer? Post journal entries?
    My 2nd question:
    My invoice figures are as following:
    subtotal SGD 116.00
    gst SGD 8.12
    total SGD 124.12
    When I looked into the transaction (journal entry) it is showing the customer account is debited with SGD117.29, GST account is SGD 7.67 credited and Sales account SGD 109.62? Why? I checked the change log for that particular invoice. Double click then i brought out the invoice history instance #1, it is showing the same figures as in journal entry? Why?
    Please advice.
    Best regards,
    Lim

    Hi Lim,
    For AP invoices, you can force in the tax amount. Update your Form Settings so that the "Tax Amount" field is displayed. Another option would be to look into the rounding or under/overpayment features. Where you are using foreign currency, you may want to have rounding active. Do some test transactions is your test db (copy of the live/production database) to see if this is the right solution for you.
    Amount = extended price/amount (line total). If your price is at 5 decimals, the line total (extended price/amt) will be rounded to 2 decimals, which explains what you see (21.63).
    For 1st question:  tax is calculated on net amount then it applies the exchange to the tax amount so 70.45 is correct.
    For 2nd question, not sure what it is you are looking for... Are you sure you have the currencies and amounts in your question correct? Do you display both LC & FC in the J/E? Only way I can think of amounts changing is if you are looking at amount for one transaction (ex. Delivery) vs another (ex. AR invoice) and the rate may be different in the two transactions.
    If you need more assistance, please indicate your currency settings as well as SBO version/localization.
    Regards,
    Heather

  • Report for Differences in Invoice Amount and PO Amount

    Hello,
    Is there any standard report available in SAP to compare the differences in PO Amount andd Actual Invoiced Amount against that PO?
    Regards,
    Rohit Garg

    Hello,
    Try report MC$4 - Vendor Analisis: Purchasing Values.
    I personally find it very useful.
    Hope this helps!
    KR,
    Severina

  • A/R extractor - Material and Invoice Amount

    Hi Gurus,
    I just wanted to extract Material and Invoice amounts for Accounts Receivables from R/3 to BW?
    Is there any standard extractor for the same.
    I found 0FI_AR_4 but it doesnt have material field.
    How can I link the BSID table with material.
    Is it via Sales Document (VBELN)?
    Regards,
    Srini

    Hi Srinivas ,
    Invoice is part of AR but material (0material ) is not part of AR .It is part of SD .If you are looking for this field you may not find it .
    You can check standart key figure and Characteristics available under it in this link :
    http://help.sap.com/saphelp_nw70/helpdata/en/3b/eac53976b78867e10000000a11402f/frameset.htm
    If you want material you need to use SD material .If you want these fields for a report then you can make a multiprovider with AR and SD cubes Having both material and Invoice .
    Regards,
    Jaya

  • Date wise invoice amount

    Dear all,
    I am in need of a report which will tell me what is the vendor invoice value posted for any particular date.
    I checked in MC$4 report where the invoice amount is shown cumulated for a particular month. - can i have a date wise details for any plant and vendor.
    Regards,
    M.M

    Hello,
    BKPF - Accounting document header - where you will have accounting document number / document type / document date / posting date / reference etc.
    BSEG - Data relating to all line items of accounting document.
    EKPO - Purchasing document item
    EKKO - Purchasing document header.
    Hope these tables are helpful.
    Also hope the following document is helpful for you.
    http://www.abap.es/Descargas/TAB%20-%20Relacion%20de%20las%20tablas%20por%20modulos.PDF
    www.b-cis.fr/ressources/tables-in-sap.doc
    Regards,
    Ravi

  • Difference between Invoice amount and invoice amount on psting date

    Hi Gurus,
    I had run MC$G report which dispalys Vendor/Order Qty/PO value/Gr quantity/GR value/Invoice quantity/Invoice amount (Posting date) / Invoice amount
    In this issue is Invoice amount Posting date and Invoice amount fields were not showing same value.
    Could you please tell me the difference between these 2 ??
    Reagr

    No answer

  • Payment Amount is greater than invoice amount in sales order

    Hi experts:
    I have a Sales order that contained originally  3 lines of which the first 2 lines was delivered totally and the third was delivered partially.
    The client decided to change the remaining quantity for another reference so the procedure in the sales order was to add another line and try to close the third line by right click and "close row" but the option is not available because there is a partial delivery, so the option was to update the inicial quantity in the third line at the same as delivered and update.
    Like a result a I could close the third line and leave a fourth line available to delivery, however when I open this Sales order again an try to update a message "payment amount is greater than invoice amount" and appears inmediately the "Deposit on Order" window.
    Other Information:  The quantities delivered was invoiced but no payment has been received.
    Checking in the SCN I have not found some related information with this case because the existing answers are related with incomming and outgoing payments but like I mentioned before this docuements already have not payments.
    In relation with the decimal places, my original decimal places configuration was 2 and it was updated to 3, issue that neither is mentioned in previous answers.
    I will appreciate your help,
    Thanks,
    Manuel

    Hi Manuel,
    Your case is complicated by the fact you have not only undated the Sales Order which is partially delivered but also updated decimal places during the process.  In this case, you are probably the best person to figure out what is the system expected number.  You may restore your production db to test environment first.  Then do whatever you could to fix the problem.  If no solution can be found, you have to log a message to SAP support.
    A general advice: do not fight with system for what you think system should accept.
    Thanks,
    Gordon

  • Reverse calculation of tax amount

    Hi Experts,
    Is it possible to calculate tax on reverse mode?
    I will enter the total invoice amount, the system will calculate the unit price  and  tax amount.
    How will it possible?
    Regards,
    Sanju M S

    closed...!

  • Payment amount is greater than invoice amount error

    Payment amount is greater than invoice amount error when doing incoming payment
    regards
    kavitha S

    Hi Kavitha,
    please check in the OINV table the balance due on the invoice. This amount has to match the payment. If the problem is due to different decimal places & you are using a version lower than 2007 you will be able to change the decimal places for this particular payment. If you are using 2007, you will no longer be able to reduce the number of decimal places. In that case you could check out SAP note 1321183 & verify with your accountant that the workaround may be used.
    All the best,
    Kerstin

  • Duplicate Invoice Check Not Checking the Gross Invoice Amount-

    Gurus,
    When checking for duplicate invoices in MIRO/FB60, I have made all the config and setup but still the system is not checking the gross Invoice amount field. Lets say I enter
    Invoice 1 :
                     Vendor                 X
                      Reference            123
                      Date                    10/27/2010
                      Company Code : 1111
                      Currency           : USD
                      AMOUNT           :100         and post this invoice
    I try to enter the second invoice
    Invoice 2: 
                       Vendor                 X
                      Reference            123
                      Date                    10/27/2010
                      Company Code : 1111
                      Currency           : USD
                      AMOUNT           : 90    
    I get the error message even though the AMOUNT in the second invoice is 90 which is not the same as first invoice .
    I chcked the vendor master duplicate check, made the config in spro-liv for duplicate invoice for company code, reference number and invoice date.
    The help says that after 4.6 version if all of them match, then the system wiill throw error, but in my case the amount is not matching and its still giving me an error.
    Kindly help..<< Moderator message - Please do not offer points >>
    << Moderator message - Everyone's problem is important >>
    Edited by: Rob Burbank on Oct 27, 2010 4:07 PM

    Hi,
    After making the duplcate invoices chek at spro will checks the reference number of the invoice entered previouslu with that one entered later for that company code.as the first check itself failed system throws the error thinking, you are trying to enter a duplicate invoice for a  already posted invoice though how much is the amount in the second invoice .
    It will allow to enter the item details , if the dupplicate invoice check is properly configured for that company code and ref number .Did you get the error mesage after entering the details?If you get a error a message which stops furthur entry them your conf is correct, if not you may need to check back .
    Check the invoice toletrances at spro too amount.
    the below link explains you the process of dupliation in LIV.
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/ce/4f3e39ea3aee02e10000000a114084/frameset.htm
    Regards,

  • Need to display invoice amounts under each aging period (columns  dynamic)

    Hi All
    i'm developing Aging Report but i'm missing how to get the idea that i show the aging period(period_sequence_number)dynamically & show the invoice amount under its corresponding period
    As for example
    Vendor No      Vendor Name      Invoice No      Date      Voucher Ref      Due Date          0-30     30-60     Column(n)
    aaaa ccccc dddd 3333 15/5/2010 1000
    aaaa ccccc dddd 3333 15/5/2010 2000
    where
    1- (1000,2000) is the invoice amount .
    2- ( 0-30 , column(n)) days start & days to of tht period selected as parameter
    waiting your reply

    Hi;
    Please see below notes which could be helpful for your issue:
    New Parameter As Of Date (Period) In Invoice Aging Report [ID 752120.1]
    R12.APXINAGE. Invoice Aging Report does not Show Balances in Aging Buckets. [ID 834754.1]
    New Parameter As Of Date (Period) In Invoice Aging Report [ID 752120.1]
    Regard
    Helios

  • To caliculate invoice amount with Tax amount

    HI,
    We r here creating purchase register report.
    user requirement is in purchase register user wants invoice values as invoice value + taxes.
    we have takne invoice amount form RSEG Table & taxes form BSET table.
    How can we link RSET to BSET table.we have three lint items from RSEG table but if we select from BSET table all the three line taxes caliculating in to one line items it must caliculate line item wise.
    how can we take line item wise taxes to invoice amout.
    Pls help.
    Regards
    Sunil

    Hi,
    Please also refer the condition number in the report. Since every condition type will have a unique number, line item wise breakup is possible.
    Thanks

Maybe you are looking for

  • How do i share the music in my itunes with other iphones in our family

    how do I share my itunes music with the other iphones we have in our family.  Each person in our family has their own itunes acct. but the music in only on one account.  i was told that it is possible to put that music on their phones.  If so, please

  • To add new record into the table Data Service client

    When I am trying to add new record into the table Employeedetails using Data Service client it is giving a sql exception: "java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in obje

  • Embedded Quicktime movies have a Quicktime logo all over blog

    I recently moved my website from Wordpress to Squarespace. Most has gone smoothly. I used to embed my movies in Wordpress with the 'Embed Quicktime' plugin. Squarespace doesn't have something similar so I was left to figure it out on my own. I export

  • Checked Exception and Anonymous classes

    Hi I am refering to java certification book that says : If a checked exception is thrown during the execution of initializer expression, then it has to be caught and handled. This restriction does not apply to instance initializer expressions in anon

  • How to simply add custom property to a HTML Form Web Part?

    Hello. Is it possible to add a custom property (like a date-field) to a HTML Form Web Part with help of JavaScript? I do not want to use Visual Studio / Nappa etc. Is this possible in an easy way? Thanks for your help.