DBA Data[Home] [Help]

APPS.OE_RMA_RECEIVING SQL Statements

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

Line: 160

l_updated_quantity			NUMBER;
Line: 163

l_updated_quantity2			NUMBER; -- 04/20/2001 OPM
Line: 312

      oe_debug_pub.add(  'Planning to update shipped qty with secondary qty with qty:  '||l_quantity ) ;
Line: 333

		l_updated_quantity := l_quantity;
Line: 335

			l_updated_quantity2 := l_quantity2; -- 04/20/2001 OPM
Line: 338

		l_updated_quantity := l_line_tbl(1).shipped_quantity + l_quantity;
Line: 340

			l_updated_quantity2 := l_line_tbl(1).shipped_quantity2 + l_quantity2; -- 04/20/2001 OPM
Line: 345

      IF (l_updated_quantity >
        l_line_tbl(1).ordered_quantity + l_tolerance_above) THEN
 		FND_MESSAGE.Set_Name('ONT', 'OE_RETURN_INVALID_RCVD_QTY');
Line: 354

      IF (l_updated_quantity <
        l_line_tbl(1).ordered_quantity - l_tolerance_below) then

         IF l_debug_level  > 0 THEN
             oe_debug_pub.add(  'UNDER RETURN:'||TO_CHAR ( l_quantity ) ||'<'||TO_CHAR ( L_LINE_TBL ( 1 ) .ORDERED_QUANTITY+L_TOLERANCE_BELOW ) , 1 ) ;
Line: 389

        l_line_tbl(1).operation 			:= OE_GLOBALS.G_OPR_UPDATE;
Line: 408

        l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 413

      SELECT MAX(transaction_date)
      INTO l_line_tbl(1).actual_shipment_date
      FROM rcv_transactions
      WHERE  transaction_type = 'RECEIVE'
      AND    oe_order_line_id = l_line_tbl(1).line_id;
Line: 439

		l_updated_quantity := l_quantity;
Line: 441

			l_updated_quantity2 := l_quantity2; -- 04/20/2001 OPM
Line: 444

		l_updated_quantity := l_line_tbl(1).fulfilled_quantity + l_quantity;
Line: 446

			l_updated_quantity2 := l_line_tbl(1).fulfilled_quantity2 + l_quantity2; -- 04/20/2001 OPM
Line: 451

      IF (l_line_tbl(1).shipped_quantity < l_updated_quantity ) THEN
 		FND_MESSAGE.Set_Name('ONT', 'OE_RETURN_INVALID_DLVR_QTY');
Line: 458

      l_line_tbl(1).fulfilled_quantity := l_updated_quantity;
Line: 460

		l_line_tbl(1).fulfilled_quantity2 := l_updated_quantity2; -- 04/20/2001 OPM
Line: 462

      l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 464

      IF (l_line_tbl(1).shipped_quantity = l_updated_quantity) THEN
		b_complete_inspection := TRUE;
Line: 479

      l_updated_quantity := l_line_tbl(1).shipped_quantity - l_quantity;
Line: 481

      		l_updated_quantity2 := l_line_tbl(1).shipped_quantity2 - l_quantity2; -- 04/20/2001 OPM
Line: 482

      		l_line_tbl(1).shipped_quantity2 := l_updated_quantity2;
Line: 484

      l_line_tbl(1).shipped_quantity := l_updated_quantity;
Line: 485

      l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 536

	     l_updated_quantity := l_line_tbl(1).shipped_quantity + l_quantity;
Line: 538

              l_updated_quantity2 := l_line_tbl(1).shipped_quantity2 +
                                     l_quantity2; -- 04/20/2001 OPM
Line: 542

         IF l_updated_quantity <=
	   		(l_line_tbl(1).ordered_quantity + l_tolerance_above) THEN
              IF l_debug_level  > 0 THEN
                 oe_debug_pub.add('Change is within tolerance' ) ;
Line: 548

	          l_line_tbl(1).shipped_quantity := l_updated_quantity;
Line: 550

	      		l_line_tbl(1).shipped_quantity2 := l_updated_quantity2; -- 04/20/2001 OPM
Line: 552

	          l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 589

	    l_updated_quantity := l_line_tbl(1).shipped_quantity + l_quantity;
Line: 590

	    l_line_tbl(1).shipped_quantity := l_updated_quantity;
Line: 592

	    	l_updated_quantity2 := l_line_tbl(1).shipped_quantity2 + l_quantity2; -- 04/20/2001 OPM
Line: 593

	    	l_line_tbl(1).shipped_quantity := l_updated_quantity;
