Linking column for sales,delivery  and invoices

I just have a question regarding database schema in SAP B1.
I would like to know   how SAP b1 links
Sales Delivery and invoices
In other words
i want to know all invoices based on Sales and delivery
all invoices based on  just delivery etc
What is the linking field or column between these three tables
rdr1, dln1,inv1
How does Sap keep track of whether a invoice is based on sales or delivery or
both.? I appreciate your help.
Thanks,
Josh

Hi Joshua,
What you need to look at are the BaseEntry, BaseType and BaseLine fields in the item row (ie INV1 or DLN1). It works as follows:
BaseType = The originating document type where 17 is a sales order and 15 a delivery
BaseEntry = The DocEntry of the originating document
BaseLine = The LineNum of the originating document
A simple example is as follows:
1) I create an order (DocEntry 10) with 2 rows (LineNum 0 and 1)
2) I create a delivery (DocEntry 5) based on this order with both rows. In the DLN1 table my rows will have BaseEntry 10, BaseType 17 and BaseLine 0 and 1.
3) I create an invoice for the second row from the delivery. In the INV1 table I will see BaseEntry 5, BaseType 15 and BaseLine 1.
You also have TargetType and TargetEntry which show the target document details but these are not that useful as they only show the last target number and type and cannot be used where you have multiple target documents.
Kind Regards,
Owen

