Install & Configure Oracle Weblogic Server 10.3.6 & Forms & Reports 11g on Windows8/Windows 2008 R2

April 6, 2013

Hello guys, we just posted how to upgrade your existing  Forms & Reporots 32Bit 11.1.2.1.0  to 11.1.2.2.0. Why don’t check it out here?

We are running a blog explaining many workaround solutions for installing and configuring discontinued, uncertified Oracle software on Windows 7 & Windows 8 from last year onward.

Let us accept it, Developer 6i applications face multiple issues while used on both Windows 7&8 like:

  1. Intermittent crashes
  2. Rendering menu modules
  3. Stability
  4. Running products like Reports and Graphs

Usually a legacy application compiled using patch sets below 18 are less prone to above mentioned issues, however an application completely developed using patch 18 regularly get into issues on Windows 7 & 8 where hacks are used.

Recently we were forced to look towards a better environment for a new application, which by certain reasons cannot be accommodated and hosted within Oracle Application entity, and we started dwelling the possibilities of setting up a Weblogic server (old application server) for our forms and reports modules.

in short, we did it! and we are sharing the experience with you.

you need the following to carryout the installation and configuration

Windows 8/Windows 2008 R2 box (VM for testing)

Oracle Weblogic Server 10.3.6 (32Bit)

http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html

image

Oracle Forms and Reports 11g Release 2

http://www.oracle.com/technetwork/developer-tools/forms/downloads/index.html

image

(Hurry, you may not find the above software bundles with OTN after few weeks or months time)

Part 1 – Weblogic Server 10.3.6 Installation

Installation of Weblogic is pretty straight forward on Windows 8. Only once the compatibility issue is raised, which you can safely ignore by the click of a button.

The Weblogic 10.3.6 (wls1036_win32.exe) installation comes as a single .exe file, which you can start like any other installer.

Please have a look at the images

1

Choose a directory name without spaces, this is going to be your middleware home.

2

Uncheck the email notification, you don’t need it as far you don’t have a support from oracle

3

Select “Custom” installation type, as you can select which JDK to be selected and other components at later stages. We installed both JDK for our installation.

4

Click next to continue

5

Leave the selection as it is

6

Select Yes for “Node Manager Service”, it will make few things simpler at later stages, especially while you are using Admin Server for managing both forms and reports servers.

7

Select “All Users”

8

Clicking “Next” will start installing the Weblogic server 10.3.6 for you. Relax and wait until the installation completes.

9

10

Once installation has been done, you will be given an option to setup the Weblogic server with an instance, which we will do as a part of Forms & Reports 11g installation and configuration.

Part 2 – Installation of Oracle Forms and Reports 11g Release 2

Once you download the  Oracle Forms and Reports 11g Release 2, the zip archive must be unzipped to a folder, which will create Disk1, Disk2, Disk3 folders. You should start the “Setup.exe” from Disk1 folder. Once again the installation is straight forward, without requiring to make any specific hack to the installation media.

12

You must skip the “Software Update” option, unless you have the paid support from Oracle for the product you are installing.

3

Most important: You should select “Install Software – Do not configure” at this level, as the configuration will be done once after the installation completed.

4

On Windows 8 you will be notified about two vital check failures, however allowing you to continue the installation at own risk by clicking the “Continue” button.

5

Next page will clearly notify you that you must have an application server already installed. Application server akka Weblogic server. Without Weblogic server you cannot use Oracle Forms and Reports 11g Release 2 even for development purpose.

6

7

You can safely ignore being updated about the software updates once again

8

Once you say yes to software update related prompt, the installation will start

9

10

11

Now you have finished installing Oracle Forms and Reports 11g Release 2 on Windows 8/Windows 2008 R2

Part 3 – Configuring the Weblogic server with forms and reports 11g

As we have installed “Node Manager Service” prior configuring the forms and reports, we need to stop the Node Manager Service from Windows services console

