DBA Data[Home] [Help]

APPS.XTR_FORECAST_HEADERS_PKG SQL Statements

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

Line: 30

		SELECT 'Duplidate'
		FROM ce_forecast_headers cfh
		WHERE cfh.name = X_name
		AND  (X_rowid IS NULL
		   OR cfh.rowid <> chartorowid(X_rowid));
Line: 69

  PROCEDURE Insert_Row(
		X_rowid			IN OUT NOCOPY	VARCHAR2,
		X_forecast_header_id	IN OUT	NOCOPY NUMBER,
		X_name				VARCHAR2,
		X_description			VARCHAR2,
		X_aging_type			VARCHAR2,
		X_overdue_transactions		VARCHAR2,
		X_cutoff_period			NUMBER,
		X_transaction_calendar_id	NUMBER,
                X_treasury_template		VARCHAR2,
		X_created_by			NUMBER,
		X_creation_date			DATE,
		X_last_updated_by		NUMBER,
		X_last_update_date		DATE,
		X_last_update_login		NUMBER,
		X_attribute_category		VARCHAR2,
		X_attribute1			VARCHAR2,
		X_attribute2			VARCHAR2,
		X_attribute3			VARCHAR2,
		X_attribute4			VARCHAR2,
		X_attribute5			VARCHAR2,
		X_attribute6			VARCHAR2,
		X_attribute7			VARCHAR2,
		X_attribute8			VARCHAR2,
		X_attribute9			VARCHAR2,
		X_attribute10			VARCHAR2,
		X_attribute11			VARCHAR2,
		X_attribute12			VARCHAR2,
		X_attribute13			VARCHAR2,
		X_attribute14			VARCHAR2,
		X_attribute15			VARCHAR2
	) IS
		CURSOR C IS SELECT rowid FROM ce_forecast_headers
			WHERE forecast_header_id = X_forecast_header_id;
Line: 103

		CURSOR C2 IS SELECT ce_forecast_headers_s.nextval FROM sys.dual;
Line: 112

		INSERT INTO ce_forecast_headers(
			forecast_header_id,
			name,
			description,
			aging_type,
			overdue_transactions,
			cutoff_period,
			transaction_calendar_id,
                        treasury_template,
			created_by,
			creation_date,
			last_updated_by,
			last_update_date,
			last_update_login,
			attribute_category,
			attribute1,
			attribute2,
			attribute3,
			attribute4,
			attribute5,
			attribute6,
			attribute7,
			attribute8,
			attribute9,
			attribute10,
			attribute11,
			attribute12,
			attribute13,
			attribute14,
			attribute15
		) VALUES (
			X_forecast_header_id,
			X_name,
			X_description,
			X_aging_type,
			X_overdue_transactions,
			X_cutoff_period,
			X_transaction_calendar_id,
			X_treasury_template,
			X_created_by,
			X_creation_date,
			X_last_updated_by,
			X_last_update_date,
			X_last_update_login,
			X_attribute_category,
			X_attribute1,
			X_attribute2,
			X_attribute3,
			X_attribute4,
			X_attribute5,
			X_attribute6,
			X_attribute7,
			X_attribute8,
			X_attribute9,
			X_attribute10,
			X_attribute11,
			X_attribute12,
			X_attribute13,
			X_attribute14,
			X_attribute15
		);
Line: 182

			XTR_FORECAST_PERIODS_PKG. Insert_Row(
				X_rowid			=> p_row_id,
				X_forecast_period_id	=> p_forecast_period_id,
				X_forecast_header_id	=> X_forecast_header_id,
				X_period_number		=> 0,
				X_level_of_summary	=> 'O',
				X_length_of_period	=> -X_cutoff_period+1,
				X_length_type		=> 'D',
                		X_created_by            => X_created_by,
                		X_creation_date         => X_creation_date,
                		X_last_updated_by       => X_last_updated_by,
                		X_last_update_date      => X_last_update_date,
                		X_last_update_login     => X_last_update_login);
Line: 197

	END Insert_Row;
Line: 221

		X_last_updated_by		NUMBER,
		X_last_update_date		DATE,
		X_last_update_login		NUMBER,
		X_attribute_category		VARCHAR2,
		X_attribute1			VARCHAR2,
		X_attribute2			VARCHAR2,
		X_attribute3			VARCHAR2,
		X_attribute4			VARCHAR2,
		X_attribute5			VARCHAR2,
		X_attribute6			VARCHAR2,
		X_attribute7			VARCHAR2,
		X_attribute8			VARCHAR2,
		X_attribute9			VARCHAR2,
		X_attribute10			VARCHAR2,
		X_attribute11			VARCHAR2,
		X_attribute12			VARCHAR2,
		X_attribute13			VARCHAR2,
		X_attribute14			VARCHAR2,
		X_attribute15			VARCHAR2
	) IS
		CURSOR C IS
			SELECT *
			FROM ce_forecast_headers
			WHERE rowid = X_rowid
			FOR UPDATE of forecast_header_id NOWAIT;
Line: 252

		FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
Line: 341

  PROCEDURE Update_Row(
		X_rowid				VARCHAR2,
		X_forecast_header_id		NUMBER,
		X_name				VARCHAR2,
		X_description			VARCHAR2,
		X_aging_type			VARCHAR2,
		X_overdue_transactions		VARCHAR2,
		X_cutoff_period			NUMBER,
		X_transaction_calendar_id	NUMBER,
		X_created_by			NUMBER,
		X_creation_date			DATE,
		X_last_updated_by		NUMBER,
		X_last_update_date		DATE,
		X_last_update_login		NUMBER,
		X_attribute_category		VARCHAR2,
		X_attribute1			VARCHAR2,
		X_attribute2			VARCHAR2,
		X_attribute3			VARCHAR2,
		X_attribute4			VARCHAR2,
		X_attribute5			VARCHAR2,
		X_attribute6			VARCHAR2,
		X_attribute7			VARCHAR2,
		X_attribute8			VARCHAR2,
		X_attribute9			VARCHAR2,
		X_attribute10			VARCHAR2,
		X_attribute11			VARCHAR2,
		X_attribute12			VARCHAR2,
		X_attribute13			VARCHAR2,
		X_attribute14			VARCHAR2,
		X_attribute15			VARCHAR2
	) IS
	p_row_id			VARCHAR2(100);
Line: 378

	SELECT 	overdue_transactions, cutoff_period
	INTO	p_overdue_transactions, p_cutoff_period
	FROM	CE_FORECAST_HEADERS
	WHERE	rowid = X_rowid;
Line: 383

	UPDATE ce_forecast_headers
	SET
		forecast_header_id 	= X_forecast_header_id,
		name			= X_name,
		description		= X_description,
		aging_type		= X_aging_type,
		overdue_transactions	= X_overdue_transactions,
		cutoff_period		= X_cutoff_period,
		transaction_calendar_id = X_transaction_calendar_id,
		attribute_category	= X_attribute_category,
		attribute1		= X_attribute1,
		attribute2		= X_attribute2,
		attribute3		= X_attribute3,
		attribute4		= X_attribute4,
		attribute5		= X_attribute5,
		attribute6		= X_attribute6,
		attribute7		= X_attribute7,
		attribute8		= X_attribute8,
		attribute9		= X_attribute9,
		attribute10		= X_attribute10,
		attribute11		= X_attribute11,
		attribute12		= X_attribute12,
		attribute13		= X_attribute13,
		attribute14		= X_attribute14,
		attribute15		= X_attribute15
	WHERE rowid = X_rowid;
Line: 414

	-- If overdue_transactions is updated from 'N' to 'Y', insert
	-- new column for overdue transactions in column table
	--
	IF(p_overdue_transactions = 'EXCLUDE' AND
	   X_overdue_transactions = 'INCLUDE')THEN
			XTR_FORECAST_PERIODS_PKG. Insert_Row(
				X_rowid			=> p_row_id,
				X_forecast_period_id	=> p_forecast_period_id,
				X_forecast_header_id	=> X_forecast_header_id,
				X_period_number		=> 0,
				X_level_of_summary	=> 'O',
				X_length_of_period	=> -X_cutoff_period+1,
				X_length_type		=> 'D',
                		X_created_by            => X_created_by,
                		X_creation_date         => X_creation_date,
                		X_last_updated_by       => X_last_updated_by,
                		X_last_update_date      => X_last_update_date,
                		X_last_update_login     => X_last_update_login);
Line: 435

	-- If cutoff_period is updated, update the column table accordingly
	--
  	IF(p_overdue_transactions = 'INCLUDE' AND
	   X_overdue_transactions = 'INCLUDE' AND
	   p_cutoff_period <> X_cutoff_period) THEN
		UPDATE 	XTR_FORECAST_PERIODS
			SET	length_of_period 	= -X_cutoff_period+1,
			        level_of_summary	= 'O',
				length_type		= 'D'
			WHERE	forecast_header_id	= X_forecast_header_id
			AND	period_number		= 0;
Line: 449

	-- If overdue_transactions is updated from 'Y' to 'N', delete
	-- the overdue column from the column table
	--
	IF(p_overdue_transactions = 'INCLUDE' AND
	   X_overdue_transactions = 'EXCLUDE')THEN
		DELETE 	FROM XTR_FORECAST_PERIODS
			WHERE	forecast_header_id 	= X_forecast_header_id
			AND	period_number		= 0;
Line: 462

  END Update_Row;
Line: 475

  PROCEDURE Delete_Row IS
        p_forecast_header_id	NUMBER;
Line: 481

        SELECT   forecast_header_id
        INTO     p_forecast_header_id
        FROM     CE_FORECAST_HEADERS
        WHERE    treasury_template = 'Y';
Line: 486

	DELETE FROM CE_FORECAST_ROWS
	WHERE	    forecast_header_id = p_forecast_header_id;
Line: 489

        DELETE FROM XTR_FORECAST_PERIODS
        WHERE       forecast_header_id = p_forecast_header_id;
Line: 492

	DELETE FROM ce_forecast_headers
	WHERE treasury_template = 'Y';
Line: 497

  END Delete_Row;
Line: 499

  PROCEDURE Delete_Forecasts IS
	p_forecast_header_id 	NUMBER;
Line: 502

	DELETE FROM XTR_EXTERNAL_CASHFLOWS;
Line: 503

  END Delete_Forecasts;