Error in syntax FOX Formula

Hello all !!
I have a problem when I execute fox formulas in BPS0 in version 7.0, becuase they don't work.
The company migrated BW-BPS to 7.0 version.
The problem occurs when I execute the formulas in BPS0 in the quality environment, which is working with 7.0 version, but we are using 3.5 version in the productive environment; besides we are working with 7.0 version in BW.
I was wondering if the syntax of the FOX formulas between version is diferrent.....any idea??
I appreciate your help!!!

Hi Arlene,
please check [Re: Foxformula].
Regards Matthias Nutt
SAP Consulting Switzerland

Similar Messages

  • Error Control on Fox Formula

    Hello everybody
    I have a problem with a Fox formula. When i chek my formula i have the error
    "RFCCheckScreenNecessary: Exception condition "INPUT_NOT_LEGAL" raised., error key: RFC_ERROR_SYSTEM_FAILURE "
    This Formula Use 12 Formula Variables ZVPOIDSx.
    My Formula work Fine when i use only 2 Formula Variables ZVPOIDSx. (ZVPOIDS1 et ZVPOIDS2). The control is OK and the results ar Ok
    But when i use 3 (or +) variable it s not ok
    Extract of my Formula
    DATA ZPOIDS1 TYPE I.
    DATA ZPOIDS2 TYPE I.
    DATA ZPOIDS3 TYPE I.
    DATA ZPOIDS4 TYPE I.
    DATA ZPOIDS5 TYPE I.
    DATA ZPOIDS6 TYPE I.
    DATA ZPOIDS7 TYPE I.
    DATA ZPOIDS8 TYPE I.
    DATA ZPOIDS9 TYPE I.
    DATA ZPOIDS10 TYPE I.
    DATA ZPOIDS11 TYPE I.
    DATA ZPOIDS12 TYPE I.
    DATA ZPOIDSTOT TYPE I.
    ZPOIDS1 = VARV(ZVPOIDS1).
    ZPOIDS2 = VARV(ZVPOIDS2).
    ZPOIDS3 = VARV(ZVPOIDS3).
    ZPOIDS4 = VARV(ZVPOIDS4).
    ZPOIDS5 = VARV(ZVPOIDS5).
    ZPOIDS6 = VARV(ZVPOIDS6).
    ZPOIDS7 = VARV(ZVPOIDS7).
    ZPOIDS8 = VARV(ZVPOIDS8).
    ZPOIDS9 = VARV(ZVPOIDS9).
    ZPOIDS10 = VARV(ZVPOIDS10).
    ZPOIDS11 = VARV(ZVPOIDS11).
    ZPOIDS12 = VARV(ZVPOIDS12).
    *ZPOIDSTOT is the sum of all ZPOIDSx
    ZPOIDSTOT = ZPOIDS1 + ZPOIDS2 + ZPOIDS3 + ZPOIDS4 +  ZPOIDS5  + ZPOIDS6  + ZPOIDS7  + ZPOIDS8  + ZPOIDS9  + ZPOIDS10  + ZPOIDS11  + ZPOIDS12.
    *{ 0AMOUNT, 013 } is the Budget for all the year
    { 0AMOUNT, 001 } = { 0AMOUNT, 013 }*  (ZPOIDS1 /ZPOIDSTOT).
    { 0AMOUNT, 002 } = { 0AMOUNT, 013 }*  (ZPOIDS2 /ZPOIDSTOT).
    { 0AMOUNT, 003 } = { 0AMOUNT, 013 }*  (ZPOIDS3 /ZPOIDSTOT).
    { 0AMOUNT, 004 } = { 0AMOUNT, 013 }*  (ZPOIDS4 /ZPOIDSTOT).
    { 0AMOUNT, 005 } = { 0AMOUNT, 013 }*  (ZPOIDS5 /ZPOIDSTOT).
    { 0AMOUNT, 006 } = { 0AMOUNT, 013 }*  (ZPOIDS6 /ZPOIDSTOT).
    { 0AMOUNT, 007 } = { 0AMOUNT, 013 }*  (ZPOIDS7 /ZPOIDSTOT).
    { 0AMOUNT, 008 } = { 0AMOUNT, 013 }*  (ZPOIDS8 /ZPOIDSTOT).
    { 0AMOUNT, 009 } = { 0AMOUNT, 013 }*  (ZPOIDS9 /ZPOIDSTOT).
    { 0AMOUNT, 010 } = { 0AMOUNT, 013 }*  (ZPOIDS10 /ZPOIDSTOT).
    { 0AMOUNT, 011 } = { 0AMOUNT, 013 }*  (ZPOIDS11 /ZPOIDSTOT).
    { 0AMOUNT, 012 } = { 0AMOUNT, 013 }*  (ZPOIDS12 /ZPOIDSTOT).
    Thanks for your help

    Hi,
    I hope the note will work. But still I would test the following:
    DATA ZPOIDS1 TYPE I.
    DATA ZPOIDS2 TYPE I.
    DATA ZPOIDS3 TYPE I.
    DATA ZPOIDS4 TYPE I.
    DATA ZPOIDS5 TYPE I.
    DATA ZPOIDS6 TYPE I.
    DATA ZPOIDS7 TYPE I.
    DATA ZPOIDS8 TYPE I.
    DATA ZPOIDS9 TYPE I.
    DATA ZPOIDS10 TYPE I.
    DATA ZPOIDS11 TYPE I.
    DATA ZPOIDS12 TYPE I.
    DATA ZPOIDSTOT TYPE I.
    ZPOIDS1 = VARV(ZVPOIDS1).
    ZPOIDS2 = VARV(ZVPOIDS2).
    ZPOIDS3 = VARV(ZVPOIDS2).
    ZPOIDS4 = VARV(ZVPOIDS2).
    ZPOIDS5 = VARV(ZVPOIDS2).
    ZPOIDS6 = VARV(ZVPOIDS2).
    ZPOIDS7 = VARV(ZVPOIDS2).
    ZPOIDS8 = VARV(ZVPOIDS2).
    ZPOIDS9 = VARV(ZVPOIDS2).
    ZPOIDS10 = VARV(ZVPOIDS2).
    ZPOIDS11 = VARV(ZVPOIDS2).
    ZPOIDS12 = VARV(ZVPOIDS2).
    If this works, the problem is within variable ZVPOIDS3 - ZVPOIDS12.
    Also note that the latest SP is 14, so if you are still in development I would recommend to install SP13 and 14!
    D

  • Urgent: Generting an Error messge using FOX formula

    Hello all,
    i want to generate the error message when 'Activity' field is left blank while appending a new record in planning folder.
    'Activity' is characteristic of type CHAR.it is not maintained in the master data.
    my code is
    DATA ACT TYPE ZACTIVITY.
    IF ACT = #.
    MESSAGE E001(UPF)WITH ' ACTIVITY SHOULD NOT BE BLANK '.
    ENDIF.
    it is giving error even when something is entered in the Activity field also.
    any suggestions?
    Thanks in advance.

    Hi,
    Activity needs to be in fields to be changed.
    The VARV only works for single value variables. In case of multiple values you can try:
    Foreach ACT in VARIABLE name of variable
    ACT = VARV(name of variable)
    STATMENTEMENT
    ENDFOR.
    or you can try working
    counter = 0.
    Number = VARC(name of variable).
    DO number times.
    Counter  = counter + 1.
    ACT = VARI(name of variable, counter).
    STATEMENT.
    ENDDO.
    D

  • Type error while calling function module with in FOX formula

    Hi,
    I am getting following error while calling function module from FOX Formula:
    "Types of parameter DAY_IN () and variable J_CALDAY(D) are inconsistent"
    Following is the code:
    DATA    I_CALDAY       TYPE  0CALDAY.
    DATA    N_CALDAY       TYPE  0CALDAY.
    DATA    KYF              TYPE KEYFIGURE_NAME.
    FOREACH   I_CALDAY, KYF.
       CALL FUNCTION SLS_MISC_GET_LAST_DAY_OF_MONTH
          EXPORTING
             DAY_IN  =  I_CALDAY
          IMPORTING
             LAST_DAY_OF_MONTH = N_CALDAY.
        {KYF, N_CALDAY}  =  {KYF, L_CALDAY}.
    ENDFOR.
    Import parameter DAY_IN is of type sy-datum (that inturn is data element SYDATUM of data type DATS - same as 0CALDAY). Not sure why error is being thrown. Any idea? Thanks.
    Edited by: SAP_BOY on Dec 4, 2009 5:26 PM

    Hi,
    I think It will not identify ,though you have  (data element SYDATUM of data type DATS - same as 0CALDAY).Check it out by assigning it through a variable of type D.
    Data I_CALDAY TYPE D.
    Hope it may work out.
    Regards,
    Indu

  • 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 formula - Copy variable value to a characteristic in IP

    Hi All,
    I have to copy the value of a variable to a characteristic in Fox formula in IP. In this scenario I am forecasting data using copy function. Whenever new data is copied I need to save it as a new version. So in the fox formula I have mentioned only 'version' as the field to be changed. I get the value of version automatically from a function module. In BPS I think it is possible but I am using IP.
    Example.
    Copied data
    Customer Material Version Year Qty
    c1            m1          0           2012  10
    c2            m2          0           2012  20
    c3            m3          0           2012   15
    This is the reference data got as a result of copy function. In the code I get the version computed from a function module in variable fm_version.
    I wrote the logic like this.
    data lv_version type version.
    foreach lv_version.
    {0quant_b, lv_version} = {0quant_b, fm_version}
    endfor.
    When it is execute it is showing error as records changed and deleted.
    Is it the correct method or is there any other workaround.
    I would realyt appreciate your time and effort.
    Thanking you,
    Jerry Jerome

    Hello,
    You can use either standard copy function or fox formula.
    So here I need to make the version as 1 since it is forecasted for the first time. I am trying to do it with a fox formula. In the fox formula I am trying to change the characteristic value of version from 0 to 1.
    You can not change the characteristic value of version from 0 to 1. The copy function or fox formula will copy the key figures from version 0 to 1.
    For example:
    The transaction data contains data like -
    customer     material            year     version    qty
    c1                 m1            2012     0           10
    c2                 m2            2012     0            5
    After copy you will get both version like this
    customer     material            year     version    qty
    c1                 m1            2012        0        10
    c2                 m2            2012        0         5
    c1                 m1            2012        1        10
    c2                 m2            2012        1         5
    Thanks.
    With regards,
    Anand Kumar

  • How using ABAP function in fox formula ?

    Hello,
    I want to launch standard function :"RSW_CURRENCY_TRANSLATION" by Fox formula. I declare this function in SAP Table :rsplf_fdir, and I can call this function by fox, with all parameters.
    But when I want to use it, I've a problem with the first parameter : "Formula error: Type RSR_CTTNM is not permitted"
    What's the solution ?
    Best regards,

    Hi Cyril,
    I read the fact that you have chosen to use CURC instead of the Function Module.
    Did you fix your exchange rate type in your CURC formula: For example:
    CURC (LCAMT,12312008,EURP,LCUR,GCUR).
    Or did you make into a variable, that can be chosen at run time?
    I'm asking because I'm trying to make the 'exchange rate type' in this formula to be more dynamic (like a local variable).For example:
    DATA EXRATE TYPE 0RTYPE.
    DATA EXRATE_V TYPE 0RTYPE.
    EXRATE_V = VARV(EXCHRATE).
    {0AMOUNT,GCUR, GCTYPE,FYPERIOD,VERSION,COSTELM,INT_ORDER} = CURC (LCAMT,12312008,EXRATE_V,LCUR,GCUR).
    But the system returns the error meesage that it doesn't recognise 'EXRATE_V' even though i have declared it earlier on. So I have a fear that the system is expecting me to enter a fixed exchnage rate type that exists in RSCUR, in this formula..!!  Is that true??
    I don't want it to be fixed in the formula, it should be chosen at time of planning. How do you have yours right now? Do you know why I get this error message, and what I need to do to in the FOX formula, to make sure it can be populated at run time?
    Thanks for your help and information in advance.

  • Display Message from automatically FOX-Formula

    Hello,
    we are using a FOX-Formula as automatically Function "After data change" within the planning-layout (WebInterface).
    Does anybody know, how we can tune the function / layout, that we will see this message if the conditions agree?
    For example:
    IF {ZK_MWERTD, '301', 'KVBE', '01'} <> 0.
      MESSAGE I002(ZBW).
    ENDIF.
    If we are using this function by function-button, it works quite well. But not in this case, we are using it by automatically function.
    Best regards
    Daniel Eiduzzis

    Hi Daniel,
    if I remember it right, the messages do only appear if they are error messages.
    I am not sure about Warnings, so try it with the message type W or E.
    regards
    Cornelia

  • Sentence Vari on fox formulas 2004s

    Hi Gurus !!  I need some help on an error for my code.
    I have a fox formula that it works on 3.5 version but it doesn´t on 2004s.
    The error message is " Error en función VARI acceso con offset 2 cantidad de valores 1 "  It means that the VARI sentence is on error with the offset 2, and the same for the rest of the offset. I`m trying to do this :
    DECLARACION VARIABLES
    DATA V_MONTO TYPE F.
    DATA COUNT TYPE I.
    DATA V_PER TYPE 0FISCPER3.
    DATA V_YEAR TYPE 0FISCYEAR.
    DATA V_FISCPER TYPE 0FISCPER.
    *ASIGNACION VALOR VARIABLES
    V_YEAR = VARV(VYEAR1).
    V_MONTO = VARV(VAR_MONTOANUAL).
    V_MONTO = V_MONTO/12.
    COUNT=1.
    DO.
    V_PER = VARI(VPER,COUNT).
    V_FISCPER=CONCAT(V_YEAR,V_PER).
    {0AMOUNT,V_FISCPER, V_PER,V_YEAR} = V_MONTO.
    COUNT = COUNT + 1.
    IF COUNT = 13.
      EXIT.
    ENDIF.
    ENDDO.
    Any Clues ??
    Thanks in advance !!
    Natalia.

    I already solution it.

  • How to display my FOX formula result on the layout

    Hi Guru's,
    I have created one Fox Formula for OTB using the given below calculation
    Planned Open-To-Buy (Retail Price) = Sales / Retail Value +  Last Planned Stock (Retail Value) - Open Purchase Orders (Retail Value with Tax) - GR Posting Date / Vendor RtlT + Promotion Sales / Retail .
    When I am executing my Planning function (using BPS0) then it is working fine. It is showing the correct OTB value.
    I have insterted this FOX function into my layout using UPSPM tcode. When I execute the OTB calc function from UPSPM then correct data gets saved into my real-time cube. However OTB data is not getting displayed on my layout.
    Is there something else which I am supposed to do to display the result on the final layout ?
    Thanks,
    Ashu gupta.

    Hii Guys,
    Thanks a lot for your inputs. My issue has been resolved. I was not able to get the FOX formula output on the layout as the formula was not giving unique record. I have removed version char from my level and flds for selection. Now everything is working fine.
    Thanka again for your valuable time.

  • Variable used in FOx formula should get value from user

    Hi Gurus,
    In my fox formula I want to multiply a keyfigure (say quantity) with a factor. For example if the factor is 10 then all records should get multiplied by 10.
    But the requirement is user shpuld be able to give the factor that should be multiplied. That is the l_factor used in the fox function should be a variable which gets value from user. I know we can give variables in filter and planning functions in IP. But can we give values in Fox formula.
    I would really appreciate the time and effort.
    Thanking you,
    Jerry Jerome

    Hello,
    May be you can try this solution.
    I think you have create a dummy character info-object(Z_Number) of same data type interget number.Create variable for Z_Number and restrict in filter(ZV_NUM).
    DATA Z_MAT TYPE 0Material.
    DATA Z_NUM TYPE Z_NUMBER.
    DATA Z_NUM_READ TYPE I.(Declate same as data type for Z_Number)
    Z_NUM = VARV(ZV_NUM).
    FORACH Z_MAT.
    Z_NUM_READ = Z_NUM.
    {Z_KF1,Z_MAT} = Z_NUM_READ * {Z_KF1,Z_MAT}.
    ENDFOR.

  • How to change the variable value in fox formula?

    Hi All,
        Please help me achieve this scenario,
             in the variable selection screen , i wil give some i/p like, calyear(0calyear) = 2008.
          In planing function using FOX formula, i must be able change the variable value to 2009.
      Will it be possible to achieve this, can we change a variable value using FOX formula, if possible
    please let me knw how to achieve this.
    Thanks n Regards,
    Priya.

    Hi Priyadarshini,
    i dont know what is your requirement exactly.If you can give a better explanation of ur requirement we can help you. But to answer your question yes we can get new values for the variable in the planning function.
    for this you need to couple the planning function together with the planning filter in a planning sequence. This planning filter should have the variable that you wanted to change. In the WAD when you want to call this planning sequence there is an option to call variable screen. If you enable this, it will pop up the variable screen to get this value again.
    Guess this was helpful.
    Regards.
    Shafi.

  • Error 8: Syntax Error?  Please Help!!!

    ~What im trying to do~
    > Make a simple animated wallpaper gif for my webpage
    Ok, i'll just go step-by-step on what i did to get this error, hopefully someone can help.
    1) First off, i have Photoshop CS3 Extended for Windows XP
    2)All i did was go to File> Scripts > Browse
    3)Then i try load a quicktime clip
    4)I get an error that reads *Error 8: Syntax Error, Line 1*
    This happens whenever i load a quicktime sequence, and it just started recently. Usually id be able to load up one no problem.

    ~What im trying to do~
    > Make a simple animated wallpaper gif for my webpage
    Ok, i'll just go step-by-step on what i did to get this error, hopefully someone can help.
    1) First off, i have Photoshop CS3 Extended for Windows XP
    2)All i did was go to File> Scripts > Browse
    3)Then i try load a quicktime clip
    4)I get an error that reads *Error 8: Syntax Error, Line 1*
    This happens whenever i load a quicktime sequence, and it just started recently. Usually id be able to load up one no problem.

  • Multi-value parameter report - error : Incorrect syntax near ',' with multi-valued parameter in SSRS

    Hey,
    I created a report in Reporting Services  where I added multi-value parameter
    ( Filter).  When I run my report, and try to select more than one parameter, I get an error:  Incorrect syntax near ','
    then i put in parameter expression :  join(Parameters!Filter.Value,",")  
    and add : dbo.ufnSplit  before calling parameter in query :
    >>>  set @valwhere = 'table.field IN (select * from dbo.ufnSplit(' + @Filter + ' , '',''))'
    but i still have errors : incorrect syntax near 'text'  which is the second value of the picklist of the parameter,
    Please Any idea ?
    Thanks !!

    I have sometimes had to collate as default with the SQL query
    currently I've just using
    CompanyName in
    (selectitemfromdbo.fnSplit(@function,','))
    In the SSRS report text box I have Join(Parameters!Company.Value,",")

  • Set global variable in FOX formula

    Hi all,
    Does anybody know how to change the value of a global variable inside a FOX formula?.
    I can get its value and assign to a local variable but I would like to set the global value after reading a keyfigure and make some calculations.
    is it possible? maybe with some ABAP function call?
    Thanks for your help!

    Include characteristic HIRE in your 'fields to be changed' of planning function and in FOX write:
    DATA L_HIRE TYPE HIRE.
    DATA EXISTBPSID TYPE ZTA_BPSID.
    DATA BPSIDNO TYPE ZTA_BPSID.
    BPSIDNO = VARV(BPSTAS2).
    FOREACH L_HIRE.
    IF EXISTBPSID = '#'.
    {L_HIRE,BPSIDNO} = {L_HIRE,EXISTBPSID}.
    BPSIDNO = BPSIDNO + 0000000001.
    ENDIF.
    ENDFOR.

Maybe you are looking for