Friday, 10 February 2017

Oracle EBS Shortcut Keys

Just about any repetitive task that you do within Oracle E-Business Suite of applications has an alternative easier method using Key Strokes. These come in handy when you are entering information, searching for information or just executing a set of tasks repeatedly.

So here we have a very own set of keystrokes that will help you accomplish those very tasks in just a couple of seconds.

Function

Hot Key

Show Shortcut Keys

Ctrl+K

Clear Field

F5

Clear Form

F8

Clear Record

F6

Clear Block

F7

Commit / Save

Ctrl+S

Delete Record

Ctrl+↑

Down

Duplicate Field

Shift+F5

Duplicate Record

Shift+F6

Edit

Ctrl+E

Enter Query

F11

Execute Query

Ctrl+F11

Exit

F4

Change Responsibility

Alt+F+W

To View Requests

Alt+V+R+I

To Submit Request

Alt+V+R

Count Query

F12

Insert Record

Ctrl+↓

List of Values

Ctrl+L

Next Block

Shift+PgDn

Next Record

Previous Block

Shift+PgUp

Previous Field

Shift+Tab

Previous Record

Next Field

Tab

Print

Ctrl+P

Scroll Down

PgDn

Scroll Up

PgUp

Up

To Click any Buttons

Alt+(The Letter Underlined in Button Label)

Help

Ctrl+H

 

Monday, 23 January 2017

Query to Find Oracle Apps Module's Short Names

The following query can be used to find Application Short Name for any modules like Inventory, Order Management, Manufacturing, etc which are commonly used for uploading/downloading .ldt files, submitting a concurrent program from back end and many other purposes.

*********************************************************************************
SELECT fa.application_id    AS "Application ID",
  fat.application_name           AS "Application Name",
  fa.application_short_name  AS "Application Short Name",
  fa.basepath                          AS "Basepath"
FROM fnd_application fa,
  fnd_application_tl fat
WHERE fa.application_id                 = fat.application_id
AND fat.language                              = USERENV('LANG')
AND UPPER(fat.application_name) = UPPER('&Application_Name') /* Pass your Application Name as Parameter here */
ORDER BY fat.application_name;
/
*********************************************************************************

HAPPY LEARNING...!!!

Wednesday, 18 January 2017

How to Find the Responsibility to which the Concurrent Program is Attached

There will be a situation where you don't know from which responsibility to submit the concurrent program and in that case first you have find to which responsibility the concurrent program is attached so that you can submit the concurrent request from same responsibility.

The below query helps you to find the responsibility & request group details to which your concurrent program is attached.

SELECT frt.responsibility_name,
  frg.request_group_name,
  frg.description,
  frgu.request_unit_type,
  frgu.request_unit_id,
  fcpt.user_concurrent_program_name
FROM fnd_Responsibility fr,
  fnd_responsibility_tl frt,
  fnd_request_groups frg,
  fnd_request_group_units frgu,
  fnd_concurrent_programs fcp ,
  fnd_concurrent_programs_tl fcpt
WHERE frt.responsibility_id                 = fr.responsibility_id
AND frg.request_group_id                     = fr.request_group_id
AND frgu.request_group_id                   = frg.request_group_id
AND fcpt.concurrent_program_id         = frgu.request_unit_id
AND fcp.application_id                         = fcpt.application_id
AND fcp.concurrent_program_id          = fcpt.concurrent_program_id
AND frt.LANGUAGE                           = USERENV('LANG')
AND fcpt.LANGUAGE                         = USERENV('LANG')
AND UPPER(fcp.concurrent_program_name)       = UPPER(:Conc_prog_shrt_name) /*Pass Your Concurrent Program Short Name */
AND UPPER(fcpt.user_concurrent_program_name) = UPPER(:Conc_prg_name)/*Pass Your Concurrent Program Name*/
ORDER BY 1,2,3,4;
/
HAPPY LEARNING...!!!

Tuesday, 17 January 2017

How to Find Oracle APPs User's Password - Decrypt User Password

Here is one stop solution for haunting of your password search. To find password for specific user you have to just follow 2 simple steps as listed below :

Step-1 : Create a Package

--Package Specification
CREATE OR REPLACE PACKAGE xx_get_user_pwd
AS
  FUNCTION decrypt_pwd(
      KEY   IN VARCHAR2,
      VALUE IN VARCHAR2)
    RETURN VARCHAR2;
END xx_get_user_pwd;
/
--Package Body
CREATE OR REPLACE PACKAGE BODY xx_get_user_pwd
AS
  FUNCTION decrypt_pwd(
      KEY   IN VARCHAR2,
      VALUE IN VARCHAR2)
    RETURN VARCHAR2
  AS
    LANGUAGE JAVA NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String';
  END xx_get_user_pwd;
/

Step-2 : Execute the below Query

