498: if (mtype>999) then
499: if (CartType = 'AQCART') then
500: select count(*)
501: into ActiveP
502: from gv$session GV, fnd_concurrent_processes P
503: where
504: GV.Inst_id = P.Instance_number
505: And GV.audsid = p.session_id
506: And (Process_Status_Code not in ('S','K','U'))
856: SH.MACHINE,
857: SH.TERMINAL,
858: SH.PROGRAM
859: into UName, UProcess_ID, UNode, UTerminal, UProgram
860: from V$SESSION SH,
861: V$LOCK LW,
862: V$LOCK LH,
863: V$SESSION SW
864: where LH.SID = SH.SID
859: into UName, UProcess_ID, UNode, UTerminal, UProgram
860: from V$SESSION SH,
861: V$LOCK LW,
862: V$LOCK LH,
863: V$SESSION SW
864: where LH.SID = SH.SID
865: and LH.SID <> SW.SID
866: and LH.ID1 = LW.ID1
867: and LH.ID2 = LW.ID2
981: Select P.PID, P.SPID, AUDSID, PROCESS,
982: substr(userenv('LANGUAGE'),
983: instr( userenv('LANGUAGE'), '.') + 1)
984: Into cpid, csspid, csid, cspid, codeset
985: From V$Session S, V$Process P
986: Where P.Addr = S.Paddr
987: and S.AUDSID = userenv('SESSIONID');
988:
989: update fnd_concurrent_requests
2597: cprogid number;
2598: cprireqid number;
2599: counter number := 0;
2600:
2601: lpid v$session.process%type;
2602: lmachine v$session.machine%type;
2603: position number;
2604: begin
2605:
2598: cprireqid number;
2599: counter number := 0;
2600:
2601: lpid v$session.process%type;
2602: lmachine v$session.machine%type;
2603: position number;
2604: begin
2605:
2606: -- Select all the information needed for this request from fnd_concurrent_requests,
2606: -- Select all the information needed for this request from fnd_concurrent_requests,
2607: -- using the fnd_cp_sql_requests table.
2608: -- A row should have been inserted earlier in usdspid, containing the current request id,
2609: -- machine name, and process id.
2610: -- By joining these tables with v$session, we can pull out all the information we need,
2611: -- using only our own session id.
2612: begin
2613:
2614:
2614:
2615:
2616: select process, machine
2617: into lpid, lmachine
2618: from v$session
2619: where audsid = userenv('sessionid');
2620:
2621: position := instr(lpid,':');
2622: if ( position>0 ) then