DBA Data[Home] [Help]

APPS.WSH_SC_TRX_INTERFACE SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 56

         SELECT del.transaction_id
         FROM   wsh_deliveries_interface          del,
      	        wsh_picking_details_interface     dtl
         WHERE  nvl( dtl.shipped_quantity, 0 ) <> 0
           AND  dtl.rowid <> chartorowid(x_rowid)
           AND  del.transaction_id = dtl.transaction_id
           AND  del.process_flag = 1
           AND  dtl.serial_number =  X_sn
           AND  (check_item = 'Y' and (dtl.inventory_item_id = X_item_id
                OR dtl.inventory_item = X_item_concat_segs)
                OR check_item <> 'Y')
           AND  dtl.warehouse_id = decode(check_org,  'Y', X_warehouse_id, dtl.warehouse_id);
Line: 70

         SELECT serial_number_type
         FROM   MTL_PARAMETERS
         WHERE  organization_id = X_warehouse_id;
Line: 176

         select serial_number_type
         from   MTL_PARAMETERS
         where  organization_id = X_warehouse_id;
Line: 212

     SELECT SOPLS.PICKING_HEADER_ID, SOPLS.SEQUENCE_NUMBER
     FROM   mtl_serial_numbers s,
            so_picking_lines_all sopls,
	    so_picking_line_details_all sopld
     WHERE  sopld.picking_line_id = sopls.picking_line_id
	    and sopls.picking_line_ID <> :X_line_id
	    and sopls.inventory_item_id = :X_item_id
	    and nvl( sopls.warehouse_id,:X_warehouse_id ) =  :X_warehouse_id
	    and nvl( sopld.shipped_quantity, 0 ) <> 0
	    and (sopld.fm_serial_number <=  :X_to_sn
            and sopld.to_serial_number >=  :x_sn)
            and s.inventory_item_id (+)= :X_item_id
            and s.serial_number (+) between greatest(sopld.fm_serial_number,:x_sn)
            and least (sopld.to_serial_number,:X_to_sn)
            and (nvl(s.current_status,1) not in (1,3)
            or  nvl(sopls.inventory_status, 'NO VALUE') <> 'INTERFACED'
            or  exists (select 'serial number not yet yet interfaced'
                FROM  mtl_serial_numbers_interface si,
                      mtl_transactions_interface ti
                WHERE si.fm_serial_number between greatest(sopld.fm_serial_number,:x_sn)
                      and least (sopld.to_serial_number,:X_to_sn)
            	      and ti.source_code     =   si.source_code
            	      and ti.source_line_id  =   si.source_line_id
            	      and ti.inventory_item_id = sopls.inventory_item_id
            	      and ti.organization_id =   sopld.warehouse_id ))
     ORDER BY sopls.picking_header_id desc
     ***/

     if X_SERIAL_NUMBER_CONTROL_CODE in ('Y','D') then
        X_Stmt := X_Stmt || ' SELECT SOPLS.PICKING_HEADER_ID, ';
Line: 275

        X_Stmt := X_Stmt || '    OR  exists (SELECT ''serial number not yet yet interfaced'' ';
Line: 358

  PROCEDURE Update_SOPLD_Row
        (X_picking_line_id            in number,
         X_picking_line_detail_id     in number,
         X_requested_quantity         in number,
         X_shipped_quantity           in number,
	 X_warehouse                  in number,
	 X_sn                         in varchar2,
         x_lot                        in varchar2,
         x_revision                   in varchar2,
         x_subinventory               in varchar2,
         x_locator_id                 in number,
         x_departure_id               in number,
         x_delivery_id                in number,
         x_container_id               in number,
         x_context                    in varchar2,
	 x_dpw_assigned_flag 	      in varchar2,
         x_att1  in varchar2, x_att2  in varchar2, x_att3  in varchar2, x_att4  in varchar2,
         x_att5  in varchar2, x_att6  in varchar2, x_att7  in varchar2, x_att8  in varchar2,
         x_att9  in varchar2, x_att10 in varchar2, x_att11 in varchar2, x_att12 in varchar2,
         x_att13 in varchar2, x_att14 in varchar2, x_att15 in varchar2,
         error_code                   in out varchar2) is

  BEGIN

     BEGIN
        error_code:='0';
