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.

Similar Messages

  • How to get the current month number

    Hi everyone,
    Does anybody know how to get the current month number in Oracle Discoverer Worksheet calculation?
    I try to use EUL_DATE_TRUNC(CURRENT_DATE, 'MM'), but instead I got 01-AUG-00.
    If I change the data display format to MM, it will give me "08" but if I use TO_NUMBER function to convert it to number I get error "invalid number"
    Is there anyway to get the current month value in number? Thanks

    Scott,
    Thank you so much! It works perfectly! :)
    Hope you have a great day ahead!
    Cheers,
    Angeline

  • How to Get the current month at timezone UTC-10

    Hi All,
       can you please let me know How to Get the current month at timezone UTC-10.
    Function module ? which date and time needs to pass.

    Hi,
    Try with following code.
    DATA zdate TYPE  D.
    DATA ztime TYPE  T.
                      CALL FUNCTION 'ISU_DATE_TIME_CONVERT_TIMEZONE'
                        EXPORTING
                          x_date_utc          = sy-datum
                          x_time_utc          = sy-uzeit
                          x_timezone          = 'UTC-10'
                       IMPORTING
                         Y_DATE_LCL          = zdate
                         Y_TIME_LCL          = ztime
                       EXCEPTIONS
                         GENERAL_FAULT       = 1
                         OTHERS              = 2.
                      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                      ENDIF.
    WRITE : zdate, / ztime.
    Thank you,
    Sekhar.

  • How to get the current month value for a customer exit variable?

    How to get the current month value for a customer exit variable? 
    And also if we have an InfoObject with date value (including date, month, year), then how to derive the month value from this date type of Char.?
    Thanks!

    Hi Kevin,
    Check here........
    Re: Customer Exist for "From Current Date To Month End"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Cal month
    Regards,
    Vijay.

  • How to know the process chain start time and end time

    Hi Experts,
                   How to know the process chain start time  and end time .
    Thanks in advance
    Regards
    Gutti
    Edited by: guttireddy on Feb 23, 2012 11:30 PM

    Hi Reddy,
    You may find the run time of a PC using below steps.
    1. Call SE38 > /SSA/BWT > Execute  > Enter your PC , choose the date and time > Execute. Here Run-time of a PC is displayed. (or)
    2. Call RSPC1 > Enter your PC > Execute > Goto Log view > Right click on the start Variant > Displaying Messages > Note down the start time in Chain Tab. Now Right click on the last Process type of the PC > Displaying Messages > Note down the End time in Chain Tab. The Difference b/w start time and end time gives the Run-time of your PC.
    Hope this helps.
    Regards
    Sai

  • How to get the current month for a variable based on info object 0FISCPER3

    Hie Gurus
    I am working on the financial reports i am failing to derive the Current month from the variable based on infobject 0FISCPER3 PERIOD .
    I would also like to get the same month from the prevoius year. Any ideas?

    If I understood correctly, you need in your repot
    Current Month Plan This year || YTD Plan This Year || Current Month Plan Last Year || YTD Plan Last Year
    Your variable 0I_FISCPER3 must be on the object 0FISCPER3 which is nothing but just the Fiscal Period. This variable is a user entry mandatory Interval variable.
    if you are entering a range in the input screen for this variable, you will get cumulative values. If you just need to get the value for a month in first column your report, you will have to create another variable of type Customer Exit which will read the "To value" entered for the variable 0I_FISCPER3 and columns for Current Month should be restricted on this variable.
    if you are entering a single value in the selection screen of this variable, current month column should be restricted on this variable with "Equal To" operation and YTD colmns should be restricted to "Less Than Equal to" operator with this variable.
    0FISCPER3 just have posting period and not year, so you will have to use varialbes for 0FISCYEAR separately.
    Please let us know if it helps or if you are using some other variable based on 0FISCPER3 or 0FISCPER.
    Regards,
    Gaurav

  • How to get the current values of LINESIZE and WRAP in SQLplus ?

    How do I get the current values for the SQLplus environment variables
    e.g. LINESIZE, WRAP, PAGESIZE ?
    When I type
    SQL> show parameter LINESIZE
    nothing is displayed.
    Is there a command to show ALL existing current paramter values at once ?

    SQL> show linesize
    linesize 134
    SQL> show wrap
    wrap : regels zullen omgeslagen worden
    SQL> show pagesize
    pagesize 50000And you can issue a "show all" to see all settings at once.
    Regards,
    Rob.

  • How to get the currrent month and year from a new date object

    If I create a new Date object as "d",
    java.util.Date d = new java.util.Date();how can I format the date to get the current Month as 'Jan' and the current year as '2008'. So if I have something like d.getMonth() gets the current month as 'Oct' and d.getYear() gets '2008'
    Thanks,
    Zub

    [Read the flamin' manual you must. Hmm.|http://en.wikipedia.org/wiki/RTFM]
    ~~ Yoda.
    Well no actually, he didn't say that, but he should have.
    Cheers. Keith.
    PS: Don't say that to a 7 foot pissedOff wookie when he's got his head stuck in a smoking hyperdrive, and you're being chased by a S-class battle cruiser... Ask Yoda how he got to be so short.
    PPS: It is the SimpleDateFormat you seek ;-)
    Edited by: corlettk on 14/10/2008 22:37 ~~ Also far to slow... but funny.

  • How to get the current Mailbox size

    Hi,
    Does anyone know how to get the current size of Mailbox and Archive by using GW api?

    Originally Posted by NanLau
    Hi,
    Does anyone know how to get the current size of Mailbox and Archive by using GW api?
    Can anyone answer this? Thanks.

  • How to get the current date ? in the form of dd/mm/yyyy?

    Hi all,
    As getDate( ), getMonth( ), and getYear( ) is depricated, how to get the current date or System date, month and year ? please help ??
    Regards
    Ashvini

    HI,
    Than u for the reply. But i am getting one error.
    as u said, I tried to do so.........
    but, i am getting one error.
    code
    Calendar cald=(Calendar.getInstance.getTime());
    out.println(cald);
    error message
    validate$jsp.java:86: Attempt to reference method getInstance in class java.util.Calendar as an instance variable.
    Calendar cald=(Calendar.getInstance.getTime());
    ^
    1 error
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
    Pls help
    Regards,
    Ashvini

  • How to get the "current date" in the BEx?

    Hi all,
    I need to get the "current date" in my Bex report in order to make a comparison. I know there is a "How to" which shows how to get the current date via a User Exit, but I didn't find it. Could you please help me?
    Thanks

    1. Create a  New Formula in Key Figures structure
    2. Give tech name and description and Select "New variable" option
    3. Next screen will launch Variable Wizard -> create a new variable with replacement path as processing type
    4. in next screene  select the date characteristic that represents the first date to use in the calculation (From Date)
    5. In the next  screen select Key in the Replace Variable with field. Leave all the other options as they are
    6. In the next Currencies and Units screen select Date as the Dimension ID.
    6. Save variable
    repeate the Above steps to create another variable (To Date)
    and now you can use these two new replacement path variables in your new formula.
    Dev

  • How to get the current date in a workflow

    Hey,
    Can anyone tell me how to get the current date while in a workflow?
    Thanks in advance.

    Here is how we did it, hope it helps
    <defvar name='locCalendar'>
    <new class='java.util.GregorianCalendar'/>
    </defvar>
    <defvar name='dateFormat'>
    <new class='java.text.SimpleDateFormat'>
              <s>MM/dd/yyyy</s>
         </new>
    </defvar>
    <defvar name='formatedDate'>
         <invoke name='getTime'>
    <ref>locCalendar</ref>
    </invoke>
    </defvar>
    <invoke name='format'>
    <ref>dateFormat</ref>
    <ref>formatedDate</ref>
    </invoke>

  • How to get starting date and ending date of the given Fiscal Period

    Hi Friends,
    In my Selection screen parameter, I've Fiscal year and Period , I want to get the starting date and ending date with the Fiscal period.
    How to get and throught which FM.
    Pls advise.
    thanks&regards
    Sankar.

    Hello Sankar,
    Check the FM PERIOD_DAY_DETERMINE.
      DATA :
             l_periv     TYPE periv,
             l_blart     TYPE blart,
             l_fday     TYPE bkpf-budat,      "First day in period
             l_lday     TYPE bkpf-budat.      "Last day in period
    * Fetch the fiscal year variant from T001
      SELECT  SINGLE periv  INTO TABLE l_periv
      FROM t001
      WHERE bukrs EQ p_bukrs.
    * Get first day/last day
          CALL FUNCTION 'PERIOD_DAY_DETERMINE'
            EXPORTING
              i_gjahr              = p_gjahr
              i_monat              = p_monat
              i_periv              = l_periv
            IMPORTING
              e_fday               = l_fday
              e_lday               = l_lday
            EXCEPTIONS
              error_period         = 1
              error_period_version = 2
              firstday_not_defined = 3
              period_not_defined   = 4
              year_invalid         = 5
              OTHERS               = 6.
    Hope this helps.
    BR,
    Suhas
    Edited by: Suhas Saha on Jan 9, 2009 2:08 PM

  • How to get the current transaction variant ?

    dear guru,
    could you please tell me how to get the current transaction variant?
    i tried the following method:
      DATA l_tcvariant TYPE tcvariant.
      CALL 'DY_GET_TX_VARIANT'
         ID 'VARIANT' FIELD l_tcvariant.
    but it failed.
    best regards.
    zj

    Try something like this
    DATA:  VARIANT LIKE SHDTVCIU-TCVARIANT.
      CLEAR VARIANT.
      CALL FUNCTION 'RS_HDSYS_GET_TC_VARIANT'
       IMPORTING
         TCVARIANT                     = VARIANT
    *     FLAG_CLIENT_INDEPENDENT       =
    *     RC                            =
    *   TABLES
    *     T_SCREEN_VARIANTS             =
    *     T_INACTIVE_FUNCTIONS          =

  • How to Get the Current Workitem id at runtime

    Hi All,
    I have a scenario, where request pending with a user who has already resigned the organization. The requirement is that we need to provide a report
    of the request and with whom it is pending with along with the workitem id with a forward push button.
    So that if the user identifies that a request is pending with someone he can click the record and press for the forward button and a pop-up to be showed where he can enter the userid to whom he needs to forward it.
    In this scenario can anyone tell me how to get the current workitem id at run time and to save it to a custom table.
    I tried with method before workitem execution, but here i am not getting the current workitem id.
    Can you please suggest a good solution for this.
    Thanks and Regards,
    Balaji

    Karri,
    I think i can explain you with an example.
    Here is my Scenario.
    A user has raised a Gate pass and it went to all approval's and got approved and the material is also sent out from the plant. Lets take the date as 1.1.2013 (A Warehouse person have done the checking and sent out of the plant).
    On 1.3.2013 some of the material has been returned and a material inward request has been raised and now the warehouse person has to do a inward checking and to sent it back for the initiator for the approval, but the warehouse person has resigned the organization on 1.2.2013, now the workitem is pending with the warehouse person who has already resigned.
    My scenario is once the material inward request is created and before the workitem is delivered to the warehouse person i need to get the workitem id and to store the workitem some where.
    So that in future if any warehouse dept head wants to forward the workitem which are lying in the person inbox who has already resigned he can do it via a report using this workitem id.
    So, can anyone help how to get the dialog workitem id before the workitem creation or execution. I tried with "method before workitem execution" but my break point is not triggering at this point.
    Thanks and Regards,
    Balaji

