cancel
Showing results for 
Search instead for 
Did you mean: 

how to assign default value range? urgent.!

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Use 4 different ranges and compare them in select query.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Padmashree,

Has your problem been solved?

Nayan

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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