Internal error (-2014) Goods Issue with Batch Items added through UI

Hello Experts,
I've added a button to my Production Order screen labeled 'Issue Components' that is meant to streamline the process, and it works, except when the ProdOrder has Batch controlled items on it. When that happens it returns Internal error (-2014)<br><br>
I've tried stepping through the code and it doesn't error until the final Add
Here is my function, Thanks for the Help!<br><br>
I'm using CitiXSys Inventory Pro and am pulling the items from the Picked table, that's what that sQuery does. It returns correctly. I've also set everything to 'Manual' instead of 'Backflush'<br><br><br>
<pre>
Private Sub IssueComponents(ByVal iDocNum As Integer)
        Try
            'Declaring the needed variables'
            Dim oRec As SAPbobsCOM.Recordset
            Dim oGoodsIssue As SAPbobsCOM.Documents
            Dim bIssueLineAdded As Boolean = False, sQuery As String = "", x As Integer = 0, iCode As Long = 0, sErrorMessage As String = ""
            Dim tmpLot As String = ""
            'Instanciating the Goods Issue'
            oGoodsIssue = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit)
            'Initialzing the SBO object'
            oRec = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            'Assing the header of the Goods Issue'
            oGoodsIssue.DocDate = Date.Now
            oGoodsIssue.DocDueDate = Date.Now
            'Getting the entire "Manual" components for this production order to issue them'
            sQuery &= "Select PK1.U_DocNo, KI.U_ItemCode, KI.U_BseLnNo, OW.DocEntry, KI.U_Quantity, KI.U_WhsCode, KI2.U_BatSrlNo, KI2.U_LotNo from [OWOR] OW (NOLOCK) INNER JOIN [@ctx_pkin] PK ON OW.DocNum = PK.U_BaseDoc," & vbNewLine
            sQuery &= "[@ctx_PKIN] PK1 (NOLOCK) INNER JOIN [@CTX_KIN1] KI (NOLOCK) ON PK1.U_DocNo = KI.U_DocNo," & vbNewLine
            sQuery &= "[@ctx_KIN1] KI1 (NOLOCK) INNER JOIN [@CTX_KIN2] KI2 (NOLOCK) ON KI1.U_DocNo = KI2.U_DocNo and KI1.U_BseLnNo = KI2.U_BseLnNo" & vbNewLine
            sQuery &= "where OW.DocNum = '" & iDocNum & "' and PK.U_BaseType = 202 and PK1.U_DocNo = PK.U_DocNo and KI1.U_DocNo = PK.U_DocNo and KI1.U_BseLnNo = KI.U_BseLnNo" & vbNewLine
            'Executing the query'
            oRec.DoQuery(sQuery)
            'Looping through the "Manual" components'
            For x = 0 To oRec.RecordCount - 1
                'Prompting the user'
                oAppl.StatusBar.SetText("Issuing Components...(" & x + 1 & " of " & oRec.RecordCount & ")", SAPbouiCOM.BoMessageTime.bmt_Long, SAPbouiCOM.BoStatusBarMessageType.smt_Warning)
                'Adding the previous line if applicable'
                If bIssueLineAdded Then
                    oGoodsIssue.Lines.Add()
                End If
                'Filling the line information'
                oGoodsIssue.Lines.WarehouseCode = oRec.Fields.Item("U_WhsCode").Value 'dIssueComponents(x).Item("WhsCode")
                'oGoodsIssue.Lines.TransactionType = SAPbobsCOM.BoTransactionTypeEnum.botrntComplete
                oGoodsIssue.Lines.BaseEntry = oRec.Fields.Item("DocEntry").Value 'oProductionOrder.AbsoluteEntry
                oGoodsIssue.Lines.BaseType = 202                                          'Production Order Type'
                oGoodsIssue.Lines.BaseLine = oRec.Fields.Item("U_BseLnNo").Value 'GetBaseLine(oProductionOrder.AbsoluteEntry, dIssueComponents(x).Item("Component"))
                'oGoodsIssue.Lines.ItemCode = oRec.Fields.Item("U_ItemCode").Value
                oGoodsIssue.Lines.Quantity = oRec.Fields.Item("U_Quantity").Value 'Math.Round(oRec.Fields.Item("U_Quantity").Value, 2) 'dIssueComponents(x).Item("PlanQty")
                'Checking if the item is neither lot or serial controlled item'
                If oRec.Fields.Item("U_BatSrlNo").Value = "" And oRec.Fields.Item("U_LotNo").Value = "" Then
                    'Nothing controlled item'
                ElseIf oRec.Fields.Item("U_BatSrlNo").Value <> "" Then
                    'Lot controlled item'
                    tmpLot = oRec.Fields.Item("U_BatSrlNo").Value
                    'oAppl.MessageBox("Lot: " & tmpLot & ", whs: " & oRec.Fields.Item("U_WhsCode").Value & ", qty: " & oRec.Fields.Item("U_Quantity").Value)
                    oGoodsIssue.Lines.BatchNumbers.Add()
                    oGoodsIssue.Lines.BatchNumbers.BatchNumber = oRec.Fields.Item("U_BatSrlNo").Value
                    oGoodsIssue.Lines.BatchNumbers.Quantity = oRec.Fields.Item("U_Quantity").Value 'Math.Round(oRec.Fields.Item("U_Quantity").Value, 2)
                    'Else
                    'Serial controlled item'
                    'oGoodsIssue.Lines.SerialNumbers.SystemSerialNumber = oRec.Fields.Item("").Value
                End If
                'Setting the line to be added'
                bIssueLineAdded = True
                'Movoing to the next record'
                oRec.MoveNext()
            Next x
            'Checking if there was any component or not'
            If bIssueLineAdded Then
                'Adding the Goods Issue'
                iCode = oGoodsIssue.Add
                If iCode <> 0 Then
                    oCompany.GetLastError(iCode, sErrorMessage)
                    oAppl.MessageBox("Goods Issue Production Order: " & iDocNum & " didn't get created for the following reason: " & serrormessage)
                Else
                    oAppl.StatusBar.SetText("Components were issued successfully.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
                    'TODO: add to ProdOrder remarks field
                End If
            End If
        Catch ex As Exception
            oAppl.MessageBox("IssueComponents() " & ex.Message)
            oAppl.StatusBar.SetText("Error in IssueComponenets() : " & ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
        End Try
    End Sub
</pre>
Edited by: Rob Daniels on May 30, 2011 10:33 PM

Please use the latest upgrade of Inventory Pro from CitiXsys.
If you are using SAP Business One 2007; use Inventory Pro 5.6 series
For SAP Business One 8.8 and up; use Inventory Pro 6.6.1 and up

Similar Messages

  • Error in Goods issue with movement type 541

    Dear Users,
    I have created a Sub contracting PO. After that when i m issuing the goods to vendor with movement type 541, its giving the following error: Movement type 541 is not planned for this operation.
    Please help me out

    You can provide material to vendor either using Transaction codes :
    1.  MIGO - Transfer Posting - Other - Movement type 541
    2.  MB1B - Movement type 541  or
    3.  ME2O - Mention the vendor & execute
    S. Kumar

  • Pick and Pack / Goods Issue with Multi Batch Pickup

    Dear Friends,
    Can anyone explain me the process of Pick and Pack / Goods Issue with Multi Batch Pickup.
    Harsh

    Hi Mathur,
    Please refer these links on working with batch splits in deliveries :
    <a href="http://help.sap.com/saphelp_47x200/helpdata/en/38/c1853488601e33e10000009b38f83b/frameset.htm">Batch split</a>
    <a href="http://help.sap.com/saphelp_47x200/helpdata/en/38/c1853488601e33e10000009b38f83b/frameset.htm">Executing Multi batch</a>
    <a href="http://help.sap.com/saphelp_47x200/helpdata/en/38/c1853488601e33e10000009b38f83b/frameset.htm">Transferring Batch Data from Deliveries into Warehouse Management</a>
    Hope it helps. Please reward if useful.
    Thanks & Regards
    Sadhu Kishore

  • Goods Issue with PI sheets

    Hi
    I am trying to do Goods Issue with PI sheet in SAP v4.7c. I have used the following characteristics however only the finish product and the qty comes up in the PI Sheet.
    can any one please let me know what should be done to have components assigned to the phase or irresepective of the phase:
    The scope of the Component Recipe destination is 03: for all order items and reservation and
    the position is 05: at the start of the phase
    The characteristics used are:
    PPPI_INPUT_GROUP          Material list
    PPPI_MESSAGE_CATEGORY          PI_CONS
    PPPI_PROCESS_ORDER          
    PPPI_RESERVATION          
    PPPI_RESERVATION_ITEM          
    PPPI_MATERIAL          
    PPPI_VARIABLE          'MYVAR&0050&'
    PPPI_MATERIAL_CONSUMED          
    PPPI_UNIT_OF_MEASURE          
    PPPI_AUTOMATIC_VALUE          Event date
    PPPI_AUTOMATIC_VALUE          Event time
    PPPI_OUTPUT_TEXT          Material
    PPPI_OUTPUT_CHARACTERISTIC          PPPI_MATERIAL
    PPPI_OUTPUT_TEXT          Material quantity-target value
    PPPI_OUTPUT_CHARACTERISTIC          PPPI_MATERIAL_CONSUMED
    PPPI_OUTPUT_TEXT          Unit of measure
    PPPI_OUTPUT_CHARACTERISTIC          PPPI_UNIT_OF_MEASURE
    PPPI_INPUT_REQUEST          Material quantity-actual value
    PPPI_DEFAULT_VARIABLE          'MYVAR&0050&'
    PPPI_REQUESTED_VALUE          PPPI_MATERIAL_CONSUMED
    PPPI_VALIDATION_FORMULA          ( X > ( 0.95 * 'MYVAR&0050&'))
    PPPI_VALIDATION_FORMULA          AND
    PPPI_VALIDATION_FORMULA          ( X < ( 1.05 * 'MYVAR&0050&'))
    PPPI_OUTPUT_TEXT          Unit of measure
    PPPI_OUTPUT_CHARACTERISTIC          PPPI_UNIT_OF_MEASURE
    PPPI_INPUT_REQUEST          Batch
    PPPI_REQUESTED_VALUE          PPPI_BATCH
    PPPI_MESSAGE_CATEGORY          SIGN
    PPPI_PROCESS_ORDER          
    PPPI_CONTROL_RECIPE          
    PPPI_OPERATION          
    PPPI_PHASE          
    Can any one please let me know where am I missing!!
    Thanks in advance
    -Rahul

    This is at control recipe creation or you are checking the instruction in the process order ?
    This is a simple PI which is working OK fo rmaterial consumption.
    Check it.
    10     PPPI_DATA_REQUEST_TYPE     Solicitud de datos simple
    20     PPPI_MESSAGE_CATEGORY     PI_CONS
    30     PPPI_UNIT_OF_MEASURE
    40     PPPI_OPERATION
    50     PPPI_OUTPUT_TEXT     Operación
    60     PPPI_OUTPUT_CHARACTERISTIC     PPPI_OPERATION
    70     PPPI_PHASE
    80     PPPI_OUTPUT_TEXT     Fase
    90     PPPI_OUTPUT_CHARACTERISTIC     PPPI_PHASE
    100     PPPI_RESERVATION
    110     PPPI_OUTPUT_TEXT     Reserva
    120     PPPI_OUTPUT_CHARACTERISTIC     PPPI_RESERVATION
    122     PPPI_RESERVATION_ITEM
    126     PPPI_OUTPUT_TEXT     Item
    127     PPPI_OUTPUT_CHARACTERISTIC     PPPI_RESERVATION_ITEM
    150     PPPI_PROCESS_ORDER
    160     PPPI_AUTOMATIC_VALUE     Hora de evento
    170     PPPI_AUTOMATIC_VALUE     Fecha de evento
    180     PPPI_MATERIAL
    190     PPPI_OUTPUT_TEXT     Code
    200     PPPI_OUTPUT_CHARACTERISTIC     PPPI_MATERIAL
    210     PPPI_MATERIAL_SHORT_TEXT
    220     PPPI_OUTPUT_TEXT     Material
    250     PPPI_OUTPUT_CHARACTERISTIC     PPPI_MATERIAL_SHORT_TEXT
    300     PPPI_MATERIAL_QUANTITY
    330     PPPI_OUTPUT_TEXT     Plan
    360     PPPI_OUTPUT_CHARACTERISTIC     PPPI_MATERIAL_QUANTITY
    400     PPPI_MATERIAL_CO_PRODUCT
    500     PPPI_OUTPUT_TEXT     Um
    600     PPPI_OUTPUT_CHARACTERISTIC     PPPI_UNIT_OF_MEASURE
    700     PPPI_INPUT_REQUEST     Lote
    800     PPPI_BATCH
    900     PPPI_REQUESTED_VALUE     PPPI_BATCH
    1000     PPPI_INPUT_REQUEST     Cantidad Real
    1100      PPPI_MATERIAL_CONSUMED
    1200     PPPI_REQUESTED_VALUE     PPPI_MATERIAL_CONSUMED
    1300     PPPI_INPUT_REQUEST     Sloc
    1400     PPPI_STORAGE_LOCATION
    1500     PPPI_REQUESTED_VALUE     PPPI_STORAGE_LOCATION

  • How to do good Issue with S/N from DI API

    Hai,
    I want to do good Issue with Serial Number using DI API but I got an error message <b>"\[IGE1.DocEntry]\[line:0],item serial is not found in Whse SR-5155 - 1 - R5155KGS ' (-5002)" </b>
    here is the code
    Set oGoodIssue = oCompanyDI.GetBusinessObject(oInventoryGenExit)
            oGoodIssue.DocDate = "12/14/2007"
                oGoodIssue.Lines.itemCode = "SR-5155"
                oGoodIssue.Lines.WarehouseCode = "R5155KGS"
                oGoodIssue.Lines.SerialNumbers.SystemSerialNumber = CStr(1)
                oGoodIssue.Lines.SerialNumbers.ManufacturerSerialNumber = "SR-0000001"
    oGoodIssue.Lines.SerialNumbers.InternalSerialNumber = "SR-0000001"
                oGoodIssue.Lines.SerialNumbers.SetCurrentLine 0
                oGoodIssue.Lines.SerialNumbers.Add
            retval = oGoodIssue.Add
            If retval <> 0 Then
                oCompanyDI.GetLastError errMsg, errMsg2
                sbo_application.messageBox errMsg & " (" & errMsg & ")"
            Else
                sbo_application.messageBox "Success"
            End If
    I check already from SAP BOne and the serial number is exist
    Can someone help me solve this problem
    Thanks and Regards,
    Arthur Siwan

    Hi Arthur,
    Try this code ( i had changed only one line of code in your original code)
    Set oGoodIssue = oCompanyDI.GetBusinessObject(oInventoryGenExit)
    oGoodIssue.DocDate = "12/14/2007"
    oGoodIssue.Lines.itemCode = "SR-5155"
    oGoodIssue.Lines.WarehouseCode = "R5155KGS"
    oGoodIssue.Lines.SerialNumbers.Add
    oGoodIssue.Lines.SerialNumbers.SystemSerialNumber = CStr(1)
    oGoodIssue.Lines.SerialNumbers.ManufacturerSerialNumber = "SR-0000001"
    oGoodIssue.Lines.SerialNumbers.InternalSerialNumber = "SR-0000001"
    oGoodIssue.Lines.SerialNumbers.SetCurrentLine 0
    retval = oGoodIssue.Add
    If retval 0 Then
    oCompanyDI.GetLastError errMsg, errMsg2
    sbo_application.messageBox errMsg & " (" & errMsg & ")"
    Else
    sbo_application.messageBox "Success"
    End If
    Hope it helps you
    Regards
    Vishnu

  • Bapi for partial good issue with ref to reservation

    I have check the bapi for goods issue with ref to reservation. But how to take care scenario where good issue qty is less than reservation qty. How to map this in bapi.
    Please provide input its urgent
    Thanks
    JENA

    Hi Jena,
    Implement a check in your program calling  BAPI_GOODSMVT_CREATE.
    If you call BAPI_GOODSMVT_CREATE in your own program you have to fill the interface of it (GOODSMVT_HEADER, GOODSMVT_ITEM ...).
    So in the first step you have to select/colect all the required data for the interface. If you want to post a goods-issue with
    reference to a reservation you can implement a quantity-check in you own program similar to the checks in transaction MB1A or transaction MIGO which lead to message M7064. All the required informations are stored in the table "RESB - Items of reservation".
    This is the quantity-check implemented in transaction MIGO (... see note 409754):
    Take only reservation items with open quantity > 0 or
       or flag 'propose all items' is set (->default settings)
         l_open_quantity = ls_resitem-bdmng - ls_resitem-enmng.   >(1)
         CHECK l_open_quantity > 0 OR
                s_defaults-propose_all_items = abap_true.
    l_open_quantity  = open quantity -> is calulated here
    ls_resitem-bdmng = Requirement Quantity ->
                        table RESB / field BDMNG
    ls_resitem-enmng = Quantity withdrawn ->
                        table RESB / field ENMNG
    Furthermore you could check, whether the quantity you want to post now is larger than the (remaining) open quantity. If this
    not the case you could add this item to the interface-data. Otherwise you can ignore it and send a corresponding message or add the item to an error-log.
    After the check has been carried out and the interface has been filled with the valid items you can call BAPI_GOODSMVT_CREATE.
    In the customizing-transaction OMCQ you can maintain the category of messages. If you set the message M7 362 to the category "E - error message" the BAPI_GOODSMVT_CREATE will return with   this (error-)message as soon as the requirement quantity is exceeded by the goods-issue("Reserved quantity exceeded by ...").
    But: other processes/applications are using these settings too.
    This means: these processes/applications might have a different behaviour after your changes (error-message instead of a warning-  message ... for example).
    I hope this helps,
    Elaine.

  • Goods Issue with Serial number reversal

    Hi Experts,
    I have an item which is set to Inventory Item and Sales Item. I brought it in via Inventory/Good receipts to assign serial numbers.
    I realized I used the wrong Warehouse and wrong item Code ( I have 2 codes set the same but for different recording purposes)
    Unfortunately did I turn around and created a goods issue with the serial numbers to wash it but I do nee the serial numbers available to do my correct entry. How can I get my Serial numbers back which show no unavailable.
    If I try to set the item also as Purchase Item and try to do a return it wont show. Please advice.
    Thanks

    Hi,
    Receive again with correct item code and ware house with same serial number.
    If not, Please explain with an example.
    Thanks & Regards,
    Nagarajan

  • Goods Issue with reference to Purchase Order

    Hi MM Gurus,
    Is there any settings to do Goods Issue with reference to Purchase order?
    I want to capture the material price in purchase order during goods issue instead of standard price or moving average price.
    Thanks in advance
    Dinesh

    Hello Dinesh,
    Batch valuation is similar to split valuation. Here is the link on how batch valuation works.
    http://help.sap.com/saphelp_47x200/helpdata/en/25/283db54f7811d18a150000e816ae6e/content.htm
    Please check in sandbox environment before using.
    Hope this helps.
    Regards
    Arif Mansuri

  • Closing sales line with batch item

    Hi all,
    I´m going to closing a sales line by DIAPI. If the item isn´t managed with batch item, the line closed well. But in other case i have this error:
    "Document rows cannot be closed concurrently with the other document modifications you have made  RDR1.LineStatus[line: 0]"
    I try to quit all formatched search that i have in sales line level. I read all the posts about this (i think), and i can´t solve this problem. I think that´s a bug because if i try to close manually, all is correct.
    My code is this:
    if (oPedido.GetByKey(4617))
                    oPedido.Lines.SetCurrentLine(0);
                    //oPedido.Lines.Quantity = 11;
                    oPedido.Lines.LineStatus = BoStatus.bost_Close;
                    if (oPedido.Update() != 0)
                        SBO_Application.StatusBar.SetText(
                            "Error message",
                            BoMessageTime.bmt_Medium, BoStatusBarMessageType.smt_Error);
    I try to put this code in first lines of the addon , i don´t touch any other data, only close line,  i try with garbage collector.....
    Regards.

    Hello Kate,
    A precaution is always needed when you cancel any items.  You need run a simple query such as:
    SELECT * FROM RDR1 T0 WHERE T0.ItemCode = '[%0\]' to check any Sales Orders contain this code.
    Thanks,
    Gordon

  • Why do I get this error when opening I-Tunes 10.5.2?Internal Error: Could not insert menu bar item..  Error code = 5603

    I just upgraded to Snow Leopard and downloaded the latest version of I-tunes, 10.5.2, but everytime I open I-tunes, i get this error: Internal Error: Could not insert menu bar item.. Error code = 5603
    How do I fix this? Any help would be appreciated.
    Thanks.

    hello Mac.INXS, please [[Clear the cache - Delete temporary Internet files to fix common website issues|clear the cache]] & [[Delete cookies to remove the information websites have stored on your computer|cookies from mozilla.org]] and then try logging into AMO again.

  • Goods Issue with reference to Material document

    Hello,
    I would like to create Goods Issue with reference to material document (Transfer Posting document) , but the following message appears :
    "Selected material document does not correspond with action to be executed".
    Is it possible to create Goods Issue with reference to Transfer Posting (mov.type 311 - from stor.loc. to stor.loc.)  ?
    Thanks

    Thanks,
    probably I'll have to find another way to solve this business requirement of copying the transfer document data in GI.
    We have an auto created transfer postings via interface from another system and the main idea was to use already entered fields in transfer posting document such as material , quantity , text , goods recepient , etc. and not to enter them twice when GI should be created. In our case (it's a case for certain materials) it's always 1:1 relationship, so the idea was to facilitate the job of creating the GI, because GI should contain the same data as in transfer posting document.

  • HT5676 my macpro (10.6.8) refused to install wireless printer (canon pixma MG4260). Whenever i tried to install, it keeps saying 'internal error number 12'. Please help!! and what does internal error got to do with installing a printer?

    my macbook pro (10.6.8) refused to install wireless printer (canon pixma MG4260). Whenever i tried to install, it keeps saying 'internal error number 12'. Please help me!! and what does internal error got to do with installing a printer?

    my macbook pro (10.6.8) refused to install wireless printer (canon pixma MG4260). Whenever i tried to install, it keeps saying 'internal error number 12'. Please help me!! and what does internal error got to do with installing a printer?

  • Error during goods issue-Posting period not open

    Hi ,
    I am getting an error during goods issue which says posting period not open.I guess that we have had deliveries that were created and in process while crossing over from one financial period to another quite frequently before, but we were still able to goods issue them in the next period. Can anyone tell me why this error happens and if there is any work around for this?
    Thanks,
    Hari.

    Hi,
    Goods issue takes place, say on a given date and this should be updated, so that the plant valuation changes are recorded. But the periods need to opened to do this. Normally there are two posting periods available, one is in MM, done by t.code MMPV and the other in FI, t.code is OB52.
    So, in MMPV we need have the current month as the posting period. But in your case it was allowing, probably because you have marked the indicator " allow posting in previous period " in MMRV t.code as our friend just conveyed.
    Hope it helps. Please reward if useful.
    Thanks & Regards
    Sadhu Kishore

  • Post Goods Issue with BAPI with reference to BOM

    Hi All,
    I want to post Goods Issue with BAPI / FM with reference to BOM.
    The requirement is like to replicate what we can do with MB1A with reference to BOM with BAPI / FM.
    Please give ur suggestions.
    Thanks in advance.
    Chintan.

    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_forums_rm&query=kanban&adv=false&sortby=cm_rnd_rankvalue&sortmode=true&searchmode=similar&similardocsuri=/forumsrm/1_category/42_category/50_forum/34196_thread/322837_message

  • Can't add a goods-issue with more than one item and one is serial managed.

    Hi,
    We are trying to issue more than one item to a production order using the DI API.  If none of the items is serial managed, they all are accepted and the goods-issue Add is successful.  If one the items is batch-managed, the goods-issue Add is also successful.  I am able to add the goods-receipt if I it contains only one item and it is serial-number managed.  However, if I’m issuing more than one item and one or more of the items is serial number managed, then the DI API will not add the goods-issue.  The error message that appears refers to an item that is not among the items being issued.  The message is:
    -10: (IGE1.WhsCode)(line: 3), ‘Item ‘A00006        ‘ with system serial 1 is not in stock.’
    Again item A00006 is not even in the group of items being issued.
    The code I am using for the serial number part is:
    With oGoodsIssue.Lines.SerialNumbers
              .SystemSerialNumber = rs.Fields.Item("SysSerial").Value
              .ManufacturerSerialNumber = rs.Fields.Item("MfrSN").Value
              .InternalSerialNumber = rs.Fields.Item("IntrSerial").Value
              .SetCurrentLine(n)
              .Add()
              rs.MoveNext()
              n += 1
    End With
    The rs is a recordset that the code is looping through as the serial numbers are being added.
    The error message does not occur during this code.  It occurs when it tries to add the full goods-receipt.  Does anyone have any idea how I can fix this?
    Thanks,
    Mike
    Edited by: Mike Angelastro on Mar 31, 2008 8:43 AM

    Hi Mike,
    Try to do the ".Add" only if you need it. Doing a ".add" without assignation may cause the error you have.
    I guess your n variable start at 1 or 0, so you could put code like this :
    With oGoodsIssue.Lines.SerialNumbers
    if n = 0 then (or 1, also I don't the correct syntax of your programming language)
    .Add()
    end if
    .SystemSerialNumber = rs.Fields.Item("SysSerial").Value
    .ManufacturerSerialNumber = rs.Fields.Item("MfrSN").Value
    .InternalSerialNumber = rs.Fields.Item("IntrSerial").Value
    .SetCurrentLine(n)
    rs.MoveNext()
    n += 1
    End With
    HTH
    Jodérick

Maybe you are looking for

  • Premiere Pro Multi-Cam Angles on External Monitor

    On Mac OS 10.10.3 with a Blackmagic Intensity Pro and Premiere Pro CC 8.2... Is there a way to show multi-cam angles on an external monitor connected to the intensity via HDMI? Enabling "multi-cam" in my timeline only shows the angles on my computer,

  • My space button keeps scrolling down, my internet pages (FB) keeps shutting down??help

    Help! everytime i press space my page scrollsdown , everytime i press delete the option to leave the page im on appears. mY I PHOTO is damaged(i cannot open it ) some pages on the internet sduch as openuniversity when i get onto the page is just clos

  • Import problems iPhone 4 to iPhoto 6

    Hey there, Have a new iPhone and am trying to import photos and video I've taken. At first, iPhoto 6 was happy to import both photos and video, then it decided not to, then yes, then no... All these files have been taken on the iPhone camera, so I do

  • Having difficulty playing videos embedded in PDF

    Hi everyone, I'm working on a project for work where I'm attempting to embed video in iPad-friendly PDFs. I have no problem embedding them and they run fine in Acrobat on the PC, but outside of that nothing else works. I read the explanation on attac

  • How to really export songs to AIFF

    Brought a mix tape (through USB cassette convertor) into iTunes. iTunes gave it an m4a extension. Need to edit and break up songs in Spin Doctor, which needs AIFF. My only option to convert is AAC file converts but still has the proprietary m4a exten