Query for details of  Sale order , Invoice and COGS

I Need the report cointing following based on month & Business partner
Sale order, Sale Amount, Due date, Invoice Amount, Last Invoice date, COGS amount

Hi Anantha,
Please check below link and modify according to your requirement.
Sales Order Query for  in SAP B1
Query - Sales Orders linked to Deliveries
My Top SQL Queries for SAP Business One
Hope this helps
Regards::::
Atul Chakraborty

Similar Messages

  • Sales orders/ invoice and customer master URGENT!!!!!

    how can i correct this problem...... customer is linked to the wrong customer master, customer is supposed to be a canadian customer but linked to US customer master? in terms of currency
    Also when the Sales order and Invoice was created for this customer they were inoviced in US dollars and not in Canadian Dolllars how do i reverse change currency from US to Canadian?
    Does this mean that the sales order has been linked to the wrong customer master?

    hI,
      In this case if the invoice had not posted to A/C use vf11 and cancel invoice.and use vl09 and riverse pgi and delete the delivery and by going to VA02 delete order.
      since u r saying that this customer falls under canadian customer while crweating CMR select A/C group of canadian customer then check all the critical fields of inco terms,payment terms,currency as per the standard and follow the subsequent sales process.
      cross check the sold to party details weather invoice had made against proper sold to party or not?if not just cancel invoice and subsequent documents.
      if the material had already dispached and you find there is any difference in total invoice value,create accordingly the needed Credit memo or debit memo with the proper reason.
    later as a permenent solution mark this CMR for deletion and create new CMR with proper accounting group.

  • Query for all open sales order with a date range

    Hi Experts!
    I wrote this query that will look up all open sales order of a particular customer and how much was served:
    SELECT T0.[DocNum] 'OS #', T0.[DocDate] 'Posting Date', T0.[CardName] 'Customer',  T1.[Dscription] 'Item Description',T4.[SalUnitMsr] 'Sales UOM', T4.[InvntryUom] 'Invty UOM', T1.[UseBaseUn] 'Use of Invty UOM' , T1.[Quantity], T1.[Quantity]-T1.[OpenQty] 'Served Qty', T1.[OpenQty] 'Unserved Qty' FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCTG T2 ON T0.GroupNum = T2.GroupNum INNER JOIN OSLP T3 ON T0.SlpCode = T3.SlpCode INNER JOIN OITM T4 ON T1.ItemCode = T4.ItemCode WHERE T0.[DocStatus] = 'O' and T0.[CardName] =[%0]
    However, I don't know how to input a parameter for the date range in a query.  Can anyone help with this issue?
    Your input will be highly appreciated.
    Warm regards,
    Jen

    Hiiiiiii
             Try This.....
    SELECT T0.DocNum 'OS #', T0.DocDate 'Posting Date', T0.CardName 'Customer', T1.Dscription 'Item Description',T4.SalUnitMsr 'Sales UOM', T4.InvntryUom 'Invty UOM', T1.UseBaseUn 'Use of Invty UOM' , T1.Quantity, T1.Quantity, T1.OpenQty 'Served Qty', T1.OpenQty 'Unserved Qty' FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCTG T2 ON T0.GroupNum = T2.GroupNum INNER JOIN OSLP T3 ON T0.SlpCode = T3.SlpCode INNER JOIN OITM T4 ON T1.ItemCode = T4.ItemCode WHERE T0.DocStatus = 'O' and T0.CardName ='[%0]' and (T0.DocDate>='[%1]' and T0.DocDate<='[%2]')
    Regards,

  • Exchange Rate calculation mismatch in Sales Order Invoice and Cancelled Invoice

    Hi,
    In Sales Invoice, Exchange Rate is maintained as 7.75132
    Invoice Amount is 72000 USD. So the Amount calculated should be 558095.04.
    But in Accounting Document the Amount is posted as 558095.15 for the GL Sales Account.
    In Cancelled Sales Invoice, Amount posted is  558095.04 in GL Sales Account which is correct.
    Please help me understand why there is difference in both the Amount even when the Exchange Rate is same.
    Regards,
    Debashri Dutta

    Hi Ankur,
    Thanks for your reply.But our problem is sales order,exchange rates are defined with M type in OB08 as u have said.However when the periods are different for order entry and invoice generation we are facing the following problem.Orders are at old exchange rates and excise invoice is getting generated at current exchange rate.This is resulting in value difference between commercial invoice and excise invoice.
    Please help.
    Regards,
    Praveen

  • QUERY FOR STATUS OF SALES ORDER

    Hi Experts,
    Here my Client required one query for status of the Sales Order line item wise and by when material will be  ready after giving clients PO no. sales order NO. Clients name etc.
    Please give me guide to write this query.
    Regards
    Madhu

    Hi,
    Try this link,
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/d2/cb4759455611d189710000e8322d00/frameset.htm
    Cheers,
    Shailabh

  • Query for approval procedure - A/R invoice and A/R credit memo

    Dear all,
    Need one help regarding approval procedure.
    Query :- If we do A/R credit memo and days from A/R invoice to A/R credit memo are geter than 180 then A/R credit memo
                  shoild go to the approval. (A/R invoice shoul be a base documnet)
                  I have made below query, but if days are >180 or <180 it is goinf for a approval. Can any one suggest for this.
    SELECT distinct 'TRUE'
      FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
    inner join RIN1 T2 on t2.BaseEntry=T0.DocEntry
    inner join ORIN T3 on T2.DocEntry = T3.DocEntry
    where  DATEDIFF(day,T0.[DocDate],T3.DocDate) > 180
    <a href="http://megaupload2.name/">megaupload</a>, <a href="http://www.btjunkie.name/">btjunkie</a>,  <a href="http://www.freedownloadgames.name/">games</a>

    Hi,
    Try:
    SELECT distinct 'TRUE'
    FROM OINV T0
    inner join RIN1 T2 on t2.BaseEntry=T0.DocEntry AND T2.BaseType = 13
    inner join ORIN T3 on T2.DocEntry = T3.DocEntry
    where DATEDIFF(day,T0.DocDate,T3.DocDate) > 180 AND T3.DocEntry=$[ORIN.DocEntry.number\]
    Thanks,
    Gordon

  • Linking between Sales order data and Biling condition

    Hi Bwers,
    Currently we are geneating a report with Sales order Item level (2lis_11_VAITM) information and Biling conditions(2lis_13_VDKON). We have respective DSO for both datasources (Sales order DSO and Biling Condition DSO). We have to pull both information into a report.
    We have sales order number (0DOC_NUM) in Sales DSO and Biling document number (0BILL_NUMber) in Biling DSO. And we found Sales order Number (0BILL_NUM_0DOC_NUMB) as an navigational attribute for Biling DSO.
    We are trying to extract Billing condition type and Billing condition value from Billing DSO.
    Now the question's are:
    1. Can I use Sales order number as linking field for Both DSO' or not. Though It is an Navigational attribute for Biling document number in Biling DSO.
    2. Is the Sales order number and Billing Document number both are same or not. What is the linking field between sales order info to Biling info.
    2. How to bring Sales order info and Biling info into a report through Infoset. If infoset which link should I use bring both info into a report.
    3. Or Multiprovider is the right one.
    3. Please let me know if any other linking fields are existed between these two datasources other than Sales order.
    All the helpful answers are awareded with full points.
    Regards,
    Venkat

    1. Can I use Sales order number as linking field for Both DSO' or not. Though It is an Navigational attribute for Biling document number in Biling DSO.
    - yes you can link, Navigation attrbute does not matter
    2. Is the Sales order number and Billing Document number both are same or not. What is the linking field between sales order info to Biling info.
    --one sales order number may correspond to different billing number including the one which shares the same number.
    2. How to bring Sales order info and Biling info into a report through Infoset. If infoset which link should I use bring both info into a report.
    -- Multiprovider is the best option while dealing with such cases.
    3. Or Multiprovider is the right one.
    --yes.
    3. Please let me know if any other linking fields are existed between these two datasources other than Sales order.
    there may be possibilty of other fields also like Profit center, Controling area etc depending upon your project requirment

  • How to get the ammendment sales order number and original sales order no?

    Hello sir's,
    Please tell me the table for ammendment(revised) sales order number and original sales order no.
    Thanks in advance,
    vikram

    Solved

  • Urjent-Any function module for finding Sales order, Delivery and Invoic

    Hi Experts,
    I am having selection screen like
    Sales order
    Delivery
    Invoice
    Customer
    If i give sales order
             Delivery and Invoice should pull
    If i give delivery
             sales order and Invoice should pull
    If i give Invoice
             sales order and delivery should pull
    If i give customer
               all customer related data should pull
    Do we have any function modules to meet this reqirement?
    If we have please provide function modules.
    Thanks,
    mahe
    Edited by: Rob Burbank on Mar 30, 2009 4:17 PM
    Edited by: mahahe on Mar 31, 2009 9:12 PM

    You can use VBFA table, right? in the FM also, you can find the same logic, like pulling from VBFA table.
    thanq

  • Any function module or bapi to get sales order number and invoice number?

    hi all,
    with delivery order number provided, do we have any function module or bapi to get sales order number
    and invoice number?
    thanks.

    Hi,
    Check
    BAPI_SALESORDER_CREATEFROMDAT1
    BAPI_REMUREQSLISTA_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Vendor Billing Documents
    BAPI_REMUREQSLISTB_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Payment Documents
    BAPI_REMUREQSLISTC_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Posting Lists
    BAPI_REMUREQSLIST_CHANGEMULT   Agency Business: Change Invoice List Documents BAPI
    BAPI_REMUREQSLIST_GETLIST      Agency Business: BAPI Determine Detailed Data for Invoice List Documents
    BAPI_REMUREQSLIST_RELEASE      Agency Business: BAPI Release Invoice List Documents to FI
    Edited by: Neenu Jose on Nov 26, 2008 8:53 AM

  • Sales order invoice query

    Hi
    Please send the sales order invoice query as basic columns.. Further I will modify the query according to the requirement.
    Pleas send to my personal ID: [email protected]
    Thanks
    Sree

    Thanks.  There's a few problems though.
    1)  It seems that OINV DocTotal != Balance Due.  I'm seeing a number of invoices where there was a balance due, but we applied additional money (either we took another incoming payment and applied it or applied money from the account balance, etc.) and yet it still shows a total.
    2)  It's pulling incoming payments from different customers.  I think this is because the table was joined based on "RCT2 T4 on T4.[DocEntry]  =  T3.[DocNum] and T4.[InvoiceId] = T2.[LineNum]"  In one example I have 2 incoming payments 446 and 614.  Both have the DocEntry 542, but one relates to A/R Invoice 542 (for a different client) while the other relates to Down Payment Invoice 542.  *I was able to fix this by adding WHERE T5.CardCode = [%0]*
    3)  I'm going to work with this a little bit and see if I can alter it to make it work for me.  Basically this query falls a little short on the following:
    -  Doesn't include incoming payments that aren't linked to a down payment invoice.
    -  Does not give the Invoice Total (I'd like to know how much of the SO was invoiced.  DocTotal seems to give me Amount Invoiced - Down Payments.  I'm not sure the best way to get this number.  Maybe I could do the sum of each line * tax + freight)
    -  Does not give the outstanding amount on an invoice.  The ARtotal [DocTotal] column gives me how much was owed when the invoice was created, but it doesn't tell me what is currently owed.
    -  Lastly it may complicate the query too much and could be left off, but it would be nice to see if they have any money from credits or incoming payments that has not been applied.  Perhaps this would be easily accomplished by simply pulling in their account balance.

  • How to create ship to party and sold to party for DC10 during sales order ?

    Hello all:
    When creating sales order for a material in VA01 with sales Org 1000,
    distribution channel 10, division 00
    The system does not give me any Ship to Party and Sold to Party with the above combination
    How to create ship to party and sold to party with the above combination (Plant 1000,
    sales org 1000, distribution channel 10, during creation of a sales order
    Ironically, when creating material master for a material with a material type KMAT, plant 1000
    sales org 1000, the only distribution channel is populating in the input help (F4) is 10
    For which no ship to party neither sold to party is maintained in sales order creation
    Thanks in Advance!!

    Dear Eshwer
    It is bcoz, the said account groups (Sold To Party and Ship To Party) are not created in the sales area 1000 / 10 / 00.
    To create a customer master, you have to go to XD01, select the Account Group, Company Code and the respective Sales Area and execute.  In the Customer Master, you have three tabs, viz.General Data where you have give address details of the customer, then in Control Data, you have to assign the respective Recon Account and in Sales Area Data, you have to maintain the customer's sales related details.  Once you give all these datas and save the data, a customer code will be displayed at the bottom.
    Now go to VA01, input the sale order type and the sales area and execute.
    thanks
    G. Lakshmipathi

  • Subcontracting for Sales Order Stock and collective Transfer Posting

    Dear Expert,
    We have a scenario in subcontracting wherein the sales order the customer also wants to see the components and as such along with the Header item of subcontracting ,we also mention the components as another line item in the sane Sales Order.
    Now from the sale sorder two Po's are created onr for the subcontractor and one for the compnens to be procured.
    Since the components are procured on sales order stock there is noway we can issue it to the Vendor stock through Movt .Type 541.
    As per SAP AG WE CAN:
    "ubcontracting is also possible in conjunction with sales order stocks and project stocks. The subcontracting orders are account-assigned to a sales order or a WBS element. Thus, the components are not transferred (using a transfer posting) to the u201Cstock of material provided to vendoru201D but are directly withdrawn from the sales order stock or the project stock at the time of the goods receipt. The material manufactured is also posted to the sales order stock or to the project stock. The cost of subcontracting is then debited to the sales order or WBS element.Since the components are not transferred to the u201Cstock of material provided to vendoru201D, we recommend that you use a transfer posting to transfer the provided components to a new storage location (for example, 9999). This enables you to obtain an overview of those stocks that are physically located at the subcontractor.This information is particularly important when you carry out a physical inventory of the sales order stocks and project stocks."
    But my query is that how many such storage locations will be created for the subcontracting vendors.
    Secondly for the stock transfer from sales to storage location , we have lots of sales order, is dera way through which we can do bulk transfer rathar than clicking at new item everytime and then doing the transfer posting.
    your expert advice shallbe helpful in resolving a longtime pending issue , waiting for the response.
    Regards
    Jabeen

    This is a known issue, the system doesnt allow stock to have two special stock statuses at the same time.
    Your concern of having to make multiple storage locations is valid (since this is a configuration).
    I suggest you do the following
    - Configure a warehouse and a single storage type (say 001). Allow mixing of materials in a single bin
    - Assign this warehouse to a new storage location.
    - Create a bin for every sales order number in the warehouse.
    - When goods are moved to subcontractor, perform a transfer posting to the storage location, and perform a putaway to the respective bin. The putaway strategy can be tweaked using a user exit to go to the relevant bin. This way you do not have to enter the WM transaction for putaway.
    - To consume the stocks, you can use 231E movement (MB1A). On the WM side, the picking strategy can be enhanced so that the picking TO is generated with the correct source bin. Make sure the GL account and CO objects are as per FICO requirements.
    This way you can track the stocks binwise (bin level reports are available in WM), perform physical inventory and also consume the stocks from the relevant bin automatically.
    We had faced the same situation, and we ended up not having sales order stock at all.
    Hope this helps.
    Regards,
    Aroop

  • Sales order, Delivery and Invoice changes history tables

    Dear All,
    I want to know how to find out the changes done in Sales Order, Delivery and Invoice.
    As far as sales order is concerned, I know CDHDR and CDPOS are tables can be used to find out the changes.
    But I am not sure about the "Object ID". Where we need to find out this Object ID?
    In the Data element "VBELN_VA" "Change Document" option has been checked under "Further Characteristics" tab.
    Please confirm about the "Object ID".
    Similarly give inputs for Delivery and Invoice change history also.
    Regards,
    Mullairaja

    Hi,
    Could you please explain, how to use these programs?
    Regards,
    Mullairaja

  • Any standard SMARTFORMS available for purchase order, sales order, invoice

    Hi,
    Any standard SMARTFORMS available for purchase order, sales order, invoice ?
    RR.

    Hi Rama,
    Goto NACE tcode-> choose the application u want( like billing for invoice, PO)->output type->output type->processing routineon left side
    Here u will find the standard program name and smartform .
    Hope it helps.
    Regards,
    Sonika

Maybe you are looking for