Invoke “services.msc” and stop the following service “Oracle Weblogic NodeManager(D_Weblogic_Middleware_wlserver_10.3)

If you don’t stop this service, you are going to come across issues as discussed here

To configure the Weblogic server for forms and reports, you need to invoke the “Configure Classic Instance” cmd file from Windows menu folder “Oracle Classic 11g – Home1”

1

2

It may take couple of minutes until you are provided the installation application GUI as shown below. Click next

3

Select the option “Configure for Deployment”

4

Unless you are entitled for Oracle support ignore the email part

56

Now, choose a meaningful name for your Oracle instance.

7

Important: You must note down the following details for future references. We opted to use the username suggested by Oracle during the configuration which is “weblogic” and provide a password consist of alphabets and minimum one digit (number)

Domain is the node which will be setup with Weblogic for Administration server as well for both Forms and Reports Servers.

8

By default, Developer tools are not selected, you MUST select this node, incase if you are going to use the same machine for development (which is our objective with this exercise). You may uncheck the “Clustered” option, unless used in a production environment.

9

Select “Auto Port Configuration”

10

Try to avoid using Proxy. Microsoft ISA server can make the whole experience a parody, if used.

11

Use Identity management, only if already implemented and business mandatory. Else leave it unchecked

12

Click on “Configure” button and sit back, until the process is over!

13141516

You may save the installation responses for a future installation by clicking the Save button. Click “Finish” button to exit the configuration wizard

17

You can access the Weblogic Admin Server by visiting http://localhost:7001/console & the Enterprise manager through http://localhost:7001/em

You may run into issues accessing the Enterprise Manager, incase if you have automated the weblogic admin server startup part using services & we have another post explaining how to tackle it here

weblogic console

If the node manager service is installed you can start and stop various components for the domain through this console.

Part 4 – Starting and Stopping domain components AdminServer, WLS_FORMS(Forms Server), WLS_REPORTS(Reports server)

Oracle provides batch files to start and stop all the above mentioned components. You may start just WLS_FORMS and WLS_REPORTS services, unless planning to manage them through the Admin Server console.

Starting Weblogi Admin Server

AdminServer Start

Starting Forms Server

Forms Server Start

Starting Reports Server

Report Server Start

Part 5 – Automating Weblogic Admin Server, WLS_FORMS(Forms Server), WLS_REPORTS(Reports server) startup with Windows Services

Let us agree, the cmd windows look ugly, dangerous and a user can close them down, thus bringing the entire servers down unintentionally. A windows service looks much favorable under such scenarios and wise people from Oracle do provide solutions to create windows services for

  1. Weblogic Admin Server
  2. WLS_FORMS (Forms Server)
  3. WLS_REPORTS (Reports Server)

Creating Windows services for Admin Server and Forms server are pretty simple and straight forward business, while CMD command line length limitations will make Reports Server service creation a little difficult, don’t worry we have solution for it also.

Part 6 – Creating Windows Service for Weblogic Admin Server

Pre-requisite(s)

Notepad++ (or any decent text editor other than Windows notepad)

Create a .cmd file named “Install_AdminServer.cmd” with the following lines

echo off

SETLOCAL

set DOMAIN_NAME=appsdomain

set USERDOMAIN_HOME=D:\WebLogic\Middleware\user_projects\domains\appsdomain

set SERVER_NAME=AdminServer

set WL_HOME=D:\WebLogic\Middleware\wlserver_10.3

set WLS_USER=weblogic

set WLS_PW=pass123

set PRODUCTION_MODE=true

set MEM_ARGS=-Xms512m -Xmx512m

call "%WL_HOME%\server\bin\installSvc.cmd"

ENDLOCAL

Please note, you must provide the absolute domain name and physical directory names based on your installation preferences!

Save the script to “USERDOMAIN_HOME” folder, ie, “D:\WebLogic\Middleware\user_projects\domains\appsdomain” in our case

