Retrieving Batch Numbers

Hi
Is it possible to retrieve the valid BatchNumbers for an ItemCode via DI - Business Object somehow?
TIA
Philipp

Hi Felipe
Thanks for the hint. I tried to solve it with the BatchNumbers - Object first but I didn't found any retrieving functions.
What I want is to lookup valid batch numbers/quantities for an given article (imho a pretty common usecase).
Imho it would be natural to retrieve the list via Items - Object. But since I didn't found the BatchNumbers Collection there i tried with GenInventoryEntry which has this property:
    Public Function getBatchNumbers(ByVal strItemCode As String) As Long
        Dim oWEntry As SAPbobsCOM.Documents
        Dim oRs As SAPbobsCOM.Recordset
        Dim strIC As String
        Dim i As Long
        Dim ii As Long
        oWEntry = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry)
        oRs = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
        oRs.DoQuery("SELECT OIGN.DocEntry  FROM OIGN  INNER JOIN IGN1 ON OIGN.DocEntry = IGN1.DocEntry WHERE IGN1.ItemCode='" & strItemCode & "'")
        oWEntry.Browser.Recordset = oRs
        oWEntry.Browser.MoveFirst()
        Do While oWEntry.Browser.EoF = False
            'SBO_Application.MessageBox(oWEntry.DocEntry.ToString())
            For i = 0 To oWEntry.Lines.Count - 1
                oWEntry.Lines.SetCurrentLine(i)
                strIC = oWEntry.Lines.ItemCode
                If strIC = strItemCode Then
                    For ii = 0 To oWEntry.Lines.BatchNumbers.Count - 1
                        oWEntry.Lines.BatchNumbers.SetCurrentLine(ii)
                        SBO_Application.MessageBox(oWEntry.Lines.BatchNumbers.BatchNumber)
                    Next ii
                End If
            Next i
            oWEntry.Browser.MoveNext()
        Loop
    End Function
I've tested with an ItemCode that has a BatchNumber with Quantities behind it.
But it always displays an Empty - String so I assume this Object doesn't get properly filled or is only for writing - purposes or I'm doing something completely wrong here (I think this approach is pretty cumbersome) 
Can somebody confirm that?
Thanks Philipp

Similar Messages

  • 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

  • Is it possible to retrieve phone numbers from previous iPhones through iTunes ?

    Is it possible to retrieve phone numbers from previous iPhones through iTunes ?

    iTunes does not backup any contact information.  Contact information is sync'd with your contacts program on your computer.  On a Mac, that would be the Contacts program, which iTunes will sync the content with between your iPhone and the computer.  On a Windows PC, people often use outlook, and their contacts are sync'd with its contacts.
    You can also sync contacts with iCloud.
    Do you still have the previous iPhones?  If so, just sync them with whatever contacts program you use on your computer, then sync those to the new iPhone.

  • 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.

  • 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

  • How can I eliminate duplicate Batch Numbers?

    SBO allows serial numbers to be unique, but not batch numbers. The system allows the same batch number to be used for a different part. I have a medical company that requires unique Batch numbers accross the board, regardless of part number. Any suggestions? I tried to do this with a formatted search that would identify a duplicate Batch for me, but my search crashed and burned.
    Here is the Formatted Search I tried to connect to the Batches Setup Form:
    SELECT 'Batch allready used!' FROM IBT1 T0 WHERE T0.[BatchNum] = $[$3.3.0]
    Anyone out there know how to force unique batch numbers?
    Thanks!
    Mike
    Edited by: Mike White on May 7, 2008 7:07 PM

    What I am saying is, I never want a duplicate Batch number even if the parts are different. In your example, Item A could not have the same Batch number as Item B. Unfortinately, SBO allows duplicate batch numbers as long as the part numbers are different.
    The reason for this is two fold. 1) This medical company cannot, never have the same batch number, and 2) reporting from the OIBT and IBT1 tables gets a bit complicated with duplicate batch numbers.
    So my thought is to simply create a formatted search which runs from the Batches Setup Form, checking to see if this Batch Number has allready been used, then replacing the entry if TRUE with something like "Batch Allready Assinged".
    Mike
    Edited by: Mike White on May 7, 2008 7:36 PM

  • 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

  • Batch Numbers in XL Reporter

    Hi All
    Does anyone know if it's possible to view batch numbers of stocked items using XL Reporter?
    Many thanks
    Hayden

    Hi Hayden,
    XL Reporter is not that user friendly to certain type of report. Batch numbers will be one of the example.
    You had better try Crystal Reports.
    Thanks,
    Gordon

  • How to config the batch numbers internally from remaining?

    Hi All
    Firsr i followed the path and activated the internal batch number assignment(IMG ---> Logistics - General ---> Batch Management ---> Batch Number Assignment ---> Activate Internal Batch Number Assignment)
    then i have maintained the number ranges for the batches
    Still when I do MIGO the batch tab appears but the system is not generating the batch numbers internally instead its asking to enter the batch number.
    Please suggest if I have missed any other config or any master data towards the settings for Batch Management and also to have the system create the batch numbers at the GR stage.
    Thanks&Regards
    SRK

    Hi SRK,
               You may miss to confing this thing......
               IMG ---> Logistics - General ---> Batch Management ---> Creation of New Batches > Define...
    you can find the solution
    Regards
    Madhu

  • 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

Maybe you are looking for

  • Help with Easy VPN client split tunneling.

    Can someone please help me with my config for Easy VPN Client split tunneling. At the moment when the VPN is up I have NO access to the Internet from any host. Here's what I am attempting to do. I want only certain host to route all there traffic tho

  • Adobe Camera Raw to Photoshop Workflow

    Hi Can someone please tell me those edits which should/Must be done in Adobe Camera raw on a Raw image prior to importing and editing with Photoshop. I believe its the following. -White Balance -Crop -Exposure to recover blown highlights -Tone adjust

  • Hp pavilion all-in-one green screen problems

    I purchased a brand new 23 inch HP pavilion all-in-one, set it up and used it for 3 or 4 days but kept getting GREEN SCREENS on face book videos and other websites...had to reboot constantly to correct the problem but after a few hours it returns. I

  • Get Inventory Accounting Entries linked to GL

    We have few transactions in inventory that are not going through GL. These material transactions can be viewed from Transaction Summaries Screen. We have verified that cost manager is up and running and even following query indicates that transaction

  • HT5085 my apps wont come back or my music but my pictures came back

    how do i get back my music and apps including the free ones the pictures came back but not the music and apps. so can you help me please thank you.