Regarding the change status of leave workflow.

hi friends,
i have copied the standard leave worklfow "WS12300111" and customized it just to meet our requirement means for multiple approvers.
everything is working fine in production  means if user ID "AIHR01' raise a leave request the workitem will go to "AIHR02" after his approving the workitem will go to the final approver means "AIHR03" after his approval the leave request will be completed and the status in the TC - PTARQ is coming as "APPROVED" means only after the approving of "AIHR03" the status is coming "APPROVED" but in some cases when user id "AIHR02" is approved instead of coming status "SENT" it is coming "APPROVED"  in TC-PTARQ and because of this status the workitem is coming blank in UWL of "AIHR03".
I have already incorporated the given below method in the "WORKFLOW" just to change the status from "APPROVED"  to "SENT" after the approval of user ID "AIHR02" but in some cases it is not working fine it is giving BUG.
begin_method changestatus changing container.
DATA:request TYPE ptreq_header-request_id,
          wi_id TYPE swwwihead-wi_id.
DATA: request_instance TYPE REF TO if_pt_req_request,
           event   TYPE tim_req_xfer_event VALUE
           cl_pt_req_const=>c_reqtrans_send,
           ex_status TYPE tim_req_status,
           container_wi TYPE swcont OCCURS 0,
           agents TYPE STANDARD TABLE OF swhactor WITH HEADER LINE.
          swc_get_element container 'REQUEST' request.
          swc_get_element container 'Wi_id' wi_id.
DO.
  CALL FUNCTION 'ENQUEUE_EPTREQ'
   EXPORTING
    MODE_PTREQ_HEADER       = 'S'
    MANDT                   = SY-MANDT
     request_id              = request
    X_REQUEST_ID            = ' '
    _SCOPE                  = '2'
    _WAIT                   = ' '
    _COLLECT                = ' '
   EXCEPTIONS
     foreign_lock            = 1
      system_failure          = 2
      OTHERS                  = 3
    IF sy-subrc = 0.
      EXIT.
    ENDIF.
    WAIT UP TO 60 SECONDS.
  ENDDO.
  IF sy-subrc = 0.
    CALL METHOD ca_pt_req_header=>agent->get_request
      EXPORTING
        im_request_id     = request
      IMPORTING
        ex_request        = request_instance
      EXCEPTIONS
        request_not_found = 1
        OTHERS            = 2.
    IF sy-subrc = 0.
      CALL METHOD request_instance->initiate_state_trans
        EXPORTING
          im_transfer_event = event
           im_external_call  = 'X'
   im_ret_value      = 0
                 ex_new_status     = ex_status
   ex_ret_code       =
      swc_set_element container 'Ex_Status' ex_status.
    ENDIF.
    CALL FUNCTION 'DEQUEUE_EPTREQ'
     EXPORTING
  MODE_PTREQ_HEADER       = 'S'
  MANDT                   = SY-MANDT
       request_id              = request
  X_REQUEST_ID            = ' '
  _SCOPE                  = '3'
  _SYNCHRON               = ' '
  _COLLECT                = ' '
  ENDIF.
  swc_create_container container_wi.
  swc_set_element container_wi 'WI_ID' wi_id.
  agents-otype = 'US'.
  agents-objid = sy-uname.
  APPEND agents.
  CALL FUNCTION 'SWW_WI_START_SIMPLE'
    EXPORTING
      task                         = 'TS90000089'
      called_in_background         = 'X'
    TABLES
      agents                       = agents
      wi_container                 = container_wi
    EXCEPTIONS
      id_not_created               = 1
      read_failed                  = 2
      immediate_start_not_possible = 3
      execution_failed             = 4
      invalid_status               = 5
      OTHERS                       = 6.
  end_method.
Request you to plesase help me to solve this issue .why in some cases instead of coming status "SENT" it is coming "APPROVED"  after the approval of user id "AIHR02".
BECAUSE of the  "APPROVED" staus the same workitem is coming blank in the UWL OF "AIHR03".

solved by own