Line: 408

           UPDATE SO_PICKING_LINE_DETAILS pld
           SET Last_update_date	        = sysdate,
	       Last_updated_by		= fnd_global.user_id,
	       Last_update_login	= fnd_global.user_id,
	       Warehouse_id		= nvl(X_warehouse, warehouse_id),
               Requested_quantity       = requested_quantity + x_requested_quantity,
	       Shipped_quantity         = nvl(SHIPPED_QUANTITY,0) + x_shipped_quantity,
	       Serial_number		= nvl(X_SN,        serial_number),
	       Lot_number		= nvl(X_LOT,       lot_number),
	       Revision	                = nvl(X_REVISION,  revision),
	       Subinventory		= nvl(X_SUBINVENTORY,subinventory),
	       Inventory_location_id	= nvl(X_LOCATOR_ID,inventory_location_id),
               Departure_id             = nvl(X_DEPARTURE_ID,departure_id),
               Delivery_id             = nvl(X_DELIVERY_ID, delivery_id),
               Container_id            = nvl(X_CONTAINER_ID,container_id),
               Context                 = x_context,
	       DPW_assigned_flag	= decode(nvl(nvl(X_DELIVERY_ID, delivery_id),nvl(X_DEPARTURE_ID,departure_id)),
                                          null, x_dpw_assigned_flag,null),
               Attribute1 = x_att1,   Attribute2 = x_att2,   Attribute3 = x_att3,   Attribute4 = x_att4,
               Attribute5 = x_att5,   Attribute6 = x_att6,   Attribute7 = x_att7,   Attribute8 = x_att8,
               Attribute9 = x_att9,   Attribute10 = x_att10, Attribute11 = x_att11, Attribute12 = x_att12,
               Attribute13 = x_att13, Attribute14 = x_att14, Attribute15 = x_att15,
               ( Segment1,  Segment2,  Segment3,  Segment4,  Segment5,
                 Segment6,  Segment7,  Segment8,  Segment9,  Segment10,
                 Segment11, Segment12, Segment13, Segment14, Segment15,
                 Segment16, Segment17, Segment18, Segment19, Segment20)
               = ( SELECT Segment1,  Segment2,  Segment3,  Segment4,  Segment5,
                          Segment6,  Segment7,  Segment8,  Segment9,  Segment10,
                          Segment11, Segment12, Segment13, Segment14, Segment15,
                          Segment16, Segment17, Segment18, Segment19, Segment20
                   FROM MTL_ITEM_LOCATIONS
                   WHERE inventory_location_id = nvl(x_locator_id,pld.inventory_location_id))
           WHERE pld.picking_line_id = X_picking_line_id
                 and pld.picking_line_detail_id = nvl(X_picking_line_detail_id, pld.picking_line_detail_id)
                 and ( (nvl(serial_number,nvl(x_sn,'~')) = nvl(X_sn,'~') and requested_quantity = x_shipped_quantity)
                       or
                       nvl(serial_number,'~') = nvl(X_sn,'~') )  -- vms
                 and nvl(lot_number,nvl(X_lot,'~'))     = nvl(X_lot,'~')
                 and nvl(revision,nvl(X_revision,'~'))  = nvl(X_revision,'~')
                 and   nvl(subinventory,nvl(X_subinventory,'~'))   = nvl(X_subinventory,'~')
                 and   nvl(inventory_location_id,nvl(X_locator_id,'-1'))     = nvl(X_locator_id,'-1')
                 and   nvl(delivery_id, nvl(x_delivery_id,-1)) = nvl(x_delivery_id,-1)
                 and   nvl(container_id, nvl(x_container_id,-1)) = nvl(x_container_id,-1)
                 and   rownum < 2;
Line: 454

	FND_MESSAGE.Set_Token('PACKAGE','WSH_SC_TRX_INTERFACE.update_sopld');
Line: 461

         wsh_del_oi_core.println('BUT could not update so_picking_line_details.');
Line: 467

  END Update_SOPLD_Row;
Line: 496

  PROCEDURE Insert_Sopld_Row
        (X_parent_detail_id           in number,
	 new_pld_id		  in out number,
	 X_pick_slip_number           in number,
         X_requested_quantity         in number,
         X_shipped_quantity           in number,
	 X_warehouse_id               in number,
	 X_sn                         in varchar2,
         x_lot                        in varchar2,
         x_revision                   in varchar2,
         x_subinventory               in varchar2,
         x_locator_id                 in number,
         x_departure_id               in number,
         x_delivery_id                in number,
         x_container_id               in number,
         x_context                    in varchar2,

         x_att1  in varchar2, x_att2  in varchar2, x_att3  in varchar2, x_att4  in varchar2,
         x_att5  in varchar2, x_att6  in varchar2, x_att7  in varchar2, x_att8  in varchar2,
         x_att9  in varchar2, x_att10 in varchar2, x_att11 in varchar2, x_att12 in varchar2,
         x_att13 in varchar2, x_att14 in varchar2, x_att15 in varchar2) is
  BEGIN

     SELECT SO_PICKING_LINE_DETAILS_S.NEXTVAL into new_pld_id from DUAL;
Line: 536

     INSERT INTO SO_PICKING_LINE_DETAILS(
	       PICKING_LINE_DETAIL_ID
	,      PICK_SLIP_NUMBER
	,      LAST_UPDATE_DATE
	,      LAST_UPDATED_BY
	,      LAST_UPDATE_LOGIN
	,      CREATION_DATE
	,      CREATED_BY
	,      PICKING_LINE_ID
	,      DETAIL_TYPE_CODE
	,      WAREHOUSE_ID
	,      REQUESTED_QUANTITY
	,      SHIPPED_QUANTITY
	,      SERIAL_NUMBER
	,      LOT_NUMBER
	,      CUSTOMER_REQUESTED_LOT_FLAG
	,      REVISION
	,      SUBINVENTORY
	,      INVENTORY_LOCATION_ID
	,      SEGMENT1,  SEGMENT2,  SEGMENT3,  SEGMENT4,  SEGMENT5,
	       SEGMENT6,  SEGMENT7,  SEGMENT8,  SEGMENT9,  SEGMENT10,
	       SEGMENT11, SEGMENT12, SEGMENT13, SEGMENT14, SEGMENT15,
	       SEGMENT16, SEGMENT17, SEGMENT18, SEGMENT19, SEGMENT20,
	       INVENTORY_LOCATION_SEGMENTS
	,      CONTEXT
	,      ATTRIBUTE1,  ATTRIBUTE2,  ATTRIBUTE3,  ATTRIBUTE4,  ATTRIBUTE5,
	       ATTRIBUTE6,  ATTRIBUTE7,  ATTRIBUTE8,  ATTRIBUTE9,  ATTRIBUTE10,
	       ATTRIBUTE11, ATTRIBUTE12, ATTRIBUTE13, ATTRIBUTE14, ATTRIBUTE15,
	       RELEASED_FLAG
	,      SCHEDULE_DATE
	,      SCHEDULE_STATUS_CODE
	,      SCHEDULE_LEVEL
	,      TRANSACTABLE_FLAG
	,      RESERVABLE_FLAG
	,      LATEST_ACCEPTABLE_DATE
	,      AUTOSCHEDULED_FLAG
	,      DEMAND_ID
	,      DELIVERY
	,      DEMAND_CLASS_CODE
	,      UPDATE_FLAG
	,      SUPPLY_SOURCE_TYPE
	,      SUPPLY_SOURCE_HEADER_ID
        ,      DEPARTURE_ID
        ,      DELIVERY_ID
        ,      CONTAINER_ID
	,      DPW_ASSIGNED_FLAG)
    	SELECT  new_pld_id,
		X_pick_slip_number,
	        SYSDATE,
		FND_GLOBAL.USER_ID,
		FND_GLOBAL.USER_ID,
		SYSDATE,
		FND_GLOBAL.LOGIN_ID,
		pld.picking_line_id,
	        detail_type_code,
        	nvl(x_warehouse_id,    pld.warehouse_id),
		x_requested_quantity,
		x_shipped_quantity,
		x_sn,
		nvl(x_lot,             pld.lot_number),
		pld.customer_requested_lot_flag,
		nvl(x_revision,        pld.revision),
		nvl(x_subinventory,    pld.subinventory),
		nvl(x_locator_id,      pld.inventory_location_id),
                m.Segment1,  m.Segment2,  m.Segment3,  m.Segment4,  m.Segment5,
                m.Segment6,  m.Segment7,  m.Segment8,  m.Segment9,  m.Segment10,
                m.Segment11, m.Segment12, m.Segment13, m.Segment14, m.Segment15,
                m.Segment16, m.Segment17, m.Segment18, m.Segment19, m.Segment20,
		pld.inventory_location_segments,
		nvl(x_context,pld.context),
		nvl(x_att1,pld.attribute1),   nvl(x_att1,pld.attribute2),
		nvl(x_att1,pld.attribute3),   nvl(x_att1,pld.attribute4),
		nvl(x_att1,pld.attribute5),   nvl(x_att1,pld.attribute6),
		nvl(x_att1,pld.attribute7),   nvl(x_att1,pld.attribute8),
		nvl(x_att1,pld.attribute9),   nvl(x_att1,pld.attribute10),
		nvl(x_att1,pld.attribute11),  nvl(x_att1,pld.attribute12),
		nvl(x_att1,pld.attribute13),  nvl(x_att1,pld.attribute14),
		nvl(x_att1,pld.attribute15),
                pld.released_flag,
		pld.schedule_date,
		pld.schedule_status_code,
		pld.schedule_level,
		pld.transactable_flag,
		pld.reservable_flag,
		pld.latest_acceptable_date,
		pld.autoscheduled_flag,
		pld.demand_id,
		pld.delivery,
		pld.demand_class_code,
		pld.update_flag,
		pld.supply_source_type,
		pld.supply_source_header_id,
                x_departure_id,
                x_delivery_id,
                x_container_id,
		NULL
    	FROM SO_PICKING_LINE_DETAILS PLD,
             MTL_ITEM_LOCATIONS      M
    	WHERE PLD.PICKING_LINE_DETAIL_ID = X_Parent_Detail_Id
          AND m.inventory_location_id (+) = nvl(x_locator_id,pld.inventory_location_id);
