on 03-29-2010 10:12 PM
Hi all,
I have created a planning function type formula with very simple code. The code was copied from SAP Library and FISCPER was replaced with 0CALDAY. I continue to get an error 'Characteristic 0CALDAY is not supported".
The characteristic 0CALDAY is in the Infoprovider and the aggregation level. I have tried 'To Characteristic Usage' with both changed and in condition.
DATA D1 TYPE D.
DATA D2 TYPE D.
DATA I1 TYPE I.
DATA I2 TYPE I.
DATA CALDAY TYPE 0CALDAY.
FOREACH CALDAY.
CALCULATE 1ST DAY OF ZCALEND
D1 = C2DATE( CALDAY, S ).
CALCULATE LAST DAY OF CALDAY
D2 = C2DATE( CALDAY, E ).
CALCULATE THE DIFFERENCE BETWEEN LAST AND 1ST DAY MINUS TWO DAYS
I2 = 2.
I1 = D2 - D1 - I2.
MESSAGE I001(UPF) WITH 'DIFFERENCE' I1.
ENDFOR.
Thank you in advance for any help.
Teri
Thanks all for the replies, they were all very helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You are getting this error as 0calday is not supported by function C2DATE(fisper,s/e).You can check the same by putting comment in front of statement where C2date is used.You can use fiscper as parameter as it returns the start (s) day of period and it returns the end day of period(E).
So check the parameters you have passed to function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much for your reply. What would you suggest? I must use 0CALDAY. As you can tell I am very new to IP, I have tried other options for example:
DATA ZDAYS TYPE I.
DATA ZDT TYPE ZCALSTART.
DATA ZDF TYPE ZCALEND.
ZDT = ZCALSTART.
ZDF = ZCALEND.
ZDAYS = ZDT-ZDF.
{KF,ZDT,ZDF} = ZDAYS.
I received an error "ZCALSTART could not be recognized"
I also tried to call a function. 'FIMA_DAYS_AND_MONTHS_AND_YEARS'.
DATA D1 TYPE D.
DATA D2 TYPE D.
DATA DD TYPE I.
DATA CALS TYPE ZCALSTART.
DATA CALE TYPE ZCALEND.
D1 = CALS.
D2 = CALE.
CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
EXPORTING
I_DATE_FROM = D1
I_KEY_DAY_FROM =
I_DATE_TO = D2
I_KEY_DAY_TO =
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = DD.
E_MONTHS =
E_YEARS =
I received an error "Types of parameter I_DATE_FROM () and variable D1(D) are inconsistent". From what I could find they should be consistant. Please provide any suggestions. Thank you!
Teri
Edited by: teri chandler on Mar 30, 2010 3:26 PM
Hi.
Do you use any variables for ZCALSTART ?
If yes, you should write the next statement:
ZDT = VARV(YOUR_ZCALSTART_VARIABLE).
It will populate ZDT with value.
The same is about ZDF.
Regards.
[Uryukin Andrey|http://il.linkedin.com/in/andreyuryukin]
SAP-BI Consultant, [Advantech|http://advantech.co.il/en/index.asp]
[My Blog|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/u/252016769] [original link is broken] [original link is broken];
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.