DBA Data[Home] [Help]

APPS.INV_LABEL_PVT6 SQL Statements

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

Line: 56

		SELECT secondary_inventory_name
		FROM mtl_secondary_inventories
		WHERE organization_id = l_organization_id;
Line: 60

		SELECT msi.secondary_inventory_name, milkfv.inventory_location_id
		FROM mtl_secondary_inventories msi
			,mtl_item_locations milkfv
		WHERE msi.organization_id = l_organization_id
		AND	  msi.secondary_inventory_name = nvl(l_subinventory_code, msi.secondary_inventory_name)
		AND	  milkfv.organization_id(+) = l_organization_id
		AND	  milkfv.subinventory_code(+)  = msi.secondary_inventory_name;
Line: 69

		SELECT
			mp.organization_id    organization_id
		,  mp.organization_code    organization
		,  msi.secondary_inventory_name     subinventory_code
		,  msi.description            subinventory_description
		,  msi.status_id           status_id
		,  mmsvl1.status_code          subinventory_status
		,  msi.pick_uom_code          subinventory_pick_uom
		,  msi.attribute_category        subinv_attribute_category
		,  msi.attribute1          subinventory_attribute1
		,  msi.attribute2          subinventory_attribute2
		,  msi.attribute3          subinventory_attribute3
		,  msi.attribute4          subinventory_attribute4
		,  msi.attribute5          subinventory_attribute5
		,  msi.attribute6          subinventory_attribute6
		,  msi.attribute7          subinventory_attribute7
		,  msi.attribute8          subinventory_attribute8
		,  msi.attribute9          subinventory_attribute9
		,  msi.attribute10         subinventory_attribute10
		,  msi.attribute11         subinventory_attribute11
		,  msi.attribute11         subinventory_attribute12
		,  msi.attribute13         subinventory_attribute13
		,  msi.attribute14         subinventory_attribute14
		,  msi.attribute15         subinventory_attribute15
		,  msi.picking_order       subinventory_pick_order
		,  msi.default_cost_group_id  subinventory_def_cost_group_id
		,  ccg.cost_group       subinventory_def_cost_group
		,  milkfv.inventory_location_id         locator_id
		,  INV_PROJECT.GET_LOCSEGS(milkfv.inventory_location_id,milkfv.organization_id)  locator
		,  milkfv.description      locator_description
		,  milkfv.status_id      locator_status_id
		,  mmsvl2.status_code    locator_status
		,  milkfv.pick_uom_code    locator_pick_uom
		,  milkfv.attribute_category  locator_attribute_category
		,  milkfv.attribute1    locator_attribute1
		,  milkfv.attribute2    locator_attribute2
		,  milkfv.attribute3    locator_attribute3
		,  milkfv.attribute4    locator_attribute4
		,  milkfv.attribute5    locator_attribute5
		,  milkfv.attribute6    locator_attribute6
		,  milkfv.attribute7    locator_attribute7
		,  milkfv.attribute8    locator_attribute8
		,  milkfv.attribute9    locator_attribute9
		,  milkfv.attribute10      locator_attribute10
		,  milkfv.attribute11      locator_attribute11
		,  milkfv.attribute12      locator_attribute12
		,  milkfv.attribute13      locator_attribute13
		,  milkfv.attribute14      locator_attribute14
		,  milkfv.attribute15      locator_attribute15
		,  milkfv.project_id    locator_project_id
		,  pap.name       locator_project
		,  milkfv.task_id    locator_task_id
		,  pat.task_name     locator_task
		,  milkfv.picking_order    locator_pick_order
		,  milkfv.max_weight    locator_weight_capacity
		,  milkfv.location_weight_uom_code  locator_weight_capacity_uom
		,  milkfv.max_cubic_area      locator_volume_capacity
		,  milkfv.volume_uom_code     locator_volume_capacity_uom
		,  milkfv.location_maximum_units    locator_unit_capacity
		,  milkfv.alias    locator_alias
		FROM    mtl_parameters                       mp
			,  mtl_secondary_inventories            msi
			,  mtl_material_statuses_vl             mmsvl1
			,  mtl_material_statuses_vl             mmsvl2
			,  mtl_item_locations               milkfv
			,  pa_tasks                             pat
			,  pa_projects_all                      pap
			,  cst_cost_groups                      ccg
		WHERE	mp.organization_id                   = l_organization_id
		AND		msi.secondary_inventory_name(+)      = l_subinventory_code
		AND		msi.organization_id(+)               = mp.organization_id
		AND		mmsvl1.status_id(+)                  = msi.status_id
		AND		mmsvl2.status_id(+)                  = milkfv.status_id
		AND		milkfv.inventory_location_id(+)      = l_locator_id
		AND		milkfv.subinventory_code(+)          = l_subinventory_code
		AND		milkfv.organization_id(+)            = mp.organization_id
		AND		pap.project_id(+)                    = milkfv.project_id
		AND		pat.task_id(+)                       = milkfv.task_id
		AND		ccg.COST_GROUP_ID(+)                 = msi.DEFAULT_COST_GROUP_ID;
Line: 152

	l_selected_fields INV_LABEL.label_field_variable_tbl_type;
Line: 153

	l_selected_fields_count	NUMBER;
Line: 184

	-- a list of columns that are selected for format
	l_column_name_list LONG;
Line: 259

   	--trace(' Getting selected fields ');
Line: 342

			/* insert a record into wms_label_requests entity to
			call the label rules engine to get appropriate label */
			INV_LABEL.GET_FORMAT_WITH_RULE
			( 	p_document_id        =>p_label_type_info.label_type_id,
				P_LABEL_FORMAT_ID    => p_label_type_info.manual_format_id,
			 	p_organization_id    =>v_location.organization_id,
				p_subinventory_code  =>v_location.subinventory_code,
				p_locator_id         =>v_location.locator_id,
        			P_BUSINESS_FLOW_CODE =>   p_label_type_info.business_flow_code,
				P_LAST_UPDATE_DATE   =>sysdate,
				P_LAST_UPDATED_BY    =>FND_GLOBAL.user_id,
				P_CREATION_DATE      =>sysdate,
				P_CREATED_BY         =>FND_GLOBAL.user_id,
				--P_PRINTER_NAME   =>	l_printer,-- Removed in R12: 4396558
				x_return_status      =>l_return_status,
				x_label_format_id    =>l_label_format_id,
				x_label_format	     =>l_label_format,
				x_label_request_id   =>l_label_request_id);
Line: 436

						x_variables 		=> l_selected_fields
					,	x_variables_count	=> l_selected_fields_count
					,	p_format_id		=> l_label_format_id);
Line: 442

					IF (l_selected_fields_count=0) OR (l_selected_fields.count =0 ) THEN
						IF (l_debug = 1) THEN
   						trace('no fields defined for this format: ' || l_label_format|| ',' ||l_label_format_id);
Line: 449

   					trace('   Found selected_fields for format ' || l_label_format ||', num='|| l_selected_fields_count);
Line: 487

			/* Loop for each selected fields, find the columns and write into the XML_content*/
			FOR i IN 1..l_selected_fields.count LOOP
				IF (l_debug = 1) THEN
   					l_column_name_list := l_column_name_list || ',' ||l_selected_fields(i).column_name;
Line: 500

   		  IF (l_selected_fields(i).SQL_STMT IS NOT NULL AND l_selected_fields(i).column_name = 'sql_stmt') THEN
   			 IF (l_debug = 1) THEN
   			  trace('Custom Labels Trace [INVLAP6B.pls]: ------------------------- REPORT BEGIN-------------------------------------');
Line: 503

   			  trace('Custom Labels Trace [INVLAP6B.pls]: LABEL_FIELD_ID       : ' || l_selected_fields(i).label_field_id);
Line: 504

   			  trace('Custom Labels Trace [INVLAP6B.pls]: FIELD_VARIABLE_NAME  : ' || l_selected_fields(i).variable_name);
Line: 505

   			  trace('Custom Labels Trace [INVLAP6B.pls]: COLUMN_NAME          : ' || l_selected_fields(i).column_name);
Line: 506

   			  trace('Custom Labels Trace [INVLAP6B.pls]: SQL_STMT             : ' || l_selected_fields(i).sql_stmt);
Line: 508

   			 l_sql_stmt := l_selected_fields(i).sql_stmt;
Line: 605

   							   || l_selected_fields(i).variable_name
   							   || '">'
   							   || l_sql_stmt_result
   							   || variable_e;
Line: 617

	         ELSIF LOWER(l_selected_fields(i).column_name) = 'current_date' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || INV_LABEL.G_DATE || VARIABLE_E;
