2008 Mar 19 4:21 AM
Hi ,
In classical report,
I need to display present month and previous month data from 1 internal table.
For this I created 2 ranges and in select statement I write the ranges.
But I able to display for one range at a time.
I want to display two ranges data at a time.
Please help.
Sanju.
hi,
You can get the present month ..
data : v_date like sy-datum.
data : v_present_date like sy-datum,
v_present_month(2),
v_previous_date like sy-datum,
v_previous_month(2).
initialization.
v_date = sy-datum.
v_present_month = v_date+4(2).
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = v_date
days = '00'
months = '01'
signum = '-'
years = '00'
IMPORTING
calc_date = v_previous_date
ENDIF.
v_previous_month = v_previous_date+4(2).
fill the ranges with these
2008 Mar 19 4:26 AM
Hi,
Try moving the output data of your select query (data for two months) into an internal table. Loop at this internal table and write.
reward if helpful.
Regards,
Ramya
2008 Mar 19 4:27 AM
Can you brief your requirement a bit more?
Also if you can paste your code which displays the output and also the part in which u are populating the ranges, that would be also helpful.
Thanks,
Balaji
2008 Mar 19 4:28 AM
hi,
You can get the present month ..
data : v_date like sy-datum.
data : v_present_date like sy-datum,
v_present_month(2),
v_previous_date like sy-datum,
v_previous_month(2).
initialization.
v_date = sy-datum.
v_present_month = v_date+4(2).
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = v_date
days = '00'
months = '01'
signum = '-'
years = '00'
IMPORTING
calc_date = v_previous_date
ENDIF.
v_previous_month = v_previous_date+4(2).
fill the ranges with these
2008 Mar 19 4:29 AM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |