Adding serial number in A/R Invoice

Hi Experts,
I am with a problem.I have 1 Records in the Database Table..In My SDKCode,Based on the Invoice Object I am adding the database tables values to the A/R Invoice LinesItems (itemcode,itemdescription,Taxcode,Quantity,Unitprice and serial number).When I am Updating, i am encountering an error "Cannot add row 1 without complete selection of batch/serial numbers"
kindly guide me with this problem....and how we can insert serial number in A/R Invoice for a item carrying serial number
Regards
Pradeep
Edited by: Pradeep.grd on Feb 15, 2012 7:36 PM

Hi Pradeep,
You can try this code for batch and serial no management in A/R Invoice:
oItem.GetByKey(sku);
SAPbobsCOM.Recordset oRecordset = (SAPbobsCOM.Recordset)(oCompany.GetBusinessObject(BoObjectTypes.BoRecordset));
if (oItem.ManageBatchNumbers == BoYesNoEnum.tYES)
string sqlstr = string.Format("SELECT sum(Quantity) FROM OIBT WHERE ItemCode = '{0}' AND STATUS = 0", oItem.ItemCode);
oRecordset.DoQuery(sqlstr);
if (!oRecordset.EoF)
if (lInvoice.Lines.Quantity <= Convert.ToDouble(oRecordset.Fields.Item(0).Value))
iRequired = lInvoice.Lines.Quantity;
                                            iAvailable = 0;
                                            iLineNo = 0;
                                            sqlstr = string.Format("SELECT * FROM OIBT WHERE ItemCode = '{0}' AND STATUS =                      0",oItem.ItemCode);
                                            oRecordset.DoQuery(sqlstr);
while (!oRecordset.EoF)
                                                if (Convert.ToDouble(oRecordset.Fields.Item("Quantity").Value) >= iRequired)
                                                    lInvoice.Lines.BatchNumbers.SetCurrentLine(iLineNo);
                                                    lInvoice.Lines.BatchNumbers.BatchNumber = oRecordset.Fields.Item("BatchNum").Value.ToString();
                                                    lInvoice.Lines.WarehouseCode = oRecordset.Fields.Item("WhsCode").Value.ToString();
                                                    lInvoice.Lines.BatchNumbers.Quantity = iRequired;
                                                    lInvoice.Lines.BatchNumbers.Add();
                                                    break;
                                                else if ((Convert.ToDouble(oRecordset.Fields.Item("Quantity").Value) < lInvoice.Lines.Quantity))
                                                    iAvailable = Information.IsNumeric(oRecordset.Fields.Item("Quantity").Value) ? Convert.ToDouble(oRecordset.Fields.Item("Quantity").Value) : 0;
                                                    lInvoice.Lines.BatchNumbers.SetCurrentLine(iLineNo);
                                                    lInvoice.Lines.BatchNumbers.BatchNumber = oRecordset.Fields.Item("BatchNum").Value.ToString();
                                                    lInvoice.Lines.WarehouseCode = oRecordset.Fields.Item("WhsCode").Value.ToString();
                                                    lInvoice.Lines.BatchNumbers.Quantity = iAvailable;
                                                    lInvoice.Lines.BatchNumbers.Add();
                                                    iRequired -= iAvailable;
                                                    iLineNo += 1;
                                                oRecordset.MoveNext();
else if (oItem.ManageSerialNumbers == BoYesNoEnum.tYES)
                                    sqlstr = string.Format("SELECT TOP {0} * FROM OSRI WHERE ItemCode = '' AND STATUS = 0", Quantity, oItem.ItemCode);
                                    oRecordset.DoQuery(sqlstr);
                                    if (!oRecordset.EoF)
                                        if (oRecordset.RecordCount >= lInvoice.Lines.Quantity)
                                            iLineNo = 0;
                                            while (!oRecordset.EoF)
                                                lInvoice.Lines.SerialNumbers.SetCurrentLine(iLineNo);
                                                lInvoice.Lines.SerialNumbers.SystemSerialNumber = Convert.ToInt32(oRecordset.Fields.Item("SysSerial").Value);
                                                lInvoice.Lines.SerialNumbers.InternalSerialNumber = Convert.ToString(oRecordset.Fields.Item("IntrSerial").Value);
                                                lInvoice.Lines.WarehouseCode = Convert.ToString(oRecordset.Fields.Item("WhsCode").Value);
                                                lInvoice.Lines.SerialNumbers.Add();
                                                iLineNo += 1;
                                                oRecordset.MoveNext();
