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

how to assign default value range? urgent.!

In my report, i hav to compare the input date with QUATERLY date range. ie. Q1 means 1st APril to 30th june, Q2 means 1st july to 30th Sep, Q3 means 1st Oct to 31st Dec and Q4 means 1st Jan to 31st Mar.

How should i set the values and how to compare my input date with the quaters, how to find the Input dates falls in which quarter?

My input is in the Format MM/YYYY !!

Edited by: Padmashree RamMaghenthar on Jun 18, 2008 7:53 AM

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 06:00 AM

    Hi,

    Use 4 different ranges and compare them in select query.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 06:01 AM

    Hi,

    1-> First create 4 variable , and assing value in YYYYMMDD format.

    2-> while comparing convert the input date into same format and you can compare directly.

    ex: w-q1 type d value '20080630'.

    w_input type c value '06/06/2008'.

    w_temp type d .

    w_temp0(4) = w_input6(4).

    w_temp4(2) = w_input3(2).

    w_temp6(2) = w_input0(2).

    after directly you can compare w_temp wih w_q1.

    w_temp ge w_q1 or w_temp le e_q1.

    reward if helpful.

    Bye

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 05:58 AM

    Hi Padmashree ,

    Use Range Statement.

    for example

    
    data: date1 like sy-datum,
            date2 like sy-datum,
            date3 like sy-datum.
    
    Ranges: s_Q1 for date1,
                S_Q2 for date2,
                S_Q3 for date3.
    
    s_Q1-sign = 'I'.
    s_iQ1-options = 'EQ'.
    s_Q1-low = '20080301' .               "01.03.2008
    s_Q1 -high = '20080631'.              "31.06.2008
    append s_Q1.
    
    
    

    • Like this do for Q2 and Q3 also.

    and use these ranges according to your requirement

    chk this for more details abt Ranges

    http://help.sap.com/saphelp_webas620/helpdata/en/9f/dba71f35c111d1829f0000e829fbfe/content.htm

    Pls reward if useful.

    Thanks

    Murugan.B

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 06:00 AM

    Hi,

    Define 4 ranges for your report initially. Take the value of Q1 to Q4 in diff ranges. Then create a field for date on your selection screen. Check if the date on the sel screen falls in the first range. If yes then its Q1, else continue.

    It should work.

    Revert back if any queries.

    Thanks

    Nayan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 06:36 AM

    Hi Padmashree,

    Has your problem been solved?

    Nayan

    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.