Line: 596

	    l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 602

              oe_debug_pub.add('No Open Line: l_updated QTY is '
                                ||l_updated_quantity);
Line: 605

           IF ( l_updated_quantity not between
			(l_line_tbl(1).ordered_quantity - l_tolerance_below) and
	   		(l_line_tbl(1).ordered_quantity + l_tolerance_above)) OR
            ( l_updated_quantity = 0 ) THEN
	          -- split line if the l_updated_quantity is > 0.
              IF l_updated_quantity > 0 THEN
                  l_open_line_rec.db_flag := FND_API.G_FALSE;
Line: 625

	              l_line_tbl(1).ordered_quantity := l_updated_quantity;
Line: 627

                     l_line_tbl(1).ordered_quantity2 := l_updated_quantity2;
Line: 634

              ELSIF l_updated_quantity = 0 THEN
                  -- Take the received line back to AWAITING_RETURN
                  IF l_debug_level  > 0 THEN
                       oe_debug_pub.add('Take the line back to AWAITING_RETURN' );
Line: 652

           END IF; -- IF l_updated_quantity not between
Line: 664

            IF l_updated_quantity > 0 THEN
                -- Correct the quantity on original line
	            l_line_tbl(1).ordered_quantity := l_updated_quantity;
Line: 668

                   l_line_tbl(1).ordered_quantity2 := l_updated_quantity2;
Line: 677

	            l_updated_quantity := l_open_line_rec.ordered_quantity -
                                      l_quantity;
Line: 679

	            l_open_line_rec.ordered_quantity := l_updated_quantity;
Line: 681

	    	 	    l_updated_quantity2 := l_open_line_rec.ordered_quantity2 -
                                           l_quantity2; -- 04/20/2001 OPM
Line: 683

	        	    l_open_line_rec.ordered_quantity2 := l_updated_quantity2;
Line: 685

	            l_open_line_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 694

            ELSIF l_updated_quantity = 0 THEN
                -- Take the received line back to AWAITING_RETURN
                IF l_debug_level  > 0 THEN
                   oe_debug_pub.add('Taking the line back to AWAITING_RETURN');
Line: 729

          l_updated_quantity := l_quantity;
Line: 731

			l_updated_quantity2 := l_quantity2; -- 04/20/2001 OPM
Line: 734

          l_updated_quantity := l_line_tbl(1).fulfilled_quantity + l_quantity;
Line: 736

			l_updated_quantity2 := l_line_tbl(1).fulfilled_quantity2 + l_quantity2; -- 04/20/2001 OPM
Line: 741

      IF (l_line_tbl(1).shipped_quantity < l_updated_quantity ) THEN
 		FND_MESSAGE.Set_Name('ONT', 'OE_RETURN_INVALID_DLVR_QTY');
Line: 749

      l_line_tbl(1).fulfilled_quantity := l_updated_quantity;
Line: 751

		l_line_tbl(1).fulfilled_quantity2 := l_updated_quantity2; -- 04/20/2001 OPM
Line: 776

         l_line_tbl(1).fulfilled_quantity := l_updated_quantity;
Line: 778

                l_line_tbl(1).fulfilled_quantity2 := l_updated_quantity2;
Line: 785

      l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 804

      l_updated_quantity := l_line_tbl(1).shipped_quantity - l_quantity;
Line: 806

      		l_updated_quantity2 := l_line_tbl(1).shipped_quantity2 - l_quantity2; -- 04/20/2001 OPM
Line: 807

      		l_line_tbl(1).shipped_quantity2 := l_updated_quantity2;
Line: 809

      l_line_tbl(1).shipped_quantity := l_updated_quantity;
Line: 810

      l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 852

      l_line_tbl(1).operation 		:= OE_GLOBALS.G_OPR_UPDATE;
Line: 864

      l_updated_quantity := l_line_tbl(1).fulfilled_quantity - l_quantity;
Line: 865

      l_line_tbl(1).fulfilled_quantity := l_updated_quantity;
Line: 867

      	l_updated_quantity2 := l_line_tbl(1).fulfilled_quantity2 - l_quantity2; -- 04/20/2001 OPM
Line: 868

        l_line_tbl(1).fulfilled_quantity2 := l_updated_quantity2;
Line: 870

      l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 882

      l_updated_quantity := l_line_tbl(1).fulfilled_quantity + l_quantity;
Line: 883

      l_line_tbl(1).fulfilled_quantity := l_updated_quantity;
Line: 885

      	l_updated_quantity2 := l_line_tbl(1).fulfilled_quantity2 + l_quantity2; -- 04/20/2001 OPM
Line: 886

      	l_line_tbl(1).fulfilled_quantity2 := l_updated_quantity2;
Line: 888

      l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 935

      l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 964

      l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 984

		l_updated_quantity := l_quantity;
Line: 986

			l_updated_quantity2 := l_quantity2; -- 04/20/2001 OPM
Line: 989

		l_updated_quantity := l_line_tbl(1).shipped_quantity + l_quantity;
Line: 991

			l_updated_quantity2 := l_line_tbl(1).shipped_quantity2 + l_quantity2; -- 04/20/2001 OPM
Line: 996

      IF (l_updated_quantity >
        l_line_tbl(1).ordered_quantity + l_tolerance_above) THEN
 		FND_MESSAGE.Set_Name('ONT', 'OE_RETURN_INVALID_RCVD_QTY');
Line: 1005

      IF (l_updated_quantity <
        l_line_tbl(1).ordered_quantity - l_tolerance_below) then

         IF l_debug_level  > 0 THEN
             oe_debug_pub.add(  'UNDER RETURN:'||TO_CHAR ( l_quantity ) ||'<'||TO_CHAR ( L_LINE_TBL ( 1 ) .ORDERED_QUANTITY+L_TOLERANCE_BELOW ) , 1 ) ;
Line: 1019

        l_line_tbl(1).operation 			:= OE_GLOBALS.G_OPR_UPDATE;
Line: 1040

        l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 1047

      SELECT MAX(transaction_date)
      INTO l_line_tbl(1).actual_shipment_date
      FROM rcv_transactions
      WHERE  transaction_type = 'UNORDERED'
      AND oe_order_line_id = l_line_tbl(1).line_id;
Line: 1197

               OE_Order_WF_Util.Update_Flow_Status_Code
                    (p_line_id               =>  to_number(l_item_key),
                     p_flow_status_code      =>  'AWAITING_RETURN_DISPOSITION',
                     x_return_status         =>  l_return_status
                     );
Line: 1220

               OE_Order_WF_Util.Update_Flow_Status_Code
                    (p_line_id               =>  to_number(l_item_key),
                     p_flow_status_code      =>  'RETURNED',
                     x_return_status         =>  l_return_status
                     );
Line: 1243

               OE_Order_WF_Util.Update_Flow_Status_Code
                    (p_line_id               =>  to_number(l_item_key),
                     p_flow_status_code      =>  'AWAITING_RETURN',
                     x_return_status         =>  l_return_status
                     );
Line: 1330

  SELECT 	l.line_id
  INTO		l_open_line_id
  FROM		oe_order_lines l,
                wf_item_activity_statuses wf,
                wf_process_activities wpa
  WHERE		l.open_flag = 'Y'
  and  		wpa.activity_item_type='OEOL'
  and 		wpa.activity_name='RMA_WAIT_FOR_RECEIVING'
  and 		wf.item_type='OEOL'
  and 		wf.process_activity=wpa.instance_id
  and 		wf.activity_status='NOTIFIED'
--  and 		l.line_id=to_number(wf.item_key)
  and 		to_char(l.line_id) = wf.item_key    --FP bug#5758850
  and 		l.line_set_id = p_line_rec.line_set_id
  and 		l.shipped_quantity is null
  and 		l.line_id<>p_line_rec.line_id
  and       rownum = 1;
Line: 1385

  SELECT open_flag,
         invoice_interface_status_code,
         ordered_quantity,
         shipped_quantity,
         line_set_id
  INTO   l_open_flag,
         l_inv_interface_status_code,
         l_ordered_quantity,
         l_shipped_quantity,
         l_line_set_id
  FROM OE_ORDER_LINES_ALL
  WHERE line_id = p_rma_line_id;
Line: 1402

          select l.ordered_quantity
           into x_quantity
           from oe_order_lines_all l,
                wf_item_activity_statuses wf,
                wf_process_activities wpa
           where l.open_flag = 'Y'
           and  wpa.activity_item_type='OEOL'
           and wpa.activity_name='RMA_WAIT_FOR_RECEIVING'
           and wf.item_type='OEOL'
           and wf.process_activity=wpa.instance_id
           and wf.activity_status='NOTIFIED'
--           and l.line_id=to_number(wf.item_key)
           and to_char(l.line_id) = wf.item_key     -- FP bug#5758850
           and l.line_set_id = l_line_set_id
           and l.shipped_quantity is null and l.line_id<>p_RMA_line_id;
Line: 1461

     Select SHIP_TOLERANCE_BELOW, SHIP_TOLERANCE_ABOVE
     into x_Under_Return_Tolerance,x_Over_Return_Tolerance
     from oe_order_lines_all
     Where line_id = p_RMA_Line_ID;