How to compile Custom.pll in R12.1.3


How to compile Custom.pll in R12.1.3


Custom Library (custom.pll) allows to extend/customize Oracle Applications form(Oracle Form) without changing or modifying Oracle Applications code. Examples may include enforcing a new business rule, opening a form using zoom etc. Most of the things that we can do using custom.pll, we can achieve that using Forms Personalization. Since Custom.pll takes the full advantage of PL/SQL so it is having an edge over Forms Personalization for complex customizations.
CUSTOM.pll is used to add extensions to Oracle’s form Functionality.

Some of the common scenarios where CUSTOM.pll can be used are:-
1. Enabling/Disabling the fields
2. Changing the List of Values in a LOV field at runtime,but we cannot add  the new column in standard LOV
3. Defaulting values
4. Enabling Special Menu


Where is this located?
Custom.pll is located in $AU_TOP/resource Directory.

How to add code to this?
Open this pll using the Form builder and make changes to the program units.

How to compile this PLL?
Once you make changes you need to compile the pll. Use the F60gen to compile it at 11i version
f60gen module=custom.pll userid=APPS/ output_file=$AU_TOP/resource/custom.plx module_type=library batch=no compile_all=special

How to make the changes get affected?
Once you make all the necessary changes, compile the pll and generate the PLX file. Since the CUSTOM library is loaded once for a given session, a user must log out of the application and sign-on again before any changes will become apparent.

Forms Personalization: an alternative of custom.pll
In older versions, prior to 11i, Custom.PLL was most prominently used for adding additional features in the seeded form but the latest version of Oracle EBS comes with the feature called as Forms Personalization which allows even an end user to alter the seeded forms functionality using an user interface called the Personalization form.

Advantages of Forms Personalization over Custom.PLL:
  • Forms personalization can be used by an user with limited PL/SQL knowledge. 
  • Changes take place immediately on reopening the form.
  • Anything which can be done using Custom.PLL can be done using Forms Personalization also.
  • Personalizations are stored in base tables related to Form Personalization.
  • CUSTOM.pll is a single file/entity, hence only one developer can make changes to CUSTOM.pll at any given point in time. This is not a restriction in Forms personalization.
  • Easy to disable/enable with click of a button.
  • Can be moved easily through FNDLOAD from one instance to other.
  • Can be restricted at site/responsibility/user level.
  • Personalization stores who columns with which we have the ability to track who created/modified it where as in CUSTOM.PLL we don’t have that ability.

R12 the compilation command is given below


frmcmp_batch module=CUSTOM.pll userid=apps/apps output_file=CUSTOM.plx module_type=LIBRARY batch=yes compile_all=special



frmcmp_batch module=$AU_TOP/forms/US/XX_DRI_INC.fmb userid=apps/devapps output_file=$XXJERI_TOP/forms/US/XX_DRI_INC.fmx compile_all=special batch=yes

How to change the title of  standard LOV in Form.

Generally In forms, LOV is using for displaying the values, so that it is easily for user to choice and select the value.

rg_id RECORDGROUP;
 rg_name VARCHAR2(100) := 'XXRO_SERIAL_NUM';
 v_sql_string VARCHAR2(32000);
 errcode NUMBER;
 l_error_message VARCHAR2(200);
 the_rowcount NUMBER;
 v_lov      lov;
 v_rec_pos number;
 form_name  varchar2(30) := name_in('system.current_form');
 item_name  varchar2(30) := name_in('system.current_item');
 block_name varchar2(30) := name_in('system.current_block');

IF (event_name = 'WHEN-NEW-ITEM-INSTANCE') THEN
   v_rec_pos := 2;
    IF (form_name    = 'XXCUSTOM') THEN
    v_rec_pos := 3;
    IF (block_name = 'FIND_BASIC')THEN      
 BEGIN
  rg_id := Find_Group( rg_name);
 IF Id_Null(rg_id) THEN
                 rg_id := Create_Group_From_Query
                 (rg_name,
                 'select serial_number,inventory_item_id ,item,"description" '
                  ||' from (select distinct decode(a.customer_product_id,'||''' '''||',a.serial_number,'
    ||' cp.serial_number) serial_number, a.inventory_item_id, '
    ||' b.concatenated_segments item, cp.external_reference "description" '
    ||' from csd_repairs a, mtl_system_items_kfv b,csi_item_instances cp '
    ||' where a.inventory_item_id = b.inventory_item_id '
    ||' and b.organization_id = cs_std.get_item_valdn_orgzn_id '
    ||' and a.CUSTOMER_PRODUCT_ID = cp.INSTANCE_ID(+))'
    ||' where serial_number is not null '
    ||' order by 1');
             
   END IF;

errcode := Populate_Group(rg_id);

v_lov    := find_lov('RO_SERIAL_NUM');

 

  set_lov_column_property(v_lov, 4, TITLE, 'Chassis Number');  

IF get_lov_property(v_lov,group_name) = 'RO_SERIAL_NUM' THEN

     set_lov_property(v_lov,group_name,rg_name);

 END IF;

 END IF;

 END IF;

 END IF;

END;

How To Customize Standard Oracle Application Using Custom Library – custom.pll
There are numerous scenarios for each customer to customize the standard Application. The following sample code demonstrate how to pop up an error message when customer business validation fails.
This note provides a detail steps for customizing the standard application using custom library.
The code attached here will validate number of digits entered in Customer PO Number field from the sales order form. If the number of digits exceeds 3 digits an error message needs to be populated.
  1. Take a back up of custom.pll and custom.plx from $AU_TOP/resource
  2. Have custom.pll, appcore.pll and appcore2.pll copied over to your local folder. The best method is to just copy the entire contents of $AU_TOP/resource
  3. Open CUSTOM.pll in Oracle Forms Developer
  4. Attach appcore2.pll to the custom library
  5. Modify the text of the CUSTOM package body in the appropriate section as below
  6. Save your changes and use the Oracle Forms Compiler program to generate a custom.plx file for the CUSTOM library
  7. Exit from Oracle Forms Developer.
  8. Verify that your file generated successfully. If path name is left blank the file will be generated in c:\orawin\bin (or platform equivalent). Move it to AU_TOP/resource.
  9. Retry it out from the Oracle Applications Navigator.
Sample
Modify the code CUSTOM package body as follows in the appropriate sections
procedure event(event_name varchar2) is
form_name varchar2(30) := name_in(‘system.current_form’);
block_name varchar2(30) := name_in(‘system.cursor_block’);
item_name varchar2(30) := name_in(‘system.cursor_item’); 
Begin
if (form_name = ‘OEXOEORD’and block_name = ‘ORDER’) then
   if LENGTH(name_in(‘ORDER.CUST_PO_NUMBER’)) > 3 then
     fnd_message.set_name(‘FND’,’Cust PO Number should be less than 4 digits’);
     fnd_message.Error;
     RAISE FORM_TRIGGER_FAILURE;
   End if;
End if;
End Event;
Output
If the customer PO Number in sales order form has less than 4 digits the form will not populate any error message. If the customer po number field has more than for 3 digits the error message will be populated.
Retry it from following steps:
1. Open the Application Navigator 
2. Navigate to Order Management Responsibility 
3. Open the Sales Order Form 
4. Enter the values in Custom PO Number field with 4 digits
5. While navigating to next field the following error message pops up   
Cust PO Number should be less than 4 digits

ORA-01882

Reports Error ORA-01882: Timezone Region Not Found (Doc ID 390954.1)

SYMPTOMS

In some of the reports, the following error is displayed:

An error has occurred!
Error rendering element. Exception: ORA-01882: timezone region not found
ORA-06512: at "SYSMAN.MGMT_GLOBAL", line 7
ORA-06512: at "SYSMAN.MGMT_VIEW_UTIL", line 189

+ emoms.log files contain below errors :

2006-08-15 18:17:49,484 [DeliveryThread-SNMP3] ERROR jdk.NLSUtil getFormattedDateWithTZ.407 -
Invalid region name format: GMT+08:00
2006-08-15 18:17:49,500 [DeliveryThread-SNMP3] ERROR jdk.NLSUtil getFormattedDateWithTZ.407 -
Invalid region name format: GMT+08:00
2006-08-15 18:17:49,531 [DeliveryThread-SNMP3] ERROR jdk.NLSUtil getFormattedDateWithTZ.407 -
Invalid region name format: GMT+08:00


CAUSE

Time zone issue on the target box.

Created Report specifying the Target time zone which worked.


SOLUTION

Please follow the below Steps :

Select that Report for which errors are being encountered -> Click on Create Like
On the General Tab -> Under Time Period
Click on Set Time Period
Select the Agent (target) Time zone
Click Preview or OK
then access the newly created Report.

ORA-00959: tablespace 'TABSPACE1' does not exist

I specifically exported a large partitioned table. The tablespace it was in is TABSPACE1, which also contains many more large tables

When I import into another instance, which does not have the tablespace TABSPACE1, I get the error message

IMP-00003: ORACLE error 959 encountered
ORA-00959: tablespace 'TABSPACE1' does not exist
Import terminated successfully with warnings.

This is fair enough, but is there a way of forcing the import into another tablespace ??

Solution:-

If you specify ignore=y in your import the table will get created in the schema's default tablespace.
 Just make sure that the default tablespace is the one that you want to use.
Otherwise create the table the way you want in the proper tablespace then import with ignore=y.

ORA-01917

Error 'ORA-01917: user or role 'PSQA' does not exist' when importing Controller Oracle database.
ErrorI am trying to import schema into Oracle database-12c, using a command similar to the following:
imp system/password@databasename file=exp_SOURCEUSERNAME.dmp log=DESTINATION_USERNAME-imp.log
fromuser=SOURCEUSERNAME touser=DESTINATION_USERNAME
Receives below error message.
1.       IMP-00017: following statement failed with ORACLE error 1917:
 "GRANT SELECT ON "ABC_APL_PROFILE_MST" TO "PSQA""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'PSQA' does not exist.