Line: 639

	 FND_MESSAGE.Set_Token('PACKAGE','WSH_SC_TRX_INTERFACE.Insert_sopld');
Line: 644

  END Insert_Sopld_Row;
Line: 664

  PROCEDURE Update_requested_quantity
        (X_picking_line_detail_id     in number,
         X_shipped_quantity           in number,
         X_backorder_flag             in boolean,
         error_code                   in out varchar2) is
  BEGIN
    DECLARE
         X_bo	varchar2(10) := 'FALSE';
Line: 678

            wsh_del_oi_core.println('Update requested_quantity will NULL out the dep & del in sopld.');
Line: 681

            UPDATE SO_PICKING_LINE_DETAILS pld
            SET requested_quantity      = requested_quantity - X_shipped_quantity,
                shipped_quantity        = decode(X_bo, 'FALSE' ,NULL,shipped_quantity),
                delivery_id             = decode(X_bo, 'FALSE' ,NULL,delivery_id),
                departure_id            = decode(X_bo, 'FALSE' ,NULL, departure_id),
                dpw_assigned_flag       = decode(X_bo, 'FALSE' ,'N',dpw_assigned_flag)
            WHERE pld.picking_line_detail_id = X_picking_line_detail_id;
Line: 694

	    FND_MESSAGE.Set_Token('PACKAGE','WSH_SC_TRX_INTERFACE.update_requested_quantity');
Line: 705

  END update_requested_quantity;
Line: 753

     WSH_SC_TRX_INTERFACE.update_requested_quantity (X_picking_line_detail_id, X_shipped_quantity,
                                                     X_backorder_flag, error_code);
Line: 762

         WSH_SC_TRX_INTERFACE.insert_sopld_row
          	(X_picking_line_detail_id,
           	new_pld_id,
	 	X_pick_slip_number,
	   	X_shipped_quantity,
	   	X_shipped_quantity,
	   	X_warehouse_id,
	   	X_sn,
	   	X_lot_number,
	   	X_revision,
	   	X_sub,
	   	X_loc,
           	x_departure_id,
           	x_delivery_id,
           	x_container_id,
           	x_context,
           	x_att1,  x_att2,  x_att3,  x_att4,
           	x_att5,  x_att6,  x_att7,  x_att8,
           	x_att9,  x_att10, x_att11, x_att12,
           	x_att13, x_att14, x_att15);
