Adding Item managed by serial no.s to Delivery Document

Hello Experts,
Can you please help me in the following?
I'll appreciate your help.
I want to add items managed by Serial Number to delivery document (using DI API).
We have a set of internal serial numbers to be used for those items.
For E.g, we have to add an item with code A0001, quantity of 2, with internal serial numbers to be used 00080,00090
to the delivery document.
(We allow the user to specify the internal serial numbers to be used).
I'm not sure how to get the system serial number for this item.
I believe OSRI has the Serial No/Internal serial no. for each item, w.r.t the marketing documents. (Is each item has its own set of system serial nos & internal serial no.s? From where we need to take it?)
Can you please post if you have any sample code?
(If possible, can you please explain me the relationship between OSRI and marketing documents, and oitem)
Thanks a lot.
Regards,
Geetha
Code that I'm using:
Private Function UpdateSerialNumbers(ByRef objSerialNumbers As SAPbobsCOM.SerialNumbers, ByVal strShpReqNm As String, ByVal strShpReqRw As String) As Boolean
'Get the values of Internal Serial numbers from our table, into this RS.
If objRS.RecordCount > 0 Then
objRS.MoveFirst()
Dim i As Integer
If objSerialNumbers.Count <= 0 Then SerialNumbers.Add()
For i = 0 To objRS.RecordCount - 1
  Dim strTmp As String
  strTmp = objRS.Fields.Item(0).Value() & ""
  objSerialNumbers.SetCurrentLine(i)
  objSerialNumbers.InternalSerialNumber = strTmp 'e.g 00080
'Need your help in this step
  objSerialNumbers.SystemSerialNumber =     objCommon.GetNextKeyValue("OSRI", "SysSerial")
  objRS.MoveNext()
  If Not objRS.EoF Then
    SerialNumbers.Add()
  End If
Next
End If
End If
return true
End Function
Function CallingFn() as boolean
UpdateSerialNumbers(objDLDoc.Lines.SerialNumbers, objHeaderInfo.ShipReqNum, strTmp)
objDLDoc.Add
End Function

Geetha,
let me explain you shortly how the serial data is stored in the database
OSRI - Serial Numer for Items
SRI1 - Serial No. Trans. for Item
OSRI and SRI1 are "connected" by SysSerial
SRI1 is connected to the Document Tables Lines (INV1, DLN1, ...)
with BaseType, BaseNum and BaseLinNum to the Document
a Serial Number is Unique - 1 SerialNr = 1 Quantity (thats the difference to Batches)
regards
David

Similar Messages

  • Item Manage by Serial Number

    hello all,
    related to my question Service Module, Can i use the Service Module?
    what should i do if my item master data has an Onhand qty. and it is not manage by Serial Number, now i want to manage this item master data by Serial Number,but SBO Prompt me w/ the ff. message (You can modify the "Manage item by" setting only when the available quantiry is zero and there are no serial or batch numbers available).
    please advice what is the best practice and workaround for this scenario
    thanks ang best regards,
    Fidel

    Hi,
    You can't change the item master data manage by batch to manage by serial no.
    There are two solutions to solving it i.e.:
    A. First solution
    1. Good issue all the quantities of item manage by batch
    2. Change to manage by serial number after item stock on hand is zero
    if step A.2. is failed, use step B:
    1. Create new item code manage by serial
    2. Good issue all quantities of item manage by batch
    3. set on hold for item manage by batch
    JimM

  • Retrieve Multiple Serial Numbers for given Delivery Document and Item

    Hello Experts,
                          I am currently working on a 2Lis datasource to extract Delivery information.Now it is required to append the
    datasource with field (say ZZSERNO) which should extract ALL Serial Numbers from OBJK table for a given Delivery Item.
    I know that there is a link between table SER01 and OBJK to retrieve the same.However, my concern is- C_T_Data table is
    already providing the Delivery Information and along with that I want to display ALL Serial numbers for a given Delivery Item.
    A delivery Item can have more that one serial number linked to it as what I see in VL03N for a Delivery document.
    So currently in RSA3, I retrieve say 1 record for a given Delivery Document and Item .Now an Item has say 10 Serial Numbers
    associated with it, so i should see 10 Records for that Delivery Document and Item, after executing RSA3.
    Please provide me with the CMOD logic to do so.

    Hi,
    You can Link LIPS and OBJK tables with Delivery and Del Item.........refer below for the code.
    1) Declare an Internal table of type OBJK with fields DEL DOC, DEL ITEM and ZZSERNO .
    2) Declare another Internal Table ITAB_LIPS of type LIPS with required fields say in your case *DEL DOC, DEL ITEM and ZZSERNO....etc.
    3) Use below select statement to extract records from LIPS into ITAB_LIPS that you have declared for to fetch LIPS data.
    Select DEL DOC, DEL ITEM ( here i have included only few fields but as per requirement please add fields here)   from
    LIPS into corresponding fields of Table ITAB_LIPS.
    4) write one more select statement to fetch Serial number data.
    Select DEL DOC, DEL ITEM ZZSERNO  from OBJK into corresponding fields of TABLE ITAB_OBJK for all entries in ITAB_LIPS
    where DEL DOC = ITAB_LIPS-DEL DOC and
                DEL ITEM = ITAB_LIPS-DEL ITEM.
    Loop at ITAB_OBJK.
    Read table ITAB_OBJK into ITAB_LIPS with keys DEL DOC    DEL ITEM.
    ITAB_LIPS-DEL DOC = ITAB_LIPS-DEL DOC
    ITAB_LIPS-DEL ITEM = ITAB_OBJK-DEL ITEM.
    IF SY-SUBRC = 0.
    ITAB_LIPS-ZZSERNO = ITAB_OBJK-ZZSERNO.
    ENDIF
    ENDLOOP.
    Hope the above code helps
    Sujan

  • How to Summarize All items in A/R Invoice from 4 delivery documents

    Hi guyz,
    Is there a way to summarize all same items when copying 4 delivery documents to 1 a/r invoice? Summarizing all same items in one row.
    Regards,
    Michael

    Example:
    Delivery #1
    item 001
    item 002
    Delivery #2
    item 001
    item 003
    If this two delivery document is copy from A/R Invoice it should be:
    item 001
    item 002
    item 003
    What happens now is it list the items like this:
    item 001
    item 002
    item 001
    item 003

  • GL Open Item Managed Flag Changed Historically - Orphan items left on acct

    Back in 2000 for some of our GLs the Open Item Managed flag was changed.  Initially it was not checked but now it is. We know that SAP doesn't really let you do it anymore but apparently back then whoever did it didn't follow what was then the suggested procedure.  As a result we have an account balance of say 500,000 which I can see in FS10N however if I run it for all open items in FBL3N I get 450,000 because 50,000 are not open or cleared.  I can't go in and clear these off against anything because they are not open item managed.  Is there a program that can be ran to make them open? 
    I thought RFSEPA01 would do the trick and after running it in our QA environment the log states:
    Line Items Year Remark
             1 2000 Document selected
             1 2000 Document changed
    However when I go to F-03 it still won't bring the documents in as it says they are not open item managed.
    Sure enough if I go look in table BSIS at the document the Open Item Managed flag is not set. 
    What's the best procedure to resolve these?  Do I have to create a Z program that will flag the Open Item Managed field (XOPVW) and then clear these documents off against something?
    TIA

    Hello,
    Please check the SAP note 175960.                                                                               
    As explained in the note 175960, is not possible to subsequently          
    activate the open item management under some conditions.                                                                               
    With NewGL, the split information on open items is stored in              
    FAGL_SPLINFO and FAGL_SPLINFO_VAL which are only updated when the         
    document is being posted through active document split. Also RFSEPA02     
    does not update these tables.                                                                               
    If you are NOT using NEW/GL with doc split (inactive), you may create     
    add-on report by copying RFSEPA02 and adding modification on the report   
    per note 175960.                                                                               
    As the note states, if you decide to take RFSEPA02 approach,     
    please do so at your own risk. Possible problems (such as data            
    inconsistency) can only be handled by SAP within chargeable remote               
    consulting.                                                                               
    All important information is written on note 175960.
    Regards,
    REnan

  • Error:configuration of serial number  1pm0hm incompatible with document num

    Hi Guys,
    When i enter a serial number in the delivery document, i get an error message saying
    "configuration of serial number  1pm0hm incompatible with document number "
    The material has serial number profile maintained in it and it is a configurable material...
    But i m not sure why this error message is showing up
    Please suggest....
    Thanks
    Anand Viswanathan

    Hi Anand,
    Please go to IQ02 --> Select the 2nd last Tab page "Configuration data" --> There you can see the material in the feild "Configurable material" --> Please check the boxes (Refrenced or Individual) --> mark it as per our requirement.
    Then click on Display and See whether system shows the charaterstics or not?
    Please try and revert back with your findings.
    Also tell what exactlythe status of your serial number,It should be ESTO SLOR.
    Hope this helps,
    Regards,
    MT

  • Error:Item '-' has no serial number management

    We got that error during posting an AP Invoice.
    There are 27 lines, of those 17 line items are batch managed and we have defined batches for all the line items.
    All items are non serial or batch managed.
    The error appears irrelevant to the doc...
    Any guess?? have any one seen such error ??
    Please come forward to share your view and let me get a solution.
    Thanks !!
    ZE|\|

    Hi Z{-N |\/|,
    "There are 27 lines, of those 17 line items are batch managed and we have defined batches for all the line items.
    All items are non serial or batch managed."
    Not getting this line.
    May i Ask you to clerify this..
    Regards
    Ashutosh T

  • Change item to be managed by serial numbers

    Hi All,
    I know this is not an SDK/development question, but have no idea where else to search for answer. So any suggestions will be appreciated!
    I have an item that is created as not to be managed by serial numbers. I then do a goods receipt for the item. Then afterwards I want to change the item to a serial item. Is there any way that I can allocate serial numbers to the items already in stock (those that were created before manage serial was switched on?)
    Thanks a lot in advance,
    Adele

    Hi Ibai,
    Thanks for your reply. I have tried this, but it adds the quantity I type in the Initial Quantity to the existing quantity, so I have double the required amount in stock after this operation. I have sent a query to SAP and their response was:
    Hi, unfortunately it is not possible to assign serial numbers to items in stock that was entered BEFORE you turned on the serial number management. The system assigns the numbers only to the items that had 'manage item by serial number' ticked before they were purchased/sold. But it is possible to add serial numbers to items with transactions, but you can only add them trough new receipt documents (not update the "old" items that were in stock before you turned on the "serial management") This also means that you cannot add serial numbers to this item in a salesorder, delivery or invoice that was made before the management was turned on - unless you cancel the document and enter it again. The "drawback" with this is that you will not have equal numbers of serial numbers and actual items in stock. (The customer will always come to a point where they need to receive more quantity of this item to create new serial numbers again.) The solution can be at some stage to issue the stock with no serial numbers to a different warehouse or to get rid of this stock in other ways. The other option is to issue all stock from warehouse, and enter them again trough an opening balance, this time WITH serial numbers. You will then have equal number of stock and serial numbers.
    So, it doesn't seem to be possible.
    Adele

  • SSRS 2008 Work order Report , when added item descriotion , somehow costgroup id is not working , donot know why, ( need help)

    SSRS 2008 Production orders created report, when I added item description some how cost group id is not working ,
    my costgroup id did not break into labor , only Mat Cost showed in the total,
    my query is as below,  did I link the wrong field,   I want to show Labor total also
    can some one suggest what I did wrong .
    any advise will be great
    SELECT        PRODTABLE.PRODID, PRODCALCTRANS.COSTGROUPID, PRODTABLE.QTYCALC, PRODTABLE.PRODSTATUS, PRODCALCTRANS.COSTAMOUNT,
                             PRODCALCTRANS.COSTMARKUP, PRODCALCTRANS.REALCOSTAMOUNT, PRODCALCTRANS.CALCTYPE, PRODTABLE.DATAAREAID, PRODCALCTRANS.KEY3,
                             PRODCALCTRANS.CONSUMPVARIABLE, PRODCALCTRANS.REALCONSUMP, PRODTABLE.ITEMID, PRODTABLE.SCHEDDATE, PRODTABLE.FINISHEDDATE,
                             PRODCALCTRANS.KEY1, PRODCALCTRANS.TRANSDATE, PRODCALCTRANS.QTY, PRODCALCTRANS.KEY2, PRODCALCTRANS.COLLECTREFLEVEL,
                             PRODCALCTRANS.LINENUM, INVENTTABLE.ITEMNAME, INVENTTABLE.ITEMID AS Expr1, PRODTABLE.INVENTTRANSID
    FROM            PRODTABLE INNER JOIN
                             PRODCALCTRANS ON PRODTABLE.PRODID = PRODCALCTRANS.PRODID AND PRODTABLE.DATAAREAID = PRODCALCTRANS.DATAAREAID INNER
    JOIN
                             INVENTTABLE ON PRODCALCTRANS.DATAAREAID = INVENTTABLE.DATAAREAID AND PRODCALCTRANS.KEY1 = INVENTTABLE.ITEMID
    WHERE        (PRODTABLE.PRODSTATUS = 7) AND (PRODTABLE.DATAAREAID = N'AR1') AND (PRODTABLE.ITEMID = @itemid) AND
                             (PRODTABLE.FINISHEDDATE >= @Paramfromdate) AND (PRODTABLE.FINISHEDDATE <= @Paramtodate) AND (PRODCALCTRANS.COLLECTREFLEVEL
    = 1) AND
                             (PRODCALCTRANS.CALCTYPE >= 0)

    Hi Bitia,
    As per my understanding, after you add Item field to the report, it does not calculate total of matl group, right? If that is the case, please refer to the following steps to troubleshoot the problem:
    Modify the dataset used to retrieve data, delete the fields will not be used in the report.
    Run the query in SQL Server Management Studio (SSMS) to make sure that there is data for matl cost group.
    Make sure that row group and totals are correctly added.
    In addition, do you want to add Finished date to page header? If that is the case, we can use ReportItem to achieve the goal. Please refer to the following steps:
    In design surface, right-click the report and click Insert, then click Page Header.
    Drag Text Box from Toolbox to page header.
    Right-click inside of Text Box, then click Expression.
    In the expression text box, type the code like below:
    =ReportItems!FinishedDate.Value
    If the problem remain unresolved, please provide the screenshot of the report in design view, the following screenshot is for your reference:
    Reference:
    ReportItems Collection References
    Adding Grouping and Totals
    Thanks,
    Wendy Fu

  • FB50L error: Postings to G/L accounts with open item management are not permitted

    Dear All
    I need your help.
    I am trying to do some adjustment to GR/IR clearing account in Non-leading ledger. Since for this account open item management is ticked, I am getting an error message 'Postings to G/L accounts with open item management are not permitted'.
    Now I have checked the forum to find some solution...but does not fit my requirement.
    I cannot create a new account. I cannot change the existing account. I tried OBA5, but the message persists.
    I also checked the notes.
    Appreciate a response on how the post to open item managed accounts in non-leading ledger.
    Regards
    Kunaal

    Hi Kunaal
    Usually, OIM accounts are not allowed for Non Leading Ledger postings... With EhP4 or 5, i guess, a new feature is added in GL Master whereby you can specify that a GL will be OIM for Leading Ledger and Not OIM for a Non Leading Ledger
    Regards
    Kavita Agarwal

  • As of Contract Management 13, serial numbers are no longer used.

    Hello Primavera users,
    We are currently using Contract Manager v12 on a major program here in the UAE and looking to upgrade soon to v13.
    Regarding this knowledge base posting (below), does v13 still support concurrent user licenses, and if so what are Oracle's plans moving forward in terms of Contract Manager?
    I would love to hear the views of the Primavera community, especially in relation to these changes with serial numbers etc...
    Thanks & Regards,
    John
    Solution ID: prim83632
    How To: Adding (new) serial numbers in Contract Management 13
    Status: Reviewed
    Version(s): 13.0
    Problem:     How To: Adding (new) serial numbers in Contract Management 13
    Problem:     Where do I add new serial numbers in Contract Management 13?
    Problem:     Where are serial numbers stored?
    Fix:     As of Contract Management 13, serial numbers are no longer used.

    Well, it's just a simple pipe afterall, a tool to give you brief information upon which you decide what to do. Also, there's a minor annoyance, it should go like this:
    stat -c '%x %n' /usr/bin/* | sort
    I mixed long and short options for a moment there, that gets rid of the '=' in front of every line.

  • How to restrict adding Item Sales Order without itemcost

    Hi Experts,
    Can i restrict sap user on adding "Sales Order" (Items) if they are adding items without itemcost on item master?

    Insert this in your  SBO_SP_TransactionNotification stored procedure after the line
    --     ADD     YOUR     CODE     HERE
    IF @transaction_type IN (N'A', N'U') AND @object_type = '17'
    BEGIN
    If exists
    (Select 1
    From RDR1 O  INNER JOIN OITM I ON O.ItemCode = I.ItemCode
    Where I.AvgPrice = 0
       and O.DocEntry=@list_of_cols_val_tab_del)
    begin
    SET @error = 1
    SET @error_message = N'Item without cost ! '
    end
    END
    This code is applicable if you do not set the Manage Item Cost per Warehouse. If you set it, use the modified code of Rahul.
    Edited by: István K#rös on Oct 12, 2010 1:59 PM

  • Adding a delivery document with serial numbers

    Hi everyone,
    A delivery document is created in code and the item delivered requires a serial number. In this example there is a quantity of two so two serial numbers will need to be added.
      Dim oCompany As New SAPbobsCOM.Company, lRetCode As Long
            Dim oSerialNumbers As SAPbobsCOM.SerialNumbers
            Dim oDelivery As SAPbobsCOM.Documents
            Dim RetVal As Long
            Dim ErrCode As Long
            Dim ErrMsg As String
                oDelivery = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
                oDelivery.CardCode = "KellyD"
                oDelivery.DocDate = "09/20/2005"
                oDelivery.Lines.ItemCode = "MDASTPE"
                oDelivery.Lines.Quantity = 1
                oDelivery.Lines.TaxCode = 0
                oDelivery.Lines.Price = 300
                oSerialNumbers = oDelivery.Lines.SerialNumbers
                ??What code goes here to enter the serial numbers??
                RetVal = oDelivery.Add
    Any help would be appreciated.
    Thanks.

    Hi
    try this or something alike
    oSerialNumbers.add() ' i'm not sure if its necessary
    oSerialNumbers.SetCurrentLine(0)
    oSerialNumbers.InternalSerialNumber="yourfirstserial"
    oSerialNumbers.add()
    oSerialNumbers.SetCurrentLine(1)
    oSerialNumbers.InternalSerialNumber="yourSecondserial"
    tell me results
    Kind regards
    Salvador Biot

  • Clearing GL with Open Item Management

    Dear Experts.
                    A liability GL (Remuneration Gl account) has been created by the client in the system without open item management. After that several entries has been posted in that GL account. Few months back they have activated Open Item Management for that GL using a program.Now they want to clear few entries in that GL account and while clearing the GL in F-03 system is displaying an error
    Document splitting: Items for clearing 1000/9300000661/2012/001 not found
    Message no. GLT0002
    Diagnosis
    Document splitting cannot perform clearing because it was not possible to find complete splitting information on the items to be cleared (company code, document number, fiscal year, item).
    System Response
    Clearing cannot be performed and the document cannot be posted.
    Procedure
    Exclude the affected item from clearing.
    It may be that this item was not posted with active document splitting. In this case, this item or document would have to be migrated.
    This error occurs due to the Open Item Management activation in the GL after entries were posted.
    Now the client wants to clear few entries in this GL account for which Open Item Management was activated recently. The client is not willing to create a new GL and post transfer entries. Is there any other possibility to clear this GL account.
    Please provide your valuable suggestions.
    Regards,
    Ramprasath

    Hi,
    The reason for the error GLT0002 is that there is no values for
    document in tables FAGL_SPLINFO and FAGL_SPLINFO_VAL
    Regarding the clearing process in the FAGL_ACTIVATE_OP:
    The clearing of the 'old' items is the standard process in the report.
    Here is the part from the documentation:
    (Please review the documentation on FAGL_ACTIVATE_OP via se38
    enter in FAGL_SWITCH_TO_OPEN_ITEM view documentation)
    The system then activates open item management and clears all existing
    open items. After this clearing, you have the option of having the
    system repost the amounts that were initially written off.
    This is done to start newly with the OI management once it is activated.
    So if you want to activate the OI management for an other account in
    your  system, please take into account that the clearing should NOT be
    opened again in standard.
    I would request you to please read the documentation in SE38 for FAGL_SWITCH_TO_OPEN_ITEM
    and please check whether all criteria's are fulfilled or not.
    I hope this helps.
    Regards
    Eugene

  • Open item management- prob

    Frnds
    By some of the configuration mistake, we are not managing the Check Out A/C (Bank Clearing A/c) on an open item management.
    But now we need to keep it on opem item management, but there are already some opem items, which was created at the time of vendor payments.
    1. as i know that we can chagne it to the open item management, but we have to clear those open items.
    2. as someone suggested to open another GL acct and post all the opem item to tht A/c, but we do nto want to change the GL A/C no because we have done account determination in Automatinc payment program and Bank statement Reconciliation.
    please suggest the right way to do it
    THanks

    Sure
    actually i noticed it later, i am sorry for tht

Maybe you are looking for

  • How do i create a mail folder for my iphone 5c

    I need to make multiple folders in mail but I do not know how to do this.  Can anyone help me?  I appreciate your time.

  • Select  query

    hi all, in the selection screen i have a posting date from MKPF Table but date should display only month and year  as DATE : 1/2008      TO   12/2008 I have written as below using offset. select-options:  l_date for mkpf-budat+2(6). but how to get th

  • New Pages crashes on launch

    Have purged out old iWorks files in Libraries. Do I have reinstall everything from scratch to make it work? Process:               Pages [4874] Path:                  /Applications/Pages.app/Contents/MacOS/Pages Identifier:            com.apple.iWork

  • Problems painting a JPanel component on a JFrame

    Hi. I've built a subclass of JPanel that has some controls on it, such as JPanels, JCheckBoxes, images, etc. I need to repaint this JPanel periodically because its contents are constantly changing. I have it added to a main JFrame (this JFrame has al

  • OC4J Scalability

    Hi, I had an "outOfMemory" error a couple of times running a few JSP applications on OC4J. Should I use -Xmx to increase the heap size when running an app-server? I have 2000 users and I am trying to determine if I should increase it from 64m to 128m