Fox formula for actual/plan data  - Planning function

Hello,
I am working on the following scenarios for developing a  planning functions for a monthly forecast.
It is rolling montly forcast where user starts the planning in Jan and he has to show the actaul value for the month of Jan and blank values for the remaining 11 months of the year and then the user post his new forecast values for the remain 11 of the year(to replace initial balnk values) so that the data will be saved to real time cube with version v108
In Feb, Jan & Feb months has to show the act values and remaining 10 months has to show last month forecast data. The the user may revise the forecast for the 10 months and then we have to write the data to the real time cube with version v208
In Mar, Jan, Feb and Mar has to show the actual values and the reamining 9 months has to show the last month forecast and then users may revise the forecast data and then i have to write back to the cube with version v308.
I want to automate this process for all the months and all years without manual intervention. So, i decideed to write a fox formula for this scenario with following draft code.
I will get the fy period & year as a variable values and then take the system date into the variable
for each fy period
if the fy perio <= sys date.
  {version, infoprovider,value type,amount} = {0,act cube, 10, 0amount)
else
{version, infoprovider,value type,amount} = {result,plan cube, 20, 0amount)
endif.
result will be calculated on the separe routine and populated here
case (fy per)
when 01.
concatenate v1 with fy+2(2) into y
result = v1+y
when 02.
concatenate v2 with fy+2(2) into y
result = v2+y
when 03.
concatenate v3 with fy+2(2) into y
result = v3+y
when 04.
concatenate v4 with fy+2(2) into y
result = v4+y
when 05.
concatenate v5 with fy+2(2) into y
result = v5+y
when 06.
concatenate v6 with fy+2(2) into y
result = v6+y
when 07.
concatenate v7 with fy+2(2) into y
result = v7+y
etc...for all months
So, can you please let me know the best way to implement this (either by fox formuls or exits)...your inputs are really appreciated
Thanks,
Srini
Edited by: srini on Mar 28, 2008 12:05 PM

Hi Srini,
If I 've understood u r problem clearly ,You have to write two Fox Functions and you can call exit variable in both to check the system date.
I think first you should create exit varriable which would return the system date,use the same variable in data slice to lock the data till current period.
After that create one fox restricted with any one version where you can copy the data for planning .for example:-
1)First Fox:-
DATA TIM_FISCPER TYPE 0FISCPER.
TIM_REF_FISCPER = VARV(ZEXIT_FPER).
Get the last month
version using modlue or any another logic .(v108)
FOREACH TIM_FISCPER.
    IF TIM_FISCPER <= TIM_REF_FISCPER.
  {0amount,version(001) ,tim_fiscper} = {0amount,version(000) ,tim_fiscper}.
else.
  {0amount,version(001) ,tim_fiscper} = {0amount,version(v108) ,tim_fiscper}.
     endfor.
Its just n example use the granularity according to the requirement.
2)Second fox would save the changed plan data:-
DATA TIM_FISCPER TYPE 0FISCPER.
TIM_REF_FISCPER = VARV(ZEXIT_FPER).
Get the last month
version using modlue or any another logic .(v208)
FOREACH TIM_FISCPER.
    IF TIM_FISCPER > TIM_REF_FISCPER.
  {0amount,version(v208) ,tim_fiscper} = {0amount,version(001) ,tim_fiscper}.
     endfor.
Here ZEXIT_FPER is an exit variable created using cmod and populated with system date.
Hope it will helpful for u.
Rgds,
Indu

Similar Messages

  • Field for actual delivery date

    Hi ABAP gurus,
    i want to find actual delivery date field and table and also expected delivery date for delivery .
    can you please tell me the table for actual delivery date.
    Thanks,
    Jignesh .

    Jack,
    LIKP-WADAT_IST - Actual Delivery Date in a Delivery
    LIKP-WADAT - Expected Delivery Date / Planned Goods Movement date
    HTH
    VB

  • I need to pass value for Actual GI date field in VL01N t code, I am using BAPI_DELIVERYPROCESSING_EXEC. can any one tell me how can i pass vaule ?

    I need to pass value for Actual GI date field in VL01N t code, I am using BAPI_DELIVERYPROCESSING_EXEC. can any one tell me how can i pass vaule ?

    Hi Abdul,
    Sorry for my unprecise answer, but you talk about a tcode, but you're using a BAPI Call. Maybe you want to call the transaction in batch mode?
    http://help.sap.com/saphelp_erp60_sp/helpdata/de/fa/09715a543b11d1898e0000e8322d00/content.htm
    Regards,
    Franz

  • Rip off the price for deaf with data plan!

    Check out
    I just stop by the store after I look around www site and told me cant accpet and know what total 66 per month for deaf data only with tax incl.. what lots $$  I found 34.99 on www site even i ask for manger on site and reufsed cooperation with me what hell wrong with people that I found this.. check out link..  its verizon!  34.99 is fair for deaf only!    
    reason I stop by for I-Phone 4 for my roommates birthday today but no present today   

    Actually, the $35 plan includes unlimited messaging and data, but its for feature phones, not smartphones like the iPhone. They have a similar plan that is $55 for unlimited messaging and data, but for smartphones.
    I used to have the $35 plan before getting the iPhone, then had to upgrade to the more expensive one since I was getting a smartphone. 
    Here's a link to them: http://www.verizonwireless.com/plans-0/b2c--splash--messagingplans.jsp.shtml
    (And by the way, you don't really have to be deaf to get the plan even though it says you do. I have no hearing issues and still got it.)

  • HT3529 I have two older iPhones (3g, 3gs) that I've given to my granddaughters. The phones don't have phone service so they're using them like an iPod touch. Can I set up Message on these phones without a phone number for them or data plan?

    I have two older iPhones (3g, 3gs) that I've given to my granddaughters. The phones don't have phone service so they're using them like an iPod touch. Can I set up Messages for them on these phones without a phone number or data plan using only Wi-Fi?

    Yes you can. Just make sure you have iMesages on. You will need to go into Settings>Messages and turn it on and log in to their Apple IDs. I was having some activation issues when I first got my iPhone 4S [it was the carrier's fault, not the iPhone's] and I was using iMessages with my Apple ID to text my friends who had iPhones. I of course had to be connected to Wi-Fi for it to work. Hope that helps.
    You could also have them download a texting app and they could use that on Wi-Fi. There are many free ones out there. I personally enjoy Text Now. Gives you your own phone number so others can text you too, not just iDevices.

  • Tablets for daily prepaid data plan?

    Which tablets can be used on the daily prepaid ($5 for 300MB) data plan?

        cjohnson58,
    I apologize for the confusion. The forums are open for any inquiries about our services and the community to help our posters. However, if you need detailed information or additional assistance, the Prepaid department can assist since we only have access to postpay accounts. All Prepaid plans and devices are available here http://vz.to/1jQl98P and Prepaid can be contacted at 888-294-6804. 
    AdaS_VZW
    Follow us on Twitter at @VZWSupport

  • Cost center planning data-Plan Variable Costs in Object Currency

    Dear All:
    I have copied a standard planning layout and for the field, 'Planned Fixed Cost' and 'Planned Variable Cost', I have selected 'Plan Variable Costs in Object Currency' and 'Plan Fixed Costs in Object Currency' as the Key Figure.
    I am doing this because our Controlling Area currency is TWD and the other company will upload the planning data in RMB .
    However when I do the above settings and try to save, I am getting the following errors.
    The column 'Plan Fixed Costs in Object Currency' can input correctly but the column 'Plan Variable Costs in Object Currency' canu2019t be update in KP06 .
    ex.
    Planner profile: SAPALL
    layout :1-101
    I can't update the column "Plan Variable Costs "
    I copy the layout 1-101 and change the column to  'Plan Fixed Costs in Object Currency' and it  still can't input variable cost
    BR,
    Carol

    Hi Carol
    I have done this many times and never faced this issue
    Just delete the copied layout and Copy it again from 1-101....
    May be delete the existing columns of the layout and choose the desired key figure of object currency
    Then assign the layout to Planner Profile
    Regards
    Ajay M

  • Posting in prv period for actual GI date

    Hi,
    I want to post a outbound delivery  in the prv period as 31.12.2009  so that I can make GR in prv period posting date as 31.12.2009. ofcourse the period is open for Dec'09 and Jan'10 . I tried by changing date in field actual GI in vl02n  and saved the delivery , but system takes todays date as posting date. That is system allows posting date for the month of Jan'10 while GR . Is there any method by means I can get this changes saved and take entry in GR.
    Thanks & Best Regards,
    AK

    In my system it accepts 31/12/2009 in actual GI date , when  I checked up the material document & account document for this perticular OBD under document flow , I get posting date as 08.01.2010 and the posting period as 10 and 2009 generated internally. That's why I get ERROR like "MARC-VMTRA exceeded by 16.090 MT"  if I take posting date 31.12.2009 in GR, where as for posting date 01.10.2010-08.01.2010 does not show any error. This is my assumption.
    Will pl check in your system the document flow -> material document & account document posting date for OBD.
    Thanks & Regards,
    AK

  • Formula for Service or Data base name in (Webi Rich client )

    Hi Exports:
    Iam using s/w  Sap bo 3.1 sp3  .
    Query:
             I need formula to find Service  which,  I am using in Bo
              Where as Deskop Intelligence formula is =”source”&<Database Name >
              I need in Rich Client formula .Could u plz help me
    Thanks ,
    Raghu

    Hi Sujitha,
    thanks for ur quick replay ,your answer was helpfull to me ,but query what iam looking is
    . I need to find service name in Report or formula for Service name
    Thaks&Regards,
    Raghunath

  • Need a formula for 12 months data, 6 months data and 3 month

    Hi All Crystal Experts,
    In my report, data is grouped by months and I have monthly view of data. I have three prompts- Year, Startdate and Enddate. If I give 2013 as year, 1/1/2013 as start date and 05/01/2013 as end date then report shows monthly view of data for Jan-13, feb-13, Mar13, Apr-13 and May-13. Now in report, for each month, I want three additional columns, I want to show last 12month, 6 month and 3 months view. Like for Jan-13 month, in column 6 months, I want to show data for last 5 months including current month i.e. Jan-13+Dec-12+Nov-12+Oct-12+Sep-12+Aug-12 and in Column 12months view, I want to show accumulated data of last 11 months(+ current month) and in 3 months view, data for last 2 months(+ current month).
    I had tried creating Sub report for 12 months view and created Running total formula  but it is not showing any value in report. It is blank. I have created running total like this way:
    (1) "Running total formula" (which I am using and placing on group footer):
    (I) Field to summarize- @Cash_total
    (ii) Evaluate (use a formula):
    WhilePrintingRecords;
    NumberVar Cash_total_12 months;
    If Month ({@Month_PostDate}) In [(Month {?StartPostDate} - 11) to Month
    {?StartPostDate}] Then
       Cash_total_12 months :=  Cash_total_12 months + {@Cash_Total};
    (iii) Reset (use a formula):
    WhilePrintingRecords;
    NumberVar Cash_total_12 months=0;
    When I placed this formula in group footer, it is showing nothing.
    Please suggest me formula. Quick help would be much appreciated.
    Thanks,

    Hi Remi,
    Please do not post multiple threads for the same issue.
    Continue discussion on this thread:
    How to calculate last 12 months, 6 months, 3 months data in report
    -Abhilash

  • Formula for compare two date fields

    Please help me,
    There are two date fields in DSO , I want to create a key figure by Query Designer, the condition as blow
    Count ( If field DateA > field DateB = 1 else 0 ).

    http://www.sd-solutions.com/SAP-HCM-BW-Replacement-Path-Variables.html
    create 2 formula varaibles like above and comapre it

  • Formula for finding specific date in a Current Year

    Hello ,
    Can get  a formula which i can use in variable to find date having first  Thursday in a current Year.
    So in case of Current Year i.e 2014 , Formula should return date as "01/02/2014"(mm/dd/yyyy)
    Thanks & Regards
    Gourav Joshi

    Hi Gourav Joshi,
    Create a variable as per below. it will give you "First Thursday" of the year.
    First_Thursday=
    If(DayNumberOfWeek(RelativeDate(CurrentDate();-(DayNumberOfYear(CurrentDate())-1)))=1) Then RelativeDate(CurrentDate();-(DayNumberOfYear(CurrentDate())-4)) Else
    If (DayNumberOfWeek(RelativeDate(CurrentDate();-(DayNumberOfYear(CurrentDate())-1)))=2) Then RelativeDate(CurrentDate();-(DayNumberOfYear(CurrentDate())-3)) Else
    If (DayNumberOfWeek(RelativeDate(CurrentDate();-(DayNumberOfYear(CurrentDate())-1)))=3) Then RelativeDate(CurrentDate();-(DayNumberOfYear(CurrentDate())-2)) Else
    If (DayNumberOfWeek(RelativeDate(CurrentDate();-(DayNumberOfYear(CurrentDate())-1)))=5) Then RelativeDate(CurrentDate();-(DayNumberOfYear(CurrentDate())+6)) Else
    If (DayNumberOfWeek(RelativeDate(CurrentDate();-(DayNumberOfYear(CurrentDate())-1)))=6) Then RelativeDate(CurrentDate();-(DayNumberOfYear(CurrentDate())+5)) Else
    If (DayNumberOfWeek(RelativeDate(CurrentDate();-(DayNumberOfYear(CurrentDate())-1)))=7) Then RelativeDate(CurrentDate();-(DayNumberOfYear(CurrentDate())+4)) Else
    RelativeDate(CurrentDate();-(DayNumberOfYear(CurrentDate())-1))
    It will help you.
    Regards,
    Anish

  • Does iMovie HD retrieve the time/date code for actual recrding date of a c

    Dear Apple Discussions,
    I wish to know if iMovie HD retrieves the original recording time and date of a clip as a part of the time/date code, as do other video editors.
    When click on a clip and select properties, the capture time and date is displayed.
    Matti Haveri posted a response, but hers related to the capture date.
    I wish to know the actual time and date that a clip was recorded by my DV camcorder. Can anyone out the assist me?
    Owen Cobb
    (The Clemmons Kid)

    iMovie does keep the original recording time and date of a clip as a part of the time/date code.
    When click on a clip and select properties, the capture time and date is displayed.
    Really? With my setup I see the original recording date & time.
    But wait, what kind of footage do you have? Originally analog footage converted to DV? THEN the digitizing device usually labels the DV with the digitizing date.
    http://discussions.apple.com/message.jspa?messageID=4563204#4563204

  • How to implement this planning function using Fox formula

    Hello,
    I am new to Fox.
    I want to implement this complex logic in a planning function
    i have A (Kf X from infoprovider Z_A), B (Kf Y from infoprovider Z_B) & moreover there is one more condition,
    If current FISCPER > variable value of FISCPER
    KF Z = KF Z1 (from Cube C1)
    Else KF Z = KF Z2 (from Cube C2).
    for a particular calender week,
    X =   ( Y * Z ) / (summation of (Y * Z)  for each week of the whole year)
    I know it is complex.
    but i have to implement this in a planning function.
    The aggreagtion level is built on a multiprovider having A, B , C1 & C2.
    Can someone help me out with the FOX formula for this? or is there any better way to do this.
    Thanks john

    Hi Gerardo,
    Thanks for that.
    I have tried something similiar to it
    DATA CHA_CALWEEK TYPE 0CALWEEK.
    DATA CHA_COMP_CODE TYPE 0COMP_CODE.
    DATA CHA_FISCPER TYPE 0FISCPER.
    DATA VAR_PERIOD  TYPE 0FISCPER.
    DATA SUM_YEAR TYPE F.
    DATA TEMP_D TYPE F.
    DATA SUM_WEEK TYPE F.
    CURRENCY IS LOCAL CURRENCY. FOR DATA SELECTION TO BE RIGHT, NECESSARY TO DERIVE FROM CC.
    DATA UN_LOC_CURRCY TYPE 0LOC_CURRCY.
    UN_LOC_CURRCY = VARV(Z_U_I100).
    CHA_COMP_CODE = VARV(Z_U_I100).
    To Calculate the D
    VAR_PERIOD = VARV(Z_U_I010).
    SUM_YEAR = 0.
    TEMP_D =0.
    IF CHA_FISCPER > VAR_PERIOD.
    TEMP_D = {ZSA_BUD2X,CHA_COMP_CODE,CHA_FISCPER,YBUDG_01X,CHA_CALWEEK}.
    FOREACH CHA_CALWEEK.
    SUM_YEAR = SUM_YEAR + TEMP_D * {ZCREENTSV,CHA_COMP_CODE,CHA_FISCPER,ZIP_RREF1} .
    ENDFOR.
    ELSE.
    TEMP_D = ({ZSAEXCUSV,CHA_COMP_CODE,CHA_FISCPER,YRT_C02X} - {ZCREENTSV,CHA_COMP_CODE,CHA_FISCPER,YRT_C02X}).
    FOREACH CHA_CALWEEK.
    SUM_YEAR = SUM_YEAR + TEMP_D * {ZIP_INDEX,CHA_COMP_CODE,CHA_FISCPER,ZIP_RREF1}) .
    ENDFOR.
    ENDIF.
    But i am getting a syntax error
    Formula error: } expected
      Syntax error in row 21, column 20
    i have marke line21 in bold. above.
    I feel it is correct, still wonder why i am getting this error.
    can you pls help ?

  • FOX forumla in IP: can I use Planing-functions in a FOX-formula ?

    Hi All,
    I know that there is a possibility to call an ABAP functions via a function modules within a FOX formula,
    but is it also possible to use a standard planning functions in a FOX formula ?
    I have some planing functions created like the copy-function, the delete-function or the repost-function.
    Now I would like to use the standard planing functions within a fox formula.
    If it´s possible, how do I call them within a FOX formula?
    Thanks a lot 

    Hi,
    You would be knowing that any planning function gets the data to operate on, based on the filter using which it is executed - it can give entirely different output in two cases if the filters are different. Thats why it does not mean much to call a planning function from inside another planning function - think about it, the situation will get messy if that was done. As I understand, you probably want to execute some standard functions after some part of your fox code and after that is executed, get back on with the code.
    For such a requirement, you can break your fox into multiple parts and then combine the parts and the std. pl. functions in a planning sequence in the order you need.
    But please also remember that depending on the complexity, many times it is advisable to create one fox (or exit) function rather than a sequence of many functions. Reason being that each function's execution in the sequence will include some overhead due to the planning framework (determining the transaction and reference data, lock server etc), so if you create just one function for the whole operation, this overhead will get significantly reduced.

Maybe you are looking for