cancel
Showing results for 
Search instead for 
Did you mean: 

FIlling up 0calday using a variable

Former Member
0 Kudos

Hi,

I am designing a report. I have the below requirements.

1) I have a 0calday in my report. I have 0CALDAY in my InfoCube but no data is loaded into the object. End user inputs a date, it could be a past date or future data, this date has to be assigned to 0CALDAY and displayed in the report.

2) Using the date as input in the Customer Exit i have to calculate the "calweek" and that has to be displayed in the Report.

Can anyone let me know how to do this.

Thanks,

AM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi a m,

1. Create a Customer Exit Variable "calweek_var" with reference characteristics to 0CALWEEK.

2. Goto Transaction code: CMOD -> project -> exit "EXIT_SAPLRRS0_001", and write the below code.

-


WHEN 'calweek_var'.

IF i-step = 1.

CLEAR l_s_range.

CALL FUNCTION 'DATE_GET_WEEK' and give the date from date variable, get the week value into l_week.

l_s_range1-low+4(2) = l_week.

l_s_range-low = l_s_range1-low.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

-


I hope you can handle you issue now.

Regards,

S P.

Former Member
0 Kudos

Hi AM,

What i have understood from your requiremetn,

Please proceed it like this:

1. Take input of date in a variable, create a Formula variable processing by customer exit,

2. Write code in cmod of this customer exit variable . use function module: DATE_GET_WEEK to retrieve the week.

3. Now create a Calculated key figure, put this formula variable in that and use this calculated key figure as per your requirement.

Thanks

dipika

DATE_GET_WEEK

Former Member
0 Kudos

Hi

Create a a variable for calweek then in exit using Function mudule(Try to search in SE37) u can determine the the calweek and use the same in report.

Thanks

Debasish

Former Member
0 Kudos

You can just create a replacement path variable to take the user entry and display it in your report.

Please go through these links for your customer exit.

How to Create a u201CCustomer Exitu201D Date Variable.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662...

,