From elevated command line, execute the batch file, and the Windows service for Admin Server must be created, unless there were mismatches with the information supplied

Part 7 – Creating Windows Service for WLS_FORMS(Forms Server)

Create a .cmd file “InstallWLS_FORMS.cmd” using Notepad++ with following lines

echo off

SETLOCAL

set DOMAIN_NAME=appsdomain

set USERDOMAIN_HOME=D:\WebLogic\Middleware\user_projects\domains\appsdomain

set SERVER_NAME=WLS_FORMS

set WL_HOME=D:\WebLogic\Middleware\wlserver_10.3

set WLS_USER=weblogic

set WLS_PW=pass123

set PRODUCTION_MODE=true

set ADMIN_URL=http://localhost:7001

cd %USERDOMAIN_HOME%

call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd

rem *** call "D:\Oracle\Middleware\wlserver_10.3\server\bin\installSvc.cmd"

call "%WL_HOME%\server\bin\installSvc.cmd"

ENDLOCAL

Save the script to “USERDOMAIN_HOME” folder, ie, “D:\WebLogic\Middleware\user_projects\domains\appsdomain” in our case

From elevated command line, execute the batch file, and the Windows service for WLS_FORMS must be created, unless there were mismatches with the information supplied

Part 8 – Creating Windows Service for WLS_REPORTS(Reports Server)

Create a .cmd file “InstallWLS_REPORTS.cmd” using Notepad++ with following lines

SETLOCAL

set DOMAIN_NAME=appsdomain

set USERDOMAIN_HOME=D:\WebLogic\Middleware\user_projects\domains\appsdomain

set SERVER_NAME=WLS_REPORTS

set WL_HOME=D:\WebLogic\Middleware\wlserver_10.3

set WLS_USER=weblogic

set WLS_PW=pass123

set PRODUCTION_MODE=true

set ADMIN_URL=http://localhost:7001

cd %USERDOMAIN_HOME%

call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd

rem *** call "D:\Oracle\Middleware\wlserver_10.3\server\bin\installSvc.cmd"

call "%WL_HOME%\server\bin\installSvc.cmd"

ENDLOCAL

Unfortunately, you cannot just run the .cmd file and create a service for WLS_REPORTS like other services, as the java CLASSPATH for reports server has more than 3000 character length, which is beyond 32Bit command line architecture.

Hence you have to do a minor hack, as provided as a solution by Oracle.

Go to “D:\WebLogic\Middleware\wlserver_10.3\server\bin” folder (equivalent on your machine) and make a backup for the file “InstallSvc.cmd”

If the report server is running, terminate it by using Ctrl+C within the open cmd window

Wait until the server shutdown. Check the status through Admin Console.

Now restart the Report Server, using the menu interface

Report Server Start

Mark and copy the CLASSPATH= output and paste it to a new text document. You have to spend few minutes to wrap up the text and make sure the entire text is wrapped into a single line (This is why we love Notepad++)

Marking_Classpath

Add “set” in front of CLASSPATH= and your txt file content should look something like below and save the text file as “myClasspath.txt”

