Calculate the deadline without consider weekend

Hi !!!
We have a requirement to calculate the deadline for a
workitem (eg Latest
End) based on the Monday - Friday Calendar.
For example, if the workitem was created on a Thursday and
the 'Latest Start' deadline is +3 days, then it should be
triggered on the following Tuesday (not Sunday). In other
words, it should only take working days into account.
Actually the workflow considers saturday and sunday, but this is wrong for us.
  Anyone can give any  idea ??
    Noemi R.
  Best Regards

Hi,
The use of a factory calendar for calculating deadlines is not a standard feature
in SAP workflow. If, for example, a workitem is created on a Friday and has a 2-day
deadline, the deadline will pass on the Sunday.
To use a factory calendar, we implemented the solution recommended in the book
'Practical Workflow for SAP' (first edition), appendix A.
The main steps are:
- choose a factory calendar to use (from SCAL)
- create the BOR object ZDEADLINE using code from the Book, Appendix A9
  Note: the object key is Offset / Unit / CalId
- create one or more instances of the ZDEADLINE object in the workflow container
  (eg ZDeadline2Days and ZDeadline7Days). The instance is created if you specify
  inital values for all key fields: Offset (2), Unit (D=Days) and Calendar (CalId = QN).
- Refer to these two elements when defining deadlines in a given step.
WF Container elements:
ZDeadline2Days
Zdeadline7Days
Initial value (in the wf container, to ensure instantiation):
Offset = 2 (or 7)
Unit = D
CalID = QN  (or whatever)
cheers
Paul Bakker

