Friday 26 December 2014

    Custom form solutions  



  • Unable to Run Oracle forms locally (without deploying on server)  from form builder 
  • Issue :  i) a plugin is needed to display this content 
       ii)  FRM-10142: The HTTP Listener is not running 
  1. To run forms locally we must have jinitiator installed
  2. Check file -> preferences and set the application server URL to default
 Select browser as internet explorer 


    iii) Check your java version
    iv) Here we consider 1.6.0.0
    Open the formweb.cfg from below location 
    Change the information as higlighted below , this is based on the java version you are using in your system

    1. Start the server as below and run the form, you should see the form is opening by activating the java which will be promoted when the form is opened in the browser.Enjoy 

  • Who columns in custom Oracle forms


  • Set Environment Variable
    cd $APPL_TOP
    ls *.env
    .space(copy white environment variable name from ls n enter  )
  • Adding Coloumns to already built forms

    Don’t do this -- right click block and add coloums by the data block wizard as it will re create the all items of that datablock and mess everything

    Do this --- add fields directly by drag and drop on canvas and make them database item and map their column with database column. Set their class property and respective properties
  • Item movement on Canvas can be set interms of pixel, cm , inches


    View -> customise ruler guide

  • Adding Calender to text field



    Also pay attention that textbox on which you are popping out the calender should have its property class as TEXT_ITEM_DATE  and not  as TEXT_ITEM  ,

  1. Use calendar.show; in key list val trigger
  2. Make lov of item to enable_list_lamp
  3. Make validate from list to no
  • LOV List of values in form


  1. Create a record group
  2. Add query in property of record group record group query
  3. Create lov by wizard , attach record group to lov in its property
  • Showing Runtime Message  / Fnd_message
    IF :XXQLG_VAT_RATE_TBL.end_date > :XXQLG_VAT_RATE_TBL.start_Date
    THEN
    FND_MESSAGE.SET_STRING('End Date  should be greater than Start date.');
    FND_MESSAGE.SHOW;
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
  • Two Windows on one form /Multiple window closing


      if (wnd = 'MAIN_WINDOW') then   
        app_window.close_first_window;
      elsif (wnd = 'POPUP_WINDOW') then   
      go_block('XX_QVC_EAM_ASSET_HISTORY_TBL');
        --defer relations
        --close related windows               
      elsif (wnd = '<test>') then 
        --defer relations
        --close related windows   
        null;
      end if;


    When you have multiple windows and multiple form then always remember that when you close one window having datablock ,its necessary to set the navigation to other block (whatever b the window)  , by default forms set to the previous block (assigned in properties of block ) if you want to set the specific block to be navigated when window is closed mention the block name in previous nevigation data block property

    You can use the hide_window property in when new form instance

  • How to suppress the system messages

    :system.message_level := 0;
    :system.message_level := 25;
  • GLOBAL Variable


    Global variable are declare above the declare
    It don’t have datatype its syntax is :GLOBAL.s:='1';  and we can access it as :global.s

  • Random Number in ORACLE


    SELECT substr(dbms_random.value(10, 99),-2)
    FROM DUAL;   this will create random number value from 10 to 99


     General Issues in Oracle Custom Form Development 

  • Form not displyaing proper output/ only lable item showed
  • Change the form name
    Create new menu / function /form and attach the new renamed form to that menu

    Or restart the puttty and winscp
    Check out appstand.fmb file is there in the resource folder at AU_TOP

  • Cntrl+ MAJ+K --- shows shortcut available for in form
  •  forms not running

    Go to folder where Jinitiator reside normally c:/Program Files/Oracle....... and search for the file "jvm.dll"
    3. Rename the "jvm.dll" to any name you want.
    4. If you are using Forms 10g, go to its folder i.e c:/devsuite_*/jre and search for the same file "jvm.dll" in that folder.
    5. Then copy that "jvm.dll" to the folder of Jiniatiator mentioned in step 2. replacing the jvm.dll that you renamed.

  • Forms not running
  • Install all setup files present in below folder and set default browser as netscape navigator (edit->preferences->runtime)

    D:\swapnil dandgvhal\reading stuff\form builder not running forms 

  • fmx /fmb not find

  • some time you check path of fmb / fmx from front end and check out in server according to that path but its not found on that path because its stored in custom path rather than oracle apss seeded path

  • Progress indicator issue …..

  • Solution : follow the reigistration steps of custom form , when windows name is  not properly set in app.custom package and pre_from trigger  we will get progress indicator after closing the form



  •  Multiple windows and canvas in same form 
  • You can get the same issue when there is conflict between windows set while colsing the window for multiple windows related same form we have to mention the second window name  in custom app package

      if (wnd = 'MAIN_WINDOW') then   
        app_window.close_first_window;
      elsif (wnd = 'POPUP_WINDOW') then   
      go_block('XX_QVC_EAM_ASSET_HISTORY_TBL');
        --defer relations
        --close related windows               
      elsif (wnd = '<test>') then 
        --defer relations
        --close related windows   
        null;
      end if;



  • FMRWEB.res   enabling disabling short cut key on oracle custom form  this file is located at
  • D:\DevSuiteHome_1\forms


    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 )





Thursday 28 November 2013



Calling Simple Webservice in jdvloper and getting response/Calling webservice in java /Webservice Calling in Jdeveloper 
  • We are going to use the weather webservice located at URL

http://www.webservicex.net/globalweather.asmx?WSDl  ( service provided by webservicex.net)

  • We are going to use jdevloper 11.1.1  (release 1) 




  •  Right click on new project1 select webservice proxy in webservices a wizard will appear

  •  Select jax ws style in clinet style enter the wsdl url of webservice

 














  • Click next next and check the gerate asyhnchornous mehtod for all operations this will create java stub files for all the operations if some error occures select continue and click next next untill the java stubs get generated






















  •  Open the globalweathersoapclient.java file












  •  Add code to the GlobalWeatherSoapClient.java file in main class and run the java file you will see after passing paramter  cityname and country name to method getWeather its giving response and returning the weather of respective city

    String weather;
    weather=globalWeatherSoap.getWeather("BHOPAL","INDIA");
    System.out.println(weather);  


Tuesday 26 November 2013

    -----------ORACLE FORM STUFF--------------



  • Cntrl+ MAJ+K --- shows shortcut available for in form



  •  forms not running


    Go to folder where Jinitiator reside normally c:/Program Files/Oracle....... and search for the file "jvm.dll"
    3. Rename the "jvm.dll" to any name you want.
    4. If you are using Forms 10g, go to its folder i.e c:/devsuite_*/jre and search for the same file "jvm.dll" in that folder.
    5. Then copy that "jvm.dll" to the folder of Jiniatiator mentioned in step 2. replacing the jvm.dll that you renamed.


  • fmx /fmb not find


    some time you check path of fmb / fmx from front end and check out in server according to that path but its not found on that path because its stored in custom path rather than oracle apss seeded path




  • Adding Coloumns to already buit forms

    Don’t do this -- right click block and add coloums by the data block wizard as it will re create the all items of that datablock and mess everything

    Do this --- add fields directly by drag and drop on canvas and make them database item and map their column with database column. Set their class property and respective properties




  • Item movement on Canvas can be set interms of pixel, cm , inches


    View -> customise ruler guide





    Adding Calender to text field


    Also pay attention that textbox on which you are popping out the calender should have its property class as TEXT_ITEM_DATE  and not  as TEXT_ITEM


    LOV List of values in form

  1. Create a record group
  2. Add query in property of record group record group query
  3. Create lov by wizard , attach record group to lov in its property

  4. ORACLE FORMS


    ORACLE FORM BUILDER
    Oracle has provided a form named, TEMPLATE.fmb, to act as a starting point of any new Oracle Apps form development. This form resides in $AU_TOP/resource directory on the Oracle Apps server, i.e. the node on which Oracle Forms server is located.
    Oracle keeps the entire set of Forms libraries in the same directory, i.e. $AU_TOP/resource. For any Oracle Apps form customization/development, we need to download the library files on the local pc where the forms customization/development will be downloaded.


    Form Alert’s

    Definition : Alert’s are the notification used to notify after generation of specific event

    Components of Form
    1. Form builder
    2. Form compiler
    3. Form runtime

    Components of Form Builder
    1. Object navigator
    2. Property palette
    3. Layout editor
    4. pl/sql editor
    Forms contains of
    1. Blocks
    2. Items
    3. Canvas
    4. Frames
    5. Windows
    6. PL/SQL Code Block



    Three types of ALERT STYLE(popup style ALERT STYLE:PROPERTY PALLETTE)
  5. Stop Alert
  6. Caution Alert
  7. Note Alert

  8. We use TRIGGER’s to launch Alert. And At Max 3 buttons can be used with Alerts.
    BUTTON 1 LABEL
    BUTTON 2 LABEL
    BUTTON 3 LABEL

    4 types of canvas
  9. Content canvas
  10. Stacked canvas
  11. Tab canvas
  12. Toolbar canvas

  13. We use built-ins to set/get the run time properties of item/blocks.
    (:BLOCK_NAME.ITEM_NAME) used to perform comparison.
  14. To declare GLOBAL VARIABLE
  15. YOU HAVE TO DECLARE IT ABLOVE DECLARE BLAOCK WITH SYNTAX AS

    : GLOBAL . variable_name := 0;

  16. Before hiding any object we have move cursor first then that object can be hidden on the screen.
  17. If we want to show the empty canvas then we have to create any item on that canvas with size, width & length . or simply hide that item And Move the cursor to that item.
  18. Used triggers in Alert Example
  19. SET_NEW_FORM_INSTANCE
    WHEN_BUTTON_PRESSED

  20. We can add our own PLSQL CODE and register it in trigger
  21. Go to PLSQL EDITOR IN object navigator
  22. Shortcut keys

    F3-boejct navigator
    F4- property palette
    F11- Trigger




  23. LIST OF FORM BUILT-INS
  24. --SHOW_ALERT(‘alt_name’); THIS IS THE FUNCTION WITH RETURN TYPE NUMBER
    --EXIT_FORM;
    --SET_ALERT_PROPERTY('AL_NAME',ALT_TYPE(i.e.--text or title), ‘ALT_MESSAGE’);   
    --GO_ITEM('BLOCK_NAME.ITEM_NAME'); to move cursor (it can also used to jump from one canvas to another
    --SET_ITEM_PROPERTY('item_name',Property_name,PROPERTY_VALUE);
    --Commit_form : is used to save form ( USEFUL WHEN WE MAKE DATABASE CHANGES)
    --WHEN_NEW_FORM_OPEN

    BUTTON
  25. When we do button disable or invisible then it’s necessary to make it visible and enable both .

  26. Radio button
  27. Each radio group we have to set the initial value first , in each radio button of radio group we have to set the radio button value as ‘A’ or ‘B’ ,’C’,’D’ else 1,2,3,4 like this
  28. We can set the label of radio button at run time for that we can use method SET_RADIO_BUTTON_PROPERTY('block6.Radio_group1','RADIO_FIRST',label,option1); here block6.radio_group1 is the name of radiogroup , radio_first is the first radio button in radio group , label is the property which we want to set at run time , option 1 is a variable which will pass value of label at run time .


  29. LOV (LIST OF VALUES )
    (for more information check out help in form builder )
    List of value is to pop out list when we click /press a item . LOV can be generated simply by right clicking the item in object navigator and then selecting the lov wizard where we need to enter the query.
    Now we need to write show_lov(‘lov_name’) in trigger so that lov will be get displayed, return type of lov is Boolean




    GLOBAL Variable

    Global variable are declare above the declare
    It don’t have datatype its syntax is :GLOBAL.s:='1';  and we can access it as :global.s


    Random Number in ORACLE

    SELECT substr(dbms_random.value(10, 99),-2)
    FROM DUAL;   this will create random number value from 10 to 99



    Forms conversion ( form to xml conversion ) (xml to form conversion )

    Different oracle forms file
    Form module =-.fmb files,
    Object libraries=.olb files
    Menu modules =.mmb files

    We can convrt this files to .NET or Java  for that purpose we have to conver this file into xml files
    Oracle developer 9i and oracle developer suite 10 g provide froms2xml  convert tool and xml2form convert tool

Monday 7 October 2013

JDeveloper: ORA-01882: timezone region found found

When trying to deploy your web application using JDeveloper to the integrated WebLogic, if you get the following error:

(oracle.jbo.JboException) JBO-29000: Unexpected exception java.sql.SQLDataException, msg=ORA-01882: timezone region not found


then to resolve this issue,

1. Goto Application menu and select Project Properties
2. In the Project Properties window, On the left pane, select Run/Debug/Profile
3. On the right pane, Edit the Default configuration (or double click on Default)
4. In the Edit run configuration window, select Launch Settings
5. For 'Java option' text box, add -Duser.timezone="+04:00"

You will probably need to save and restart JDeveloper for the changes to take effect.

Monday 16 September 2013

ADF Mobile - Deploying to Android fails with "Cannot find program ... aapt"



[08:02:10 PM] Deployment cancelled.
[08:02:10 PM] ----  Deployment incomplete  ----.
[08:02:10 PM] Cannot run program ""D:\my softwares\sofwares\adt-bundle-windows-x86-20130729\sdk\platform-tools\aapt"": CreateProcess error=2, The system cannot find the file specified
[08:02:10 PM] CreateProcess error=2, The system cannot find the file specified


this errors occures because while debugging debugger look aapt file into path platfor-tools instead of looking into build-tool
while deploying adf mobile application you can get this error due to update of android sdk tool in android sdk manager .....solution to this error is go to your folder hierarchy of andorid sdk manager  ....as follows 

D:\my softwares\sofwares\adt-bundle-windows-x86-20130729\sdk\build-tools\android-4.3   select all files and folder from this path ( here path may differ according to your sdk updates and mobile device ) then paste those files into path   D:\my softwares\sofwares\adt-bundle-windows-x86-20130729\sdk\platform-tools .... thats it now start your android emulator and again deploy your application to the emulator :)