Can I code a loop in the forumula for a field?

Post Author: SchneeBaer
CA Forum: Formula
I've created a report for a client that calculates when an employee is eligible for a 401K plan.  There are only 4 dates possible per year.  The formula I've created is a multi-level if conditional, and only goes back 2 years.  Their plan has been in effect for over 10 years. 
Is there any way I can convert the following formula to some type of coded loop that increases the month # by 3 and the year # by 1 (but only for every forth loop)?
Any guidance would be appreciated.
if ( DateValue ({?Report Year}-1 ,1 ,1 ) - {UPR00100.BRTHDATE} >= 7665 and     DateValue ({?Report Year}-1 ,1 ,1 ) - {UPR00100.STRTDATE} >= 365 )
then DateValue ({?Report Year}-1 ,1 ,1 )
else
    if ( DateValue ({?Report Year}-1 ,4 ,1 ) - {UPR00100.BRTHDATE} >= 7665 and         DateValue ({?Report Year}-1 ,4 ,1 ) - {UPR00100.STRTDATE} >= 365 and         ({UPR00100.DEMPINAC} >= DateValue ({?Report Year}-1 ,4 ,1 ) or {UPR00100.DEMPINAC} = Date(1900,1,1)))
    then DateValue ({?Report Year}-1 ,4 ,1 )
    else
        if ( DateValue ({?Report Year}-1 ,7 ,1 ) - {UPR00100.BRTHDATE} >= 7665 and             DateValue ({?Report Year}-1 ,7 ,1 ) - {UPR00100.STRTDATE} >= 365 and             ({UPR00100.DEMPINAC} >= DateValue ({?Report Year}-1 ,7 ,1 ) or {UPR00100.DEMPINAC} = Date(1900,1,1)))
        then DateValue ({?Report Year}-1 ,7 ,1 )
        else
            if ( DateValue ({?Report Year}-1 ,10 ,1 ) - {UPR00100.BRTHDATE} >= 7665 and                 DateValue ({?Report Year}-1 ,10 ,1 ) - {UPR00100.STRTDATE} >= 365 and                 ({UPR00100.DEMPINAC} >= DateValue ({?Report Year}-1 ,10 ,1 ) or {UPR00100.DEMPINAC} = Date(1900,1,1)))
            then DateValue ({?Report Year}-1 ,10 ,1 )
            else
                if ( DateValue ({?Report Year} ,1 ,1 ) - {UPR00100.BRTHDATE} >= 7665 and                     DateValue ({?Report Year} ,1 ,1 ) - {UPR00100.STRTDATE} >= 365  and                    ({UPR00100.DEMPINAC} >= DateValue ({?Report Year} ,1 ,1 ) or {UPR00100.DEMPINAC} = Date(1900,1,1)))
                then DateValue ({?Report Year} ,1 ,1 )
                else
                    if ( DateValue ({?Report Year} ,4 ,1 ) - {UPR00100.BRTHDATE} >= 7665 and                         DateValue ({?Report Year} ,4 ,1 ) - {UPR00100.STRTDATE} >= 365 and                         ({UPR00100.DEMPINAC} >= DateValue ({?Report Year} ,4 ,1 ) or {UPR00100.DEMPINAC} = Date(1900,1,1)))
                    then DateValue ({?Report Year} ,4 ,1 )
                    else
                        if ( DateValue ({?Report Year} ,7 ,1 ) - {UPR00100.BRTHDATE} >= 7665 and                             DateValue ({?Report Year} ,7 ,1 ) - {UPR00100.STRTDATE} >= 365 and                             ({UPR00100.DEMPINAC} >= DateValue ({?Report Year} ,7 ,1 ) or {UPR00100.DEMPINAC} = Date(1900,1,1)))
                        then DateValue ({?Report Year} ,7 ,1 )
                        else
                            if ( DateValue ({?Report Year} ,10 ,1 ) - {UPR00100.BRTHDATE} >= 7665 and                                 DateValue ({?Report Year} ,10 ,1 ) - {UPR00100.STRTDATE} >= 365 and                                 ({UPR00100.DEMPINAC} >= DateValue ({?Report Year} ,10 ,1 ) or {UPR00100.DEMPINAC} = Date(1900,1,1)))
                            then DateValue ({?Report Year} ,10 ,1 )
                            else  DateValue (9999 ,12 ,31 )

It's best to never move iTunes media around in Finder. Add it to the Library through the iTunes interface by dragging them into the window. Once they've been added to the library, you can try using Get Info on the files in iTunes and change the tag info to make them group together. (A unique album name should do this.) If you want them to be included with TV Shows, you can try using Get Info to set the Kind to TV Show (found under the Options tab in Get Info), but I'm not sure if it will work. Otherwise, you could make a playlist and drag them into to access them all in one convenient spot.
If you add the items as noted above and they still do not appear in your library, it's probably because they are not a compatible format.
Message was edited by: Diane Wordsmith

Similar Messages

  • In VB Programming code -- How to access the formula for suppressing a field

    In VB Programming code -- How to access the formula for suppressing a field
    I am using Crystal Reports 2008 v1
    Using VB code, I am attempting to modify a Crystal Report before exporting it into a PDF format and then displaying it on the Web.
    My problem is that I am unable to access the formula used to dynamically suppress a field.
    The following code is working:
    mySections = rd.ReportDefinition.Sections
    For Each mySection As CrystalDecisions.CrystalReports.Engine.Section In mySections
       ' myFieldToChange is a String set to the text of the field I need to adjust the Suppression
       iloop = 0
       For Each RecObj As CrystalDecisions.CrystalReports.Engine.ReportObject In mySection.ReportObjects
               If mySection.ReportObjects.Item(iloop).Name.ToLower = myFieldToChange Then
                   myTextObject = CType(mySection.ReportObjects.Item(iloop), CrystalDecisions.CrystalReports.Engine.TextObject)
                   myTextObject.Text = "new field text goes here"
                   mySection.SectionFormat.EnableSuppress = True
                   '  Here is where I want to change the formula for the Suppression
                End if
                iloop = iloop + 1
        Next
    Next
    I can not find any reference to the actual suppression formula in the SDK help file.
    Note, the EnableSuppress can be set to True for False, but if there is a formula for dynamic suppression, the True or False value is overwritten.  The results of the formula determine the suppression.
    Is there a way to reference this formula.  I know that I can put on in using the Crystal Report Designer software, I need to modify this formula using VB code and the SDK.

    Hello, Mark;
    If you are using the ReportDocument object you do not have access to the Conditional Suppression formula. You can get around it by using a formula field in the report for the supression and then using the FormulaField code to change it at runtime.
    If you want to change the supression condition directly at runtime you need to use RAS and the ReportClientDocument.
    Elaine

  • How can I disable the Reason for Rejection field in VA02 line items

    Hi,
      I dont want the users to be able to change the reason for rejection field in the sales order line items. Can someone please suggest a tried and tested way of doing this
    Thanks for reading.

    Set up an auth object for the field.  In userexit field modification check the auth object and set the field to be grayed out if they don't have authority.  Users can then not change the value of the field  Sample code
    IF screen-name = 'VBAP-ABGRU'.
           AUTHORITY-CHECK OBJECT 'Z_BLK_REAS'
                   ID 'ABGRU' DUMMY.
          IF sy-subrc EQ 0.
            screen-input = 1.
          ELSE.
            screen-input = 0.
          ENDIF.
      ENDIF.

  • Transaction code to unblock / release the order for delivery / billing

    There is "Delivery Block" and "Billing Block" fields at the header data of VA01. What is the transaction code to unblock / release the order for delivery / billing?
    Thanks in advance.

    Go to VA02 and made this field blank.
    Sometimes what happens, release of that field can only be done by authorised personnel. In that case you ahve to ask them to unblock.
    Thanks and Regards
    Pratyush

  • Can u pls tell what r the currency and quantity fields in detail.

    hi to all can u pls teell
    can u pls tell what r the currency and quantity fields in detail.
    what is reference table .and reference fields .why we r giving theese reference table names while creating the currency fields .

    Hi,
    Currency amount fields and quantity fields are numeric fields which each have a currency or unit field assigned to them. The correct interpretation of the values in these fields depends on its currency or unit of measure. Therefore, you can decide whether you want their corresponding currency/unit of measure to be displayed before or after the field, or not at all. Proceed as follows:
    1. Select the field.
    2. Choose one of the options from the window on the lower left (before, No currency field/unit, or after).
    3. Choose Apply.
    For more information check the following link:
    http://help.sap.com/saphelp_nw04/helpdata/en/0b/5da4e42cf511d5b692006094192fe3/frameset.htm
    Following are system variables of currency:
    SY-CCURS
    R/2 - exchange rate and result field for CURRENCY CONVERSION. Not filled in R/3.
    SY-CCURT
    R/2 - table exchange rate for CURRENCY CONVERSION. Not filled in R/3.
    SY-CDATE
    R/2 - exchange rate date for CURRENCY CONVERSION. Not filled in R/3.
    SY-CTABL
    R/2 - exchange rate table for CURRENCY CONVERSION. Not filled in R/3.
    SY-CTYPE
    R/2 - exchange rate type for CURRENCY CONVERSION. Not filled in R/3.
    SY-DCSYS
    Dialog system of the R/2 System. Not filled in R/3.
    SY-WAERS
    Formerly the company code currency after reading a posting segment. Not filled in R/3.
    Regards,
    Bhaskar

  • I just got the new itunes and I can open itunes and see my music but whenI try and go to the itunes store it just loads to a white page. I try and refresh and go to the home page and nothing happens. I can sign into my account and the tabs for the itunes

    I just got the new itunes and I can open itunes and see my music but whenI try and go to the itunes store it just loads to a white page. I try and refresh and go to the home page and nothing happens. I can sign into my account and the tabs for the itunes store pop up like they normally would when browsing the itunes store but when I click on one of them, it is a blank page. Is there a setting I need to change? Does it just take an extremely long time to load? Please help!!

    Bucktr09:
    I'm having the exact same problem.  I upgraded to the newest version of iTunes on my iMac and ever since I did the store is a blank white screen.  I can get my library content but the store is a no go.  Is there any one out there with a solution?

  • How can I add a contact on the calendar for an event

    How can I add a contact on the calendar for an event

    It is between Repeat and Alert on my iPhone 5 with iOS 6.0.1
    I used the + on the top right to add the event and when you look vertically starting with the name, followed by location and then time the rest of the default things includ Invitees, among other items. 

  • HT1386 I can no longer see anything in the "Manually Added Songs" field when managing music on my iPhone4.

    I can no longer see anything in the "Manually Added Songs" field when managing music on my iPhone4. why?

    If you are using iTunes Match, your songs are long gone.
    iTunes Match is now a streaming service, with no regards to letting you download individual files.
    Otherwise, I'm sorry for wasting your time.

  • How can i find the tablename for that  field and suggest the report logic

    Hi experts
    The concept of BOM for finished components are defined in terms of semi finished goods. Hence, routing of a component from raw materials can not be seen directly in system through standard report.
    But users need to have the details of a routing of a component from raw material in one report. To provide the details in single report, development is required.
    With this report users can see the routing from raw material till component in one single report.
    Assumption
    BOM is maintained for a component with all related semi finished components till raw material properly.
    Material Number:  MARA – MATNR   - Multiple selection option should be there (Mandatory)
    Plant: AFRU – WERKS      - Single selection parameter (Mandatory)
    If procurement type is E or X, system has to check the routing through CA03.
    If procurement type if F, leave this field as blank
    1.operator
    2.material
    3.material description
    4.workcenter
    5.vendor
    6.operation description
    7.uom
    8.qty
    9.uom
    10.setuptime
    11.processingtime
    12.deliverytime
    using cs12,cs13
      here i have seen the details of finished goods components like semifinished goods,rawmaterils,i tried se11 to find the the table for relevent field,
    i cant get, if possible to suggest me the logic and how to find the relevent table for
    that field
    Regards
    ds

    for exploding the bom if you know header material use
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
        EXPORTING
          CAPID                 = 'PP01'
          DATUV                 = SY-DATUM
          MEHRS                 = 'X'
          MTNRV                 = P_MATNR
          WERKS                 = P_WERKS
        TABLES
          STB                   = I_BOM
        EXCEPTIONS
          ALT_NOT_FOUND         = 1
          CALL_INVALID          = 2
          MATERIAL_NOT_FOUND    = 3
          MISSING_AUTHORIZATION = 4
          NO_BOM_FOUND          = 5
          NO_PLANT_DATA         = 6
          NO_SUITABLE_BOM_FOUND = 7
          CONVERSION_ERROR      = 8
          OTHERS                = 9.
    now check PLPO & PLKO table for routing or AFVC and AFVV for routing.
    if production order created you have to check in afvc and afvv else check in plpo and plko.
    for checking with plpo and plko you have to check MAPL table.
    for bom and material link
    MAST,STPO,STKO.
    stlnr is the common field
    regards
    shiba dutta

  • How can I uninstall Bootcamp and Recover the partition for the Mac HD

    How can I uninstall Bootcamp and recover the partition for the IMac HD?

    Boot into OSX.  Go back into the Bootcamp utility in the Utilities folder and re-run it.  It will give you the option to remove the Windows partition and make the OSX partition fill the whole drive again.  OSX will NOT be lost in the process.  No re-installing necessary.  Only takes a few minutes or less to complete.

  • HT201269 My old iPhone (I no longer have) is still an active device on my iCloud backup list.  Is it safe to delete it?  Can I be sure everything on the cloud for that old device has been transferred?

    My old iPhone (I no longer have) is still an active device on my iCloud backup list.  Is it safe to delete it?  Can I be sure everything on the cloud for that old device has been transferred?

    The only way the backup from ilcoud has been transferred to a new apple device would be if YOU restored the new device with the mentioned backup. There is nothing 'safe' about you deleting this backup if in fact you have not restored the new device with this backup.
    Good luck Friend.

  • Where can I find a copy of the eula for Adobe Acrobat XI?

    Where can I find a copy of the eula for Adobe Acrobat XI?
    The eula does not come up for inspection when you install the software.

    http://www.adobe.com/legal/licenses-terms.html

  • Hello i have a problem  i can not use adobe programs. The payment for the month march is not be payed, but i will pay the payment.I can not found where i can do that. Also i see that my membership is stopped.

    Hello i have a problem  i can not use adobe programs.
    The payment for the month march is not be payed, but i will pay the payment.I can not found where i can do that. Also i see that my membership is stopped.

    Try the not-charging topic of:
    iPod touch: Hardware troubleshooting
    It could be that the battery is dead.

  • Can you buy an ipad in the us for use in canada, can you buy an ipad in the us for use in canada

    can you buy an ipad in the us for use in canada, can you buy an ipad in the us for use in canada

    If its bought factory unlocked ( they Are mcuh more expensive) yes
    If not then it will be sim locked to the american carrier
    No matter what then warrenty will only be valid in usa

  • Can u plz anyone explain me the procedure for modifying script

    can u plz anyone explain me the procedure for modifying script.
    i.e no need of coding
    just i want procedure.

    Hi sriharitha,
    IN SE71, use the environment function 'copy from client' and make a copy of the existing script to the Z namespace. The make the modifications in SE71 as required. In cistomizing, make the new form known. Actiovate and transport.
    Regards,
    Clemens

Maybe you are looking for

  • Performance concern with directory server implementation

    performance concern with directory server implementation I first posted this at metalink forum, and was suggested to post it here instead. Hi, I'd like to get any feedback regarding performance of oracle directory server implementation. Below is what

  • E65 video transfer from pc

    hello, i dont know how to transfer avi,mpeg,mpg type videos from my pc to my nokia e65... my phone cant read the program file, why is that so? are there any aditional software for my pc or phone that i should download? i hope someone could clear thin

  • Printer (All-In-One) Suggestions

    Can anyone out there give me a suggestion for a moderately priced decent printer. I got a suggestion in a Mac Store to get the Canon PIXMA 310 and the colors print horribly. Any suggestions for one that is best compatible with Macs. All-In-One (Print

  • User-defined include structures in FI

    Hi all, Can any body explain me about user-defined include structures in FI and how to do the enhancements..Plz suggest me by explaining with ABAP code. Plz tell me step by step. Thanks, Jack

  • Installation of JDK 1.2 on Pentium 4 machine

    I can not seem to install JDK 1.2 on Pentium 4. I have taken care of PATH and CLASSPATH in Autoexec.bat.I have also tried installing it on two different systems. I am able to install a higher version of the same but I need JDK 1.2 only. Can somebody