Service Requests-Business days when year changes

Hi All,
I am trying to calculate for how long a SR has been open in business days only.
I have successfully used Mike Lairson's formula for the last 9 months but it seems it cannot cope with year changes. If the begin data is in 2009 and the end date in 2010, the results are not correct anymore.
E.G. For an SR that was opened on 12/30/2009 and closed on 01/05/2010 should return 5 business days but it is actually returning 110.
The syntax that I used so far is:
(CASE
/* Convert Sunday to the Business Day Of the Year */
WHEN DAYOFWEEK("Service Request"."Closed Date and Time") = 1
THEN (DAYOFYEAR("Service Request"."Closed Date and Time") - WEEK("Service Request"."Closed Date and Time")) -
(WEEK("Service Request"."Closed Date and Time") - 2)
/* Convert Saturday to the Business Day Of the Year */
WHEN DAYOFWEEK("Service Request"."Closed Date and Time") = 7
THEN (DAYOFYEAR("Service Request"."Closed Date and Time") - WEEK("Service Request"."Closed Date and Time")) -
(WEEK("Service Request"."Closed Date and Time") - 1)
/* Convert Mon-Fri to the Business Day Of the Year */
ELSE (DAYOFYEAR("Service Request"."Closed Date and Time") -
WEEK("Service Request"."Closed Date and Time")) +
(2 - WEEK("Service Request"."Closed Date and Time")) END)
(CASE
/* Convert Sunday to the Business Day Of the Year */
WHEN DAYOFWEEK("Service Request"."Opened Date") = 1
THEN (DAYOFYEAR("Service Request"."Opened Date") -
WEEK("Service Request"."Opened Date")) -
(WEEK("Service Request"."Opened Date") - 2)
/* Convert Saturday to the Business Day Of the Year */
WHEN DAYOFWEEK("Service Request"."Opened Date") = 7
THEN (DAYOFYEAR("Service Request"."Opened Date") -
WEEK("Service Request"."Opened Date")) -
(WEEK("Service Request"."Opened Date") - 1)
/* Convert Mon-Fri to the Business Day Of the Year */
ELSE (DAYOFYEAR("Service Request"."Opened Date") -
WEEK("Service Request"."Opened Date")) +
(2 - WEEK("Service Request"."Opened Date"))
END)
+
/* Adjust for Year Change */
(365 * (YEAR("Service Request"."Closed Date and Time") -
YEAR("Service Request"."Opened Date")))
Any ideea or hint would be highly appreciated.
Thank you.
Regards,
Dorin
Edited by: user805960 on 06.01.2010 07:07

Hi,
i used this formula to find out the days it calculates between 31/12/2009 and 01/01/2010, the result it gave was 106 days.
So i subtracted 106 from 365 days (365-106=259)in the formula, the formula is now giving the correct values.
I think we have to add the total working days and not the no.of days in a year.
Please can you all reconfirm the results.
Thanks
Neena
Edited by: NNK on Jan 11, 2010 3:16 PM

