DBA Data[Home] [Help]

APPS.FARX_MAD SQL Statements

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

Line: 54

	select	fama.book_type_code,
	--	fama.queue_name,
                lkt1.meaning queue_name,   --for bug no.4091456
		fama.mass_addition_id,
	--	fama.posting_status,
                lkt2.meaning posting_status, -- for bug no.4091456
		fama.post_batch_id,
		fama.asset_number,
		fama.tag_number,
		fama.description,
		fama.asset_category_id,
		fama.location_id,
		fama.vendor_number,
		fama.po_vendor_id,
		fama.invoice_number,
		fama.invoice_date,
		fama.po_number,
		fama.ap_distribution_line_number,
		fama.expense_code_combination_id,
		fama.payables_batch_name,
		fama.payables_code_combination_id,
		fama.payables_cost,
		fama.payables_units,
		fama.fixed_assets_cost,
		fama.unit_of_measure,
		fama.reviewer_comments,
		fama.asset_key_ccid,
		facb.asset_clearing_acct,
		facb.asset_cost_acct,
		facb.asset_cost_account_ccid,
		facb.asset_clearing_account_ccid,
		facb.deprn_expense_acct,
		facb.deprn_reserve_acct,
		facd.deprn_method,
		facd.life_in_months,
		facd.basic_rate,
		facd.adjusted_rate,
		facd.production_capacity,
		facd.prorate_convention_code,
		apid.period_name,
		apin.invoice_currency_code,
		apin.payment_currency_code,
		apin.invoice_amount,
		apin.amount_paid,
		fama.feeder_system_name,
		--apin.source Bug 2345016
	      fama.asset_type,
	      gad.asset_number group_asset_number,
	      fama.invoice_distribution_id,
	      fama.invoice_line_number,
	      fama.po_distribution_id
	from	fa_mass_additions 	     	fama,
		fa_category_books 	     	facb,
		fa_category_book_defaults 	facd,
		fa_lookups_tl		        lkt1,
         	fa_lookups_tl             	lkt2,
		ap_invoices 		        apin,
		ap_invoice_distributions  	apid,
         	fa_additions_b            	gad
	where	fama.book_type_code	= h_book
	and	fama.queue_name		= lkt1.lookup_code
	and   lkt1.lookup_code like nvl(h_queue_name,'%') -- bug 2146763
	and   lkt1.lookup_type        = 'QUEUE NAME'
	and   userenv('lang')         = lkt1.language
	and   fama.posting_status     = lkt2.lookup_code
	and   lkt2.lookup_code like nvl(h_posting_status,'%')
	and   lkt2.lookup_type        = 'QUEUE NAME'
	and   userenv('lang')         = lkt2.language
	and   fama.invoice_id		= apin.invoice_id(+)
	and   fama.invoice_id         = apid.invoice_id(+)
	and   fama.invoice_distribution_id
              = apid.invoice_distribution_id (+) -- Bug 7524566
	and   fama.invoice_line_number
              = apid.invoice_line_number (+) -- Bug 7524566
	and   fama.asset_category_id	= facb.category_id(+)
	and   fama.book_type_code 	= facb.book_type_code(+)
	and   fama.asset_category_id	= facd.category_id(+)
	and   fama.book_type_code	= facd.book_type_code(+)
   	and   fama.group_asset_id     = gad.asset_id(+)
	ORDER BY fama.posting_status;
Line: 146

          If queue_name IN ('POSTED','DELETE','MERGED','SPLIT') Then
		 h_queue_name := '';
Line: 164

	SELECT	last_update_login
	INTO	h_login_id
	FROM	FND_CONCURRENT_REQUESTS
	WHERE	request_id = h_request_id;
Line: 171

	SELECT	SOB.currency_code,
		CUR.precision
	INTO	h_currency,
		h_precision
	FROM	FA_BOOK_CONTROLS	BKC,
		GL_SETS_OF_BOOKS	SOB,
		FND_CURRENCIES		CUR
	WHERE	BKC.book_type_code = h_book
	AND	BKC.date_ineffective is null
	AND	SOB.set_of_books_id = BKC.set_of_books_id
	AND	SOB.currency_code = CUR.currency_code;
Line: 185

    	SELECT	SC.location_flex_structure,
		SC.category_flex_structure,
	 	SC.asset_key_flex_structure,
		BC.accounting_flex_structure
	INTO	h_loc_structure,
		h_cat_structure,
		h_key_structure,
		h_acct_structure
	FROM	FA_BOOK_CONTROLS BC,
		FA_SYSTEM_CONTROLS SC
	WHERE 	BC.book_type_code = h_book;
Line: 281

       SELECT count(1)
       INTO   h_valid_vendor_id
       from	  PO_VENDORS
       where  vendor_id = c_maddrec.po_vendor_id;
Line: 287

	      SELECT	vendor_name
	      into	h_vendor_name
	      from	PO_VENDORS
	      where	vendor_id = c_maddrec.po_vendor_id;