Line: 618

				ELSIF LOWER(l_selected_fields(i).column_name) = 'current_time' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || INV_LABEL.G_TIME || VARIABLE_E;
Line: 619

				ELSIF LOWER(l_selected_fields(i).column_name) = 'request_user' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || INV_LABEL.G_USER || VARIABLE_E;
Line: 620

				ELSIF LOWER(l_selected_fields(i).column_name) = 'organization' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.organization || VARIABLE_E;
Line: 621

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_code' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_code || VARIABLE_E;
Line: 622

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_description' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_description || VARIABLE_E;
Line: 623

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_status' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_status || VARIABLE_E;
Line: 624

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_pick_uom' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_pick_uom || VARIABLE_E;
Line: 625

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinv_attribute_category' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinv_attribute_category || VARIABLE_E;
Line: 626

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute1' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute1 || VARIABLE_E;
Line: 627

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute2' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute2 || VARIABLE_E;
Line: 628

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute3' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute3 || VARIABLE_E;
Line: 629

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute4' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute4 || VARIABLE_E;
Line: 630

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute5' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute5 || VARIABLE_E;
Line: 631

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute6' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute6 || VARIABLE_E;
Line: 632

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute7' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute7 || VARIABLE_E;
Line: 633

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute8' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute8 || VARIABLE_E;
Line: 634

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute9' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute9 || VARIABLE_E;
Line: 635

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute10' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute10 || VARIABLE_E;
Line: 636

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute11' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute11 || VARIABLE_E;
Line: 637

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute12' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute12 || VARIABLE_E;
Line: 638

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute13' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute13 || VARIABLE_E;
Line: 639

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute14' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute14 || VARIABLE_E;
Line: 640

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_attribute15' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_attribute15 || VARIABLE_E;
Line: 641

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_pick_order' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_pick_order || VARIABLE_E;
Line: 642

				ELSIF LOWER(l_selected_fields(i).column_name) = 'subinventory_def_cost_group' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.subinventory_def_cost_group || VARIABLE_E;
Line: 643

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator || VARIABLE_E;
Line: 644

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_description' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_description || VARIABLE_E;
Line: 645

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_status' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_status || VARIABLE_E;
Line: 646

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_pick_uom' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_pick_uom || VARIABLE_E;
Line: 647

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute_category' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute_category || VARIABLE_E;
Line: 648

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute1' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute1 || VARIABLE_E;
Line: 649

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute2' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute2 || VARIABLE_E;
Line: 650

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute3' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute3 || VARIABLE_E;
Line: 651

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute4' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute4 || VARIABLE_E;
Line: 652

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute5' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute5 || VARIABLE_E;
Line: 653

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute6' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute6 || VARIABLE_E;
Line: 654

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute7' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute7 || VARIABLE_E;
Line: 655

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute8' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute8 || VARIABLE_E;
Line: 656

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute9' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute9 || VARIABLE_E;
Line: 657

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute10' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute10 || VARIABLE_E;
Line: 658

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute11' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute11 || VARIABLE_E;
Line: 659

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute12' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute12 || VARIABLE_E;
Line: 660

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute13' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute13 || VARIABLE_E;
Line: 661

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute14' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute14 || VARIABLE_E;
Line: 662

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_attribute15' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_attribute15 || VARIABLE_E;
Line: 663

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_project' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_project || VARIABLE_E;
Line: 664

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_task' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_task || VARIABLE_E;
Line: 665

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_pick_order' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_pick_order || VARIABLE_E;
Line: 666

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_weight_capacity' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_weight_capacity || VARIABLE_E;
Line: 667

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_weight_capacity_uom' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_weight_capacity_uom || VARIABLE_E;
Line: 668

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_volume_capacity' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_volume_capacity || VARIABLE_E;
Line: 669

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_volume_capacity_uom' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_volume_capacity_uom || VARIABLE_E;
Line: 670

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_unit_capacity' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_unit_capacity || VARIABLE_E;
Line: 671

				ELSIF LOWER(l_selected_fields(i).column_name) = 'locator_alias' THEN l_location_data := l_location_data || VARIABLE_B || l_selected_fields(i).variable_name || '">' || v_location.locator_alias || VARIABLE_E;