2 level approval for workflow

Hi all,
I am supposed to make an EP workflow for 2 level approval for absences or leaves. I am using a copy of workflow WS12300111. I am able to get the single level of approval, but not the second level. When the request goes to the second approver ( which is the supervisor of first approvar), it shows the leave requests of the first approvar and when I check the workplace of the employee who applied for the leave, his leave has the status 'approved'.
In other words, when the first supervisor or approvar approves the request, it gets approved and second approvar has no option to approve it again.  Please suggest what to do?
In my tasks for approval, I am using the class - CL_PT_REQ_WF_ATTRIBS and the method APPROVE. Is that correct???
Is there any other standard workflow which I can refer to?
Thanks

Dear Raja Sekhar,
I create a sampel program with the following code in SE38 and put in the following code. However, it seem that it does not work and the status did not get updated.
Do you know what is the problem?
DATA:
request TYPE REF TO if_pt_req_request,
event   TYPE tim_req_xfer_event VALUE cl_pt_req_const=>C_REQTRANS_APPROVE,
req_id  TYPE PTREQ_HEADER-REQUEST_ID value '48561480F033007EE1008000C0A8D282',
status  type TIM_REQ_STATUS.
CALL FUNCTION 'ENQUEUE_EPTREQ'
  EXPORTING
    mode_ptreq_header = 'E'
    request_id        = req_id
  EXCEPTIONS
    foreign_lock      = 1
    system_failure    = 2
    OTHERS            = 3.
CALL METHOD ca_pt_req_header=>agent->get_request
  EXPORTING
    im_request_id = req_id
  IMPORTING
    ex_request    = request.
CALL METHOD request->initiate_state_transition
  EXPORTING
    im_transfer_event    = event
   im_event      = event
   IM_RET_VALUE  = 0
  IMPORTING
    ex_new_status = status.
CALL FUNCTION 'DEQUEUE_EPTREQ'
  EXPORTING
    request_id = req_id.
Thanks
Regards,
Bryan

