Professional Documents
Culture Documents
library
We can use the CUSTOM library to add or modify functionality without
making code changes to the standard form. All of the standard forms have
calls to the custom library from specific events that occur at runtime. We
can add code to the CUSTOM library to capture the events (such
as WHEN-NEW-FORM-INSTANCE, ZOOM, and so on) and then add code
to perform additional functionality. If you need to see which events are fired
on any particular form you can navigate to Help | Diagnostics | Custom
Code | Show Custom Events from the menu and you will see a message
appear each time an event is triggered (you may be prompted for
the apps password when you do this). The message will show the event
that was triggered.
The CUSTOM library is shipped with e-Business Suite and can be found in
the$AU_TOP/resource directory. It is recommended that you do not put all of
your code in the CUSTOM library. It is a good practice to create a sub
library per form and put your code in there. Then just write the call to the
sub library in the CUSTOM library. The sub library must be attached to the
CUSTOM library. The reason this is done is that there may well be several
developers working on the CUSTOM library all at once. If this model is
followed then developers can develop their code in isolation and it is easier
to maintain. This will become clearer when we go through the recipe.
What we are going to do in this recipe is create a zoom to our custom form.
We want to zoom from the People screen. We are going to pass in
the P_PERSON_ID parameter so that the record is automatically queried when
the form is opened. If you remember, we created this parameter inChapter
2, Oracle Forms. To create the zoom we must perform a number of tasks
as follows:
HOW TO DO IT...
To find out the item names from within EBS, perform the following steps:
HOW TO DO IT...
To find the name of the block, perform the following:
5. If prompted for the apps password then enter the apps password
and click OK.
6. The details of the block, field, and value are displayed as shown in
the following screenshot:
Enabling a zoom
In the custom library, there is a procedure that will enable the zoom button
in the toolbar. We need to add code to enable the zoom.
HOW TO DO IT...
To enable the zoom button using the CUSTOM library, perform the
following:
The library XXHRCUST.pll and CUSTOM.pll are both available in the download bundle
if you cannot get your library to compile or you want to refer to them.
HOW TO DO IT...
To create a sub CUSTOM library, perform the following:
HOW TO DO IT...
To add the XXHRCUST library to the CUSTOM library, perform the
following:
HOW TO DO IT...
To enable the zoom button using the CUSTOM library, perform the
following:
HOW TO DO IT...
To test the zoom, perform the following:
HOW IT WORKS...
We have compiled the two libraries. As the XXHRCUST library is a
dependent of the CUSTOM library we must compile the XXHRCUST library
first.
HOW TO DO IT...
To add a function to the menu that is used by the UK HRMS
Manager responsibility, perform the following:
11.
12. Save the form.
Note that we have not entered any data in the Prompt field. This is
because we do not want the Societies form available from the main
menu. If we did then we would put a Prompt value in here and the
form would open with the query find window as no parameter would
be passed in.
HOW IT WORKS...
We have added the function to the menu used by the UK HRMS
Manager responsibility. You will notice that there is no text in
the Prompt field, which means that the user can zoom to
the Societies form from this menu, but the Societies form is not available
to the user from the navigator.
HOW TO DO IT...
To test the zoom, perform the following: