Friday, January 4, 2013

Reports / Executables attached to Responsibilities List


Run this Query

  SELECT frt.responsibility_name,
         frt.description
    FROM fnd_executables fe,
         fnd_concurrent_programs fcp,
         fnd_concurrent_programs_tl fcpt,
         fnd_request_group_units frgu,
         fnd_request_groups frg,
         fnd_responsibility fr,
         fnd_responsibility_tl frt
   WHERE (fcpt.user_concurrent_program_name = 'USER_CONCURRENT_PROGRAM_NAME'
       OR  fe.execution_file_name = 'EXECUTION_FILE_NAME'
       OR  fe.executable_name = 'EXECUTABLE_NAME')
     AND fcpt.concurrent_program_id = fcp.concurrent_program_id
     AND fcpt.language = USERENV ('Lang')
     AND fcp.executable_id = fe.executable_id
     AND fcp.enabled_flag = 'Y'
     AND fcp.concurrent_program_id = frgu.request_unit_id
     AND frg.request_group_id = frgu.request_group_id
     AND fr.request_group_id = frg.request_group_id
     AND frt.responsibility_id = fr.responsibility_id
     AND frt.language = USERENV ('Lang')
ORDER BY frt.responsibility_name,
         frt.description;

* Pass the Executable Name / Executable File Name / User Concurrent Program Name


Tuesday, September 11, 2012

How to set ORG_ID for MOAC enabled conc. programs using FND_REQUEST.SUBMIT_REQUEST or CONCSUB

Example


1. FND_REQUEST.SUBMIT_REQUEST
[Oracle Doc ID: 1383266.1]

ORG_ID for a concurrent request can be set by using FND_REQUEST.SET_ORG_ID and needs to be set before submitting request using FND_REQUEST.SUBMIT_REQUEST.

FND_REQUEST.SET_ORG_ID(ORG_ID);
FND_REQUEST.SUBMIT_REQUEST(Parameters);

2. CONCSUB
[Oracle Doc ID: 457519.1]

CONCSUB ${1} AR "Receivables Manager" ${3} WAIT=Y CONCURRENT AR ARLPLB ORG_ID=${25} \"${new_trans}\" \"${transmission_id}\" \"${4}\" \"${trans_name}\" \"${10}\" \"${data_file_path}\" \"${13}\" \"${14}\" \"${15}\" \"${16}\" \"${17}\" \"${18}\" \"${19}\" \"${20}\" \"${21}\" \"${22}\" \"${23}\" \"${24}\" \"${25}\" \"${26}\" \"${27}\"

Sunday, May 15, 2011

UTL_FILE Utility Basic Setups


DB and Server Setups

1.       The directory path on the application node will need to be mounted/shared on the database node.
2.      The directory path is readable/writable from the database node.
3.       The directory path should have required permissions.

DB Level - Verification SQL

SELECT directory_name,
       directory_path
  FROM sys.dba_directories
WHERE directory_name = 'CUSTOM_DIR';

SELECT grantee,
       privilege,
       table_name
  FROM sys.dba_tab_privs

WHERE table_name = 'CUSTOM_DIR';

Server Level - Verification Command

ls -altr CUSTOM_DIR_PATH


Basic Code with Important Exceptions


DECLARE
   lf_utl_file_id      UTL_FILE.file_type;
   lv_dba_dir_name     VARCHAR2 (30) := 'CUSTOM_DIR';
   lv_data_file_name   VARCHAR2 (80) := 'outbound_file.txt';
   lv_utl_file_mode    VARCHAR2 (1) := 'w';    -- 'w', 'r'
   lv_data_line        VARCHAR2 (2000);
BEGIN
   IF NOT UTL_FILE.is_open (lf_utl_file_id)
   THEN
      lf_utl_file_id      :=
         UTL_FILE.fopen (lv_dba_dir_name,
                         lv_data_file_name,
                         lv_utl_file_mode,
                         32767);
   END IF;

   lv_data_line   := '';             -- Extract Data
   UTL_FILE.put_line ( lf_utl_file_id, lv_data_line);


   UTL_FILE.fclose (lf_utl_file_id);
EXCEPTION
   WHEN UTL_FILE.invalid_mode
   THEN
      raise_application_error ( -20051, 'Invalid Mode Parameter');
   WHEN UTL_FILE.invalid_path
   THEN
      raise_application_error ( -20052, 'Invalid File Location');
   WHEN UTL_FILE.invalid_filehandle
   THEN
      raise_application_error ( -20053, 'Invalid Filehandle');
   WHEN UTL_FILE.invalid_operation
   THEN
      raise_application_error ( -20054, 'Invalid Operation');
   WHEN UTL_FILE.read_error
   THEN
      raise_application_error ( -20055, 'Read Error');
   WHEN UTL_FILE.internal_error
   THEN
      raise_application_error ( -20057, 'Internal Error');
   WHEN UTL_FILE.charsetmismatch
   THEN
      raise_application_error ( -20058, 'Opened With FOPEN_NCHAR, But Later I/O Inconsistent');
   WHEN UTL_FILE.file_open
   THEN
      raise_application_error ( -20059, 'File Already Opened');
   WHEN UTL_FILE.invalid_maxlinesize
   THEN
      raise_application_error ( -20060, 'Line Size Exceeds 32K');
   WHEN UTL_FILE.invalid_filename
   THEN
      raise_application_error ( -20061, 'Invalid File Name');
   WHEN UTL_FILE.access_denied
   THEN
      raise_application_error ( -20062, 'File Access Denied');
   WHEN UTL_FILE.invalid_offset
   THEN
      raise_application_error ( -20063, 'FSEEK Param Less Than 0');
   WHEN OTHERS
   THEN
      raise_application_error ( -20099, 'Unknown UTL_FILE Error');
END;

Tuesday, March 22, 2011

How to find the backend SQL query from Self Service / OAF pages in Oracle Applications?

Update the following Profile Option Values to Yes at User level.

FND: Diagnostics
Personalize Self-Service Defn
 
(For an Example) Supplier Page
Click > About this Page



[PAGE] Tab Page / Business Component Reference Details


View Objects


Query

Thursday, March 17, 2011

Error: Element Not Found

In R12 applications, few BUTTONs maynot be performed well. (on self service pages.)

Line XXXX
Char X
Error: Element not found.
Code: 0

Oracle Applications: R12
Internet Explorer: 7

Solution

START > RUN > regedit



HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\0\win32

If it's value is "C:\WINDOWS\system32\shdocvw.dll"

Replace that value with "C:\WINDOWS\system32\ieframe.dll"