🔹 Join the OracleApps88 Telegram Group - Stay up to date with the latest on Oracle EBS R12 and Oracle Cloud/Fusion Applications. 📌 Telegram Group : https://t.me/OracleApps88

💡 Facing issues copying code/scripts or viewing posts? We're here to help!
📬 Contact on Telegram : https://t.me/apps88
📱 Telegram/WhatsApp: +91 905 957 4321
📧 Email Support: OracleApp88@Yahoo.com
Showing posts with label FORMS PERS. Show all posts
Showing posts with label FORMS PERS. Show all posts

Thursday, December 29, 2016

Usage of Custom Library CUSTOM.pll in Oracle Personalizations

 Note 438920.1: How To Customize Standard Oracle Application Using Custom Library?

1. Note 417293.1: Can You Disable The New Quote Button On The Sales Order Form:
This note provides a sample code to disable the button from a form.

2. Note 393169.1: How To Refer :Block.field In The DFF Definition Of Mass Change (OEXOEMCG) Form
This note describes how to pass the current values from one field to the DFF segments. A sample example has been provided to replace a global variable instead of hard coded reference to a field within the DFF definition.

3. Note 434383.1: How To Tell if custom.pll is being called by WHEN_NEW_ITEM_INSTANCE Trigger on Sales Order Form
This note explains whether the triggers are picked up from custom library or native code and a simple way to find the names of trigger, item, block and form name, which are referenced in custom library.

4. Note 160151.1: How to Prevent Users From Accessing the Help > Diagnostics > Examine Functionality
This note describes how to restrict accessing the diagnostics and password for examine functionality from Help based on the user or responsibility.

5. Note 438787.1: What are the events passed using Custom library and when do they fire?
This note describes about the various events and their occurrences in the custom library.

6. Note 434383.1 How To Tell if custom.pll is being called by WHEN_NEW_ITEM_INSTANCE Trigger on Sales Order Form
Need to fire the Custom.pll program from the when_new_item_instance trigger from any field on sales order for.

7. Note 438787.1 Understanding Events Passed Using Custom Library 
This document explains about the events, different kinds of events and their firing time within the custom library.

8. Why are some generic events not being fired in some cases?
The form may have these triggers at block/field level, where the property- Execution Hierarchy for the trigger might be OVERRIDE. Due to this, the corresponding form level triggers to invoke CUSTOM.pll do not fire. The Override would prevent the form to call the Custom code. In this case please raise an SR with Oracle Support

9. What are the components are available in the custom library?
The CUSTOM package has two functions and one procedure:
Functions -
CUSTOM.ZOOM_AVAILABLE
CUSTOM.STYLE
Procedure -
CUSTOM.EVENT

CUSTOM.ZOOM_AVAILABLE allows you to specify if zooms exist for the current context. If zooms are available for this block, then return TRUE else return FALSE. This return a Boolean value
CUSTOM.STYLE allows determining the execution style for some product specific events. This would return a Integer
CUSTOM.EVENT allows you to execute the custom code at specific events

10. Does the custom library need any attached library?
Other libraries can be attached to CUSTOM library. However, it is not possible to attach the APPCORE library to CUSTOM because it would cause a recursion problem (CUSTOM is already attached to
APPCORE). In Release 11i, it is possible to attach the APPCORE2 library to CUSTOM library which is a duplicate of APPCORE. APPCORE2 has most of the APPCORE routines with the following packages:
  • APP_ITEM_PROPERTY2
  • APP_DATE2
  • APP_SPECIAL2
These packages contain the same routines as the corresponding APPCORE packages. The CUSTOM library comes with the FNDSQF library already attached. FNDSQF provides Oracle Applications routines for function security (for opening forms), flex fields, and other utility routines.
Hence the execution will be in the following manner
APPCORE-->CUSTOM-->APPCORE2 if there is a need to APPCORE2