Similar Messages

  • Exit to block Sales Delivery and Invoice?

    Hi Experts,
    Does there exist any exit to block the sales delivery and invoice?

    badi LE_SHP_DELIVERY_PROC
    Regards.

  • Crystal Report for Sales, Delivery and Payment.

    Hi Guys,
    Need some expert advice over here. Currently, our sales team are using 3 separate report, one report on sales per month for each specific customers, one report on delivered amount per month for specific customers again and the last one report on payment received per month for specific customers as well.
    We have the idea of joining this 3 report so that I can report on sales, delivery and payment all at once so that they can see the trend better. However, after trying for quite a few times, we fail to create a common joining between ORDR, ODLN and ORCT. Is there any possible way to work something out ?
    I have thought of using subreport, but I just cant find the way to plug in the figure correctly.
    Need some advice over there.
    Thank you.
    Best Regards,
    Alex

    Based on what you have told me, then you should then join Sales Order, Delivery, Invoice and Incoming Payments into one.
    The reason I say Invoice table also is because, you cannot directly link Delivery and Incoming Payments window.
    Also you it is not enough that you link the ORDR, ODLN and ORCT, you will need to get the details from RDR1 and DLN1.
    In SAP Business One, each line in SAP Business One can have a different Delivery documnet.
    The TrgetEntry, TargetType will give you this information. For example, if a line for Sales Order has TargetType 15, then TrgetEntry will be the DocEntry in the ODLN. But if it TargetType is 13 it means the Sales order was converted directly to and Invoice and bypassed the creation of Delivery step, which is possible in SAP.
    So here is how I think you will need to link Sales order and Delivery
    RDR1.TrgetEntry INNER JOIN DLN1.DocEntry AND
    RDR1.TargetType INNER JOIN DLN1.ObjType AND
    RDR1.LineNum INNER JOIN DLN1.BaseLine
    Now this could get a little more complicated if you do partial deliveries. For example if a line in your Sales Order has say 10 items and 6 of them are delivered using Delivery Note 123 and the remaining are delivered using Delivery Note 124, then the join will give you 2 different lines.
    So basically you will need to link the tables in this fashion
    ORDR <-> RDR1 <-> DLN1 <-> INV1 <-> RCT2 <-> ORCT
    Unfortunately, this linking process can get complicated if you do not follow certain steps, like for example if you do not create a Delivery Note and converted your Sales order to Invoice. Then the link would be
    ORDR <-> RDR1 <-> INV1 <-> RCT2 <-> ORCT
    I hope I didn't confuse you.
    Krishnan

  • Best Datasources to use for Sales Orders and Invoiced Quantities

    Hello Experts,
    Just wanted to ask if anyone has experience and can recommended the ECC Datasources to use to extract:
    1. Invoiced Qty = Sales History
    2. Open Sales Orders
    3. Shipped Qty= Goods issued but not yet invoiced
    So far in my research I have down the following datasources:
    1. 2LIS_13_VDITM Billing Document Item Data  for Invoiced Quantities
    2. 2LIS_11_SSL, or 2LIS_11_SCL or 2LIS_11_VASCL for Open Sales Orders
    3. 2LIS_12_VCITM, 2LIS_11_V_SSL for Shipped Quantities
    Any suggestions?
    Thanks alot
    Victoria

    Hi Victoria:
    Plese take a look at SAP Best Practices (Scenario Documentation and Building Blocks)
       Open this URL: http://help.sap.com/bp_bw370/html/index.htm
    Click "Preconfigured Scenarios" link
    Click on the Links to navigate on the different available scenarios and to see the documents you can download (Technical Documentation > Configuration Guide)
    *Customer Relationship Management
    -- Sales Analysis
    -- Cross-Functional Analysis: Financial and Sales Data
    -- Booking Billing Backlog Analysis
    -- Sales Planning
    -- Scheduling Agreements Analysis
    -- CRM Analytics
    Edited by: Francisco Milan on Jun 3, 2010 6:23 PM

  • 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

  • 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

  • Sales Order no and IDOC No Link table for Sales Out bound IDOC ORDRSP

    Hi Friends
    How to find Sales Order no and IDOC No Link table for Sales Out bound IDOC ORDRSP.
    Thanks in Advance.
    SR

    Hi
    If the idoc is managed by message, the link are stored in GOS (Obeject Service)
    U can try to use the function module NREL_GET_NEIGHBOURHOOD
    If you put
    IS_OBJECT-OBJKEY = <sales document>
    IS_OBJECT-OBJTYPE = <business object> (I think BUS2032)
    the function returns the idoc
    or if you put
    IS_OBJECT-OBJKEY = <idoc number>
    IS_OBJECT-OBJTYPE = <business object> (I think IDOC)
    the function returns the sales order
    You can investigate that function module in order to find out the tables
    Max

  • Importing Sales orders and Invoices thru DTW

    Hi every one,
    I am facing a unique problem when using DTW to import sales orders and invoices through DTW.
    I am using the two templates- Documents and Document Lines. But the imported Invoice or the sales order(In both cases) the dicount field in the row is taking a negetive discount value. Let me elaborate....
    1. I am taking a BP which has been alloted a Particular pricelistcode in the BP Master.( say it be Purchase price).
    2. Now In the Doc_lines Template I have put the value in the price column- (eg. Rs. 500).
    3. Now the itemcode used in the template is already having a masters and the prices are also defined in SAP B1. Say the Purchase price defined for the item is Rs.400
    4.When I am importing the order/nvoice then the discount field in the row automatically takes a value of -25%, the unit price has the value Rs.400 and the Total Field shows Rs.500.
    ( this Implies that the price I have suggested to Import i.e. Rs500 is some how not taken by the system. The system takes the price defined for the BP and then adjusts it with the price suggested by the user during import) So a negetive discount is taken.
    On the other hand if the same procedure is followed for an item where the prices are not updated in the master data then there is no such problem. the unit price field reflects the price which is given in yhe template.
    please suggest a way to get out of this problem.

    Hi Debraj,
    Try the following..
    In Admin > System init > Document Settings > General Tab ..Calculate the Row total using Unit price ....... leave this  unchecked
    Also, at the Document_lines template fill the discount column with 0
    Suda

  • Tax calculation on sales order and invoice is different

    2007A, SP0, PL49
    The tax on a sales order does not match the tax on the linked delivery and invoice by 1 cent. We take payment based on the sales order amount as the delivery and invoice are done after the fact. Why is the tax calculated differently on the delivery/invoice? We would want it to always match.
    Item price = $111.04. Taxcode rate 13% has combination of 5% GST + 8% ONTAX.
    On Sales Order, ONTAX = $8.88
    On Delivery/Invoice, ONTAX = $8.89
    Can someone please explain the difference? Is rounding/tax calcualtion controlled by system settings per document?

    Something must be wrong with your Sales Order tax.  The actual tax would be 8.8832.  Round up to 8.89 is correct.  Do you have any SP, FMS or add-on been used?
    Thanks,
    Gordon

  • Creation of Automatic delivery and invoice..

    Hi Team,
    Can you guys please tell me the configuration steps of automatic delivery and invoice creation.
    Actually I want to create the delivery and invoice as soon as order get saved.
    I will be highly oblige if you kindly revert me back
    regards,
    jeetsap

    Dear Prasanna,
    In vl23, you will not be able to make changes in the STANDARD VARIANTS.
    You can create your own variant by (SHIFT + F7).
    Give a variant name ' TEST' and click create.
    Now you can give the selection parameters
    Click on attributes
    So you will reach a variant screen, where you have to give  a 'meaning name'...like variant for TEST
    You can see fields .
    Imagine that initially you had given 1100 in the sales organisation.
    Now if we do not want that value to be changed, then use protect field.
    If that field need not be displayed, the choose hide field.
    Usually, these two will be used, if we are going for background processing.
    SAVE and you can see a new variant in VL23 now.
    Thanks & Regards,
    Hegal K Charles
    Edited by: Hegal . K . Charles on Jul 18, 2011 11:48 AM

  • Blockin of Delivery and Invoice

    Hi Guys,
    If a vendor is blocked for some reason thru FD32, can we restrict SOs, which have been created earlier by him, for delivery and billing?
    Warm Regards,
    Mohandoss P.

    Hi Erik Hoven,
    Let me explain the scenario, A customer can't create a sales order if i suppose block that customer,lets consider CGK20S000,through FD32 on 15th March'09. He is no more allowed to system to create a documents now onwards.
    Fine then, the system allows him to create a delivery and invoice for the sales orders which have been created by him on prior to 15 March 09. Our requirement is, he should not be no more allowed to create any documents.
    Will it be achieved through any exits?
    Warm Regards,
    Mohandoss P.

  • Delivery and invoice

    hi friend ,
    based on sales order how we can create a delivery and invoice automatically. how we can do can u provide me such document
    thanks

    Hi,
    Nishant: Incoming Invoice is for MIRO. So for sales BAPI_INCOMING_INVOICE_CREATE wont work.
    Ravi
    Check [here|how to create invoice using bapi  base on delivery number with example;
    Goto tcode BAPI and find the appropriate BAPI or goto se37 and put BAPIdelivery &BAPIinvoice.
    Search SCN before posting generic queries.
    Regards,
    Amit

  • To find delivery and invoice no

    How to find delivery and invoice no for given range of sales order no?

    Dear mani
    run VA02, input the sale order reference and press [Shift F5]  This is one option and the other option is go to SE16, input Table VBFA, input sale order reference in Preceding Document and J & M in Subsequent document category and execute.
    thanks
    G. Lakshmipathi

  • Report to list manual changes to conditions in sales orders and invoices

    Hi experts,
    Is there a Standard Report to list the manual changes of pricing conditions in sales orders and invoices?
    Should be a selection on the field KONV-KMPRS.
    Please advice.
    Rgds,
    Pri

    Hi priya,
    In the Sales Order,Select Environment and then Changes to See all Changes made.
    Follow the Same procdure for Invoice also.
    There is no Standard report as such to see the changes.
    Thanks,
    Neelima.

  • How to create Sales order and Invoice in Foreign Currency

    Dear All,
    What are the procedures I have to do to create the sale order and Invoice in Foreign currency.
    Is it enough if I maintain the currency in the Customer Master and Excahge rate OBBS.
    or
    We have to do someting in the Sales order (Change the currency document header level)?
    Kindly explain.
    Regards,
    Mullairaja

    Dear Mullairaja
    Under customer master you can maintain currency eg. usd, eur etc. that will do.. (hope you have maintain diift. Dist. Channel for Export sales and maintain Recon A/c for export revenue.) This will copy to Sales order.
    Under t.code OB08 we maintain the Currency Exchange Rates which will help for copying control.
    Under Displaying Billing document - Accounting -  you can click on Display Currency Tab,  here you will understand the rate conversion  i.e from USD to INR.
    Thanks & Regards
    Hrishikesh K

Maybe you are looking for