How ot call a canvas froma form? [message #425921] |
Tue, 13 October 2009 02:20 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi All,
My requirement is that i need to call a canvas on the click of a button but dont know how to call it?
Can anybody guide me on this?
While the canvas is called it should be in the query mode
and while calling it i should be able to pass an item_id or item_name to that canvas.
Any quick reply will be highly appreciated.
Best Regards,
Monika
|
|
|
|
Re: How ot call a canvas froma form? [message #425929 is a reply to message #425924] |
Tue, 13 October 2009 03:53 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
HI Littlefoot,
Thanks a lot for your reply.But my requirement is that currenlty i have a form in that form there ia table type structure where we hve fields suppose the value in fields are rowwise for column full_name is A,B,C.
So the requirement is thatwhen i go to A i.e. my cursor is on A
And there is a button to be created which when pressed should direct me to the other canvas where we have details of A.
So can you gudie me how to proceed with that.
Best Regards,
Monika
|
|
|
|
|
|
Re: How ot call a canvas froma form? [message #426077 is a reply to message #426069] |
Wed, 14 October 2009 01:07 |
beginnerHere
Messages: 55 Registered: October 2009
|
Member |
|
|
you have to GO to the block where the details for "A" are placed
like if you have a block for the items A, B and C then you have to place the details for those items in another block. Create the block in the same form, place those details then through the wizards and all... and call (from the button) the other block
the best way to do this is
-place the item names and itemID in one table and create the master block.
-then create a separate table for the item details, in it create the itemID column the same as that for the first table
-create another block (detail block) for them
-create the join condition by de-selecting the Auto Join check box, remember to select itemID from both the tables for the join condition
-then in the layout wizard select a new canvas and choose its type as stacked
-DON'T put the itemID for the second block IF you don't want it to display in the other block
-then place a button on the first canvas and for it's When-Button_Pressed trigger place this:
go_block('SECOND_BLOCK_NAME');
show_view('SECOND_CANVAS_NAME');
execute query and hopefully it will work
[EDITED by LF: fixed [code] tags]
[Updated on: Thu, 15 October 2009 00:56] by Moderator Report message to a moderator
|
|
|
|
Re: How ot call a canvas froma form? [message #426096 is a reply to message #426079] |
Wed, 14 October 2009 01:55 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
HI BegginerHere,
Thanks for your reply.
What i was doing there was creating a data block and a canvas and from the previous canvas i am calling this canvas.
This thing is getting complied but duirng run time i am getting the error message.
FRM-40735: ON-ERROR trigger raised unhandled exception ORA-06508.
So can you please guide me on this thing.
Thanks in Advance.
Monika
|
|
|
|
|
Re: How ot call a canvas froma form? [message #426316 is a reply to message #426205] |
Wed, 14 October 2009 22:40 |
beginnerHere
Messages: 55 Registered: October 2009
|
Member |
|
|
hey monika,
did you resolve your issue?
tell me, is the pl/sql that you are writing in a library (.pll)? is the library and the form in the same directory?
there could be two things wrong here...
-either the directory path is getting messed up, for this you'll have to tell me the path of your pll directory
-or the program may have been dropped or incompatibly modified, or have compiled with errors (an attempt was made to call a stored program that could not be found)... for the later check that all referenced programs, including their package bodies, exist and are compatible.
hope this somehow solves your problem!
|
|
|
Re: How ot call a canvas froma form? [message #426496 is a reply to message #426316] |
Thu, 15 October 2009 23:51 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi BeginnerHere,
Actually what i was doing is that i am creating one custom table and i m creating a data block using that custom table. Using that data block i am creating a canvas. This canvas which i have created that i am calling from another canvas using a push button in WHEN BUTTON TREGGER .
So the current problem that i was facing was that during run time i was getting the error. FRM-40735 I was runnning this form on my system.
So can you help me with this.
Thanks in Advance,
Monika
|
|
|
|
Re: How ot call a canvas froma form? [message #426506 is a reply to message #426500] |
Fri, 16 October 2009 01:09 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi Littlefoot,
Thanks for your reply. I also know the problem is that it is not able to find a program unit but i am not able to identfy for which program unit form is looking for. As in WHEN BUTTON PRESSED trigger i hve given only view_canvas Command. So dont know why i am getting this problem.I am not able to attach my form with this message as the size of my form is greater than the maximum file size allowed.
Thanks in advance,
Monika
|
|
|
Re: How ot call a canvas froma form? [message #426520 is a reply to message #426506] |
Fri, 16 October 2009 04:02 |
beginnerHere
Messages: 55 Registered: October 2009
|
Member |
|
|
you have to check the error message that is causing this.
please press SHIFT-F1 to see the last error message, it will tell you the real problem.
try redesigning the form, maybe that will help... make a dummy form and put only the view_canvas functionality in it and see if it works
as far as your logic of the form goes, i don't think there is anything wrong in the logic. has to be some program unit that accidentally got created or something. or any variable that is getting screwed up
|
|
|
Re: How ot call a canvas froma form? [message #426828 is a reply to message #426520] |
Tue, 20 October 2009 00:46 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi,
My form has compiled succesfully it was an apps form so i have compiled it using the command
frmcmp_batch module=$AU_TOP/forms/US/PERWSGEB.fmb userid=apps/apps output_file=$PER_TOP/forms/US/PERWSGEB.fmx
it has to be put ih per respnosibilty.
but now the issue is that after successful comipation also i am not able to see teh changes in fornt end.
Can anybody guide me on this.
Thanks in advance.
Best Regards,
Monika
|
|
|
|
|
Re: How ot call a canvas froma form? [message #426940 is a reply to message #426843] |
Tue, 20 October 2009 06:42 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi All,
Now it is working fine but there is one more isseu.
As now i am using go_block to call the canvas. So what is happening right now is that it is navigating ot the desired canvas but in front end i am not able to close that canvas and neither i ma able to save the data from teh canvas to teh datbase.
can somebody guide me on this.
Thanks in Advance.
Best Regards,
Monika
|
|
|
|
Re: How ot call a canvas froma form? [message #427072 is a reply to message #426940] |
Tue, 20 October 2009 22:45 |
beginnerHere
Messages: 55 Registered: October 2009
|
Member |
|
|
hey monika,
firstly, if you already haven't, then put an 'exit' button to exit... (exit_form;) ... makes it look better...
secondly, when in the second canvas create a button that calls back the first canvas the same way you did to get to the second canvas.
create a save button with functionality (myself i'm trying to figure that out). you'll find help for that in help index of forms.
|
|
|
Re: How ot call a canvas froma form? [message #427075 is a reply to message #427072] |
Tue, 20 October 2009 23:24 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi Cookiemonster,
In every window on the the right top most corner we have a (x) sign to close the window usin that only i am trying to close the window but it is getting hanged.
using hte save button i was tring to save data but it is nt saving.
and i am nt getting any error message.
I thought that template will take care of it
so can you now guide me that why it is behaving like that.
Thanks in Adnvace.
Monika
-----------------------------------------------------------------
Hi BeginnerHere,
My requirement is that i need that particualr window to be closed once the data is being saved bt it is nt behaing in the desired mannner.
I am not creating any button in the second canvas to call back to the first canvas. I want if i close the window of second canvas it should get closed and automatically first canvas wold be thr as it was already oepnd and from that canvas only i am calling the second canvas.
Thanks in Advance.
Monika
|
|
|
Re: How ot call a canvas froma form? [message #427084 is a reply to message #427075] |
Wed, 21 October 2009 00:49 |
beginnerHere
Messages: 55 Registered: October 2009
|
Member |
|
|
are you using one block and two canvases or two blocks and two canvases?
if your second canvas is in another block then you could use post_update trigger for that block to place a call to the first block... hope it works!
if there is one block and two canvases then my whole logic is out of the park... according to what little i know, one block and two CONTENT canvases is not right... if we make two content canvases then we must make use of two blocks... we can use two BLOCKS in one CONTENT CANVAS but NOT two CONTENT CANVASES in one BLOCK... at least thats what i know... maybe i'm wrong...
i THINK (not TOO sure) if you are using the two canvases in one block then the second canvas must be either a stacked canvas or a tab canvas, not content canvas...
[Updated on: Wed, 21 October 2009 00:54] Report message to a moderator
|
|
|
Re: How ot call a canvas froma form? [message #427090 is a reply to message #427084] |
Wed, 21 October 2009 01:25 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi Begginerhere,
I am using two blcok and two cavnas.
Actually i m customizing an existing apps form the issue was that here some libraries were attachedand in one of the standard procuedure APP_WINDOW.CLOSE_FIRST_WINDOW they are closing the window.
So i need to give some code here. as per my understanind.
Can you giude me with this package if possible for you.
Thansk in Advance.
Monika
|
|
|
Re: How ot call a canvas froma form? [message #427141 is a reply to message #427090] |
Wed, 21 October 2009 05:35 |
beginnerHere
Messages: 55 Registered: October 2009
|
Member |
|
|
hey Monika,
i found this for APP_WINDOW.CLOSE_FIRST_WINDOW:
The window close events for all non-modal windows (but no modal windows) get passed to APP_CUSTOM.CLOSE_WINDOW. The default code provided in the TEMPLATE form does the following:
--If the form is in enter-query mode, APP_CUSTOM calls
APP_EXCEPTION.DISABLED
--Otherwise, if the cursor is currently in the window to be closed, APP_CUSTOM issues a do_key('PREVIOUS_BLOCK') to attempt to move the cursor out of the current window
--Finally, APP_CUSTOM hides the window with a call to HIDE_WINDOW('<window_name>').
You need to modify this procedure to account for any other behaviors you require. Specifically, modify it to handle block coordination issues and detail windows.
Remember that you must move the cursor out of the window before closing it, otherwise the window reopens automatically.
To close the first window of a form, which is equivalent to "File->Close Form" call APP_WINDOW.CLOSE_FIRST_WINDOW.
(have a looksee at "http://sbllc3.solutionbeacon.net/pls/a159vis2/fndgfm/fnd_help.get/US@PSA_US/fnd/@o_cwb")
Monika, if you are not using this APP_WINDOW trigger for anything then i think it is best you remove it... judging by what you've told till now, i don't think that you need this... i can be done without it... if you still are not sure about this and want to look further into it then i'll try looking more deeply into this...
|
|
|
Re: How ot call a canvas froma form? [message #427142 is a reply to message #427141] |
Wed, 21 October 2009 05:39 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi Beginnerhere,
this is the code that i think we are using. So can you tell me whr am i going wrong.
procedure close_window(wnd in varchar2, children_only in boolean default FALSE) is
begin
if (name_in('system.mode') = 'ENTER-QUERY') then
app_exception.disabled;
return;
end if;
if (children_only = FALSE) then
if (wnd = 'EVENT_WIN' ) then
app_window.close_first_window;
/* From here modidfied by Monika */
elsif wnd = 'INDUCTION' then
app_custom.close_window('INDUCTION');
IF (wnd = GET_VIEW_PROPERTY(GET_ITEM_PROPERTY(
:SYSTEM.CURSOR_ITEM, ITEM_CANVAS),
WINDOW_NAME)) THEN
DO_KEY('PREVIOUS_BLOCK');
END IF;
/*till here code added */
else
hide_window(wnd);
end if;
end if;
end close_window;
The issue is that window is getting hanged. Here INDUCTION is hte custom window.
Thanks in Advance.
Monika
|
|
|
|
Re: How ot call a canvas froma form? [message #427174 is a reply to message #427155] |
Wed, 21 October 2009 07:14 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi Beginnerhere,
after doing those changes also i am having the same issue. The whole application is getting hanged.
Don't know whr i am going wrong.
If you come across something else then pls let me know.
Thanks in Advance.
Monika
|
|
|
Re: How ot call a canvas froma form? [message #427489 is a reply to message #427174] |
Thu, 22 October 2009 22:13 |
beginnerHere
Messages: 55 Registered: October 2009
|
Member |
|
|
hey Monika,
i tried but i couldn't figure out why the application is getting hanged. sorry ... i would suggest you to rebuild the thing, one little thing at a time...
another idea would be to place alerts within the code and see EXACTLY where is the thing is going wrong... place dummy alerts and see till where do these alerts get fired... till the point where they keep firing, the code is correct, see which alert does not fire... means that statement between the fired and unfired alert is screwing up something...
hope it helps...!
[Updated on: Thu, 22 October 2009 22:16] Report message to a moderator
|
|
|
Re: How ot call a canvas froma form? [message #427502 is a reply to message #427489] |
Thu, 22 October 2009 23:50 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi,
I have figured out the problem.
app_custom.close_window('INDUCTION');
is the main problem as this command closes the parent window so the instance was getting hanged.
so the instead of this i am using hide_window(wnd);
And now it is working fine.
Do you know how to register custom table in apps.
If you know then please let me know the steps.
It would be really helpful to me.
Thanks in Advance.
Monika
|
|
|
Re: How ot call a canvas froma form? [message #427523 is a reply to message #427502] |
Fri, 23 October 2009 01:28 |
beginnerHere
Messages: 55 Registered: October 2009
|
Member |
|
|
okeee for registering, use the table registration API..ie ad_dd package:
--ad_dd.register_table()
--ad_dd.register_column()
to register the table to apps
have a looksee at this :
"http://www.sap-img.com/oracle-database/script-to-register-and-unregister-custom-tables-and-columns.htm"
tell me if it helps or not, cause this is new to me too!
[Updated on: Fri, 23 October 2009 01:34] Report message to a moderator
|
|
|
Re: How ot call a canvas froma form? [message #427532 is a reply to message #427523] |
Fri, 23 October 2009 02:06 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi Beginnerhere,
Thanks a lot for your help. I will try it.
One more thing do you have any idea how to set value from an item of one block to the item of another block in the same form.
See my requirement is that
for HR Module there is a screen Evnets And Bookings here i have events and bookings details to be held or which have already took place in an organization so for each booking we are to develop some form for rating thing.
Noa i have developed a canvas to do that and on the click of a button i m going to that canvas.
But i hasd to link both t he canvas so i was trying to use booking_id.
In Events and bookings canvas and in bookings data block we have value for booking_id
so i need to pass this value to induction canvas to that i ca link botht eh block but dont know how to do that.
Using hte trigger WHEN BUTTON PRESSED i gave the code to set teh value for booking id but it is not wokring.
My code was
set :INDUCTION_DETAIL.BOOKING_ID= :BOOKINGS.BOOKING_ID;
so during compilation i am getting error meggase as
Bad Bind Variable INDUCTION_DETAIL.BOOKING_ID.
So how to proceed with that or can i go with some other approach also
please suggetst me.
Thanks in Advance.
Monika
|
|
|
Re: How ot call a canvas froma form? [message #427573 is a reply to message #427532] |
Fri, 23 October 2009 05:16 |
beginnerHere
Messages: 55 Registered: October 2009
|
Member |
|
|
hey Monika,
i think it should work the way you are doing it... try removing the "set" keyword and doing it like
- :INDUCTION_DETAIL.BOOKING_ID := BOOKINGS.BOOKING_ID;
i'm looking into it now, but i would say another easy way for doing this would be,
-behind the button do this:
-place a text_item OUT OF THE FRAME AREA of the canvas,
-pass the :BOOKINGS.BOOKING_ID as simple booking_id to that text_item - (:BOOKING_ID := :TEXT_ITEM;)
-now on the second induction canvas where you want to use the value and get the value from the text_item and put it in your item(booking_id) - (:YOUR_ITEM := :TEXT_ITEM;)
-use post_block trigger or when_new_block_instance trigger to get it done...
another way would be to make use of a program unit and passing the value from the first canvas to a variable in the program unit and then making use of it there... but to me this is over-kill...
i'll also try to figure out how to do it the way you are doing it...
[Updated on: Fri, 23 October 2009 05:23] Report message to a moderator
|
|
|
Re: How ot call a canvas froma form? [message #427576 is a reply to message #427573] |
Fri, 23 October 2009 05:48 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi,
I have tried with
:INDUCTION_DETAIL.BOOKING_ID := BOOKINGS.BOOKING_ID;
So this time it is giving me error as
FRM-30015: Ambiguous item name BOOKING_ID.
Block: INDUCTION_DETAIL
Form: PERWSGEB
FRM-30085: Unable to adjust form for output.
So how to resolve this issue any idea about it.
Thanks in Advance.
Monika
|
|
|
Re: How ot call a canvas froma form? [message #427580 is a reply to message #427576] |
Fri, 23 October 2009 06:01 |
beginnerHere
Messages: 55 Registered: October 2009
|
Member |
|
|
FRM-30015: Ambiguous item name BOOKING_ID
basically it is saying what we are seeing ourselves, that the booking_id is being repeated and it is having two different meanings... your logic is correct now, but the compiler is scratching its head because of same item names... do you have to have the same name, doesn't it function if you change the BOOKINGS block's booking_id to 'booking_id1' or something?
|
|
|
Re: How ot call a canvas froma form? [message #427581 is a reply to message #427573] |
Fri, 23 October 2009 06:04 |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi,
I have tried with
:INDUCTION_DETAIL.BOOKING_ID := BOOKINGS.BOOKING_ID;
So this time it is giving me error as
FRM-30015: Ambiguous item name BOOKING_ID.
Block: INDUCTION_DETAIL
Form: PERWSGEB
FRM-30085: Unable to adjust form for output.
So how to resolve this issue any idea about it.
Thanks in Advance.
Monika
|
|
|
|
|
|