set CLASSPATH=D:\WebLogic\Middleware\Oracle_FRHome1\jdbc\lib\ojdbc6.jar;;;D:\WebLogic\MIDDLE~1\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;D:\WebLogic\MIDDLE~1\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\WebLogic\MIDDLE~1\JROCKI~1.0-1\lib\tools.jar;D:\WebLogic\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;D:\WebLogic\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;D:\WebLogic\MIDDLE~1\modules\features\weblogic.server.modules_10.3.6.0.jar;D:\WebLogic\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;D:\WebLogic\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;D:\WebLogic\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;D:\WebLogic\Middleware\wlserver_10.3\server\lib\weblogic.jar;D:\WebLogic\Middleware\oracle_common\modules\oracle.dms_11.1.1\dms.jar;D:\WebLogic\Middleware\oracle_common\modules\oracle.jmx_11.1.1\jmxframework.jar;D:\WebLogic\Middleware\oracle_common\modules\oracle.jmx_11.1.1\jmxspi.jar;D:\WebLogic\Middleware\oracle_common\modules\oracle.odl_11.1.1\ojdl.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\lib\adf-share-mbeans-wlst.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\lib\mdswlst.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\auditwlst.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\jps-wlst.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\jrf-wlst.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\oamap_help.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\oamAuthnProvider.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\ossoiap_help.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\ossoiap.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\sslconfigwlst.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\wsm-wlst.jar;D:\WebLogic\Middleware\wlserver_10.3\server\lib\weblogic.jar;D:\WebLogic\Middleware\Oracle_FRHome1\opmn\lib\nonj2eembeans.jar;D:\WebLogic\Middleware\Oracle_FRHome1\jdbc\lib\ojdbc6.jar;D:\WebLogic\Middleware\Oracle_FRHome1\opmn\lib\optic.jar;D:\WebLogic\Middleware\Oracle_FRHome1\opmn\lib\iasprovision.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\lib\adf-share-mbeans-wlst.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\lib\mdswlst.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\auditwlst.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\jps-wlst.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\jrf-wlst.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\oamap_help.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\oamAuthnProvider.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\ossoiap_help.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\ossoiap.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\sslconfigwlst.jar;D:\WebLogic\Middleware\Oracle_FRHome1\common\wlst\resources\wsm-wlst.jar;D:\WebLogic\Middleware\oracle_common\modules\oracle.adf.share_11.1.1\commons-el.jar;D:\WebLogic\Middleware\Oracle_FRHome1\jlib\dfc.jar;D:\WebLogic\Middleware\Oracle_FRHome1\dvt\lib\dvt-jclient.jar;D:\WebLogic\Middleware\Oracle_FRHome1\dvt\lib\dvt-utils.jar;D:\WebLogic\Middleware\oracle_common\jlib\ewt3.jar;D:\WebLogic\Middleware\oracle_common\modules\oracle.iau_11.1.1\fmw_audit.jar;D:\WebLogic\Middleware\Oracle_FRHome1\oui\jlib\http_client.jar;D:\WebLogic\Middleware\oracle_common\modules\oracle.idm_11.1.1\identitystore.jar;D:\WebLogic\Middleware\oracle_common\modules\oracle.idm_11.1.1\identityutils.jar;D:\WebLogic\Middleware\oracle_common\modules\oracle.jps_11.1.1\jaccprovider.jar;D:\WebLogic\Middleware\oracle_common\modules\oracle.jps_11.1.1\jacc-spi.jar;D:\WebLogic\Middleware\Oracle_FRHome1\ord\jlib\jai_codec.jar;D:\WebLogic\Middleware\Oracle_FRHome1\ord\jlib\jai_core.jar;D:\WebLogic\Middleware\oracle_common\modules\oracle.oc4j-obsolete_11.1.1\jazn.jar;D:\WebLogic\Middleware\oracle_common\modules\oracle.oc4j-obsolete_11.1.1\jazncore.jar;D:\WebLogic\Middleware\oracle_common\jlib\jewt4.jar;D:\WebLogic\Middleware\Oracle_FRHome1\jlib\jta.jar;D:\WebLogic\Middleware\oracle_common\modules\oracle.ldap_11.1.1\ldapjclnt11.jar;D:\WebLogic\Middleware\Oracle_FRHome1\lib\mail.jar;D:\WebLogic\Middleware\Oracle_FRHome1\jlib\netcfg.jar;D:\WebLogic\Middleware\Oracle_FRHome1\jlib\oracle_ice.jar;D:\WebLogic\Middleware\oracle_common\jlib\share.jar;D:\WebLogic\Middleware\Oracle_FRHome1\jlib\zrclient.jar;D:\WebLogic\Middleware\Oracle_FRHome1\reports\jlib\aolj.jar;D:\WebLogic\Middleware\Oracle_FRHome1\reports\jlib\confmbean.jar;D:\WebLogic\Middleware\Oracle_FRHome1\reports\jlib\runtimembean.jar;D:\WebLogic\Middleware\Oracle_FRHome1\reports\jlib\rwadmin.jar;D:\WebLogic\Middleware\Oracle_FRHome1\reports\jlib\rwenv.jar;D:\WebLogic\Middleware\Oracle_FRHome1\reports\jlib\rwrun.jar;D:\WebLogic\Middleware\Oracle_FRHome1\reports\jlib\rwxdo.jar;D:\WebLogic\Middleware\Oracle_FRHome1\jlib\rts2.jar;;D:\WebLogic\MIDDLE~1\ORACLE~1\soa\modules\commons-cli-1.1.jar;D:\WebLogic\MIDDLE~1\ORACLE~1\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;D:\WebLogic\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;D:\WebLogic\MIDDLE~1\WLSERV~1.3\common\derby\lib\derbyclient.jar;D:\WebLogic\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar

Now open the “InstallSvc.cmd” using Notepad++ and locate the line “set CLASSPATH=%WEBLOGIC_CLASSPATH%;%CLASSPATH%” and comment the same like

rem *** set CLASSPATH=%WEBLOGIC_CLASSPATH%;%CLASSPATH%

Now locate the line “set CMDLINE” within the “InstallSvc.cmd” and change the line like following

set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath @d:\myClasspath.txt -Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username=%WLS_USER% -Dweblogic.management.server=\"%ADMIN_URL%\" -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=\"%WL_HOME%\server\lib\weblogic.policy\" weblogic.Server"

There are two instances of set CMDLINE, you must change both lines, only replacing the “-classpath \”%CLASSPATH%\” part with -classpath @d:\myClasspath.txt

After the above, from elevated command line, execute the batch file, and the Windows service for WLS_REPORTS must be created, unless there were mismatches with the information supplied

Services

Change “Automatic” to “Manual” for better ease, at various situations. You may create a .cmd file for starting the services and another one for stopping them.

From our prospects, these services are just a facelift for the batch files, avoiding the immediate problems with accidental closure of cmd windows and thus causing serious issues to the instance. We came to this conclusion because, the service status are not updated incase if one of the services stopped by the Admin Server console at later stages, neither the service status update waits until the actual server starts to update  state of the service.

You can delete whole these service from command prompt, after stopping like following

>SC DELETE “service name”

We hope you will enjoy setting up Weblogic 10.3.6 and Oracle Forms and Reports 11g Release 2 on Windows 8/ Windows 2008 R2 following the instruction set provided above.

Regards,

admin


Oracle E-Business Suite R12 Rapid forms development using Developer 6i forms

December 18, 2012

 

Moving from client server architecture to R12 based domains could be quite challenging for Oracle developers, especially those who have spent years, enjoying the flexibility of testing forms modules from the local development machines prior moving the “working” modules to the production instances.

Let us see the general development scenario for R12 instances.

  1. From 10g forms, connect to database
  2. open TEMPLATE.fmb and save as “XXMYFORM” etc
  3. Then keep on adding the elements

Now, move the form module to $AU_TOP/forms/US and compile it to respective application repositories

Create form, menu items…

A long list and the most frustrating is keeping on FTP the slightly modified forms module to the R12 instance to compile and testing.

We have came across a quick resolution for this PIA(Pain in the ASS) approach (for forms modules which do not use folder views) by using developer 6i (Uhu, beware Oracle fan boys would tell you, Oracle does not support developer 6i any further)

Create a template.fmb using Developer 6i forms

Change the system coordinates to use inches in the place of points

image

  1. Save the template.fmb
  2. Using save as, save your template.fmb as a new fmb file (eg: aa.fmb)
  3. Connect to apps database instance and start adding windows, canvases, blocks etc to the form and TEST IT locally!!!
  4. TEST it until the results are as expected.
  5. Make a backup for your working module (copy aa.fmb to bb.fmb for example)

 