Similar Messages

  • HT4910 i have lost my icloud account password and i have tried a lot to get back my password through i forgot but i have not recieved any mail to my id regarding the change of password

    i have lost my icloud account password and i have tried a lot to get back my password through i forgot but i have not recieved any mail to my id regarding the change of password

    Check your spam mail. If you have more than one email address verified with that apple id that email will go to the rescue email.
    About the rescue email address
    http://support.apple.com/kb/HT5312

  • Regarding the Qm Status

    Hi,
    I have loaded data into an InfoCube. The Data is loaded successfully into the InfoCube and the Status in Monitoring tab is Greeen. Also the Tech Status under Manage tab is Green. But the Qm Status is Yellow. Also I am unable to display the data in BEx.
    I have refreshed several times and still the Qm Status is not changing to Green. In SM 37 it is showing that the job is finished.
    Now how to make the Qm status to Green and make the data available for Reporting....
    Regards
    YJ

    Jayanth,
    Please find effects of SettingQM Status Forcefully.
    1. aggregating the relevant InfoCubes ,         
    2. compressing the relevant InfoCubes  ,        
    3. activating relevant ODS Objects      ,       
    4 updating relevant ODS Objects          ,     
    5. query content of the relevant InfoCubes and ODS Objects.
    I hope you know how to assign points and close the issue.
    Thanks
    Ramu

  • How to Obseve the change status of the tree expander.

    Hi friends,
    I need to take some action on the change of the tree expander state. All I need is to know how can we get the notification of the change in the tree expander status.

    Hi rizwan haque,
    Try posting this question in the InDesign SDK forum--someone will probably be able to help you there.
    Thanks,
    Ole

  • Hi regarding the change of attribute 'forward_wi' to 'X'

    hi
    Any one please tell me how to set the 'forward_wi' attribute to 'X' when it is set as ' ' ,when i run the mail send program RSWUWFMLEC. Is there any Function module to change the attribute.

    Hi Saisri,
    Welcome.
    your question is not clear.even though i am providing some solution. i hopwe it may help u. if not reply me.
    FORWARD_WI
    Flag: Forward work item
    Example value: X
    Indicator: Specifies whether work items are to be forwarded as e-mails.
    RSWUWFMLEC selects work items and creates emails based on those work items.
    The emails are sent to the mail server by RSCONN01.
    If you are not getting any emails then either:
    Your variant/parameters for RSWUWFMLEC are incorrect
    Your user attribute settings are incorrect - i.e. there is no-one found
    with
    the attribute FORWARD_WI = 'X' and a valid EBP email address
    There have been no new work items in READY status created since the last
    job run
    You have no sender email address for the userid that executes RSWUWFMLEC
    RSCONN01 hasn't run since the last run of RSWUWFMLEC - I assume you've
    eliminated this issue.
    Running RSWUWFMLEC with the option Log = All will clarify if any of the
    other conditions are stopping you from getting the mails.
    If the mails are being created then you will see them in transaction SOST
    along with any messages if the send to mail server has failed, e.g. if the
    email addresses used are incorrect.
    If you want to set a common pattern to the email address for everyone then
    use transaction SO16.
    thanks
    karthik

  • Is it possible to have a Cron job in CPO to check the running status of a workflow

    Is it possible to have a Cron job in CPO to check every hour to see if a particular workflow is running, if not trigger it by creating a alert, if yes- autokill

    Hi Warren,
    We don't want our process to expire and also not to execute twice at once. We have a provisioning wrapper workflow which is triggered one time by an alert and it runs endlessly by creating an alert at the end of each instance triggering another instance of the same unless CPO hangs or goes to stand by mode. Since we belong to service team, we don't have any kind of access to CPO DB or logs, so that possibility is ruled out. Just checking for alternatives. 

  • Regarding the changing webservice dynamically

    i have a got scenario to invoke a webservice dynamically which is changing constantly.?

    What is changing? The endpoint? The wsdl? The operation?

  • Question regarding the change

    I am running Mountain Lion 10.8.2.
    I have been tinkering with modifying backup interval for Time Machine.  In order to do this I have been attempting to edit the com.apple.backupd-auto plist file.  To change it I have read that all that is required is to do the following.
    sudo defaults write /System/Library/Launch Daemons/com.apple.backupd-auto StartInterval -int 1800
    However there is no StartInterval in the plist file.  So how is the above write command supposed to work?
    Contents of the com.apple.backupd-auto is as follows
    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.apple.backupd-auto</string>
        <key>Disabled</key>
        <true/>
        <key>ProgramArguments</key>
        <array>
            <string>/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd- helper</string>
            <string>-auto</string>
        </array>
        <key>LaunchEvents</key>
        <dict>
            <key>com.apple.time</key>
            <dict>
                <key>Backup Interval</key>
                <dict>
                    <key>Interval</key>
                    <integer>3600</integer>
                    <key>MaintenanceWakeBehavior</key>
                    <string>Once</string>
                </dict>
            </dict>
        </dict>
        <key>RunAtLoad</key>
        <false/>
        <key>KeepAlive</key>
        <false/>
        <key>EnableTransactions</key>
        <true/>
    </dict>
    </plist>

    Yes. I am now and have been using it. I like my backups once a day at a specific time so I don't add too much to the backup drive. The redundancy isn't needed. Mostly I am testing Time Machine. It isn't my preferred backup tool.

  • Exit or Badi for controlling the change of user status in notification

    Hi,
    I want to check the current user status of notification while saving the notificaton. If the current user status satisifies particular situation, then the notification should be save else not.
    Is there any user exit or Badi which can be used to control the change of user status in notification.
    Thanks
    SUMIT

    Hi Pushpa,
    Thanks for the reply.
    the problem over here is that the BADi IQS0_STATUS_MAINTAIN only allows to disable the user status.
    the other function module STATUS_READ only fetches the data from JEST.
    whereas my problem is that i want to check on the changed status on the screen(which is not saved also).
    Appreciate your reply on the same.
    Thanks
    SUMIT

  • Changing overall staus of workflow

    Hi
    I want to change the overall staus of error workflow to complete. The workitem is of type 'F'. Please guide me how to set the overall status of error workflow to complete.
    Note : I have already used the following function modules, but not working:
    - SAP_WAPI_PUT_BACK_WORKITEM
    - SAP_WAPI_SET_WORKITEM_STATUS
    - SWWW_WI_ADMIN .
    Thanks in advance
    Rasheed

    HI
    I Dont think you can complete the workflows which are in error status. Only thing you can do it is logically delete them  using FM
    SWP_WORKFLOW_INSTANCE_COMPLETE
    Regards
    Sachin

  • BADI to track the use status update

    CRN 7.0,  I have requirement to call smartform when the user status of the item for the service quotation changes to complete. Is there any BADI to track the item user status?
    Thanks

    Hi,
    You can very well read the changed status in ORDER_SAVE by calling the FM CRM_ORDERADM_I_STATUS_READ_OW or CRM_ORDER_READ which gets u the statuses from the buffer and the already saved status can be read from the database.
    Hope it helps.
    Regards
    Sidd

  • ODS Activation Returns 0 records in the Change Log

    Hi All,
    I have question regarding the Change Log build after the ODS req has been activated.
    BW system - SAP NetWeaver BI 7.0 - Level 15
    Upon loading a delta request into the ODS and Activating, it adds no records to the change log table.But the active table gets correct records
    Checks I Did
    ODS -> Menu-> Environment -> Delete Change Log Data.
         No job scheduled or runing to delete the change log reqs (sm37)
    RSRV - Check the Status of the Generated Program of a Data Store Object
    ODS - reactivation to see if it works..
    ODS Manage - Auto Req Processing set Quality status, Activate DSO to Yes.
    The Activation Log shows at the end that they were no changed records added:
    Data pkgs 000001; Added records 0; Changed records 0; Deleted records 0                 
    Log for activation request ODSR_4APQQHKM459YNO7CIGCE0629U data package 000001...000001  
    Activation of records from DataStore object C_PUR_C sucessfully finished               
    U table for DataStore object C_PUR_C deleted successfully                              
    Job finished                                                                               
    Can anyone help on the above issue??
    Thanks
    Rao

    Hello Siggi,
    Referring to the previous post:
    I have a situation where few documents are not transferred to Change log during DSO Activation, though the After image values of these records are reflected in Active table.
    I have found one common pattern for those documents which are not recorded in Change Log.
    They have two pairs of After and Before image records.
    First Pair like this: Eg: Overall status as the only data field.
    Sales Doc     Overall Statuls   Recordmode
    1001             C                      X
    1001             A                      
    Second pair:
    1001            A                      X
    1001            C                     
    If we consolidate all these 4 records there seems to be no change for any data fields. Should I consider this as the standard behaviour while activating DSO - causing these records not to get recorded in change log?
    Or is there any SAP Note that can make sure the change log gets populated in such case.
    Hope my details are clear to you..
    - Varma

  • How to send a report for particular job chain every hour regarding the job

    Hi Gerben/Anton
    We are running one jobchain for all billing jobs . Is any chance is there to send a report automatically to certain pupils for every one hour regarding the job status(excel format ) .
    Coudl you please help on this it should be good if i get any reply on this .
    Thanks
    Ramkumar

    Hi Ram,
    I need your help on getting mail alert with  log file.
    here is how i have provide the parameter valure for job definition: system_mail_sent.
    Step1 with one job1 and step2 with one job1
    In step2 , i have included the job definition to send mail. with below parameter.
    Relative Job: Step 1, Job 1
    Job File: step 1, job 1: step 1/log.txt
    Please let me  know if the above method is correct or not.
    NOTE: mail server and from address are configured.
    Thanks,
    Karthik

  • Question over the appraisal status change

    Dear All,
    Our appraisal has ( following the flexible template ) has planning, mid year review and final phases. With in each main status we have sub status configured. Example - In the planning stage ( say in the month of February ) , employee add objectives, change weights etc and send to manager for approval. If manager approves, the document status will be changed from planning  to mid year status and employee's form is changed to the display mode ( so he cannot update objectives / weight etc)
    Then again in the mid year  status ( say a few months later - June ist ), the employee needs to review the appraisal, add or update the objectives etc and submit for manager approval.
    My issue is -  After the employee's appraisal form is changed to display only from planning to review status - How the employee's appraisal  form can be changed from a read only to change mode in the same status ? As it is necessary for employee to add/ update in the form.
    I am seeking the best approaches for the below as I am considering two options ( as mentioned below )
    1)   For the  mid year status  , I will configure a sub status ( called start mid year ) and attach a push button. The employee select the push button during the mid year  period ( say June 1st ) and this push button triggers the status change from Mid year to Mid Year / Start Mid year. We also plan to apply a custom implementation for  BADI for column access and badi  (HRHAP00_COL_ACCESS) will decide the access control for columns etc.
    2) The other approach I am considering is we are considering a workflow (INFO_APPRAISEE_CHANGE_REVIEW ) to notify th employee 7 days before the mid year review starts. Can this workflow trigger the status change or read the column access from the BADI (HRHAP00_COL_ACCESS) ?
    Any other simpler approaches ?
    I saw in the Process config ( tabs and process ) that we can define the phase with dates and status / substatus etc. Can this be useful for the above scenario. For eg. On June 1st when the mid year review start, can the status be changed  like from Mid year  to Mid Year / Start Mid year ?
    Please let me know . Greatly Appreciated!
    Aneez Hameed

    Hi Aneez, both options are great,   HRHAP00_COL_ACCESS is configurable at each sub-status, so you have many options.  You can have the manager "approve" at beginning of year, but keep it in "in planning" by having a 3rd sub-status.
    You can have the employee or manager have access to the pushbutton so that mid-term can start. 
    you can also do a workflow option where it is changed automatically, your option 2.
    the final option is the HR adminstrator can change the status, by doing a mass select in phap_admin and then they change to the status to move it to "in review" with all of your mid-term substatuses. 
    they key to making this work is the additional config that goes along with HRHAP00_COL_ACCESS.  here you will want to do define a Z table with the following columns:
    object id - your template ID
    role - which are the same roles values defined at your template - apee for apraisee
    template status - integer - represents status ID
    template sub-status - ID
    column id - FAPP, OBJO, etc..
    availability indicator (char) - here you will configure H, X etc... which the badi uses to know how to handle it. 
    best regards - michael

  • Authorization for changing the user status

    Hi all,
    I need to give authorization in such a way that after the initiator has creataed a DIR...:
    1. When it goes to the next approval, the person should be only able to change the user status and save.
        he should not be allowed to change anything else.
    I have tried using different authorization objects but none of them worked. Is there any tcode in DMS for just approving the DIR (changing it to next available user status), similar to release strategy. For ex ME29N for approval of PO (Purchase order) ?
    Thanks
    Anish

    Hi Anish,
    Based on your requirement, I would like to suggest to go by workflow to approve the document..
    With the help of workflow, you can approve the document in workflow inbox itself (workitem), no need to go to DIR, the status will get automatically change in the DIR.
    for this you have to use function mudule (set/get next status).
    you can do this by taking the help of Workflow consultant and abap.
    regards,
    nitin
    award point if useful

Maybe you are looking for

  • Get Date parameter from request

    hi all, i've a JSP in which there is a date field, in the JSP i'm declaring a date variable and use request.getParameter but the date variable store another date with time part while i want the entered date without time part...any help?

  • How can I set up purchase-to-order much the same as make-to-order

    Hi all, I apologise if this is posted in the wrong place but this is my first question that I couldn't answer by searching other posts/articles so I'm reaching out for some help and advice. In PP, you can use a planning strategy to execute a make-to-

  • Cannot Align text in cell

    Greetings, I am having issues when trying to format my spreadsheet.  First of all, I have "Wrap Text in Cell" option turned on.  So when I have text that can fit into the cell, its fine.  But when I have long text in the cell, it wraps the text in th

  • How to optimize this SQL?

    Hi All! For example I have to records from a table: Value1 Value2 Day_ID 000001 000002 20031211 000001 000002 20031219 You can see, that value 1 and 2 are the same in both records. Only Day_IDs are different. So I need to find a record with max(Day_I

  • Need to sync icloud and Outlook

    In my old PC computer in outlook -- I could make a change in a phone # for example -- hit refresh -- and the changes went into my iPhone and ipad -- need to do this on my NEW computer -- how do I get icloud into my Outlook?