How to  obtain last date of accounting period mmyyyy

how to  obtain last date of accounting period mmyyyy.
for ex: 31 st is the last date then output should be mm/31/yy.

hi use this ....
REPORT  ZTESTS.
data: date1(4),
      date2(2),
      date3(2),
      date type sy-datum,
      output(8).
parameters:p_date type sy-datum.
CALL FUNCTION 'JVA_LAST_DATE_OF_MONTH'
  EXPORTING
    year_month               = p_date+0(6)
IMPORTING
   LAST_DATE_OF_MONTH       =  date.
output0(2) = date4(2).
output+2(1) = '/'.
output3(2) = date6(2).
output+5(1) = '/'.
output6(2) = date2(2).
write:/ output.
regards,
venkat.

Similar Messages

  • How to get last date of the week

    hi,
    how to get last date of the week like FM WEEK_GET_FIRST_DAY gives the date of the first day of the week i need the date of the last day of the week..
    thnx

    data : p_week type KWEEK,
    p_Date type SYDATUM.
    p_week = <incoming value in week of year>
    CALL FUNCTION 'WEEK_GET_FIRST_DAY'
    EXPORTING
    week = p_week
    IMPORTING
    DATE = p_date
    EXCEPTIONS
    WEEK_INVALID = 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.
    To get the last day of the week.
    p_date = p_date + 6.
    You can find the available fm in the system from se37 transaction code.

  • How to find last date of month

    Dear  All,
    Can anybody tell me how to find last date of month I need it to check some validations
    helpful answer will definatly rewarded
    Regards
    Shashikant

    Hi,
    RP_LAST_DAY_OF_MONTHS Determine last day of month
    HR-D: Payroll Germany code
    RP_LAST_DAY_OF_MONTHS
    HR-D: Determine last day of month
    DATE_CONVERT_TO_FACTORYDATE
    Returns factory calendar date for a date Calculates and returns factory calendar date for a date (if CorrectOption = '+');
    Checks if the date is work day (if CorrectOption = '-').
    HOLIDAY_CHECK_AND_GET_INFO Useful for determining whether or not a date is a holiday. Give the function a date, and a holiday calendar, and you can determine if the date is a holiday by checking the parameter HOLIDAY_FOUND.

  • How to copy last year GL Accounts to this year, with out creation

    HI
    Good evening
    How to copy last year all GL accounts to this year. same configarations.(Not manual creations
    urgently i want please
    Ashok kumar
    [email protected]

    HI
    I dont want copy of Chart of accounts i want copy  GL Accounts
    Thank you
    Ashok kumar
    [email protected]

  • How to obtain table data that is hidden from a web page source?

    Hello!
    I have been trying to obain table data from a web page without success. The data can be copy and pasted from the web page but it can´t be found in the web page source.  I prefer NOT to use automated mouse clicks to obtain the data through CTRL-A, CTRL-C and then to the Clipboard ( I know how to do this but it is not so elegant :-) ). I tried to get the data automatically with the following code: (See snippet)
    I have also looked at the existing solutions in the forum for Loging in to a website but the difference here is that I am just interested in getting out the data from a Table (form or element? I am not so familiar with HTML nor JAVA)
    Any tips are appreciatted.
    Attachments:
    Get Web Table Data example.png ‏53 KB

    The trick is to get the current html of the page and not the source - the source will not render the javascript of the page which is what loads/populates the table. It's the difference between inspecting an element in Chrome and viewing the source.
    You'll need to see if there's a method/property that returns the 'live' html document object model after the Javascript has populated the table rather than the source of the page.
    You may also have more success trying to replicate the same method the webpage uses to actually load the data..it probably makes a request to a page which returns the scores information in a more 'raw' format rather than having to parse out the html elements yourself.
    (Also as an aside - Java is not the same as Javascript - one is a compiled language and one is a scripting language).
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • How to get last date of mapping execution?

    Hi all,
    Anybody knows how to get the last run date mapping? I try to develop incremental load, but i don´t know get the last date of mapping execution ok.
    anybody can help me, thanks in advanced

    Hi,
    In our project we also use last_run_date to detect the delta for incremental loading.
    We created a table which holds the run date and time for each mapping. When a mapping is new (initial load) the run date is set to 01/01/1900.
    In each mapping we added a post-mapping process that inserts a record in the process table with the mapping name and last run date.
    We also added a Constant operator to all mappings, calling a procedure to get the last_run_date out of our own process table.
    The constant attribute is then used in a FILTER operator to compare the dates and select only dates after the last run date.
    ==============================
    An other option is to use the get this information out of the runtime audit tables.
    ALL_RT_AUDIT_EXECUTIONS which reside in the runtime owner schema.
    Regards,
    Ilona

  • How to get last date of month ?

    Dear all
    hi!!!
    How can I get the last date of a particular month?
    I mean if the month is Feb, last date of the month should be 28.
    Is it required to write in loop or there is any method to get it.
    Please write me urgently,
    thanx,
    Samir

    Hello ,
    You can get the last date of a particular month of a particular year like this :
    int year= 2000;
    int month=1;     // February (month is zero based )
    int date = 20;
    java.util.GregorianCalendar gc = new java.util.GregorianCalendar(year,month,date);
    int last_day = gc.getActualMaximum(Calendar.DAY_OF_MONTH));
    Sandip

  • How to change Posting Date in Accounting Document

    Dear All,
    Query: While Releasing Invoice Document (BL) for Account Posting, How can we change the Posting Date for Accounting Document (AB)?
    Explanation: User has created one Invoice on 26.02.2009. that time, Because of Missing Foreign Trade Data, No Accounting Document had been generated. Now, if today i.e. 10.03.2009, I maintain Foreign Trade Data and Release Invoice for Account Posting, The Accounting Document will be posted as on Today's Date, i.e. 10.03.2009.
    User's requirement is the Invoice Document (BL) Date and Accounting Document (AB) Date must be same, i.e. 26.02.2009.
    It shouldn't be like Invoice is getting generated on 26.02.2009 and Accounting Document is getting posted on 10.03.2009.
    Thanks in Advance.
    Amit

    Dear Michael,
    It was a User confusion with Creation Date of Invoice, Billing Date of Invoice and Posting date of Accounting Document.
    User had created Invoice on some 01.03.2009 but Kept Billing Date as 26.02.2009. So, while released Accounting Doc. on 10.03.2009 (Releasing date and not Posting Date), It gets Posted on 26.02.2009, only, and not on 10.03.2009.
    The whole confusion was:
    When User refers Document Flow (for Invoice in VF02), System shows Invoice Date as 01.03.2009, against Accounting Posting Date 26.02.2009.
    Whereas,
    When I showed FBL5N to user, BL Document and AB Document both get posted on 26.02.2009 only.
    Its Clear now.
    Best Regards,
    Amit

  • PPOME - New Tab & Infotype - How to find "start date" of preview period

    Hi all,
    I have successfully created own Infotype and add as new tab in PPOME.
    But now I need in my modulpool program to read field "start date" of preview period (from heading of screen in PPOME). I can't find right field. Has anybody any idea?
    Thanks a lot.
    Dusan
    Message was edited by:
            Dusan Skokanek

    Hi ramprasad74,
    According to your description, you are using Analysis Services as a data source for the report, the cube has hierarchy: Fyear, FQuarter, FPeriod, fweek, Fdate. You want to add a date parameter to the report, after you changed value of the parameter, the
    report will return the first day of FPeriod.
    To achieve your goal, we need to add a parameter to the report, then use the parameter in mdx query. For detail information, please refer to the following steps:
    In the Report Data pane, right-click on a dataset created from a SQL Server Analysis Services data source type, and then click Query. The MDX query designer opens in Design mode.
    On the toolbar, click Design to toggle to Query mode.
    On the MDX query designer toolbar, click Query Parameters symbol. The Query Parameters dialog box opens.
    In the Parameter column, click <Enter Parameter>, and then type the name of a parameter.
    In the Dimension column, choose a value from the drop-down list.
    In the Hierarchy column, choose a value from the drop-down list.
    In the Default column, from the drop-down list, select a single value.
    Click OK. 
    In query designer dialog box, type the mdx query like below:
    with member [Measures].[FirstChild]
    as
    [Date].[Fiscal].currentmember.parent.firstchild.name
    select {[Measures].[FirstChild]} on 0,
    [Date].[Fiscal].[Date].members on 1
    from
    ( SELECT ( STRTOSET(@ParameterName, CONSTRAINED) ) on 0
    from
    [Cube]
    Here are relevant threads you can reference:
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/c7146ac3-40ea-4d53-b321-c707aebbd405/how-to-pass-date-parameter-to-mdx-query
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/fd12a865-bc90-4a65-af42-ce38a8cfa29b/pass-date-time-parameter-to-mdx-query-ssrs
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

  • How to get  --Last date of the Last value .

    Dear All,
    I have a report like
    Material – Country – Current Price
    1112-----  Singapore  -
      100
    1112-----  Japan  -
      120
    1112-----  Malesia   -
      99
    Here current price is Last Value of the particular Material on particular Date.
    This I can get based on Key figure Aggregation ( Last Value and reference Character 0CALDAY ), It is giving the last Value of the Particular Material.
    Now my user wants to see Last date of the value ( Date of the Value )
    Example :-
    Material – Country –  Date --Current Price
    1112-----  Singapore  -
    01/04/2008 -- 100
    1112-----  Japan  -
    04/05/2008 -- 120
    1112-----  Malesia   -
    05/05/2008 -- 99
    If  I drill down the date in my  report  it is showing all dates , my user wants to see only last date .
    Hope some one has solved this issue , please help me to solve this issue.
    Regards,
    SHAIK.

    I have created a keyfigure with date as a data type.
    In aggregation tab, I selected  aggregation Maximum.
    Upto DSO, data is Loaded perfect. Ok.
    I added the same key figure in cube , When I am trying to Activate the Transformation,
    It is giving Error message.
    Rule 17 is invalid and is being deleted. The reason for this is that a field or InfoObject that is used in rule 17 has been deleted in the source or target of the transformation ODSO ZPL_DSO1 -> CUBE ZPLATT_C (0GH6MHANQ2J79LXZBLGIJ9ZK9LWHK6RS)
    Plz Advice.
    Regards,
    SHAIK
    Edited by: shaik on May 7, 2008 5:46 PM

  • How to find last  date of the current year

    Hi
    Please tell me is there any function module to find out the last date of the current year.

    Hi,
    You can do that very simply like so.
    code
    report zrich_0001.
    data: first type sy-datum.
    data: last type sy-datum.
    first = sy-datum.
    first+4(4) = '0101'.
    last = sy-datum.
    last+4(4) = '1231'.
    write:/ first, last.
    [/code]
    OR use function modules
    1.use this function module HR_GB_TAX_YEAR_DATES
    Pass these values
    P08_TXYEAR = Year
    P08_PAYROLL_AREA = '01'
    2.use FM......... FIRST_AND_LAST_DAY_IN_YEAR_GET
    DATA: first LIKE sy-datum,
    last LIKE sy-datum.
    CALL FUNCTION 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
    EXPORTING
    i_gjahr = '2007'
    i_periv = '24'
    IMPORTING
    e_first_day = first
    e_last_day = last.
    WRITE: / 'First Date', first, ' Last Date', last.
    Regards,
    Raj.

  • Creating backdated invoices after last date of fiscal period

    Hello experts
    In our business, it is a rule to keep the billing period open for two days even after the last day of the fiscal period. For example,
    P10 ends on 29/10/2011, but that period is not closed until 31/10/2011(P11 date) so that the users can create all the invoices for that month. Please note that period 11 is not opened till 1/11/2011 (after closing p10).
    Now,order related invoices are created thru an interface program. The user only sends in the "service date" which is mapped to the fixed value date field in SAP and we have defaulted the system date as the billing date to enable posting. The problem arises for the invoices created on the two days mentioned above as the invoices will not post into accounting if the billing date is 30/10 and 31/10 as P11 is not open yet.
    How do i make sure that invoices created on the two month end days post into accounting with a billing date of 29/10 (a P10 date)? I can use the FM- FI_PERIOD_CHECK to check if the billing date is in the open period, but how do i populate the billing date field as an open period date automatically without manually changing it for all the invoices that have not posted?
    The service date sent in has to be mapped to the fixed value date field because of aging purposes.
    Would appreciate your valuable help here.
    Thanks

    Hi,
    Function module FI_PERIOD_CHECK  can be included in the program to check if the fiscal period is open or not.
    Discuss with the ABAPER and include logic that in case the fiscal period is not open the default date should not be system date. Instead another date which is calculated using the FM - CALCULATE_DATE.
    In the FM-  CALCULATE_DATE give the logic how the date should be calculated.
    Discuss with ABAPER for this.
    Regards,
    Sharan

  • How to get start date of the period for a given date from cube

    I have a situation where i need to find the start day of the period for a given date. is there a way to know that. i want to use that in my report. i enter the date from my report(i have date parameter), depends on the date, i want to display the start day
    of the period. how can i write expression for that in my report?
    ram

    Hi ramprasad74,
    According to your description, you are using Analysis Services as a data source for the report, the cube has hierarchy: Fyear, FQuarter, FPeriod, fweek, Fdate. You want to add a date parameter to the report, after you changed value of the parameter, the
    report will return the first day of FPeriod.
    To achieve your goal, we need to add a parameter to the report, then use the parameter in mdx query. For detail information, please refer to the following steps:
    In the Report Data pane, right-click on a dataset created from a SQL Server Analysis Services data source type, and then click Query. The MDX query designer opens in Design mode.
    On the toolbar, click Design to toggle to Query mode.
    On the MDX query designer toolbar, click Query Parameters symbol. The Query Parameters dialog box opens.
    In the Parameter column, click <Enter Parameter>, and then type the name of a parameter.
    In the Dimension column, choose a value from the drop-down list.
    In the Hierarchy column, choose a value from the drop-down list.
    In the Default column, from the drop-down list, select a single value.
    Click OK. 
    In query designer dialog box, type the mdx query like below:
    with member [Measures].[FirstChild]
    as
    [Date].[Fiscal].currentmember.parent.firstchild.name
    select {[Measures].[FirstChild]} on 0,
    [Date].[Fiscal].[Date].members on 1
    from
    ( SELECT ( STRTOSET(@ParameterName, CONSTRAINED) ) on 0
    from
    [Cube]
    Here are relevant threads you can reference:
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/c7146ac3-40ea-4d53-b321-c707aebbd405/how-to-pass-date-parameter-to-mdx-query
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/fd12a865-bc90-4a65-af42-ce38a8cfa29b/pass-date-time-parameter-to-mdx-query-ssrs
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

  • How to display last data update date and time in report?

    Hai All,
               I want to report the date and time of the last upload in a report. How can I do this?
    I mean if I load the data today 5th April 2006 at 8.30 pm, then would i be able to show that on my report at the top of it(along with filer objects may be)?
    Thank you.

    Hi Visu,
    You will find detail info from help.sap
    check the links and they are  useful
    BEX Analyzer:
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/4e9d39d44cd45ee10000000a11402f/frameset.htm
    Web Application Designer
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/4e9d39d44cd45ee10000000a11402f/frameset.htm
    -Doodle
    Message was edited by: Doodle

  • How to lock the data for few periods in the Input Layout

    Dear All,
    I have an input enabled layout wherein I will display the data based on a period range.( For ex, 01.2007 to 12.2007).
    Now, based on the current period I should disable the input readiness for the periods less than my current period.
    In my ex, if my current period is 06.2007, the input readiness should be disabled for the periods 01.2007 to 05.2007 .
    How can I achive this?
    Regards,
    Srini.

    Hi Srinivas.
    You can use user variable exit for the disabled one (the period one); based on the current period..
    You can read regarding it in here:
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/frameset.htm
    Hopefully it can help you a lot.
    Regards,
    Niel
    thanks for the points you choose to assign.

Maybe you are looking for