🔹 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. Show all posts
Showing posts with label FORMS. Show all posts

Thursday, August 17, 2017

Creating Menu Item Shortcut for report using Form Personalization


Oracle EBS Menu Item Configurations Steps
The below steps show how to add an additional Menu in forms toolbar using Oracle Form Personalization Feature, in this example a menu will be created in Inventory Move Order Form to create a shortcut for running “Move Order Pick Slip Report”
  1. Navigate to Inventory Module – Move Orders Form
Inventory à Move Orders à Move Orders
  1. Open Form Personalization Form From help
Help Menu à Diagnostics àCustom Code à Personalize.
  1. Enter the sequence number as 70 and description “Menu Move Order Pick Slip Report”
  2. Select the Trigger Event as “WHEN-NEW-FORM-INSTANCE” and save the changes
  1. On Actions tab, enter or select the following values
    • Sequence = 10
    • Type = Menu
    • Description = Move Order Pick Slip Report
    • Language = All
    • Enabled = Yes
  1. On the right side of Actions tab, enter or select the following values
    • Menu Entry = SPECIAL45
    • Menu Label = Move Order Pick Slip Report
    • Render line before menu = Yes
  1. Click on the “Validate” button, then click on “Apply Now” button
  1. Close both the forms and reopen the Move Order form
    Result: New Menu Actions will be created having one menu item “Move Order Pick Slip Report” as shown below.
  1. Open the personalization form and it should automatically query the existing rule to activate the special menu
  2. Enter the sequence number as 80 and description “Invoke Receipt DT Custom Form on Special Menu”
  3. Select the Trigger Event as “SPECIAL45” and save the changes
  1. On Actions tab, enter or select the following values
    • Sequence = 10
    • Type = Builtin
    • Description = Move Order Pick Slip Report
    • Language = All
    • Enabled = Yes
  1. On the right side of Actions tab, enter or select the following values
    • Builtin Type = Execute a Procedure
    • Argument =
='BEGIN APPS.XXAA_MV_PS_C ('||${item.tomai_main_header_blk.organization_id.value}||','||${item.tomai_main_header_blk.request_number.value}||');  END'
  1. On Actions tab, enter or select the following values
    • Sequence = 11
    • Type = Message
    • Language = All
    • Enabled = Yes
  1. On the right side of Actions tab, enter or select the following values
• Message Type = Show
• Message Text = “Request has been Submitted”
  1. Validate, Apply and Save the changes
  2. Close both the forms and reopen the Receipts form
    Result: When clicked on the Actions > Move Order Pick Slip Report, it should submit the concurrent program for the report
Procedure Source for Calling Concurrent Program
CREATE OR REPLACE PROCEDURE APPS.XXAA_MV_PS_C (P_ORG_ID     NUMBER,
                                            P_MV_L       NUMBER )
IS
   v_request_id   NUMBER;
     v_request_layout   BOOLEAN;
BEGIN
   BEGIN
      fnd_global.
       apps_initialize (FND_GLOBAL.USER_ID,
                        FND_GLOBAL.RESP_ID,
                        FND_GLOBAL.RESP_APPL_ID);
      mo_global.init ('INV');
      COMMIT;
   END;  
    v_request_layout:= fnd_request.add_layout (template_appl_name      => 'INV',
                              template_code           => 'INVTOPKL_XML',
                              template_language       => 'en',
                              template_territory      => 'US',
                              output_format           => 'PDF'
                             );
commit;
   v_request_id :=
      FND_REQUEST.SUBMIT_REQUEST (application   => 'INV',
                                  program       => 'INVTOPKL_XML',
                                  description   => 'Move Order Pick Slip',
                                  start_time    => SYSDATE,
                                  sub_request   => NULL,
                                  argument1     => P_ORG_ID,
                                  argument2     => P_MV_L,
                                  argument3     => P_MV_L,
                                  argument4     => null,
                                  argument5     => null,
                                  argument6     => null,
                                  argument7     => null,
                                  argument8     => null,
                                  argument9     => null,
                                  argument10    => null,
                                  argument11    => null,
                                  argument12    => null,
                                  argument13    => null,
                                  argument14    => null,
                                  argument15    => null,
                                  argument16    => null,
                                  argument17    => null,
                                  argument18    => null,
                                  argument19    => 'N',
                                  argument20    => null,
                                  argument21    => null,
                                  argument22    => 'N');
   COMMIT;
END XXAA_MV_PS_C;

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?

Sunday, May 29, 2016

READ ONLY RESPONSIBILITIES in ORACLE


  1. Go to $Au_TOP/resource. 
  1. Copy   CUSTOM.pll and open the file in Form builder
 If you will open the package body of CUSTOM.pll in the forms builder then you will find the like below :
  1. ==========
    procedure event(event name varchar2) is
    --
    -- This procedure allows you to execute your code at specific events
    -- including:
    --
    -- ZOOM
    -- WHEN-NEW-FORM-INSTANCE
    -- WHEN-NEW-BLOCK-INSTANCE
    -- WHEN-NEW-RECORD-INSTANCE
    -- WHEN-NEW-ITEM-INSTANCE
    -- WHEN-VALIDATE-RECORD
    ===============

    Already the 'WHEN-NEW-FORM-INSTANCE' is described.

    Just you need to add the below query in the package body of
CUSTOM.pll. Compile it 

4.
BEGIN
  IF event_name = 'WHEN-NEW-FORM-INSTANCE' THEN
    IF FND_PROFILE.VALUE('USER_NAME')=' xxxxxx' THEN
   
      BEGIN
      COPY('Entering app_form.query_only_mode.','global.frd_debug');
      COPY('YES', 'PARAMETER.QUERY_ONLY');
      APP_MENU2.SET_PROP('FILE.SAVE', ENABLED,PROPERTY_OFF);
      APP_MENU2.SET_PROP('FILE.ACCEPT', ENABLED,PROPERTY_OFF);
      formname := NAME_IN('system.current_form');
      blockname := GET_FORM_PROPERY(formname, FIRST_BLOCK);
     
      WHILE (blockname is not null) LOOP
        IF (GET_BLOCK_PROPERTY(blockname, BASE_TABLE) is not NULL) THEN
          SET_BLOCK_PROPERTY(blockname, INSERT_ALLOWED, PROPERTY_FALSE);
          SET_BLOCK_PROPERTY(blockname, UPDATE_ALLOWED, PROPERTY_FALSE);
          SET_BLOCK_PROPERTY(blockname, DELETE_ALLOWED, PROPERTY_FALSE);
        END IF;
       
        blockname := GET_BLOCK_PROPERTY(blockname, NEXTBLOCK);
        END LOOP;
      END query_only_mode;
    END IF;
  END IF;
END;


  1. How to create FND_PROFILE.VALUE?

a. Steps:

Go to Application developer->profile and create the profile as below
  
Go to System Administrator->profile->system


  1. Copy the CUSTOM.pll from Form Builder to the server i.e.   to $AU_TOP/resource.

  1. Compile the CUSTOM.pll file by using the command

f60gen module=CUSTOM.pll userid=apps/xxxxx  module_type=library

8. Now log into the Applications with the user we created and  test.


Wednesday, April 13, 2016

Query To Get Form Personalizations

1)  SELECT FORM_ID, FORM_NAME, USER_FORM_NAME, DESCRIPTION
    FROM FND_FORM_VL
    WHERE FORM_NAME IN (SELECT FORM_NAME FROM FND_FORM_CUSTOM_RULES GROUP BY FORM_NAME)

2) Query to Get Form Personalization Details ( Oracle Applications )  from Database.

FND_FORM_CUSTOM_RULES - The Rules for the form customizations. A rule must have 1 more more FND_FORM_CUSTOM_SCOPES and a rule may have 1 or more FND_FORM_CUSTOM_ACTIONS.
FND_FORM_CUSTOM_ACTIONS - Holds the Actions for a specified Rule
FND_FORM - stores information about your registered application forms. Each row includes names (the actual SQL*Forms form name, and the EasyForm form title) and a description of the form. Each row also includes a flag that indicates whether this form is included in the AuditTrail audit set. You need one row for each form in each application. Oracle Application


Select Distinct
    A.Id,
    A.Form_Name ,
    A.Enabled,
    C.User_Form_Name,
    D.Application_Name ,
    A.Description,
    Ca.Action_Type,
    Ca.Enabled,
    Ca.Object_Type,
    ca.message_type,
    ca.message_text
from
    FND_FORM_CUSTOM_RULES a,
    FND_FORM b,
    FND_FORM_TL c,
    Fnd_Application_Tl D,
    Fnd_Form_Custom_Actions ca
where a.form_name = b.form_name
    And B.Form_Id = C.Form_Id
    And B.Application_Id = D.Application_Id
    And D.Application_Id = 230 --For Order Management
    And C.User_Form_Name Like 'Inventory%'  --All the Forms that Start with Sales
    And A.Enabled ='Y'
    and a.id = ca.rule_id

 
SELECT
    ffv.form_id          "Form ID",
    ffv.form_name        "Form Name",
    ffv.user_form_name   "User Form Name",
    ffv.description      "Form Description",
    ffcr.sequence        "Sequence",
    ffcr.description     "Personalization Rule Name"
FROM fnd_form_vl             ffv,
       fnd_form_custom_rules   ffcr
WHERE ffv.form_name = ffcr.form_name
ORDER BY ffv.form_name, ffcr.sequence;



SELECT  
    ffcr.SEQUENCE "Seq", ffcr.description "Description",
    DECODE (ffcr.rule_type,
           'F', 'Form',
            'A', 'Function',
            'Other'
           ) "Level",
    ffcr.enabled "Enabled",
    ffcr.trigger_event "Trigger Event",
    ffcr.trigger_object "Trigger Object",
    ffcr.condition "Condition",
    DECODE (ffcr.fire_in_enter_query,
            'Y', 'Both',
            'N', 'Not in Enter-Query Mode',
            'O', 'Only in Enter-Query Mode',
            'Other'
           ) "Processing Mode"
FROM apps.fnd_form_custom_rules ffcr
WHERE ffcr.function_name = 'PO_POXPOEPO'
    AND ffcr.form_name = 'POXPOEPO'
ORDER BY ffcr.SEQUENCE;


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