Similar Messages

  • N level-Approval for contract workflow (WS14000148) in SRM

    Hi SDN'rs
                  I want to activate N level-Approval for contract workflow (WS14000148) in SRM  
    When I am creating the contract in SRM I can see the approvers in the approval preview.
    But when I release the contract and look at the approval privew there are no approvers
    and the status of the contract is released.
    We are on SRM Server 5.5 and SP 07.
    Here what I did
    1. I implemented the BADI 'BBP_WFL_APPROV_BADI' using the sample implementation and populated the approvers.
    2. I activated events SAVED,CHANGEVERSIONSAVED for WS14000148 in OOCU transaction.
    3. I see event linkages for WS14000148 for both events SAVED,CHANGEVERSIONSAVED in SWE2 transaction.
    4. I assigned role SAP_EC_BBP_PURCHASER to for subworkflow N step for contract WS14000147.
        ( User who is creating contract has this role)
    5. Consistency check for WS14000148 is green and WS14000147 is yellow in SWUD
    6. Event simulation for BUS2000113 and events SAVED,CHANGEVERSIONSAVED shows WS14000148 successfully started.
    I see dump in ST22 with errors TSV_TNEW_PAGE_ALLOC_FAILED and SYSTEM_NO_SHM_MEMORY with WF-BATCH is this any thing to do with that?
    If any one know what are the steps I am missing please let me know.
    Thanks
    A S

    Hi
    Please refer to these OSS notes which might help.
    <u>Refer to following OSS Notes -></u>
    Note 735026 - Memory problems at BBP_GETLIST_INDEX_FILL
    Note 932836 - BBP_GETLIST_INDEX_FILL: Activation not possible
    879528 WS14000148: Send mail to initiator incorrect
    901200 WS14000148 dia wrk item despite NO_FURTHER_APPROVAL_NEEDED=X
    879873 BUS2000113: The Object_ID attribute may be empty
    903015 BAdI Workflows: Events and parallel steps
    901068 BAdI Workflows: Enhancement of Note 896556
    769458 Dynamic workflows: No adjustment after document change
    972757 Occurence of the SYSTEM_NO_SHM_MEMORY runtime error
    741864 FinBasis: Termination TSV_TNEW_PAGE_ALLOC_FAILED
    864473 Deactivating the shared memory when searching by prefix
    928642 Container factory: Shared memory dump update
    Refer to these links.
    <b>http://help.sap.com/saphelp_srm50/helpdata/en/2c/e68d406b305537e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/26/0f8b41ed891609e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/6b/eca441eea7ef0be10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/f7/a6a3415e34b05fe10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/6b/eca441eea7ef0be10000000a1550b0/frameset.htm
    </b>
    <u>Also raise an OSS message with SAP as well.</u>
    Regards
    - Atul

  • How to Implement N-Level Approval for Bid,Live Auction,PO,Contract ?

    Hi Experts,
                  I am new to SRM 5.0. My requirement is how to implement N-Level Approval for Bid, Auction, PO and Contract? Which steps should I follow for        N-Level Approval? Can any one send me sample code and name of BADI where I have to implement the code.
    Abhijeet Panse

    Hi
    Please check for <b>BBP_WFL_APPROV_BADI</b> using SE18 transaction for relevant Code as well and standard SAP documentation.
    Related sample code and other useful pointers ->
    WS14500015 is not working for Multilevel approval
    Re: SRM / Shipping cart
    Re: N Step Approval BADI - BBP_WFL_APPROV_BADI
    Re: N-step BADI workflow
    http://help.sap.com/saphelp_srm50/helpdata/en/8b/4fa9585db211d2b404006094b92d37/content.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/2c/e68d406b305537e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/17/40a86c773d6c41801d78af1a34b90f/frameset.htm
    Multiple Implementation For BBP_WFL_APPROV_BADI
    Re: Help needed on N-Step Approval WFL for SC
    Re: N-Step 14000109 workflow - Unable to identify Approvers
    Do let me know.
    Regards
    - Atul

  • 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

  • N Level approval custom workflow

    Hi, I have a requirement to implement N-Level approval custom workflow.
    I am aware that there is standard SRM N-Level approval but I need a customized one.
    Could you please provide any documentation/inputs on this.
    Regards,
    Prasad

    Hello,
    Documentation on how to implement an N-level approval workflow? That's very generic; just what are you expecting?
    What have you tried?
    Make a workflow with a loop that checks if any further approval is needed.
    regards
    Rick Bakker
    hanabi technology

  • Multiple level approval for overall PR release

    Hi all
    is there a template for multiple level approval for overall PR release  ?
    is there some alternative  if there is no template ?
    thanks in advance .
    Naval Bhatt

    Hi NB,
    there is no std template for multiple approvers for PR release.
    Create a copy of std template and implement ur logic to it.
    Aditya

  • Determining second level approver for travel expense claim workflow

    Hi Experts...
    In Travel Expense claim workflow,we are using two level Approval.The employee has to enter his data for expense claim through ESS..Then expense claim is submitted and sent via workflow to the Travel department. Travel Dept verifies the expenses against the bill and approves the claim by selecting the next level approver and attaching the scanned copies of the bill.
    I made copy from the standard workflow WS20000040.
    How can i select the next level appover in first level approval step???
    Is there any FM or BAPI or BADI???
    Please help me ...
    Thanks in Advance
    Regards,
    Hemalatha.

    Hi Hemalatha,
    I have small tricky workaround to find out the second level of approver.The Standard Rule available can reused again by passing manager's Position.i.e
    After first level completed , store manager position in container variable and pass it to the same task rule so the task is sent to the manager's approver .
    Message me if needed more details.
    **Award Points if useful

  • Workflow issue : N step Item level approval for SC

    Hello Friends,
    We are working on SRM 4.0 , classic scenario , SP11.
    Here we are facing a typical issue in workflow. We are using Nstep approval for SC.
    In the standard task TS14508044, the work item text is "Approval of SC ".The shopping cart value is being populated by container element &amp;APPOBJ.OBJECTTOAPPROVE.TOTALVALUESTRING&amp;
    This same container element is used to populate the shopping cart value in the task description. However what we observe is that in the workflow log, the container element APPOBJ is initial.
    How is the total value of the shopping cart populated then?
    Also, the value of the shopping cart in the work item text and the work item description is in different currency format.
    The shoppng cart value in the work item text is in the format 12,34,567.89 whereas that in the description is in the format
    12.934.567,8
    Appreciate your inputs on this.

    Thanks Masa,
    For your valuable suggestion. Now after changing the WF-BATCH settings there is consistency in the currency format.
    Now the question is how we can change into the currency format of the user ?
    The user format is 1,234,567. 89 but still work item text and
    description is in 1.234.567, 89 format.
    Thank you

  • Line Item Level Approval For SC-SRM7.02

    Hi Experts,
    I am working on the line item level approval based on cost center. can some one help me in achieving this?
    i have few doubts regarding this
    1) we are using application controlled workflow is it feasible to achieve this functionality ?
    2) will separate PO will be created for each line item?.
    some pointer would be really helpful.

    Hi Mano,
    1. Yes, but would suggest to use new process controlled workflow.
    2. No, Cost center is not a split criteria for PO creation. Of course you can overwrite it with ABAP.
    Regards
    Konstantin

  • Two level approval in workflows

    Dear All,
    I am making a workflow which trigger when the Maintenance Order get RELEASED, the functionality of the workflow is as follows :-
    1. A recipient should get workflow in his/her SAP inbox for Approval or Rejection of maint.  Order. release.
    2. When  he approves then the maint. Order should go to Second Recipient for firther Approval.
    3. After the second approval the workflow Initiator get the main that his request has been  approved.
    4. At any point if the approver rejects his Request the application should get back to Workflow Initiator.
    Now my first problem is that how can i make the logic for the two level approval.
    What i have done is that i have taken one decision Step with the Outcomes
    Approve
    Reject
    On the approve outcome i have added another Decision Step for second approval but htis is not working.
    My Second Problem is how can i know that the request has been approved or not. Is there any status Field from where i can know that the request has been approved or not so that i can use condition step.
    Please help as i m struck beacause of these two problems.
    Thanks!!!!

    > On the approve outcome i have added another Decision Step for second approval but htis is not working.
    >
    Up until this point I was very happy with your explanation, it was thorough, and included the functional need. However, it is quite important to know <u>how</u> 'it is not working'. Are you getting an error when you try to activate the workflow? Is the workflow going to ERROR status during runtime after the first approver has approved? Is there perhaps an error message? Someone might recognize that error message and say 'yes, I had this problem once, and here's how you fix it'.

  • Line Item Level Approval For SC-SRM7.02-WS14500015

    Hi Expert,
    I am using workflow template WS14500015 for line item level approval.i have few doubts on this
    i am using cost center based approval, so if the 1st line item is approved will it generate a PO or will it wait for the entire shopping cart to be approved.

    Hi Mano,
    Are you using application controlled workflow or process controlled workflow?
    For process controlled workflow you can refer to the SRM 7.0 Workflow guide:
    https://websmp108.sap-ag.de/instguides > sap business suite and applications> SRM 7.0 > Workflow Guide - SAP SRM 7.0 and Configuration guide.
    Page 16, Approval Processes in SAP SRM; you will understand possibilities of SRM 7.0 process controlled workflow and then decide which one you need.
    Also refer to 7 Appendix B: Approver Determination Strategies in the Standard
    This has few example classes/BADI implementation for agent determination which you can refer to.
    Regards,
    Ashish

  • Line Item level Approval for Shopping cart

    Hi Expert,
    I am using workflow template WS14500015 for line item level approval.i have few doubts on this
    i am using cost center based approval, so if the 1st line item is approved will it generate a PO or will it wait for all the line items approval.

    Hi Mano,
    if you use approval. It will be approved by steps. Next step will not be started until previous completely done. In your case 1st Item should wait until all other items processed.
    Regards
    Konstantin

  • Need multi level approval for Leave request workflow in ESS

    Hi All,
    Our requirement is for 5 levels of approvals for the leave request raised in ESS  means After employee raises leave request ,it has to be approved by 5 managers one after the other. In standard system only 1 level of workflow and approval  is available so please anybody suggest the solution . Thanks in advance.

    in addition to the above content your workflow consultatn have to create this ask him to
    refer this document
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMDEMO/BCBMTWFMDEMO.pdf
    for multiple level of aproving the leave reqest and  and orgstructure have to be well formed
    ravindra

  • How to retrieve comments from one OfficeTask activity and use them in another OfficeTask activity for Multi level Approval sequential Workflow

    I'm designing a sequential site workflow using Visual Studio 2010 for Project Server 2010. In my case, I have following 6 stages in the workflow:
    1. InitialProposal Stage
    2. Approval Stage1 -- Needs approval from Approver Project Security Group Members1
    3. Rejection Stage
    4. Approval Stage2 -- Needs approval from Approver Project Security Group Members 2
    5. Execution Stage
    6. Completed Stage
    Requirement is workflow should move to Approval stage2 from Approval stage1  if approved by all members of Approver Project Security Group1and it should move to Rejection Stage even if a single member rejects it.
    Workflow should move from Approval Stage2 to Execution Stage if approved by all members of Approver Project Security Group2 and it should move back to Approval Stage1 on rejection by a single member of the group.
    I'm using inbuilt PSWApproval content type and OfficeTask activity for creating approval task for the group members at both stages.
    On task rejected in Approval stage2, task will be assigned again to Approval Stage1 and I want to show comments given by members of Approver Project Security Group2 to the members of Approver Project Security Group1 with this assigned task
    but I'm not able to retrieve comments from officeTask activity.
    My question is where exactly these comments are saved? how can we retrieve them and use them in another officetask activity? If this is not possible then what is the possible solution for meeting above mentioned business requirement?

    Hi Paul,
    Thanks for your suggestion.
    By comments field I'm assuming OfficeTask.Comments field. Problem is, this field is always null. I tried accessing this field in CheckExitCondition activity as well as in OnTaskCompleted but in both the cases, it was null only(I wrote comments while approving
    the task).
    I used a code activity within OnTaskCompleted activity and following code for accessing Comments and Description fields:
    public string officeComments;
            public string officeDescription;
            private void TaskCOmplete(object sender, EventArgs e)
                CodeActivity Sender = (CodeActivity)sender;
                Microsoft.Office.Workflow.Actions.OfficeTask ofctask1 = ((CompositeActivity)Sender.Parent).Parent as Microsoft.Office.Workflow.Actions.OfficeTask;
                officeComments = ofctask1.Comments;
                officeDescription = ofctask1.Description;          
    Please tell me if I'm doing anything wrong here, I'm very new to Workflows. Also, do I need to set any specific property of officeTask for retriving comments?
    Thank you

  • Line level approval for Vouchers ?

    Hello,
    Can someone tell me whether it is possible to have vouchers approved by Line. Meaning different approvers for different voucher lines?
    If yes, where can I find how to do it?
    I tried adding the Line Level in the Transaction registery for the process ID VoucherApproval and I could select 'Line' in in my approval process setup but I always get the message 'No approval required'...
    Regards,
    Stijn

    Hi Mano,
    if you use approval. It will be approved by steps. Next step will not be started until previous completely done. In your case 1st Item should wait until all other items processed.
    Regards
    Konstantin

Maybe you are looking for

  • HTTP_TRANSMISSION_ERROR in XI Messaging System

    Hi again, Just to give a backgrouond, I'm currently running into issues when we try to send data from an Enterprise Portal (GGX) box to XI via J2EE MEssaging System we're receiving this error: Message ID  7e203580-501c-11de-a4ea-001560deb814  RefToMs

  • Same variant for different value in enumerations

    Hello. Is it a bug? I have this type in my schema: <xs:simpleType name="VolumeUnit"> <xs:restriction base="xs:string"> <xs:enumeration value="ml"></xs:enumeration> <xs:enumeration value="µl"></xs:enumeration> </xs:restriction> </xs:simpleType> In th

  • Multiple accounts command line

    Hello, When I started using thunderbird, the loading time of thunderbird was fast. Currently I have 12 email accounts and now when I start thunderbird it takes almost a minute before thunderbird is fully loaded. My question: Is it possible to create

  • InfoSpoke error: Table could not be removed

    Delta enabled InfoSpoke Destination is table Delete Table Before Extraction is checked Technical Key is checked Extraction happens in a process chain This has worked in the past, but failed today with the following error: /BIC/OHZIS_FII81 could not b

  • Addressing individuals in a group email?

    Hi, Is it possilbe to address individuals by first name when sending a mass email to a group through Mac Mail?  Thank you.