Batch Numbers in Invoice layouts

Hi Guys,
I am trying to use Crystal reports to bring in Batch Numbers for Line Items, I have the following Query but it is not quite working correctly and I cant work out how to ensure the Batch No it Shoes is correct and matches to those in the Right Click Batch Details on an AR Invoice. Can anyone point me in the right direction at all ?
SELECT T0.[DocNum], T1.[ItemCode], T1.[Dscription], T2.[ItemCode], T2.[DistNumber], T2.[ExpDate] FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN OBTN T2 ON T1.[ItemCode] = T2.[ItemCode] WHERE T0.[DocNum] ='227'
Kind regards
Sean Martin

Hi Sean......
Try this.....
Select T0.DocNum, T1.ItemCode, T1.Dscription, T8.ItemCode, T8.DistNumber, T8.ExpDate,
I1.BatchNum     
FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
LEFT Join DLN1 T6 On T6.DocEntry=T1.BaseEntry and T6.LineNum=T1.BaseLine
left outer join IBT1 I1 on T1.ItemCode=I1.ItemCode   and (T6.DocEntry=I1.BaseEntry and T6.ObjType=I1.BaseType)
left outer join OBTN T8 on T8.ItemCode=I1.ItemCode and I1.BatchNum=T8.DistNumber
Above Query will bring the data of batches in Invoice CR even though the batch is created at the time of delivery
Hope this will help you..........
Regards,
Rahul

Similar Messages

  • Finding Tables needed for linking Batch Numbers/Items to Invoice Items

    I'm trying to create a report that will show basically a Sales Invoice and under each line Item show the Items with thier batch numbers that went into that sales Item.   My difficulty is in finding the table or tables that have key fields to relate Invoice to Batches and inventory.   Looking at forms/reports in B1 I have found RBTN OBTN and RITL tables but only the OBTN shows in the crystal as a datatable.

    Jon,
    You should have better luck posting in one of the [Business One forums|http://forums.sdn.sap.com/index.jspa?categoryID=1#44].
    Jason

  • Need tables for tracking Invoice Items back to the Batch Numbers/Item codes

    Trying to build report to show the Inventory movement from a Sales Invoice Item back to the source items and the Batch Numbers for assigned along the way.  Having problems finding all the tables to connect the Batch information to the Invoice information.
    In B1 under batch management I can see fields that belong to tables RBTN, RITL and OBTN  but I can only find OBTN in Crystal.
    Are these tables hidden for some reason or are they Temporary tables that B1 creates when opening the form/report.

    You may check this: Re: To what table are Batch# saved to with SAP 8.8

  • How to print batch numbers on the AR invoice print out

    Hi Gurus;
    Here is my question; I need to be able to print batch numbers on the print out of AR invoices, I used variable 492 in PLD and I am able to see the batch numbers directly linked with the AR invoice, meaning that I wont be able to see batch numbers that I entered on the Delivery even is the delivery doc was copy to the AR invoice.
    Is there anyway that I can see the batch numbers on the AR invoice print if I entered the batch number on the delivery and then copied that delivery to an invoice??
    My client wants to be able to send their customers and invoice with a batch number but he always follow the process from sales order to delivery and delivery to AR invoice and what this means is that he always entered the batch numbers on the delivery documents.
    Please help me!!!
    Thanks
    Jenny

    If the ad hoc printer mode is not available for the envy, there are some reasonably cheap ways to get a wifi network in your car.   A cheap router from best but will generate the wifi network.  Does not matter if you have Internet or not.  A ifi device will also work, and most/ all of them run on batteries.  Lastly, if you have a smart phone or I phone that generates a wifi hotspot, that may be enough to support the printing function.  ( I need to test my I phone later today to see if that works.)

  • Query on batch number in Invoice

    Hi Experts,
    I would like to get the batch number picked during the Delivery document and shown in the print layout in A/R Invoice. Unfortunately, PLD of Invoice with Batch will not show the Batch numbers as they're already linked in the DR document.
    My workaround is to attach a FMS in the INV1 field line to get the batch number when the Invoice is copied from the DR.
    Any help with the query is very much appreciated.
    We are using 8.81 PL7.
    Thanks,
    Don

    Hi Don..........
    Please check this........
    Select (Case When T1.BaseType=15 then I1.BatchNum else I11.BatchNum end) 'BatchNum', T0.DocNum 'Inv. No'      
    FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCTG T2 ON
    T0.GroupNum = T2.GroupNum LEFT Join INV12 T3 On T3.DocEntry=T0.DocEntry LEFT JOIN OITM T4 On T4.ItemCode=T1.ItemCode LEFT JOIN OCHP T5 On T4.ChapterID=T5.AbsEntry
    LEFT Join DLN1 T6 On T6.DocEntry=T1.BaseEntry and T6.LineNum=T1.BaseLine
    left outer join IBT1 I1 on T1.ItemCode=I1.ItemCode   and (T6.DocEntry=I1.BaseEntry and T6.ObjType=I1.BaseType)
    left outer join OBTN T8 on T8.ItemCode=I1.ItemCode and I1.BatchNum=T8.DistNumber
    LEFT Join WTR1 T16 On T16.DocEntry=T1.BaseEntry and T16.LineNum=T1.BaseLine
    left outer join IBT1 I11 on T1.ItemCode=I11.ItemCode   and (T16.DocEntry=I11.BaseEntry and T16.ObjType=I11.BaseType)
    left outer join OBTN T18 on T18.ItemCode=I11.ItemCode and I11.BatchNum=T18.DistNumber
    LEFT Outer Join OWHS T20 On T20.WhsCode=T0.Filler
    Run this query you get Invoice No. and its Batch.....
    You may insert required c0olumns also.....
    Regards,
    Rahul

  • Installment invoice layout

    Hi All,
    I have a requirement whereby the invoice is separated into 2 installment. Let's say 90% on 30 days and remaining 10% is 60 days.
    If i setup in the payment terms, it is able to produce 2 installament invoice that having the same invoice number but different amount respectively.
    However, I have problem on printing Invoice layout for 90% amount and then another invoice for 10% amount. Is there any function or layout can cater to this need? Appreciate if anyone can help, thanks.
    Regards,
    MH

    Hi,
    Initially i thought so too that different invoice numbers will be use if amount is different.
    But if you setup the payment terms with installment, like 30 days - 90% and then 60 days - 10%.
    Once you enter the invoice for example $1000, system will automatically breakdown the invoice into 2 but with same Invoice number. First invoice is $900  and second invoice is $100. However, if you go to the invoice screen, it is still showing $1000. Basically you are unable to view the invoice itself in $900 and $100 respectively.
    But if you go to that BP's Balance from BP Master Data, you will see 2 lines of the same invoice but first line will be $900 and second line is $100. My question is how can i print out the invoice in $900 and $100 respectively?

  • Report for batch numbers and delivery

    Dear gurus,
    Is there a report that
    I can see batch numbers and delivery at the same time?

    Use t.code VL06 and click on List outbound deliveries button.
    In the selection screen, enter details like sales org, distribution channel, division, shipping point and actual or planned goods movement date (per your requirement) and execute.
    In the next result display click on item view button. To get the batch data, click on change layout button. From the list of fields available (hidden field list) on the right hand side, select on batch and click on left arrow button.
    Then click on copy button. You can see the batch details with delivery line items.
    This report is useful, where in you can select addtional fields from layout button.
    Regards

  • Batch numbers - eliminating batches in form

    Hi,
    I have some items with Batch Numbers. When Im creating invoice (through UI or user entry) and after click to Add button, the form with batches will be shown. In bottom left corner is there a matrix with list of disponibile batches. Is it possible to eliminate this list of batches only for batches I need (through some filter, query, ...)?
    Or - is it possible to assign batch number for line level of main matrix before I click to Add button?
    I spent on this whole day without any idea...
    thanks

    Hi Petr,
    it won't be very helpful but maybe you're interested how iam doing this.
    i trigger the "add button", the serial number form opens and i assign the serial numbers automatically.
    the user just have to watch how the "serial numbers" walk from left to right
    i don't think you can "filter" the list of avaible serials.
    lg David

  • Report for a selection of items+batch numbers that I would have had on hand

    I would like to run a report for a selection of items and batch numbers that I would have had on hand (only) for September 30th.  I have run the batch numbers report but this gives me all transactions from August 1/09 to September 30/09.

    Hi
    If you need to know quantity onhand ,probably you need to run query against OINM tables but If you are lloking for information then I guess this batch and serial number would be handy ....
    Hope this helps
    Bishal

  • What are the Pros and Cons of Using Batch Numbers over Serialization

    Dear SAP Gurus:
    Will someone please give me the benefits of using Batch Management over serial numbers in this case scenerio, or vice versa:
    Client wants to trace all the components of an assembly in a BOM.  Even the Raw material.  The client sends the material out today and has the vendor assign serial numbers to the individual pieces, the client gives the range of serial numbers to use.  We are looking at using batch numbers to accomplish this and issue one material and batch number to a production order.  Then use MB56 batch where used functionality to view history.  I am wanting to understand the benefits of this.  Please advise and points will be awarded as always. 
    Also, in this scenerio, can you issue multiple material/batch numbers to one vendor op that has its own production order?

    Yes it is a subcontract. 
    Example:  This is the solution but need the pros and cons of doing this scenerio
    Sheet of metal sent to vendor to make lets say 1800 peices of material number nas5703-01.  All 1800 pieces come back and issued to a production work order using one bacth number for one material item so that batch number can be traced in history in MB56 and a fit up report.

  • Batch numbering

    Hi
    Batch management there are 3 internal number ranges and 1 external number range.
    How system will automatically pick up the number range during batch creation (GR or release of prod.orders)?
    If i create one more internal /External number range - how system will verify and create new batch with new number range?
    Can you please through some lights on this....
    Thanks
    Sami

    Configure Customer Exits for Intern. Batch Number Assignment
    You can use SAP enhancement SAPLV01Z for internal batch number assignment. This enhancement contains two function module exits that you can use to define number ranges or templates for batch numbers:
    EXIT_SAPLV01Z_001. You use this exit to replace the number range object and/or interval proposed by the system with your own number range object and/or interval.
    In addition, you can, for instance, stop the system from assigning an internal number depending on the material or plant. You can also use this exit to stop the dialog box from appearing.
    EXIT_SAPLV01Z_002. Using this exit, you can either change the number assigned by the system, or assign your own number.
    Further notes
    Both exits contain a communication structure with application data from the respective business transaction (plant or material type, for example).  If you need further information, such as the time, the user name or the date, you must include them yourself in one of the exits.
    The system always checks whether the assigned batch number already exists in the system. If it does, it terminates the function without assigning a batch number.
    Example:
    In function module exit EXIT_SAPLV01Z_001, the system uses the material type to determine number range interval XY. This number range is then used to determine number 0000100123 as the next batch number .
    In function module exit  EXIT_SAPLV01Z_002, the final batch number 'ABCD100123' is determined from batch number 0000100123 and plant ABCD. The system suppresses the leading zeros.
    If you do not use a sequential counter for the batch number, you can skip internal number assignment in exit EXIT_SAPLV01Z_001 to specify your own batch number in exit EXIT_SAPLV01Z_002. Further information and examples for EXIT_SAPLV01Z_001 and EXIT_SAPLV01Z_002 Further information and examples for EXIT_SAPLV01Z_002

  • Standard report to see the Batch numbers for the materials

    Hi Gur's
    I am searching for a standard report that would give out details from the purchase order. The details that i need are as following fields 1. Purchase order batch, 2. Purchase order number 3. material
    can you any one help me on this
    regards
    AM

    Hi Teja
    You can use T-Code - MB51, here you can generate report material wise purchase order with batch numbers and here to see stock in so give movement type 101 to see all Batches received against purchase orders
    regards
    madhu

  • Sales Analysis Report for Batch Numbers

    I am currently having an issue with Batch numbers and sales analysis report item wise. If the goods are delivered it does not show the quantity in the report. is there a way to make the quantites show. Open delivery notes show the quantity in the report. Could the reason be that once the delivery note is closed the quantity does not show in the report.????

    Dear Mr Shah,
    If I understood correctly, you are saying that there is no issue in adding the document with the batch but it is not shown in the Sales Analysis report?
    The Sales Analysis report does not show information regarding the quantity because it focuses on the value of the document.
    In order to have an overview on the trasactions related to the batches please use the Batch Number Transaction Report under Inventory - Inventory report.
    Regards,
    Marcella Rivi
    SAP Business One Forums Team

  • Multiple batch numbering in one client.

    Hi PP Gurus,
    We have a business scenario wherein more than one business exist. For clients pharma business then batch numering logi is different and for other businesses it is different.
    We have a proposal by which the Batch numbering at the time of Process order creation will be checked by User Exit about the existence of the batch key in manually.
    But for other business we want to keep Internal batch numbering with other User Exit.
    Can we have more than one kind of batch numbering; Internal & External both with different batch numbering logic?
    Thanks,
    Abu Arbab

    Hi Abu,
    For the movement type where the batch is getting generated, in customizing for Batch creation
    set it for Automatic / Manual check in USER EXIT. 
    Try this out & revert.
    Regards
    Mithun

  • Duplicate entries (Batch numbers) in printout

    Hi experts,
    we are using Inventory Transfer for Consignment Stock in B1. When we print the document we get an inventory transfer document and a Delivery Note/Packing List that shows the batch numbers ("Batch Report in Document Structure").
    However, the line with the batch number always shows up twice. It just duplicates it as it would grab the information from two different tables. But this is confusing and makes no sense at all to have a double entry.
    I'm using a customized template. There are three fields in the repetitive area that show up twice in the printout:
    - OIBT - Batch No. for Item: Batch Attribute 1
    - OIBT - Batch No. for Item: Quantity
    - OIBT - Batch No. for Item: Location
    Thanks in advance for your help.
    Please let me know in case you need more information. I spent several hours to figure out why it duplicates the entries, but I couldn't find a solution.

    With customization I mean that it's different from the system template. I deleted some fields we don't need etc.
    I changed it to the system template (Batch Report (System)), but with this template I get the same. The line from the repetitive area shows up twice in the printout.
    I thought there is only one table where the template grabs the information, but it looks like there are two separate sources.

Maybe you are looking for