Default set to current month

Hello ,
In report i am using an user input variable for cal month.
When ever user opens the report the current month must be set as an input to that variable! and after that if they want to see the data for other month then they need to chnge it.
How to do this !
Help me with the informations and steps please!
Kind regards
Ram
Points will be assigned!

Write the following code for the variable var1 in CMOD
WHEN  'var1'.
    IF i_step = 1.
      REFRESH e_t_range.
      CLEAR l_s_range.
      l_s_range-sign = 'I'.
      l_s_range-opt = 'EQ'.
      l_s_range-low = sy-datum(6) .
      APPEND l_s_range TO e_t_range.

Similar Messages

  • How to set the current month as the default value of an input control?

    Hello,
    I want to set the current month or current year as the default value of an input control. Something like try to get the month from the currentdate() formula and assign it to the input control.
    Is this possible?
    Thanks & Regards
    SU

    >
    soauniverse wrote:
    > Hello,
    >
    > I want to set the current month or current year as the default value of an input control. Something like try to get the month from the currentdate() formula and assign it to the input control.
    >
    > Is this possible?
    >
    > Thanks & Regards
    > SU
    I don't think so.  I tried to find a property or something in that Input Control but there is nothing to set it that way.

  • Default selection on current month, week and date

    Hi,
    We are on Dashboard 4.1 sp3 the same version as BI.
    The dashboard report is using LiveOffice connection. We are now facing an issue with default selection on current month, week and date.
    The dashboard report drilled down from month, to week, then to date. The dashboard feed -live office report is on month/week/date ascending order - becuase we have running average calcualtion on LO report, it seems have to be in ascending order to get the correnct runnning average.
    I tried to on Insertion to change default seletion, it works on month, but it doesnt working on week and daily.
    but when LO report is on ascending order, on dashboard column chart the default selection is not on the current month, week and date.
    Is there a way to solve the issue. Could anyone please help.
    Thanks,

    Hi Suman,
    Thanks for the quick reply.
    Do you mean I Enable sorting -by categrory labels on Behaviour - common tab.
    Thanks,

  • Have prompt default to the current month?

    One of my prompts displays a list of months; e.g., Jan, Feb, ... Dec. The user selects the month they want to report on. I need the prompt to default to the current month. Is this possible within Web Intelligence?

    What is your data source for your webi report?
    If you are using a universe, you can default the value by following these steps:
    Select default date as today in WEBI
    However if you are using BW then follow the steps in this blog
    Dynamic default values with prompt in webi reports (based on bex queries) in BO
    Regards,
    Josh

  • How to set a default value as current month in already created variable of 0fiscper

    Hi Guys,
    In my report currently we are using a variable for 0fiscper which is mandatory and selection option.
    Now there is a requirement to set current month as default value in that variable.
    Please let me know how can I do that.
    Thanks.
    Dolly

    You need to change the processing type to customer exit of that variable.
    Now in i_step = 1 write the following code:
    Data:dt LIKE sy-datum,
          zper  TYPE /bi0/oifiscper,
          YR type /bi0/oicalyear,
          per LIKE t009b-poper.
    IF i_step = 1.
    WHEN 'X_FSCPRC' .---User input variable based on cmod.
          dt = sy-datum.
          CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
            EXPORTING
              i_date         = dt
              i_periv        = 'M3'---Give the fiscal year variant                             according to your system
            IMPORTING
              e_buper        = per
              e_gjahr        = yr
            EXCEPTIONS
              input_false    = 1
              t009_notfound  = 2
              t009b_notfound = 3
              OTHERS         = 4.
          IF sy-subrc = 0.
    Concatenate YR Per into Zper.
            l_s_range-low = Zper.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
          ENDIF.
    endif.

  • OWL with Default Set containting Current Date as query parameter

    Hello Everybody,
    I have a custom BO which mainly consists of a name and a time period (start and end date).
    Now I'd like to create a Default set like
    "Give me all objects with today between start and end date."
    I already tried the following:
    Filling a field using UI-Scripting:
    $data.UIState.Today = $controller.DateTimeUtils.DateNow;
    Copy the field into the search parameter
    executing the query with this search parameter.
    However, I using this approach, I only managed to search for objects matching exactly todays date, but not using greater/lower comparators.
    Furthermore I also searched for a field transformation giving me the current date but did not succeed.
    Does anyone have any ideas how to achieve this or how to get one of the above ideas to work?
    Best regards,
    Ludger

    Hello Ludger,
    That`s what I expected: The fields do not define the interval.
    Therefore you need to define it by yourself via this "less or equal".
    What you can do in the UI Designer at the query definition is to provide an interval
    For the field "CurrentDate" provide
    - SelectOption = "between"
    - Low Value = your start date
    - High Value = your end date
    - Select Option = "include"
    HTH,
        Horst

  • How to refresh/apply column value default setting on current files or folders

    Hi All
    I have set-up default column data per folder in my library (via
    Library Settings > Column default settings) and it works great for new documents or folders that are added to the library.
    But what do I do if I have an existing Library with folders and files and need to apply default column data to each? Is there a way of "refreshing" the default columns so that the data is populated through a specific folder and/or its sub-folders?
    (I really hope this is an easy fix or just a setting that I over-looked somewhere!)
    Thank you!

    I had to do this as well recently, and remembered your post.
    Here is the function I wrote , this worked for text, choice, and metadata columns
    It is pretty slow and could be optimized and broken up into more functions, but I had to do several things:
    1. I mass-updated the content types in a library
    2. On Library settings : set default values and also different defaults per folder
    3. For each file I then needed to:
    3.a. either copy the value from a column in the old content type to the new, or
    3.b. set the column to the default
    so this function does step 3, like I said it works for certain types of columns and can be sped up (I used it to update 700 files in a couple minutes), and it makes some assumptions about the environment but this at least is a starting point.
    As Alex said you may want to change SystemUpdate($true) to just Update(), depending on your requirements.
    <#
    .SYNOPSIS
    Resets columns in a document library to defaults for blank columns. Use this
    after changing the content types or adding columns to a doc lib with existing files
    .DESCRIPTION
    Resets columns in a doc lib to their defaults. Will only set them if the columns are blank (unless overridden)
    Will also copy some values from one column to another while you are there.
    Can restrict the update to a subset of columns, or have it look for all columns with defaults.
    Will use the list defaults as well as folder defaults.
    All names of columns passed in should use InternalName.
    This has ONLY been tested on Text, Choice, Metadata, and mult-Choice and Mult-Metadata columns
    Pass in a list and it will recursively travel down the list to update all items with the defaults for the items in that folder.
    If you call it on a folder, it will travel up the tree of folders to find the proper defaults
    Author:
    Chris Buchholz
    [email protected]
    @plutosdad
    .PARAMETER list
    The document library to update. Using this parameter it will update all files in the doc lib
    .PARAMETER folder
    The folder containing files to update. Function will update all files in this folder and subfolders.
    .PARAMETER ParentFolderDefaults
    Hashtable of internal field names as KEY, and value VALUE, summing up all the parent folders or list defaults.
    If not supplied, then the function will travel up the tree of folders to the parent doclib to determine
    the correct defaults to apply.
    If the field is managed metadata, then the value is a string
    Currently only tested for string and metadata values, not lookup or date
    .PARAMETER termstore
    The termstore to use if you are going to update managed metadata columns, this assumes we are only using the one termstore for all columns to update
    If you are using the site collection specific termstore for some columns you want to update, and
    the central termstore for others, then you should call this method twice, once with each termstore,
    and specify the respective columns in fieldsToUpdate
    .PARAMETER fieldsToCopy
    Hashtable of internal field names, where KEY is the "to" field, and VALUE is the "from" field
    Use this to copy values from one field to another for the item.
    These override the defaults, and also cause the "from" (Value) fields to NOT be overwritten with defaults even if
    they are in the fieldsToUpdate array.
    Example: @{"MyNewColumn" = "My_x0020_Old_x0020_Column"}
    .PARAMETER fieldsToUpdate
    If supplied then the method will update only the fields in this array to their default values, if null then it will update
    all fields that have defaults.
    If you pass in an empty array, then this method will only copy fields in the fieldtocopy and not
    apply any defaults
    Example: @() - to only copy and not set any fields to default
    Example2: @('UpdateField1','UpdateField2') will
    .EXAMPLE
    Set-SPListItemValuesToDefaults -list $list -fieldsToCopy @{"MyNewColumn" = "My_x0020_Old_x0020_Column"} -fieldsToUpdate @() -overwrite -termStore $termStore
    This will not set any defaults, but instead only set MyNewColumn to non null values of My_x0020_Old_x0020_Column
    It will overwrite any values of MyNewColumn
    .EXAMPLE
    Set-SPListItemValuesToDefaults -list $list -overwrite
    This will set all columns to their default values even if they are filled in already
    .EXAMPLE
    Set-SPListItemValuesToDefaults -folder $list.RootFolder.SubFolder[3].SubFolder[5]
    This will set all columns to their defaults in the given subfolder of a library
    .EXAMPLE
    Set-SPListItemValuesToDefaults -list $list -fieldsToUpdate @('ColumnOneInternalName','ColumnTwoInternalName')
    This will set columns ColumnOneInternalName and ColumnTwoInternalName to their defaults for all items where they are currently null
    .EXAMPLE
    Set-SPListItemValuesToDefaults -list $list -fieldsToCopy @{"MyNewColumn" = "My_x0020_Old_x0020_Column"} -fieldsToUpdate @("MyNewColumn") -termStore $termStore
    This will set all MyNewColumn values to their default, and then also copy the values of My_x0020_Old_x0020_Column to MyNewColumn where the old column is not null,
    but both of these will only happen for items where MyNewColumn is null
    .EXAMPLE
    Set-SPListItemValuesToDefaults -list $list -fieldsToCopy @{"MyNewColumn" = "My_x0020_Old_x0020_Column"} -termStore $termStore
    This will set ALL columns with defaults to the default value (if the item's value is null),
    except for My_x0020_Old_x0020_Column which will not be modified even if it has a default value, and will also set MyNewColumn to the
    value of My_x0020_Old_x0020_Column if the old value is not null
    #>
    function Set-SPListItemValuesToDefaults {
    [CmdletBinding(SupportsShouldProcess=$true)]
    param(
    [Parameter(Mandatory=$true,ValueFromPipeline=$true,ParameterSetName="List")][Microsoft.SharePoint.SPList]$list,
    [Parameter(Mandatory=$true,ValueFromPipeline=$true,ParameterSetName="Folder")][Microsoft.SharePoint.SPFolder]$folder,
    [Parameter(Mandatory=$false,ParameterSetName="Folder")][HashTable]$ParentFolderDefaults,
    [Parameter(Mandatory=$false)][HashTable]$fieldsToCopy,
    [Parameter(Mandatory=$false)][Array]$fieldsToUpdate,
    [Parameter(Mandatory=$false)][Microsoft.SharePoint.Taxonomy.TermStore]$termStore,
    [Switch]$overwrite,
    [Switch]$overwriteFromFields
    begin {
    #one or both can be null, but if both empty, then nothing to do
    if ($null -ne $fieldsToUpdate -and $fieldsToUpdate.Count -eq 0 -and
    ( $null -eq $fieldsToCopy -or $fieldsToCopy.Count -eq 0)) {
    Write-Warning "No fields to update OR copy"
    return
    if ($PSCmdlet.ParameterSetName -eq "Folder") {
    $list = $folder.DocumentLibrary
    if ($null -eq $termStore ) {
    $taxonomySession = Get-SPTaxonomySession -site $list.ParentWeb.Site
    $termStores = $taxonomySession.TermStores
    $termStore = $termStores[0]
    #if we did not pass in the parent folder defaults then we must go backward up tree
    if ($PSCmdlet.ParameterSetName -eq "Folder" -and $null -eq $ParentFolderDefaults ) {
    $ParentFolderDefaults = @{}
    if ($null -eq $fieldsToUpdate -or $fieldsToUpdate.Count -gt 0) {
    write-Debug "ParentFolderDefaults is null"
    $tempfolder=$folder.ParentFolder
    while ($tempfolder.ParentListId -ne [Guid]::Empty) {
    Write-Debug "at folder $($tempfolder.Url)"
    $pairs = $columnDefaults.GetDefaultMetadata($tempfolder)
    foreach ($pair in $pairs) {
    if (!$ParentFolderDefaults.ContainsKey($pair.First)) {
    Write-Debug "Folder $($tempfolder.Name) default: $($pair.First) = $($pair.Second)"
    $ParentFolderDefaults.Add($pair.First,$pair.Second)
    $tempfolder = $tempfolder.ParentFolder
    #listdefaults
    Write-Debug "at list"
    foreach ($field in $folder.DocumentLibrary.Fields) {
    if ($field.InternalName -eq "_ModerationStatus") { continue }
    #$field = $list.Fields[$name]
    if (![String]::IsNullOrEmpty($field.DefaultValue)) {
    #Write-Verbose "List default found key $($field.InternalName)"
    if (!$ParentFolderDefaults.ContainsKey($field.InternalName)) {
    Write-Debug "List Default $($field.InternalName) = $($field.DefaultValue)"
    $ParentFolderDefaults.Add($field.InternalName,$field.DefaultValue)
    process {
    Write-Debug "Calling with $($PSCmdlet.ParameterSetName)"
    Write-Debug "Parent folder hash has $($ParentFolderDefaults.Count) items"
    if ($PSCmdlet.ParameterSetName -eq "List" ) {
    $folder = $list.RootFolder
    $ParentFolderDefaults=@{}
    if ($null -eq $fieldsToUpdate -or $fieldsToUpdate.Count -gt 0) {
    foreach ($field in $list.Fields) {
    if ($field.InternalName -eq "_ModerationStatus") { continue }
    if (![String]::IsNullOrEmpty($field.DefaultValue)) {
    Write-Debug "List Default $($field.InternalName) = $($field.DefaultValue)"
    $ParentFolderDefaults.Add($field.InternalName,$field.DefaultValue)
    Write-Verbose "At folder $($folder.Url)"
    $FolderDefaults=@{}
    $FolderDefaults += $ParentFolderDefaults
    if ($null -eq $fieldsToUpdate -or $fieldsToUpdate.Count -gt 0) {
    $pairs = $columnDefaults.GetDefaultMetadata($folder)
    foreach ($pair in $pairs) {
    if ($FolderDefaults.ContainsKey($pair.First)) {
    $FolderDefaults.Remove($pair.First)
    Write-Debug "Folder $($folder.Name) default: $($pair.First) = $($pair.Second)"
    $FolderDefaults.Add($pair.First,$pair.Second)
    #set values
    foreach ($file in $folder.Files) {
    if ($file.CheckOutType -ne [Microsoft.SharePoint.SPFile+SPCheckOutType]::None) {
    Write-Warning "File $($file.Url).CheckOutType = $($file.CheckOutType)) ... skipping"
    continue
    $item = $file.Item
    $ItemDefaults=@{}
    $ItemDefaults+= $FolderDefaults
    #if we only want certain fields then remove the others
    #Move this to every time we add values to the defaults
    if ($null -ne $fieldsToUpdate ) {
    $ItemDefaults2=@{}
    foreach ($fieldInternalName in $fieldsToUpdate) {
    try {
    $ItemDefaults2.Add($fieldInternalName,$ItemDefaults[$fieldInternalName])
    } catch { } #who cares if not in list
    $ItemDefaults = $ItemDefaults2
    #do not overwrite already filled in values unless specified
    if (!$overwrite) {
    $keys = $itemDefaults.Keys
    for ($i=$keys.Count - 1; $i -ge 0; $i-- ) {
    $key=$keys[$i]
    try {
    $val =$item[$item.Fields.GetFieldByInternalName($key)]
    if ($val -ne $null) {
    $ItemDefaults.Remove($key)
    } catch {} #if fieldname does not exist then ignore, we should check for this earlier
    #do not overwrite FROM fields in copy list unless specified
    if (!$overwriteFromFields) {
    if ($null -ne $fieldToCopy -and $fieldsToCopy.Count -gt 0) {
    foreach ($value in $fieldsToCopy.Values) {
    try {
    $ItemDefaults.Remove($value)
    } catch {} #who cares if not in list
    #do not overwrite TO fields in copy list if we're going to copy instead
    if (!$overwriteFromFields) {
    if ($null -ne $fieldToCopy -and $fieldsToCopy.Count -gt 0) {
    foreach ($key in $fieldsToCopy.Keys) {
    $fromfield = $item.Fields.GetFieldByInternalName($fieldsToCopy[$key])
    try {
    if ($null -ne $item[$fromfield]) {
    $ItemDefaults.Remove($key)
    } catch {} #who cares if not in list
    Write-Verbose $item.Url
    $namestr = [String]::Empty
    if ($ItemDefaults.Count -eq 0) {
    write-Verbose "No defaults, copy only"
    } else {
    $str = $ItemDefaults | Out-String
    $namestr += $str
    Write-Verbose $str
    if ($null -ne $fieldsToCopy -and $fieldsToCopy.Count -gt 0) {
    $str = $fieldsToCopy | Out-String
    $namestr +=$str
    if ($PSCmdlet.ShouldProcess($item.Url,"Set Values: $namestr"))
    #defaults
    if ($null -ne $ItemDefaults -and $ItemDefaults.Count -gt 0) {
    foreach ($key in $ItemDefaults.Keys) {
    $tofield = $item.Fields.GetFieldByInternalName($key)
    if ($tofield.TypeAsString -like "TaxonomyFieldType*") {
    $taxfield =[Microsoft.SharePoint.Taxonomy.TaxonomyField]$tofield
    $taxfieldValue = New-Object Microsoft.SharePoint.Taxonomy.TaxonomyFieldValue($tofield)
    $lookupval=$ItemDefaults[$key]
    $termval=$lookupval.Substring( $lookupval.IndexOf('#')+1)
    $taxfieldValue.PopulateFromLabelGuidPair($termval)
    if ($tofield.TypeAsString -eq "TaxonomyFieldType") {
    $taxfield.SetFieldValue($item,$taxfieldValue)
    } else {
    #multi
    $taxfieldValues = New-Object Microsoft.SharePoint.Taxonomy.TaxonomyFieldValueCollection $tofield
    $taxfieldValues.Add($taxfieldValue)
    $taxfield.SetFieldValue($item,$taxfieldValues)
    } else {
    $item[$field]=$ItemDefaults[$key]
    #copyfields
    if ($null -ne $fieldsToCopy -and $fieldsToCopy.Count -gt 0) {
    #$fieldsToCopy | Out-String | Write-Verbose
    foreach ($key in $fieldsToCopy.Keys) {
    $tofield = $item.Fields.GetFieldByInternalName($key)
    $fromfield = $item.Fields.GetFieldByInternalName($fieldsToCopy[$key])
    if ($null -eq $item[$fromfield] -or ( !$overwrite -and $null -ne $item[$tofield] )) {
    continue
    if ($tofield.TypeAsString -eq "TaxonomyFieldType" -and
    $fromfield.TypeAsString -notlike "TaxonomyFieldType*" ) {
    #non taxonomy to taxonomy
    $taxfield =[Microsoft.SharePoint.Taxonomy.TaxonomyField]$tofield
    $termSet = $termStore.GetTermSet($taxfield.TermSetId)
    [String]$fromval = $item[$fromfield]
    $vals = $fromval -split ';#' | where {![String]::IsNullOrEmpty($_)}
    if ($null -ne $vals -and $vals.Count -ge 0 ) {
    $val = $vals[0]
    if ($vals.Count -gt 1) {
    write-Warning "$($item.Url) Found more than one value in $($fromfield.InternalName)"
    continue
    $terms =$termSet.GetTerms($val,$true)
    if ($null -ne $terms -and $terms.Count -gt 0) {
    $term = $terms[0]
    $taxfield.SetFieldValue($item,$term)
    Write-Verbose "$($tofield.InternalName) = $($term.Name)"
    } else {
    Write-Warning "Could not determine term for $($fromfield.InternalName) for $($item.Url)"
    continue
    } elseif ($tofield.TypeAsString -eq "TaxonomyFieldTypeMulti" -and
    $fromfield.TypeAsString -notlike "TaxonomyFieldType*" ) {
    Write-Debug "we are here: $($item.Name): $($fromfield.TypeAsString) to $($tofield.TypeAsString )"
    #non taxonomy to taxonomy
    $taxfield =[Microsoft.SharePoint.Taxonomy.TaxonomyField]$tofield
    $termSet = $termStore.GetTermSet($taxfield.TermSetId)
    $taxfieldValues = New-Object Microsoft.SharePoint.Taxonomy.TaxonomyFieldValueCollection $tofield
    [String]$fromval = $item[$fromfield]
    $vals = $fromval -split ';#' | where {![String]::IsNullOrEmpty($_)}
    foreach ($val in $vals){
    $terms =$termSet.GetTerms($val,$true)
    if ($null -ne $terms -and $terms.Count -gt 0) {
    $term=$terms[0]
    $taxfieldValue = New-Object Microsoft.SharePoint.Taxonomy.TaxonomyFieldValue($tofield)
    $taxfieldValue.TermGuid = $term.Id.ToString()
    $taxfieldValue.Label = $term.Name
    $taxfieldValues.Add($taxfieldValue)
    } else {
    Write-Warning "Could not determine term for $($fromfield.InternalName) for $($item.Url)"
    continue
    #,[Microsoft.SharePoint.Taxonomy.StringMatchOption]::ExactMatch,
    $taxfield.SetFieldValue($item,$taxfieldValues)
    $valsAsString = $taxfieldValues | Out-String
    Write-Debug "$($tofield.InternalName) = $valsAsString"
    } elseif ($tofield.TypeAsString -eq "TaxonomyFieldTypeMulti" -and
    $fromfield.TypeAsString -eq "TaxonomyFieldType" ) {
    #single taxonomy to multi
    $taxfieldValues = New-Object Microsoft.SharePoint.Taxonomy.TaxonomyFieldValueCollection $tofield
    $taxfield =[Microsoft.SharePoint.Taxonomy.TaxonomyField]$tofield
    $taxfieldValues.Add($item[$fromfield])
    $taxfield.SetFieldValue($item,$taxFieldValues)
    Write-Verbose "$($tofield.InternalName) = $valsAsString"
    } elseif ($tofield.TypeAsString -eq "TaxonomyFieldType" -and
    $fromfield.TypeAsString -eq "TaxonomyFieldTypeMulti" ) {
    #multi taxonomy to single taxonomy
    Write-Warning "multi to non multi - what to do here"
    continue
    } elseif ($tofield.TypeAsString -eq "Lookup" -and
    $fromfield.TypeAsString -ne "Lookup" ) {
    #non lookup to lookup
    Write-Warning "non lookup to lookup - still todo"
    continue
    } else {
    #straight copy
    $item[$tofield] = $item[$fromfield]
    $item.SystemUpdate($false)
    $folders = $folder.SubFolders | where name -ne "Forms"
    $folders | Set-SPListItemValuesToDefaults -ParentFolderDefaults $FolderDefaults -fieldsToCopy $fieldsToCopy -fieldsToUpdate $fieldsToUpdate -overwrite:$overwrite -overwriteFromFields:$overwriteFromFields -termStore $termStore

  • Displaying current month with all empty months

    None of the answers I've seen for showing current month in a calendar has given a solid answer. So, here is my question. My objective is to display all calendar months rather they are empty or not, plus I want the calendar to start at the current month. I added coding to display a next month and previous month button, so you should be able to click next or previous month from the current month showing. I have the "Show All Empty Months" checked in the Display Options under Common Options and the start and end date are empty. I have a bind variable in my coding that defaults to the current month but it will not show an empty month. I get the "no rows returned" situation because it doesn't have anything in it. Is there a solution to showing all empty months?
    Also, has anyone found a solution to hide/remove the default Next/Previous buttons? I read in one of the replies that this would be fixed in a forthcoming release. Is this true?
    Thanks for any assistance.

    The calendar works on a sql query result. I had done something similar to what you are looking for by spoofing the sql query to return rows for all the months which I am interested in. I had a query like the following.
    select *
    from scott.emp a , ( select (trunc(sysdate) - 7910 + rownum) dat from user_objects ) b
    where b.dat = a.hiredate (+)
    Hope you can do something similar to this.

  • Find number of days in current month

    Hi Folks ,
    I needed some help in knowing the number of days in any month ... I need to develop an application which will be triggering a mail with an excel attachment at the end of every month ...after populating the excel sheet from an Oracle database ..
    Kindly help...
    Thx..

    Thx a lot for your immediate reply .. I tried using
    the calender class. But for my application .. i need
    to automate this process by sending a mail every last
    day of the month... but i am finding it a bit
    difficult to really automate setting the current
    month to the Timer class
    Timer timer;
         public Reminder ( int seconds ) { 
              timer = new Timer ( ) ;
    timer.schedule( new RemindTask ( ), seconds*1000
    000 ) ;
         }The Calendar class is still the best solution IMHO.

  • Is there any predefined functions to get the current month info?

    Hi,
    I have a business rule which is used to calculate the budget of current month. Right now, I set the current month as a variable, which will need to be changed every month, I know it's stupid, I am new to this area, so I am thinking is there any better way to do this?
    Any inputs is appreciated.
    Thanks
    Tony

    Using substitution variables for current month is perfectly acceptable and widely used.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Current month as default value in a parameter porlet

    Hello,
    i need to pass month as a parameter to a discoverer worksheet that i've added to my page in portal.
    i'd been doing this with a single parameter form setting the default value manually while testing page.
    now i'd need to set the default value as the current month to put the page in "production".
    i think it's not possible to get the date from the system (sysdate) in a single parameter form but maybe this can be done with an omniportet.
    thanks for helping,
    dani

    If you are using a datatemplate , you can have a beforereport trigger that will have a package call.
    In the package spec, define a date variable and also define the function beforereporttrigger that retruns boolean.
    In the body, define the beforereporttrigger function with
    begin
    select sysdate into specvariable from dual
    return(true);
    end;
    You can then use the variable in the datatemplate as :variable.
    Hope this helps.
    - Vasu -

  • How set current month in Voyager using BEX Query 7.0

    Hi:
      I have a voyager workspace connected a SAP BI Query 7.0. My query shows information since 2007 to 2009
      How I can set current month in characteristics defined in slice section? I tried to use a exit variable in proposed values query section but it doesn't works, when I use filter section in my BEX query it show only  information for 1 month.
    Thanks
    Marta Díaz

    Hi,
    From the problem report i understand that you want to open the Voyager workspace with all the data, but want to analyze for only the current month. 
    You can achieve it in the following manner.
    a) Open the Voyager report.
    b) Click on the member selector of the slice.
    c) Deselect the default member and then select the current month.
    d) Click on OK button.
    This should show you the data for only the current month.
    If you want to make use of exit variable by using the SAP query designer then try using the current calendars month variable.
    You can also refer from the discussion below in the thread to create a variable.
    Dafault value previous month in BEx
    Hope this helps.
    Thanks

  • Default value in a variable - current month

    Hi!
    I have a infoobject called CREATE_MONTH. My queries divides the result based on this month. If there are several month it summarize the result. The CREAT_MONTH is a free characteristics, and not defined in the main table.
    I want the current month value as a default. Is this possible?

    Hi.....
    As already told......You have to use an Offset for the variable...
    Check this :
    Re: How to create a variable in Bex Query Designer
    This will help you.........
    Regards,
    Debjani.........

  • Set variable date in a procedure with current month and previous month

    Hi guys, I need to set two date range in one procedure. The date should be
    @datefrom the third day of the current month
    @dateto the seventh day of the current month
    @datefrom-1 the third day of the previous month
    @dateto-1 the seventh day of the previous month
    format like @datefrom '2014-03-03' @dateto '2014-03-07'
    @datefrom '2014-02-03' @dateto '2014-02-07'
    The problem for me it's going to be the jump between the years...2014 to 2015...any advice?
    Thanks

    DECLARE @FirstDayOfCurrentMonth DATE
    SELECT @FirstDayOfCurrentMonth = DATEADD(MONTH, DATEDIFF(MONTH, '01/01/1900', Current_timeStamp), '01/01/1900')
    SELECT
    DATEADD(DAY, 2, @FirstDayOfCurrentMonth) As ThirdDayOfCurrentMonth
    ,DATEADD(DAY, 6, @FirstDayOfCurrentMonth) As SeventhDayOfCurrentMonth
    ,DATEADD(DAY, 2, DATEADD(MONTH, -1, @FirstDayOfCurrentMonth)) As ThirdDayOfPreviousMonth
    ,DATEADD(DAY, 6, DATEADD(MONTH, -1, @FirstDayOfCurrentMonth)) As SeventhDayOfPreviousMonth
    OUTPUT
    ThirdDayOfCurrentMonth SeventhDayOfCurrentMonth ThirdDayOfPreviousMonth SeventhDayOfPreviousMonth
    2014-12-03 2014-12-07 2014-11-03 2014-11-07
    Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered.

  • How to get the current month starting date and ending date by default ?

    Hello Creators,
    This is my requirement, kindly do the needful, Please dont gimme any links i've no access for other sites, gimme the right solution.
    My Requirement :
    Creation Date (VBAK-ERDAT) - Select Option. By default, the program should run for the current Month ie between the starting and ending date of the current month when the program is run. Today the date is 18th using sy-datum we can bring the current date by calling it in the initialization event, but the requirement is it should not give me the current date, it should only give me the month starting date and the end date. Kindly help.
    Thanks in advance ...

    DATA: gv_datum LIKE vbak-erdat.
    SELECT-OPTIONS: so_date FOR gv_datum.
    INITIALIZATION.
      CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
        EXPORTING
          iv_date             = sy-datum
        IMPORTING
          ev_month_begin_date = so_date-low
          ev_month_end_date   = so_date-high.
      so_date-option = 'BT'.
      APPEND so_date.
    START-OF-SELECTION.
    Hope this solves the issue. Don't forget to be generous
    Cheers,
    Sougata.

Maybe you are looking for