A New Custom Form in Oracle Apps
Written by Anil Passi   
Thursday, 02 November 2006
In this training article (for the readers of http://getappstraining.blogspot.com ), we will learn the steps needed to develop a custom Oracle Apps form from the very scratch.


In the previous chapter we learnt "how to customize an existing oracle delivered form"

Question: Why bother teaching this when Oracle fusion is destined to replace oracle forms by OA Framework?
Answer: Well firstly I am yet to hear an official word from Oracle in this regard, but  I agree it is highly likely that fusion will se demise of Oracle Forms. However more importantly Oracle will support current tech stack indefinitely, I.e Release 12 will be supported for foreseen time as per Apps Unlimited statement. Hence, many of the clients will keep using this technology for decades. Yes, I won't bother my kid learning Oracle form though.


Question : Ok, what are the steps for building a screen from scratch?
Answer: Below steps in brief
A) Open up TEMPLATE.fmb, and save this as XXHELLOAPPS.fmb
B) Create a new window, by right clicking on Window/new
Name this window as XXHELLOAPPS,and assign it SubClass Type “WINDOW” from picklist.
C) Create a new canvas and name it XXHELLOAPPS , ensuring its Sublcass Type is “Content”
D) Make the windows property reference canvas XXHELLOAPPS and vice versa make the canvas reference windows XXHELLOAPPS.
E) Now create a block named XXHELLOAPPS . Lets keep this a control block for simplicity.
F) go to form level property, and set first navigation block to XXHELLOAPPS.
G) Add a label and a field named “Hello_World” to this block.
H) Generate the form on PC using Control-T keystrokes. This will ensure that nothing critical has been missed out.
I)  FTP the form file to $XXPO_TOP/forms/US
Surely, this XX will be replaced by the naming convention at your client/company.
J)  cd to  $XXPO_TOP/forms/US
And f60gen on XXHELLOAPPS.fmb
This will create a file executable as XXHELLOAPPS.fmx
K) Go to Application Developer responsibility
Menu /applicaton/form
Register the form
L) Register the Forms Function
Have you read he article form functions[http://getappstraining.blogspot.com/2006/10/oracle-forms-functions-menus-and-their.html] yet?
This forms function must be registered against application "XX Purchasing".
M) Now add a menu item so that this forms function becomes available to specific responsibility.

Thats it, you will be able to open up this form from the responsibility.

Now some important notes:-
1. If you have a table based block, and if that block has some description type fields, then try not to fetch them from post query trigger. Instead, develop a view in apps schema and assign that view as base tale to this block. This has a benefit that users will be able to query on the description field if need be. Indeed you will need to do dml on the actual table yourself by overriding on-insert, on-update, on-delete and on-lock triggers.
2. For each block in the screen, create a form level package spec and package body. Your triggers in the block/block fields will make calls to that package.
3. Try not to do to much pl/sql within the form. Always do such database intensive operations in a database level package.
4. Try not using global variables, unless really needed. Give preference to the creation of form package variables.
5. In a multi record block, always add a field for Current Record Indicator.

Please let me know if anything is unclear. Feel free to ask your questions.

Comments (39)add
...
written by santosh , November 04, 2006
I have a small suggestion. I think it will be better if you have cbox in your website. you can look at it http://cbox.ws/?box=2004670.
I feel it will be useful to chat directly with each other who is online and get answers instantly. Its only a suggestion.
...
written by santosh , November 04, 2006
I have a small suggestion. I think it will be better if you have cbox in your website. you can look at it http://cbox.ws/?box=2004670.
I feel it will be useful to chat directly with each other who is online and get answers instantly. Its only a suggestion.
...
written by Anil Passi , November 15, 2006
THanks Santosh.
I am looking for some other commenting tool, as this commenting tool is not ideal, it does not send me emails. I will have a look at cbox
...
written by Anil Passi , November 15, 2006
THanks Santosh.
I am looking for some other commenting tool, as this commenting tool is not ideal, it does not send me emails. I will have a look at cbox
...
written by AragoRn , November 22, 2006
Hi Anil
i would like to add a few more points when developing a custom form

1. After u open the Template.fmb n change the module and window names ... go to pre-form to specify the new window and also the new module name in When-New-Form-Instance triggers.

2. Open the program unit app_stand_window package body and the change the name of the window in Close_Window procedure.

n the rest is same as what anil has mentioned
Regards
Kishore
...
written by Anil Passi , November 22, 2006
You are Wonderful Kishore.

Many thanks,
Anil Passi
...
written by AragoRn , November 22, 2006
Hi Anil
i would like to add a few more points when developing a custom form

1. After u open the Template.fmb n change the module and window names ... go to pre-form to specify the new window and also the new module name in When-New-Form-Instance triggers.

2. Open the program unit app_stand_window package body and the change the name of the window in Close_Window procedure.

n the rest is same as what anil has mentioned
Regards
Kishore
...
written by Anil Passi , November 22, 2006
You are Wonderful Kishore.