11. What would be the precedence if both custom library and Forms Personalization have the same set of events?
Oracle Forms Libraries first invoke the Forms Personalization, and then call goes to the CUSTOM library for the same set of events. Forms personalization will override if the same set of events are passed as that of CUSTOM library.
The first call goes to Form personalization from Oracle Form libraries so the customization done using form personalization will be effective even if same set of events are available in custom library. So in this case custom library would not effective.

12. What is difference between Form personalization and custom library?
Form Personalization is an alternative way to do the same task as done in the custom library. Form Personalization has all the common used activities of CUSTOM library.
However form personalization has its own limitation, which does not allow achieving complex business logic's.
Limitations of Form Personalization:
Form Personalization allows you to respond to a Zoom event - it does not allow you to enable Zoom on a form. If you want to do that you must use CUSTOM library - custom.pll

13. How to isolate the problematic code which causes the error from custom library?
1. Switch off the customization by navigating to Help --> Diagnostics --> Custom --> Custom Off
2. Reproduce the issue.

       If the issue still exists the issue is due to Oracle native code.

       If the issue does not exists then the issue is due to custom code.
           Debugging the custom code:
           Find the name of the form from which the issue happens.
           Open the custom.pll
           Find the code, which contains the problematic form name.
           Redefine the code and then retest the issue.

14. Can we use the custom library for custom forms?
Yes, CUSTOM library can be used with custom forms as long as the custom forms are developed as per standards of Oracle Application Developer Guide using TEMPLATE.fmb

15. Can we use all form objects in custom library? 
It is not possible to use all the form objects in standard Oracle Application. Since some built-in form objects are incompatible to oracle Applications routines. These Oracle Forms built ins have equivalent APPCORE routines that provide additional functionality.

For example:
Set_ITEM_PROPERTY is replaced with APP_ITEM_PROPERTY.SET_PROPERTY These APPCORE routines set the properties in the Oracle Applications standard way and change the propagation behavior. Some properties use the native Oracle Forms SET_ITEM_PROPERTY.

16. How to switch off the custom code at the run time?
APP_STANDARD package in APPCORE calls the custom library. APP_STANDARD is effectively called from all the Oracle Apps Form Triggers. In appcore.pll a reference to global variable APP_CUSTOM_MODE is made. If global variable APP_CUSTOM_MODE is set to OFF, then CUSTOM.pll does not get called.

This is similar to switching off the custom code using Help --> Diagnostics --> Custom --> Custom Off
Note: Switching off customization means that Codes written in custom library and for personalization are switched off. This does not switch off Custom triggers or Custom code written on the standard forms.
A sample code for switch off customization for specific user_name
IF event_name = 'WHEN-NEW-FORM-INSTANCE' THEN
 IF fnd_profile.value('USER_ID') =1318 THEN
  copy ( 'OFF' , 'GLOBAL.APP_CUSTOM_MODE' ) ;
 ELSE
  copy ( 'NORMAL' , 'GLOBAL.APP_CUSTOM_MODE' ) ;
 END IF ;
END IF ;


17. Note 744065.1 Sample CUSTOM Library Code To Customize Applications 
This note provides examples of using CUSTOM Library to enhance the functioning of Oracle Application forms so that customers can meet their business needs and to understand the usage of custom library, please DONOT try to attempt simulation since this may affect standard functionality.

18. Note 1234454.1 'Descriptive Flex' In 'Copy Lines' Is Automatically Selected
This note provides an example of how to implement custom code to default this checkbox as UNCHECKED for Descriptive Flex field.

19. Note 749405.1 How To Commit Changes Made Using Event When-Validate-Record In CUSTOM Library 
How does one commit the changes performed in When-Validate-Record Event from the Custom Library?

Wednesday, October 15, 2014

Sales Order Booking, Picking and Shipping Made Easy – Using Oracle Forms Personalization


Overview
The purpose of this document is to to sophisticate the work of the end-user and to give him a pleasure of using Oracle Applications.
Requirement
Training the End-Users is always a challenging task. They normally find a hard time to understand and remember the navigation. This is an idea regarding effective usage of User Interface messages to ease their work with Oracle Applications.
Solution Approach and Flow chart of the Process Flow
Using Forms Personalization in Oracle Applications.
Pre-requisites
  1. Have access to or have installed licensed version of Oracle Applications R12
  2. Having access to Forms personalization window.
Assumptions
The section lists the complete set of assumptions that need to be considered along with the other constituents of this solution.
  1. The is a instance of Oracle Applications version R12
  2. Single user is responsible for Entering/Booking/Picking and Shipping the order
  3. Sales Order consists of single line
  4. User only performing Entering,Booking,Picking and Shipping the order
Activities
The way it works after Forms Personalization
Screen: 1 (Header Information)
Screen: 2 (Line Information)
Screen: 3 (Zooming from Sales Order Form to Shipping Transaction Form)
User Interface Guidance Message
Screen: 4 (In this Shipping Transaction Form Source System and Sales Order Number will be automatically assigned)
Screen: 5 (User Interface Guidance Message
Screen: 6 (In Actions "Launch Pick Release" will be automatically assigned and the control will be at "Go" button)
Screen: 7 (User Interface Guidance Message)
Screen: 8 (After the completion of "Launch Pick Release" Concurrent coming back to SO form and Zoom t o Shipping Transaction Form)
Screen: 9 (The Control will automatically go to Delivery and Delivery Number will be automatically assigned)
Screen: 10 (User Interface Guidance Message)
Screen: 11 The Control will directly come to the Delivery Tab
STEPS
Sales Order Form:
Condition: 1: When-New-Form-Instance
Action: 1
Creating Menu "Picking and Shipping Made Easy"
Action: 2
Declaring Global Variable for passing the Sales Order Number from SO form to Shipping Transaction Form
Condition: 2
When-Validate-Record (Line)
Action: 1
Assigning Value to Global Variable
Condition: 3
When-New-Block-Instance (Order)
Action: 1
Condition: 4
Zooming from SO form to Shipping Transaction Form
Action: 1
Launching Shipping Transaction Form
Shipping Transaction Form:
Condition: 1
Checking whether we have the passed the Global Variable from Sales Order form to Shipping Transaction Form correctly or not. Also we are checking "Order Number" field is blank or not.
Action: 1
Assigning the Source System = "Order Management"
Action: 2
Assigning the Global Variable to the Order Number field.
Action: 3
Committing the form
Condition: 2
Checking the Line Status. If it is "Ready to Release" then we should perform "Launch Pick Release"
Action: 1
Assigning the values for Actions from LOV.It should be "Launch Pick Release"
Action: 2
Placing the Control at the "GO" button
Action: 3
User Interface Message
Condition: 3
Action: 1
Checking for the existence of "Message" window.
(FYI: Forms Personalization will be executed first before the core code does)
Condition: 4
Checking the Line Status. If it is "Staged/Pick Confirmed" then we should do "Ship Confirm"
Action: 1
Automating the control to Delivery Tab
Action: 2
Automating the Control to the Delivery Tab
Action: 3
Assigning the Delivery Number to the Delivery Number field. (We got this Number from the Lines Tab)
Action: 4
Committing the form
Condition: 5
Checking whether the Delivery Status is "Open" or not.
Action: 1
User Interface Message after Shipping is done.
Action: 2
Assigning Null Value to Global Variable
Solution Salient Features
The following are the salient features
  1. User Friendly
  2. No invasive customization of any standard Oracle components.
  3. Simple approach with the tangible end deliverables clearly identified for each stage.
Concluding Notes
  1. The contents of this document the first cut of a solution approach and design for a prototype.
  2. The Same Methedology can be used for the Sales Order with Multiple Lines with some enhancements
  3. The Same Idea of using Guidance UI messages can be implemented to all the complex navigation in Oracle Applications

Thursday, November 3, 2011

Form Personalization CUSTOM.PLL Examples

1.Give an welcome message when opening the standard Customer form.    if (event_name = 'WHEN-NEW-FORM-INSTANCE' and  form_name = 'AA_CUSTOMER_ADDRESS') then
         if (block_name = 'HZ_PARTIES') then
          FND_MESSAGE.SET_STRING('WELCOME');
          FND_MESSAGE.SHOW;  
          end if;
 
2. Display the alert when user create the new customer with existing name and should not be allowed to save.ElsIf (event_name = 'WHEN-NEW-ITEM-INSTANCE') then
          if (form_name = 'AA_CUSTOMER_CREATION_TEMP' and block_name ='HZ_PARTIES')then
                if(name_in('system.record_status')='INSERT') then                 
                begin
                    l_party_name :=name_in('HZ_PARTIES.PARTY_NAME');
                  if l_party_name is not null then
                     select party_name into name1 from hz_parties where party_name like l_party_name ;
                   IF name1 IS NOT NULL THEN
                      alert_button := Show_Alert('CUSTOMER_NAME');           
                         IF alert_button = ALERT_BUTTON1 THEN
                             go_item('HZ_PARTIES.PARTY_NAME')        ;
                            end if;
                      end if;
                   end if;       
              end;
         end if;
        end if; 

3. Enable zoom button for sales order form when user is in Main Tab.(In zoom_available procedure of custom.pll) begin 
  if (form_name = 'OEXOEORD' and block_name = 'ORDER') then
      return TRUE;
      else
      return FALSE;
      end if;
end zoom_available;
 
4. When user selects the customer field and click on the zoom button it should open the customer details block.
(we should define parameter as CUSTOMER_NAME  in the the form  same as the name given here in the code )
Elsif(event_name = 'ZOOM') then
          if ((form_name = 'OEXOEORD' and block_name = 'ORDER')) then             
              param_to_pass1 := name_in('ORDER.SOLD_TO');
               fnd_function.execute
                (FUNCTION_NAME=>'CUSTOMER_INFORMATION_FUNC',
                  OPEN_FLAG=>'Y',
                  SESSION_FLAG=>'Y',
                  OTHER_PARAMS=>'CUSTOMER_NAME="'||param_to_pass1||'"'
                 );
  end if;

5.Change the Lov of the Customer field of Sales order form to display the customers who are having the bill to and ship to address.Elsif (event_name = 'WHEN-NEW-FORM-INSTANCE' and form_name = 'AA_CUSTOMER_CREATION_TEMP')then
           r:=find_group('cust_name');
                     if not id_null(r) then
                                delete_group('cust_name');
                    end if;
                   message('lov1');
       r:=create_group_from_query(grp_name,'select party_name  from hz_parties where party_id>50000');
     errcode  := POPULATE_GROUP_WITH_QUERY( r,'select party_name  from hz_parties where party_id>50000');
      if(errcode<>0)
         then message('error');
         end if;
            message('lov4');
         set_lov_property('CUSTOMER_NAME',group_name,r);
             message('lov5');
    end if;
   end if;
  end event;

Thursday, October 27, 2011

Symantec SHS Additional Data Elements Form

  1. Symantec SHS Additional Data Elements Form : Form Personalization For License Form
Responsibility: Sym US OM Super User
Navigate: Licenses,Orders,Returns-> Licenses -> Help -> Diagnostics -> Custom Code -> Personalize
Oracle Password Window will appear. Type the Oracle Password provided.
STEP-1:
Type the following in seq and description fields.
Seq 10
Description Create Menu Item
Go to ‘Condition’ tab
Trigger Event WHEN-NEW-FORM-INSTANCE
Condition
Go to ‘Actions’ tab. Type the following,
Seq 10
Type Special
Description
Language All

In right side, type the following.
Menu Entry SPECIAL 13
Menu Label SHS Additional Data Elements Form
Click On ‘Apply Now’ Button And Save it.
STEP-2:
Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq 20
Description Check For NULL
Go to ‘Condition’ tab
Trigger Event SPECIAL13
Condition :SYMOM_LICENSE_LINES_VW.ORDER_NUMBER IS NULL
Go to ‘Actions’ tab. Type the following,
Seq 10
Type Message
Description
Language All
In right side, type the following.
Message Type Show
Menu Label SHS Additional Data Elements Form
Message Text Order Number Cannot be NULL. Please query a value.
Click On ‘Apply Now’ Button And Save it.
STEP-3:

Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq 30
Description Global Variables Initalization

Go to ‘Condition’ tab
Trigger Event SPECIAL13
Condition :SYMOM_LICENSE_LINES_VW.ORDER_NUMBER IS NOT NULL

Go to ‘Actions’ tab. Type the following,
Seq 10
Type Property
Description
Language All
In right side, type the following.
Object Type Global Variable
Target Object v_order_number
Property Name INITIAL VALUE
Value NULL

Click On ‘Apply Now’ Button and Save it.
Click On ‘Seq’ Left Side and type the following.
Seq 11
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_order_header_id
Property Name INITIAL VALUE
Value NULL

Click On ‘Apply Now’ Button and Save it.

Click On ‘Seq’ Left Side and type the following.
Seq 12
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_form_name
Property Name INITIAL VALUE
Value NULL

Click On ‘Apply Now’ Button and Save it.
STEP-4:
Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq 40
Description Open Additional Data Elements Form


Go to ‘Condition’ tab
Trigger Event SPECIAL13
Condition :SYMOM_LICENSE_LINES_VW.ORDER_NUMBER IS NOT NULL
Click On ‘Seq’ Left Side and type the following.
Seq 10
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_order_number
Property Name VALUE
Value =to_number(:SYMOM_LICENSE_LINES_VW.ORDER_NUMBER)

Click On ‘Apply Now’ Button and Save it.
Click On ‘Seq’ Left Side and type the following.
Seq 11
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_order_header_id
Property Name VALUE
Value =to_number(:SYMOM_LICENSE_LINES_VW.HEADER_ID)

Click On ‘Apply Now’ Button and Save it.


Click On ‘Seq’ Left Side and type the following.
Seq 12
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_form_name
Property Name VALUE
Value LICENSE_ORDER_FORM

Click On ‘Apply Now’ Button and Save it.

Click On ‘Seq’ Left Side and type the following.
Seq 30
Type Builtin
Description
Language All

In right side, type the following.
Builtin Type FND_FUNCTION.EXECUTE
Function Name SYMOM_SYMOMADDLDTL

Click on Save.




  1. Symantec SHS Additional Data Elements Form : Form Personalization For Service Contracts Form
Responsibility: SYM US Service Contracts Manager
Navigate: Launch Contracts-> Double click on any contract number(If Recent documents are not empty)
If Recent documents are empty then go to find->type any contract number and click on ‘Search’ button.
‘Service Contracts’ Form will be opened. Then go to Help -> Diagnostics -> Custom Code -> Personalize
Oracle Password Window will appear. Type the Oracle Password provided.

STEP-1:

Type the following in seq and description fields.
Seq 10
Description Create Menu Item

Go to ‘Condition’ tab
Trigger Event WHEN-NEW-FORM-INSTANCE
Condition

Go to ‘Actions’ tab. Type the following,
Seq 10
Type Special
Description
Language All

In right side, type the following.
Menu Entry SPECIAL 14
Menu Label SHS Additional Data Elements Form


Click On ‘Apply Now’ Button And Save it.

STEP-2:
Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq 20
Description Check For NULL

Go to ‘Condition’ tab
Trigger Event SPECIAL14
Condition : OKS_LINES.CHR_ID IS NULL AND :OKS_LINES.ID IS NULL


Go to ‘Actions’ tab. Type the following,
Seq 10
Type Message
Description
Language All
In right side, type the following.
Message Type Show
Message Text Please Select a Contract Line.


Click On ‘Apply Now’ Button And Save it.
STEP-3:

Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq Description
30 Global Variables Initialization

Go to ‘Condition’ tab
Trigger Event SPECIAL14
Condition : OKS_LINES.CHR_ID IS NOT NULL AND :OKS_LINES.ID IS NOT NULL

Go to ‘Actions’ tab. Type the following,
Seq 10
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_contract_chr_id
Property Name INITIAL VALUE
Value NULL

Click On ‘Apply Now’ Button and Save it.
Click On ‘Seq’ Left Side and type the following.
Seq 11
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_contract_cle_id
Property Name INITIAL VALUE
Value NULL

Click On ‘Apply Now’ Button and Save it.

Click On ‘Seq’ Left Side and type the following.
Seq 12
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_form_name
Property Name INITIAL VALUE
Value NULL

Click On ‘Apply Now’ Button and Save it.

STEP-4:

Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq Description
40 Check if not in table

Go to ‘Condition’ tab
Trigger Event SPECIAL14
Condition : OKS_LINES.CHR_ID IS NOT NULL AND :OKS_LINES.ID IS NOT NULL AND 1 NOT IN( (SELECT 1 FROM symom_shs_add_data_element where contract_cle_id = to_number(:OKS_LINES.ID)))

Go to ‘Actions’ tab. Type the following,
Seq 10
Type Property
Description
Language All

In right side, type the following.
Message Type Show
Message Text Additional Data Elements Form Cannot Open As No data available For This Line.

Click on ‘Apply Now’ and save it.

STEP-5:
Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq 50
Description Open Additional Data Elements Form

Go to ‘Condition’ tab
Trigger Event SPECIAL14
Condition :OKS_LINES.CHR_ID IS NOT NULL AND :OKS_LINES.ID IS NOT NULL AND 1 IN( (SELECT 1 FROM symom_shs_add_data_element where contract_cle_id = to_number(:OKS_LINES.ID)))

Go to ‘Actions’ tab. Type the following,
Seq 10
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_contract_chr_id
Property Name VALUE
Value =to_number(:OKS_LINES.CHR_ID)

Click On ‘Apply Now’ Button and Save it.
Click On ‘Seq’ Left Side and type the following.
Seq 11
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_contract_cle_id
Property Name VALUE
Value =to_number(:OKS_LINES.ID)

Click On ‘Apply Now’ Button and Save it.

Click On ‘Seq’ Left Side and type the following.
Seq 12
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_form_name
Property Name VALUE
Value SERVICE_CONTRACT_FORM

Click On ‘Apply Now’ Button and Save it.

Click On ‘Seq’ Left Side and type the following.
Seq 30
Type Builtin
Description
Language All

In right side, type the following.
Builtin Type FND_FUNCTION.EXECUTE
Function Name SYMOM_SYMOMADDLDTL

Click on Save.

  1. Symantec SHS Service Contract Form Personalization on Termination (Warning message)
Responsibility: SYM US SaaS Contracts Business Administrator
Navigate: Launch Contracts
Oracle Contracts Form will be opened.
Now Click on ‘Torch’ icon.
‘Search Templates And Contracts Form’ will be opened. Enter any Contract
Number in the ‘Contract Number’ Field like the following screenshot.


Click On ‘Search’ Button.

Right Click on Displayed Contract number.

Select ‘Terminate’ from the list.

‘Terminate Contracts’ Form will be opened.

Now navigate to Help > Diagnostics > Custom Code > Personalize

Oracle Password Window will appear. Type the Oracle Password provided.

Type the following in seq and description fields.
Seq 10
Description Check availability in table

Go to ‘Condition’ tab
Trigger Event WHEN-NEW-BLOCK-INSTANCE
Condition
:OKSTERMN_TS.CONTRACT_ID is not null
and :OKSTERMN_TS.TERM_DATE is not null
AND 1 IN( (SELECT 1 FROM symom_shs_add_data_element where contract_chr_id = to_number(:OKSTERMN_TS.CONTRACT_ID)))

Go to ‘Actions’ tab. Type the following,
Seq 10
Type Message
Description
Language All

In right side, type the following.
Message Type Warn
Message Text Warning : Contract is being Terminated without serving entire Notice Period


Save it.
If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect