Showing posts with label Forms Customization and Personalization in R12. Show all posts
Showing posts with label Forms Customization and Personalization in R12. Show all posts

Wednesday, 19 August 2015

Zoom Functionality in Oracle Apps

CALLING FORM USING ZOOM FUNCTIONALITY

Login to ERP and select inventory responsibility and click change organization.
Select your organization and navigate to miscellaneous transaction form.
Click on Help > Diagnostics > Custom code > Personalization
A password window will appear asking for password for apps.

Personalization form will be displayed.



Add a record to create a menu, insert values from
Seq no = 10
Description = Create a menu
Level = Function
Enabled = Yes
On condition tab select
Trigger Event = WHEN-NEW-FORM-INSTANCE
This will set a trigger to fire every time we enters into form.
On actions tab insert the values as
Seq no = 10
Type = Menu
Description = Creating a menu
Language = All
Enabled = Yes
Menu entry = Menu 1
Menu label = OnHand Quantity
This will create a menu named OnHand Quantity.



Close both forms and invoke miscellaneous transaction form again.
Click on Tools
Check that it shows the menu OnHand Quantity.




Check the item field in the table.
To check this click in item field and then click on Help > Diagnostics > Examine
Copy the block name and field name.



Now invoke the personalization form.
Create a new record.
Seq = 20
Description = Copy values and Call onhand quantity
Level = Function
Enabled = Yes
On condition tab select
Trigger event = MENU1
Remain will left default
On Actions tab select
Seq = 1
Type = Property
Description = Copy value for item
Language = All
Enabled = All
Object Type = Global variable
Target object = ITEM
Property name = Value
Value = =:MTL_TRX_LINE.ITEM
Seq = 10
Type = Buitlin
Description = Call Form
Language = All
Enabled = All
Builtin type = Launch Function
Function code = INV_INVMATWB
Function name = Material Workbench
Note:- when you select Function code the Function name will automatically be detected.
The trigger type as menu1 specifies that this trigger will be fired when click on the menu1 which is
Onhand Quantity.
The record on seq 1 will create a global variable and the item selected on the form will be copied to this global variable which we will pass to the form will be called by this menu.
The record on the seq 10 will call a form because builtin launch function is used to do so in this case the function name INV_INVMATWB calls the onhand quantity form.
If you want to know the form name navigate to that form call personalization form and see the function name for that form.




Close both the forms
Recall the miscellaneous transaction form select any item and click to Tools > Onhand Quantity

It will display the onhand quantity form.



Once the form is called its half done you have called form and you have done half of the zooming functionality.
Click on the item / revision field to check the table field in the item diction.
Click Help > Diagnostics > Examine
Copy values for block and field.



Now navigate to Help > Diagnostics > Custom Code > Personalization.
This will call the personalization form for Onhand Quantity form.


Create a record
Seq =10
Description = Moving values from global variable
Level = Function
Enabled = Yes
On conditions tab
Trigger event = WHEN-NEW-FORM-INSTANCE
Leave remaining as default.
Move to actions tab
Insert values as
Seq = 10
Type = Property
Description = Transferring values from global variable
Language = All
Enabled = Yes
Object type = item
Target object = MATERIAL_QF.ITEM
Property name = Value
Value = =:global.item
Create a new record as
Seq = 11
Type = Builtin
Description = Move to next block
Language = All
Enabled = Yes
Builtin type = DO_KEY
Argument = Next_Block
Seq = 12
Type = Builtin
Description = Move to next fielf
Language = All
Enabled = Yes
Builtin type = DO_KEY
Argument = Next_Item
In Seq 10 the value from Global variable is copied to the Item filed in the Onhand Quantity Form. It only copies the value to item field and moves to cursor to first field. When we click on find button it will display all the items. Now this is because the item is only copied to the field but not actually validated, this thing is handled in Seq11 and Seq 12. As cursor is on the first field of this form and the item is the first field of the second block Seq 11 moves the navigation to the first field on the second block and Seq 12 moves the navigation to the second field of the second block, as the cursor first came in the item field when it navigates out of the item field it gets validated. Now if we find the records it displays only particular records.





Save and close all the forms.
Invoke Miscellaneous transaction form select any item and then select Onhand Quantity from the tools menu it will display the Onhand Quantity form and copies the value and also validates it. Enter further criteria’s if you have to and click on find button it will display the item specific records.


Tuesday, 21 July 2015

Forms Persionalization


Form Personalization with Examples


Form Personalization:

 

  1. Form Personalization is a feature in Oracle Apps that allows us to change the behavior of form based screens.
  2. It can be moved easily through FNDLOAD from one instance to another, It can be restricted at   Site/User/Responsibility Level.

What can be done through Form Personalization?


1.        Zoom from One form to another.

2.        Pass data from one form to another through global variables.

3.        Enable/Disable/Hide fields dynamically.

4.        Launch URL directly from oracle form.

5.        Call PL/SQL procedure.

Components of Form Personalization:





 
 

How To make a Field Mandatory in the Form:

 

Go for Any Perticular Form If you want to personalize, Open that form
 
 
 
Go as specified Navigation in Help ->Diagnostics-> Custom Code -> Personalize
 
 
 
Once Open That let we create 10.1 Seq For Make Field Mandatory (Make sure that This should be Enabled). 
 
Condition->Trigger Event we are selection as WHEN-NEW-FORM-INSTANCE.
 
 
 



Object_type:Item(Column)
Target_Object :MTL_SYSTEM_ITEMS.LIST_PRICE_PER_UNIT_MIP(Which field you want to make it mandatory select that column as target Object).
Property_Name:Required
 
 


 
 

 How to perform calculations in the field:

 

 

 
 