Similar Messages

  • Selecting the data without considering any case sensitives

    Moderator message: please do not post the same question more than once
    Hi,
    I need to select the data without considering any case sensitives.
    Eg: If i enter ***JoHn****, then system need to select all currencies or amount depending on the this name.
    Please assist, many thanks.
    Sameer.
    Edited by: Matt on Nov 20, 2008 1:16 PM

    Hi,
    use cp or like in the select query
    and more over any thing given in single quotes must be in upper case to my knowledge in ABAP.
    any how try this
    select * from dbtab where name like '%JoHn%'.
    if doesnt work translate it to upper case.
    hope this this would solve.
    regards
    Ramchander Rao.K

  • How To Calculate the % business without Defining Structure

    Hi Experts,
    Report Requirement is displaying the Customer Number, Business  Value, % Business
    %Business = (customer business * 100) / Total Business Value.
    Report Output  sholud Looks
    CNO   Business   Business in %
    C1        100               50%
    C2         50                25%
    C3         50                25%
    How can we achive This without defining the Structure(because we have lot of Records) or  VB macro coding.
    Thanks
    Chandra

    Hi,
    U neednt create any structure. The CNO u can keep in rows. Business in columns. and right click and create a new formula as
    ( business * 100 ) / SUMGT(business)
    This is multiply the value in business for that particular row by 100 and then divide it with the overall sum of business.
    Hoep it helps
    Regards,
    Rathy

  • Calculate the MAX without using a VIEW

    Is there a method to finding the Operator (OPERATORE) that respond at the maximus number of calls (CHIAMATE) without using a view like in the example?
    CREATE OR REPLACE VIEW MassimoChiamate as
    SELECT Operatore, Count(*) AS NUMERO_CHIAMATE
    FROM Chiamata
    GROUP BY Operatore;
    SELECT Matricola,Cognome,Nome, numero_chiamate
    FROM MassimoChiamate, Operatore
    WHERE NUMERO_CHIAMATE=(SELECT Max(NUMERO_CHIAMATE) FROM MassimoChiamate) AND Matricola=Operatore
    ORDER BY Operatore;where
    CREATE TABLE Chiamata (
    Cliente VARCHAR2(10) REFERENCES Cliente(NTelefono)ON DELETE CASCADE,
    Campagna VARCHAR2(20),
    Azienda VARCHAR2(20),
    Operatore VARCHAR2(10) REFERENCES Operatore(Matricola) ON DELETE CASCADE,
    Tipologia VARCHAR2(15) CHECK (Tipologia IN ('assistenza','informazioni','reclami', 'nulla', 'pubblicità')),
    Verso VARCHAR2(10) CHECK (Verso IN ('entrata','uscita')),
    DataOraInizio TIMESTAMP,
    DataOraFine TIMESTAMP,
    PRIMARY KEY (Cliente, Campagna, Azienda, Operatore),
    FOREIGN KEY (Campagna,Azienda) REFERENCES Campagna(Nome,Azienda) ON DELETE CASCADE,
    CHECK (DataOraFine > DataOraInizio)
    CREATE TABLE Operatore (
    Matricola VARCHAR2(10) PRIMARY KEY,
    Cognome VARCHAR2(20),
    Nome VARCHAR2(20),
    Tipo VARCHAR2(15) CHECK( Tipo IN ('semplice','supervisor','amministratore')),
    Username VARCHAR2(15),
    Password VARCHAR2(15),
    Responsabile VARCHAR2(10)
    );

    One way would be:
    SELECT matricola, cognome, nome, numero_chiamate
    FROM operatore o,
         (SELECT operatore, COUNT(*) numero_chiamate
          FROM chiamata
          GROUP BY operatore
          HAVING COUNT(*) >= ALL (SELECT COUNT(*)
                                  FROM chiamate
                                  GROUP BY operatore)) m
    WHERE o.matricola = m.operatore
    ORDER BY OperatoreAnother, using analytics could be:
    SELECT matricola, cognome, nome, numero_chiamate
    FROM operatore o,
         (SELECT operatore, RANK() OVER (ORDER BY numero_chiamate) rn
          FROM (SELECT operatore, COUNT(*) numero_chiamate
                FROM chiamata
                GROUP BY operatore)) m
    WHERE o.matricola = m.operatore and
          m.rn = 1
    ORDER BY OperatoreTTFN
    John

  • Routes For the Shipments without Considering the Delivery Routes

    Hi All,
    we are working in transportation related project and We are using the Route determinations to the Shipments.
    I wanted to understand is there any way that we determine the Route directly to a Shipment Type without using the Leg Determination from the delivery Routes.
    These routes would be diff form the delivery Routes and they need to get directly determined at Shipment Document Level.
    Appreciate the valuable Answers
    Thanks
    Mahesh

    Hi Mahesh,
    -->As per the standard route will be determined in the delivery from the document it will copied to the shipment through copying routine which you are maintaining in the shipment document type detail screen.
    -->If you don't want to copy the route from the delivery then change the copying routine in the shipment document type.
    -->You can enter route manually in shipment document.
    I hope it will help you,
    Regards,
    Murali.

  • I have a Windows 7 laptop using I tunes 64 and all my music files are on an external disc. I rarely use I tunes and at one point moved all my files (including the music files) from one external disc to another without considering what affect this wou

    I have a Windows 7 laptop using I tunes 64 and all my music files are
    on an external disc. I rarely use I tunes and at one point moved all my files
    (including the music files) from one external disc to another without
    considering what affect this would have on the I tunes library. When I eventually
    attempted to use I tunes, every selected a song from the library resulted in a
    message stating that the file couldn't be located. After following some of the procedures
    explained in this community I was able to reconnect the library back to where
    the associated music files are presently stored. However, there are still 2
    problems that need to be corrected. 1) Every song file now has a duplicate. One
    file works and the other file will result in the same message stating that the
    file couldn't be located. Before there were 4,000 songs in the library, now
    there are 8,000 songs. I need to eliminate the 4,000 dead song files. 2) All
    the playlists are still associated with the dead song files which makes the
    playlists unusable. Can the playlists be reconnected to the usable files
    without manually having to recreate them? Thanks in advance for the help.
    sdkr

    So am I understanding correctly?
    You used your iPod as a hard drive (drag and drop) instead of having iTunes install the music?
    If you used drag and drop your choices are different than if you used iTunes to transfer.
    Good luck!

  • The MRP generates PldOrd / STPO without considering Quota arrangement

    Dear Expert,
    The MRP generates PldOrd / STPO without considering Quota arrangement/ supplier quantity agreement with Individual indicator =1 maintained in MRP4. It need that it should consider Quota arrangement with Individual indicator =1 while generating PldOrd/ STOP.
    Please help.
    Thanks,
    Om

    Hi Om,
    I hope that you have alreayd maintained the required master data for Quota Arrangement.
    Also have you maintained configuration of Lot-Sizing Procedure ? You need to select "Splitting Quota" indicator in a particular Lot-Size Procedure, which you're going to assign in material master.
    Hope it will help.
    Revert if any issue further.
    Regards,
    Anup

  • Calculate the Difference Between two dates excluding weekends and Holidays

    Hi,
    We need to calculate the difference between the two dates by excluding the Local public holidays (It is global and varies across countries) and weekends should not be included in calculation for a business day in OBIEE.
    We have two dates: Open date and close date when ever close date is null we are calculating age based on taking the current timestamp and need to exclude the weekends and Holidays when ever the close date is null.
    Ex:
    Col1 col2 Total
    11/9/2010 2:46:38 PM Null 13
    11/2/2010 8:06:26 PM 11/3/2010 5:37:03 PM 1
    (In the Total we shouldn't include the weekends,holidays)
    Please let me know how to calculate the difference between two dates by excluding the weekends and holidays.
    Thanks
    Edited by: user10441472 on Nov 22, 2010 3:14 PM

    You already asked this question and I answered it...
    Re: calculation of Business day in OBIEE

  • I am considering purchase of the new iPad and already own iphone 3GS, can I use my phone to tether to the iPad and use the phones 3G connection? This will allow me to buy the cheaper version of the iPad without 3G.

    I am considering purchase of the new iPad and already own iPhone 3GS, can I use my phone to tether to the iPad and use the phones 3G connection?
    This will allow me to buy the cheaper version of the iPad without 3G.

    You can tethe, but depending on carrier you may need to pay for that option... I've decided to have my phone on one provider and my ipad on another so i always have connectivity... More expensive in the long run, but I need to make sure I am always "on" for work
    YMMV

  • How to calculate the time duration on a datetime column?

    Hi guys,
    I've done some search on this forum and everywhere else but I can't seem to get this right, at the beggining it sounded like something very simple to accomplish, for the instance with Excel but I'm struggling to get it to work with Crystal Reports on Microsoft Visual Studio 2008.
    I have a datetime column (SQL Server 2000) that I wanted to calculate the the time duration on the report group footer, unfortunatelly the built-in SUM function cannot be applied and I've tried several formulas that I've found on the internet without any luck. I'm using a datetime column to store only the time because I'm stuck with SQL Server 2000 which doesn't have a time data type.
    Would you guys know how to do it by any chance?
    Some sample code I've tried: http://www.minisolve.com/TipsAddUpTime.htm
    Thanks a lot,
    Paul
    Edited by: Paul Doe on Dec 12, 2009 5:41 PM
    Some sample data:
    EMPLOYEE     WORK HOURS
    =========     =================
    JOHN DOE      1900-01-01 01:00:05
    JOHN DOE      1900-01-01 00:20:00
    JOHN DOE      1900-01-01 01:30:15
    =========     =================
    HOURS WORKED: 02:50:20
    Edited by: Paul Doe on Dec 12, 2009 5:42 PM
    Edited by: Paul Doe on Dec 12, 2009 5:45 PM

    Guess what, by further testing the code on the website mentioned above I got it working.
    Pus, I needed to change the grouping on the code, so I had to come up with a way to update the formulas based on the groupping field.
    Considering "call_date" is the field that you are groupping by on the designer use the following code to update the formula:
    CrystalReportObj = new ReportDocument();
    CrystalReportObj.Load("C:\\reportfile.rpt");
    FieldDefinition FieldDef;
    //Get formula
    FormulaFieldDefinition FormulaDef1;
    FormulaDef1 = CrystalReportObj.DataDefinition.FormulaFields["SubHours"];
    //Get formula
    FormulaFieldDefinition FormulaDef2;
    FormulaDef2 = CrystalReportObj.DataDefinition.FormulaFields["subMinSec"];
    //Update the formula to work with the new grouping field,
    //this must be called first else will throw an exception
    FormulaDef1.Text = FormulaDef1.Text.Replace("call_date", "call_extension");
    FormulaDef2.Text = FormulaDef2.Text.Replace("call_date", "call_extension");
    //Get the new field we are grouping by
    FieldDef = CrystalReportObj.Database.Tables[0].Fields["call_extension"];
    //Replace current grouping field with the new one,
    //considering there only one group in the report, index 0
    CrystalReportObj.DataDefinition.Groups[0].ConditionField = FieldDef;
    Have fun.
    Edited by: Paul Doe on Dec 12, 2009 8:43 PM
    Edited by: Paul Doe on Dec 12, 2009 8:53 PM

  • Interactive activity deadline without due transitions

    I need to define deadline for all interactive activities. However, I do not want to add due transitions or Connector to every interactive activity. How to set the activity deadline without due transitions?
    Or, I add a due transition / deadline to all interactive activities. If the deadline is reached to any of them, an exception will start.
    Or, if any activity is expired, it should go to a specific activity. How to do that?
    For example, a process has 2 interactive activities, named a1 and a2. The first activity has a method:
    activity as Activity
    activity=Activity("a2")
    t as Time
    t = addSeconds(activity.deadline, i : 20)
    It sets the deadline of a2. However, after it is deployed to BPM standalone 10g, when sending a1, Standalone shows error.
    Sincerely
    Edited by: YE on Jun 5, 2009 4:01 PM

    Hi Ye,
    There is a predefined variable called "deadline" you might want to consider using for this. Instead of having to add due transitions for each activity, if you set the deadline variable to some time in the future, once that time is exceeded the work item instance automatically throws an "InstanceExpiration" exception.
    1) I usually set the deadline variable in the Begin activity in the process to some time in the future. Although you can set it there, it can be changed anywhere in the process if you want the deadline to be different in the next activity. You just need to be sure to set the deadline upstream of the activity.
    2) Add an exception handler to catch the InstanceExpiration exception by:
    a) adding an orphan Interactive activity
    b) if an exception handler does not exist in the process, right mouse click anywhere in the white space of the process -> "Add an exception transition to" -> select the Interactive activity you added in the first step -> click the "Properties" tab -> select the Exception Name combo dropdown and pick "InstanceExpiration" -> click Ok and then Yes.
    c) the logic in the Interactive activity that catches the overdue instances needs at least these statements:
    // reset the deadline so another exception is not immediately thrown
    deadline = 'now' + '2d'
    // code here to do what it is that you want done (e.g. escalate the priority, send someone an email, etc.)
    // now send the instance back to the activity where the deadline expired
    action = BACK Hope this helps,
    Dan

  • How to calculate the in use percentage of cache ?

    Hi, All,
    I have two questions here:
    1. Can we calculate the proper cache size based on the average key/data pair size and the number of key/data pairs? Is there any formula or something? ( I doubt it :), so next is the second question )
    2. If we set a fixed cache size, and ensure that it has almost 100% hit rate for all the entries accesses. Does this mean that the cache is enough? And if yes, can we calculate how much percentage of the cache is actually in use?
    Thanks in advance.

    Hi,
    user647934 wrote:
    1. Can we calculate the proper cache size based on the average key/data pair size and the number of key/data pairs? Is there any formula or something? ( I doubt it :), so next is the second question ) You can estimate that, just that you should also consider: the page size and how many records will fit on a page.
    Depending on your type of access method, you can check here for formulas that are estimating the total database size (you can find them here: http://www.oracle.com/technology/documentation/berkeley-db/db/ref/am_misc/diskspace.html ), and just translate that to the cache size. Be aware that any cache size less than 500MB is automatically increased by 25% to account for buffer pool overhead.
    user647934 wrote:
    2. If we set a fixed cache size, and ensure that it has almost 100% hit rate for all the entries accesses. Does this mean that the cache is enough? And if yes, can we calculate how much percentage of the cache is actually in use?I think that you can find everything you need by calling "db_stat -m" or DB_ENV->memp_stat for detailed cache statistics.
    db_stat: http://www.oracle.com/technology/documentation/berkeley-db/db/utility/db_stat.html
    DB_ENV->memp_stat: http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/memp_stat.html
    The fields returned by this are:
    size_t st_gbytes;
    * Gigabytes of cache (total cache size is st_gbytes + st_bytes).
    size_t st_bytes;
    * Bytes of cache (total cache size is st_gbytes + st_bytes).
    u_int32_t st_ncache;
    * Number of caches.
    u_int32_t st_max_ncache;
    * Maximum number of caches, as configured with the DB_ENV->set_cache_max method.
    roff_t st_regsize;
    * Individual cache size, in bytes.
    size_t st_mmapsize;
    * Maximum memory-mapped file size.
    int st_maxopenfd;
    * Maximum open file descriptors.
    int st_maxwrite;
    * Maximum sequential buffer writes.
    db_timeout_t st_maxwrite_sleep;
    * Microseconds to pause after writing maximum sequential buffers.
    u_int32_t st_map;
    * Requested pages mapped into the process' address space (there is no available information about whether or not this request caused disk I/O, although examining the application page fault rate may be helpful).
    u_int32_t st_cache_hit;
    * Requested pages found in the cache.
    u_int32_t st_cache_miss;
    * Requested pages not found in the cache.
    u_int32_t st_page_create;
    * Pages created in the cache.
    u_int32_t st_page_in;
    * Pages read into the cache.
    u_int32_t st_page_out;
    * Pages written from the cache to the backing file.
    u_int32_t st_ro_evict;
    * Clean pages forced from the cache.
    u_int32_t st_rw_evict;
    * Dirty pages forced from the cache.
    u_int32_t st_page_trickle;
    * Dirty pages written using the DB_ENV->memp_trickle method.
    u_int32_t st_pages;
    * Pages in the cache.
    u_int32_t st_page_clean;
    * Clean pages currently in the cache.
    u_int32_t st_page_dirty;
    * Dirty pages currently in the cache.
    u_int32_t st_hash_buckets;
    * Number of hash buckets in buffer hash table.
    u_int32_t st_hash_searches;
    * Total number of buffer hash table lookups.
    u_int32_t st_hash_longest;
    * Longest chain ever encountered in buffer hash table lookups.
    u_int32_t st_hash_examined;
    * Total number of hash elements traversed during hash table lookups.
    u_int32_t st_hash_nowait;
    * Number of times that a thread of control was able to obtain a hash bucket lock without waiting.
    u_int32_t st_hash_wait;
    * Number of times that a thread of control was forced to wait before obtaining a hash bucket lock.
    u_int32_t st_hash_max_nowait;
    * The number of times a thread of control was able to obtain the hash bucket lock without waiting on the bucket which had the maximum number of times that a thread of control needed to wait.
    u_int32_t st_hash_max_wait;
    * Maximum number of times any hash bucket lock was waited for by a thread of control.
    u_int32_t st_region_wait;
    * Number of times that a thread of control was forced to wait before obtaining a cache region mutex.
    u_int32_t st_region_nowait;
    * Number of times that a thread of control was able to obtain a cache region mutex without waiting.
    u_int32_t st_mvcc_frozen;
    * Number of buffers frozen.
    u_int32_t st_mvcc_thawed;
    * Number of buffers thawed.
    u_int32_t st_mvcc_freed;
    * Number of frozen buffers freed.
    u_int32_t st_alloc;
    * Number of page allocations.
    u_int32_t st_alloc_buckets;
    * Number of hash buckets checked during allocation.
    u_int32_t st_alloc_max_buckets;
    * Maximum number of hash buckets checked during an allocation.
    u_int32_t st_alloc_pages;
    * Number of pages checked during allocation.
    u_int32_t st_alloc_max_pages;
    * Maximum number of pages checked during an allocation.
    u_int32_t st_io_wait;
    * Number of operations blocked waiting for I/O to complete.
    Please let me know if this helps.
    Thanks,
    Bogdan

  • Posting of Commission Exp to calculate the Cost of Goods Sold

    Hi Team,
    I do work in an automobile manufacturing organization and is new to SAP FI module. I have a business requirement which I need to fulfill; I would appreciate if all you gurus help me with finding the solution.
    Business Scenario:  at present, we are posting the following entries to record the commission we paid to dealers for selling vehicles.
    Commission Exp (DR)
         Customer (CR)
    Customer (DR)
         Dealer (CR)
    With these entries we are not been able to track the commission based on vehicle variants i.e. Toyota GLI, XLI etc.
    New Requirement:
    To calculate the Cost of Goods Sold for a variant, I need to track the commission expense based on vehicleu2019s variants. Please help me in finding the solution.
    Thanks

    Thanks for quick response.
    Let me give little more details of type of commission entries we have
    1) Normal Commission - Fixed commission variant wise and is derived from SD.
    2) Additional Commission - No predefined formula, this is totally based on top management discretion. Management decides how much would be paid to a particular dealer.
    3) Sliding Commission deduction - Deduction of certain amount from commission on late payments.
    4) Additional Sliding Commission - Payment of additional commission based on early payment terms.
    Currently, FI department is calculating all these figures on Excel sheets and then post a JV for each type of above mentioned commission.
    How can I configure the system to calculate these amounts automatically without involving Excel Sheet help?
    and how to post these amounts variant wise along with dealers and customers.

  • IPhone 4S Battery Life: Best solutions and procedures for 1st time user: 1-Do you have a battery life issue (learn first what the usage time spec is about) 2-What can you try to remedy the situation without reading 500 pages of posts

    What follows is a grouping of some of the most fruitful procedures - from what I've seen in the biggest battery life issue thread - and some background information and discussion for solving or improving the battery life with the iPhone 4S and may be applicable also to devices on which iOS 5.0/5.0.1 has been applied. Credit goes to the respective users who contributed this information to the forum and they should be commended for doing so. This is not a final listing. The goal here is to provide a first stop sort of knowledge base document for newcomers instead of having them perusing the never ending threads where the wheel is reinvented on every page...
    Please don't post your questions, usage screenshots, or claims that it worked or not for you or anything here except PROCEDURES/DEBUG STEPS/SOLUTIONS or improvements to the procedures already listed here. Try to use point form and to be as concise and clear as possible. Hope all this helps.
    Thank you and good luck!
    General info and specs
    First, take a look Apple's battery tips, info and specs(obligatory reading for all Iphone 4S users - read it once and for all):
    http://www.apple.com/batteries/iphone.html
    http://www.apple.com/batteries/
    ... you didn't read it? loll Always remember this i.e. the definition of "usage":
    Usage: Amount of time iPhone has been awake and in use since the last full charge.  The phone is awake when you’re on a call, using email, listening to music, browsing the web, or sending and receiving text messages, or during certain background tasks such as auto-checking email.
    I'm still not convinced you read the links so here's what Apple has to say in terms of fine tuning your battery life:
    Optimize your settings
    Depending on how they are configured, a few features may decrease your iPhone battery life.  For example, the frequency with which you retrieve email and the number of email accounts you auto-check can both affect battery life. The tips below apply to an iPhone running iOS 5.0 or later and may help extend your battery life.
    Minimize use of location services: Applications that actively use location services such as Maps may reduce battery life. To disable location services, go to Settings > General > Location Services or use location services only when needed.
    Turn off push notifications: Some applications from the App Store use the Apple Push Notification service to alert you of new data. Applications that extensively rely on push notifications (such as instant messaging applications) may impact battery life. To disable push notifications, go to Settings > Notifications and set Notifications to Off. Note that this does not prevent new data from being received when the application is opened. Also, the Notifications setting will not be visible if you do not have any applications installed that support push notifications.
    Fetch new data less frequently: Applications such as Mail can be set to fetch data wirelessly at specific intervals.  The more frequently email or other data is fetched, the quicker your battery may drain. To fetch new data manually, from the Home screen choose Settings > Mail, Contacts, Calendars > Fetch New Data and tap Manually. To increase the fetch interval, go to Settings > Mail, Contacts, Calendars > Fetch New Data and tap Hourly. Note that this is a global setting and applies to all applications that do not support push services.
    Turn off push mail: If you have a push mail account such as Yahoo! or Microsoft Exchange, turn off push when you don’t need it. Go to Settings > Mail, Contacts, Calendars > Fetch New Data and set Push to Off. Messages sent to your push email accounts will now be received on your phone based on the global Fetch setting rather than as they arrive.
    Auto-check fewer email accounts: You can save power by checking fewer email accounts. This can be accomplished by turning off an email account or by deleting it. To turn off an account, go to Settings > Mail, Contacts, Calendars, choose an email account, and set Account to Off. To remove an account, go to Settings > Mail, Contacts, Calendars, choose an email account, and tap Delete Account.
    Turn off Wi-Fi: If you rarely use Wi-Fi, you can turn it off to save power. Go to Settings > Wi-Fi and set Wi-Fi to Off. Note that if you frequently use your iPhone to browse the web, battery life may be improved by using Wi-Fi instead of cellular data networks.
    Turn off Bluetooth: If you rarely use a Bluetooth headset or car kit, you can turn off Bluetooth to save power.  Go to Settings > General > Bluetooth and set Bluetooth to Off.
    Use Airplane Mode in low- or no-coverage areas: Because your iPhone always tries to maintain a connection with the cellular network, it may use more power in low- or no-coverage areas.  Turning on Airplane Mode can increase battery life in these situations; however, you will be unable to make or receive calls.  To turn on Airplane Mode, go to Settings and set Airplane Mode to On.
    Adjust brightness: Dimming the screen is another way to extend battery life.  Go to Settings > Brightness and drag the slider to the left to lower the default screen brightness. In addition, turning on Auto-Brightness allows the screen to adjust its brightness based on current lighting conditions.  Go to Settings > Brightness and set Auto-Brightness to On.
    Turn off EQ: Applying an equalizer setting to song playback on your iPhone can decrease battery life.  To turn EQ off, go to Settings > iPod > EQ and tap Off. Note that if you’ve added EQ to songs directly in iTunes, you’ll need to set EQ on iPhone to Flat in order to have the same effect as Off because iPhone keeps your iTunes settings intact.  Go to Settings > iPod > EQ and tap Flat.
    Usage specs for the 4S - http://www.apple.com/iphone/specs.html:
    Talk time: Up to 8 hours (12.5% per hour drain) on 3G, up to 14 hours (7.1% per hour drain) on 2G (GSM)
    Standby time: Up to 200 hours (0.5% per hour drain)
    Internet use: Up to 6 hours on 3G (16.6% per hour drain), up to 9 hours (11.1% per hour drain) on Wi-Fi
    Video playback: Up to 10 hours (10% per hour drain)
    Audio playback: Up to 40 hours (2.5% per hour drain)
    So a scenario of normal usage could be for example: 4 heavy hours of 3G internet browsing (66.4%), with one hour of call on 3G (12.5%) and 22 hours of standby (11%) = 100%
    A battery life issue is a problem where the drain is really out of spec either during usage or standby or both. For example, multi-% per minute drain during usage or a 10% drain per hour during standby is problematic. Browsing the internet on 3G during one hour and losing 16-17% is not.
    Apple's test methodology for claiming the specs:
    http://www.apple.com/iphone/battery.html
    Procedures
    davidch tips (reset+full discharge recharge):
    Go through these steps to address the battery after updating to iOS 5.0.1:
    1. Reset all settings (settings app-> general-> reset)
    2. Go through initial setup steps (lang, wifi, siri, enable location, etc) and choose setup as new phone (don't worry your apps, data, contacts, mail will still be there). Do NOT restore from iCloud or iTunes (It can copy back corrupt settings)
    3. Turn off system location services timezone and iAd
    4. Fully discharge battery  (tilll it shuts off with the spinning wheel)
    5. Fully recharge battery (overnight if possible)
    In my experience this improves the Standby battery drain issue significantly in most cases.  It reduces drain from 2-4% or more per hr to 0.5% or less. It has worked for many, many users now. If it does not work after a few try's you may have a real battery or hardware issue and should contact Apple.  Good Luck!
    ram130's variant of davidch i.e. additional steps:
    Now using davidch original steps and attaching the tweaks I made to get me more usage. As shown on page 29.
    Go through these steps to address the battery after updating to iOS 5.0.1:
    1. Reset all settings (settings app-> general-> reset)
    2. Go through initial setup steps (lang, wifi, siri, enable location, etc) and choose setup as new phone (don't worry your apps, data, contacts, mail will still be there). Do NOT restore from iCloud or iTunes (It can copy back corrupt settings)
    3. Turn off system location services timezone and iAd
    4. Fully discharge battery  (till it shuts off with the spinning wheel)
    5. Fully recharge battery (overnight if possible)
    6. Disable Siri 'Raise To Speak' and REBOOT *( if possible use another camera to verify the                 infrared is off after the reboot).
    7. Set emails, icloud and calendars to fetch. ** test. Mines on hourly.
    8. If your in a no signal and your phone is saying "Searching..." even after 10mins, reboot while in that area and after 1-2min it should say "No Service". This mainly applies to Verizon customers and improve battery life in these areas.
    9. *optional* Goto Settings > General > Network and you will see "Hotspot.." loading something, wait a few seconds and it should say "setup personal hotspot" then exit out.
    * I notice a great improvement after disabling this and rebooting. This increased my "screen on" usage or at least helped it. Make the change.
    ** I have not tested push yet to narrow down the drain but I had this change on my phone. I believe exchange push is responsible for some stand by drain. As for icloud, haven't notice much of a difference. Just try it for a day. My email still came in fast most times. Again still testing, will report back on these..
    buxbuster tips(wifi sync, iCloud):
    These are my own tested workarounds that worked for my iPhone 4S and seemed to have worked for others as well :
    Workaround number 1. Deselect wifi-sync in iTunes and press sync.
    If that doesn't work try :
    Workaround number 2 : Remove iCloud, reset network settings. ( I guess this won't work for you since you don't have it enabled ).
    If both workarounds fail, you can always try to completely wipe your phone. That also solved some of the cases out there.
    rolandomerida tips - i.e. buxbuster and additional steps:
    Finally, I solved the syncing error loop. My contacts are syncing flawessly again between my devices and iCloud, and yes, the battery stopped draining, which is the main topic here.
    I followed instructions from buxbuster (check his workaround a few pages up!) and an additional BIG step to restore contacts and syncing, as seen in a MacRumors forum.
    This is what I did:
    1. Make a backup of your Address Book, using the vCard option (or both, it doesn't hurt). Save it for later.
    2. In your iPhone, delete iCloud account. When it asks, accept both: delete AND delete from my iPhone.
    3. Reset network settings. The iPhone will restart, then will ask you to unlock the SIM card.
    4.Turn Wi-Fi on.
    5. Add the iCloud account again.
    That's for Buxbuster's workaround. For some, it might work just like that. My iPhone repopulated from iCloud after step 5, but I still had that "server error" on iCloud. I had to do some extra steps, since my Mac was not syncing to iCloud and couldn't edit anything on my Mac or iCloud. Syncing back had to be fixed, too. If not, the syncing loop would continue from my iPhone, and the battery would drain awfully again.
    1. In System Preferences -> iCloud, I turned Contacts off. I chose "keep on My Mac" those contacts, but I got an empty Address Book after a while. And a few minutes later, iCloud contacts were empty and my iPhone also. It is scary at first! Now, before importing that vCard backup...
    2. Turn Wi-Fi off. This is important, since your contact-empty iCloud will attempt to wipe your Address Book from your Mac in seconds after importing.
    3. Import your vCard backup to Address Book. Just drag it to your blank Address Book window; it asks if you want to import "x" number of cards. Of course, say yes.
    4. Turn Wi-Fi on, and then iCloud contacts on again (System Preferences -> iCloud). It will offer to merge your newly populated Address Book with iCloud (which is empty at this point). It should upload every single contact to iCloud, and then to your iDevices. If not, a fifth step would be to import the vCard file to iCloud, but it shouldn't be necessary.
    So, with iCloud syncing working correctly, there is no battery draining! Again, that was my particular issue.
    I can't tell if this is the single answer to the widely spread battery draining problem, but it sure can be fixed with these workarounds, and yes, Apple should address the problem with a future update, for we affected customers don't need workarounds in the first place
    This is the MacRumors discussion:
    http://forums.macrumors.com/showthread.php?t=1256807
    And dont' forget to check buxbuster's fix, video, and THANK him!
    Miless tips (full 800mb release of 5.0.1 and sanitizing a restore):
    As for 4S battery life. Try doing this,
    1. Settings>Location Service ... disable all location services you do not need. In particularly Facebook because it drains the battery a lot.
    Scroll down to the bottom at Settings>Location services>System Services ... Disable Setting Time zone, location based iAds, Diagnostic & Usage.
    2. Settings>Notification>Calendar ... turn off the Notification Centre.
    3. Settings>General>Reset ... do Reset All Settings. Doing this will not wipe out your iPhone. It will just Reset the network settings, location warning, keyboard dictionary, etc... but it will clear up some corrupted data there. Generally this will help.
    Try these 3 steps first... if it still drains a lot, try the following,
    4. Drain your battery down to 1%. Then charge it up using USB from PC ... not the charger. The charger output 1.0 A ( x 5V from USB ... you get 5W power). From PC, output is only 0.5A x 5V = 2.5W power. Charging is slower but trickle charge 4S helps the battery retain its charge better. I think it takes about 3-3.5 hours to charge full from USB/PC compared to slightly below 2 hours using iPhone charger.
    If after doing the above still could not solve your battery issues (mine with iOS 5.0 was ok up to step 4, but not iOS 5.0.1).... plug you iPhone to a charger (any charger), from iPhone, access your iCloud ... set it up if you havent. Back up your iPhone data to iCloud. if you do not have enough storage (only 5GB is free), go to details and select the apps you need its data backup, choose only those you really need and leave those unnecessary ones out. Back up your camera roll to your PC/Mac manually as it could be too big to backup to iCloud.... once you have it setup, make sure you are on Wifi ...  tap backup to iCloud from your iPhone. It will take a while if the file is huge.
    Once backup to iCloud is completed, plug your iPhone to PC/Mac and launch iTunes 10.5.1 (make sure you have 10.5.1)
    Click Restore. It will automatically initiate a download of iOS 5.0.1 ipsw for iPhone 4S. Wait for the whole process to finish, ie. download, restore software/firmware.
    Once its done, do not set up your iPhone from iTunes. Set it up on your iPhone. Go through the selection. When prompted, select restore from iCloud (from your iphone backup earlier). Keep your iphone plugged into iTunes while restoring backup from iCloud. Because while restoring from iClouds, some data will be synced from iTunes if you plug in, e.g. music, video, etc... unless you bought these content from iTunes store. Apps will be downloaded from App Store from the cloud.
    Once it's all done restored. Turn off your iPhone,.. and turn it on again.
    Now, hopefully your battery wont be draining so fast anymore. Usually it wont after this. But you need to charge your battery at least 4-5 cycles to stabilize the charge on the battery. I dont know why... but battery life seems to get better and better for me after a few charge cycles after all the above work.
    Good luck. Let us know if it works for you.
    W. Raider tips (Sirii):
    Bottom line for me of things that helped battery life are:
    1. Turing off Siri and Rebooting the phone by holding the Home button and Top button down, ignoring the slider, until the phone shut down. (turn off Siri, reboot, and check top front of iPhone 4S against a lesser camera like the front-facing camera on an iPad2 - making sure the IR sensor is off)
    2. Fully draining the battery, meaning using the phone until it shuts itself off from a drained battery and then recharging it to 100% about 4, maybe 5 times. I charged it both with a Mac and a wall charger.
    Hope this is helpful!
    Comments
    jmm514 remarks (Twitter):
    I may have found something. I had Twitter disabled in my notifications, but got a tweet today that popped up on my home screen. Didn't know I had this enabled. At the bottom of the Twitter notification settings is the home scrren toggle. Since disabling this, battery life seems better. Considering there is no setting for frequency of checking for tweets, it appears the phone is continually connecting to wifi to check for new tweets.
    tmksnyder comments (notifications, corrupt data in iCloud):
    For me, I found my iphone on wifi mysteriously connecting to my mac.  I eventually narrowed it down to the Apple Move Trailers app which keeps a file in iCloud.  The phone was trying to sync the file with the mac in the background even when the Movie Trailers app was closed (hitting the red x).  Based on my macosx logs the iCloud process that was trying to sync was working directly between the phone and the mac without using itunes by connecting to an https address hosted on the phone.  It was connecting every 3 minutes and failing (while phone was awake or awake during during a notification).  I also found that iCloud control panel on OSX would error if I tried to delete the file.  I fixed it by removing the App and doing a hard reset which stopped the sync.  I probably could have turned off iCloud document sync in the phone but didn't think of that.  My battery life has greatly improved while at home on wifi.    I am now at 28 hrs standby, 2 hrs 20 minutes of usage, and 68% battery.  It was ok before where I could get 20-30 hrs standby and 6 -8 hrs usage.  My usage today was phone calls, 3g surfing, and music via bluetooth in the car.
    I also found even with Itunes iMatch, if I mass updated tages, art work etc, it would hit the phone on wifi even in standby.  I was amazed.   Granted if I am not doing updates, Match won't hot the phone so this was a once in awhile event.  I could drop my percentage by 5-10% in a matter of minutes when doing updates.   I think a lot of our problems are background processes, associated with iCloud, notification, and apps.  More features means more battery.   I think the key thing is to keep track of what has recently been added or changed if battery life gets worse all of a sudden.   It may be an app that was recently installed and if possible you may want to completely remove it and not just quit it.
    With twitter, i think it uses push notifications so it doesn't need to be running and actively poll on the phone. For instance , if i quit the mail app, i still will get mail notifications and can swipe the message and load mail. Apple Push Notifications servics maintain the connection to the phone and there are likely pings or connection checks  that occur for the service on an os level not an app level.  This minimizes the load so there arent a bunch of apps all runing and constantly checking.  The notification service , if it is contacted from twitter or another service with data, will check the settings you have registered to the with the apple push service and send the notification to your phone.  No matter what, there is a drain with notifications. M hunch is once one application is configured to receive notifications, connection checking occurs betwen the push service and the phone so it knows where it is on the network. If it is implemented correctly, these checks arent frequent if you are still and more frequent as you move. The other drain is for when the noification hits and is processsed.  If i get 9 emails over night, my screen just popped up for 20 seconds or so to process each message using battery.  I would even think that just go from low power to turning n the screen uses more juice than if the device was already on and i get the message.  On nights I get no notifications, I see a 3  or 4 percent drop.  On nights with a number of notifications, i have seen up to a 10 percent drop.  Besides notifications, wifi sync and icloud will poll on the local network and use up battery if the host computer is on and running itunes or trying to sync a data file that is corrupt (which i had with the apple movie trailers app causing my phone to drain).  For me turning off wifi sync and remving a corrupt file in icloud solved my battery issues and I get over 24 hrs of standby with 6 to 9 hrs of use and this is with all the normal location services and push serivices turned on.
    See http://developer.apple.com/library/mac/ipad/#documentation/NetworkingInternet/Co nceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html for more info.  I think it has a good overview of how the notifications work.

    Well seems like that rumor of iOS 5.0.1 is finally gone the way of the dogs since developers got a beta of 5.1. So as stated earlier in the master discussion-> I suspect if you are filling up this thread with false post or creating a master set of links to various post that are unreliable you are wasting your time. Press is not going to touch the story due to poor or inaccurate sources which may be links from the master thread. This can include inaccurate information, combination of conflicting post or postings from users which may not own the device. Reputable press organizations have policies that require discloser and strict rules about what is a reliable source for a story. It is clear that many of the post in the master thread, which are links presented here are questionable. 
    Sorry to say that postings taken without any analysis of their totality have been propagated via various sites, for example sites such as http://www.2012federalbudget(dot)com. (Do not visit but I suspect that this is not the 2012 federal-budget site you would expect based on analysis of the records. There are plenty of sites like http://www.2012federalbudget(dot)com propagating questionable post in these threads.) One site for example in the discussion thread used a self signed certificate, the site had a log in to allow users to enter their OpenID. Seems many of these sites are pop and drop drupel configurations.
    So remember this is how the really bad rumor of iOS 5.0.2 got started, the 5.1 memory leak issue, iCloud Issues, call quality, address book, etc.
    Some of the postings have been very comical, I think the latest now is a dropbox issue. Seems that the length of the previous thread has resulted in various app engines of some proxy servers/tools reaching their limits.
    So I would make sure to know the source of any information you link to. Make sure you avoid entering any information to outside links such as OpenID or Apple ID, these are big prize items for anyone with malicious intent.  If you have issues and are a valid user contact APPLE CARE. (Note link is using McAfee Secure Short URL Service, and is https.)
    http://mcaf.ee/ricdt
    The original solution still represents a high level of success for users having any battery issues.
    Install 5.0.1 on your iPhone 4s. Some users posting they are still using older versions, bad fake serial numbers, etc.
    Make sure your device can run iOS 5.0.1 and is not altered.
    Make sure you use a new Sim, not some cut down version which many users admit to doing. (Again, worth confirming what people are posting.)
    Reset the device doing a hard reset and software reset.
    Let battery drain and then charge for the full cycle, which is 24 hours.
    I think you will find you will get the battery usage that APPLE has stated for the device.
    Best of luck, stay safe and thanks

  • How to calculate the total of absences? How to collect data from a specific line of a table?

    Hi,
    Again, I made a nice coloured picture from a screen capture which summarise the improvements that I would like to make in my form,
    Situation:
    For an educational purpose, I made this form   to simplify the way of recording the data and also to develope the independence of the students.
    ( I am doing this on a voluntary basis, working extra hours on my free time but I don't really mind because I am learning a lot of things in the same time)
    After being tested by the teacher, the student has to record the short date, the lines memorised, his grade, number of mistakes, and his attendance.
    I created everything in Word, then converted the file in PDF, then I created all the different fields with Adobe acrobat.
    There is in total 4 sheets, there are all similar except the first one in which there is a box with: date started, date finished, total time spent, absences.
    Below this box there is a table with 16 lines from (A to P) and 7 columns (Days, Date, From.. to.. , Grade, No. lines memorised, No. Errors, Attendance) ( so this table is present on all the sheets)
    Due to the fact that some students need more time than others, and also beacause some text need more time, I estimated a need of 4 sheets at the very most.
    I would like to make the following amelioration and automate the inputting of some of the data because I know that some of the students will certainly forget, so to avoid this scenario I am trying to make this form the easiest possible.
    screen capture of the form:
    screen capture of the form editing, you can see the names of the different fields:
    here is the form (only the first page) : http://cjoint.com/12fe/BBotMMgfYIy_memorisation_sheet_sample.pdf
    In  yellow 00000:
    At present, the students has to input the total of absences manually, is there a way ( script) to automate this by initialising the field next to "Absences" at  " 0 day"   and then everytime that Absent is selected from the COMBO BOX, it add 1 and it is displayed like this:  " 1 day" then " 2 days"  then " 3 days" etc … (so from what I read I have to initialise a counter a the beginning and then for (i...   ) count= count++; something like this...
    Furthermore, I need a solution to overcome the possibility that a second sheet may be needed for the same student; therefore I would need the data from the "attendance column" from the second sheet ( and perhaps the 3rd and 4th aswell) to be added on the "absences field" in the first sheet
    My idea: everytime that the short date is inputted in the first line (next to A) in the "Date" column of one of the 4 sheets then we check the 16 Combo box of the attendance column in this sheet instead to check 16*4=64 fields fot the 4 sheets in one go?
    but I don't know at all how to write it in Javascript. Or perhaps there is a way more easier than that?
    Shall I allocate a value for Absent on the “ export value”?
    In purple
    At present I wrote a simple script which matches the number of lines to the poem selected (Eg.  if I select the poem V.Hugo,  the number "36" will appear next to Number of lines).
    Again I would like the make the life of the students very easy so I would like a script which detects this number “36” on the "From .. to …" column,  as soon it is detected (on the first sheet or 2nd or 3rd or 4th)  check from the same line if "A / Pass" or "B / Pass" have been selected in the "Grade" column ,if yes the short date inputted on this line will be written on the field next to "Date finished" .
    this is a simple example with 36 lines only but somethimes, the students may have to memorise 80 lines and more, this is the reason for having 4 sheets in total.
    So basically I would like to automate the field next to" Date finished:" with a script that collect the short date from the day in which the student has finished his memorisation with "A / Pass" or "B / Pass"
    As for the "Total time spent" George Johnson helped me with a script that calculate the difference betwen date started and date finished (thank you)
    I am sollicting your help, because after trying for hours I was really confused with the different if/else needed. And in top of that, it’s my first experience with Javascript.
    I anticipate your assistance, thanking you in advance.

    I found this for counting the absences, its give you the total that's perfect, but is there a better methode which avoid me to write all the fields name, more simple????
    ( I found the idea here : Re: Total number added automatically  )
    // custom calculation script for field "Total #"
    function CountFields(aFields) {
    var nFields = 0;
    for(i = 0; i < aFields.length; i++) {
    try {
    // count null values, export value of Absence is 0;
    if(this.getField(aFields[i]).value == "0") nFields++;
    } catch(e) {
    if(e['message'] == "this.getField(aFields[i]) has no properties") app.alert("unknown field name: " + aFields[i]);
    else app.alert(e.toString());
    } // end catch
    } // end for aFields
    return nFields;
    // create array of field names to count
    var aNames = new Array("Sheet1AttendanceA","Sheet1AttendanceB","Sheet1AttendanceC","Sheet1AttendanceD","Sh eet1AttendanceE","Sheet1AttendanceF",
    "Sheet1AttendanceG","Sheet1AttendanceH","Sheet1AttendanceI","Sheet1AttendanceJ","Sheet1Att endanceK","Sheet1AttendanceL",
    "Sheet1AttendanceM","Sheet1AttendanceN","Sheet1AttendanceO","Sheet1AttendanceP" );
    // count the non-null fields;
    event.value = CountFields(aNames);
    As for the 2nd question, I've tried to do something similar to the previous script, but of course it doesn't work, but I am quite sure that the idea is similar:
    I don't know also how to add the other condition: the student should get A / Pass or B / Pass in order to consider he has finished??? and also how to check these condition from page 2, 3 and 4 and collect the date
    function Datefinished(bFields) {
    d2.value = nFields[i].value;
    for(i = 0; i < aFields.length; i++) {
    try {
    if(this.getField(aFields[i]).value == this.getField("NumberLines").value) d2.value = nFields[i].value;
    } catch(e) {
    if(e['message'] == "this.getField(aFields[i]) has no properties") app.alert("unknown field name: " + aFields[i]);
    else app.alert(e.toString());
    } // end catch
    } // end for aFields
    return nFields;
    // create array of field names to check
    var aNames = new Array("Texte00","Texte54","Texte56","Texte58","Texte60","Texte62","Texte64","Texte66","Te xte68","Texte70","Texte72","Texte74","Texte76","Texte78","Texte80","Texte82");
    var bNames = new Array("d1","d3","d4","d5","d6","d7","d8","d9","d10","d11","d12","d13","d14 ","d15","d16","d17");   // d1 is included because in some cases a student can finish in 1 day (short text);

Maybe you are looking for

  • Is PI 7.1 IDES is available in the Market Place?

    Is PI 7.1 IDES is available in the Market Place for practice purpose? Thanks Frooq.

  • ORA-00911: invalid character

    I am trying to create a Table of Contents within Crystal Reports 9 from a query and tables in PeopleSoft. I have read many posts about ways to make this possible but I have not yet succeeded. I am currently trying to create a subreport thru the Add C

  • Simple App - Huge Lag. Please Help.

    So I have built a simple app that has 40 frames in the timeline. On each of those frames, I have an 2 images (PNG format) at 320x480 that come in at about 15kb each. I also have a block of text and 3 buttons. One button calls to an event that sets th

  • Time Machine Disk duplication issue...is this normal?

    Thanks in advance for any help you can give me. The image below is what I get when I pick the "Select disk" button in the Time Machine system preference window. It shows my time capsule disk is selected for the backup disk, but then underneath it is

  • Import from outlook fails Windows 7 64-bit

    I can install either Thunderbird or early bird and cannot import my email from Outlook (2007).