Similar Messages

  • Display Service Request Detail screen when saving a Service Request

    I have created a weblink that creates a new service request with the Contact field already populated.
    Is it possible to stop the application from returning to the contact detail page when I save the Service Request. Ideally I would like to display the service request detail page when I save a service request.
    Thanks.

    The first button option is useful if the table to maintain is a "Customizing" type, and you need to transport easily its values. If the table is of type "Master Data" or even "Transactional data" then  the data has not to be copied between environments.
    Sample :
    T001 - Customizing => Transport requests
    MAR - Master Data => No transport
    I think that your table as no client "MANDT" fields, so the program asked for a "workbench" request and not a "Customizing" one.
    Regards

  • Service Request - Working Days

    Hi All,
    Has anyone tried to factor Working Days into their SLA's through analytics reporting?
    For example, a Service Request is raised on Friday and I would like the number of days to close that service request to exclude Saturday and Sunday? Obviously there is no working days calender in CRM On Demand so i'm just going to ignore bank holidays etc for now. Just wondered whether anyone had experience/recommendations with this?
    Thanks
    Oli @ Innoveer

    Oliver,
    While i have not completed anything around this i have extracted the following out of the CRM-On Demand Reporting book that might help.
    Calculating Differences in Business Days
    A common request for date calculations in reports is to determine the number of business days
    between two dates. Answers On Demand does not contain any functions of variables that identify
    business versus non-business days. The following sample code calculates the business day
    difference between open and close dates on service request records. I have included comments
    in the formula that explain what each portion of the formula does.
    (CASE
    /* Convert Sunday to the Business Day Of the Year */
    WHEN DAYOFWEEK("Service Request"."Closed Date and Time") = 1
    THEN (DAYOFYEAR("Service Request"."Closed Date and Time") -
    WEEK("Service Request"."Closed Date and Time")) -
    (WEEK("Service Request"."Closed Date and Time") - 2)
    /* Convert Saturday to the Business Day Of the Year */
    WHEN DAYOFWEEK("Service Request"."Closed Date and Time") = 7
    THEN (DAYOFYEAR("Service Request"."Closed Date and Time") -
    WEEK("Service Request"."Closed Date and Time")) -
    (WEEK("Service Request"."Closed Date and Time") - 1)
    /* Convert Mon-Fri to the Business Day Of the Year */
    ELSE (DAYOFYEAR("Service Request"."Closed Date and Time") -
    WEEK("Service Request"."Closed Date and Time")) +
    (2 - WEEK("Service Request"."Closed Date and Time")) END) -
    (CASE
    /* Convert Sunday to the Business Day Of the Year */
    WHEN DAYOFWEEK("Service Request"."Opened Date") = 1
    THEN (DAYOFYEAR("Service Request"."Opened Date") -
    WEEK("Service Request"."Opened Date")) -
    (WEEK("Service Request"."Opened Date") - 2)
    /* Convert Saturday to the Business Day Of the Year */
    WHEN DAYOFWEEK("Service Request"."Opened Date") = 7
    THEN (DAYOFYEAR("Service Request"."Opened Date") -
    WEEK("Service Request"."Opened Date")) -
    (WEEK("Service Request"."Opened Date") - 1)
    /* Convert Mon-Fri to the Business Day Of the Year */
    ELSE (DAYOFYEAR("Service Request"."Opened Date") -
    WEEK("Service Request"."Opened Date")) +
    (2 - WEEK("Service Request"."Opened Date")) END) +
    /* Adjust for Year Change */
    (365 * (YEAR("Service Request"."Closed Date and Time") -
    YEAR("Service Request"."Opened Date")))
    This wont come out as it should so see my profile and send me a email and i will pass this on.

  • Service request become comleted when the activity be comleted

    hello i have strange behavior when any activity either MA or RA that part of Service request become completed the all service request be completed as well and this will be done automatically.
    any advice
    Ahmed Ali

    Like Andreas said, but to rephrase it. By design, you complete SRs by completing all activities that the SR is inked to. So if you only have 1 RA or 1 MA in your SR and you complete the activity, within 30 sec or so, the SR will be completed.
    You need to design your SRs with activities to fit your workflows for that particular type of SR, for example start with a RA and then one MA, sometimes you might need 3 MAs if the activities are to be completed by different staff members.
    But in the end, when all activities are completed, the SR will be considered completed. 
    If you want, you should be able to add an activity to the individual old SR, this will revert the particular SR back to In Progress after about 30 seconds after adding it.

  • Internal service request only supported when object exists

    Hi SDN,
    I am working on Work Environment in ESS. I am getting following exception when click on Request Repair, Request Change and Report Loss buttons.
    How to resolve this. Please provide me solution.
    regards,
    Sree.

    Hello Siddharth and Lukas,
    I have been facing this same issue for a while now and I tried it using content admin and using a user with sap_all and sap_new profiles, but, still the same issue persists.
    Do you think this could be a business issue? And if yes, how can it be fixed? Where do I start?
    And no trace of the error on NWA or st22. Your help is appreciated.
    Regards,
    Motaz

  • (1) One Business day or year?

    Hey Ombudsman.
    I'm disappointed with the service from Apple to developers in Brazil.
    In early August, I filled in the forms of the program and paid the license fee.
    Every day, I asked about my status and I had no answers.
    When the site broke, I waited .. but now still unanswered. I am expecting return.
    sorry to post here. but I've tried all ways to connect
    Follow-Ups: 281454393
    Follow-Ups: 280615918
    Follow-Up: 284143667
    Follow-Up: 284143516
    Follow-Up: 284539752

    Sorry... but... what should I do?

  • Milestone Error when changing the status of service request.

    Hi Expert.
    I got an issue where service request is displayed with an error "Item 10: Start and end dates must be identical for a milestone date".
    I took around 200 service requests and observed that in the change history, the response profile of the contract was changed. We also observed that whenever service request contain these errors, automatic change of status is not happening.
    Unfortunately I'm not able to reproduce this error in Quality system.
    Kindly advice on how these errors can be resolved and how these can be reproduced.
    Thanks in advance.

    You can ave a runitme event or workflow triggered that can generate such behavior.
    First increase logging on your object manager (evtloglvl :) ) and look at any error message.
    Second assess with your development team what automation has been setup ranging from script, Business Services, workflow to assist you in troubleshooting.
    Best Regards
    Evtloglvl

  • Alert to IC Agent when the status for the service request is changed

    HI,
       When a Service request status is changed to completed immediately the ic Agent should receive an Alert so that he can call the customer for survey. If he has not taken any action then the alert should be available in his inbox and an Alert should be sent to his manager that the Ic Agent has not done the survey.
    With Regards,
    Selvam T

    Hi,
    You may try in the service request action profile, when the status is set 'completed' then trigger the alert.
    For this you have to first configure the alert.
    Thanks,
    Pandu

  • Changing the service request owner

    Hello guys,
    Our client is using Siebel eServices and would like to have an e-mail sent to him if a service request status (Assigned QA) has not been changed for a period of time. The e-mail would be sent to the manager and the agent who is assigned to that service request. The e-mail would contain a message saying that the service request status has not been changed. Then the manager would either notify the agent of the assigned service request or reassign the service request to another agent.
    1- Is this possible in Siebel eServices?
    2- If so how can it be done?
    Thank you for your help

    Hi,
    You can trying using Books of Business.
    Create a book and add that particular user to that book and at the time of task creation, through a workflow you can assign it to the corresponding book.
    This might resolve the access issue you are facing.
    hope it helps,
    Mayank

  • Activity Templates inside Service Request Templates

    I have run into a problem and I was hoping there is an easy solution.
    I have built Activity Templates for Access Requests, one template per application.
    Then I have Service Requests for per Job Code, which include up to 20 of those Activity Templates.
    I did it this way specifically so if an Application Access process changed, I could just edit the Activity Template for that Application, and all the Service Requests that use that template would update as well.... or so you would think.
    I just had to change some, and my service request is still showing the old templates, not the esits I did. I waited over an hour. Is this a workflow problem, or a functionality problem? If the Service Request Template saves when created instead of pullign
    the activity templates each time its opened, it defeats my purpose of trying to do this modularly. This also makes absolutely no sense to me either, if that is in effect how it works.
    What that will mean is I will have to edit every service request that uses a specific activity, instead of just that activity template.

    Activity templates do not cascade. When you add an activity template to a Service Request, SCSM creates a copy of the activity template _inside_ the SR template. That's where they diverge.
    Any further changes to the original activity template will not be replicated to any SRs that contain that activity.
    I'm sorry to say that's the way SCSM's template management was implemented.

  • Executing workflow when Date Changes in CRM 2011

    Hi,
    I want to execute workflow and get count of all records when year changes . For example if year changes from 2015 to 2016 then workflow should automatically trigger and get count of all system users in CRM. I can do same thing using .NET batch job and putting
    it into window schedular. But i want to achieve same thing in workflow , is it possible?
    Thanks,
    Abhishek
    Abhishek

    Hello,
    To calculate anything you will have to write code. But for periodical execution you can use workflows -
    http://gonzaloruizcrm.blogspot.com/2011/05/quite-often-we-have-business-process.html
    Dynamics CRM MVP/ Technical Evangelist at
    SlickData LLC
    My blog

  • Warning message into Application log of Service request

    Hi Experts,
    I have a requirement where I am using Event handlers(CRMV_EVENT) to redetermine partners of a service request whenever certain values are changed in the transaction CRMD_ORDER.
    Partners will be retrieved from a custom table.
    In any circumstances, if the partners cannot be determined then we need to push a WARNING message stating that "Partners can not be determined, pls maintain the values in the custom table'.
    For this purpose I am using the function module CRM_MESSAGE_COLLECT with the following parameters, but still I am not able to see the same into the Application log of the Service request that is going to be created.
    CALL FUNCTION 'CRM_MESSAGE_COLLECT'
      EXPORTING
        iv_caller_name         = 'ORDERADM_H'
        IV_REF_OBJECT          = iv_header_guid
        IV_REF_KIND            = 'A'
       IV_LOGICAL_KEY         = '0001'
        IV_MSGNO               = '001'
        IV_MSGID               = 'ZSP'
        IV_MSGTY               = 'W'
      IV_MSGV1               = SY-MSGV1
      IV_MSGV2               = SY-MSGV2
      IV_MSGV3               = SY-MSGV3
      IV_MSGV4               = SY-MSGV4
        IV_MSGLEVEL            = '1'
      IV_FIELDNAME           =
      IV_ACTION              =
        IV_LOG_HANDLE          = lv_log_handle
        IV_CUMULATE            = 'X'
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Do I missed in passing of any additional parameters?
    Can any one of you have encountered the same problem and solved this, pls through some light on me too(if possible with block of code).
    Thanks in advance.

    Hi,
    Here is the block of code that I used to push a message in to Application log.
    Push your message into a variable called dummy and then call the below mentioned function module.
    DATA:        lv_dummy(254)    TYPE  c,            "#EC NEEDED
              MESSAGE w052(sppf_media) WITH text-001
                                            text-002
                                        INTO lv_dummy.
              CALL FUNCTION 'CRM_MESSAGE_COLLECT'
                EXPORTING
                  iv_caller_name = 'ORDERADM_H'
                  iv_ref_object  = iv_header_guid
                  iv_ref_kind    = lc_ref_kind_a
                  iv_msgno       = sy-msgno
                  iv_msgid       = sy-msgid
                  iv_msgty       = sy-msgty
                  iv_cumulate    = lc_x
                IMPORTING
                  ev_msgty       = lv_msgtyp
                  es_msg_handle  = gv_msghandle
                EXCEPTIONS
                  not_found      = 1
                  appl_log_error = 2
                  OTHERS         = 3.
              IF sy-subrc <> 0.
                MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ENDIF.
            ENDIF.
    Hope this helps to resolve your issue.
    Regards,
    Usha.

  • Attachment on Service Request

    Hi guys!
    I'm trying to insert an attachment on a Service Request via web service.
    I create and update the service request normally, but when I try to insert the attachment, I receive an error message saying that there was not found a valid user key to the instance "Service Request Attachment" of integration component (SBL-EAI-04397). IDS_ERR_EAI_SA_NO_USERKEY is an other code that appear to me.
    Does anyone know what can I'm doing wrong or Ho can I attach an URL to a service request via webservice.
    Thanks in advance.
    Rafael

    Hi,
    I think it is a Oracle seeded page then better raise an SR with Oracle.
    Regards,
    Reetesh Sharma

  • "Onsite Next Business Day Warranty" - Current Warranty Request/Warranty Issues/Poor Service

    TL;DR at the bottom of the post, detailed information in between.   I have had a T430s for a little less than three years.  I have called the warranty/customer service ~5+ times and every time gotten extremely poor service, whether it be because parts were "backordered" for weeks at a time, or because "Next Business Day" service has been anything but. I have decided to take a different route for my most recent warranty request, I will keep an up to date account of my request via this forum, with the intent of informing as many as possible with the current state of "Onsite Next Business Day Warranty". I called the warranty ~1hr ago and filed a service request.  The outcome of the request was that "I should receive a call in the next day or so, no later than 5:30PM tomorrow" when the employee I spoke with arrives in the office.  I pressed as to who would call, the employee would not answer definitively, but hinted that it would be his manager, because my warranty request apparently contained "so many parts that it required approval".  The parts have not been shipped, and it was abundantly clear that the subject of the call would be whether this warranty request would get approved. Hopefully, readers can already tell where this is going, next business day onsite repair apparently means in the next 24 hours, you will receive a phone call letting you know if Lenovo will honor their warranty obligations that have already been paid for. To detail my issues:1. The fingerprint scanner has stopped working for the second time. 2. I have had an issue where when I pick up the laptop on the lefthand side, the screen turns to 'snow' and will not return to its regular condition until next boot.  The laptop is unusable in this condition.  I have been attempting to get this fixed essentially since I purchased the laptop, however, after 3 technicians came to 'fix' the issue, it has not been solved.  I have asked/suggested every time I have called the warranty line that the issue is the system board, and it needs to be replaced.  Every time, they have refused to replace the system board, instead opting for other parts, some of which were on 'backorder' for over a month (remember, "Next Business Day Onsite Repair").  The difficulty in obtaining warranty service from Lenovo has caused me to only attempt to get this fixed when other issues pop up, as they have in this case.  Frankly, this issue alone should have caused Lenovo to call this laptop what it is after warranty request #2, a lemon, and they should have/should send a replacement model. 3. The laptop will not 'awake' from sleep mode - when the lid is closed, the keyboard/power button will not respond, and all power sources (battery, charger cable) must be removed and the laptop restarted. 4.  When the laptop is booted up, there is a 'CMOS' error message - I have never had a BIOS battery 'go' in this short a time frame. Issues 1,3, and 4 have cropped up in the last week. The warranty employee suggested that I might need to send my laptop in for 'Depot' repair instead of onsite, which in this instance will not work because of the significant delay that may entail.  I have a professional licensing/certification exam this month, and would greatly prefer that my laptop be in tip-top shape for the exam.  The need to have the greatest level of uptime is what caused me to pay for the NBD Onsite Warranty in the first place. My previous (horrible) warranty experiences and requirement for expedient repair have led me to seek a better method for resolving issues, namely airing them in a public forum, which hopefully will elicit a response from someone who can actually get things done in the warranty department. I have 0 hope of receiving next business day repair (or even repair by Friday, as the warranty explictly says calls received after 4:00 PM might take 2 business days).  I am skeptical that the issue will be resolved in the next week or two. Likewise, I have little hope that [some of] the problem(s) will actually get resolved after "repair" has been made, as historically that has not been the case for me with this laptop.  I will be voting with my dollars after this, as I have been uniformly unimpressed with Lenovo customer service/warranty/etc.  The laptop has been very nice when it doesn't have issues (and when I don't forget to grab it in a certain way), however, everything else about Lenovo has been exceedingly frustrating. The TL;DR of this is:1. If you work for Lenovo and can help, or if you don't and can help, please do!!!  I will be extremely grateful for any assistance. 2. DO NOT under any circumstances purchase the Onsite NBD warranty thinking that the warranty will live up to the title.  I have never received NBD Onsite warranty service, despite repeatedly 'giving' the option to Lenovo to provide such service. 3. If you are considering purchasing a Lenovo product, please read some of the stories people have on their dealings with the support side of the business.  I will speak for myself and say that I will almost certainly never buy another Lenovo product again, and will strongly encourage everyone I know to do the same - after recounting my issues with them.  

    Hey burgerbone,
    Sorry to hear about your troubles getting your machine issues resolved. I am not sure of the onsite policy related to your symptoms but I will be happy to look into it for you.
    Do you mind sending me a PM (Private Message) with your machine/case info?
    Thanks!
    Ty

  • How to trigger a event when there in any change in category in the service request

    Hello Experts
                            I need to set Employee responsible dynamically when the exact category is chosen in the service request. i am following a approach to register a function module in the crmv_events so that the event will be called as soon as categorization is changed in service request.I have never configured crmv_events.please guide me its urgent.
    Please tell me if a better approach is available.
    I will award points immediately .Reply as early as possible as its urgent.
    Thanks in advance

    Hi Rashmi,
    I would say, instead of doing it from any event function module, do it from web ui bol layer itself.
    Define get P method of category and set event on the value change. Create that same event from event handler and write the code for getting(use FM) and setting emp responsible in that event using bol programming.
    Please let me know if you need the codes for doing all this.
    It would be great if you can paste the the screen shot of the view you are using in web ui.
    Thanks,
    Bhushan