Calculations will be done through per each Record so we selected as WHEN-NEW-RECORD-INSTANCE


 
Let we calculate this in attirbute_13 in PO_LINES
 
 
 



Meaning of Special fields in Form Personalization:


      Menu(1-15) will be in tools

       Populate tools menu (SPECIAL 1-15)

       Populate reports menu (SPECIAL 16-30)

       Populate actions menu (SPECIAL 31-45)

       It is recommended to use Menu before Tools

Various components used In Form Personalization:


Trigger Event  - These are predefined event. Based on the value chosen the function will execute only when that particular event triggers on the form.

Processing Mode - Query mode or Not in Query mode or   Both

Context   - At what level like user or Responsibility level

Menu      -    this is used to call one form from another. it is used to implement the zoom functionality. There are 45 menu entries which are used to call                      one form from current form.

Built In    -   It allows you to call Oracle standard built-in and Functions

 

Launch a URL







 
 

How to hide a field



 
 
 
 









Tuesday, 14 July 2015

CUSTOM.pll versus Forms Personalization

CUSTOM.pll versus Forms Personalization



It is indeed time to stop using CUSTOM.pll
If you are on 11.5.10, then it is important for development team to enforce the usage of Forms Personalization over CUSTOM.pll, where possible.


Most of the things that can be done using CUSTOM.pll can now be done via Forms Personalization.
However there are certain gaps for which we have no option but to rely on CUSTOM.pll

This article compares the two techniques i.e. CUSTOM.pll versus Forms Personalizations

Why should we prefer FP over CUSTOM.pll ?1.    CUSTOM.pll is a single file/entity, hence only one developer can make changes to CUSTOM.pll at any given point in time.
You may also read best practices in CUSTOM.pll 
2.    If for some reasons CUSTOM.pll causes issues in Production, you will have to re-release the code changes after another round of UAT.
Form Personalizations makes this much simpler by allowing you to disable specific personalizations.
3.    You do not need to resort to programming for trivial tasks like changing prompt, and more so for changing prompts in Muli-Lang environment




Lets do a quick comparison between Forms Personalization and CUSTOM.pll
Task/Business Requirement
CUSTOM.pll
Forms Personalization
Change LOV Query
Yes
Yes

a. Create a New Record Group
b. Attach new RG to LOV
Change field properties like Mandatory/Display etc
Yes
Yes
Zoom to another screen
Yes
Yes
a. Enable Menu
b. Trap the Menu event
Disable a Menu entry when certain conditions are met
Yes
No
See Note-1
Display messages, warnings, hints etc
Yes
Yes
Display message with Questions, and conditionally execute code based on users response to the question
Yes
No
Execute PL/SQL Stored procedures
Yes
Yes
Change Navigation and Navigational Properties
Yes
Yes
Change block properties like “Query Where Clause” etc
Yes
Yes
Change is applicable across multiple screens, like Changing window title for all screens within one Organization/Responsibility
Yes
Yes
See Note
-2
Show FND Messages with their tokens replaced
Yes
See Note-3


Important: Oracle will keep on improving capabilities in Forms Personalizations.
Hence some of these limitations that we see now in Forms Personalization might disappear over a period of time.


Note-1

Once a menu has been enabled using Forms Personalization, it then can not be conditionally disabled. However the proposed workaround over this issue is to display a message when MENU is clicked in the scenario’s it was meant to be disabled.



Note-2
Lets say you want to change the window title for all the screens within a responsibility. In this case, in CUSTOM.pll you could do so by a pseudo code similar to below
    If fnd_global.responsibility like ‘XX%CASH%’ THEN
        Set window title ( ‘Note: All transactions are audited’);
    End if
As you can see, this can be achieved quite easily in CUSTOM.pll  and the changes will be visible across multiple screens in the context.
However, for Forms Personalization, you will have to go and personalize each and every screen for which you want this change to be effective.


Note-3
The proposed workaround is to display the message that is returned as a result from SQL Statement.





Time for some Q&A


Question: Should we migrate code from CUSTOM.pll into Forms Personalization?
Not really, there is no value in doing so, given that CUSTOM.pll is still supported and will remain so within the realms of Apps Unlimited.


Where is the metadata for Forms Personalization stored?
These personalizations are stored in FND tables



What is called first? Forms Personalization or CUSTOM.pll
First your form personalization is called, and then CUSTOM.pll is called.



Is forms personalization called for additional set of triggers vis-à-vis CUSTOM.pll?
Not really, the same set of triggers are passed to both CUSTOM.pll and Forms Personalization. To understand the fundamentals.

steps creating custom form using template.fmb

steps creating custom form using template.fmb




(Before going to design form we need to change the forms_path
win+R------> regedit ------> HKEY_LOCAL_MACHINE -----> software ----->oracle -----> Devsuite Home(---) ----> form_path or form60_path --------->(right click) modify paste your resourse folder path

1) open the template.fmb ( hope u have done all the prerequisite required by coping necessary plls in right path)
2) create new datablock ( xx_block)
3) create canvas (xx_can)
4) block -> item attribute canvas property , select newly created canvas ( xx_can)
3) create new window (xx_win) change the defalut canvas property (xx_can)
4) form property , associate newly created block to first_navigation_block property
5) in pre_form trigger change then window name

app_window.set_window_position('XX_WIN', 'FIRST_WINDOW');

      Note: You need to change the template name in "WHEN_NEW_FORM_INSTANCE"

6) custom package app_custom , change the window name for ---eg if (wnd = 'xx_win') then
for closing and opening of window

7) compile the form
8) In apps create form , function using application developer responsibility
9) attached form to the menu
10) try to open the form.