Skip to Content
author's profile photo Former Member
Former Member

Extract MMM-YYYY and YTD from DD-MM-YYYY

Hi all,

I have a query with a Selection prompt for a field called Clearing Date in the DD-MM-YYYY format.

In the output of the query, I have Keyfigures that need to be restricted to the month entered in the clearing date and that needs to be displayed as MMM-YYYY.

Eg: When the query is executed, the user enters Clearing date as 02-02-2010

In the output of the query, I need to display Feb-2010 and the Key figures in the result need to be displayed for the month Feb-2010.

Is there a way of extracting the MMM-YYYY from the Clearing date entered into a new variable? If so, I can restrict the KF with the new variable created for MMM-YYYY.

Please let me know.

Thanks and Regards,

Srilakshmi B

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Nov 07, 2011 at 12:47 PM

    Hi srilakshmi,

    is calmonth or calmonth2 charecteristics available in the data provider?

    Regards,

    Ranganath

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 08, 2011 at 08:52 PM

    Hi srilaxmi,

    U can achive that by using the customer exit. here u r entering the calendar year as type dd-mm-yyyy.

    so here u have to extract the 6 characters starting from the 3rd characters like you are storing the calendar year values in one variable "date1"

    so here u get the required o/p (mm-yyyy).

    if i_step = 1.

    date2 = date1 + 3(6). // here it will extract the characters starting from the 3rd upto 6 characters in lenght .

    result = date2.

    I think u got it.

    Hope it helps,

    Thanx & Regards,

    RaviChandra

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Ravichandra,

      Thanks for your inputs.

      But I need to achieve this in the BEx query without coding for exit variables. Please suggest ways of handling this in the query variables/formulas.

      Thanks and Regards,

      Srilakshmi B

  • Posted on Nov 09, 2011 at 10:16 AM

    > Eg: When the query is executed, the user enters Clearing date as 02-02-2010

    > In the output of the query, I need to display Feb-2010 and the Key figures in the result need to be displayed for the month Feb-2010.> Srilakshmi B

    you are telling that Key figures in the result need to be displayed for the month

    so why dont you creare a user entry variable for calmonth.

    and you want that description as JAN FEB ...DEC.

    through customer exit it will be achive.

    if you need let me know i will give the code.

    Regards,

    Ranganath

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.