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: 313

		l_updated_quantity := p_quantity;
Line: 315

			l_updated_quantity2 := p_quantity2; -- 04/20/2001 OPM
Line: 318

		l_updated_quantity := l_line_tbl(1).shipped_quantity + p_quantity;
Line: 320

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

      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: 334

      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 ( P_QUANTITY ) ||'<'||TO_CHAR ( L_LINE_TBL ( 1 ) .ORDERED_QUANTITY+L_TOLERANCE_BELOW ) , 1 ) ;
Line: 355

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

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

      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: 405

		l_updated_quantity := p_quantity;
Line: 407

			l_updated_quantity2 := p_quantity2; -- 04/20/2001 OPM
Line: 410

		l_updated_quantity := l_line_tbl(1).fulfilled_quantity + p_quantity;
Line: 412

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

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

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

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

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

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

      l_updated_quantity := l_line_tbl(1).shipped_quantity - p_quantity;
Line: 447

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

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

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

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

	     l_updated_quantity := l_line_tbl(1).shipped_quantity + p_quantity;
Line: 500

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

         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: 510

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

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

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

	    l_updated_quantity := l_line_tbl(1).shipped_quantity + p_quantity;
Line: 552

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

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

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

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

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

           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: 587

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

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

              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: 614

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

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

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

	            l_updated_quantity := l_open_line_rec.ordered_quantity -
                                      p_quantity;
Line: 641

	            l_open_line_rec.ordered_quantity := l_updated_quantity;
Line: 643

	    	 	    l_updated_quantity2 := l_open_line_rec.ordered_quantity2 -
                                           p_quantity2; -- 04/20/2001 OPM
Line: 645

	        	    l_open_line_rec.ordered_quantity2 := l_updated_quantity2;
Line: 647

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

            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: 684

          l_updated_quantity := p_quantity;
Line: 686

			l_updated_quantity2 := p_quantity2; -- 04/20/2001 OPM
Line: 689

          l_updated_quantity := l_line_tbl(1).fulfilled_quantity + p_quantity;
Line: 691

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

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

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

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

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

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

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

      l_updated_quantity := l_line_tbl(1).shipped_quantity - p_quantity;
Line: 761

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

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

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

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

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

      l_updated_quantity := l_line_tbl(1).fulfilled_quantity - p_quantity;
Line: 809

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

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

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

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

      l_updated_quantity := l_line_tbl(1).fulfilled_quantity + p_quantity;
Line: 827

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

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

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

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

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

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

		l_updated_quantity := p_quantity;
Line: 930

			l_updated_quantity2 := p_quantity2; -- 04/20/2001 OPM
Line: 933

		l_updated_quantity := l_line_tbl(1).shipped_quantity + p_quantity;
Line: 935

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

      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: 949

      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 ( P_QUANTITY ) ||'<'||TO_CHAR ( L_LINE_TBL ( 1 ) .ORDERED_QUANTITY+L_TOLERANCE_BELOW ) , 1 ) ;
Line: 963

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

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

      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: 1113

               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: 1136

               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: 1221

  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: 1276

  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: 1293

          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: 1352

     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;