Many thanks,
Anil Passi
...
written by venkat , December 07, 2006
hi Anil
I am new to forms. After completing the desigining of the form we can only compile it.
can we also run it on the client machine or else is it mandatory to copy .fmx file to the unix box and run from apps. I have no idea how to run it. I was thinking it will be same as in reports where we run it and see the output on teh client machine only. Pls can u explain it

Thanks
...
written by venkat , December 07, 2006
hi Anil
I am new to forms. After completing the desigining of the form we can only compile it.
can we also run it on the client machine or else is it mandatory to copy .fmx file to the unix box and run from apps. I have no idea how to run it. I was thinking it will be same as in reports where we run it and see the output on teh client machine only. Pls can u explain it

Thanks
...
written by Anil Passi , February 26, 2007
Hi Vaishali,

All you need is Oracle Forms, that I believe can be downloaded from OTN [technet.oracle.com]

However, please learn java too, as forms has no place in Oracle Fusion Apps techstack.

Thanks,
anil
...
written by Vaishali , February 26, 2007
Hi Anil,
I am trying to learn FORMS. Can you please tell me which tool we have to install on PC/Laptop to start building FORMS.

Thanks in Advance,


Vaishali
...
written by Vaishali , February 27, 2007
Hi Anil,
Thanks a lot for the prompt reply. I really appreciate your advice. First i want to learn Forms as that is the current requirement from my job. I need to download the jDeveloper / Forms 6i or other tool, please be specific.

If possible, could you please send me the download link and set up instruction for the same.

Thanks,

Vaishali
...
written by Anil Passi , March 01, 2007
hi santosh,

sorry, I never meant to discourage you to learn forms. Forms will still be around for at least four to five years or may be in theory forever, hence time invested into oracle forms will not be wasted.

Oracle Forms is a part of R12 technologies, and Oracle have commited to support R12 indefinitely. Hence for this reason Forms will stay around for long enough.

by oracle fusionapps techstack i meant technologies like ADF for UserInterface, ESB& BPEL for workflows, XMLP for reporting etc.

thanks,
anil
...
written by Anil Passi , March 01, 2007
hi vaishali

sorry for delay in response. please use link below

its a zip file that you will download and then unziip on your PC

and then run setup.exe

http://www.oracle.com/technology/software/products/forms/index.html

http://www.oracle.com/technology/software/htdocs/devlic.html?url=http://otn.oracle.com/software/products/forms/htdocs/winsoft.html

thanks
anil passi
...
written by Mihir , March 15, 2007
Hi Anil,
I am not clear about 1st point you have mentioned under Now some Imp Notes. Or my question is Why has Oracle kept most of the blocks based on view and not on base table? What extra care needs to be taken if block is based on View?

Thanks
Mihir
...
written by Anil Passi , March 16, 2007
Hi Mihir

You can try this scenario at your end.
Create a form block with two columns,of which the first column is based on database column, and the second column is based on control-field.

When query is executed, lets say you populate the second field using post-query.

In this case, if you want to perform ENTER-QUERY, you will not be able to search on second column(control field)

sometimes users like to execute queries on on description based fields too.


Thanks
...
written by Subhamay , April 27, 2007
Hi Mihir,
In Oracle Apps the blocks are based on views as a part of Oracle Apps standards.Apart from all the columns the view also includes ROWID of the underlying tables and this view represents a de-normalised form of the data from the underlying tables(Anil,please correct me if I am wrong).Also,public synonyms are created in the apps schema for these views.

If your block is based on a view then all the DML statements (insert/update/delete) to the underlying base tables are done through tables handles which are nothing but PL/SQL packaged procedures which can reside either on the client side of server side.Please go through the Application Developers Guide for more details.

Thanks,
Subhamay
...
written by Sreedhar Basangi , June 18, 2007
Hi Anil,

Thank you very much for the articles.They are useful to me. I got one problem with the forms.We have 2 different forms called as a Standard Receipts form (RCVRECRC.fmb) and a custom form developed based on the standard form which is used to receive the internal orders of the organization.Due to functionality problem they applied 5245360, 5336329, 4202057 and 4888266 patches on standard form.Its working fine.How can we apply the code to achieve the same functionality in the custom form?
...
written by biranchi , June 18, 2007
hi
anil how are you?i saw ur site it is very good ,i am in oracle pratice,though i am new in this field so can u tell me how to add to new columns in oracle standrad report

thanks
biranchi
...
written by Anil Passi , June 19, 2007
Hi Biranchi

1. Take a copy of the report from say $PO_TOP/reports/US/POPRINT.rdf
2. Rename the report and name it XXPOPRINT.rdf
3. Add the new column to XXPOPRINT.rdf
4. After making changes, move XXPOPRINT.rdf to $XXPO_TOP/reports/US or the equivalent
5. Register Concurrent program executable of type Report, that points to XXPOPRINT.rdf
6. Create concurret program for this executable
7. Add this new concurrent program to Request Group.

Thanks
Anil
...
written by Anil Passi , June 19, 2007
Hi Sreedhar

Looks like your client decided to customize a standard form. This is not a good practice. You will have to start allover again from scratch now to create custom form.

If I was you, I will advice your client to extend the screen via FP and CUSTOM.pll, instead of customizations.

Thanks
Anil
...
written by BIRANCHI , June 21, 2007
hi
anil
i got ur mail.my question was how to add a coloum in standrad report layout model

regards
biranchi
...
written by venky , August 28, 2007
i am new to forms .can u tell me about triggers in forms. i need with examples ....

WHEN WILL FIRE when_new_form_instance with one example ...
like this when_new_record_instance ...etc .

Regards
Venkat
...
written by Michele , September 10, 2007
Hi there

Can anyone clarify the use of the calendar in template.fmb. I have followed the instructions in the Apps User Guide exactly(used the ENABLE_LIST_LAMP LOV and added calendar.show to KEY_LISTVAL trigger) yet no LOV button (or calendar) appears when I tab or use the mouse to enter the date field. I have cross checked with a seeded Oracle form - APXINWKB.fmb and I see my setup is exactly the same. Am I missing a step somewhere?

Thanks
Michele
...
written by Anil Passi , September 10, 2007
Hi Michele

At the item level, you need to create a trigger named KEY-LISTVAL, from which you will call CALENDAR.SHOW



Also, ensure that item property “Validate from List” is set to No



Thanks,
Anil Passi


...
written by srinivasulu.dagada , September 27, 2007
how can i visualize attibutes using USING CUSTOM.PLL GIVE WITH AN EXAMPLE
...
written by a guest , October 01, 2007
Anil,

I have a requirement to disable toolbar buttons. How do I figure out toolbar item names so that I can use APP_SPECIAL routine to disable?

Would highly appreciate your reply.

Thanks,
Srini
Developer
written by Chami , October 24, 2007
Hi Anil, I just created a customer form with one tabe, I have a problem I dont get any database message, the form add records to db and update fine.

EX:
Like 1 record adderd,
when i press F11 - enter query

http://forums.oracle.com/forums/thread.jspa?threadID=577095&tstart=0


Thanks,

Chami
Developer
written by Chami , October 24, 2007
Hi Anil, I just created a customer form with one tabe, I have a problem I dont get any database message, the form add records to db and update fine.

EX:
Like 1 record adderd,
when i press F11 - enter query

http://forums.oracle.com/forums/thread.jspa?threadID=577095&tstart=0


Thanks,

Chami
...
written by Anil Passi , October 24, 2007
Hi Chami

Please ensure that system.message_level is not being changed in your code. If it has been changed, then make sure that its value is reset back to original value.

Thanks
Anil
Oracle Forms (saving)
written by Sridhar Rao , December 17, 2007
Hi Anil

I have created a form using custom.pll (based on a custom table). When ever i am closing the form it is poping up a message 'Do you want to save the form'. How to avoid it?

Regards
Sridhar
Oracle Fussion
written by Sridhar Rao , December 17, 2007
Hi anil

what is the majour difference in Oracle Fusion Apps techstack and oracle forms.

Regards
Sridhar
Segmentation fault (core dump)
written by Jass , January 30, 2008
Hi Anil,

I am getting a strange error.
1. Client has sent a form say, A.fmb by mail. It is a custom form developed by someone in some other unix box (not a part of instance that i am working in).
2. I ftp the form as it is to the custom top in unix box, compile it using f60gen, it gets compiled perfectly, i register it into Apps and am able to open and use it .... so everything is going well.
3. Now i open the form in Form Builder, make any small change (i tried changing just the size of one frame), save it, ftp to unix box, compile using same command f60gen .... but the error is Segmentation Error(Core Dump).

Please help.
Jass.

Calendar LOV in control block
written by vijayanandg , February 27, 2008
Hi Anil,
I had created a form using template.fmb, for a particular field attached ENABLE_LIST_LAMP LOV and added calendar.show to KEY_LISTVAL trigger(as mentioned in the screen shots). Compiled and register the same in the APPS. But in the runtime the field is not visible.

Kindly advice and clarify.

Regards
Vijay


explanation
written by pavan , February 27, 2008
hi anil,

im new to forms.could you please explain breifly "Now some important notes" mentioned above.
How to register the new form in EBS 11.5.x
written by Ladis Kumar , March 05, 2008
Hello, I have designed a new custom form to read some datas of two tables that I previously created under APPS. The new form functions well. I can also compile this form under unix. My question: how can I register this form under a desired responsability. Thanks to all of you in advance.
Custom Form Development in R12
written by Narva , March 07, 2008
Hi Anil,
I want to know is there are same steps to follow to develop a Custom Form in R12 also.
Regards/Narva
new form customization
written by bharu , March 14, 2008
hi ,

i am doing new form customization for gl.i am usind templlet.fmb and making the form.how do i get all the functionaltys that i have in oracle forms i.e in front end like search function (when u open an form like in sysadmin if u open an form systemprofile values one one the left top u have a search key ie in tourch light symbol so i need to add that function to my form so plzz help me outt
You must be logged in to a comment. Please register if you do not have an account yet.

busy