cancel
Showing results for 
Search instead for 
Did you mean: 

Display date as CalMonth/Year

Former Member
0 Kudos

Hello,

We have a DSO with several date characteristics. Example - Open Date, Recived Date, Actual Delivered date etc.

There is a requirement to run a summary report by month for these dates.

Example - by Month on Delivery Date would be

Sales Value1 05/2006

Sales Value2 06/2006

My question - with out having to create a Cube and rolling up data - is there a way to report of a DSO but show the corresponding date as CalMonth/year format.

I am aware of creating a variable of restricting dates by period but not sure if I can actually display any specific date as MM/YYYY.

Dev

Accepted Solutions (1)

Accepted Solutions (1)

Private_Member_9643
Active Contributor
0 Kudos

Just use calnder year month in columns, and take user input as variable of any date, by restricting it in Filters.

It will give u output as Cal month/year..though u r taking date as input.

Former Member
0 Kudos

Thanks for the quick response. I will give that a shot.

Former Member
0 Kudos

Does this mean that I need to add 0CALMONTH to the DSO?

Private_Member_9643
Active Contributor
0 Kudos

Do u have fiscal year/period in ur DSO? u can also make use of it.

If u don't want to add 0CALMONTH, then the solution could be writing a small Customer Exit or using ranges to dispaly the Months.

Could you clarify what input user is giving, and what output u r looking for?

Former Member
0 Kudos

There are several dates in the DSO. For example Received Date and Open Date.

Lets say user runs one report by recieved date with a range value

Ex: 01/01/2006 thru 05/31/2006

Now, there is an amount field which is to be summarized by month . So the expected report output is

Received Month Amount

-


-


01/2006 $2000

02/2006 $3000

05/2006 $100

For another query, we should be able to use the same report to be able to run by Open date and get the amounts summarized by open date month.

I can add a 0CALMONTH to DSO. That's no problem. I am not sure how to put this in the query though

Thanks

Private_Member_9643
Active Contributor
0 Kudos

If you will put 0CALMONTH in rows it will show u all the months regardless of ur to field. like if u have given 01/01/2006 thru 05/31/2006

O/p Will be:

-


Amount

-


-


01/2006 $2000

02/2006 $3000

03/2006

...

....

Upto whatever date data u have.

The best way is to use Customer Exit Variable:

Create date as Customer Exit variable of 'ready to input' say ZDATE, and one 0CALMONTH Customer Exit variable say ZCALM.

Use this code to populate value of ZCALM:

WHEN 'ZCALM'.

IF i_step = 2.

READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZDATE'.

IF sy-subrc = 0 .

CONCATENATE loc_var_range-low0(4) loc_var_range-low4(2) INTO l_s_range-low.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

ENDIF.

ENDIF.

ENDCASE.

Now create selction of whavere number of rows u wanna dispaly and restrict it with ZCALM for 1st Selection, and for further selection restrict it with same variable but using offsets of +1 , +2....

This code will work like if u give input as 01/01/2006, it will show u output for no of months u r displaying by creating manual selections. (tootal number of selectiosn u r creating using offsets).

If u want to and from date, you have to do some small modification in code, and query level...but the basic logic is going to be always same.

Former Member
0 Kudos

You need to go with a customer exit. If you map ficalyear/period to calmonth, either your open date or received date might fall out of the range. And itwould be the samebe if you map it to either open date or close date, you might drop out of one if they dont fall within the same month.

Former Member
0 Kudos

KJ,

Quick clarification.

Currently we don't have a 0CALMONTH in the DSO. Do I still need to add this infoobject to the DSO ( without mapping any data - basically it is going to have a null value for all records) ?

I can add 0CALMONTH w/o mapping anything - just to use it in the query . Will that work?

Former Member
0 Kudos

KJ,

Quick clarification.

Currently we don't have a 0CALMONTH in the DSO. Do I still need to add this infoobject to the DSO ( without mapping any data - basically it is going to have a null value for all records) ?

I can add 0CALMONTH w/o mapping anything - just to use it in the query . Will that work?

Private_Member_9643
Active Contributor
0 Kudos

nope....u need to map it for getting data in it.

U must be having Fiscal year/period field in ur DSO? that will also work.

Former Member
0 Kudos

See, that's what I was trying to avoid.

This is a custom DSO and it does not have a fiscal year period. I could add a 0CALMONTH to the DSO and map the Open Date to it. This would restrict the report only for Open date month. If the query designer wanted to create a report to see received date by month - this will not be possible .

Is my understanding correct?

Private_Member_9643
Active Contributor
0 Kudos

yup u r correct.

Lets try it in other way:

Do you want to use Select Option mandatory for ur selection screen? Like if u will be having date enetered as 01/01/2006 only and u want next 3 or 6 or 12 months it will be more easy to calculate.

For the above approach, you just need to create ur select screen variable as single value options of Customer Exit type, and for displaying u can use Customer Exit with Select Options, which is taking to date from user entered variable, and assigning +30 days in Customer Exit to assign it to date to value. Similarly u can caluclate Date to and Date for other months row.

like 01/01/2006 Customer Exit Entered by user

Selection one: 01/01/2006 to 01/31/2006

Selection 2: 02/01/2006 to 02/29/2006

and so on.

Former Member
0 Kudos

Sorry, I didn't quite understand !

Besides, I can't have Mandatory select option.

Private_Member_9643
Active Contributor
0 Kudos

Do u want user to enter Date value as select option only?

What i was trying to say let user give some date say 01/01/2006, and you can display last 3 months in 3 columns?

Assign points if u find answer to your question as valuable.

Former Member
0 Kudos

OK. I see what you mean.

Case 1: If I need to display say last 3 months -

Lets say user enters a single date on the selection screen. say 01/01/2006.

1) I need to create create three user exit type date range variables and fill it with the 3 monthly buckets based on the user input date. I could even do this from system date.

2)Create 3 restricted key figures with the three date variables.

3)the three key figures are displayed in columns.

Does that sound correct?

Private_Member_9643
Active Contributor
0 Kudos

Yeh....u got it

Former Member
0 Kudos

Thanks.

Points assigned

Answers (0)