Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reports

Former Member
0 Likes
420

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.

4 REPLIES 4
Read only

Former Member
0 Likes
402

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

Read only

Former Member
0 Likes
402

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

Read only

Former Member
0 Likes
402

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

Read only

Former Member
0 Likes
402

Hi,

Paste your select statement code here.