Line: 295

    h_mesg_name := 'FA_SHARED_INSERT_FAILED';
Line: 297

    INSERT INTO FA_MASSADD_REP_ITF
	(REQUEST_ID
	,BOOK_TYPE_CODE
	,QUEUE_NAME
	,INVOICE_CURRENCY_CODE
	,PERIOD_NAME
	,ENTITY_NAME
	,TRANSACTION_TYPE
	,REPORT_DATE
	,MASS_ADDITION_ID
	,STATUS
	,POSTING_STATUS
	,POST_BATCH_ID
	,ASSET_NUMBER
	,TAG_NUMBER
	,DESCRIPTION
	,ASSET_CATEGORY_ID
	,CATEGORY
	,AP_COMPANY
	,COMPANY_NAME
	,ASSET_CLEARING_ACCT
	,ASSET_COST_ACCOUNT
	,ASSET_COST_ACCOUNT_CCID
	,ASSET_CLEARING_ACCT_CCID
	,DEPRN_EXPENSE_ACCT
	,DEPRN_RESERVE_ACCT
	,COST_CENTER
	,EXPENSE_ACCT
	,LOCATION_ID
	,LOCATION
	,VENDOR_NUMBER
	,VENDOR_NAME
	,INVOICE_NUMBER
	,INVOICE_DATE
	,SOURCE_SYSTEMS
	,PO_NUMBER
	,AP_DISTRIBUTION_LINE_NUMBER
	,PAYABLES_BATCH_NAME
	,PAYABLES_CODE_COMBINATION_ID
	,PAYABLES_COST
	,PAYABLES_UNITS
	,FIXED_ASSETS_COST
	,FOREIGN_CURRENCY_CODE
	,FOREIGN_CURRENCY_AMOUNT
	,REVIEWER_COMMENTS
	,DEPRN_METHOD
	,LIFE_IN_MONTHS
	,BASIC_RATE
	,ADJUSTED_RATE
	,PRODUCTION_CAPACITY
	,UNIT_OF_MEASURE
	,PRORATE_CONVENTION
	,LAST_UPDATED_BY
	,LAST_UPDATE_LOGIN
	,CREATED_BY
	,CREATION_DATE
	,LAST_UPDATE_DATE
   ,ASSET_TYPE
   ,GROUP_ASSET_NUMBER
   ,INVOICE_DISTRIBUTION_ID
   ,INVOICE_LINE_NUMBER
   ,PO_DISTRIBUTION_ID )
    VALUES
	(h_request_id
	,c_maddrec.book_type_code
	,c_maddrec.queue_name
	,c_maddrec.invoice_currency_code
	,c_maddrec.period_name
	,'ENTITY_NAME'
	,'TRANSACTION_TYPE'
	,sysdate
	,c_maddrec.mass_addition_id
	,c_maddrec.posting_status
	,c_maddrec.posting_status
	,c_maddrec.post_batch_id
	,c_maddrec.asset_number
	,c_maddrec.tag_number
	,c_maddrec.description
	,c_maddrec.asset_category_id
	,h_concat_cat
	,h_bal_seg_val
	,h_bal_seg_val
	,c_maddrec.asset_clearing_acct
	,c_maddrec.asset_cost_acct
	,c_maddrec.asset_cost_account_ccid
	,c_maddrec.asset_clearing_account_ccid
	,c_maddrec.deprn_expense_acct
	,c_maddrec.deprn_reserve_acct
	,h_cc_seg_val
	,h_acct_seg_val
	,c_maddrec.location_id
	,h_concat_loc
	,c_maddrec.vendor_number
	,h_vendor_name
	,c_maddrec.invoice_number
	,c_maddrec.invoice_date
	,c_maddrec.feeder_system_name
	,c_maddrec.po_number
	,c_maddrec.ap_distribution_line_number
	,c_maddrec.payables_batch_name
	,c_maddrec.payables_code_combination_id
	,c_maddrec.payables_cost
	,c_maddrec.payables_units
	,c_maddrec.fixed_assets_cost
	,c_maddrec.payment_currency_code
	,c_maddrec.amount_paid
	,c_maddrec.reviewer_comments
	,c_maddrec.deprn_method
	,c_maddrec.life_in_months
	,c_maddrec.basic_rate
	,c_maddrec.adjusted_rate
	,c_maddrec.production_capacity
	,c_maddrec.unit_of_measure
	,c_maddrec.prorate_convention_code
	,user_id
	,h_login_id
	,user_id
	,sysdate
	,sysdate
   ,c_maddrec.asset_type
   ,c_maddrec.group_asset_number
   ,c_maddrec.invoice_distribution_id
   ,c_maddrec.invoice_line_number
   ,c_maddrec.po_distribution_id );
Line: 433

  if h_mesg_name = 'FA_SHARED_INSERT_FAIL' then
	fnd_message.set_token('TABLE','FA_MASSADD_REP_ITF',FALSE);