--Query to Execute
SELECT usr.user_name,
  xx_get_user_pwd.decrypt_pwd (
  (SELECT
    (SELECT xx_get_user_pwd.decrypt_pwd (fnd_web_sec.get_guest_username_pwd, usertable.encrypted_foundation_password )
    FROM DUAL
    ) AS apps_password
  FROM fnd_user usertable
  WHERE usertable.user_name =
    (SELECT SUBSTR (fnd_web_sec.get_guest_username_pwd, 1, INSTR (fnd_web_sec.get_guest_username_pwd, '/' ) - 1 )
    FROM DUAL
    )
  ), usr.encrypted_user_password ) PASSWORD
FROM fnd_user usr
WHERE UPPER(usr.user_name) = UPPER('&USER_NAME');--Pass the User Name as Parameter
/

HAPPY LEARNING...!!!

Wednesday, 11 January 2017

Script/API to Delete Values in Value Set

In general, once you have set up and begun to use a flexfield, you should never change anything about its structure or its value sets (other than defining, enabling, and disabling values, shorthand aliases, and cross-validation and security rules). But many times in real time scenarios we need to add, modify or delete some or many values from existing value set.

Thus, below script helps you to delete required value from existing value set.

*********************************************************************
DECLARE
  l_err_msg VARCHAR2 (500) := NULL;
  CURSOR flex_values
  IS
    SELECT ffv.flex_value_id,
      ffv.flex_value
    FROM fnd_flex_value_sets ffvs,
      fnd_flex_values ffv,
      fnd_flex_values_tl ffvt
    WHERE 1                            = 1
    AND UPPER(flex_value_set_name)     = UPPER('XX_GROUP_BY_CLAUSE')--Pass Your Value Set Name
    AND ffv.flex_value_set_id          = ffvs.flex_value_set_id
    AND ffvt.flex_value_id             = ffv.flex_value_id
    AND ffvs.flex_value_set_id         = ffv.flex_value_set_id
    AND UPPER(ffvt.flex_value_meaning) = UPPER('Item Category') --Pass Your Value which you wish to delete from value set
      ;
BEGIN
  FOR i IN flex_values
  LOOP
    fnd_flex_values_pkg.delete_row (i.flex_value_id);
    COMMIT;
    DBMS_OUTPUT.put_line ('Flex Value '||'"'||i.flex_value_id ||'-'||i.flex_value|| '"'||' Deleted');
  END LOOP;
EXCEPTION
WHEN OTHERS THEN
  l_err_msg := SQLERRM;
  DBMS_OUTPUT.put_line ('In Exception ' || l_err_msg);
END;
*********************************************************************

HAPPY LEARNING…!!!


Sunday, 9 October 2016

Steps to Create a Master-Detail Form

STEP-1 : Open Oracle Forms Builder and Delete Defaults

1) Open Oracle Forms Builder, When Forms Builder starts, an empty form is  automatically created named Module1. Select Forms and open Template.fmb from  your Developer Suite installed directory (for me it’s: D:\DevSuiteHome_1\forms) and  then save it as ‘XX_MasterDetail.fmb’ in same directory.

2) Delete the default Data Blocks (BLOCKNAME, DETAILBLOCK), Canvases    (BLOCKNAME), Windows (BLOCKNAME) and then Click save. By default, Forms  saves files in the \forms directory of your Developer Suite installation. You may want to save it in a different directory; if desired, you can create a new directory  called MyForms in which to save the custom forms.

Fig : Before Deleting form Defaults

Fig : After Deleting form Defaults

STEP-2 : Creating Windows and Canvases

1)   Let’s first create a window. To create a window, select the Windows node in the Object  Navigator, then click Create (‘+’ sign on the left toolbar).
2)    Once the window is create then assign the proper properties as below :

Name                        : XX_MASTER_DETAIL_WIN
Subclass Information : WINDOW
Title                          : Department-Employees


3)    Now let’s create a content canvas. To create canvas, select the Canvases node in the Object Navigator, then click Create (‘+’ sign on the left toolbar).
4)    Assign the following properties to the newly created canvas.
Name                          : XX_MASTER_DETAIL_CAN
Canvas Type               : Content
Subclass Information : CANVAS
Window                      : XX_MASTER_DETAIL_WIN


5)    Now go to Window (XX_MASTER_DETAIL_WIN) and assign a Primary Canvas for it as below.


6)    Go to form level ‘PRE_FORM’ trigger and modify the code i.e. write your window name as first window.
Similarly, got to APP_CUSTOM (Package Body) and write your window name in place of <your first window>.

Fig : Pre-Form Trigger Code

Fig : App_Custom(Packae Body) Code

STEP-3 : Building Data Blocks

We have to create one master and another details block for master block. Here XX_Departments_Blk is master block and XX_Employees_Blk is details block.

-- Building Master-Block and it’s Layout

1)    Select the Data Blocks node in the Object Navigator, then click Create (‘+’ sign on the left toolbar).


2)    Immediately, the window for the new Data Block will pop up. Select “Use the Data Block wizard” and click OK.


3)    Select “table or view” as your data block type, and click Next.


4)   Click on browse button then immediately a pop up window will open for database connection. Enter valid credentials and connect to database.


5)  Select Departments table (XX_DEPT) and click Refresh,then all department columns will appear under Available Columns list. Click on double right arrow to move all columns under data block items. Then clink Next.


6) On click of ‘Next’ the next navigation window will be for creating master-detail relationship but as XX_Departments_Blk block is master block so no need to create relationship for this block. Thus Click Next.

Rename Data Block Name as ‘XX_Departments_Blk’, Click Next.


7)    Select Create the data block, then call Layout Wizard and click Finish.


Once you click Finish for Data Block Wizard then a new Layout Wizard window will open where you can assign canvases for your data block items and design the layout as tabular or form.

8)    Select Canvas as ‘XX_MASTER_DETAIL_CAN’ and click Next.


9) Drag all your display items from Available Items section to Displayed Items    section and click Next.


10) Check all your Prompt, Width, and Height. If you want to alter Prompt, Width, and  Height then alter it and then click Next.


11) Select the display layout i.e. either Form or tabular. But as Departments is my  master section so I will select form layout to display single record for it. Thus select  Form and click Next.


12) Give
Frame Title              : Departments
Records Displayed  : 1
Click Next and then click Finish.



By now successfully you have designed the Data Block and assigned data block items to corresponding canvas. Now it’s time to arrange data block items on canvas as you want.

Once alignment of items on canvas is done then let’s assigns Subclass Information for blocks and items of blocks.

13) Select ‘XX_DEPARTMENTS_BLK’ and provide subclass ‘BLOCK’. 


14) For all items DEPTNO, DNAME and LOC of ‘XX_DEPARTMENTS_BLK’ block provide subclass information as ‘TEST_ITEM’. 


15) Select frame of ‘XX_MASTER_DETAIL_CAN’ canvas assign subclass information as ‘FRAME_RECT’. 


Now our Master-Block and its Layout is ready. Hence, let’s start with Child-Block.

--Building Child-Block and it’s Layout 

1)    Follow steps 1-4 of ‘Building Master-Block and it’s Layout’.
2)    Select Employees table (XX_EMP) and click Refresh,then all employee columns will appear under Available Columns list. Click on double right arrow to move all columns under data block items. Then clink Next.


As Employees is our child block so we have to create master-detail relationship for it. Thus, next step is creating master-detail relationship.

3)    Remove the check sign from the check button beside “Auto join data block”. Then click on create relationship button.


4)    Select “based on a join condition” as a relation type then click OK.


5)    Select Department table as a related data block then click OK.


6)    Select the name of the column in the Employee table under Detail item (FK name: DEPTNO), and its name in the Department table under the Master item (PK name: DEPTNO). Check the join condition if it’s correct then Check the Auto-join data blocks, click next.


7)    Rename Data Block Name as ‘XX_Employees_Blk, Click Next.


8)    Select Create the data block, then call Layout Wizard and click Finish.


Once you click Finish for Data Block Wizard then a new Layout Wizard window will open where you can assign canvases for your data block items and design the layout as tabular or form.
9)    Select Canvas as ‘XX_MASTER_DETAIL_CAN’ and click Next.


10) Drag whichever items you want to display from Available Items section to Displayed Items section and click Next.


11) Check all your Prompt, Width, and Height. If you want to alter Prompt, Width, and Height then alter it and then click Next.

12) As Employees is details section i.e. for one master (Department) there can be many      details (Employees) records thus select Tabular layout and click Next.


13) Give
                Frame Title             : Employees
                Records Displayed : 10
               Click Next and then click Finish.


14) Assigns Subclass Information for blocks and items of blocks as done for master    block (Refer Steps 14,15,16 of ‘Building Master-Block and it’s Layout’).

Finally your form layout should look like below –


Save your work and compile the form.
There should not be any error if you have followed all the steps correctly… :)

Congratulations!!!
You have successfully designed a Master-Detail form. Now register your form in Oracle Apps and run it. You will get an output window as : 


Note : When you will create Master-Details relationship you can see few triggers (ON-            POPULATE-DETAILS,ON-CHECK-DELETE-MASTER) will get                                     automatically added for master (XX_DEPARTMENTS_BLK) block and a                        relationship will get created (XX_DEPARTMENTS__XX_EMPLOYEES_B).



If we will change the Delete Record Behavior property, the triggers will automatically change accordingly.
1
. Non-Isolated :( Triggers are automatically generated under the master data block)
a) ON-POPULATE-DETAILS
b) ON-CHECK-DELETE-MASTER
2. Cascading
 :( Triggers are automatically generated under the master data block)
a) ON-POPULATE-DETAILS
b) PRE-DELETE
 
3. Isolated :( Triggers are automatically generated under the master data block)
a) ON-POPULATE-DETAILS


What does the above three properties mean basically?

Non-Isolated : Prevents deletion of master record if detail record is present.

Cascading : Deletes the detail record once master record is deleted.


Isolated : Only deletes the master record.

HAPPY  LEARNING...!!!