on 10-11-2007 3:43 PM
I'm using manual planning to enter plans for each month of a year.
I want to have a function that takes the monthly plan and distributes it into days based on an average. But the average should be based on Number of Working days.
How do I do this ?
Frank
I guess you should be able to do this by using "Distribute by Reference Data". Ideally you can have a set of ref data that is calculated in the background to prepare the averages for the month. The the function [dist by ref data] could be executed as a sequence after this event.
You could use a process chain to first do the calculation and then follow it with a planning sequence that has your function.
Srikant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Chami,
Thanks for your reponse. Currently, we are not entering Number of working days in the planning layout. However, that's actually a good idea. I'll check with users.
I guess then if they enter the number of workin days manually, that would solve the calculation problem to a large extent.
So are you saying that we can then have a formula function or somthing that will distribute the monthly sale??
I would appreaciate your input.
Thanks
Message was edited by:
Frank
Yes you will need to write a FOX formula to calculate the distribution.
Create a layout for number of working days per month, with month in the columns and sales org in the rows. Then in your Fox you can loop through your monthly figures, read the number of working days and calculate the distribution. You can use a do loop to write out the records, i.e. loop for the number of days.
Do you need to store the records against 0CALDAY?
If you need to calculate the number of working days you will need to use some of the standard function modules. You will need a factory calendar that has the right number of working days in it. /OSP/GET_DAYS_IN_MONTH will give you the number of days in a month and HOLIDAY_CHECK_AND_GET_INFO will check if a day is a holiday.
In BI 7 you can call a function module directly in FOX, otherwise in 3.x you will need to write an Exit function
Chami, appreciate your helpful reponses.
Looking at your two responses, sounds like we may not have to manually enter number of working days since we have standard function modules to do that. Is that right?
You will need a factory calendar that has the right number of working days in it.
Is the factory calendar generally maintained at the company or sales organization level? One issue Im facing is two different sales orgs (US and Mexico). Both would have different calendars. So how do we differentiate? Selection of Sales Org is part of my header of the planning layout if that helps.
Im on BI 7 so I guess Ill be able to call a Functional Module directly through FOX formula. Any more insight into the general steps involved in this would be greatly appreciated.
Thanks,
You can add a new attribute to Sales Org that stores the calendar, which you can then access in the FOX using ATRV.
I would create a Z function module that has 2 parameters, factory calendar and month. The function would first call /OSP/GET_DAYS_IN_MONTH to get the number of days in the month. Then loop through the number of days using HOLIDAY_CHECK_AND_GET_INFO and count the number of working days.
Call this function in your FOX, if you notice that there is a new button above the check that is called "Call Function". This will allow you to do that.
Thanks
I have Month in Data columns...restricted to 1-12.
I have key figures in the Lead Columns.
Everything else, including Sales Org and Calendar Year are in the header.
So where does Calendar Day fit in in this type of layout. Or should I have another Level altogether which includes the Day?
Please advise...
Chami,
I actually created another level with Days as an addition.
I have gotten a very good direction from you. But since I'm new to BPS, I'm struggling with the syntax of FOX. Trying to create a very basic function without complexities.
Day is not really being entered by user. So it should be in the "Fields to be changed" section?
I do have Key Figure in the "Fields to be changed" section though.
Also, please help/guide me through the syntax. I wana assign keyfigure values to each day based on the month entered. But for testing purposes, I can hardcode the month as Jan in the formula for now and will enhance it later. So then how to write the values to the corresponding days of this month?
I'd appreciate any insight.
Thanks
You do not need to include Days in the layout as you are using the FOX to generate it.
In your level include Days, Month, Sales Org and anything else relevant in the "Fields to be changed". You can include Key figures, but you won't need it if you are reading and writing to the same key figure and there is only one Key Figure included in the level.
Try this pseudocode for your FOX:
FOREACH SALESORG, MONTH.
CALENDAR = ATRV(...., SALESORG).
AMT = {SALESORG, MONTH,...}.
CALL Z function to get NO_OF_WORKDY.
CALL /OSP/GET_DAYS_IN_MONTH to get NO_OF_DY.
DAILY_AMT = AMT / NO_OF_WORKDY.
COUNT = 1.
DAY = CONCAT(MONTH,'01').
DO
CALL HOLIDAY_CHECK_AND_GET_INFO on DAY to get HOLIDAY.
IF HOLIDAY <> 'X'.
{SALEORG,MONTH,DAY,..} = DAILY_AMT.
ENDIF.
IF COUNT = NO_OF_DY.
EXIT.
ENDIF.
DAY = TMVL(DAY, 1).
COUNT = COUNT + 1.
ENDDO.
ENDFOR.
I do not have access to a system to test this, so I not sure if it will work.
Let me know how you go.
Thanks
Chami
Is there a shortage of BPS expertise or just a lack of involvement?
I'm sure somebody has had a situation close enough to throw a thought or two.
Would appreciate responses.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.