Edited by: utpal_maity on Feb 16, 2012 7:12 AM

Similar Messages

  • IPod Touch serial number does not match invoice (rebate problem)

    Hi there,
    I recently purchased and received a MacBook Pro and iPod Touch online, taking advantage of the rebate program. I was just filling out the rebate form when I noticed that the serial number on my iPod's UPC sticker does not exactly match the serial number on the invoice. By that I mean there are three letters in the serial number that does not match. I checked with Apple's service support coverage online and found that the serial number which is on the invoice is recognized and the one on the UPC sticker is not. I was just about to send in my rebate coupon, and I am wondering if this would affect my rebate claim?
    I'll most likely call Apple tomorrow, but just wanted to see if anyone here has any idea.

    HI thanks for replying and the information and contact number. I really appreciate it!
    Sorry, I forgot to include those details. The MacBook was purchased online directly through the Apple Store on 12/20/07. The AppleCare was purchased directly from the Apple Store online on 12/19/08. I usually buy it direct from Apple because of horror stories I had heard about resellers when I bought my first Mac (G4 MDD). I had purchased the G4 MDD years ago and had an issue with it during the first year and called Apple and they informed me that I could buy AppleCare during the first year warranty. The individual I spoke with indicated I did not have to activate it before the first year anniversary, but that I just had to purchase it before the 1 year warranty expired. Before purchasing my wife's Applecare I checked to ensure that was still the case. From the information on the Apple site, it is my understanding that it is still the case. I know I cut it close, but I thought I had bought it later than the 20th. One night I pulled out the invoice and found it was ordered on the 20th so I ordered it that night (19th)!!

  • How do you add Serial Number in Sales AR Invoice

    How do we add Serial Numbers in AR Invoice.What is the query. Can anybody guide me with the procedure.

    Sanjay,
    The sql sample I have given is to demonstrate the use of functions and not the exact SQL to be used for your requirement. BP Contacts is not relevant for you.
    Serial numbers by default print on a seperate sheet along with the Invoice if your business process is Sales Order > Invoice (without the delivery step)
    If you process involved the delivery step, then the serial number will be printed on a seperate sheet along with the delivery.
    The $\[$ is SAP's syntax to dynamically use Form values in your queries. 
    To understand the usage of this you need to completely understand about formatted seaches.
    I was suggesting the usage of functions so that when you add the Invoice, the function would go to the OSRI and SRI1 tables and go in a loop to gather all the Serial number and add them to the User field which can be later printed on the PLD.
    Suda

  • Adding serial number to stock transport order

    I've read in the SAP documentation that you can add equipment serial numbers to stock transport orders but I can't find any way to get this accomplished.   Can anyone give me some guidance?
    Thanks!

    I should add that when we try to create the stock transport order using ME27, select the line and then go to Item --> More Functions --> Serial Number, an error message comes up saying "This function not allowed here".  Double-clicking the message brings up an explanation about a missing entry in table T168.  I searched OSS and have found quite a few notes related to this table but none that have to do with serial numbers or transaction ME27.

  • DI need a serial number selection stratergy when invoicing

    (this is part of a single thread but since it had two diffrent questions I have brocken it to two)
    part of my add-on creates an invoice based on a order. When it hits any item managed by serial numbers I need to,
    offer the user a list of available serial numbers so he can select. What is the best stratergy for this? does any one out there have any experience with regards to this?
    is there a object within DI that can give me a list of available serial numbers????
    thanks,
    Indika

    Indika,
    SAP Business One 2004 does have the "SerialNumbers" Object available which represents the serial numbers and additional tracking information of items.  You may want to reference at this in the DI API Help file.
    Hope this helps,
    Eddy

  • RG23D Folio Number and Serial Number missing

    Dear Expert,
    Plz. help me, we are creating depot excise invoice through J1IJ transaction during this transaction some times system will skiped RG23D Folio number and serial number, some times Excise Invoice serial number also skiped and entry will be posting completed without any error, due to this problem every time we have to canceled document and create new one.
    This type of problem occure some times, so plz. help what we do for resolve it.

    Anybody helps??

  • Serial number - where ?

    My Macbook Pro has been stolen - where can I find the serial number. On my invoice from apple store it says custom build Z0DQ ? Is there a file on the timemachine backup where it is store? Thanks in advance
    Will it be possible to find some hardware numbers as well in order to perform af laptop trace?

    In Italy we have the serial number too on the receipt.
    Have you registered ti ?  On Apple main page under Support - Contacts - Express Lane - Your products...
    Above is a translation from italian into english.. the exact words could be sligtly different...
    If you do not find... you ca n ask Applestore , they shoud be able to find the number from the invoice..

  • Serial number for material lying in Inventory

    Hi Experts
                    Here the requirement is to add serial numbers for materials in SAP.I am having serial number seperately in legasy system.I need to activate in SAP for that Material.That i can do it by adding serial number profile in Material Master.
          But how can asign serial numbers for the material already Lying in Inventory in
    our plant.
    I tried mb1b- 311 to another storage location its asking serial numbers and i m able to give there.But Is there any data migration work so that i can add serial numbers to the material lying in stock.
    Help needed

    One option could be to make the stock zero by issuing the stock out completely to scrap (or cost center or...). Then activate serial numbers. Then do an initial upload of the stock.

  • Serial Number Transaction Report Window isn't opening when adding AR Invoice

    Hi,
    For One of my Client the Serial Number Transaction Report Window is not opening when adding the AR Invoice.
    In the Invoice all the item's that is present in the line level are SERIAL MANAGED and Management Method is ON RELEASE ONLY.
    Why is it so?

    Hi,
    Do you receive any error message? Is it possible to add without selecting invoice without selecting serial number?
    What is your B1 version and PL?
    Thanks & Regards,
    Nagarajan

  • TRYING TO REGISTER MY MACBOOK PRO THAT I HAVE PURCHASED TODAY, THE REGISTRATION SYSTEM DOESNT APPROVE MY CORRECT PRODUCT SERIAL NUMBER (WHICH I PROPERLY CONTROLLED ON BOX AND ON INVOICE)

    TRYING TO REGISTER MY MACBOOK PRO THAT I HAVE PURCHASED TODAY, THE REGISTRATION SYSTEM DOESNT APPROVE MY CORRECT PRODUCT SERIAL NUMBER (WHICH I PROPERLY CONTROLLED ON BOX AND ON INVOICE)

    Where did you buy the machine? An Apple store, an authorized reseller, or ??
    Also, what is the model/identifier? Is it the latest or was it purchased used?

  • I am trying to install Lightroom and I am OK until it asks for a serial number. I purchased Lightroom from B&H and the have entered the seal number on the the B&H invoice. Nothing happens, not all the entry boxes are filled with the serial number that was

    I am trying to install Lightroom and I am OK until it asks for a serial number. I purchased Lightroom from B&H and the have entered the seal number on the the B&H invoice. Nothing happens, not all the entry boxes are filled with the serial number that was provided by B&H. I looked for a serial number on and in the box it came in, nada. Need a bit of help here, what can I do?
    RJ@

    Try to connect on Live chat one more time.
    Still not connected , better to contact Adobe Phone Support
    Click on Phone option and check once :
    Contact Customer Care

  • I reported to Austin Police Department about my unlocked iphone was stolen last week. I'm ****** off that Serial number of my stolen iphone is on another Apple ID.   IMEI still is not added into blacklist.  How can I contact to Apple Inc??

    I don't understand why Austin Police are not doing to detain theft when I showed an location with valid address according Find my iPhone on icloud.com.  They said that it might be wrong location but few blocks were correct location. I stopped at Apple Retail Store to get another unlocked iphone. I explained an employee whether they would add both IMEI and serial number into blacklist to make useless for anyone. They said they have nothing to doing. 
    I'm shocked today that IMEI number is still not added into blacklist. Serialnumber of my stolen iphone is already on another Apple ID, after restoring it.
    They let me down because unlocked iphone is EXPENSIVE, it costs $800 in Canada.
    How can I deal with Apple Inc to add both serial number and IMEI into blacklist UNTIL i get my stolen iphone back

    What blacklist? There is no universal blacklist in the US. They're working on it, but it does not exist as of this writing.
    Apple can't do anything about it. They are not a law enforcement agency.

  • How can I get the serial number for CS6 - I did not register it on my adobe account and I don't have the invoice/email from Aug 2012 nor the box anymore. I need the number to move software to a new computer.

    I am trying to move Indesign CS6 to a new computer.
    To do this I need the serial number of the license.
    It seems I did not register the number on my Adobe account as nothing is there.
    I bought the software in August 2012 - and no longer have the invoice.
    i think we got the software by box but am not sure.
    Please help!

    Hello Karen,
    in this case you should search for Adobe's staff members by writing a personal message. They can often help better than we, we the users like you. Please have a look in the forum to persons with this icon under their avatar:
    Hans-Günter
    P.S.
    Very often Preran works as the "good spirit".

  • I recently subscribed to Acrobat XI after the trial expired but when I went to activate it I was asked for the serial number. I only have the order number on the invoice. How do I get the serial number for the trial software that is on my computer?

    I recently subscribed to Acrobat XI after the trial expired but when I went to activate it I was asked for the serial number. I only have the order number on the invoice. How do I get the serial number for the trial software that is on my computer?

    Please do not try to send attachments in mail responses to forum messages. Please return to the forum and click Reply. You can then use the CAMERA icon to add your pictures. Looking forward to seeing what is wrong with your license screens - the general advice is simply to sign in, and everything is done. Make sure you use the SAME Adobe ID that you used to purchase, and check your account details to be sure the subscription is active.

  • Apple put the wrong serial number on my replacement MBP invoice

    Hi all.
    In short - I purchased a MBP early 2011 which I needed to return for replacement 3 days later. This was done on the spot and a replacement invoice was to be emailed to me. I purchased AppleCare with my original MBP and I was told that this would automatically transfer and be registered with my replacement model. I must say I was pretty impressed with the speed and hassle-free nature of the service (for my first ever Mac as well).
    Unfortunately, I have just checked the status of my Apple Care and noted that it was listed as expired !!!
    Doing my research, it appears that on the invoice for the 'replacement' unit they sent me, they listed the original (faulty unit) serial number for both the unit that was returned, and the replacement unit. This was obviously an error because they gave me a brand new unit in a new box and I am typing on it right now. I also noted that they 'returned' my old AppleCare Agreement and applied a 'new' AppleCare Agreement (with new agreement number) but it has the returned MBP serial number listed (not the new one) !!!!!
    I am looking for suggestions on how to get this rectified for the following reasons:
    - I need my Apple Care that I paid for to be applied to the correct unit
      - I need my current Apple MBP to be registered to me as the owner (I have no idea who they would have it registered to at the moment given the invoice is incorrect .........)
    I look forward to any advice you might have, and suggestions as to any problems I might expect in dealing with Apple.
    Regards,
    Tim

    (800) APL-CARE (800-275-2273).
    They should be able to straighten things out - be sure that you have all your paperwork together (old sn, new sn, receipt - if you have it - etc.).
    Good luck,
    Clinton

Maybe you are looking for

  • Multiple user mapping challenge, without an AD.

    Dear IdM gurus, I have a challenging situation here and was wondering whether anyone else has made experiences with it. We have the usual collection of ERP ABAP systems + BW + BI Portal + some non-SAP systems which we want to connect to a central IdM

  • BT FON / BT Openzone

    I apologise if this has been posted previously but I have just signed up to BTFON via my home hub and am now trying to access it via my iphone.  I have located the webpage and have been given three choices for customer login being BT Total Broiadband

  • Vcac6.x blueprint customization question/problem

    Hi Guys, I just started with Vcac6.x blueprint customization I have a problem with my new blueprint that i have created concerning the customization Blueprint exist out of the VM template ( created in Vcenter ) with customization spec (also created i

  • USB to VGA using HDMI adapters

    I have an XPS 18 (1810 early 2013) and purchased two connectors from Future Shop to allow me to display a PowerPoint off my Dell All-in-one XPS tablet through a vga projector onto a screen. When connecting the adapters (one usb-hdmi, then hdmi-vga) i

  • Ios 8.2 and lost purchased ringtones

    I Have updated to iOS 8.2 and have noticed my purchased ring tones have gone missing. Can anyone assist in getting these restored please or do we have to wait for Apple to realise they have cocked up again ??