Monday, 22 March 2021

Quick DMLs for Concurrent Programs

DELIVERY OPTIONS OF A CONCURRENT PROGRAM (EMAIL IDs)

SELECT concurrent_request_id,
       (SELECT tl.user_concurrent_program_name
        FROM   applsys.fnd_concurrent_programs_tl tl,
               applsys.fnd_concurrent_requests rq
        WHERE  tl.concurrent_program_id = rq.concurrent_program_id
               AND tl.LANGUAGE = Userenv('LANG')
               AND rq.request_id = concurrent_request_id) program,
       argument2                                          subject,
       argument3                                          MAIL_FROM,
       argument4                                          MAIL_To,
       argument5                                          MAIL_CC
FROM   fnd_conc_pp_actions
WHERE  action_type = 7
       AND concurrent_request_id = :p_request_id; 


UPDATE fnd_conc_pp_actions
SET    argument5 = 'abc@xxx.com'
WHERE  concurrent_request_id = 73616896
       AND action_type = 7;

COMMIT; 


DISABLE A SCHEDULE CONCURRENT PROGRAM 

UPDATE fnd_concurrent_requests
SET    phase_code = 'C',
       status_code = 'X'
WHERE  status_code IN ( 'Q', 'I' )
       AND requested_start_date > SYSDATE
       AND hold_flag = 'N'
       AND request_id = 73616896;

COMMIT; 

No comments:

Post a Comment