Month end date

how to display month end date for every month by default?

hi,
chk this code.
by default it will show the begin and end date in select option.
the similar think u can adopt.
check this sample code...
tables: mkpf.
data date like sy-datum.
data date1 like sy-datum.
select-options: s_date for mkpf-budat.
initialization.
CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
EXPORTING
iv_date = sy-datum
IMPORTING
EV_MONTH_BEGIN_DATE = date
EV_MONTH_END_DATE = date1
s_date-option = 'EQ'.
s_date-sign = 'I'.
s_date-low = date.
s_date-high = date1.
append s_date.
rgds
anver
if hlped mark points

Similar Messages

  • Delivery Block at PGI level based on GI date and Month end date

    Business need a check on delivery processing based on the Planned GI date, Month end date and transit period. This transit period is a custom field and dependent on customer. Also it is not maintained anywhere in system. Business store it in some excel format.
    The logic needed is: For any given month, the delivery order MUST be goods issued in the same month, i.e. once the order is delivered, the Post goods issue should ONLY be allowed if and only if , the PLANNED GI date ( as maintained in delivery ) + transit time ( at customer level ), falls within the month end date. If not, a block should be applied at PGI and only authorized personnel should be able to release that block.
    Also, there will be no check at invoicing VF01 level. Once the PGI blocked is removed, there will be no check on invoicing. The month end date may vary month to month and need to in combination of Sales Org / Plant as mentioned
    In addition, the business need an exception report where the information of releasing the block should appear for release date, user id of the responsible person, time sales order no etc. and it should be downloadable.
    We can have a custom table to maintain the month end day in given combination.
    But I need your expert inputs as-
    1-     Can we add this transit period in at customer master data as it is dependent on customer and there are huge no of customers for the sales unit? If not, then how to maintain it; may be a z table?
    2-     Based on this logic, what should the code/logic to be written for block at PGI.
    3-     How to control the authority check for removing the block.
    4-     The source fields for exception report.
    Pls revert accordingly.
    Many thanks in advance.

    Hello,
    Please refere the answers to your questions:
    1- Can we add this transit period in at customer master data as it is dependent on customer and there are huge no of customers for the sales unit? If not, then how to maintain it; may be a z table?
    You can either use some un-used Feild in Customer Master or maintain a Z-Table. I believe maintaining a Z-Table would be easy as you have huge number of Customers. You can also write a dmall program to Pick the Customer-wise transit dates from a excel file & store in Z-Table.
    2- Based on this logic, what should the code/logic to be written for block at PGI.
    You have explained the requirement well in your thread, you need to explain the same to your ABAPer & Basis person & they would do the needful.
    3- How to control the authority check for removing the block.
    Basis person would create & assign a Z-Authorization object which the ABAPer would use in his program.
    4- The source fields for exception report.
    Once you do the above development, your ABAPer will easily pick the required feild in Report as he has already used all the feilds somewhere in his development.
    Hope this helps,
    Thanks,
    Jignesh Mehta

  • What is month end data from mbew?

    I have a report that shows valuated stock qty and value that needs to be filtered based on Month End data. (MARD, MBEW).
    How to code this filter "Month End data"?

    MBEWH and MARV are validation points for this. look at MB5W or report J_B1BL07

  • Previous month end date

    hello,
    i would like to find out the previous month end date when i give the input any date .
    finding previous month end date.
    eg :-> if i give the date as 02-Jan-2008, the result should be 31-dec-2007
    if i give the input date as 10-nov-2007, the previous month end date is 31-Oct-2007
    etc...

    ME_XE?select the_date, trunc(the_date, 'MM') - 1 as las_day_prev_month
      2  from
      3  (
      4     select add_months(sysdate, level) as the_date from dual connect by level <=12
      5  );
    THE_DATE                   LAS_DAY_PREV_MONTH
    02-FEB-2008 08 58:30       31-JAN-2008 12 00:00
    02-MAR-2008 08 58:30       29-FEB-2008 12 00:00
    02-APR-2008 08 58:30       31-MAR-2008 12 00:00
    02-MAY-2008 08 58:30       30-APR-2008 12 00:00
    02-JUN-2008 08 58:30       31-MAY-2008 12 00:00
    02-JUL-2008 08 58:30       30-JUN-2008 12 00:00
    02-AUG-2008 08 58:30       31-JUL-2008 12 00:00
    02-SEP-2008 08 58:30       31-AUG-2008 12 00:00
    02-OCT-2008 08 58:30       30-SEP-2008 12 00:00
    02-NOV-2008 08 58:30       31-OCT-2008 12 00:00
    02-DEC-2008 08 58:30       30-NOV-2008 12 00:00
    THE_DATE                   LAS_DAY_PREV_MONTH
    02-JAN-2009 08 58:30       31-DEC-2008 12 00:00
    12 rows selected.
    Elapsed: 00:00:00.12
    [pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Previous month end data for report

    Hi expert,
    I have to calculate previous month end data for my report.
    let say if user select 15 oct then he should be able to see 30 sept data.
    I have calander prompt.
    Thanks,

    Hi,
    Use presentation variable in date prompt.
    Apply sql filter(covert to sql) on report as date_column= TIMESTAMPADD(SQL_TSI_DAY,-DAYOFMONTH(date 'presntation_variable'),date 'presentation_variable')
    Refer : How to get LAST_DAY in obiee
    Regards,
    Srikanth

  • Last month end date based on current date

    Hi,
    How to show last month end date based on the current date.
    Eg:
    Current date = "08/26/09"
    Var- Last Month End Date = "07/31/09" etc...,
    Please help me how to get it...
    Thank You!

    Good to hear that it worked for you. but not for me.
    I tried like this:
    1st::
    1. var1= ToDate("06/30/09","MM/dd/yyyy")
    2.Var2= RelativeDate([Var1];-DayNumberOfMonth([Var1]))
    result: 5/30/09
    2nd:
    RelativeDate('6/30/2009';-DayNumberOfMonth('6/30/2009'))
    result: 5/30/09
    Am working on SAP OLAP cubes.
    Please help me where am going wrong....
    Thank You!

  • Month end date in RPD

    We need to show month end date for a given date in a table.
    Say the date is '03-25-2008', then output should give me '03-31-2008'.
    I want to create a new derived column like this in rpd.
    I believe variables cannot help me here, because we will need to have month end date for each value the date column will hold.
    Please let me know how can we achieve this.

    Hi....
    Better go for creating view by writing the direct function.
    if db is: ORACLE, then LAST_DAY(<date column>) is the function to get the last day of the date column.
    but in creating view you also fetch the key column of the particular date column table and the above function too... it's like
    select key column, LAST_DAY(<date column>) as LastDate from TableNameA
    now you create a physical join between the TableNameA and the view, which maintains 1to1 relation ship.
    So that we can use the LastDate column in our BMP layer in particular TableNameA logical table.
    I think it works out probably....
    If not sorry...
    Thanks & Regards...

  • Getting Last Month End date

    Dear Experts,
    I want the following result. I have a date parameter. I want to
    get the last / end date of the previous month
    for any given date which the user inputs.
    For ex:
    If user puts the date 15.06.2008
    then i want to get the previous month end date i.e. 31.05.2008.
    The reason being i am creating a program for updating Opening and Closing Stocks of every month in a ZTABLE. The user will put the date in the parameter and system will bring the closing stock of previous month and then calculate for the current month.
    I hope i am not complicating matters too much....
    Basic funda is to arrive at the end date of the previous month for any date which the user puts.
    Please help me... it is mission critical..
    Thanks & Regards,
    Jitesh M Nair

    hi,
    use this to get last month end date.
    ex:
    data: d2 like sy-datum.
    d2 = sy-datum.
    d2+6(2) = '01'.
    d2 = d2 - 1. "prev mnth last date
    write:/ d2.

  • Month end dates caluclation

    Hi guys,
    can any give me an idea..
    i have between calendar prompt...
    when i select from date and to date..
    i need the month end dates of that selected period..
    for example
    from date: 05-may-12 and to date: -19-oct-12
    i need to display May 31st,june 30th,july 31st, august 31st,september 3oth
    can any guide me pls
    Edited by: Bhargav K on Jun 4, 2013 11:19 AM

    Assuming you are using two column prompts 'FromDate' and 'ToDate', try using the following expression as the column formula in your report.
    TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_MONTH , 1, TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( <FromDate_column>) * -(1) + 1,<FromDate_column>)))
    For the report create two filters, one on FromDate_column and the other on ToDate_column both filtered as is prompted
    Now when you use this report in a dashboard with the dashboard prompt containing the From and To data column prompts, the report will list all the month end dates between the selected range.
    Hope this helps

  • Month End dates

    Hi all,
    I have a table "xyz" which capturing start_date and end_date in a single row.
    i.e. start_date = *15-oct-2007*, end_date = *25-dec-2008*
    I want to write a query which diplay me month end dates of each month which fall between start_date and end_date like . .
    31-oct-2007
    30-nov-2007
    31-dec-2007
    31-jan-2008
    29-feb-2008
    31-mar-2008
    31-dec-2008
    thanks in advance

    Sreekanth Munagala wrote:
    hi,
    try this
    select last_day(add_months(date1,rownum-1))
    from xx_dates
    where empno=1
    connect by (rownum-1) <= round(months_between(date2,date1))
    ROUND won't work because it can round down as well as up.
    SQL> ed
    Wrote file afiedt.buf
      1  with dt as (select to_date('30/10/2007','dd/mm/yyyy') as start_date, to_date('1/12/2008','dd/mm/yyyy') as end_date from dual)
      2  --
      3  select last_day(add_months(start_date,rownum-1)) as end_month
      4  from dt
      5* connect by rownum <= round(months_between(end_date,start_date))+1
    SQL> /
    END_MONTH
    31-OCT-07
    30-NOV-07
    31-DEC-07
    31-JAN-08
    29-FEB-08
    31-MAR-08
    30-APR-08
    31-MAY-08
    30-JUN-08
    31-JUL-08
    31-AUG-08
    30-SEP-08
    31-OCT-08
    30-NOV-08
    14 rows selected.Instead, to do that sort of method you would need CEIL...
    SQL> ed
    Wrote file afiedt.buf
      1  with dt as (select to_date('30/10/2007','dd/mm/yyyy') as start_date, to_date('1/12/2008','dd/mm/yyyy') as end_date from dual)
      2  --
      3  select last_day(add_months(start_date,rownum-1)) as end_month
      4  from dt
      5* connect by rownum <= ceil(months_between(end_date,start_date))+1
    SQL> /
    END_MONTH
    31-OCT-07
    30-NOV-07
    31-DEC-07
    31-JAN-08
    29-FEB-08
    31-MAR-08
    30-APR-08
    31-MAY-08
    30-JUN-08
    31-JUL-08
    31-AUG-08
    30-SEP-08
    31-OCT-08
    30-NOV-08
    31-DEC-08
    15 rows selected.
    SQL>

  • End date of given month

    Hi Guys,
    i am facing this issue from last 1 month can anyone please give me a solution
    i am wrintin the lastdate file with month like  OCT 2010 by doing this  am not getting any results in score card comparison chart, i f i change that to month end date like 31 OCT 2010 i am getting the results, can some body give solution to write the end date of a  given month to the lastdate file
    here is the code i am using
    begin
         ask
         global  origin middle background Green
         Title 'Set Data Load Date'
         Skip 1
         TITLE 'date  Selection'
              NAME procMonth
                   PROMPT 'Enter  month to process: '
    End
    ... copy latest to the lastdate document
    output     lastdate      over
    exh     control     procMonth
    output      off
    thanks in advance

    You need to apply two FM to get the end day of the month.
    First you need to apply FM MONTHS_PLUS_DETERMINE. This will give you the date after 3 months.
                CALL FUNCTION 'MONTH_PLUS_DETERMINE'
                  EXPORTING
                    MONTHS        = 3   " << for 3 months
                    OLDDATE       = l_start_Date   " << 12/01/2007
                 IMPORTING
                   NEWDATE       = l_3_Date. " << 02/01/2008
    Then call the FM RP_LAST_DAY_OF_MONTHS . this will give you the end date of the month
      CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
        EXPORTING
          day_in            = l_3_Date  " << 02/01/2008
        IMPORTING
          last_day_of_month = l_3_Date  " < 02/29/2008
        EXCEPTIONS
          day_in_no_date    = 1
          OTHERS            = 2.
    Call both FMs again to get your another date(after 4 months).
    Regards,
    Naimesh Patel

  • Need to get data till last month end by using Calday

    Hello SAPiens,
    Could anybody please guide me how to get the data till last month end date.
    Example: If i m executing a report in 05 November 2009 then i should get all the details of last month till last date of the Calmonth. thanks in advance.
    Regards,
    Sandy.S

    Hi,
    you can do the following:
    Create a Customer Variable for Calday
    EXIT_SAPLRSOO_001 ---> Include ZXRSRUO1 write the code for the variable created above
    DATA : date TYPE sy-datum.
    date = sy-datum. "Today
    date+6(2) = '01'. "First day of this month
    date = date - 1. "Previous day before first day of this month = last day of last month
    Or
    you can you many function Modules
    CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS
    FKK_LAST_DAY_OF_MONTH
    OIL_LAST_DAY_OF_PREVIOUS_MONTH
    Santosh

  • Job scheduled at month end.

    Hello,
    Does anyone know how to set job schedule at each month end?
    as you all know, for each month, end date is different from month to month.
    but we need to execute a job at month end... is there any good method?
    thanks advance for your kind reply and advice.

    Hi,
    It is possible using SM36 , read the solution provided by Thomas (Schedule on 31st )
    Re: How to run a job on last day of every month
    Regards,

  • How to find Stock with Customer as on Month End : 01/30/2009

    Hi All,
    i have a requirement where in my report output it has to display the details as shown below
    Stock with Customer as on Month End : 01/30/2009
    Material                          Qty
    Pallet                        xxxxx
    Cover sheet        xxxxx
    For this requirement do let me know is there any standard bapi,program or how to proceed.

    Hi Kumar,
    Please find the link below
    [Bapis|Re: Need a BAPI or Function Module for Checking Material Stock]
    [Link1|Re: Function module to get the month name when start date and end date given]
    [Link2|Getting Last Month End date]
    Hope they are very Useful
    Thanks
    Kalyan

  • Want to schedule WebI report for End date of Prior Month

    Hello Experts,
    We have WebI report created on top of Bex Query, We have key date as prompt for the report. Can we schedule the webi report for key date as last date of prior month, so if current month is February, my key date should be Jan 30 2011. I am not sure if this is possible?
    Thanks,
    Ravi

    You need to apply two FM to get the end day of the month.
    First you need to apply FM MONTHS_PLUS_DETERMINE. This will give you the date after 3 months.
                CALL FUNCTION 'MONTH_PLUS_DETERMINE'
                  EXPORTING
                    MONTHS        = 3   " << for 3 months
                    OLDDATE       = l_start_Date   " << 12/01/2007
                 IMPORTING
                   NEWDATE       = l_3_Date. " << 02/01/2008
    Then call the FM RP_LAST_DAY_OF_MONTHS . this will give you the end date of the month
      CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
        EXPORTING
          day_in            = l_3_Date  " << 02/01/2008
        IMPORTING
          last_day_of_month = l_3_Date  " < 02/29/2008
        EXCEPTIONS
          day_in_no_date    = 1
          OTHERS            = 2.
    Call both FMs again to get your another date(after 4 months).
    Regards,
    Naimesh Patel

Maybe you are looking for

  • I have parallels 7 and windows 7, how do I use Boot Camp and windows

    I have Parallels  version 7 installed on my MacPro5,1 mid 2010 (3.2ghz quad core) OSX 10.6.8 My question, can I run Windows from the Parallels 7 using Boot Camp app, or do I have to install it with Boot Camp on a  different partition ? I have never u

  • Is it possible that my iphone shows water damage, but never seen water?

    I recently took my iphone to the apple store because it was freezing and stuff. i come to find out that my phone according to the guys from apple that my phone has water damage, my phone has never seen water. Please help.

  • Nexus 1010 - Issue copying s/w onto device using SCP.

    Hi I'm trying to copy the new version of s/w ( nexus-1000v.4.2.1.SV1.4.iso) onto a Nexus 1010 switch using the command: copy scp: bootflash:repository The software starts to copy but unfortunately only gets to around 10% complete before failing. It's

  • Receicing Point on Inbound Delivery

    Hello Experts ! SAP has config to automatically determine Receiving Point on a Inbound Delivery based on Plant and SLoc. I have two questions: 1. Receiving Point is not a field on PO... and, on the Inbound Delivery it is greyed out. Is there a way to

  • Go to Mountain Lion from Snow & CS6

    So, I'm thinking that I might have to upgrade to ML at some point, mostly because of Lightroom not being SL compatible and future iterations of the Creative Suite won't play with Snow either. I know that the "best" way is said to erase and install fr