Maybe you are looking for

  • HP Belgium will not do a Regional Reset of my HP Photosmart

    The HP Techical Support Line in Belgium refuses to do a Regional Reset for my printer. I have an HP Photosmart C4480 from Singapore.  I moved to Belgium this year.  I knew that the ink cartridges were not the same and that printers had regional setti

  • Not able to generate AS2 MDN when receiving custom XML via AS2

    Hi friends, I have setup the trading partner and the corresponding TP certificate import for receiving the custom XML via AS2 channel. I am receiving the custom xml properly to oracle b2b and able to receive the same to bpel as well. however in the o

  • Save as Stationery unavailable in Mail

    I customized a stationery template that I had imported into Mail. Now I want to save it as a template, but "Save as Stationery" is greyed out in the File menu. Is there something I'm missing here? I've saved it as a draft, but want to use it multiple

  • Authentication error when using JMS service

    I'm currently trying to send String messages from LiveCycle to Websphere MQ (Both running on the same server), but I'm having some problems... I''m quite sure that my WAS setup is correct (or at least close to correct) because I've build some test Ja

  • If I have a temp1.dwt.php with 60 files on it and one editable region, how apply to this template a

    if I have a temp1.dwt.php with 60 files on it and one editable region, how apply to this template a new temp2.dwt.php with same one editable region same place, without need to create new files and copy / paste editable region contents??? eg I have a