Line: 892

              select sopldi.transaction_id,
    		     sopldi.picking_line_detail_id,

		     ----------------------------------------------------------------------
                     -- items to validate
		     ----------------------------------------------------------------------
    		     sopldi.inventory_item_id            item_id,
    		     sopldi.inventory_item               item_concat_segments,
    		     sopldi.warehouse_id                 warehouse_id,
    		     sopldi.serial_number                sn,
    		     sopldi.lot_number                   lot_number,
    		     sopldi.revision                     revision,
    		     sopldi.subinventory                 subinventory,
    		     sopldi.locator_id                   locator_id,
    		     sopldi.locator_name                 locator_concat_segments,
    		     sopldi.container_id                 container_id,
    		     sopldi.container_sequence           container_sequence,
    		     sopldi.attribute_category context,
    		     sopldi.attribute1,
    		     sopldi.attribute2,
    		     sopldi.attribute3,
    		     sopldi.attribute4,
    		     sopldi.attribute5,
    		     sopldi.attribute6,
    		     sopldi.attribute7,
    		     sopldi.attribute8,
    		     sopldi.attribute9,
    		     sopldi.attribute10,
    		     sopldi.attribute11,
    		     sopldi.attribute12,
    		     sopldi.attribute13,
    		     sopldi.attribute14,
    		     sopldi.attribute15,

		     ----------------------------------------------------------------------
    		     --  Inventory Item Segments
                     ----------------------------------------------------------------------
		     sopldi.item_segment1,
		     sopldi.item_segment2,
		     sopldi.item_segment3,
 		     sopldi.item_segment4,
		     sopldi.item_segment5,
		     sopldi.item_segment6,
		     sopldi.item_segment7,
		     sopldi.item_segment8,
		     sopldi.item_segment9,
		     sopldi.item_segment10,
		     sopldi.item_segment11,
		     sopldi.item_segment12,
		     sopldi.item_segment13,
		     sopldi.item_segment14,
		     sopldi.item_segment15,
		     ----------------------------------------------------------------------
    		     --  Location Segments
                     ----------------------------------------------------------------------
		     sopldi.loc_segment1,
		     sopldi.loc_segment2,
		     sopldi.loc_segment3,
 		     sopldi.loc_segment4,
		     sopldi.loc_segment5,
		     sopldi.loc_segment6,
		     sopldi.loc_segment7,
		     sopldi.loc_segment8,
		     sopldi.loc_segment9,
		     sopldi.loc_segment10,
		     sopldi.loc_segment11,
		     sopldi.loc_segment12,
		     sopldi.loc_segment13,
		     sopldi.loc_segment14,
		     sopldi.loc_segment15,

    		     sopldi.shipped_quantity            shipped_quantity,
    		     rowidtochar(sopldi.rowid)          row_id,

       		     ----------------------------------------------------------------------
    		     --  Valid items from so tables
                     ----------------------------------------------------------------------
    		     sopl.picking_header_id,
    		     sopl.picking_line_id,
    		     sopl.inventory_item_id		sopld_item_id,
    		     sopld.warehouse_id                 sopld_warehouse_id,
		     sopld.pick_slip_number,
    		     sopld.delivery_id                  sopld_delivery_id,
    		     sopld.serial_number		sopld_sn,
    		     sopld.lot_number			sopld_lot_number,
    		     sopld.revision			sopld_revision,
    		     sopld.subinventory   		sopld_subinventory,
    		     sopld.inventory_location_id	sopld_locator_id,
		     sopld.dpw_assigned_flag		sopld_dpw_assigned_flag,

    		     DECODE(X_Reservations,'Y',
    		     DECODE(sopld.reservable_flag,'Y','Y','N'),'N') RESERVATION_PLACED

    		     FROM so_picking_lines_all               	    SOPL,
    			  so_picking_line_details                   SOPLD,
    			  wsh_picking_details_interface             SOPLDI
    		     WHERE sopldi.transaction_id = X_transaction_id
    		       and sopldi.picking_line_detail_id = sopld.picking_line_detail_id
    		       and sopl.picking_line_id = sopld.picking_line_id
    		     ORDER BY sopl.inventory_item_id;
