Friday 26 December 2014

    Registering oracle custom form to Application (using template.fmb)

  •  Prerequisites

  • To do this we have to first download the few files from the server which are located in the resource folder along with them we have to downlaod the template.fmb file and the appstand.fmb file from the server , we have to place all this files to the resource folder (whose path will be given in environment variable.

    To attach form to application we have to use the template.fmb file  , this is used for custom form

    --Fist copy the resource folder from the server where you want to attach form , which have all its pll and all required files  (resources reside in the appl top )
    --set environment variable for form builder for R12 variable name should be forms_path for  6i variable name should be form60_path
    --also copy template.fmb and appstand.fmb file from server
    --open this template.fmb if opening it from form builder is showing dirrernet error then just close the form builder and open the template.fmb file direclty .
    --- chang the name of template .fmb 



    1. Download the required fmb(s) and pll(s) from the server.
    2. Develop the custom form in forms developer.
    3. Move the form into server.
    4. Compile the form file.
    5. Form registration.
    6. Form function registration.
    7. Attaching the form function into menu.

    Form path on local pc
    Mycoputer -> right click select  prpoerties ->advanced ->environment variable  if adding form path to user variable not working then add form path to the system variable


    We have to set this because in oracle apps server all form are being stored on AU top  ( cd $AU_TOP) where there is a folder  resource folder which holds
    All the important .pll files which are being used in the all forms .




    Required PLL files  for any custom form development are

    APPCORE.pll
    APPCORE2.pll
    APPDAYPK.pll
    APPFLDR.pll
    CUSTOM.pll
    FNDSQF.pll
    FV.pll
    GHR.pll
    GLOBE.pll
    GMS.pll
    HRKPI.pll
    IGILUTIL.pll
    IGILUTIL2.pll
    JA.pll
    JE.pll
    JL.pll
    OPM.pll
    PQH_GEN.pll
    PSA.pll
    PSAC.pll
    PSB.pll
    VERT.pll
    VERT1.pll
    VERT2.pll
    VERT3.pll
    VERT4.pll
    VERT5.pl
    Appstand.fmb

    For each item , each window , each datablock , each canvas we have to inherit the subclass information this is done because the form should look like the other forms as that of in e business suite of perticular instance by doing this it inherit all properties like fonts, colour etc .



  • Steps in detail

  • 1. Download the TEMPLATE.fmb and APPSTAND.fmb from $AU_TOP/forms/US.
        (You can find all the oracle apps seeded forms in this directory)

    2. Download the required pll files from $AU_TOP/resource.
        (You can find all the oracle apps seeded library files in this directory)

    3. Copy and save the TEMPLATE.fmb into meaningful custom name.

    4. Delete the following objects
                 i. Window name (BLOCKNAME)
                ii. Canvas name (BLOCKNAME)
               iii. Data blocks (BLOCKNAME and DETAILBLOCK)

    5. Create the windows, canvases and data blocks as per the requirements. (Don’t forget to sub class the properties for the same as above ) If you are creating the multi record blocks then include a one non-data base item in the same block and sub class the property called “CURRENT_RECORD_INDICATOR”.





    6. You must modify the following triggers ( when new form instance is optional one which can be used to navigate to new form as soon as it open ) 
              i. PRE-FORM
             ii. WHEN-NEW-FORM-INSTANCE.



    7. You do not modify these form-level triggers, but you can write block or item level triggers that override the form-level trigger.
               i. KEY-LISTVAL
              ii. ON-ERROR.

    8. You do not modify the following triggers in any way.
                   i. STANDARD_ATTACHMENTS
                  ii. ZOOM
                 iii. FOLDER_ACTION
                 iv. KEY-HELP
                  v. KEY-EXIT
                 vi. KEY-EDIT
                vii. KEY-COMMIT
               viii. WHEN-WINDOW-CLOSED
                ix. CLOSE_WINDOW

    9. You must modify the APP_CUSTOM package body as mentioned like a below figure.
    here 'EMPDETAILS_WIN' Is your first and main window to travel as soon as form open( Refer other post on this blog when you want to use multiple windows )

    10. Move the fmb file into $XXCUSTOM_TOP/forms/US.( in your case move the file to that application top in the application you have register the fmb file )

    11. Compile the fmb file in PuTTY  for the linux server (connect to PuTTY and change the current directory into $XXCUSTOM_TOP/forms/US, execute the below mentioned command with apps password.)

     Setting Environment variable in linux
     go to appl top by
    Cd $APPL_TOP
    Find the list of environemnt variable
    Ls *.env
    From the  list of dirrerent variable we will have to select the appropriate enviroament variable depend on instnce on which we are deploying the form as below
    .(space)(environment_variable.env)

    Compile Command Release 12


    frmcmp_batch userid=apps/apps module=/oraphs/TEST/apps/apps_st/appl/au/12.0.0/forms/US/XXQLGVAT.fmb output_file=/oraphs/TEST/apps/apps_st/appl/inv/12.0.0/forms/US/XXQLGVAT.fmx compile_all=special
    --------------------------------------------------------------------------------------------------------------------------------

    While comipling this query on putty we have to fisrt enter the username and password in putty simply by login in  then go to the path where the form fmb file is located by command exa.
     $ cd oraphs/TEST/apps/apps_st/appl/au/12.0.0/forms/US/

    Then use  compile command on linux server  ( change the username / password  ,path , fmx and fmb name as per instance details here  username password is apps/apps)

    frmcmp_batch userid=apps/apps module=/oraphs/TEST/apps/apps_st/appl/au/12.0.0/forms/US/XXQLGVAT.fmb output_file=/oraphs/TEST/apps/apps_st/appl/inv/12.0.0/forms/US/XXQLGVAT.fmx compile_all=special


    Compile commnd for 11i Release
    f60gen module= userid=APPS/ output_file= module_type=form batch=yes compile_all=special

    12. Register the form in oracle apps.
    Navigation -> Application Developer > Application > Form
    (here the form name EMPDETAILS is nothing but the fmx name )

    13. Register the form functions
    Navigation -> Application Developer > Application > Function

    Description TAB (Function name and user function name)
    Properties TAB (Type -> Form)
    Form TAB (chose the custom form name)


    Attach this form function into menu. 
    To which menu form to be attached can be find by go to system administrator > security > responsibility > (here query the responsibility where you want to attach your custom form ) >copy the MENU and attach form to that menu by
    Navigation -> Application Developer > Application > Menu
    Query the appropriate menu and add the custom function into the same.

    15. Verify the form in oracle apps. ( IF YOU ARE GETTING ANY CALENDER ERROR THEN PLEASE CHANGE THE DATA BLOCK ORDER , PUT CURRENTLY MODIFIED DATABLOCK AHEAD OF CALENDER AND OTHER DATA BLOCK )





No comments:

Post a Comment