Maybe you are looking for

  • How to separate audio channels?

    Hi guys, I'm a new Premiere user coming from Avid and I have some confusion working with audio right now. I filmed some interviews with a radio mic on channel one and channel two was recording from the onboard mic. In Premiere I want to bin the secon

  • SMARTFORM Address

    Hello. Is there any way to reorder the lines of the address structure of the smartform? It prints the street as Street2, Street3, Street. Is there a way to make it print Street, Street2, Street3. Thank you Nuno Silva

  • Question about using USB Hub over 20 Ft

    I currently have a Mac Pro which has a USB 2.0 Hub attached to it (D-Link DUB-H7) and I need to add a 2nd hub. This 2nd hub would plug into this first hub and then would need to run approximately 20 ft. I would use a powered USB 2.0 like above but am

  • Java.lang.IllegalStateException: Response already committed

    Any one can help? <Nov 20, 2009 3:03:36 PM CST> <Error> <HTTP> <UAP> <AdminServer> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1258700616188> <BEA-101020> <[weblogic.servlet.internal.WebAppSe

  • Audit_syslog.so failing with token error

    So I've got auditing working (I can see the logs with praudit), but when I try to use the audit_syslog plugin the console displays the following error msg: audit_syslog.so[341]:error before token 5 (previous token=124) of record type open(2) - read w