Home » Developer & Programmer » Forms » Problem when excecuting query on control item
Problem when excecuting query on control item [message #310081] Mon, 31 March 2008 03:46 Go to next message
mahantesh
Messages: 28
Registered: March 2008
Location: Mumbai ,India
Junior Member
Hi
I have created form containing two data block having master detail relation ship
Both data block have one control item
For first control item(account number) i have attached LOV(this is derived from other data block which have custmer id common) which fetched account number & customer id and second control item(Engine model)which fetch engine model & engine model id from (other than master & detail table)other table and detail table joined with this table by means of engine model id

From first LOV i shows account number on form & saves customer Id
From Second LOV i shows engine model on form & saves Engine Model in database.

If i saves data it works perfectly fine
But if i execute query on account number which is control item it dispaly corresponding record but account number field become empty on form

For populating control items i have written code in post query trigeer on detail block as

declare
 cursor cur_cust_num is
        select account_number
        from hz_cust_accounts 
        where cust_account_id in
        (select customer_id from gta_custmain 
        where gta_number=:gta_custmain.gta_number);  
	
	cursor cur_eng_mod is           
     select segment1 
		 from   mtl_system_items_b msi
		       ,gta_model gta
		       ,gta_custmain gtm
		 where gta.gta_number=gtm.gta_number
		 and msi.inventory_item_id = gta.engine_model_id
		 and msi.organization_id= gtm.org_id
		 and gta.gta_number=:gta_custmain.gta_number;
        
        
begin
	      open cur_cust_num ;
        fetch cur_cust_num into :gta_custmain.customer_number;
        close cur_cust_num; 
	      
	      open cur_eng_mod ;
        fetch cur_eng_mod into :gta_model.engine_model;        
        close cur_eng_mod; 

end;


Pleaze help me in this

[Updated on: Mon, 31 March 2008 04:01]

Report message to a moderator

Re: Problem when excecuting query on control item [message #310293 is a reply to message #310081] Mon, 31 March 2008 19:51 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I believe that ':gta_custmain.gta_number' is not being populated during query processing.

Put some 'message / pause' pairs into your post-query trigger so that you can see what data is being used in your cursors.

David
Previous Topic: Cannot Read Menu File Error and Error Creating Menu in Oracle Forms 9i
Next Topic: HOW CAN I CREATE RECORD GROUP FROM A TO Z and populate_list (merged)
Goto Forum:
  


Current Time: Fri Dec 02 20:44:34 CST 2016

Total time taken to generate the page: 0.08571 seconds