How to issue Multiple Batch Items to subcontactor

Hi,
I am facing problem at issuing the batch managed material to subcontractor, suppose I have to issue 20 kg of material xxxxx to subcontractor, but we have two batches aaa qty 10 kg and bbb qty 10 kg, but system is not getting batches automatically at MB1B-541, and we have to enter two lines at mb1b manually for batches aaa and bbb.
Please suggest how system should get batches automatically on the basis of shelf life expiration date.
Regards
Rajeev Gupta

Hi,
You should define the batch search strategy and condition for batch determination while movement types.
Refer the below configuration doc it will help you..
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0caed4a-40f9-2c10-349a-96ec617a8161?overridelayout=t…

Similar Messages

  • How to insert multiple line items in fv60 using bdc.

    Hi all,
          How to insert multiple line items in fv60 using bdcs

    hi
    chk this
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    DATA : IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : V_EBELP(30) , V_MENGE(30) , V_WERKS(30), V_EMATN(30) ,
    V_PEINH(30).
    DATA : FILE TYPE STRING, V_MSG(100) , V_IND(2) TYPE N , FLAG VALUE 'X'.
    PARAMETERS: P_FILE(50) TYPE C DEFAULT 'C:\ME21_TEST'.
    DATA : BEGIN OF ITAB OCCURS 0,
            IND(02),
            LIFNR_001(010),
    data element: BSART
            BSART_002(004),
    data element: BEDAT
    data element: EKORG
            EKORG_004(004),
            EKGRP_006(003),
    data element: LPEIN
            LPEIN_005(001),
    data element: EMATNR
            EMATN_01_007(018),
    data element: EWERK
            WERKS_01_008(004),
    data element: EPEIN
            PEINH_01_009(006),
    data element: EWERK
           MENGE_01_013(017),
    data element: AUFEP
            EBELP_014(005),
    data element: AUFEP
         END OF ITAB.
    START-OF-SELECTION.
    FILE = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FILE
        FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                      = ITAB
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    SORT ITAB BY IND.
    START-OF-SELECTION.
    LOOP AT ITAB.
    REFRESH IT_MESSAGES.
    <b>V_IND = V_IND + 1.</b>
    <b>AT NEW IND.</b>
    <b>READ TABLE ITAB INDEX SY-TABIX.</b>
    PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0100'.
    PERFORM BDC_FIELD       USING 'EKKO-LIFNR'
                                  ITAB-LIFNR_001.
    PERFORM BDC_FIELD       USING 'RM06E-BSART'
                                  ITAB-BSART_002.
    *perform bdc_field       using 'RM06E-BEDAT'
                                 ITAB-BEDAT_003.
    PERFORM BDC_FIELD       USING 'EKKO-EKORG'
                                  ITAB-EKORG_004.
    PERFORM BDC_FIELD       USING 'RM06E-LPEIN'
                                  ITAB-LPEIN_005.
    PERFORM BDC_FIELD       USING 'EKKO-EKGRP'
                                  ITAB-EKGRP_006.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    ENDAT.
    <b>PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0120'.
    CONCATENATE 'EKPO-EMATN(' V_IND ')' INTO V_EMATN.
    PERFORM BDC_FIELD       USING  V_EMATN
                                   ITAB-EMATN_01_007.
    CONCATENATE 'EKPO-WERKS(' V_IND ')' INTO V_WERKS.
    PERFORM BDC_FIELD       USING  V_WERKS
                                   ITAB-WERKS_01_008.
    CONCATENATE 'EKPO-PEINH(' V_IND ')' INTO V_PEINH.
    PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0120'.
    PERFORM BDC_FIELD       USING  V_PEINH
                                   ITAB-PEINH_01_009.
    *CONCATENATE 'EKPO-MENGE(' V_IND ')' INTO V_MENGE.
    *perform bdc_dynpro      using 'SAPMM06E' '0120'.
    *perform bdc_field       using  V_MENGE
                                  ITAB-MENGE_01_013.
    *CONCATENATE 'EKPO-EBELP(' V_IND ')' INTO V_EBELP.
    PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0120'.
    PERFORM BDC_FIELD       USING  'RM06E-EBELP'
                                   ITAB-EBELP_014.</b>PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    AT END OF IND.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '=BU'.
    ENDAT.
    CALL TRANSACTION 'ME21' USING IT_BDCDATA MODE 'A'
                                             UPDATE 'S'
                                        MESSAGES INTO IT_MESSAGES.
       LOOP AT IT_MESSAGES WHERE MSGTYP = 'E' OR MSGTYP = 'A'.
         IF FLAG = 'X'.
         CALL FUNCTION 'BDC_OPEN_GROUP'
         EXPORTING
            CLIENT                    = SY-MANDT
           DEST                      = FILLER8
            GROUP                     = 'GAMY_FAILURE'
           HOLDDATE                  = FILLER8
            KEEP                      = 'X'
            USER                      = SY-UNAME
           RECORD                    = FILLER1
           PROG                      = SY-CPROG
         IMPORTING
           QID                       =
          EXCEPTIONS
            CLIENT_INVALID            = 1
            DESTINATION_INVALID       = 2
            GROUP_INVALID             = 3
            GROUP_IS_LOCKED           = 4
            HOLDDATE_INVALID          = 5
            INTERNAL_ERROR            = 6
            QUEUE_ERROR               = 7
            RUNNING                   = 8
            SYSTEM_LOCK_ERROR         = 9
            USER_INVALID              = 10
            OTHERS                    = 11
         IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
         CLEAR FLAG.
         ENDIF.
         CALL FUNCTION 'BDC_INSERT'
          EXPORTING
            TCODE                  = 'ME21'
           POST_LOCAL             = NOVBLOCAL
           PRINTING               = NOPRINT
           SIMUBATCH              = ' '
           CTUPARAMS              = ' '
           TABLES
             DYNPROTAB              = IT_BDCDATA
          EXCEPTIONS
            INTERNAL_ERROR         = 1
            NOT_OPEN               = 2
            QUEUE_ERROR            = 3
            TCODE_INVALID          = 4
            PRINTING_INVALID       = 5
            POSTING_INVALID        = 6
            OTHERS                 = 7
         IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
        ENDIF.
    CALL FUNCTION 'FORMAT_MESSAGE'
      EXPORTING
        ID              = IT_MESSAGES-MSGID
        LANG            = 'EN'
        NO              = IT_MESSAGES-MSGNR
        V1              = IT_MESSAGES-MSGV1
        V2              = IT_MESSAGES-MSGV2
        V3              = IT_MESSAGES-MSGV3
        V4              = IT_MESSAGES-MSGV4
      IMPORTING
        MSG             = V_MSG
      EXCEPTIONS
        NOT_FOUND       = 1
        OTHERS          = 2
       WRITE : / V_MSG.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDLOOP.
       ENDLOOP.
    IF FLAG NE 'X'.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
       EXCEPTIONS
         NOT_OPEN          = 1
         QUEUE_ERROR       = 2
         OTHERS            = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      ENDIF.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM  = PROGRAM.
      IT_BDCDATA-DYNPRO   = DYNPRO.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND IT_BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
        CLEAR IT_BDCDATA.
        IT_BDCDATA-FNAM = FNAM.
        IT_BDCDATA-FVAL = FVAL.
        APPEND IT_BDCDATA.

  • Workflow - how to update multiple list items

    Is it possible to update up to 3 list items with the same information using a workflow?  My scenario is where a company vehicle (registration number) has up to three drivers assigned to it - Driver Name 1, Driver Name 2 and Driver Name 3.   I
    have two separate lists - one for vehicles (fleet list) and one for drivers (driver database).  In my workflow when an item is created or changed in the fleet list, I would like the current vehicle registration to be updated in all three driver records
    in the driver database.  I am not sure if I can do this as I am unsure of what my unique look up would be as I need to be able to tie a vehicle registration to a driver name. Any advice would be much appreciated.
    Thanks

    Hi,
    Refer to the following threads about how to update multiple list items simultaneously.
    http://social.technet.microsoft.com/Forums/en-US/936d05ba-6e86-4f44-bbdb-b3c5c12b2c68/how-do-i-update-multiple-list-items-at-once-in-a-sharepoint-list
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/2d342b01-1978-40c9-a203-303d145b331e/how-to-update-mulitple-list-items-at-same-time
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8d5b7424-58dc-470b-8142-90755dbdeaae/sharepoint-workflow-change-multiple-items-in-other-list
    Thanks.
    Tracy Cai
    TechNet Community Support

  • How to assign multiple batch class to material in classification view

    Dear Gurus,
    How to assign multiple batch class to material in classification view.
    plz explain what are the procedure and what are the configuration required before assignment.
    Thanks
    Mani

    OK, Thanks for your reply.
    Regards
    Mani

  • Issue multiple batches

    Hi
    How to avoid issue of multiple batches of component during back flush.
    Regards
    Sandeep

    DO MB1B transaction, with Movement type 541,
    Enter the material with different Batches for required qty. as different line items.
    e.g
    line item 1 : mat X Batch 1 50 nos
    line item 2 :  mat X Batch 2 40 nos
    line item 3 :  mat X Batch 3 10 nos
    line item 4: mat Y Batch 6 10 nos
    line item 5 :  mat Y Batch 7 10 nos
    line item 6 :  mat Y Batch 8 10 nos
    Edited by: sudhansu satapathy on Oct 21, 2011 7:29 PM

  • LSMW - ME21 How to map multiple line items

    Hi all,
    I am using LSMW tool with batch input recording technique to create POs via ME21. I have defined source structures as HEAD with POSI as its subordianted structure. This settings worked perfectly for one single item line. However, it created a new transaction for each line item in the file. I did some searches in this forum and I noticed that someone suggested to dynamically set the line positon at the processing points. I tried a few times and could not get it work. Anyone knows how to map multiple items in LSMW, please help.
    Here is part of my recording:
    EKPO-EMATN(01)                 000995NM
    EKPO-MENGE(01)                                 1      RM06E-EEIND(01)                2006.04.27             EKPO-NETPR(01)                             10         EKPO-WERKS(01)                 0001                   EKPO-LGORT(01)                 0001      
    My input file looks like this:
    H  77777400  NB2006.05.140001001T
    L000995NM00000000052006.05.15         1000010001CAON
    L000998NM00000000052006.05.15         1000010001CAON
    H  77777400  NB2006.05.140001001T
    L000995NM00000000052006.05.15         1000010001CAON
    Thanks!

    Hi
    If you have used a b.i. recording, all abap code is inserted in std table /SAPDMC/LSGBDC.
    The program to generate the B.I. session is automatically created when you run "Create Batch Input Session" step.
    What means the numbers of items you can insert depend on the totals of items you have used while creating your b.i. recording:
    If you have simulated to insert only one item, you'll be able to insert only one item in your project.
    So you should simulate to insert severals items not only one, but I think it should be better you use a std method to create PO by LSMW:
    - Std B.I: object 0085, method 0001 (RM06EEI0);
    - BAPI   : object BUS2012, method CREATEFROMDATA1
    Max

  • How to Update multiple line Items in Sales order Interactive form

    Hi,
            I have created one online interactive form for sales order. In that I incorporated dynamic table logic .i.e. we can add row and delete row using buttons. Interactive form is working fine with one line item. But if I give multiple lines in table (line item) its creating sales order with single line item. So please help me how to pass multiple lines.
    Thanks & Regards,
    Krishna.

    Hi,
    Check out this link, this deals with the problem you are facing.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/802f0ed1-a17a-2c10-7db4-d515a5b047ed
    Regards,
    Runal

  • SNC5.1- How to Publish multiple line items in SNC Web UI (Supplier view)

    Hi Experts,
    I am working in SAP SNC Supplier Collaboration project. I have a scenario where i am trying to "Publish PO" for multiple line items in Web UI. I am able to confirm each PO line item and Save PO. But if i try to publish one line item at a time, then the system publishes the 1st line item and it does not allow me to publish the remaining PO line items.
    All i can do is, Confirm and Save all line items, and then "publish" it at the end. In this way,i can view all the confirmed line items (POA) in SNC. But how do I Confirm/Save/Publish each PO line item?
    Appreciate your help.
    Regards,
    dmohite

    Hi dmohite,
    As the POC standard process Supplier should give confirmation for all PO items after confirmation of all items it should allow to Published the PO at Header level.
    If supplier does not give confirmation for all items it should not allowed to Published the PO at Header level but you are able Published the PO at header level without confirmation of all PO items.
    You can implement note no: 1320445 (manual implementation is required).
    After implementation of this note without confirmation of all PO items it won't allow to publish the PO at header level.
    Please let me know for any clarification.
    Regards,
    Nikhil

  • How to handle multiple line items in lsmw

    hi all,
    how can i handle multiple line items in lsmw either by using direct input method or BDC recording.
    first preference is Bdc recording in lsmw . can u tell me the steps in detail.
    thanks,
    harini.c

    Hi Harini,
    Check this link.
    BDC - Header with multiple line items.
    Regards,
    Arun

  • How to Create multiple line items

    Hi
    I have created a web dynpro application that accesses BAPI_REQUISITION_CREATE to create a requisition. The application so far creates a requisition with only one line item.
    How do I capture details about multiple line items from the user before submitting the form to create the requisition.
    Thanks in advance for your help.
    Sriram

    Hi Sriram,
        Create a form where u enter the requisition details of one line item.Suppose say if u have a button Add another Line Item on click of that fill  a value node say
    RequsitionDetails  of cardinality 0-n and clear the form.If u want u can also show the added item in  a table  below by bindin the data source to RequistionDetails. Now the user can enter another line item in the form.Similarly now he can enter multiple line items.On click of Submit u submit the records in the RequistionDetails node.Add all these records to the table parameter which u r passing.
    BAPI_REQUISITION_CREATE_Input input = new BAPI_REQUISITION_CREATE_Input();
    wdContext.node<<>>.bind(input);
    for(int index=0;index<wdContex.nodeRequsitionDetails().size();index++)
    zTestStruc test = new zTestStruc();
    test.setattr1(wdContex.nodeRequsitionDetails().getRequsitionElementAt(index).getattr1());
    input.add<<>>(test);
    Hope this solves.
    Regards,
    Sowjanya.

  • Automator: How to reveal multiple Finder items in 1 Finder window?

    Just as the subject states. How do I use Automator to reveal multiple Finder items in a single Finder window?
    Thanks in advance!

    Allow me to also briefly explain what I'm trying to do. For some reason Spotlight does not index the Library folder by default. I'm trying to create a workflow app which allows me to do this at will.
    So far upon experimenting I can get it to kind of work with the following actions...
    Text > Ask for Text (as in "What would you like to search for in the Library folder?")
    Utilities > Spotlight (executes the search based on the input from the first action)
    Files & Folders > Reveal Finder Items (reveals the results of the search, but in a separate Finder window for each result)
    My goal is to aggregate the results and display them in a single Finder window if possible.
    Thanks

  • How to Print Multiple line items(only the one's that are selected in va22)

    Hello All ,
    My smartform should print the multiple selected line items that i as a user should be able to see as the output .
    In my case i dont have any program that calls the transaction va22
    directly from the transaction VA22 i give the ISSUE OUTPUT TO .
    The Driver program that calls my smartforms fetches the data from table VBAP .
    Two cases that i get because of this fetching logic .
    1. When i try to fetch the data based on only VBELN in the output i get all the items that are in the particular Quotation .
    2 . When i try to fetch data based on VBELN and POSNR in the ouptut when i select multiple items and give print the first item that i i selected is displayed .
    Now what i need is to print only those data that i select in VA22 .
    say if there are items A, B , C, D ,E  in the Quotation .
    and before printing i select A , C , D then only those items should be printed .
    I hope any one  of the Experts  can solve my problem .
    Thanks & Regards
    Faran

    Hi
    I think you will need to do some enhancemwnt for this. What you can do select the lines in table comtrol and before issuing output you need to find a suitable wnhancement place where you can export the selected lines and make the corresponding change in logic for the same?.
    Secondly uou can make a custom report also where user will select lines of po and print..but in this way you will need to many calculations
    Nabheet

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

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

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

  • How to insert multiple list item as separate records

    I have a form with a list field in which user can select
    multiple item <select multiple="multiple"><option
    value></option></select>. My problem is that I don't
    know how to do an insert sql operation that puts every selected
    item on the list field into a separate record in a database table.
    I think that first I should get it to know how many item was
    selected from the list, than write the insert into statement
    between loop tags which loops the operation until every item has
    inserted. I'm not sure about it and even if I'm right, I don't know
    how to code it. Could someone show me a sample code for such a
    "problem"?

    quote:
    Originally posted by:
    Newsgroup User
    The ScareCrow wrote:
    uh, depending on the db (say it's sql server) you might want
    to swap the loop &
    cfquery to make that one big insert rather than a bunch of
    cfqueries.
    The following approach will work with just about any db and
    only uses once connection
    <cfquery>
    insert into sometable
    (field1, field2, etc)
    <cfloop list = "#somelist#" item = "thisitem">
    select distinct #thisitem#, 'something else', etc
    from some_small_table
    <cfif listfind(somelist, thisitem) lt
    listlen(somelist)>
    union
    </cfif>
    </cfloop>
    </cfquery>

  • How to remove MULTIPLE sidebar items from finder?

    I accidentally dragged about 1,000 folders into my finder sidbar. Crap. I'd really like to get rid of them quickly and not have to drag them out one at a time. Any ideas? I tried trashing the com.apple.sidebarlists.plist but it didn't do the trick.

    Thanks Tony. This helped me figure out the problem!
    I have Path Finder installed and it turns out that the Path Finder plist was also storing the sidebar items. If I just trashed the finder and sidebar plists, the Path Finder plist would automatically repopulate the items. Trashing all three plists at the same time with Path Finder closed then relaunching Finder solved the issue!
    Thanks again, that was a clever trick.

Maybe you are looking for