Procurement Confirmation Wizard Order of Lines

Hi,
I have a problem in SAP B1 8.81 whith Procurement Confirmation Wizard.
When  I create a Purchase Order from a Sales Order the order of lines don't be respected.
Thanks for your help
Marco

Yes, the order of lines in Purchase Order is not  the same of the  Sales Order.
It happens for more than one document.
The select  from Sales order
LineNum;  VisOrder;   ItemCode;    BaseLine
0;0;6458009524;NULL
1;2;0334014190;NULL
2;3;0252207412;NULL
3;4;0542943200;NULL
4;5; 6458013069;NULL
5;9;0542943200;NULL
6;10; 0580164220;NULL
7;1;6458009512;NULL
8;8;6458013069;NULL
9;6;0542943200;NULL
10;7;0580164220;NULL
The select  from Purchase order
LineNum;  VisOrder;   ItemCode;    BaseLine
0;     0;     6458009524;     0
1;     1;     0334014190;     1
2;     2;     0252207412;     2
3;     3;     0542943200;     3
4;     4;     6458013069;     4
5;     5;     6458009512;     7
6;     6;     0542943200;     9
7;     7;     0580164220;     10
8;     8;     0542943200;     5
9;     9;     0580164220;     6
10;     10;     6458013069;     8

Similar Messages

  • Creating Purchase Order Using Procurement Confirmation Wizard

    Dear All,
    I am trying to add the Purchase Orders using the Procurement Confirmation Wizard. Now I want to get those Purchase Orders list that are added using this Procurement Confirmation Wizard. How can I do that ? By this I mean, I do not know on which event I should use this and How to get the DocNum or DocEntry of the added Purchase Orders ?
    Please help me to solve this.
    Any Kind of help would be appreciated.
    Thanks & Regards
    Ankit Chauhan

    Hi Ankit,
    Catch the event of form 540010007
    On the After Item Pressed event
    do this :
                Select Case pVal.ItemUID
                    Case "_wiz_next_"
                        If form.PaneLevel = 8 Then
                            Dim bDraft As Boolean = False
                                Dim oMtx As SAPbouiCOM.Matrix = form.Items.Item("540000036").Specific
                                Try
                                    Dim oChb As SAPbouiCOM.CheckBox = form.Items.Item("540000020").Specific 'Draft check box
                                    If oChb.Checked Then bDraft = True     'Means only draft document created
                                Catch ex As Exception
                                End Try
                                Dim oColPOEntry As New Collections.Generic.List(Of Integer)
                                For i As Integer = 1 To oMtx.RowCount
                                    If oMtx.Columns.Item("540000011").Cells.Item(i).Specific.String <> "0" Then     'This column stores the doc entries - not visible to user
                                        oColPOEntry.Add(oMtx.GetCellSpecific("540000011", i).String)
                                    End If
                                Next
                        End If
                End Select
    If you are using SBO 9, I believe there should be another column in matrix 540000036 that stores the object type of the created document.
    In older version, the procurement only create a PO/Draft object.
    In latest version, you are allowed to create PO/PQ/Prod Order object.
    Regards
    Edy

  • Sales order - Procurement Confirmation Wizard

    Hi everyone,
    I've a problem with a sales order and would like help of you.
    When create/update a sales order appears authorization [Procurement Confirmation Wizard]. I checked some parameters Logistics tab and Item Master
    Data, but i don't found any error. I have attached the screen with error for better understanding.
    SAP 9 - PL 11 and too 8.82 PL 15.
    Best Regards,
    Fredy Emanuel.

    Hi Nagarajan,
    Thanks for reply, I had done test changing user authorization this way that you said. But results aren't that I want.
    Look the test (attached), when create sales order automatically appears screen [Procurement Confirmation Wizard]. I don't need create this, I need only sales order.
    Best Regards,
    Fredy Emanuel.

  • Procurement confirmation wizard?

    hi all,     
         i have an item which is in stock 50. and i have an sales order of 100. so when we run the procurement confirmation wizard then the qty of PO must get reduced to 50 instead of 100. because we have in stock 50. when i run the wizard the qty is coming to 100. what is the solution for it.
    please help me out.
    thanks.

    Hi Swapnil,
    Please check below SAP Note 1702082 as requested.
    1702082 - The Discount is rounded in the Procurement Wizard
    Symptom
    Period and Volumn Discount is set up for the items. User creates the Sales Order with a large quantity and ticks the Procurement Document option.
    In the Procurement Wizard window, system calculates the purchase price according to the defined discount. However the discount is rounded
    according to the decimal place settings of the quantity. For example 10.123456% is rounded to 12.1235%
    Due to this issue, the document value will be calculated incorrectly in the generated Purchase Order document.
    Reproducing the issue
    0.Quantity: 4 Decimal Places ,Percent :6 Decimal Places
    1.Define 'Period and Volumn Discount' for item QQ. E.g. Quantity 100.0000 ,Discount 20.123456%
    2.Create Sales Order with Item QQ (qty 200.0000) and tick the option "Procurement Documsnt"
    3.In the Procurement Wizard window, the Discount is displayed with 4 Decimal Places 20.1235%
    4.In the Purchase Order document, the Discount in row level is displayed as 20.123500%
    The Total before Discount, tax amount, Document Total  calculated in the Purchase Order window are not the expected ones.
    Cause
    Application error
    Solution
    SAP intends to provide patches in order to solve described problem.
    The section Reference to related Notes below will list the specific Patches when available.
    The corresponding Info file of Patches on SAP Service Marketplace will show the correction / SAP Note number also.
    Be aware that these references can only be set at Patch release date.
    SAP will deliver Patches only for selected Releases at its own discretion, based on the business impact and the complexity of the implementation.
    Other terms
    Decimal Place, rounding, Sales Order, Purchase Order, Procurement Document
    Header Data
    Released On
    03.07.2012 07:08:03
    Release Status
    Released for Customer
    Component
    SBO-PUR Purchasing - A/P
    Priority
    Correction with high priority
    Category
    Program error
    References
    This document is referenced by:
    SAP Business One Notes (1)
    1715422
    Overview Note for SAP Business One 8.82 PL07
    Validity
    Software Component
    Version
    SAP BUSINESS ONE
    8.81
    8.82
    Hope this helps
    Regards::::
    Atul Chakraborty

  • Procurement confirmation wizard and multiple Purchase quotes

    Hi Experts,
    I have played around with the Procurement confirmation wizard in 8.81 and tried to get this to create multiple Purchase Quotes from one Sales Order. In the Help file and 8.81 documentation it specifies that this is possible. I could not get this to work, as I can only specify one Vendor.
    How can I use this tool to create multiple Purchase quotes from one Sales Order?
    Thanks,
    Marli

    Hi Marli.......
    Have you maintained Prefered vendors for Items so that when Purchase Quotation executes it gets generated for all teh prefred vendors in one shot........
    What you need to do is when Procurement wizard gets opened you have to select Purchase Quotation in drop down list in step 3 of 6 and then try...........
    Regards,
    Rahul

  • Does the Procurement Confirmation Wizard work through DI-API?

    Is it possible to create a Purchase Order with a Sales Order as its base document through the DI-API similar to how the Procurement Confirmation Wizard works?

    Hi,
    The answer is NO. This is not exposed to DI-API yet.
    Thanks,
    Gordon

  • Capture DocEntry of purchase order created by Proc. Confirmation Wizard

    Dear all,
    in SAP B1 2007 I developed a UI DI API addon to read the docentry of all purchase orders created by Procurement Confirmation Wizard.
    I used the et_FORM_DATA_ADD  event created by the wizard when I confirmed the creation of the purchase order.
    In this event, the BusinessObjectInfo.ObjectKey string contained the DocEntry of the new purchase order.
    But now, with SAP 8.81 PL 06, this event is not raised anymore.
    So... now... how can I know the DocEntry  (not DocNum) of the new purchase orders created by Procurement Confirmation Wizard?
    Can someone help me, please?
    Regards
        Emanuele

    Dear all,
    I solved the problem analyzing the event raised by SAP B1 8.81 Proc. Confirmation Wizard.
        Const CONFIRM_PURCHASE_ORDER_FORM_TYPE As String = "540010007"
        Const ERROR_STRING As String = "ERRORE: "
        Const WIZARD_MATRIX_PO_DOCNUM_MESSAGE As String = "540010007-36]"
        Const WIZARD_MATRIX_FORMID As String = "540000036"
        Const WIZARD_LINK_COLUMN_ID As String = "540000005"
        Const WIZARD_VALIDATE_COLUMN_ID As String = "540000003"
    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, _
                                              ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            Try
                If pVal.FormType = CONFIRM_PURCHASE_ORDER_FORM_TYPE Then
                    ' event activated by the matrix element
                    If pVal.ItemUID = WIZARD_MATRIX_FORMID And pVal.BeforeAction = True Then
                        ' if event is "matrix link pressed" or "form/matrix validate"
                        If (pVal.EventType = SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED And pVal.ColUID = WIZARD_LINK_COLUMN_ID) Or _
                            (pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE And pVal.ColUID = WIZARD_VALIDATE_COLUMN_ID) Then
                            Dim recordsetTemp As SAPbobsCOM.Recordset = Nothing
                            Dim recordsetTemp2 As SAPbobsCOM.Recordset = Nothing
                            Dim recordsetTemp3 As SAPbobsCOM.Recordset = Nothing
                            Dim oform As SAPbouiCOM.Form
                            Try
                                oform = SBO_Application.Forms.GetForm(CONFIRM_PURCHASE_ORDER_FORM_TYPE, 1)
                                Dim sQuery As String
                                Dim oMatrix As SAPbouiCOM.Matrix = oform.Items.Item(WIZARD_MATRIX_FORMID).Specific
                                Dim ocolumn As SAPbouiCOM.Column = oMatrix.Columns.Item(WIZARD_LINK_COLUMN_ID) ' ("540000005")
                                If oMatrix.RowCount > 0 Then
                                    For iRow As Integer = 1 To oMatrix.RowCount
                                        Dim oEditText As SAPbouiCOM.EditText
                                        oEditText = ocolumn.Cells.Item(iRow).Specific ' pVal.Row
                                        If Not oEditText.Value.Contains(WIZARD_MATRIX_PO_DOCNUM_MESSAGE) Then
                                            Continue For
                                        End If
                                        Dim DocNum As Integer = 0
                                        Dim stemp As String = oEditText.Value
                                        Dim stemp2 As String = ""
                                        Dim iterRow As Integer = 0
                                        ' loop in the string searching for the purchase order docnum
                                        While 1 = 1
                                            If stemp.Contains(" ") Then
                                                stemp2 = stemp.Substring(0, stemp.IndexOf(" "))
                                                Try
                                                    DocNum = CInt(stemp2)
                                                    Exit While
                                                Catch ex As Exception
                                                    stemp = stemp.Substring(stemp.IndexOf(" ") + 1)
                                                    DocNum = 0
                                                End Try
                                            Else
                                                Exit While
                                            End If
                                        End While
                                        If DocNum = 0 Then
                                            Continue For
                                        End If
                                        Dim PO_DocEntry As String = ""
                                        recordsetTemp2 = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                        sQuery = "SELECT MAX(DocEntry) As MaxDocEntry from OPOR where DocNum = " & DocNum
                                        ' execute SQL query
                                        recordsetTemp2.DoQuery(sQuery)
                                        If recordsetTemp2 IsNot Nothing Then
                                            If recordsetTemp2.RecordCount = 0 Then
                                                Continue For
                                            End If
                                            recordsetTemp2.MoveFirst()
                                            PO_DocEntry = recordsetTemp2.Fields.Item("MaxDocEntry").Value
                                        End If
                                        If PO_DocEntry <> "" Then
                                            ' check if this Purchase Order has already some textlines
                                            ' If it already has text lines, then we don't need to add them to it
                                            recordsetTemp3 = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                            sQuery = "SELECT count(*) As ExistYN from POR10 where DocEntry = " & PO_DocEntry
                                            recordsetTemp3.DoQuery(sQuery)
                                            If recordsetTemp3 IsNot Nothing Then
                                                If recordsetTemp3.RecordCount > 0 Then
                                                    recordsetTemp3.MoveFirst()
                                                    Dim numOfTextLinesForThis_PO As Integer = CInt(recordsetTemp3.Fields.Item("ExistYN").Value)
                                                    If numOfTextLinesForThis_PO > 0 Then
                                                        Continue For
                                                    End If
                                                End If
                                            End If
                                        End If
                                        ' if this PO still hasn't any texlines, then we try to add to it reading the textlines of Sales Order
                                        ' reopen the purchase order
                                        Dim oPurchaseOrder As SAPbobsCOM.Documents
                                        oPurchaseOrder = oCompany.GetBusinessObject(BoObjectTypes.oPurchaseOrders)
                                        oPurchaseOrder.GetByKey(CInt(PO_DocEntry))
                                        ' loop on every lines
                                        For i As Integer = 0 To oPurchaseOrder.Lines.Count - 1
                                            oPurchaseOrder.Lines.SetCurrentLine(i)
                                            ' if purchase order line was generetated from a sales order
                                            If oPurchaseOrder.Lines.BaseType = 17 Then
                                                recordsetTemp = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                                ' search the text lines in the sales order
                                                sQuery = "SELECT t11.LineText As LineText "
                                                sQuery &= " from RDR10 t11 "
                                                sQuery &= " Where t11.DocEntry = '" & oPurchaseOrder.Lines.BaseEntry & "' "
                                                sQuery &= "  AND t11.AftLineNum = " & oPurchaseOrder.Lines.BaseLine
                                                sQuery &= "  AND t11.LineType = 'T' and t11.ObjType = " & oPurchaseOrder.Lines.BaseType
                                                sQuery &= " order by t11.LineSeq "
                                                ' execute SQL query
                                                recordsetTemp.DoQuery(sQuery)
                                                If recordsetTemp IsNot Nothing Then
                                                    If recordsetTemp.RecordCount = 0 Then
                                                        Continue For
                                                    End If
                                                    recordsetTemp.MoveFirst()
                                                    ' loop on each text lines found
                                                    While recordsetTemp.EoF = False
                                                        If recordsetTemp.Fields.Item("LineText").Value <> String.Empty Then
                                                            oPurchaseOrder.SpecialLines.LineType = BoDocSpecialLineType.dslt_Text
                                                            oPurchaseOrder.SpecialLines.LineText = recordsetTemp.Fields.Item("LineText").Value
                                                            oPurchaseOrder.SpecialLines.AfterLineNumber = oPurchaseOrder.Lines.LineNum
                                                            oPurchaseOrder.SpecialLines.Add()
                                                        End If
                                                        recordsetTemp.MoveNext()
                                                    End While ' recordsetTemp.EoF = False
                                                End If ' recordsetTemp IsNot Nothing
                                            End If ' oPurchaseOrder.Lines.BaseType = 17
                                        Next ' end-loop on every lines
                                        ' update the purchase order
                                        oPurchaseOrder.Update()
                                    Next
                                End If
                            Catch ex As Exception
                            Finally
                                recordsetTemp = Nothing
                                recordsetTemp2 = Nothing
                                recordsetTemp3 = Nothing
                            End Try
                        End If
                    End If
                End If
            Catch ex As Exception
            End Try
        End Sub
    Regards
        Emanuele
    Edited by: Emanuele Croci on Aug 29, 2011 5:05 PM

  • Procurement confirmation

    Hello,
    Customer has upgraded from 2007 to 8.81 and has a complaint that the process to auto-generate a purchase order from a sales order is longer (more steps) than in version 2007.
    In version 2007, you tick 'purchase order' on the logistics tab of the sales order, then window pops up where you fill in the preferred vendor, select all, click >>. Done.
    In version 8.81 you tick 'procurement document' on the logistics tab of the sales order, then window pops up where you have to confim the customer, then on step 2 i select "go to final step', then it brings me to step 3 to fill in preferred vendor and then to final step. So, there are 4 steps compare to 2.
    Are there any settings available for the Procurement Confirmation Wizard? Is there a way to skip step 1 (this first screen is not necessary) and to have 'go to final step' always selected automatically?

    Dear Maeve
    Still in 8.8 version there is such function to skip first two process.
    Gorden is right this is an enhancement before 8.8 version against one order  you can create only one purchase order.
    but now against one Sales order system allow you to create multiple purchase order with different vendor.
    Regards
    MANGESH PAGDHARE.

  • Schedule line getting confirmed when Ordered Quanity is greater than stock.

    Hi Sap Gurus,
    We have an issue in one of the sales scenario.
    In one of the sales orders the ordered quanity is purposely maintained greater than the stock at respective storage location(batch managed).
    In this case the schedule line should not get confirmed and it should not allow delivery document creation.
    But in the sales order the schedule lines are geeting confirmed and even the delivery document is getting created with picking request completion.
    Could you please help to understand :
    1.  why the schedule lines are getting confirmed when ordered quantity > Inventory?
    2. How do I stop delivery document creaton in this scenario?
    Looking for a quick response.
    Thanks in advance,
    Bhaskar

    Hello Bhaskar,
    Is Availability Check in your system considering Replenishment Lead time, if yes, then this is possible.
    Check this IMG Link:
    IMG - Sales and Distribution - Basic Functions - Availability Check and Transfer of Requirements - Availability Check with ATP Logic or Against Planning - Carry Out Control For Availability Check
    Here check the RLT settings.
    Also check settings under In/Outward Movements, where things like include Purchase Order can lead to confirmation of stock in Sales Order, despite physical inventory being present.
    Hope this helps,
    Thanks,
    Jignesh Mehta

  • How to control not to confirm quantity in sales order schedule line

    Hi,
    We have a problem with confirmed quantity in sales order schedule line.
    When I reject a position in a sales order, confirmed quantity still remains with quantity ( diferent to 0).
    I need in some cases that system not to confirm quantity in schedule line at item level.
    I've tried to do this with a new routine in OVB8 transaction, but it didn't work.
    Could you help me? How can I avoid the system to confirm quantity in a sales order item?
    Thanks in advance....

    Hi Lakshmipathi,
    I'm sorry. The rejection was a bad example.
    I need, in some cases, that the system doesn't confirm quantity in sales orden item. We have a custom field in sales order item and we need to confirm with 0 quantity , when that field has a specific value.
    Due to that field is a custom field, I need an exit, or rutine, or .. i don't know...to inform a standard field too ( delivery block, rejection...) something to get confirmed quantity to 0.
    I've tried with rutine in OVB8. But It didn`t work
    I've tried with delivery block, but with this all items in sales order, confirms with 0. I need at item level.
    Thanks

  • Sales Order Schedule Lines getting updated

    Hi,
    In my system when I am changing the delivery date of  'AB' confirmation in the Purchase order Item level confirmations, the corresponding  Sales Order' schedule line is also getting updated with the delivery date.
    So, my question is is this a standard SAP functionality or this fuctionality has been implemented through BADI, Exits etc.
    Regards,
    Rachit

    Rachit,
    This is standard SAP behavior. In 3rd party sale process, the changes done to PO (qty, dates) are updated automatically in the sales order.
    TW

  • How to link Invoice Quantity and Confirmed quantity in schedule line

    Hello,
    I'm working for a report in BW. The user want to compare the invoice quantity to the confirmed quantity in schedule line for a sales order.
    I can't find any table linking these two fields.
    Could you help?
    Thanks a lot
    Jeannie

    Ashish,
    When we link these two tables by Sales Order Number / Item, we would take following result:
    Sales Order    /     Itme     /     Schedule line     /    confirmed quantity   /     actual billed quantity
    1                  /      10        /      1                     /    3                            /              5
    1                /         10      /       2                    /     2                            /             5
    But in fact, for Sales order/itm 1/10, we have only 5 PC billed, not 10.
    When billed 5 PC, I want to despatch it to the Schedule line as 3, 2.
    Regards,
    Jeannie

  • Blocking RdA creation from Sales Order Schedule Line

    Hi Gurus,
    please do you know if there is a way to block the RdA creation from Sales Order schedule line, for TAS item category? I tried with Header Delivery block without quantity confirmation but even if quantity on schedule lines are not confirmed, RdA is created anyway.
    Thank you very much
    Kind Regards
    Andrea

    thank you

  • Difference between sales order schedule line and item level data

    Hi All,
    Could you please let me know what is the difference between sales order schedule line and item level data?
    Thanks,
    Ramya

    Hi Ramya,
    Sales order schedule line contains del date, order qty, rounded qty, confirmed qty, delivery qty, schedule line category, purchase requisition etc.,  ie It contains the full details of sales order data with respect to the scheduled line of delivery.  The total quantity of a sales order item can be subdivided into schedule lines that contain the various subsets with the corresponding delivering dates.
    Sales order Item level data contains details of the item in the sales order like material code, net price, net value, UoM, PO details, reason for rejection if any, material group,billing date, plant etc., ie this
    contains the full details of item irrespective of scheduled line.
    Regards,
    R. Senthil Mareeswaran.

  • Partial Pick Confirming Sales Order

    Hi Folks,
    I have a requirement where I have to Pick Confirm and Ship confirm Sales Order through API.
    1. When the quantites to be picked are same as quantity ordered the code seems to work just fine.
    But suppose in my example my quantity in SO line is 50 and I want to partially Ship confirm the lines lets say 20 quantites.
    then which API i need to use?
    The approach I am following is while pick confirming I am passing 20 quantites only and the ship confirming it.
    I researched and found that we can use the following API to update shipping attributes 'WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes' but when I run it (I tried before and after Pick confirm) the API runs fine but no changes are getting affected and the code Pick confirms all the quantity.
    Could some please help me with this.
    Please find the codes for pick confirm and updating shipping attributes
    Pick confirm code
    DECLARE
      lv_order_num        number := 700145812;
      vMoveOrderLineId    NUMBER;
      p_pick_conf_qty     NUMBER;
      pStatus             VARCHAR2(100);
      pMsgData            VARCHAR2(4000);
      v_movehdr_rec       INV_MOVE_ORDER_PUB.TROHDR_REC_TYPE;
      v_movehdr_val_rec   INV_MOVE_ORDER_PUB.TROHDR_VAL_REC_TYPE;
      v_moveln_tbl        INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
      v_moveln_tbl_p      INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
      v_moveln_zero_tbl   INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
      v_moveln_zero_tbl_p INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
      v_moveln_tbl_d      INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
      v_moveln_tbl_o      INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
      v_moveln_val_tbl    INV_MOVE_ORDER_PUB.TROLIN_VAL_TBL_TYPE;
      v_mold_tbl          INV_MO_LINE_DETAIL_UTIL.G_MMTT_TBL_TYPE;
      v_mold_tbl_p        INV_MO_LINE_DETAIL_UTIL.G_MMTT_TBL_TYPE;
      l_mold_tbl          INV_MO_LINE_DETAIL_UTIL.G_MMTT_TBL_TYPE;
      l_moveln_tbl        INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
      l_trolin_rec        INV_MOVE_ORDER_PUB.TROLIN_REC_TYPE;
      l_trolin_tbl        INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
      l_return_status     VARCHAR2(240);
      l_msg_count         NUMBER;
      l_msg_data          VARCHAR2(2000);
      l_move_hdr_id       NUMBER;
      l_move_order_no     NUMBER := 0;
      v_return_values     VARCHAR2(2000) := FND_API.G_TRUE;
      v_move_hdr_rec      INV_MOVE_ORDER_PUB.TROHDR_REC_TYPE;
      v_move_hdr_val_rec  INV_MOVE_ORDER_PUB.TROHDR_VAL_REC_TYPE;
      v_api_pick_confirm  NUMBER;
      cv_fail             VARCHAR2(100) := 'Fail';
      cv_success          VARCHAR2(100) := 'Success';
      g_user_id      number;
      g_resp_id      number;
      g_resp_appl_id number;
      p_user_name    varchar2(100) := 'SYSADMIN';
      p_resp_name    varchar2(100) := 'Order Management Super User';
      p_mo_apps      varchar2(100) := 'ONT';
      CURSOR c_mmtt_recs(vMoveOrderLineId NUMBER) IS
        SELECT transaction_header_id,
               transaction_temp_id,
               source_code,
               source_line_id,
               transaction_mode,
               lock_flag,
               last_update_date,
               last_updated_by,
               creation_date,
               created_by,
               last_update_login,
               request_id,
               program_application_id,
               program_id,
               program_update_date,
               inventory_item_id,
               revision,
               organization_id,
               subinventory_code,
               locator_id,
               transaction_quantity,
               primary_quantity,
               transaction_uom,
               transaction_cost,
               transaction_type_id,
               transaction_action_id,
               transaction_source_type_id,
               transaction_source_id,
               transaction_source_name,
               transaction_date,
               acct_period_id,
               distribution_account_id,
               transaction_reference,
               requisition_line_id,
               requisition_distribution_id,
               reason_id,
               lot_number,
               lot_expiration_date,
               serial_number,
               receiving_document,
               demand_id,
               rcv_transaction_id,
               move_transaction_id,
               completion_transaction_id,
               wip_entity_type,
               schedule_id,
               repetitive_line_id,
               employee_code,
               primary_switch,
               schedule_update_code,
               setup_teardown_code,
               item_ordering,
               negative_req_flag,
               operation_seq_num,
               picking_line_id,
               trx_source_line_id,
               trx_source_delivery_id,
               physical_adjustment_id,
               cycle_count_id,
               rma_line_id,
               customer_ship_id,
               currency_code,
               currency_conversion_rate,
               currency_conversion_type,
               currency_conversion_date,
               ussgl_transaction_code,
               vendor_lot_number,
               encumbrance_account,
               encumbrance_amount,
               ship_to_location,
               shipment_number,
               transfer_cost,
               transportation_cost,
               transportation_account,
               freight_code,
               containers,
               waybill_airbill,
               expected_arrival_date,
               transfer_subinventory,
               transfer_organization,
               transfer_to_location,
               new_average_cost,
               value_change,
               percentage_change,
               material_allocation_temp_id,
               demand_source_header_id,
               demand_source_line,
               demand_source_delivery,
               item_segments,
               item_description,
               item_trx_enabled_flag,
               item_location_control_code,
               item_restrict_subinv_code,
               item_restrict_locators_code,
               item_revision_qty_control_code,
               item_primary_uom_code,
               item_uom_class,
               item_shelf_life_code,
               item_shelf_life_days,
               item_lot_control_code,
               item_serial_control_code,
               item_inventory_asset_flag,
               allowed_units_lookup_code,
               department_id,
               department_code,
               wip_supply_type,
               supply_subinventory,
               supply_locator_id,
               valid_subinventory_flag,
               valid_locator_flag,
               locator_segments,
               current_locator_control_code,
               number_of_lots_entered,
               wip_commit_flag,
               next_lot_number,
               lot_alpha_prefix,
               next_serial_number,
               serial_alpha_prefix,
               shippable_flag,
               posting_flag,
               required_flag,
               process_flag,
               error_code,
               error_explanation,
               attribute_category,
               attribute1,
               attribute2,
               attribute3,
               attribute4,
               attribute5,
               attribute6,
               attribute7,
               attribute8,
               attribute9,
               attribute10,
               attribute11,
               attribute12,
               attribute13,
               attribute14,
               attribute15,
               movement_id,
               reservation_quantity,
               shipped_quantity,
               transaction_line_number,
               task_id,
               to_task_id,
               source_task_id,
               project_id,
               source_project_id,
               pa_expenditure_org_id,
               to_project_id,
               expenditure_type,
               final_completion_flag,
               transfer_percentage,
               transaction_sequence_id,
               material_account,
               material_overhead_account,
               resource_account,
               outside_processing_account,
               overhead_account,
               flow_schedule,
               cost_group_id,
               demand_class,
               qa_collection_id,
               kanban_card_id,
               overcompletion_transaction_id,
               overcompletion_primary_qty,
               overcompletion_transaction_qty,
               end_item_unit_number,
               scheduled_payback_date,
               line_type_code,
               parent_transaction_temp_id,
               put_away_strategy_id,
               put_away_rule_id,
               pick_strategy_id,
               pick_rule_id,
               common_bom_seq_id,
               common_routing_seq_id,
               cost_type_id,
               org_cost_group_id,
               move_order_line_id,
               task_group_id,
               pick_slip_number,
               reservation_id,
               transaction_status,
               transfer_cost_group_id,
               lpn_id,
               transfer_lpn_id,
               pick_slip_date,
               content_lpn_id
          FROM MTL_MATERIAL_TRANSACTIONS_TEMP
         WHERE move_order_line_id = vMoveOrderLineId;
      l_moveln_fidx     NUMBER;
      l_moveln_lidx     NUMBER;
      n_mvln_cntr       NUMBER;
      l_Index           NUMBER := 1;
      v_records_in_mmtt NUMBER := 0;
      REC C_MMTT_RECS%ROWTYPE;
    BEGIN
      select user_id
        into g_user_id
        from fnd_user
       where user_name = p_user_name;
      select responsibility_id, application_id
        into g_resp_id, g_resp_appl_id
        from apps.fnd_responsibility_vl
       where responsibility_name = p_resp_name;
      Apps.FND_Global.Apps_Initialize(g_user_id, g_resp_id, g_resp_appl_id);
      MO_GLOBAL.INIT(p_mo_apps);
      for mol in (select wda.delivery_id,
                         wda.delivery_detail_id,
                         wda.parent_delivery_detail_id,
                         wdd.source_code,
                         wdd.inventory_item_id,
                         wdd.organization_id,
                         wdd.ship_from_location_id,
                         wdd.ship_to_location_id,
                         wdd.requested_quantity,
                         wdd.requested_quantity_uom,
                         wdd.move_order_line_id,
                         wdd.org_id,
                         mtrl.quantity,
                         mtrl.quantity_delivered
                    from wsh_delivery_details     wdd,
                         wsh_delivery_assignments wda,
                         oe_order_lines_all       ol,
                         oe_order_headers_all     oh,
                         mtl_txn_request_lines    mtrl,
                         mtl_txn_request_headers  mtrh
                   where wdd.source_line_id = ol.line_id
                     and wdd.delivery_detail_id = wda.delivery_detail_id
                     and ol.header_id = oh.header_id
                     and wdd.move_order_line_id = mtrl.line_id(+)
                     and mtrl.header_id = mtrh.header_id(+)
                     and oh.order_number = lv_order_num) loop
        vMoveOrderLineId := mol.move_order_line_id;
        p_pick_conf_qty  := mol.quantity - nvl(mol.quantity_delivered,0);
        SELECT COUNT(move_order_line_id)
          INTO v_records_in_mmtt
          FROM MTL_MATERIAL_TRANSACTIONS_TEMP
         WHERE move_order_line_id = vMoveOrderLineId;
        IF v_records_in_mmtt > 1 THEN
          pStatus  := cv_fail;
          pMsgData := 'Wrong number of records in MMTT for the MOVE_ORDER_LINE_ID : ' ||
                      vMoveOrderLineId;
          DBMS_OUTPUT.PUT_LINE('Multiple records in MMTT for move_order_line_id = ' ||
                               vMoveOrderLineId);
          v_api_pick_confirm := 0;
          GOTO end_of_pkcnf;
        ELSIF v_records_in_mmtt = 0 THEN
          --means that the delivery is already pick confirmed
          pStatus := cv_success;
          DBMS_OUTPUT.PUT_LINE('No records in MMTT for move_order_line_id = ' ||
                               vMoveOrderLineId ||
                               ' hence it is already pick confirmed');
          v_api_pick_confirm := 0;
          GOTO end_of_pkcnf;
        END IF;
        SELECT mtrh.header_id, mtrh.request_number
          INTO l_move_hdr_id, l_move_order_no
          FROM mtl_txn_request_headers mtrh, mtl_txn_request_lines mtrl
         WHERE mtrh.header_id = mtrl.header_id
           AND mtrl.line_id = vMoveOrderLineId;
        DBMS_OUTPUT.PUT_LINE('Obtained MTRH.HEADER_ID = ' || l_move_hdr_id ||
                             ' MTRH.REQUEST_NUMBER = ' || l_move_order_no ||
                             ' for move_order_line_id = ' || vMoveOrderLineId);
        INV_MOVE_ORDER_PUB.GET_MOVE_ORDER(p_api_version_number => 1.0,
                                          p_init_msg_list      => FND_API.G_FALSE,
                                          p_return_values      => v_return_values,
                                          x_return_status      => l_return_status,
                                          x_msg_count          => l_msg_count,
                                          x_msg_data           => l_msg_data,
                                          p_header_id          => l_move_hdr_id,
                                          p_header             => l_move_order_no,
                                          x_trohdr_rec         => v_move_hdr_rec,
                                          x_trohdr_val_rec     => v_move_hdr_val_rec,
                                          x_trolin_tbl         => v_moveln_tbl,
                                          x_trolin_val_tbl     => v_moveln_val_tbl);
         COMMIT;                                
        DBMS_OUTPUT.PUT_LINE('Return status of INV_MOVE_ORDER_PUB.GET_MOVE_ORDER = ' ||
                             l_return_status);
        IF l_return_status != FND_API.G_RET_STS_SUCCESS THEN
          pStatus  := cv_fail;
          pMsgData := 'Failed to get move order inv_move_order_pub.get_move_order for MOVE_ORDER_LINE_ID : ' ||
                      vMoveOrderLineId;
          GOTO end_of_pkcnf;
        END IF;
        OPEN c_mmtt_recs(vMoveOrderLineId);
        FETCH c_mmtt_recs
          INTO rec;
        CLOSE c_mmtt_recs;
        v_mold_tbl(1).transaction_header_id := rec.transaction_header_id;
        v_mold_tbl(1).transaction_temp_id := rec.transaction_temp_id;
        v_mold_tbl(1).source_code := rec.source_code;
        v_mold_tbl(1).source_line_id := rec.source_line_id;
        v_mold_tbl(1).transaction_mode := rec.transaction_mode;
        v_mold_tbl(1).lock_flag := rec.lock_flag;
        v_mold_tbl(1).last_update_date := rec.last_update_date;
        v_mold_tbl(1).last_updated_by := rec.last_updated_by;
        v_mold_tbl(1).creation_date := rec.creation_date;
        v_mold_tbl(1).created_by := rec.created_by;
        v_mold_tbl(1).last_update_login := rec.last_update_login;
        v_mold_tbl(1).request_id := rec.request_id;
        v_mold_tbl(1).program_application_id := rec.program_application_id;
        v_mold_tbl(1).program_id := rec.program_id;
        v_mold_tbl(1).program_update_date := rec.program_update_date;
        v_mold_tbl(1).inventory_item_id := rec.inventory_item_id;
        v_mold_tbl(1).revision := rec.revision;
        v_mold_tbl(1).organization_id := rec.organization_id;
        v_mold_tbl(1).subinventory_code := rec.subinventory_code;
        v_mold_tbl(1).locator_id := rec.locator_id;
        v_mold_tbl(1).transaction_quantity := rec.transaction_quantity;
        v_mold_tbl(1).primary_quantity := rec.primary_quantity;
        v_mold_tbl(1).transaction_uom := rec.transaction_uom;
        v_mold_tbl(1).transaction_cost := rec.transaction_cost;
        v_mold_tbl(1).transaction_type_id := rec.transaction_type_id;
        v_mold_tbl(1).transaction_action_id := rec.transaction_action_id;
        v_mold_tbl(1).transaction_source_type_id := rec.transaction_source_type_id;
        v_mold_tbl(1).transaction_source_id := rec.transaction_source_id;
        v_mold_tbl(1).transaction_source_name := rec.transaction_source_name;
        v_mold_tbl(1).transaction_date := rec.transaction_date;
        v_mold_tbl(1).acct_period_id := rec.acct_period_id;
        v_mold_tbl(1).distribution_account_id := rec.distribution_account_id;
        v_mold_tbl(1).transaction_reference := rec.transaction_reference;
        v_mold_tbl(1).requisition_line_id := rec.requisition_line_id;
        v_mold_tbl(1).requisition_distribution_id := rec.requisition_distribution_id;
        v_mold_tbl(1).reason_id := rec.reason_id;
        v_mold_tbl(1).lot_number := rec.lot_number;
        v_mold_tbl(1).lot_expiration_date := rec.lot_expiration_date;
        v_mold_tbl(1).serial_number := rec.serial_number;
        v_mold_tbl(1).receiving_document := rec.receiving_document;
        v_mold_tbl(1).demand_id := rec.demand_id;
        v_mold_tbl(1).rcv_transaction_id := rec.rcv_transaction_id;
        v_mold_tbl(1).move_transaction_id := rec.move_transaction_id;
        v_mold_tbl(1).completion_transaction_id := rec.completion_transaction_id;
        v_mold_tbl(1).wip_entity_type := rec.wip_entity_type;
        v_mold_tbl(1).schedule_id := rec.schedule_id;
        v_mold_tbl(1).repetitive_line_id := rec.repetitive_line_id;
        v_mold_tbl(1).employee_code := rec.employee_code;
        v_mold_tbl(1).primary_switch := rec.primary_switch;
        v_mold_tbl(1).schedule_update_code := rec.schedule_update_code;
        v_mold_tbl(1).setup_teardown_code := rec.setup_teardown_code;
        v_mold_tbl(1).item_ordering := rec.item_ordering;
        v_mold_tbl(1).negative_req_flag := rec.negative_req_flag;
        v_mold_tbl(1).operation_seq_num := rec.operation_seq_num;
        v_mold_tbl(1).picking_line_id := rec.picking_line_id;
        v_mold_tbl(1).trx_source_line_id := rec.trx_source_line_id;
        v_mold_tbl(1).trx_source_delivery_id := rec.trx_source_delivery_id;
        v_mold_tbl(1).physical_adjustment_id := rec.physical_adjustment_id;
        v_mold_tbl(1).cycle_count_id := rec.cycle_count_id;
        v_mold_tbl(1).rma_line_id := rec.rma_line_id;
        v_mold_tbl(1).customer_ship_id := rec.customer_ship_id;
        v_mold_tbl(1).currency_code := rec.currency_code;
        v_mold_tbl(1).currency_conversion_rate := rec.currency_conversion_rate;
        v_mold_tbl(1).currency_conversion_type := rec.currency_conversion_type;
        v_mold_tbl(1).currency_conversion_date := rec.currency_conversion_date;
        v_mold_tbl(1).ussgl_transaction_code := rec.ussgl_transaction_code;
        v_mold_tbl(1).vendor_lot_number := rec.vendor_lot_number;
        v_mold_tbl(1).encumbrance_account := rec.encumbrance_account;
        v_mold_tbl(1).encumbrance_amount := rec.encumbrance_amount;
        v_mold_tbl(1).ship_to_location := rec.ship_to_location;
        v_mold_tbl(1).shipment_number := rec.shipment_number;
        v_mold_tbl(1).transfer_cost := rec.transfer_cost;
        v_mold_tbl(1).transportation_cost := rec.transportation_cost;
        v_mold_tbl(1).transportation_account := rec.transportation_account;
        v_mold_tbl(1).freight_code := rec.freight_code;
        v_mold_tbl(1).containers := rec.containers;
        v_mold_tbl(1).waybill_airbill := rec.waybill_airbill;
        v_mold_tbl(1).expected_arrival_date := rec.expected_arrival_date;
        v_mold_tbl(1).transfer_subinventory := rec.transfer_subinventory;
        v_mold_tbl(1).transfer_organization := rec.transfer_organization;
        v_mold_tbl(1).transfer_to_location := rec.transfer_to_location;
        v_mold_tbl(1).new_average_cost := rec.new_average_cost;
        v_mold_tbl(1).value_change := rec.value_change;
        v_mold_tbl(1).percentage_change := rec.percentage_change;
        v_mold_tbl(1).material_allocation_temp_id := rec.material_allocation_temp_id;
        v_mold_tbl(1).demand_source_header_id := rec.demand_source_header_id;
        v_mold_tbl(1).demand_source_line := rec.demand_source_line;
        v_mold_tbl(1).demand_source_delivery := rec.demand_source_delivery;
        v_mold_tbl(1).item_segments := rec.item_segments;
        v_mold_tbl(1).item_description := rec.item_description;
        v_mold_tbl(1).item_trx_enabled_flag := rec.item_trx_enabled_flag;
        v_mold_tbl(1).item_location_control_code := rec.item_location_control_code;
        v_mold_tbl(1).item_restrict_subinv_code := rec.item_restrict_subinv_code;
        v_mold_tbl(1).item_restrict_locators_code := rec.item_restrict_locators_code;
        v_mold_tbl(1).item_revision_qty_control_code := rec.item_revision_qty_control_code;
        v_mold_tbl(1).item_primary_uom_code := rec.item_primary_uom_code;
        v_mold_tbl(1).item_uom_class := rec.item_uom_class;
        v_mold_tbl(1).item_shelf_life_code := rec.item_shelf_life_code;
        v_mold_tbl(1).item_shelf_life_days := rec.item_shelf_life_days;
        v_mold_tbl(1).item_lot_control_code := rec.item_lot_control_code;
        v_mold_tbl(1).item_serial_control_code := rec.item_serial_control_code;
        v_mold_tbl(1).item_inventory_asset_flag := rec.item_inventory_asset_flag;
        v_mold_tbl(1).allowed_units_lookup_code := rec.allowed_units_lookup_code;
        v_mold_tbl(1).department_id := rec.department_id;
        v_mold_tbl(1).department_code := rec.department_code;
        v_mold_tbl(1).wip_supply_type := rec.wip_supply_type;
        v_mold_tbl(1).supply_subinventory := rec.supply_subinventory;
        v_mold_tbl(1).supply_locator_id := rec.supply_locator_id;
        v_mold_tbl(1).valid_subinventory_flag := rec.valid_subinventory_flag;
        v_mold_tbl(1).valid_locator_flag := rec.valid_locator_flag;
        v_mold_tbl(1).locator_segments := rec.locator_segments;
        v_mold_tbl(1).current_locator_control_code := rec.current_locator_control_code;
        v_mold_tbl(1).number_of_lots_entered := rec.number_of_lots_entered;
        v_mold_tbl(1).wip_commit_flag := rec.wip_commit_flag;
        v_mold_tbl(1).next_lot_number := rec.next_lot_number;
        v_mold_tbl(1).lot_alpha_prefix := rec.lot_alpha_prefix;
        v_mold_tbl(1).next_serial_number := rec.next_serial_number;
        v_mold_tbl(1).serial_alpha_prefix := rec.serial_alpha_prefix;
        v_mold_tbl(1).shippable_flag := rec.shippable_flag;
        v_mold_tbl(1).posting_flag := rec.posting_flag;
        v_mold_tbl(1).required_flag := rec.required_flag;
        v_mold_tbl(1).process_flag := rec.process_flag;
        v_mold_tbl(1).error_code := rec.error_code;
        v_mold_tbl(1).error_explanation := rec.error_explanation;
        v_mold_tbl(1).attribute_category := rec.attribute_category;
        v_mold_tbl(1).attribute1 := rec.attribute1;
        v_mold_tbl(1).attribute2 := rec.attribute2;
        v_mold_tbl(1).attribute3 := rec.attribute3;
        v_mold_tbl(1).attribute4 := rec.attribute4;
        v_mold_tbl(1).attribute5 := rec.attribute5;
        v_mold_tbl(1).attribute6 := rec.attribute6;
        v_mold_tbl(1).attribute7 := rec.attribute7;
        v_mold_tbl(1).attribute8 := rec.attribute8;
        v_mold_tbl(1).attribute9 := rec.attribute9;
        v_mold_tbl(1).attribute10 := rec.attribute10;
        v_mold_tbl(1).attribute11 := rec.attribute11;
        v_mold_tbl(1).attribute12 := rec.attribute12;
        v_mold_tbl(1).attribute13 := rec.attribute13;
        v_mold_tbl(1).attribute14 := rec.attribute14;
        v_mold_tbl(1).attribute15 := rec.attribute15;
        v_mold_tbl(1).movement_id := rec.movement_id;
        v_mold_tbl(1).reservation_quantity := rec.reservation_quantity;
        v_mold_tbl(1).shipped_quantity := rec.shipped_quantity;
        v_mold_tbl(1).transaction_line_number := rec.transaction_line_number;
        v_mold_tbl(1).task_id := rec.task_id;
        v_mold_tbl(1).to_task_id := rec.to_task_id;
        v_mold_tbl(1).source_task_id := rec.source_task_id;
        v_mold_tbl(1).project_id := rec.project_id;
        v_mold_tbl(1).source_project_id := rec.source_project_id;
        v_mold_tbl(1).pa_expenditure_org_id := rec.pa_expenditure_org_id;
        v_mold_tbl(1).to_project_id := rec.to_project_id;
        v_mold_tbl(1).expenditure_type := rec.expenditure_type;
        v_mold_tbl(1).final_completion_flag := rec.final_completion_flag;
        v_mold_tbl(1).transfer_percentage := rec.transfer_percentage;
        v_mold_tbl(1).transaction_sequence_id := rec.transaction_sequence_id;
        v_mold_tbl(1).material_account := rec.material_account;
        v_mold_tbl(1).material_overhead_account := rec.material_overhead_account;
        v_mold_tbl(1).resource_account := rec.resource_account;
        v_mold_tbl(1).outside_processing_account := rec.outside_processing_account;
        v_mold_tbl(1).overhead_account := rec.overhead_account;
        v_mold_tbl(1).flow_schedule := rec.flow_schedule;
        v_mold_tbl(1).cost_group_id := rec.cost_group_id;
        v_mold_tbl(1).demand_class := rec.demand_class;
        v_mold_tbl(1).qa_collection_id := rec.qa_collection_id;
        v_mold_tbl(1).kanban_card_id := rec.kanban_card_id;
        v_mold_tbl(1).overcompletion_transaction_id := rec.overcompletion_transaction_id;
        v_mold_tbl(1).overcompletion_primary_qty := rec.overcompletion_primary_qty;
        v_mold_tbl(1).overcompletion_transaction_qty := rec.overcompletion_transaction_qty;
        v_mold_tbl(1).end_item_unit_number := rec.end_item_unit_number;
        v_mold_tbl(1).scheduled_payback_date := rec.scheduled_payback_date;
        v_mold_tbl(1).line_type_code := rec.line_type_code;
        v_mold_tbl(1).parent_transaction_temp_id := rec.parent_transaction_temp_id;
        v_mold_tbl(1).put_away_strategy_id := rec.put_away_strategy_id;
        v_mold_tbl(1).put_away_rule_id := rec.put_away_rule_id;
        v_mold_tbl(1).pick_strategy_id := rec.pick_strategy_id;
        v_mold_tbl(1).pick_rule_id := rec.pick_rule_id;
        v_mold_tbl(1).common_bom_seq_id := rec.common_bom_seq_id;
        v_mold_tbl(1).common_routing_seq_id := rec.common_routing_seq_id;
        v_mold_tbl(1).cost_type_id := rec.cost_type_id;
        v_mold_tbl(1).org_cost_group_id := rec.org_cost_group_id;
        v_mold_tbl(1).move_order_line_id := rec.move_order_line_id;
        v_mold_tbl(1).task_group_id := rec.task_group_id;
        v_mold_tbl(1).pick_slip_number := rec.pick_slip_number;
        v_mold_tbl(1).reservation_id := rec.reservation_id;
        v_mold_tbl(1).transaction_status := rec.transaction_status;
        v_mold_tbl(1).transfer_cost_group_id := rec.transfer_cost_group_id;
        v_mold_tbl(1).lpn_id := rec.lpn_id;
        v_mold_tbl(1).transfer_lpn_id := rec.transfer_lpn_id;
        v_mold_tbl(1).pick_slip_date := rec.pick_slip_date;
        v_mold_tbl(1).content_lpn_id := rec.content_lpn_id;
        v_mold_tbl(1).transaction_quantity := p_pick_conf_qty;
        v_mold_tbl(1).primary_quantity := p_pick_conf_qty;
        v_mold_tbl(1).shipped_quantity := p_pick_conf_qty;
        INV_PICK_WAVE_PICK_CONFIRM_PUB.PICK_CONFIRM(p_api_version_number => 1.0,
                                                    p_init_msg_list      => FND_API.G_FALSE,
                                                    p_commit             => FND_API.G_FALSE,
                                                    x_return_status      => l_return_status,
                                                    x_msg_count          => l_msg_count,
                                                    x_msg_data           => l_msg_data,
                                                    p_move_order_type    => 3 -- PickWave - Order
                                                    p_transaction_mode   => 1 -- 1:On-Line, 2:Concurrent, 3:Background
                                                    p_trolin_tbl         => v_moveln_tbl_d,
                                                    p_mold_tbl           => v_mold_tbl,
                                                    x_mmtt_tbl           => v_mold_tbl,
                                                    x_trolin_tbl         => v_moveln_tbl_o,
                                                    p_transaction_date   => SYSDATE);
        COMMIT;                                           
        DBMS_OUTPUT.PUT_LINE('Return status of INV_PICK_WAVE_PICK_CONFIRM_PUB.PICK_CONFIRM  = ' ||
                             l_return_status);
        IF l_return_status != FND_API.G_RET_STS_SUCCESS THEN
          pStatus  := cv_fail;
          pMsgData := 'Failed to pick confirm move order inv_pick_wave_pick_confirm_pub.pick_confirm for MOVE_ORDER_LINE_ID : ' ||
                      vMoveOrderLineId;
          GOTO end_of_pkcnf;
        END IF;
        v_api_pick_confirm := 1;
        dbms_output.put_line('Status of the Pick Confirm is : ' ||
                             l_return_status);
        <<end_of_pkcnf>>
        NULL;
      end loop;
    END;
    Updating Shipping attributes
    DECLARE
      --Standard Parameters.   
      p_api_version NUMBER;
      init_msg_list VARCHAR2(30);
      p_commit      VARCHAR2(30);
      --Parameters for WSH_DELIVERY_DETAILS_PUB.update_shipping_attributes.   
      source_code        VARCHAR2(15);
      changed_attributes WSH_DELIVERY_DETAILS_PUB.ChangedAttributeTabType;
      --out parameters
      x_return_status VARCHAR2(10);
      x_msg_count     NUMBER;
      x_msg_data      VARCHAR2(2000);
      x_msg_details   VARCHAR2(3000);
      x_msg_summary   VARCHAR2(3000);
      -- Handle exceptions
      vApiErrorException EXCEPTION;
    BEGIN
      -- Initialize return status
      x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
      -- Call this procedure to initialize applications parameters
      FND_GLOBAL.APPS_INITIALIZE(user_id      => 0,
                                 resp_id      => 21623,
                                 resp_appl_id => 660);
      source_code := 'OE';
      changed_attributes(1).delivery_detail_id := 9317811; -- delivery_detail_id
      changed_attributes(1).shipped_quantity := 0; -- quantity to update 
      changed_attributes(1).cycle_count_quantity := 30;
      --Call to WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes.
      WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes(p_api_version_number => 1.0,
                                                          p_init_msg_list      => init_msg_list,
                                                          p_commit             => p_commit,
                                                          x_return_status      => x_return_status,
                                                          x_msg_count          => x_msg_count,
                                                          x_msg_data           => x_msg_data,
                                                          p_changed_attributes => changed_attributes,
                                                          p_source_code        => source_code);
                                                          commit;
      IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
        RAISE vApiErrorException;
      ELSE
        dbms_output.put_line('The shipped quantity is updated with ' ||
                             changed_attributes(1)
                             .shipped_quantity || ' for the delivery detail ' ||
                             changed_attributes(1).delivery_detail_id);
      END IF;
    EXCEPTION
      WHEN vApiErrorException THEN
        WSH_UTIL_CORE.get_messages('Y',
                                   x_msg_summary,
                                   x_msg_details,
                                   x_msg_count);
        IF x_msg_count > 1 THEN
          x_msg_data := x_msg_summary || x_msg_details;
          DBMS_OUTPUT.PUT_LINE('Message Data : ' || x_msg_data);
        ELSE
          x_msg_data := x_msg_summary;
          DBMS_OUTPUT.PUT_LINE('Message Data : ' || x_msg_data);
        END IF;
      WHEN OTHERS THEN
        DBMS_OUTPUT.PUT_LINE('Unexpected Error: ' || SQLERRM);
    END;
    Thanks

    Hi,
    Goto VTFL.Select you valid combination.
    Click on item.Select yout item category there.Goto details.
    Select the Pos/neg quantity field as "+".
    Maintain the billing quantity as "A".
    Maintain VBRK/VBRP as "001".
    Save.
    Goto VOV7 and select your item category.Details.
    Select completion rule as "B" and billing relevance as "F".
    Save.
    Pls go through the follwing threads that are posted by me earlier.
    [Invoice split|Re: Invoice split]
    [Splitiing of invoice|Re: Invoice split]
    Regards,
    Krishna.

Maybe you are looking for

  • Out of control error : C7 camera self-snapping pho...

    Hey there's once my C7 phone (untouched) keep on switching on the camera itself, and keep on snapping photos out of control until I have to plug out the battery and restart. what's worse is after i restart the camera error still exist, i dont know ho

  • Air 3.8 -  Installation parse error

    Hi, I'm building an Android app with Adobe Air 3.8. Some users with newer Android devices (e.g. Nexus 4) told me that they got a parse error by trying to install my app. "Parse error. There was a problem parsing the package" Is something wrong with t

  • How to :Logging or System.out.println????

    Hi, Iam not able to see any System.out.println output in SAP? where exactly can i see it? any configuration required to enable logging? if so how?? please help

  • White edges on PDF page

    Hi there. I am currently producing a newsletter and have found that, once converted into a pdf file, very fine white edges are becoming visible on the document. I have laid down on the page a few images and text boxes that bleed off the sides of the

  • Quicktime render errors-output module fails

    Hi everyone, I'm having more and more trouble lately rendering out a simple uncompressed (codec = none) 1280x720 or 1920 x 1080 Quicktime. This used to be my standard output format, ready for further encoding. But now almost every render to uncompres