Create Pick List - Urgent

How does one create a pick list with DI API? Please let me know if it is possible.
Thanks a lot!

Did you get an answer to your question?
I also need to automate this process and create/update Pick Lists with the DI API, instead of my customer having to do it manually in SBO using the Pick and Pack Manager.
If it is not possible with the current version of the DI API, then I would like to know when it will be implemented.
Best regards,
Karsten Damgaard

Similar Messages

  • Creating Picking list for 2 different Slocs

    Hello guys,
    I have a situation here:
    I have only one Warehouse # 200.
    I have two Slocs:
    Sloc:0001 linked to WM:200
    Sloc:0002 works at the IM level.
    I have two shipping points (0001 & 0002) for each Slocs as well.
    WM:200 sends the goods to both Slocs.
    We run VL10G and then VL06P.
    The issue is to ship out the Sloc 0002 goods before than the Sloc 0001.
    However it doesn't occur at all.
    0001 gets the picked items first and if there is any left over quantities then Sloc 0002 gets the rest.
    What would be the best Expert approach to make this happen?
    Any thrown idea will be appreciated greatly.
    Best regards,
    Bodik

    Hello Prashant,
    They both are assigned to the same Sloc, here is the structure:
    Ship.Pnt     Plant      Sloc
    P001          P001      0001
    P002          P002      0001
    Best regards,
    Bodik

  • Bin Location In Pick List - Cannot select batch/serial number after pick list created

    Hi,
    When i set up the item master as "Issued Primarily By Bin Location". There are no way for me to assign batch/serial in back end. In contrary, when item set up as "Issue Primarly By Batch/Serial Number", SAP prompt to pre-select the batch/serial no. during creating pick list.

    Hi,
    Please check this thread for the reason why system information is not correct.
    Variables - Sap business one
    Thanks & Regards,
    Nagarajan

  • *configure the Picking list(PL) output type,a smart form for PL.

    Hello SIR,
    I want to configure the Picking list(PL) output type,a smart form for PL but there should be an output type to print*.
    i have assign the out type to shipping point in t.code ovlt .i have created picking list in t.code nact. i created sales order and delivery. i have check my picking list in ovl2n change mode picking out put is available in extra-picking output. i have checked my picking out put for smart form in systems-service-output control if i execute it show like no data to list. no spool request number has generated there.
    so were i have to check picking list preview for smart form . is spool request number is necessary.plz help me to view preview of picking list.or plz say the steps to configure this to preview.
    thanks,
    agilarasan

    Hi,
    Go to Nace .The application for Goods Issues is
    ME - Inventory Management -> select and click on output types ->select wa03 output type and click on processing routines here you can find the form name and the driver program name.So while printing select wa03 as the output type.
    <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    Regards,
    Harini.S
    Edited by: Alvaro Tejada Galindo on Dec 23, 2008 3:46 PM

  • DI - Pick list creation

    Hi all,
    I've seen a few examples of creating Pick Lists through the DI, and I can't understand why my version won't work...
    If anyone can notice anything obvious and point it out to me that would be of great help!
    Using SAPB1 v9 PL10.
    MSSQL 2012.
    BoObjectTypes.BoRecordset)
    Dim sqlstring As String = "select t0.DocNum, t1.DocEntry,t1.ItemCode, t1.Quantity, t1.DocDate, t1.LineNum, t1.LineStatus, t1.Price from ordr t0 inner join rdr1 t1 on t0.docentry = t1.DocEntry where docnum = 448 and t1.LineStatus = 'O'"
    "DocEntry").Value
    "DSV Interface"
    Do Until OrderRs.EoF
    "ItemCode").Value
    "Price").Value
    "17" ' Sales order
    "LineNum").Value
    Loop
    If PLIST.Add = 0 Then
    'success!
    Else
    "SOWMS03, generate picklist", "Error creating PickList!")
    End If

    Dim PLIST As SAPbobsCOM.PickLists = GetDIConnection.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPickLists)
    Dim DocEntry, qty As Integer 'SO docentry & line qty
    Dim ItemCode As String ' Itemcode for SO line
    Dim price As Double
    Dim LineNum As Integer
    Dim OrderRs As SAPbobsCOM.Recordset
    OrderRs.DoQuery(sqlstring)
    DocEntry = OrderRs.Fields.Item("DocEntry").value
    PLIST.PickDate = Today
    PLIST.Name = "Name"
    PLIST.OwnerCode = 1
    Do Until OrderRs.EOF
    ItemCode = OrderRs.Fields.Item("ItemCode").Value
    price = OrderRs.Fields.Item("Price").value
    PLIST.LINES.BaseObjectType = "17" ' from a sales order
    PLIST.Lines.OrderEntry = DocEntry
    LineNum = OrderRs.Fields.Item("LineNum").value
    PLIST.Lines.ReleasedQuantity = OrderRs.RecordCount
    PLIST.Lines.Add()
    OrderRs.MoveNext()
    Loop
    if PLIST.Add = 0 then
    'Success!
    Else
    Err.Raise(vbObjectError, "blah blah blah", "blah")
    end if
    I had to copy this out by hand as copy&paste cuts out the code. You can assume that the sql query being executed to fill the OrderRs recordset returns everything I need, I've also skipped out a few echoes that I use for debugging, which indicate that none of these values are NULL or Nothing.
    Thanks for the interest in my issue!
    Cal.

  • Pick List Creation Released quantity exceeds open quantity

    Hi all,
    I'm getting the following error when trying to create pick lists through the SAPB1 DI:
    "Released quantity exceeds open quantity "
    Every time, the stock quantity in the warehouse that the code concerns is by far enough when compared to the released quantity.
    I cannot turn off the warehouse setting recommended on another post on here.
    Any ideas?
    Thanks
    Cal.

    Hi, sorry for my delayed response!
    This is still an issue, I already have a condition to check against the warehouse's current stock, this is being successful but still generates the above error when we get to PLIST.add()
    Here's the SQL I'm using to gather my data:
    select distinct t3.docnum,t4.listName as'Price List',(select isnull(sum(1),0) from pkl1 S99 where S99.orderentry = T0.docentry
    and S99.orderline = T0.linenum) as 'cupid',t0.DocEntry, t3.Confirmed, DATEDIFF(DAY,GETDATE(),t3.DocDueDate)
    as 'DateDifference' from rdr1 t0 inner join oitm t2 on t0.ItemCode = t2.ItemCode inner join ORDR t3
    on t3.DocEntry = t0.DocEntry inner join OCRD t1 on t3.CardCode = t1.cardcode inner join OPLN t4
    on t1.listnum = t4.listNum where T0.[WhsCode] = 'xxx' and  T2.[OnHand] > 0 and  T0.[OpenQty] > 0 and T2.InvntItem = 'y'
    and t3.Confirmed = 'y' and (select isnull(sum(1),0) from pkl1 S99 where S99.orderentry = T0.docentry and S99.orderline = T0.linenum) = 0
    and t4.ListName <> 'EconoSupplies Sales' and t4.ListName <> 'EconoSupplies Sales (EUR)'
    and DATEDIFF(DAY,GETDATE(),t3.DocDueDate) < case when datepart(WEEKDAY,getdate()) = 6 then 4 else 2 end group by t3.docnum,t0.docEntry,
    t3.Confirmed , t0.LineNum, t4.listname, DATEDIFF(DAY,GETDATE(),t3.DocDueDate) order by t0.DocEntry
    This returns a list of all the picks that I am interested in. I have changed the warehouse code for privacy.
    Next, we loop through each pick and extract the data:
    SELECT T1.[DocNum], T1.[DocEntry],T0.[LineNum],  T1.[CardCode],T0.[ItemCode], T0.[Dscription], T0.[OpenQty], (SELECT sum(s99
    .[OpenQty]) FROM RDR1 s99 WHERE s99.[DocEntry] = T0.[DocEntry] and  s99.[ItemCode] = T0.[ItemCode]) as 'TotalQty',T3.
    [OnHand] FROM RDR1 T0 INNER JOIN ORDR T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T0.ItemCode = T2.ItemCode INNER
    JOIN OITW T3 ON T0.ItemCode = T3.ItemCode and T0.WhsCode = T3.WhsCode WHERE T0.[WhsCode] = 'DSV' and  T3.[OnHand] > 0 and 
    T0.[OpenQty] > 0 and T2.InvntItem = 'y' and t0.docEntry =  <<<VB VARIABLE HERE>>>
    ORDER BY T1.[DocEntry], T0.[LineNum]
    These two sql commands are stored in a table and called from the VB code, for soft code re-usability.
    The SQL returns the results I am expecting, and I don't think the problem lies here.
    Here's the VB code:
            Dim PLIST As SAPbobsCOM.PickLists
            PLIST = GetDIConnection.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPickLists)
            Dim RS, RS1, RS2, RS12 As SAPbobsCOM.Recordset
            Dim i, ii As Integer
            RS = GetDIConnection.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            RS1 = GetDIConnection.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            RS12 = GetDIConnection.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            Dim WhsCode As String = GetCompanyNamedConfigValue("xxxxx", "xx")
            Dim SQLText As String
            Dim nErr, errMsg As String
            Dim DocDate As Date = Now
            Dim tempI As Integer = 1
            Dim executeBody As Boolean = True
            Dim ExecuteHead As Boolean = True
            Dim picklistcheck, picklistcheck1 As String
            Dim Type As String
            'CJB---- AUTO GENERATE PICK LIST-------------------------------------
            Dim OCHAPPCFGValue As String = GetAPPCFGEntry("GeneratePicks")
            If OCHAPPCFGValue = "Y" The
                Dim DocEntry, qty, docnum As Integer 'SO docentry & line qty
                Dim ItemCode As String ' Itemcode for SO line
                Dim price As Double
                Dim LineNum As Integer
                Dim OrderRs, ORderRs1 As SAPbobsCOM.Recordset
                Dim HashTable As New Hashtable
                Dim HashArray(2) As String
                OrderRs = GetDIConnection.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                ORderRs1 = GetDIConnection.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                Dim sqlstring1 As String = GetAPPCFGEntry("SQLSTRING1SOWMS03")
                Echo("Debug, sqlstring1: " & sqlstring1)
                OrderRs.DoQuery(sqlstring1) ' just assume the SQL brings back what I need
                Dim Attemptcount As Integer = 1
                'We now have the docEntries we need, so we loop through each docEntry and extract the lines
                Do Until OrderRs.EoF
                    DocEntry = OrderRs.Fields.Item("DocEntry").Value
                    EchoBanner("NEW RECORD, attempt count: " & Attemptcount)
                    Echo("DocEntry: " & DocEntry)
                    Dim sqlstringPart1, SqlStringPart2 As String
                    sqlstringPart1 = GetAPPCFGEntry("SQLSTRINGSOWMS03P1")
                    SqlStringPart2 = GetAPPCFGEntry("SQLSTRINGSOWMS03P2")
                    Dim sqlstring As String = sqlstringPart1 & " '" & DocEntry & "' " & SqlStringPart2
                    Echo("Debug: SOFT CODED SQL STRING FROM OCHAPPCFG FOR PICK LIST SELECTION CRITERIA:")
                    Echo(sqlstring)
                    ORderRs1.DoQuery(sqlstring)
                    If ORderRs1.RecordCount = 0 Then
                        'Error!
                        EchoBanner("No records found under docEntry: " & DocEntry)
                    End If
                    PLIST.PickDate = Today
                    PLIST.Name = "DSV Interface"
                    PLIST.OwnerCode = 1
                    Dim icount As Integer = 0
                    Dim onHand, TotalQty As Integer
                    Dim LineAdded As Boolean = False
                    Do Until ORderRs1.EoF
                        docnum = ORderRs1.Fields.Item("DocNum").Value
                        'PLIST.Lines.SetCurrentLine(icount)
                        ItemCode = ORderRs1.Fields.Item("ItemCode").Value
                        ' price = OrderRs1.Fields.Item("Price").Value
                        onHand = CInt(ORderRs1.Fields.Item("onHand").Value)
                        TotalQty = CInt(ORderRs1.Fields.Item("TotalQty").Value)
                        Echo("DocNum: " & docnum)
                        Echo("Debug: Onhand: " & onHand)
                        Echo("Debug: TotalQty: " & TotalQty)
                        If TotalQty > onHand Then
                            'WE CANNOT RAISE THIS PICK LIST, MORE REQUESTED THAN IN STOCK!
                            Echo("Unable to generate Pick List, not enough stock for item: " & ItemCode)
                            Exit Do
                        End If
                        PLIST.Lines.SetCurrentLine(icount)
                        Echo("Line set to " & icount)
                        PLIST.Lines.BaseObjectType = SAPbobsCOM.BoObjectTypes.oOrders
                        PLIST.Lines.OrderEntry = DocEntry
                        'CJB
                        LineNum = ORderRs1.Fields.Item("LineNum").Value
                        PLIST.Lines.OrderRowID = LineNum
                        'PLIST.Lines.ReleasedQuantity = OrderRs1.RecordCount ' quantity from the line in SO - OpenLineQty
                        PLIST.Lines.ReleasedQuantity = ORderRs1.Fields.Item("OpenQty").Value
                        '  PLIST.Lines.TaxCode = OrderRs1.Fields.Item("VatGroup").Value
                        Echo("Record count : " & ORderRs1.RecordCount)
                        Echo("Icount: " & icount)
                        Echo("Details...")
                        Echo("Debug: LineNum: " & LineNum)
                        Echo("Debug: DocNum: " & docnum)
                        Echo("Debug: ItemCode: " & ItemCode)
                        Echo("Debug: Released Quantity: " & PLIST.Lines.ReleasedQuantity)
                        Echo("Debug: Picked Quantity: " & PLIST.Lines.PickedQuantity)
                        Echo("Debug: OnHand: " & onHand)
                        Echo("Debug: PickDate: " & PLIST.PickDate)
                        PLIST.Lines.Add()
                        Echo("Pick List line added!")
                        icount += 1
                        ORderRs1.MoveNext()
                        LineAdded = True
                    Loop
                    ' OrderRs.DoQuery("select t0.absentry, t0.pickentry, t0.orderEntry, t1.DocEntry, t0.PickQtty from pkl1 t0 inner join ordr t1 on t0.OrderEntry = t1.DocEntry where t1.DocEntry = '" & DocEntry & "'"
                    ' If OrderRs.RecordCount = 0 Then
                    If LineAdded = True Then
                        Echo("Adding Pick List...")
                        Dim lretcode As Integer = PLIST.Add()
                        If lretcode = 0 Then
                            'success!
                            EchoBanner("Success")
                            Dim LastPickEntry As String = GetDIConnection.GetNewObjectKey()
                            Echo("Enitre Pick List created! See Pick & Pack -> Pick List in SAPB1")
                            Echo("Pick Entry: " & LastPickEntry)
                        Else
                            EchoBanner("ERROR! UNABLE TO GENERATE PICKLIST!!   " & GetDIConnection.GetLastErrorDescription)
                        End If
                    Else
                        Echo("NO LINES FOUND TO ADD TO THE PICK LIST!")
                        ' Err.Raise(vbObjectError, "SOWMS03, generate picklist", "Error creating PickList!  Error Description:  " & GetDIConnection.GetLastErrorDescription & "    Error Code: " & GetDIConnection.GetLastErrorCode)
                        'need a way of logging this error without jumping out of the loop.
                    End If
                    OrderRs.MoveNext()
                    Attemptcount += 1
                Loop

  • Help on Picking list (T Code - CO27)... VERY URGENT

    Hi all, anyone in here who has sound knowledge on picking list, if so kindly help me with this, its very urgent.
    Scenario:
    For an item in the Production order, the picking list is showing open qty = 0 & shortage = 0, while the item has already been picked. I am not able to understand why this line is still existing even after the pick.

    Vivek,
    I assume that you are looking at the materail document which was created for GI and communicating that indicator is set, you looked at the right place.
    But the resolution now is set this indicator directly in the order "Component overview" screen. You can see this indicator on the right side of the component record.
    Hope this helps....
    Regards,
    Prasobh

  • Create a Delivery note from a picking List and many binallocations

    Hi,
    Recently, I get how create a delivery note form a picking list with batchnumbers, but now I have the following case.
    Quantity       Product       SerialAndBatchNumbersBaseLine
    10                ID200                              0   
    5                  ID200                              1
    now I set the batchNumbers
    location    batchnumber       quantity
    02-A              XY                   10
    02-B              YY                    5    <---    this location give me error.
    now the rest of articles
    Quantity       Product       SerialAndBatchNumbersBaseLine
    10                ID200                              0   
    5                  ID200                              1
    location    batchnumber       quantity
    02-A              XY                   10
    02-B              XY                    5  
    etc.
    I get the next error:
    1470000344 - Batch "YY" of item "ID200" in bin location "3108" falls into negative inventory.
    When I find this "3108" this "select * from OBIN where AbsEntry = 3108" is the batchnumber for XY and not YY.
    so how is the way to create a delivery note with many binallocations? 
    (if required I will paste code.)
    Kind regards,
    Pablo

    Hi Pablo,
    based on the code from the other thread it should be like that for the first row:
    delivery.Lines.ItemCode = "ID200";
    delivery.Lines.Quantity = 15;
    delivery.Lines.BinAllocations.BinAbsEntry = 3107; // guessed AbsEntry
    delivery.Lines.BinAllocations.Quantity = 10;
    delivery.Lines.BinAllocations.SerialAndBatchNumbersBaseLine = 0;
    delivery.Lines.BinAllocations.Add();
    delivery.Lines.BinAllocations.BinAbsEntry = 3108;
    delivery.Lines.BinAllocations.Quantity = 5;
    delivery.Lines.BinAllocations.SerialAndBatchNumbersBaseLine = 1;
    delivery.Lines.BatchNumbers.Location = "02-A";
    delivery.Lines.BatchNumbers.BatchNumber = "XY";
    delivery.Lines.BatchNumbers.Quantity = 10;
    delivery.Lines.BatchNumbers.Add();
    delivery.Lines.BatchNumbers.Location = "02-B";
    delivery.Lines.BatchNumbers.BatchNumber = "YY";
    delivery.Lines.BatchNumbers.Quantity = 5;  
    You got now :
    1 Delivery Row, Quantity 15
    2 BinLoc Rows, Quantity 10+5
    2 Batch Rows, Quantity 10+5
    regards,
    Maik

  • Create Smart form for Pick list

    Hi,
    How do i start for creating a smart form for pick list.
    Regards
    Ajay

    hi
    refer this
    http://www.****************/Tutorials/Smartforms/PO/page1.htm
    Edited by: Swetha on Jul 10, 2008 6:15 PM

  • Can I create a pick-list of customised colors in Cap 5?

    Hi Folks I am using Cap 5.
    I am creating/updating a set of presentations. I can only use 5 specific colors as laid out in my employers brand guidelines.
    I would like to create these 5 colors and add them to the color pick list that appears for text animations, fonts etc. Ideally I would like to just pick them whenever I need them.
    At the moment every single time I need to use one of these 5 colors I have to enter in a hexdecimal number into tiny little fiddly field at the top of a color picker, EVERY - SINGLE - TIME.
    It is REALLY slowing me down and driving nuts. It feels like I am going about this in the wrong way.
    Can anyone point me in the right direction because I can't figure it out myself.
    Thanks
    M

    Hi M
    Unfortunately there simply isn't a way to do this in version 5. But having said that, I can think of a simple way that you might make things easy. Create an image that has a "color strip". It can be vertically or horizontally oriented. Insert this image on the first slide and configure it to run for the rest of the project.
    That may seem a bit odd, but here is how I envision it working. When you are dealing with almost anything color related in Captivate, you typically have a color picker eyedropper that may be used to set the color. Soooo, my thought here is that while editing, you could click the eyedropper and just choose the color to set it. And that should prove infinitely simpler than repeatedly typing the hex codes, no?
    Once editing was complete, you then delete the image.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Print a "Pull Sheet" or "Pick List" when Transfer Order Created

    How do I automatically print a "Pull Sheet" or "Pick List" upon creating a transfer order?
    Is this the same thing as going into LT31?

    Production Schedulling Profile - WM request are set to TR & TO automatically created on Release
    Goto IMG
    gotot Production >>> shop floor control>> Master data >> define Production scheduling profile.
    We can see screen
    we can define
    in transport
    WM request
    options available
      No creation of transfer requirements on order release
    X  Only creation of transfer requirements on release
    1  Transfer requirement and transfer order on release
    Please tell me if u face any problem
    Sunil Singh

  • To create a sample pick list showing the position of Bar codes

    Dear All,
    I need some guidance to create a sample pick list for Print. Its a bar-code printing with a shipment number which can be scanned for generating the pick lists. Tried still not able to create the sample pick list.
    Regards,

    Hi Ramesh,
    To be more clear on this here is the scenario: -
    The Shippers have to key in all shipment numbers two times on UPS, LTL, & TRUCKLOADS.  They have to key in the shipment numbers two times: - First to physically pull the units and then after all the units are pulled, they have to key in the shipment number again to get the packing or picking list to print.
    To avoid this above process: -
    If we could get the shipment number in a bar-code on the pick ticket above or beside the  CURRENT HUMAN READABLE NUMBER So that the shipment number can be scanned instead of keying in again.
    For this scenario I want to create a pick list showing the position of the Bar-code after I change the printing logic through a smartform. For this I wanted to create a pick list to make the end user have a better visibility. Basically I want to create some test data. Any clues on this.
    Regards,
    Edited by: SAURYASEN on Sep 15, 2010 12:26 PM

  • Error in Picking List (T-Code - CO27) - Urgent help pls

    Hi all,
    Situation-
       A work order has been released & the item for it has been made available using the picking list (CO27). However when i check the picking list again, the same item is still showing, but the Open Qty & Shortage fields show 0. I am not able to figure out how the item is still seen despite me picking it.
       When i select the line & click status, in the Business Processes tab, Release Component has a red indicator & says Error - BS 013 (System status REL is active), is this causing the problem & if yes how can i rectify it.
       Solutions please......

    Hi Aaron,
      Apologies for the delayed reply. I would like to inform you i am not a ABAPer so i dont know if what i did would be of benefit to you. But what actually had happened was the FI indicator was not ticked in the order & this was causing that error. This indicator i got to know is ticked automatically when the issual is done, but due to certain circumstances it might not be ticked, this happens due to some manual intervention is what i was made understood. I hope this was of some help to you. But i would say, it is better that u open a new thread & ask the experts for their view-point.
    Regards,
    Vivek

  • Delivery Notes Generation Via Pick List

    Am trying to generate delivery notes off pick tickets and i can't find any code example. I now came up with the following code but am having issues when items are in multiple Bin Locations.
    Public Sub Sales2Delivery() '(ByVal OrderID As String)
            Dim OrderID As String = ""
            Try
                Using connection As New SqlConnection(StaginConn)
                    'Dim command As New SqlCommand("SELECT DocEntry from ORDR with (nolock) WHERE NumAtCard = '" & OrderID & "'", connection)
                    Dim command As New SqlCommand("SET DATEFORMAT DMY; select distinct top 5 o.DocEntry, o.NumAtCard from ordr O with (nolock) join RDR1 R with (nolock) on R.DocEntry = O.DocEntry join OPKL P with (nolock) on P.AbsEntry = R.PickIdNo where u_shipstate = 'Delivered' and CAST(O.docdate as date) >= '30/04/2014' and P.Status = 'Y';", connection)
                    connection.Open()
                    Dim reader As SqlDataReader = command.ExecuteReader()
                    ' Call Read before accessing data.
                    While reader.Read()
                        Dim BusinessOrders As Documents = DirectCast(vCompany.GetBusinessObject(BoObjectTypes.oOrders), Documents)
                        Dim BusinessDelivery As Documents = DirectCast(vCompany.GetBusinessObject(BoObjectTypes.oDeliveryNotes), Documents)
                        Dim orders As Documents = BusinessOrders
                        orders.GetByKey(Convert.ToInt32(reader(0)))
                        OrderID = Convert.ToString(reader(1))
                        Dim Delivery As Documents = BusinessDelivery
                        Delivery.CardCode = orders.CardCode
                        Delivery.CardName = orders.CardName
                        Delivery.NumAtCard = orders.NumAtCard
                        'Delivery.DocNum = orders.DocNum
                        Delivery.HandWritten = BoYesNoEnum.tNO
                        Delivery.Series = 8
                        Delivery.DocDate = DateTime.Today
                        Delivery.DocDueDate = DateTime.Today
                        Delivery.TaxDate = DateTime.Today
                        Delivery.Address = orders.Address
                        Delivery.Address2 = orders.Address2
                        Delivery.Comments = "Based on Sales Order #" + orders.NumAtCard & "."
                        Delivery.DocCurrency = orders.DocCurrency
                        Delivery.DocDueDate = orders.DocDueDate
                        Delivery.DocObjectCode = SAPbobsCOM.BoObjectTypes.oDeliveryNotes
                        Delivery.ShipToCode = orders.ShipToCode
                        Dim lines As Document_Lines = orders.Lines
                        'If (count > 0) Then
                        '    lines.Add()
                        '    lines.SetCurrentLine((lines.Count - 1))
                        'End If
                        Dim oPickList As PickLists = DirectCast(vCompany.GetBusinessObject(BoObjectTypes.oPickLists), PickLists)
                        oPickList.GetByKey(orders.Lines.PickListIdNumber)
                        For i As Int32 = 0 To (lines.Count - 1)
                            If i > 0 Then
                                Delivery.Lines.Add()
                                Delivery.Lines.SetCurrentLine(i)
                            End If
                            ' Set the Current Lines on the order
                            orders.Lines.SetCurrentLine(i)
                            Try
                                oPickList.Lines.SetCurrentLine(i)
                                Delivery.Lines.BaseEntry = oPickList.Lines.OrderEntry
                                Delivery.Lines.BaseLine = oPickList.Lines.OrderRowID
                                Delivery.Lines.Quantity = oPickList.Lines.PickedQuantity
                                Delivery.Lines.BaseType = DirectCast(SAPbobsCOM.BoObjectTypes.oOrders, Integer)
                                Delivery.Lines.BinAllocations.BinAbsEntry = oPickList.Lines.BinAllocations.BinAbsEntry
                                Dim rs As SAPbobsCOM.Recordset = vCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                rs.DoQuery("select itemcode, price, dscription from RDR1 R where R.LineNum = " & oPickList.Lines.OrderRowID & " and R.PickIdNo = " & oPickList.Lines.AbsoluteEntry)
                                While (rs.EoF <> True)
                                    Delivery.Lines.ItemCode = rs.Fields.Item(0).Value.ToString 'orders.Lines.ItemCode
                                    Delivery.Lines.UnitPrice = CType(rs.Fields.Item(1).Value.ToString, Double) 'orders.Lines.UnitPrice
                                    Delivery.Lines.ItemDescription = rs.Fields.Item(2).Value.ToString 'orders.Lines.ItemDescription
                                    rs.MoveNext()
                                End While
                                rs = Nothing
                            Catch ex As Exception
                                Continue For
                                My.Computer.FileSystem.WriteAllText(_LogPath, ErrDetails.ToString, True)
                            End Try
                        Next
                        If Delivery.Add() <> 0 Then
                            ErrDetails.AppendLine(" Unable to create Delivery note for Order: " & OrderID & " <br /> " & vCompany.GetLastErrorCode() & ":" & vCompany.GetLastErrorDescription())
                        Else
                            ErrDetails.AppendLine("Successfully created Delivery note for Order:" & OrderID) ' & " as requested by " & UserEmail & ".")
                        End If
                        orders = Nothing
                        Delivery = Nothing
                        BusinessOrders = Nothing
                        BusinessDelivery = Nothing
                        My.Computer.FileSystem.WriteAllText(_LogPath, ErrDetails.ToString, True)
                    End While
                    'orders = Nothing
                    'BusinessOrders = Nothing
                End Using
            Catch ex As Exception
                ErrDetails.AppendLine(" Error generating Delivery note for Order: " & OrderID & " <br /> " & ex.ToString())
                My.Computer.FileSystem.WriteAllText(_LogPath, ErrDetails.ToString, True)
            Finally
                If Not String.IsNullOrWhiteSpace(ErrDetails.ToString) Then
                    My.Computer.FileSystem.WriteAllText(_LogPath, (ChrW(13) & ChrW(10) & ChrW(13) & ChrW(10) & "Errors encountered while registering data on " & System.DateTime.Now.ToString("F") & ".Errors:" & ChrW(13) & ChrW(10) & Me.ErrDetails.ToString), True)
                Else
                    My.Computer.FileSystem.WriteAllText(_LogPath, (ChrW(13) & ChrW(10) & ChrW(13) & ChrW(10) & "Application Ran successfully on " & System.DateTime.Now.ToString("F") & "."), True)
                End If
            End Try
        End Sub
    The Error message am getting is 1470000368 - The quantity allocated to bin locations must be positive.

    Am getting this error now is
    "1470000341 - Fully allocate item "1017494" to bin locations in warehouse "Isolo". Issue is we have items in multiple Bin locations and the items have been picked via the pick ticket. Is it also possible to generate the delivery note off the Pick List.
    The new code am using is
        Public Sub Sales2Delivery() '(ByVal OrderID As String)
            Dim OrderID As String = ""
            Try
                Using connection As New SqlConnection(StaginConn)
                    'Dim command As New SqlCommand("SELECT DocEntry from ORDR with (nolock) WHERE NumAtCard = '" & OrderID & "'", connection)
                    Dim command As New SqlCommand("SET DATEFORMAT DMY; select distinct top 5 o.DocEntry, o.NumAtCard from ordr O with (nolock) join RDR1 R with (nolock) on R.DocEntry = O.DocEntry join OPKL P with (nolock) on P.AbsEntry = R.PickIdNo where u_shipstate = 'Delivered' and CAST(O.docdate as date) >= '30/04/2014' and P.Status = 'Y' and o.DocStatus = 'O';", connection)
                    connection.Open()
                    Dim reader As SqlDataReader = command.ExecuteReader()
                    ' Call Read before accessing data.
                    While reader.Read()
                        Dim BusinessOrders As Documents = DirectCast(vCompany.GetBusinessObject(BoObjectTypes.oOrders), Documents)
                        Dim BusinessDelivery As Documents = DirectCast(vCompany.GetBusinessObject(BoObjectTypes.oDeliveryNotes), Documents)
                        Dim orders As Documents = BusinessOrders
                        orders.GetByKey(Convert.ToInt32(reader(0)))
                        OrderID = Convert.ToString(reader(1))
                        Dim Delivery As Documents = BusinessDelivery
                        Delivery.CardCode = orders.CardCode
                        Delivery.CardName = orders.CardName
                        Delivery.NumAtCard = orders.NumAtCard
                        'Delivery.DocNum = orders.DocNum
                        Delivery.HandWritten = BoYesNoEnum.tNO
                        'Delivery.Series = 8
                        Delivery.DocDate = DateTime.Today
                        Delivery.DocDueDate = DateTime.Today
                        Delivery.TaxDate = DateTime.Today
                        Delivery.Address = orders.Address
                        Delivery.Address2 = orders.Address2
                        Delivery.Comments = "Based on Sales Order #" + orders.NumAtCard & "."
                        Delivery.DocCurrency = orders.DocCurrency
                        Delivery.DocDueDate = orders.DocDueDate
                        Delivery.DocObjectCode = SAPbobsCOM.BoObjectTypes.oDeliveryNotes
                        Delivery.ShipToCode = orders.ShipToCode
                        Dim lines As Document_Lines = orders.Lines
                        'If (count > 0) Then
                        '    lines.Add()
                        '    lines.SetCurrentLine((lines.Count - 1))
                        'End If
                        Dim oPickList As PickLists = DirectCast(vCompany.GetBusinessObject(BoObjectTypes.oPickLists), PickLists)
                        oPickList.GetByKey(orders.Lines.PickListIdNumber)
                        For i As Int32 = 0 To (lines.Count - 1)
                            If i > 0 Then
                                Delivery.Lines.Add()
                                Delivery.Lines.SetCurrentLine(i)
                            End If
                            ' Set the Current Lines on the order
                            orders.Lines.SetCurrentLine(i)
                            Try
                                oPickList.Lines.SetCurrentLine(i)
                                Delivery.Lines.BaseEntry = oPickList.Lines.OrderEntry
                                Delivery.Lines.BaseLine = oPickList.Lines.OrderRowID
                                Delivery.Lines.Quantity = oPickList.Lines.PickedQuantity
                                Delivery.Lines.BaseType = DirectCast(SAPbobsCOM.BoObjectTypes.oOrders, Integer)
                                'Dim rs As SAPbobsCOM.Recordset = vCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                'rs.DoQuery("select itemcode, price, dscription from RDR1 R where R.LineNum = " & oPickList.Lines.OrderRowID & " and R.PickIdNo = " & oPickList.Lines.AbsoluteEntry)
                                'While (rs.EoF <> True)
                                Delivery.Lines.ItemCode = orders.Lines.ItemCode
                                Delivery.Lines.UnitPrice = orders.Lines.UnitPrice
                                Delivery.Lines.ItemDescription = orders.Lines.ItemDescription
                                '            rs.MoveNext()
                                '            End While
                                'rs = Nothing
                            Catch ex As Exception
                Continue For
                My.Computer.FileSystem.WriteAllText(_LogPath, ErrDetails.ToString, True)
            End Try
                        Next
                        If Delivery.Add() <> 0 Then
                            ErrDetails.AppendLine(" Unable to create Delivery note for Order: " & OrderID & " <br /> " & vCompany.GetLastErrorCode() & ":" & vCompany.GetLastErrorDescription())
                        Else
                            ErrDetails.AppendLine("Successfully created Delivery note for Order:" & OrderID) ' & " as requested by " & UserEmail & ".")
                        End If
                        orders = Nothing
                        Delivery = Nothing
                        BusinessOrders = Nothing
                        BusinessDelivery = Nothing
                        My.Computer.FileSystem.WriteAllText(_LogPath, ErrDetails.ToString, True)
                    End While
                    'orders = Nothing
                    'BusinessOrders = Nothing
                End Using
            Catch ex As Exception
                ErrDetails.AppendLine(" Error generating Delivery note for Order: " & OrderID & " <br /> " & ex.ToString())
                My.Computer.FileSystem.WriteAllText(_LogPath, ErrDetails.ToString, True)
            Finally
                If Not String.IsNullOrWhiteSpace(ErrDetails.ToString) Then
                    My.Computer.FileSystem.WriteAllText(_LogPath, (ChrW(13) & ChrW(10) & ChrW(13) & ChrW(10) & "Errors encountered while registering data on " & System.DateTime.Now.ToString("F") & ".Errors:" & ChrW(13) & ChrW(10) & Me.ErrDetails.ToString), True)
                Else
                    My.Computer.FileSystem.WriteAllText(_LogPath, (ChrW(13) & ChrW(10) & ChrW(13) & ChrW(10) & "Application Ran successfully on " & System.DateTime.Now.ToString("F") & "."), True)
                End If
            End Try
        End Sub

  • BW Hierarchies sometimes not showing as pick list

    Hi,
    we have created a Crystal Report that uses a parameter that should be picked from a BW hierarchy (a cost center group). We created the report and published it via the BW publisher to BO and then included it with an iView in the BW Portal.
    Now when I log on to the portal and call the report, I'm presented with the static pick list (top 200 values) most of the time instead of the hierarchy view (as described in http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsandBWquery+elements in the lower part of the article)
    When I then log on to the CMC and call the report there, I first get the flat list, too, but when I call the report 2 or 3 times, I get the hierarchy view. When I now go back to the BW Portal, I get thet hierarchy view there as well...
    any idea what causes this issue? How can I influence which selection screen is being displayed? (particularly as I don't want everyone to have to log on to CMC first...)
    Thanks...

    Hi Duncan,
    thank you for your reply. It's really sort of tricky.
    After the pick list is up and ready once, It'll be shown fine from that point on until, I assume, my CMC login expires.
    So maybe it's some permission problem?
    I just tested the following:
    <ul>
    <li>log into portal, call report -> flat list
    <li>log into CMC -> call report (does not have to be the same, just has to have a hierarchy pick list, a simple report does not do the trick) -> check that it has the hierarchy pick list
    <li>go back to the portal, call the report again -> hierarchy pick list comes up ok
    <li>log off from CMC
    <li>go back to the portal, call the report again -> flat list again...
    </ul>
    the whole thing works the same when I replace CMC by InfoView. The strange thing is that I have to log in to Infoview the first time I call the report from the portal (even though we have SAP credentials in BO), but this does not seem to be sufficient. I have to call one of the reports in Infoview or CMC first to make it work from the portal.
    Concerning the trace, I'll have to look into this together with our sysadmins, but I'll see what I can get.
    Thanks again for your ideas,
    cheers
    MU

Maybe you are looking for

  • Apple unable to deliver my first iMac !

    This is quite a bad first impression. After having been convinced by an Ipod Touch, I decided to become a switcher (and thus start a process that would have kicked out all windows based PC from our house) and ordered a promising iMac 27 i7 with 1To a

  • Sap Script To OTF

    Hi Experts, I am trying to convert a script to pdf data. In the open_form I set getotf = 'X' and in the close form , i get the OTf data. I convert this otf to pdf data. In the pdf output, I only have the static fields and no data.Though the number of

  • Dual boot with archlinux and windows issue

    Hi again! This is what i did from the beginning : windows was already installed and then i installed archlinux after shrinking the windows partition . I made a partition for boot , one for swap and one for root(i wanted to do for home too , but only

  • How do i retrieve my digital booklets for albums?

    When I copied my iTunes Library from my PC to my Mac Book Pro (Maverick), I lost all of the digital booklets for my albums purchased from the iTunes store in the past. Anyone know if I can get them back? Are they possibly hidden somewhere else on a M

  • Reformated system, can't get iphoto to take my pictures back

    I had to reformate my harddisk. I put back on original systems disk with updates and just got done putting on Tiger again. I updated software but everytime I try to put pictures back in iphoto it says the pictures are a newer version and can't be imp