on 10-13-2015 5:21 PM
Dear all,
I have used a copy function that uses 0CALWEEK as the changeable object and works perfectly on my InfoCube when the aggregation level contains 0CALWEEK. However, the InfoCube also contains 0CALDAY, 0CALMONTH & 0CALYEAR that must be updated. The problem with the standard copy function is that when the value for 0CALWEEK is changed from EG - 03.3016 > 10.2016 the values for the other calendar objects would not be correct for 10.2016 as they are just copied, so the copy function generates 0 records, which is to be expected.
So I require a custom planning function to correctly set the values for 0CALDAY, 0CALMONTH & 0CALYEAR. I copied the class CL_RSPLFC_COPY to my own version and set up my custom planning function to use this new class. The custom planning function works when using an aggregation level with just 0CALWEEK. So I've set about amending the code, IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~EXECUTE, to update the values for 0CALDAY, 0CALMONTH & 0CALYEAR using an aggregation level that includes these characteristics.
However, I am struggling to determine where I can write my code to correctly set the values. I am fine with the actual code; I just can't work out where to write it and which table/work area to work off.
I am assuming that once the values for 0CALDAY, 0CALMONTH & 0CALYEAR are correctly set the custom planning function continues as expected.
Does anyone have any suggestions?
Cheers
Martyn
Thanks to all who have replied so far.
I have used Cornelia's suggestion of using character relationships as it's a solution specific for my requirement.
I have set my CRs up using CALWEEK as the source and CALDAY etc. as the targets. I selected the Exit type and created my own class using CL_RSPLS_CR_EXIT_BASE. I amended the DERIVE method with my code and successfully fill <l_s_buf> when I debug my code using RSPLAN. So all good so far.
However, the values are not being passed back to the calling method IF_RSPLS_CR_MAPPER~DERIVE_ALL. The values are contained in <l_s_out> but are not copied to c_s_chas. When the update is complete my CRs are not being filled as expected. No errors occur. My DERIVE statement below.
Any thoughts? Should I start a new thread?
Cheers
Martyn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martyn,
i would do the following:
Thus you consider overlapping months and years with respect to weeks.
That's it.
Regards
Jonas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martyn,
The issue is aggregation level itself.
Let's take one example for you:
The planning cube1 contains following record:
0CALMONTH 0CALYEAR 0CALWEEK KF1
01.2016, 2016, 03.2016 10
If you want to get the following records via standard copy function:
0CALMONTH 0CALYEAR 0CALWEEK KF1
03.2016, 2016, 10.2016 10
You should not contain 0CALMONTH into the relevant aggregation level.
Then the generic time characterisitic relationship will help you find the relevant month value.
If you add 0CALMONTH into the aggergation level, the system will check the following combination is invalid:
0CALMONTH 0CALYEAR 0CALWEEK KF1
01.2016, 2016, 10.2016 10
If you involve 0CALDAY, the issue will be more complex because the system cannot know how to get the 0CALDAY value based on 0CALWEEK.
Best Regards,
Sheldon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martyn,
what you want to do is better realised with a small copy function on an aggr leven without the char that are dependent and to fill those other time char with char relationships.
Have a look here about the standard time char relationships
end here about char relationships in general
Characteristic Relationships - Business Intelligence - SAP Library
regards
Cornelia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
and by the way - if you still want to do it in a planning function ask google about
"sap help ip planning function"
and you will end up here:
Planning Functions - Business Intelligence - SAP Library
and if you follwo the link to implementing planning function type you get what you need about how to create you own function type ...
regards
Cornelia
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.