Search This Blog

Tuesday, May 22, 2012

Check Cycle in Position Hierarchy

SQL> select empno     , mgr    , connect_by_iscycle  
          from scott.emp 
          connect by nocycle mgr  = prior empno  
          start with empno  = 7321  

        

Monday, May 21, 2012

"Function not available to this responsibi​lity" Error While Clicking On Forms Personalis​ation

To resolve the issue:
1. Log in as the System Administrator
2. Navigate -> Profile -> System -> User
3. Select an appropriate level (i.e. Site, Application, Responsibility, User)
4. Query the following profile: Utilities: Diagnostics
5. Set option to Yes and commit
6. You must log off and log on again for the settings to take effect.
Then retest for your issue.

Ref - Metalink Note - 1263970.1

Thursday, May 17, 2012

FNDLOAD Form Persanalizations and Menu in Oracle Applications

Create the director like xx_ldts under $FND_TOP/patch/115/import/
Menu
Download
[appldemo@demo XX_LDTS]$ FNDLOAD apps/xxx@xxx 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct XXX_COLL_SELF_SERV.ldt MENU  MENU_NAME="XXX_COLLEAGUE_DIRECT_ACCESS"

UPLOAD
[appltest@testappn1 XX_LDTS]$ FNDLOAD apps/xxxxx@test 0 Y UPLOAD $FND_TOP/patch/115/import/afsload.lct XXX_COLL_SELF_SERV.ldt

Form Persanalization:
Download
FNDLOAD apps/xxxx@dev 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct PERWSDPO_07.ldt FND_FORM_CUSTOM_RULES function_name="PERWSDPO_07"

Upload:
FNDLOAD apps/xxxxx@test 0 Y UPLOAD $FND_TOP/patch/115/import/affrmcus.lct xxxx.ldt

Wednesday, May 16, 2012

Delete Organization Information in Oracle HRMS

DECLARE
   ln_ovn   NUMBER := 1;
   CURSOR c
   IS
      SELECT org_information_id, object_version_number
        FROM hr_organization_information
       WHERE TRUNC (creation_date) = TRUNC (SYSDATE)
         AND org_information_context = 'XX_ORG_ROLES'
      UNION
      SELECT org_information_id, object_version_number
        FROM hr_organization_information
       WHERE org_information_context = 'XX_ORG_ROLES'
         AND TRUNC (creation_date) = '01-May-2012';
BEGIN
   FOR i IN c
   LOOP
      ln_ovn := i.object_version_number;
      hr_organization_api.delete_org_manager
                               (p_validate                   => FALSE,
                                p_org_information_id         => i.org_information_id,
                                p_object_version_number      => ln_ovn
                               );
   END LOOP;
END;

Wednesday, April 25, 2012

Formatted Text in Oracle SSHR

1. Go to page where you want to add the formatted text.
2. Persanalize Page
3. Expand All
4. Create Item
5. Give Item Code
6. Text as <Font size = "1" face="Verd​ana" Color="Blu​e"> Instructio​ns </font>
7. Return to Application

Monday, March 26, 2012

Check if string contains all zeros in Oracle

select rpad (nvl (decode('X000',lpad('0',length('X000'),'0'),lpad(' ',length('X000'),' '),'X000'), chr (32)), 15, ' ') from dual

Tuesday, March 20, 2012

Data Loader for Lookup Sample dld file and API

To Load Value to the lookups, try following script. If it works, perfect or use data loader instead of breaking your head to debug the API. It is not public API.

DECLARE
   lr_rowid        ROWID  := NULL;
   l_lookup_code   NUMBER;
   CURSOR cur
   IS
      SELECT DISTINCT position_title
                 FROM xx_position_master
             ORDER BY 1;
BEGIN
   FOR i IN cur
   LOOP
      l_lookup_code := NULL;
      SELECT MAX (lookup_code) + 10
        INTO l_lookup_code
        FROM fnd_lookup_values
       WHERE lookup_type = 'XX_POSITION_TITLE'
         AND LANGUAGE = hr_api.userenv_lang;
      BEGIN
         fnd_lookup_values_pkg.insert_row
                             (x_rowid                    => lr_rowid,
                              x_lookup_type              => 'XX_POSITION_TITLE',
                              x_security_group_id        => 0,
                              x_view_application_id      => 3,
                              x_lookup_code              => l_lookup_code,
                              x_tag                      => NULL,
                              x_attribute_category       => NULL,
                              x_attribute1               => NULL,
                              x_attribute2               => NULL,
                              x_attribute3               => NULL,
                              x_attribute4               => NULL,
                              x_enabled_flag             => 'Y',
                              x_start_date_active        => NULL,
                              x_end_date_active          => NULL,
                              x_territory_code           => NULL,
                              x_attribute5               => NULL,
                              x_attribute6               => NULL,
                              x_attribute7               => NULL,
                              x_attribute8               => NULL,
                              x_attribute9               => NULL,
                              x_attribute10              => NULL,
                              x_attribute11              => NULL,
                              x_attribute12              => NULL,
                              x_attribute13              => NULL,
                              x_attribute14              => NULL,
                              x_attribute15              => NULL,
                              x_meaning                  => i.position_title,
                              x_description              => i.position_title,
                              x_creation_date            => SYSDATE,
                              x_created_by               => apps.fnd_global.user_id,
                              x_last_update_date         => SYSDATE,
                              x_last_updated_by          => apps.fnd_global.user_id,
                              x_last_update_login        => apps.fnd_global.login_id
                             );
         DBMS_OUTPUT.put_line ('Success');
         COMMIT;
      EXCEPTION
         WHEN OTHERS
         THEN
            DBMS_OUTPUT.put_line ('Error' || SQLERRM);
      END;
   END LOOP;
END;

DLD Sample File:

Data   tab  Data                                tab  Data                                tab  tab  Date             *dn
10      tab   Administration Manager  tab Administration Manager  tab   tab 01-JAN-1951 *dn
20      tab   Administrator                   tab Administrator                   tab   tab 01-JAN-1951 *dn