July 10, 2008

Concurrent Request Details Query for Printing issue

Run the Following Query from SQL as apps user. You have to provide the Concurrent request ID as input.

set long 5000
set pagesize 5000
SELECT r.request_id, a.application_name,
t.user_concurrent_program_name, p.concurrent_program_name,
p.execution_method_code, p.execution_options,
p.output_file_type, p.save_output_flag, p.print_flag,
p.output_print_style, p.required_style, p.printer_name,
TO_CHAR(r.actual_completion_date, 'DD-MON-RR HH24:MI:SS'),
r.logfile_node_name, r.logfile_name, r.outfile_name,
r.nls_language, r.nls_territory, r.nls_codeset,
r.is_sub_request, r.phase_code, r.status_code,
r.completion_text, r.output_file_type, r.number_of_copies,
r.printer, n.printer_type, r.print_style,
i.printer_style, i.printer_driver, d.srw_driver,
printer_driver_method_code, spool_flag, stdin_flag,
d.command_name, d.arguments, d.initialization
FROM apps.fnd_concurrent_programs_tl t,
apps.fnd_concurrent_programs p, apps.fnd_application_tl a,
apps.fnd_concurrent_requests r, apps.fnd_printer n,
apps.fnd_printer_information i, apps.fnd_printer_drivers d,
apps.fnd_languages l
WHERE a.application_id = t.application_id
and r.concurrent_program_id = t.concurrent_program_id
and t.concurrent_program_id = p.concurrent_program_id
and n.printer_name = r.printer
and (n.printer_type = i.printer_type)
and (i.printer_driver = d.printer_driver_name)
and d.platform_code is NULL
and i.printer_style = r.print_style
AND r.nls_language = l.nls_language
AND l.language_code = t.language
AND l.language_code = a.language
and r.request_id = &REQ_ID;


The following is the sample output,

REQUEST_ID
----------
APPLICATION_NAME
--------------------------------------------------------------------------------
USER_CONCURRENT_PROGRAM_NAME
--------------------------------------------------------------------------------
CONCURRENT_PROGRAM_NAME E
------------------------------ -
EXECUTION_OPTIONS
--------------------------------------------------------------------------------
OUTP S P OUTPUT_PRINT_STYLE R PRINTER_NAME
---- - - ------------------------------ - ------------------------------
TO_CHAR(R.ACTUAL_C LOGFILE_NODE_NAME
------------------ ------------------------------
LOGFILE_NAME
--------------------------------------------------------------------------------
OUTFILE_NAME
--------------------------------------------------------------------------------
NLS_LANGUAGE NLS_TERRITORY
------------------------------ ------------------------------
NLS_CODESET I P S
------------------------------ - - -
COMPLETION_TEXT
--------------------------------------------------------------------------------
OUTP NUMBER_OF_COPIES PRINTER
---- ---------------- ------------------------------
PRINTER_TYPE PRINT_STYLE
------------------------------ ------------------------------
PRINTER_STYLE PRINTER_DRIVER
------------------------------ ------------------------------
SRW_DRIVER
--------------------------------------------------------------------------------
PRINTER_DRIVER_METHOD_CODE S S
------------------------------ - -
COMMAND_NAME
--------------------------------------------------------------------------------
ARGUMENTS
--------------------------------------------------------------------------------
INITIALIZATION
--------------------------------------------------------------------------------
669776
Payables
Invoice Register
APXINRIR P

TEXT Y Y LANDSCAPE N
26-FEB-08 16:47:57 NSORORACLE2
$COMMON_TOP//l669776.req
$COMMON_TOP//o669776.out
AMERICAN AMERICA
US7ASCII N C C
Normal completion
TEXT 1 Ricoh2228-Houston-FrontArea
HPLJ4SI LANDSCAPE
LANDSCAPE LANDSCAPEHPLJ4SI
HPL
C N N

lpr -P$PROFILES$.PRINTER -#$PROFILES$.CONC_COPIES -T"$PROFILES$.TITLE" $PROFILES
$.FILENAME
/eE/e&l1o2a5.45C/e(s0p16.66H/e&k6.75H


SQL> spool off;

This helped me for getting initial understanding towards fixing the printing issue.

.... ...

No comments: