1 Reply Latest reply on Jun 1, 2010 3:56 PM by Karthik Gopaluni

    PR/PO

    makdutakdu
      hi

      i have details from po_action_history as follows
      for eg
      object_id action_date action_code employee_id
      4078 8/17/2008 10:18 am submit 1132
      4078 8/17/2008 10:18 am forward 1132
      4078 8/18/2008 09:15 am approve 65------supervisor
      4078 8/19/2008 10:03 am approve 45-----manager
      4078 8/19/2008 10:10 am approve 73-----inventory person
      
      my issue is for every PR/PO how do i pick the approve action only by manager as need this info to calculate the days involved from PR approve(manger/dept.head) to PO submit action 
      
      can someone please guide as to how the approve by manager can be picked 
      
      somecases it can be like this too
      
      object_id action_date action_code employee_id
      4078 8/17/2008 10:18 am submit 1132
      4078 8/17/2008 10:18 am forward 1132
      4078 8/18/2008 09:15 am approve 65------supervisor
      4078 8/19/2008 10:03 am approve 45-----manager
      4078 8/19/2008 10:10 am forward 73-----inventory person
      4078 8/20/2008 08:15 am approve 67 -----MD(manging director)
      4078 8/20/2008 08:30 am approve 73------inventoy person
      in both cases i require the approve action by manager only

      kindly help me

      Edited by: makdutakdu on May 31, 2010 9:28 AM
        • 1. Re: PR/PO
          Karthik Gopaluni
          Hi,

          You can join the WF notifications table with the PO/PR tables and see the data.
          Sample query

          select poh.segment1, wfn.*
          from apps.WF_NOTIFICATIONS wfn, apps.po_headers_all poh
          WHERE MESSAGE_TYPE = 'POAPPRV'
          and wfn.ITEM_KEY = poh.WF_ITEM_KEY
          and poh.WF_ITEM_TYPE ='POAPPRV'
          and poh.ORG_ID = :ORG_ID
          and wfn.RECIPIENT_ROLE in ('username1','username2');

          You can know your PO approval work flow name and WF item type and plug it in here and the RECIPIENT_ROLE has the manager user names (if you want multiple managers approval actions).

          Hope this helps.

          Thanks
          Karthik.
          1 person found this helpful