Last approver of purchase requisition linked to workflow

Hi Guys,
Im writting a report to display retrospectively the usernames of the last approvers of a company's purchase requisitions for auditing purposes.
After searching the forum I found a way to do this:
1) use SAP_WAPI_WORKITEMS_TO_OBJECT to retrieve the Workitem Id of PR.
2) read table SWWWIHEAD with TOP WI_ID as the workitem id and WI_TYPE as W and WI_STAT not equal to Completed
3) use SWWWIHEAD-WI_ID from previous step in SAP_WAPI_WORKITEM_RECIPIENTS to get the recipients.
Does this sound right to you?
should not wi_stat be EQUAL to 'completed' instead?
why can I not just do  select wi_agent from SWWWIHEAD after getting wi_id from the first step?
Thanks in advance for your help.

after tracing SAP_WAPI_WORKITEMS_TO_OBJECT and SAP_WAPI_WORKITEM_RECIPIENTS I found a few tables but I dont know exactly what they are used for.
Could I maybe get the last approver from table SWWVEAGENT (AGENT_ID) coming from swiwiobjct like this:
  SELECT SINGLE wi_id
  INTO ls_wi_id
  FROM swiwiobjct
  WHERE
  objtype = 'BUS2105' AND
  objkey = l_objkey AND
  wi_stat = 'COMPLETED' AND
  wi_lan = 'E' AND
  wi_type = 'F'
  SELECT SINGLE wi_id
  INTO ls_wi_id
  FROM swwveagent
  WHERE
  wi_id = ls_wi_id

Similar Messages

  • Report - who is the current approver for purchase requisition

    Hi Experts
    Is there a report that can give information the status / who is the current approver for purchase requisition?
    currently if we open the PR directly, we can only know the release strategy, release code, status of approver, but we cannot have the information who is the person that should approve this PR.
    Thanks in advance
    Prashanth.v

    Hi All.
    Unfortunately we want to have this information for our end user, and they will not have the access to SE16.
    Another thinks is from CDHDR we will have the information if changes are made in PR. So it will give information user that already approve the PR
    What we want to have is a report of outstanding PR (not yet released) that have information who is the user (the user complete name / user id)  that should approve the PR.
    Thanks In Advance
    Prashanth.Venkategowda

  • Approval at purchase requisition level only

    Hi Experts,
    We want approval only at purchase requisition level and once PR is approved, PO should be created without any approval. I know we can make it happen by having release streategy at PR level and remove any release streatgy at PO level.
    Please let me know if this process is OK and if someone has done similar kind of approcah. Also please advise what things we should take care while taking this approach.
    Regards,
    KS

    It is actually a better business process to approve the purchase requisitions, but many businesses have a problem with this because historically managers manually signing the purchase order and want to replicate the legacy processes.  Typically the purchase requisition is approved as the maximum price that can be paid, the purchasing personal then convert to a purchase order for this value or less.
    You will need to take care of any restrictions that you wish to have on the purchasing personal when converting purchase requisitions, i.e. changing quantity, prices, fixed vendors, etc.

  • Is it possible Line level approval for purchasing requisition in AME?

    hi
    is it possible Line level approval for purchasing requisition  in AME?
    so that send each line to separate approver ?

    If using AME, it should be possible. Check AME Guide for POs for details. Let me know if you run into issues.
    Thanks
    Shree

  • Budget Approver for Purchase Requisition

    Hi,
    In MM setup for purchase requisition, 4 levels has been setup for approving based on amount. The person who will approve is configured to be determined based on user exit (value - 9) in TCode OMGQ.
    My question here is where is this user exit and how can we know to whom this PR will actually reach for approval.
    Please help me out.
    Regards,
    Binay Agarwal

    That you have to check in the Workflow settings based on the organization defined in PPOME
    User exit M06B0001
    you ca check the logic of user exit in SMOD
    enter the above user eixt and display the component logic

  • Purchase Requisition effacted by workflow?

    Hi,
    i have a taks of setting up purchase requisition release and then the workflow to complete the process.
    am i right in thinking that i setup the purchase req release part before I touch workflow?
    thats what iv been trying to do but the release isnt working and i thought, am I missing doing somthing in workflow ie. does SWU3 need to be configured before pur req release?
    Thanks in advance
    Liam

    I would suggest you to consult you functional consultant to set up release procedure first and once the release procedure is working fine start up with your workflow settings.

  • Deletion purchase requisition linked to sales orders

    Hi gurus,
    in my SAP system there are purchase requisition created by schedule line from sales orders. For different reasons the sales orders were deliveried and billed with stock free and not with customer stock.
    When I try delete de purchase requisition, because the sales order is completed, the system alarms a message that is not posible to delete in purchase requisition else in sales order. But the sales order is completed and we don't touch it.
    Any idea to delete this purchase requisitions?
    Thank you, I will revvard all answers..

    Hi Mancho ,
    Try to run the program BANF_OHNE_KDAUF in Transaction SE38 and delete the PR.
    The other way would be to change the item category in Sales Order - Line Item so that no PR is generated.But in this case i doubt whether system permits u to change the Item category as u had completed the subsequent process.Just check it.
    Unfortunately currently i am not at my system to check the same.
    Regards
    Ramesh Ch

  • Adding up a Custom Field Approver in Purchase Requisition

    Hi,
      Could anyone please let me know how to addup a custom field Approver to Purchase Requistion.
       Requesting you to list down the User enhancements that are available for PR Lineitems screen.
       The transaction used is ME51N.
    Regards,
    Ganga

    Hi,
    You can try this enhancement: MEREQ001
    The exits are:
    1)EXIT_SAPLMEREQ_001:-include name is ZXM02U01.
    2)EXIT_SAPLMEREQ_002:-include name is ZXM02U02.
    3)EXIT_SAPLMEREQ_003:-include name is ZXM02U03.
    4)EXIT_SAPLMEREQ_004:-include name is ZXM02U04.
    5)EXIT_SAPLMEREQ_005:-include name is ZXM02U05.
    6)EXIT_SAPLMEREQ_006:-include name is ZXM02U06.
    7)EXIT_SAPLMEREQ_007:-include name is ZXM02U07.
    8)EXIT_SAPLMEREQ_008:-include name is ZXM02U08.
    9)EXIT_SAPLMEREQ_009:-include name is ZXM02U09.
    10)EXIT_SAPLMEREQ_010:-include name is ZXM02U12.
    Regards,
    Viji

  • Purchase Requisition Link in Purchase Order

    Hi,
    I have created a PO using following method;
    PR >> Autocreate RFQ >> Copy RFQ to Quotation >> Copy Quotation to PO
    I need to know how to find the relevant PR number when I open the PO.
    Please help me find a solution.
    Thanks
    Jimm

    I tried what you have suggested;
    * PO was created in the long process (i.e. PR >> Autocreate RFQ >> Copy RFQ to Quotation >> Copy Quotation to PO)
    * "Navigation: Requisitions -> Requisition Summary >> Go to "Related Documents" tab and enter the Purchase Order number."
    The purchase order number is not accepted. It says 'Invalid value for field REATED_PO
    but when i search the same PO number from PO summary it opens.
    please help

  • Approver & approval date from Requisition & PO Approval workflow tables

    Dear All,
    My req is to create a report that calculates the lead time taken by a Purchase Requisition to be converted into a PO and released. In the output they want the APPROVER NAME, DATE APPROVED against the REQUISITION NUMBER (EBAN-BANFN) and also they want APPROVER NAME, DATE APPROVED against the Purchase Order (so all in all 2 fields of approvers & 2 fields of approval dates). But the thing is they want these APPROVER NAME, DATE APPROVED from the Requisition Approval Workflow tables.
    Please update the table & fields that will have the Approver and date approved from workflow corresponding to the Purchase Requisition Number and Purchase Order. or What is the link between the "Approver, approval date & Purchase Requisition Number" and "Approver, approval date & Purchase Order".
    Thanks in advance. The solution will be rewarded the points.
    Warm Regards,
    Farooq.

    We have HR/Payroll and Purchasing working fine for 6 years with the following schedule settings. 0.1 seems too frequent:
    A. Schedule one concurrent request to process deferred activities:
    1. Item Type :
    2. Min Threshold :
    3. Max Threshold :
    4. Process Deferred : Yes
    5. Process Timeout : No
    6. Process Stuck : No
    (Once every five minutes)
    B. Schedule one concurrent request to process timeout activities:
    1. Item Type :
    2. Min Threshold :
    3. Max Threshold :
    4. Process Deferred : No
    5. Process Timeout : Yes
    6. Process Stuck : No
    (Once every six hours)
    C. Run for stuck activities periodically
    1. Item Type :
    2. Min Threshold :
    3. Max Threshold :
    4. Process Deferred : No
    5. Process Timeout : No
    6. Process Stuck : Yes
    (Once every day)
    D. Run forall three activities periodically
    1. Item Type :
    2. Min Threshold :
    3. Max Threshold :
    4. Process Deferred : Yes
    5. Process Timeout : Yes
    6. Process Stuck : Yes
    (Once every day)
    By the way, we also have Synchronize WF Local Tables run once every 24 hours
    Hope this helps.
    Edited by: DBA115102 on Feb 1, 2011 10:41 AM

  • Get the approver for a purchase requisition

    Hello
    I am trying to retrieve who approved a purchase requisition. I have the PR number. Is there a bapi or FM returning this info. If not please let me know how to do that
    Thanks

    Hi Bobby,
    For example, PR 10002620
    (1) Browse table CDHDR (Change document header), specify:
    Change doc. Object = BANF
    Object value = PR number (remember to add first 2 zeros) i.e. 0010002620
    Transaction = ME54N (release manually) and/or ME55 (collective release)
    The result showing the user who has run transaction ME54N and/or ME55 for the PR, then user may be the approver of the PR. If multiple records found for a particular PR, it may be approve/reject several times.  You may only extract the latest record.
    (2) Because transaction ME54N can either approver or reject PR, it is necessary to further check table CDPOS (Change document items), specify:
    Change doc. Object = BANF
    Document number = <found in step (1)>
    Table Name = EBAN (Purchase Requisition)
    Field Name = FRGKZ (Release Indicator)
    In the result, if field FRGKZ (Release Indicator) changed from Old value 'X' (blocked) to New value '2' (PO creation allowed), we know that the user found in step (1) is the PR approver.
    Regards,
    Donald

  • UWL - how to approve purchase requisitions

    Hi experts,
    Can anyone tell me whats wrong with the xml code section below ?
    It is supposed to approve a purchase requisition by triggering an event called RELEASED,
    which is defined as a triggering event of TS90100067
    it seems object key is not delivered to R3, this is the message from tracing with SWEL
    Event Instance ID    14252057
    Object Type          BUS2009
    Object Key           null
    Event                RELEASED
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE UWLConfiguration PUBLIC '-//SAP//UWL1.0//EN' 'uwl_configuration.dtd' >
    <UWLConfiguration version="1.0">
         <ItemTypes>
              <ItemType name="uwl.task.webflow.TS90100067" connector="WebFlowConnector" defaultView="PurchaseApproval67" >
                   <ItemTypeCriteria  externalType="TS90100067" connector="WebFlowConnector"/>
                   <CustomAttributes>
                        <CustomAttributeSource id="ABAP_BOR" objectIdHolder="externalObjectId" objectType="BUS2009" cacheValidity="final">
                             <Attribute name="PRICEUNIT" type="string"     displayName="Price" />
                             <Attribute name="QUANTITYREQUESTED" type="string"     displayName="quantity" />
                             <Attribute name="VALUATIONPRICE" type="string"     displayName="total" />
                        </CustomAttributeSource>
                        <CustomAttributeSource id="WEBFLOW_CONTAINER" objectIdHolder="externalId" objectType="WebFlowContainer" cacheValidity="final">
                             <Attribute name="_WORKITEM" type="string" displayName="_WORKITEM"/>
                             <Attribute name="RELEASECODE" type="string" displayName="releaseCode" />
                        </CustomAttributeSource>
                        <CustomAttributeSource id="UM" objectIdHolder="creatorId" objectType="user"     cacheValidity="final">
                             <Attribute name="firstName" type="string" displayName="firstName"/>
                             <Attribute name="lastName" type="string" displayName="lastName"/>
                        </CustomAttributeSource>
                   </CustomAttributes>
                   <Actions>
                        <Action name="released" userDecision="yes" groupAction="yes" handler="TerminatingEventHandler">
                             <Properties>
                                  <Property name="eventName" value="RELEASED"/>
                                  <Property name="objectType" value="BUS2009"/>
                                  <Property name="objectId" value="${item.externalobjectid}"/>
                                  <Property name="RELEASECODE" value="${item.RELEASECODE}"/>
                             </Properties>
                             <Descriptions default="Release"/>
                        </Action>
                   </Actions>
              </ItemType>
         </ItemTypes>

    Hi,
    Here's what I did to add a custom task (SC approval) to my UWL :
    1. download standard UWL configuration file for SRM (com.sap.pct.srm.core.xml) and copy the file (com.sap.pct.srm.core.<CUSTOMER>.xml)
    2. find a standard task that looks like my custom task
    3. copy the ItemType block corresponding to the standard task and change the ItemType name
    4. upload the new configuration file : create a new configuration (com.sap.pct.srm.core.<CUSTOMER>) and make sure high priority is set
    For example, here's what I've added to my configuration file in order to handle a custom task (TS91000001) :
    <ItemType name="uwl.task.webflow.srm.TS91000001" connector="WebFlowConnector" defaultView="com.sap.pct.srm.core.view.tasks" defaultAction="com.sap.pct.srm.core.action.launchWD.WDCLFPOIF" executionMode="default">
          <ItemTypeCriteria externalType="TS91000001" connector="WebFlowConnector"/>
          <CustomAttributes>
            <CustomAttributeSource id="WEBFLOW_CONTAINER" objectIdHolder="externalId" objectType="WebflowContainer" cacheValidity="final">
              <Attribute name="WD_CONFIGID" type="string" displayName="Web Dynpro Application Configuration"/>
              <Attribute name="BOTYPE" type="string" displayName="Type of Business Object"/>
              <Attribute name="BOID" type="string" displayName="Business Object ID"/>
              <Attribute name="BOMODE" type="string" displayName="Business Object Mode"/>
            </CustomAttributeSource>
          </CustomAttributes>
          <Actions>
            <Action reference="com.sap.pct.srm.core.action.approve"/>
            <Action reference="com.sap.pct.srm.core.action.reject"/>
            <Action reference="com.sap.pct.srm.core.action.launchWD.WDCLFPOIF"/>
            <Action reference="com.sap.pct.srm.core.action.launchWD.print"/>
          </Actions>
        </ItemType>
    Hope it helps.
    Regards,
    Pierre

  • Purchase requisition release (WS00000038)

    Hi
    I'm, testing the workflow WS00000038 for liberate purchases requisition.
    The workflow run succesfully, when i liberate the purchase requisition, this follow the standard flow correctly and send the respective workitems (TS00007986, TS00008018 ), to the respectives actors.
    But in the case when i receive the request for liberate but reject the position, the workflow don't execute the TS00008014, negative conformation, the workflow, follow the alternative events (SIGNIFICATLYCHANGED), that finish the workflow, and don't send message to the initiator of workflow.
    I don't know why the workflow don't execute the standard task (TS00008014) when the event was triggered, in the transacción when i execute the reject of position.
    For your suggestions.
    Thanks

    Hi all,
    Here's the scenario: We are developing our workflow strategy for purchase reqs. We have several levels of approval based on Purchasing group,Rel code, amount, and so forth. My problem is when the first rel code is release PR and he has also able to release other .my question is if one rel code release a person does not authorised to release other . I am using standard workflow template like WS00000038.
    Is that possible? If so, please advice..
    Thanks in advance. Points will be given..

  • Purchase requisition status

    hi all
    On clicking the approval button (Purchase requisition )..submitted successfully but the status remains Incomplete .
    does anybody has an idea of this.

    Review Approval Setup and Document Types
    Essam Essmat

  • Enable attachement link in Purchase requisition approval WF

    Dears ,
    How to enable attachment link in purchase requisition approval wf ,??

    hi
    In the workflow, you need setup the agent assingment(i.e organizationlal roles)

Maybe you are looking for