Serial Nos and Delivery Creation

Hi,
We are using SAP Business One 2005 A SP 01 PL 08.
We have created a Sales Order in which we have an item which is a managed by serial nos. We now try to convert this sales order into a delivery note and when we do so we are asked to select the serial nos. We selected the serial nos and when the delivery is created the following error occurs.
Error No: -10, Message:  [DLN1.WhsCode][line: 0] , 'The selected quantity of batch/serial numbers is greater than the open quantity.'
Actually the quantity that we have in the Sales Order and the Serial nos selected are one and the same.
This is the code that we use to create the delivery note. (Assuming there is only one Line in the Sales Order)
Dim oSO As SAPbobsCOM.Documents
Dim oDlv As SAPbobsCOM.Documents
oSO = pcompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
oDlv = pcompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
' iSoDocEntry contains Sales Order no
If oSO.GetByKey(iSoDocEntry) = True Then
oDlv.CardCode = oSO.CardCode
                oDlv.DocDueDate = oSO.DocDueDate
                oDlv.Comments = "Based on Sales Order " & iSoDocEntry & "." & oSO.Comments
                oDlv.Address = oSO.Address
                oDlv.ShipToCode = oSO.ShipToCode
                oDlv.Address2 = oSO.Address2
                oDlv.AgentCode = oSO.AgentCode
                oDlv.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Items
                oDlv.DocumentSubType = SAPbobsCOM.BoDocumentSubType.bod_None
oDlv.Lines.BaseLine = iRowNo
oDlv.Lines.BaseType = SAPbobsCOM.BoAPARDocumentTypes.bodt_Order
oDlv.Lines.BaseEntry = iSoDocEntry
Dim objSerialNum As SAPbobsCOM.SerialNumbers
Dim sSerialNumbers(), sSysSerialNumbers(), sInternalSerial() As String
Dim iCount As Integer
objSerialNum = oDlv.Lines.SerialNumbers()
sSerialNumbers = sSupSerial.Split(",") ' Contains the List of Supplier Serial Nos value of the Selected serials
sSysSerialNumbers = sSysserial.Split(",") ' Contains the List of Sys Serial value of the selected serials
sInternalSerial = sInternal.Split(",") ' Contains the List of Internal Serial value of the selected serials
For iCount = 0 To sSysSerialNumbers.Length() - 1
objSerialNum.InternalSerialNumber = sInternalSerial.GetValue(iCount)
objSerialNum.ManufacturerSerialNumber = sSerialNumbers.GetValue(iCount)
objSerialNum.SystemSerialNumber = sSysSerialNumbers.GetValue(iCount)
objSerialNum.SetCurrentLine(iRowNo)
objSerialNum.Add()
Next
end if
iReturnValue = oDlv.Add()
Here when we trap using Getlasterror the error that we got is mentioned above.
Any help is welcome
thanks in advance
Ganesh.

Hi Aleksey,
I checked that and there is enough quantity for the warehouse. When we added the same through SAP without using the Add on that we have created and the delivery is created properly. So we have enough quantity of the item in the warehouse.
Thanks
Ganesh

Similar Messages

  • Very urgent : shipping point and delivery creation date

    Hi :
    I have a custom table with fields :
    belnr, posnr, btyp, aufnr, ebeln, ebelp, livbeln, liposnr,matnr,wadat,kunnr,werks,bmeinh,getri,inaktiv,wabukz,erdat,aedat,loekz.
    Custom Transaction with fields :
    vbeln (field name belnr) , aufnr, delivery vbeln ( field name livbeln ),werks, mat .avail.dat ( mbdat ), transport.plan date(tddat),
    matnr, and sales order item (posnr).
    I have to select sales order , item from custom table based on plant (werks) shipping point , and delivery creation date.
    how can i relate shipping point and delivery creation date to my query.
    For delivery creation date, it should be selected based on current date+-2 and should choose MBDAT OR TDDAT which ever is earlier based on current date.
    I would appreciate if anyone can give me som idea and full points r rewarded.
    Thx.
    Rag

    Hi,
    Try this:
    select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap
    on a1belnr = vbapvbeln
    inner join vbep
    <b>on vbapvbeln = vbepvbeln and vbapposnr = vbepposnr</b>
    where a1~werks = p_werks
    AND vbap~vstel = p_vstel
    AND vbep~edatu = p_edatu
    AND (vbep~mbdat <= p_edatu OR
    vbep~tddat <= p_edatu ).
    regards,
    Anji

  • Shipping point and delivery creation date

    Hi :
    im selecting sales orders , items and schedule line
    from a custom table based on plant, shipping point and delivery creation date. 
    Is there any relation between Schedule lines and delivery creation date.
    For delivery creation date d_date = SY-DATUM,  and should select Mat Avail dt MBDAT or Trans. planning dt TDDAT which ever comes earlier.
    vbep-edatu = itab-d_date.
    select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap
    on a1belnr = vbapvbeln
    inner join vbep on a1posnr = vbepposnr
    where a1~werks = p_werks
    AND vbap~vstel = p_vstel
    AND vbep~edatu = p_edatu
    AND (vbep~mbdat <= p_edatu OR
    vbep~tddat <= p_edatu ).
    can anyone help me with this select statement.
    Thanks.
    Raghu

    Hi,
    Try this:
    select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap
    on a1belnr = vbapvbeln
    inner join vbep
    <b>on vbapvbeln = vbepvbeln and vbapposnr = vbepposnr</b>
    where a1~werks = p_werks
    AND vbap~vstel = p_vstel
    AND vbep~edatu = p_edatu
    AND (vbep~mbdat <= p_edatu OR
    vbep~tddat <= p_edatu ).
    regards,
    Anji

  • Adobe CS6 master Collection disks purchased with serial Nos and used for 18months ok but now I get told "Your Trial has expired" I was never aware it was a trial? purchase was from reseller slim.nl Adobe ID registers serial No but it is now described as i

    adobe CS6 master Collection disks purchased with serial Nos and used for 18months ok but now I get told "Your Trial has expired" I was never aware it was a trial? purchase was from reseller slim.nl Adobe ID registers serial No but it is now described as invalid. What is going on?

    Issues related to serial numbers and registration can never be handled on a public forum as this one is.
    Please either call Customer Service for your region, or use web chat (link below). When using the link below, enter a product name and an issue. Ignore the provided links, and choose something like "Still have a problem?" and you'll get a link to web chat:
    Contact Customer Care

  • Is it possible to customize the ARUN table (J_3ABDBS) and delivery creation program (transaction VL04) in SAP?

    I am a student, pursuing MBA and currently doing internship with a big fashion and lifestyle company in India. I am stuck at a place where i need help.
    We are planning to give customer the control over the time of delivery of their orders as per their convenience. For that I am exploring the possibility of modifying the ARUN table in such a way that an extra column is added into the ARUN table. this field will contain a flag value (1/0) where '0' will indicate that the customer wants to block delivery for the specific items.
    at the time of delivery creation, transaction VL04 should check this flag value for every item. So when we try to create delivery for a whole order in one go, the delivery for the items with '0' flag value shouldn't be created.
    basically, my whole purpose is to enable our SAP system to create delivery on item level instead of on order level.
    Ques:
    1. Is it at all possible to do what i am thinking of?
    2. has any company customised the ARUN table and delivery creation program before?
    3. If we go ahead with this customisation in-house, will the SAP pull back the maintenance support on account of tempering with base programs?
    4. Also, please suggest other ways to do what i am trying to do?

    you can use the Tables SRRELROLES and IDOCREL
    if it is inbound delivery the use the business object BUS2015(outbound use LIKP)
    first get the ROLEID using the Delivery number as Objectkey(business obecjt BUS2015/LIK) from the SRRELROLES,
    then pass the ROLEID to the table IDOCREL to ROLE_A , get the ROLE_B,
    use this ROLE_B supply to ROLEID of SRRELROLES table(business object as IDOC, )
    get the objkey which is nothing But IDOC.

  • Sales orders and delivery creation

    Hi :
    im selecting sales orders , items and schedule line
    from a custom table based on plant, shipping point and delivery creation date.
    Is there any relation between Schedule lines and delivery creation date.
    For delivery creation date d_date = SY-DATUM, and should select Mat Avail dt MBDAT or Trans. planning dt TDDAT which ever comes earlier.
    vbep-edatu = itab-d_date.
    select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap
    on a1belnr = vbapvbeln
    inner join vbep on a1posnr = vbepposnr
    where a1~werks = p_werks
    AND vbap~vstel = p_vstel
    AND vbep~edatu = p_edatu
    AND (vbep~mbdat <= p_edatu OR
    vbep~tddat <= p_edatu ).
    can anyone help me with this select statement.
    Thanks.
    Raghu

    Hi,
    Modify the Selec as below:
    select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap
    on a1belnr = vbapvbeln
    inner join vbep
    <b>on  vbapvbeln =  vbepvbeln and vbapposnr = vbepposnr</b>
    where a1~werks = p_werks
    AND vbap~vstel = p_vstel
    AND vbep~edatu = p_edatu
    AND (vbep~mbdat <= p_edatu OR
    vbep~tddat <= p_edatu ).
    Regards,
    Anji

  • RFC For Order and Delivery creation in SD from CRM - text not getting copie

    Hi
    I am trying to find out how the order and delivery is created in R3 if I create a return order in CRM, as we have one issue in which the text is not being copied to delivery??
    Thanks in advance
    Sameer

    Please check if you have any custom code/user exit in ECC which uses transaction code (VA01 , VA02 or VA05 etc) prior to invoking credit checks. 
    Orders created via CRM will not have transaction code set (SY-TCODE).

  • Serial Numbers and Delivery not automated.

    "The serial number field on the delivery is only a text field and requires user input. The actual serial numbers shipped on the delivery are not put in this field automatically by the system as you know. This is how it works. The serial number data is stored in different tables, OSRI and SRI1 and linked to the delivery document."
    We have been manually typing the S/N into the delivery form so that we can have it print packing lists and invoices. Once we select the S/N for the delivery it should automatically update the delivery form.
    The Delivery form does not automatically fill in the S/N once we select a s/n. Here is a scenario
    1.)Select a Sales Order that has an item that requires a s/n.
    2.) Copy SO to Delivery
    3.) Click Add or put the cursor in the proper row of the s/n column and hit enter. A new window showing available S/N should appear.
    4.) Select the S/N, assign to this SO and click Update then OK.
    5.) Repeat if more then 1 item requires a s/n.
    6) When done,  click ADD and a new Delivery ticket is created. Note at this time the S/N are not showing in the Delivery Form.
    7) You can now click Print Preview and it will show the Packing List along with a page for serial numbers. Also a Crystal Report Packing list is generated, but the s/nu2019s are not listed.
    The only way we can get s/nu2019s to show on the Delivery form and in Crystal .Reports is to MANUALLY type the s/n into the Delivery form. We want to avoid typing the data, potential for typou2019s. This should be something the software  does for us.

    We're wondering the same thing. Would a bar code scanner work? The data would have to be displayed on a PC or something where it could be recorded.
    Yes and no.  
    We have a small Bluetooth barcode scanner.  Works well if the bar codes were printed better.  I mean, the bar codes for switches/routers are "readable" but for wireless access points, you would need several attempts to get it to read.  
    Alternatively, you can read the bar codes from the box.  I only use this as a "last resort" because I have seen, in two occasions, that the codes in the box and the the ones from the appliance don't match.  

  • Consecutive salesorder and delivery creation error

    Hi all,
    I am using two functions one to create salesorder
    and one for delivery which i use the salesorder number which is created b4.
    These are :
    'BAPI_SALESORDER_CREATEFROMDAT2'
    'RV_DELIVERY_CREATE'
    They work great when i use them seperately. (Not in the same program)
    When i make two perform actions like
      PERFORM SALESORDER_CREATE.
      PERFORM DELIVERY.
    It creates sales order and gives me the number and i put it to delivery and it also enters the creation sequence. But in
    program LV45VF0V
    line :  INSERT VBUK FROM TABLE DA_XVBUKI.
    It gives me dump because of duplicate data.
    How can i pass this error. I tried free memory but i couldnt manage it.
    Thanks a loT!

    Just a guess, could you try with FM RV_DELIVERY_INIT before calling FM RV_DELIVERY_CREATE.

  • Question on Serial Nos

    We require serial numbers to be entered when doing a material movement to stock or to another storage location. Sometimes the range of these numbers can be 50+ numbers but that range consecutively. Is there a way to put the range from beginning to end of range without entering in every serial number?
    Thank you

    While entering the serial numbers did you try "Select Serial No" button (the small blue table like icon). Here you can enter the range of the serial nos  and select the required numbers.
    I have used the same while in Delivery and during MBXX movements.
    If this is helpful then please allot some points

  • Shipping point , delivery creation date

    Hi :
      I have a custom table with fields :
    belnr, posnr, btyp, aufnr, ebeln, ebelp, livbeln, liposnr,matnr,wadat,kunnr,werks,bmeinh,getri,inaktiv,wabukz,erdat,aedat,loekz.
    Custom Transaction with fields :
    vbeln (field name belnr) , aufnr, delivery vbeln ( field name livbeln ),werks, mat .avail.dat (  mbdat ), transport.plan date(tddat),
    matnr, and sales order item (posnr).
    I have to select sales order , item from custom table based on plant (werks) shipping point , and delivery creation date.
    how can i relate shipping point and delivery creation date to my query.
    For delivery creation date, it should be selected based on current date+-2 and should choose MBDAT OR TDDAT which ever is earlier based on current date.
    I would appreciate if anyone can give me som idea and full points r rewarded.
    Thx.
    Rag

    Hi Pankaj,
    Please try to use BAPI 'BAPI_DELIVERYPROCESSING_EXEC' for creating delivery form sales order , you can pass value and create delivery.
    you can refer below code, it may be helpfull for you to create delivery.
    DATA: BEGIN OF t_vbap OCCURS 0,
            vbeln LIKE vbap-vbeln,
            posnr LIKE vbap-posnr,
      zmeng LIKE vbap-kwmeng,
            matnr  LIKE vbap-matnr,
            werks  LIKE vbap-werks,
          END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
          WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
          WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr zmeng matnr werks
           INTO TABLE t_vbap
           FROM vbap
           WHERE vbeln = v_vbeln.
    LOOP AT t_vbap.
      t_request-document_numb = t_vbap-vbeln.
      t_request-document_item = t_vbap-posnr.
      t_request-quantity_sales_uom = t_vbap-zmeng.
      t_request-quantity_base__uom  = t_vbap-zmeng.
      t_request-id = 1.
      t_request-document_type = 'A'.
      t_request-delivery_date      = sy-datum.
      t_request-material = t_vbap-matnr.
      t_request-plant = t_vbap-werks.
      t_request-date = sy-datum.
      t_request-goods_issue_date = sy-datum.
      t_request-goods_issue_time = sy-uzeit.
      APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
         TABLES
              request      = t_request
              createditems = t_created
              return       = t_return.
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    Regards,
    Prasenjit

  • Converting Delivery Creation Date/Time into the Local Date/Time

    Hi
    I have two fields like 'Delivery Creation Date' and 'Delivery Creation Time' in ECC system . My user wants the Delivery Creation Date / Delivery Creation Time in Local time of Plants .
    For example :
    Delivery    Plant       DelivCreationDate       DelivCreationTime   DelivCreationDate(Local)   DelivCreationTime(Local)
    312456          1650               11/2/2007                     4:30                          11/2/2007                          3:30
    Here the Plant 1650 is in Mexico . The above delivery is created in Canada in ECC system according to the candain time .
    But user wants to convert the Candain Delivery Creation Date and Time into the Local Date/Time of specific plant .
    So we need to convert the  Candain Delivery Creation Date and Time into Mexico timings .
    How can it is possible this one and user wants to automate this process .
    Please let me know
    Mubeen

    DATA :
    timestamp like TZONREF-TSTAMPS,
    time like sy-uzeit,
    date like sy-datum.
    The following function module is used to convert the
    time and date into GMT timestamp
    CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
    EXPORTING
    i_datlo = <source_fields>-delivery_date
    i_timlo = <source_fields>-delivery_time
    I_TZONE = CAD'
    IMPORTING
    E_TIMESTAMP = timestamp.
    The following function module is used to convert the
    above obtained timestamp to MEX  timezone date and time.
    CALL FUNCTION 'IB_CONVERT_FROM_TIMESTAMP'
    EXPORTING
    i_timestamp = timestamp
    I_TZONE = MEX
    IMPORTING
    E_DATLO = date
    E_TIMLO = time.
    CAD and MEX are variables i have used...
    the challenge is to find the canadian and mexican time zone....CAD and MEX.
    which you can get by performing a lookup in table T001W and passing country as parameter.

  • Bapi for creation of delivery by using SO,shipping point,delivery creation date

    Hi experts,
    I am looking for bapi that takes sales order,shipping point and delivery creation date and generates delivery.
    I have tried with bapi GN_DELIVERY_CREATE but i am not able to understand whether this bapi is used for inbound or outbound deliveries.If this bapi is ok then what are the mandatory fields for this bapi.
    Regards,
    Pankaj Jain

    Hi Pankaj,
    Please try to use BAPI 'BAPI_DELIVERYPROCESSING_EXEC' for creating delivery form sales order , you can pass value and create delivery.
    you can refer below code, it may be helpfull for you to create delivery.
    DATA: BEGIN OF t_vbap OCCURS 0,
            vbeln LIKE vbap-vbeln,
            posnr LIKE vbap-posnr,
      zmeng LIKE vbap-kwmeng,
            matnr  LIKE vbap-matnr,
            werks  LIKE vbap-werks,
          END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
          WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
          WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr zmeng matnr werks
           INTO TABLE t_vbap
           FROM vbap
           WHERE vbeln = v_vbeln.
    LOOP AT t_vbap.
      t_request-document_numb = t_vbap-vbeln.
      t_request-document_item = t_vbap-posnr.
      t_request-quantity_sales_uom = t_vbap-zmeng.
      t_request-quantity_base__uom  = t_vbap-zmeng.
      t_request-id = 1.
      t_request-document_type = 'A'.
      t_request-delivery_date      = sy-datum.
      t_request-material = t_vbap-matnr.
      t_request-plant = t_vbap-werks.
      t_request-date = sy-datum.
      t_request-goods_issue_date = sy-datum.
      t_request-goods_issue_time = sy-uzeit.
      APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
         TABLES
              request      = t_request
              createditems = t_created
              return       = t_return.
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    Regards,
    Prasenjit

  • Trigger internal serial nos creation for inbound delivery using DELVRY03

    Hi all,
    I am working in ECC 6.0 I need to update serial nos in the inbound delivery. The internal serial nos. that will be generated by the system, I have to trap them for a given delivery and map it to a set of external serial nos.(length is 40 chars) and update in a Z table.
    For changing the delivery, I am using idoc DELVRY03 (message SHPCON). Within the idoc I am not able to find any such field which will trigger the automatic creation of internal serial nos. In case of idoc MBGMCR03 (goods movement), there is a field E1BP2017_GM_ITEM_CREATE-SERIALNO_AUTO_NUMBERASSIGNMENT which when set to 'X', the internal serial nos are automatically generated and can be found in table SER03.
    I want a similar thing for the DELVRY03 idoc. Can anyone help me on this?
    If not possible through Idoc, then whats the other option?
    My aim is to just get the internal serial nos created through delivery change activity.
    Note - The serial no. profile cannot have the option of serial no. usage set to '04 - automatic' in SPRO as per the client's business process.
    Thanks,
    Shoma

    Hi Shoma,
    copy the FM  which is assigned to your processcode and copy to ZFM and write your modifications on that ZFM.
    It will resolves your problem.
    Regards,
    Venkat.

  • Serial Number validation during Delivery Creation itself(PGI-system checks)

    Process:
    Sales Order PR(Purchase Order) GR( New Serial Numbers are created automatically or manually keyed in)
    Once the Goods Receipt is received, we do the (SO) DELIVERYu2014SERIAL NUMBER ASSIGNMENT Post Goods Issue
    Issue:
    Current Serial Number Profile Management does not do a valid serial number check during DELIVERY CREATION where we do a SERIAL NUMBER ASSIGNMENT.
    Only during POST GOODS ISSUE, the check happens for valid serial numbers; this is too late in the game for business as there is a time lag of 3 days from the DELIVERY CREATION and PGI.
    Reason being--- We donu2019t check the following u201C Existing Stock Checku201D( which does a serial number validation during delivery creation as well)
    SPRO>Plant Maintenance and Customer Service>Master Data in Plant Maintenance and Customer Service>Technical Objects>Serial Number Management>Define Serial Number Profiles
    If we check this option, the business requirement to do a valid serial number check does happen during delivery creation, however we cannot create new serial numbers during Purchase Order- GOODS RECEIPT.
    QUESTION:
    Can we have the system check the valid serial numbers from stock during delivery creation and serial number assignment.
    And Also create new serial numbers during Purchase Order- Goods Receipt.

    Hi
    1.In std SAP its not possible to check the serail number during Delivery creation, through enhancement it can be done.
    2.During GR for PO serial numbers can be created.
    Rgds
    Ramesh

Maybe you are looking for

  • Safari 6.1 sends files in random order to flash uploaders?

    Here are two demo sites of popular flash uploaders where you can easily recreate the issue. http://img.hompee.com/fupload/simpledemo/ http://www.uploadify.com/demos/ If you upload 2 or more files you expect them to be uploaded in the order in which t

  • Help with French Accent Characters Corrupted

    Hi, All. I am developing a Flex Front end connect with Java back-end. The back-end sends data retrieved from XML file to the Flex front-end; displays it in an TextArea, and allow user to change. After user changes the data, hit "Save" button, then Fl

  • Airport Express can't find D-Link wireless network

    Hi all, I'm on my third AirPort Express. I'm trying to use it in client mode to connect to a D-Link DIR-655 WAP, so I can run AirTunes. The first unit was a Best Buy refurb that I was able to configure fine, but it kept dropping the connection and ha

  • Mac Mini Server Backups

    Dear all, I am using a Mac Mini Server for filesharing, iCal, etc. I want to make sure all data is safe, so I want regular backups. The Mac Mini Server is set up to work on Disk 1 and backup on Disk 2. But in case the server is stolen, crashes or som

  • Why is this image scrambled in PSE?

    While downloading images of the Olympics to use as wallpaper, I ran across this image that will not open correctly in PSE, and I'm just wondering why. I tried it several times, then resorted to opening it in Preview, saved it as a jpg., then finally