Thursday, 24 January 2019

Query to List All User Roles in EBS as it shows in Application

The following query list all the Roles and responsibilities as they appears in the Application security screen

SELECT DISTINCT UR.USER_NAME, WR.DISPLAY_NAME, WR.description
  FROM APPLSYS.wf_user_role_assignments ur, apps.WF_ROLES wr
 WHERE     1 = 1
       AND ROLE_ORIG_SYSTEM IN ('FND_RESP', 'UMX')
       AND wr.name = ur.role_name
       AND ur.user_name LIKE '<USER_NAME>%';

Tuesday, 22 January 2019

PL/Sql script to add System Administrator responsibility


PL/Sql script to add System Administrator responsibility
--------------------------------------------------------------------------------------------------

BEGIN
   fnd_user_pkg.addresp (username         => UPPER ('ramprasath'),
                         resp_app         => 'SYSADMIN',
                         resp_key         => 'SYSTEM_ADMINISTRATOR',
                         security_group   => 'STANDARD',
                         description      => 'DESCRIPTION',
                         start_date       => SYSDATE,
                         end_date         => NULL);
   COMMIT;
   DBMS_OUTPUT.put_line ('Responsibility Added Successfully');
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line(   'Responsibility is not added due to'
                           || SQLCODE
                           || SUBSTR (SQLERRM, 1, 100));
      ROLLBACK;
END;
/

Friday, 11 January 2019

Oracle Forms :- Steps to get record counts in Data block without saving the records

Steps to get record counts in Data block without saving the records in Oracle Forms :- 

While developing the Custom Oracle Forms, We will populate the records into the line level data blocks with using of Fetch Cursor. If we need to count the fetched records in the data block without saving the records, we will count the records in two different methods 

1. Query Hits - Oracle Forms Block Property. 
2. Manual Method using Go_block function.

In this below Screen shot shows the Line level fetched data in the Custom form in Oracle.


1. Query Hits - Oracle Forms Block Property. 


TOT_REC_COUNT := GET_BLOCK_PROPERTY('BLOCK_NAME', QUERY_HITS);

2. Manual Method using Go_block function.

GO_BLOCK('BLOCK_NAME');

First_record;

last_record;

TOT_REC_COUNT := GET_BLOCK_PROPERTY('BLOCK_NAME',current_record);