Cause
The environment from where the original backup (export / .DMP) file was created is using the (optional) Oracle feature which creates additional grants on objects in the Controller schema.

Solution
Delete the schema, then re-create a blank schema. Finally, import the user (into the new schema) but this time use the optional switch:
grants=no.


Modify your import script, to something similar to:
imp system/password@databasename file=exp_SOURCEUSERNAME.dmp log=DESTINATION_USERNAME-imp.log fromuser=SOURCEUSERNAME touser=DESTINATION_USERNAME grants=no

Issue resolved.



ORA-04031: unable to allocate 4096 bytes of shared memory

When i am going to import schema facing below issue on 12c Database.

ERROR:-

EXP-00008: ORACLE error 4031 encountered
ORA-04031: unable to allocate 4096 bytes of shared memory ("java pool","oracle/i18n/util/LocaleMapper","JOXLE^aff8222c",":SGAClass")
EXP-00000: Export terminated unsuccessfully.

Solution:-

SQL> ALTER SYSTEM SET SGA_MAX_SIZE=512M SCOPE=SPFILE;

System altered.

SQL> ALTER SYSTEM SET SGA_TARGET=512M SCOPE=SPFILE;

System altered.

SQL> ALTER SYSTEM SET SHARED_POOL_SIZE='512M' scope=spfile;

System altered.

SQL> create pfile from spfile;

File created.

SQL> shutdown immediate;

SQL> startup;

Retest issue.


APP-FND-00222

APP-FND-00222 When Attempting To Run Any Request (Doc ID 412987.1)

APPLIES TO:

Oracle Application Object Library - Version 11.5.10.2 to 11.5.10.2 [Release 11.5]
Information in this document applies to any platform.

SYMPTOMS

On 11.5.10.2 in Production:
When attempting to run any request,
the following error occurs:

APP-FND-00222: Encountered an error while getting the ORACLE user account for your concurrent request

The issue can be reproduced at will with the following steps:
1. Submit any request
2. Face the above error

The issue has the following business impact:
Due to this issue, users cannot submit any request.

CHANGES

Recent applying of ATG RUP3 and associated patches

CAUSE

Although there is no customization done but there is some issue in the CUSTOM.pll
This is verified as follows:

1. Log into Apps and Turn OFF "Custom Code" in the Help->Diagnostics menu.
2. After turning off the custom code, it was possible to launch new requests and the
    requests went through successfully.

SOLUTION

1. Confirm that there is no CUSTOM.plx exists in $AU_TOP/resource.  If any exists then delete it.
2. Take a backup of the current  CUSTOM.pll which exists in $AU_TOP/resource.
3. Replace the current  CUSTOM.pll with a one from a working instance.
4. Regenerate the CUSTOM.pll and retest the issue.

Unable to find an Output Post Processor service to post-process request

ORACLE EBSR12.2.4


SYMPTOMS

You are attempting to run the Subledger Period Close Exception Report (XLAPEXRPT) and the report shows xml data only.
It is not properly formatted.

Associated logfile shows the following:


---------------------- 1) PUBLISH ----------------
Unable to find an output post processor service to post-process request 45999573

Check that the output post processor service is running

This can happen with other reports besides the one listed above.

CAUSE

The OPP processor did not close down properly and needed to be restarted.

SOLUTION

Bounce OPP processor.

Terminate then restart the OPP Output Post Processor.  The following steps were taken from Note 352370.1:

Responsibility: System Administrator
Navigation: Concurrent > Manager > Administer
Query for Name = Output Post Processor
Click button Restart
Click button Refresh, the "Actual" and "Target" values should show "1"


or 

Output Post Processor is Down with Actual Process is 0 And Target Process is 1


Go to System Admin>From OAM Dashboard >>CM status> Output Post Processor> select Abort option and clock on GO.
After Abort again select start.

check Output Post Processor actual value & Target Value.

Actual Process is 1 And Target Process is 1.

Issue resolved.

or 

- FNDSVC should exist under FND_TOP/bin
- Bring down all application services and relink the FNDSVC through adadmin or using the below command:

adrelink.sh force=y ranlib=y "FND FNDSVC"

- Restart all applications services and retest the issue.

or 

Output Post Processor is Down with Actual Process is 0 And Target Process is 1 

1. Shutdown Concurrent Managers

2. To ensure concurrent manager down; check there is no FNDLIBR process running.

ps -ef | grep FNDLIBR

3. Run adadmin to relink FNDSVC executable.

a. Invoke adadmin from command prompt
b. Choose option 2 (2. Maintain Applications Files menu)
c. Choose option 1 (1. Relink Applications programs )
d. Then type FND When prompted; ( Enter list of products to link (all for all products) [all] : FND
 )1
e. Ensure adrelink is exiting with status 0

4. Start Concurrent Managers


5. Check the Output Post Processor




ERROR 1396 (HY000): Operation ALTER USER failed for 'Mysql'@'%'

 This MySQL error — ERROR 1396 (HY000): Operation ALTER USER failed for 'Mysql'@'%' — means that MySQL cannot find the user ...