Line: 1472

            SELECT picking_line_detail_id, shipped_quantity, requested_quantity, delivery_id, container_id
            INTO pl_pld_id, pl_shp_qty, pl_req_qty, pl_del, pl_cont
            FROM SO_PICKING_LINE_DETAILS
            WHERE picking_line_detail_id = oirec.picking_line_detail_id;
Line: 1477

            wsh_del_oi_core.println('-----After selection from pld');
Line: 1485

                  wsh_del_oi_core.println('Going to update_line label');
Line: 1486

		  goto update_line;
Line: 1556

	            UPDATE SO_PICKING_LINE_DETAILS SET
      	            DELIVERY_ID = nvl(DELIVERY_ID,x_delivery_id),
      	            DEPARTURE_ID = nvl(DEPARTURE_ID,x_departure_id),
	            SERIAL_NUMBER = nvl(SERIAL_NUMBER,oirec.sn),
		    SHIPPED_QUANTITY = NVL(SHIPPED_QUANTITY,0) + oirec.shipped_quantity,
	            DPW_ASSIGNED_FLAG = NULL,
	            CONTAINER_ID = nvl(CONTAINER_ID,x_container_id),
	            WAREHOUSE_ID = nvl(WAREHOUSE_ID,valid_warehouse_id),
	            LAST_UPDATE_DATE = sysdate,
	            LAST_UPDATED_BY = fnd_global.user_id,
	            LAST_UPDATE_LOGIN = fnd_global.user_id
	            WHERE PICKING_LINE_DETAIL_ID = new_pld_id;
Line: 1579

                      FND_MESSAGE.Set_Token('PACKAGE','WSH_SC_TRX_INTERFACE.update_sopld1');
Line: 1596

       <>

       wsh_del_oi_core.println('Into the Update_line label.');
Line: 1599

       wsh_del_oi_core.println('Going for update of pld:'||
			       to_char(oirec.picking_line_detail_id) );
Line: 1606

       WSH_SC_TRX_INTERFACE.update_sopld_row
           (oirec.picking_line_id,
            oirec.picking_line_detail_id,
            0,
            oirec.shipped_quantity,
	    valid_warehouse_id,
	    oirec.sn,
            valid_lot,
            valid_revision,
            valid_sub,
            valid_loc,
            x_departure_id,
            x_delivery_id,
            x_container_id,
            oirec.context,
 	    oirec.sopld_dpw_assigned_flag,
            oirec.attribute1,  oirec.attribute2,  oirec.attribute3,  oirec.attribute4,
            oirec.attribute5,  oirec.attribute6,  oirec.attribute7,  oirec.attribute8,
            oirec.attribute9,  oirec.attribute10, oirec.attribute11, oirec.attribute12,
            oirec.attribute13, oirec.attribute14, oirec.attribute15,
            error_code);
Line: 1644

          wsh_del_oi_core.println(substr(('Could not update SOPLD using detail_id:: splitting  row '||
          to_char(oirec.picking_line_id)||','||to_char(oirec.picking_line_detail_id)||','||
          to_char(valid_warehouse_id)||','||
          valid_lot||','||valid_revision||','||
          valid_sub||','||valid_loc),1,2000));
Line: 1679

       DELETE from wsh_picking_details_interface
       WHERE picking_line_detail_id = oirec.picking_line_detail_id and rowid = oirec.row_id;
Line: 1776

        select creation_date,
	   created_by,
	   last_update_date,
	   last_updated_by,
	   last_update_login,
	   freight_charge_type_id,
	   freight_charge_type_desc,
	   amount,
	   currency_code,
	   currency_name,
           decode(delivery_flag,NULL,NULL,x_delivery_id) delivery_id,
           container_id, container_sequence,
	   order_header_id,
           picking_line_detail_id,
           attribute_category,
	   attribute1,	attribute2,  attribute3,  attribute4,  attribute5,
	   attribute6,	attribute7,  attribute8,  attribute9,  attribute10,
	   attribute11,	attribute12, attribute13, attribute14, attribute15,
           ac_attribute_category,
	   ac_attribute1, ac_attribute2, ac_attribute3, ac_attribute4, ac_attribute5,
	   ac_attribute6, ac_attribute7, ac_attribute8, ac_attribute9, ac_attribute10,
	   ac_attribute11,ac_attribute12,ac_attribute13,ac_attribute14,ac_attribute15,
           rowidtochar(rowid) char_rowid
    from   wsh_freight_charges_interface sfci
    where  transaction_id = X_transaction_id;
