Home » Developer & Programmer » Forms » frm 40737
frm 40737 [message #464051] Tue, 06 July 2010 01:28 Go to next message
lokeshsurana
Messages: 212
Registered: April 2010
Location: India
Senior Member
I have tab canvas
In that on 1st tab I am taking one value as input...

On that input some records get retrieval...and those record i want to display at last tab...for that i written code as on
POST_TEXT_ITEM
declare 
	or_id number:=fnd_profile.value('org_id');
	
	cursor c1 is           
select line_num,item_description from po_lines_all
where org_id=or_id
and po_header_id = (SELECT po_header_id
                                  FROM po_headers_all
                                 WHERE segment1 = :xx_po_master.po_number
                                 and org_id=or_id);
            
begin
first_record;
--synchronize;
	for i in c1 
	loop
		 :XX_ITEM_LINE.sr_no:=i.line_num;
		-- :XX_ITEM_LINE.ITEM_CODE:=i.segment1;
		 :XX_ITEM_LINE.item_desc:=i.item_description;
		 next_record;
		 --synchronize;
	end loop;
first_record;
--synchronize;
/*
exception 
		when others then 
message(sqlerrm);*/

end;


It showing me error as
frm-40737 Illegal restricted procedure GO-BLOCK

and i am not using Go-block procedure in my code anywhere....
Re: frm 40737 [message #464059 is a reply to message #464051] Tue, 06 July 2010 02:02 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
No you're not.
It should be telling you:
frm-40737 Illegal restricted procedure first_record
Or:
frm-40737 Illegal restricted procedure next_record

You can't do what you're trying to do from that trigger.
Re: frm 40737 [message #464060 is a reply to message #464059] Tue, 06 July 2010 02:06 Go to previous messageGo to next message
lokeshsurana
Messages: 212
Registered: April 2010
Location: India
Senior Member
so which Trigger i need to use....?

is there any need of GO-BLOCK procedure anywhere

[Updated on: Tue, 06 July 2010 02:08]

Report message to a moderator

Re: frm 40737 [message #464067 is a reply to message #464060] Tue, 06 July 2010 02:56 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If Forms complains about GO_BLOCK, it means that you used it in another trigger which fired before the one you posted, and raised an error. This trigger (POST-TEXT-ITEM) didn't execute at all.
Re: frm 40737 [message #464073 is a reply to message #464067] Tue, 06 July 2010 03:27 Go to previous messageGo to next message
lokeshsurana
Messages: 212
Registered: April 2010
Location: India
Senior Member
ok...
as user enters a search number and go to next field on same tab at same time i want to reflect the data which is coming by search number in another tab(another data block).....in that case which trigger i need to fire...?
Re: frm 40737 [message #464074 is a reply to message #464073] Tue, 06 July 2010 03:31 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
If it's another tab why don't you populate it in WHEN-TAB-PAGE-CHANGED?
Re: frm 40737 [message #464080 is a reply to message #464074] Tue, 06 July 2010 03:47 Go to previous messageGo to next message
lokeshsurana
Messages: 212
Registered: April 2010
Location: India
Senior Member
but now if i choose the WHEN-TAB-PAGE-CHANGED code is as follow...
declare 
	or_id number:=fnd_profile.value('org_id');
	
	cursor c1 is           
select line_num,item_description from po_lines_all
where org_id=or_id
and po_header_id = (SELECT po_header_id
                                  FROM po_headers_all
                                 WHERE segment1 = :xx_po_master.po_number
                                 and org_id=or_id);
            
begin
FIRST_RECORD;
	for i in c1 
	loop
		 :XX_ITEM_LINE.sr_no:=i.line_num;
		 :XX_ITEM_LINE.item_desc:=i.item_description;
		 standard.commit;
		 next_record;
	end loop;
FIRST_record;



exception 
		when others then 
message(sqlerrm);

end;


the output will coming correct but this code is not able to navigate in other tabs...

it get locked there only....

there are 5 tabs in that only one tab will be dependent on first tab and all having separate data block...

is there any method like if tab is number 4 then only that code get execute....

[Updated on: Tue, 06 July 2010 04:02]

Report message to a moderator

Re: frm 40737 [message #464087 is a reply to message #464080] Tue, 06 July 2010 04:11 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Use system.tab_new_page
Re: frm 40737 [message #465220 is a reply to message #464087] Tue, 13 July 2010 04:06 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Why are you populating the items manually? Just change the 'where' clause on the block and do an 'execute_query'.

David
Previous Topic: forms not work outside my pc ??
Next Topic: change prompt name
Goto Forum:
  


Current Time: Fri Sep 20 06:57:24 CDT 2024