P. 1
Kill Concurrent Request

Kill Concurrent Request

|Views: 14|Likes:
Published by Abhijit Das

More info:

Published by: Abhijit Das on Mar 06, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less





CANCEL REQUESTS:declare v_user_id v_resp_id v_appl_id v_user_name

number; number; number; varchar2(200);

v_request_id number; v_message varchar2(300); V_TRUE BOOLEAN; cursor c1 is SELECT fcr.REQUEST_ID, fu.user_name, fcpt.USER_CONCURRENT_PROGRAM_NAME FROM apps.FND_CONCURRENT_REQUESTS FCR, apps.FND_CONCURRENT_PROGRAMS FCP, apps.FND_CONCURRENT_PROGRAMS_TL FCPT, apps.FND_USER FU WHERE 1=1 AND fcr.PHASE_CODE = 'P' -- Pending P, Running R AND fcr.STATUS_CODE = 'I' -- Normal I, Running R AND fcp.CONCURRENT_PROGRAM_ID=fcr.CONCURRENT_PROGRAM_ID AND fcpt.CONCURRENT_PROGRAM_ID=fcp.CONCURRENT_PROGRAM_ID AND FCR.REQUESTED_BY = FU.USER_ID and fcpt.USER_CONCURRENT_PROGRAM_NAME like 'CONCURRENT PROGRAMME NAME'; begin for x in c1 loop BEGIN v_request_id := x.REQUEST_ID; v_user_name := x.user_name; select user_id into v_user_id from apps.fnd_user where user_name=v_user_name; /*dbms_output.put_line('v_user_id='||v_user_id);*/ SELECT fa.application_id, frt.responsibility_id INTO v_appl_id, v_resp_id FROM APPS.fnd_user_resp_groups furg, APPS.fnd_application fa, APPS.fnd_responsibility_tl frt WHERE fa.application_short_name = 'CSS' AND UPPER(frt.responsibility_name) = UPPER('WBSEDCL CM Supply Engineer') AND fa.application_id = frt.application_id AND furg.responsibility_application_id = fa.application_id AND furg.responsibility_id = frt.responsibility_id AND furg.user_id = v_user_id AND rownum = 1; --

put_line('v_resp_id'||v_resp_id).PUT_LINE('TEST AFTER exception'||SQLERRM). dbms_output.555). dbms_output.resp_id => v_resp_id .APPS_INITIALIZE ( user_id => v_user_id .apps_initialize(29996.*/ apps. end. /*DBMS_OUTPUT. .PUT_LINE(v_request_id || v_message). end. Message => v_message).*/ commit. exception when others then DBMS_OUTPUT.FND_GLOBAL.put_line('After APPS INITIALIZE').*/ --fnd_global. /*dbms_output. /*DBMS_OUTPUT. /*DBMS_OUTPUT.put_line('Before APPS INITIALIZE').put_line('v_appl_id'||v_appl_id).resp_appl_id => v_appl_id )./*dbms_output.PUT_LINE('TEST BEFORE CANCEL'). */ --update jastest set aa = 'bbb'. */ V_TRUE := fnd_concurrent.51714. end loop.PUT_LINE('TEST AFTER CANCEL ' ).cancel_request( Request_Id => v_request_id.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->