Line: 2007

	   select max(ph.picking_header_id) into x_picking_header_id
	   from so_picking_line_details pld,
	        so_picking_lines_all pl,
	        so_picking_headers_all ph,
	        so_headers_all h
           where pld.delivery_id = x_delivery_id
             and pld.picking_line_id = pl.picking_line_id
             and pl.picking_header_id + 0 > 0
	     and pl.picking_header_id = ph.picking_header_id
             and ph.order_header_id = h.header_id
	     and h.header_id = x_order_header_id;
Line: 2022

       	     wsh_del_oi_core.println('Process failed while selecting order header id');
Line: 2036

	   INSERT INTO SO_FREIGHT_CHARGES(
	     picking_header_id,
	     freight_charge_id,
             creation_date,
             created_by,
             last_update_date,
             last_updated_by,
             last_update_login,
             freight_charge_type_id,
             amount,
             currency_code,
             delivery_id,
             container_id,
             picking_line_detail_id,
             interco_invoice_status,
             context,
             attribute1,  attribute2,  attribute3,  attribute4,  attribute5,
	     attribute6,  attribute7,  attribute8,  attribute9,  attribute10,
	     attribute11, attribute12, attribute13, attribute14, attribute15,
             ac_attribute_category,
	     ac_attribute1, ac_attribute2, ac_attribute3, ac_attribute4, ac_attribute5,
	     ac_attribute6, ac_attribute7, ac_attribute8, ac_attribute9, ac_attribute10,
	     ac_attribute11,ac_attribute12,ac_attribute13,ac_attribute14,ac_attribute15
             ) VALUES (
	      x_picking_header_id,
	      so_freight_charges_s.nextval,
              sysdate,
              x_Created_By,
              sysdate,
              x_Created_By,
              x_login,
              x_Type_Id,
              nvl(fcrec.amount,0) ,
              valid_cur_code,
              x_delivery_id,
              x_container_id,
              fcrec.picking_line_detail_id,
              'NOT INVOICED',
              fcrec.attribute_category,
	      fcrec.attribute1,	      fcrec.attribute2,	      fcrec.attribute3,
	      fcrec.attribute4,	      fcrec.attribute5,	      fcrec.attribute6,
	      fcrec.attribute7,	      fcrec.attribute8,	      fcrec.attribute9,
	      fcrec.attribute10,      fcrec.attribute11,      fcrec.attribute12,
	      fcrec.attribute13,      fcrec.attribute14,      fcrec.attribute15,
              fcrec.ac_attribute_category,
	      fcrec.ac_attribute1, fcrec.ac_attribute2, fcrec.ac_attribute3,
	      fcrec.ac_attribute4, fcrec.ac_attribute5, fcrec.ac_attribute6,
	      fcrec.ac_attribute7, fcrec.ac_attribute8, fcrec.ac_attribute9,
	      fcrec.ac_attribute10,fcrec.ac_attribute11,fcrec.ac_attribute12,
	      fcrec.ac_attribute13,fcrec.ac_attribute14,fcrec.ac_attribute15);
Line: 2090

	     FND_MESSAGE.Set_Token('PACKAGE','WSH_SC_TRX_INTERFACE.insert_freight_charges statement');
Line: 2104

      DELETE from wsh_freight_charges_interface
      WHERE  freight_charge_type_id = fcrec.freight_charge_type_id and rowid = fcrec.char_rowid;
Line: 2107

      wsh_del_oi_core.println('DELETED freight_charge_type_id = '||to_char(fcrec.freight_charge_type_id));
Line: 2127

        FND_MESSAGE.Set_Token('PACKAGE','WSH_SC_TRX_INTERFACE.insert_freight_charges');
Line: 2129

        FND_MESSAGE.Set_Token('ORA_TEXT','Insert statement');