Showing posts with label Custom Form. Show all posts
Showing posts with label Custom Form. Show all posts

Friday, 14 June 2013

Query_Find Form in Oracle Apps

Steps To Develop a Query_Find Form in Oracle Apps
  • Step 1: Open Template.fmb with form builder save it with another name(XXMZ_Query_Find.fmb)  and give the module name as XXMZ_QUERY_FIND.
  • Step2 : Delete  BLOCKNAME from Window,Canvas and Data Block and delete DETAILBLOCK from Data Block.
  • Step 3: Create window(DEPT_WINDOW) apply subclass information as WINDOW and give the title.
  • Step 4:  Give this window name in PRE-FORM trigger (Form Level) and give this window   name in in APP_CUSTOM  body   Program_Unit( in place of window name).
Compile and Close The Window.
Compile and Close The Window.
 Step 5: Create Canvas(DEPT_CANVAS) apply subclass information as Canvas.
 Step 6:  Now Create Data block(DEPT)  with Wizard or Manual ,apply subclass information to the block as BLOCK   and also apply subclass information to the items as TEXT_ITEM.
 Step 7:Step 5: Drag QUERY_FIND Object Group from APPSTAND.fmb to Our Form(XXMZ_Query_Find.fmb) Object Group. Here we get  window,canvas,datablock will come automatically  with the name QUERY_FIND.
Step 8: Apply subclass information to Window,Canvas as well as Block. And drag these to first position   as shown in below.
 Step 9:  In QUERY_FIND data block we get 3 buttons(Clear,New,Find) with 3 Triggers.
Give Block name as DEPT in   WHEN-BUTTON-PRESSED trigger of New and Find Button. Compile and close.
Step 10: Next create  Control item in the Query_Find Block apply subclass information as TEXT_ITEM  and attach that item to the  QUERY_FIND canvas.
Step 9:
Next drag the QUERY_FIND trigger from APPSTAND.fmb and Place it in DEPT block  level trigger.
Syntax:             APP_FIND.QUERY_FIND(<results block window>,
<Find window>,
<Find window block>);
And write the following code in that trigger:
APP_FIND.QUERY_FIND(‘DEPT_WINDOW’, ‘QUERY_FIND’,'QUERY_FIND’);
 Step 10:
Next Create PRE-QUERY trigger in the block level(DEPT)
Syntax:          IF :parameter.G_query_find = TRUE THEN
COPY (<find Window field>,<results field>);
:parameter.G_query_find := FALSE;
END IF;
Write the following code
IF :parameter.G_query_find = ‘TRUE’ THEN
COPY(:QUERY_FIND.DEPTNO, ‘DEPT.DEPTNO’);
:parameter.G_query_find := ‘FALSE’;
END IF;
 Step 11: In the form module(XXMZ_Query_Find) give the first navigation block as QUERY_FIND. In the  QUERY_FIND datablock give next navigation block as DEPT.
 Step 12:   Finally Save and move your form from our Local Machine  to CUSTOM_TOP using WINSCP tool.
 Step 13:  Compile the Form using f60gen
In the UNIX environment, type the following command:
f60gen XXMZ_QUERY_FIND.fmb apps/apps
Now XXMZ_QUERY_FIND.fmx should be generated in the CUSTOM_TOP.
 Step 14:
Connect to Oracle Applications. Create a Form
(Navigation:Application Developer->Application-> Form)
Here give Form =>XXMZ_QUERY_FIND(.fmx )
Application => xxmz Custom(Custom TOP Application)
User Form Name=>Give any name
 Step 15: Create a function (Navigation: Application->function)
 Step 16:Attaching Form to the Function shown in below.
Attach that function to the Custom TOP menu
Click on Find Button 

CUSTOM FORM DEVELOPMENT

On the CLIENT machine create a FOLDER as say: c:\custom_test

In custom_test folder creates 2 folders forms, resource

Copy TEMPLATE.fmb, APPSTAND.fmb, .pll files to CLIENT

• Copy TEMPLATE.fmb , APPSTAND.fmb from AU_TOP/forms/US to c:\custom_test\ forms directory copy all .pll files from /Applvis/visappl/au/11.5.0/resource to c:\custom_test\resource using ftp
• On windows go to command prompt
• Cd c:\custom_test\forms
• ftp cloneserver
• username: applmgr password: applmgr
• now you are at ftp prompt
• bin
• prompt
• cd visappl/au/11.5.0/forms/US ( here apparently cd $AU_TOP does not work)
• get TEMPLATE.fmb
• (file copied)
• get APPSTAND.fmb
• (file copied)
• lcd ./resource (check this. Basically you need to be in c:\custom_test\resource. You can go to that directory and then run ftp)
• cd visappl/au/11.5.0/resource
• mget *.pll
• ( now all .pll files are copied to c:custom_test/resource)

SET env variable FORMS60_PATH through regedit

• Regedit/HKEY_LOCAL_MACHINE/software/oracle
• Double click FORMS60_PATH
• At the end of existing value data add: ;c:\custom_test\froms;c:\custom_test\resource

Now open TEMPLATE.fmb and make the following changes

• DELETE BLOCKNAME &DETAIL BLOCK FROM DATABLOCK,DELETE BLOCKNAME FROM CANVAS AND WINDOW
• Create a window NEW_WIN, canvas NEW_CAN
• Create a new block based on the table you created in your custom schema
• In pre-form trigger: app_windows.set_window_position(‘NEW_WIN’)…….
• In program units open custom_package.AP_cutom_pacakge body
• Change : if (wind=’NEW_WIN’);
• Template name = TEST_FORM
• Save as TEST_FROM to c:\custom_test\forms
• (????????SET THE WINDOW NAME AS U HAVE CREATED NEW WINDOW IN PRE-FORM TRIGGER BY BLOCKNAME?????)

DEPLOY the FORM (upload it to AU_TOP/forms/US)

• Go to command prompt (on client)
• cd c:\cutom_test\forms
• ftp cloneserver
• cd visappl/au/11.5.0/froms/US
• bin
• prompt
• put TEST_FORM.fmb


Changing ORACLE_HOME (/Visdb/visdb/9.2.0 to /Applvis/visora/8.0.6)

• thru putty login as applmgr
• pwd: /Applvis
• echo $ORACLE_HOME: shows /Visdb/visdb/9.2.0
• cd visora
• cd 8.0.6
• . VIS_cloneserver.env (this changes ORACLE_HOME apparently based on pwd?)
• echo $ORACLE_HOME: shows /Applvis/visora/8.0.6
• now ORACLE_HOME is 8.0.6 (forms/reports home)
• pwd : gives /Applvis/visora/8.0.6

COMPILE and generate FMX

• (now you are in /Applvis/visora/8.0.6 directory and ORACLE_HOME is set to /Applvis/visora/8.0.6)
• pwd: gives /Applvis/visora/8.0.6
• f60gen module=$AU_TOP/forms/US/TEST_FORMS.fmb module_type=form user=apps output_file=$TEST_TOP/forms/US/TEST_FORM.fmx compile_all=special batch=no
• this generates TEST_FORM.fmx and puts in TEST_TOP/forms/US

FORM REGISTRATION

• Login to applications with application developer responsibility
• Application/form
• Enter the following details
o Form: the fmx name (TEST_FORM)
o Application: Oracle Receivables (as per Amer) –give appropriate name based the intended use of this form
o user form name: TEST_FORM_U (this will appear in LOV)
o SAVE

Attach the FORM to FUNCTION
(Create a new function)
Application/function
Enter the following details
o Function: TEST_FUNCT
o User function name: TEST FUNCTION
o Form: TEST_FORM (previously registered)
o SAVE

Attach FUNCTION to MENU
Application/menu
• Enter the following details
o Menu: test_menu
o User menu name: test menu
o Seq: 1
o Prompt: test form
o Function: TEST_FUNCT( previously deined)
o SAVE

Attach MENU to RESPONSIBILITY

Attach RESPONSIBILITY to USER

Login as the new USER