Wednesday, 21 March 2012

concurrent_program

/* Formatted on 2012/03/21 15:23 (Formatter Plus v4.8.8) */
SELECT r.ROWID row_id, r.request_id, r.phase_code, r.status_code,
       DECODE (r.status_code,
               'A', ' Waiting A',
               'B', 'Resuming B',
               'C', 'Normal C',
               'D', 'Cancelled D',
               'E', 'Error E',
               'F', 'Scheduled F',
               'G', 'Warning G',
               'H', 'On Hold H',
               'I', 'Normal I',
               'M', 'No Manager M',
               'Q', 'Standby Q',
               'R', 'Normal R',
               'S', 'Suspended S',
               'T', 'Terminating T',
               'U', 'Disabled U',
               'W', 'Paused W',
               'X', 'Terminated X',
               'Z', 'Waiting Z'
              ) status_code_name,
       r.priority_request_id, r.priority, r.request_date, r.requested_by,
       r.requested_start_date, r.hold_flag, r.has_sub_request,
       r.is_sub_request, r.update_protected, r.queue_method_code,
       r.responsibility_application_id, r.responsibility_id,
       r.save_output_flag, r.last_update_date, r.last_updated_by,
       r.last_update_login, r.printer, r.print_style, r.parent_request_id,
       r.controlling_manager, r.actual_start_date, r.actual_completion_date,
       r.completion_text, r.argument_text, r.implicit_code, r.request_type,
       r.program_application_id, r.concurrent_program_id,
       pb.concurrent_program_name program_short_name,
       pb.execution_method_code, pb.enabled_flag enabled,
       DECODE (r.description,
               NULL, pt.user_concurrent_program_name,
               r.description || ' (' || pt.user_concurrent_program_name || ')'
              ) program,
       pb.printer_name fcp_printer, pb.output_print_style fcp_print_style,
       pb.required_style fcp_required_style, u.user_name requestor,
       s.user_printer_style_name user_print_style, r.description description,
       pt.user_concurrent_program_name user_concurrent_program_name
  FROM fnd_concurrent_programs_tl pt,
       fnd_concurrent_programs pb,
       fnd_user u,
       fnd_printer_styles_tl s,
       fnd_concurrent_requests r
 WHERE pb.application_id = r.program_application_id
   AND pb.concurrent_program_id = r.concurrent_program_id
   AND pb.application_id = pt.application_id
   AND pb.concurrent_program_id = pt.concurrent_program_id
   AND pt.LANGUAGE = USERENV ('LANG')
   AND u.user_id = r.requested_by
   AND s.printer_style_name(+) = r.print_style
   AND s.LANGUAGE(+) = USERENV ('LANG')

No comments:

Post a Comment