Open your aa.fmb file, developed using forms 6i with Developer suite 10g forms designer (You will get prompts stating the possible conversions for triggers, coding etc)

Open TEMPLATE.fmb and save it as “MYAPPSFORM.fmb”

Now, please give maximum attention towards copying the objects from your 6i module which is opened with Developer 10g forms, TO your form module which will go to apps instance

  1. Copy all the windows you have created with 6i module to 10g forms
  2. Copy all the canvases you have created with 6i module to 10g forms
  3. Copy all the blocks you have created with 6i module to 10g forms
  4. Copy record groups, lovs, form level triggers if any

Now, try to compile the 10g form. If you have copied everything from 6i, this new form shouldn’t give you any compilation errors.

Move the form to apps instance, compile, create forms, menus and do final testing, confirming everything is working fine.

regards,

admin


Install Oracle Developer Suite 6i (Patch 18) on Windows 8

August 25, 2012

A lot of happy news for Oracle enthusiasts! You can even install Oracle Developer Suite 6i following the same trick we provided for Windows 7. Please refer the attached images

https://windows7bugs.wordpress.com/2010/03/01/installing-oracle-developer-forms-reports-6i-on-windows-7-64bit/

Forms Installation

image

image

Reports Installation

image

image

Patch 18 Installation

image

Trying to execute a form without .dll patching

image

Nothing happens!

trying the same form after replacing the .dll files with “patched” ones

image

that’s it.

Enjoy guys!

Regards,

Admin


Oracle Developer 10g 10.1.2.0.2 Crash on Windows 7 while opening forms modules!

May 21, 2011

We are using Oracle developer 10g, details:

Forms [32 Bit] Version 10.1.2.0.2 (Production)
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options
Oracle Toolkit Version 10.1.2.0.2 (Production)
PL/SQL Version 10.1.0.4.2 (Production)
Oracle Procedure Builder V10.1.2.0.2 – Production
PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
Oracle Query Builder 10.1.2.0.2 – Production
Oracle Virtual Graphics System Version 10.1.2.0.2 (Production)
Oracle Tools GUI Utilities Version 10.1.2.0.2 (Production)
Oracle Multimedia Version 10.1.2.0.2 (Production)
Oracle Tools Integration Version 10.1.2.0.2 (Production)
Oracle Tools Common Area Version 10.1.2.0.2
Oracle CORE 10.1.0.4.0 Production

and recently noticed additional crashing behavior on Windows 7 (64Bit) without any apparent reasons. Based on one of our previous posts, after dwelling into possible reasons figured out the following!

Few of the database level procedures were modified with more parameters(IN and OUT) which was causing the developer suite to crash down.

So, prior you make changes to database level procedures or functions, MAKE SURE YOU DO CHANGE THE PROCEDURE/FUNCTION CALLS FROM YOUR FORM MODULES with all new IN and OUT parameters, then proceed with compiling your Procedures and Functions @ database level. If anybody is aware of another method to deal with this situation, please pass the information through comments.

for Windows7bugs,

Admin


Oracle EBS R12 how to call standard API/packages from custom form or reports

April 17, 2011

Okay guys and gals

We had a requirement to use certain Oracle standard API/packages from custom developer forms. After loads of struggle and asking various Oracle related forums, we hardly had a chance to get any satisfactory answers to our query “how to call oracle standard API or packages through custom forms or reports”

Finally with the help of a long term friend cum technical support person Mr. Anil Menon, we were able to successfully call the standard API or package call with our custom (test) form.

For the example we used “apps.INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES” procedure which indirectly refers fnd_api.g_false and apps.inv_quantity_tree_pub.g_transaction_mode parameters/constants defined in the package definitions.

Actual call to the API through a PL/SQL environment (Toad/Oracle PL/SQL) code is as following

SET SERVEROUTPUT ON;
DECLARE
v_api_return_status VARCHAR2 (1);
v_qty_oh NUMBER;
v_qty_res_oh NUMBER;
v_qty_res NUMBER;
v_qty_sug NUMBER;
v_qty_att NUMBER;
v_qty_atr NUMBER;
v_msg_count NUMBER;
v_msg_data VARCHAR2(1000);
v_inventory_item_id VARCHAR2(250);
v_organization_id VARCHAR2(10);
BEGIN

v_inventory_item_id := 24445;
v_organization_id := 901;

inv_quantity_tree_grp.clear_quantity_cache;
DBMS_OUTPUT.put_line ('Transaction Mode');
DBMS_OUTPUT.put_line ('Onhand For the Item :'|| v_inventory_item_id );
DBMS_OUTPUT.put_line ('Organization :'|| v_organization_id);
apps.INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES
(p_api_version_number => 1.0,
p_init_msg_lst => apps.fnd_api.g_false,
x_return_status => v_api_return_status,
x_msg_count => v_msg_count,
x_msg_data => v_msg_data,
p_organization_id => v_organization_id,
p_inventory_item_id => v_inventory_item_id,
p_tree_mode => apps.inv_quantity_tree_pub.g_transaction_mode,
p_onhand_source => 3,
p_is_revision_control => FALSE,
p_is_lot_control => FALSE,
p_is_serial_control => FALSE,
p_revision => NULL,
p_lot_number => NULL,
p_subinventory_code => 'ABC-01', --NULL for whole org
p_locator_id => NULL,
x_qoh => v_qty_oh,
x_rqoh => v_qty_res_oh,
x_qr => v_qty_res,
x_qs => v_qty_sug,
x_att => v_qty_att,
x_atr => v_qty_atr);
DBMS_OUTPUT.put_line ('on hand Quantity :'|| v_qty_oh);
DBMS_OUTPUT.put_line ('Reservable quantity on hand :'|| v_qty_res_oh);
DBMS_OUTPUT.put_line ('Quantity reserved :'|| v_qty_res);
DBMS_OUTPUT.put_line ('Quantity suggested :'|| v_qty_sug);
DBMS_OUTPUT.put_line ('Quantity Available To Transact :'|| v_qty_att);
DBMS_OUTPUT.put_line ('Quantity Available To Reserve :'|| v_qty_atr);
END;

This PL/SQL procedure will successfully print the results during a PL/SQL session through Toad or Oracle PL/SQL session. However, if you would try to invoke the same code through a PL/SQL procedure from a developer form development instance, the errors will start from the call to “fnd_api.g_false” stating “Implementation restriction: ‘APPS.FND_API.G_FALSE’ cannot directly access remote package variable or cursor. Under the package specification you will find G_FALSE constant has the the value ‘F’ and apps.inv_quantity_tree_pub.g_transaction_mode has a value ‘2’ pre-defined.

Umm, not a straight forward method to dwell the packages, find the constant values and modifying the PL/SQL script. For a small API call like above one, a programmer could use this approach as a work around, however, while dealing with APIs which take 10s of parameters, it could be really tiring.

Here is the workaround we used

Created a custom database level package


CREATE OR REPLACE PACKAGE XX_CHK_QTY IS
PROCEDURE retrive_quantity(item_id NUMBER, org_id NUMBER, subinv VARCHAR2, oqtt OUT NUMBER, oqtr OUT NUMBER);
END;

and created corresponding package body as following


CREATE OR REPLACE PACKAGE BODY XX_CHK_QTY AS
PROCEDURE retrive_quantity(item_id NUMBER, org_id NUMBER, subinv VARCHAR2, oqtt OUT NUMBER, oqtr OUT NUMBER) IS
v_api_return_status  VARCHAR2 (1);
v_qty_oh             NUMBER;
v_qty_res_oh         NUMBER;
v_qty_res            NUMBER;
v_qty_sug            NUMBER;
v_qty_att            NUMBER;
v_qty_atr            NUMBER;
v_msg_count          NUMBER;
v_msg_data           VARCHAR2(1000);
--v_inventory_item_id  VARCHAR2(250);
--v_organization_id    VARCHAR2(10) ;
BEGIN
inv_quantity_tree_grp.clear_quantity_cache;
apps.INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES
(p_api_version_number  => 1.0,
p_init_msg_lst        => apps.fnd_api.g_false,
--p_init_msg_lst        => 'F',
x_return_status       => v_api_return_status,
x_msg_count           => v_msg_count,
x_msg_data            => v_msg_data,
p_organization_id     => org_id, --v_organization_id,
p_inventory_item_id   => item_id, --v_inventory_item_id,
p_tree_mode           => apps.inv_quantity_tree_pub.g_transaction_mode,
--p_tree_mode           => 2,
p_onhand_source       => 3,
p_is_revision_control => FALSE,
p_is_lot_control      => FALSE,
p_is_serial_control   => FALSE,
p_revision            => NULL,
p_lot_number          => NULL,
p_subinventory_code   => subinv,
p_locator_id          => NULL,
x_qoh                 => v_qty_oh,
x_rqoh                => v_qty_res_oh,
x_qr                  => v_qty_res,
x_qs                  => v_qty_sug,
x_att                 => v_qty_att,
x_atr                 => v_qty_atr);
oqtt := v_qty_att;
oqtr := v_qty_atr;
END;
END XX_CHK_QTY;


As you could see we are using 2 numbers of OUT variables to store the output data, which will be referred in the forms at later stages.

Our sample form has a control block and 3 items

:ITEM_ID, :QTY_AVL_TRANSACT,:QTY_AVL_RESERVE and under the WVI(WHEN-VALIDATE-ITEM) scope for the block item :ITEM_ID  we wanted to populate total quantity available to transact and total quantity available to reserve into block items :QTY_AVL_TRANSACT,:QTY_AVL_RESERVE

Following is how we call the custom procedure through WVI trigger:

Declare
oqtt number := 0;
oqtr number := 0;
Begin
apps.XX_CHK_QTY.retrive_quantity(:CTRL.ITEM_ID,901,’ABC-01′,oqtt,oqtr);
:CTRL.QTY_AVL_TRANSACT := oqtt;
:CTRL.QTY_AVL_RESERVE := oqtr;
End;

and bingo! as the procedure was called from a database package, there were no compilation errors pointing towards referring remote variables or cursors and once executed all intended results were fetched to corresponding block items.

As we are also learning how to use Oracle APIs within custom forms/reports, we hope this guideline would be useful for those few who are trying to find a way to start calling Oracle’s standard API/packages from such environments.

for Windows7bugs

Admin


Installing Oracle Developer (forms & reports 6i) on Windows 7 64bit

March 1, 2010

Update (09.Feb.2012)

Just came across an issue while trying to install Developer 6i suite on Windows 7 64 bit (may apply to 32bi as well), came across following error “forms60.vrf(78):OS_ERROR while getting value Path”. Didn’t have a clue what was wrong as we were able to install Developer Suite 6i more than multiple times (for legacy application used across corporate)

Googling around brought us to this link and found the solution! It was related the path element length, by removing some “unwanted” entries from the path string, we were able to successfully install the Suite.

 

 

Oracle developer 6i (forms & reports) Installation tips.

Including me, many of you out there must be still using the developer 6i and getting this stuff work under Windows 7 64bit environment could be quite tricky.

Run the installer normally (without changing the compatibility mode) and finish the installation for both forms and reports. Go to this link and download the files suggested.

Now go to your developer installation folder, browse to BIN directory and make backups for these files

  1. NN60.DLL
  2. NNB60.DLL

Now copy the extracted files from the downloads you already have, to \BIN directory. This should deal with forms developer not responding to the “Run” button click or ‘Ctrl+R’ shortcut key.

Hope this post is useful Oracle developers.