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

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

  • 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 ?

  • 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

  • URGENT! SEGV-errors when using Oracle C XML Parser for Solaris

    I often (not always) got SEGV-error with core dump when I use Oracle Oracle C XML Parser for Solaris. This Error is always got in the call of the the function xmlinit(...) with all params as NULL but the first required for the error code and the second which i assign a macro that evaluates to "US-ASCII". Does anyone knows about this problem?
    I am using a very short, wellformed and validated XML document.
    I would be very glad for some help about this!
    null

    Please provide a sample program along with the version number of the XML parser.

  • Always getting syntax error when using RANK formula. Please help!!

    i am desperate! tried EVERYTHING. so as a last try, I tested the very same Example that Apple gives to elaborate how the "RANK" formula works...and you guessed it....NOT WORKING.
    not even a reconstruction 1 to 1 of the apple example worked, giving me a syntax error.
    thus i am assuming that i am doing something wrong on a very basic level i would have never thought of (maybe a setting i have wrong?, maybe if you have blue as background formulas don't work?).
    i would be sooooo grateful for any help!!!

    Thank you very much for answering this quickly.
    but unfortunately it doesnt work
    i made some screenshots, maybe this way someone sees a maybe obvious mistake i am making
    and
    Message was edited by: Apolloss

  • 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.

  • Fox Formula vs ABAP

    Hi guys,
    I'm working with a Material Hierarchy (Main Group (MG)(0PRODH1), Group(G) (0PRODH2), Subgroup (0PRODH3) (SG) and Mat (0MATERIAL). In my Planning package I have a specific Hierarchy Node for 0MATERIAL.
    I need to perform a calculation in different levels: For example:
    If I use Fox Formula I can get passed a data record like:
    MG, G, SG, Mat, Qty  and  MG, #, #, #, Qty
    But If use User Exit I can only see a data record like:
    MG, G, SG, Mat, Qty  and Not  MG, #, #, #, Qty (because in this case the Mat is # (empty).
    To get around of that I put # in the Material Hierarchy for testing, but now I having problem with locking.
    Is there any other solution for that?
    I'll appreciate your comments.
    Thank you,
    Heverton

    Keep a session break-point as shown below.
    Go to se37 : Function: RSPLFC_FORMULA_EXECUTE
    Keep Session break-point at line 17
    PERFORM planf_forml IN PROGRAM (i_genprog) USING i_th_ref_data
                                                     i_s_blockline
                                                     i_guid
                                               CHANGING
                                                     lt_mesg
                                                     c_th_data.
    single step execution ( F5 ) will tke yo to FOX Code.

  • 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.

  • 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.

  • Error when using running total variable in formula

    This is probably an easy syntax problem, but I'm fairly new to Crystal reporting.  I created a running total variable (count) called InquiryTypeSubtotal that simply counts the number of records.  I have one grouping level, and in the group footer I'd like to print a line showing the total count for that group that looks like
    Total inquiries for Assistive Technology: 3
    To accomplish this I'm using a formula field with the following syntax:
    "Total inquiries for " + {CnAttrCat_1.CnAttrCat_1_Description} + ": " + ToText(@InquiryTypeSubtotal)
    When I try to check the formula, I get the error message "The ) is missing."  What am I doing wrong?
    Thanks,
    Alec

    I put in the curly brackets so my formula now reads
    "Total inquiries for " + {CnAttrCat_1.CnAttrCat_1_Description} + ": " + ToText({@InquiryTypeSubtotal})
    Now when I check the formula I get the error message "This field name is not known."
    Alec

  • Computational Error when using if then formula in a block, when the formula

    Hi all,
    I am getting a computational error on one of my reports,
    where i have created a new variable. The variable is an "if and
    then" formula which uses the date variable. However if i leave the
    date variable in the report block then the new variable is fine and
    works. However due to the nature of the report we would like the
    report to give a summary over a date range. In normal circumstances
    i would be able to simply drag out the date variable from the report
    block and it would create a summary. Unfortunatley in this instance
    i get the dreaded "computational error". I know its due to the fact
    that business objects requires the date variable present. Is there
    any way around this...
    I've seen some manual work arounds i.e table
    properties and hide the date field, and then group header for each
    category with totals and then table properties and select Fold so
    that it shows the total (one for each product, rather one for each
    day and each product). Just wandering if there is perhaps a more
    efficient way around this. your help will be much appreciated.
    Nandeep

    I don't think it is possible to lock in the date and time using a formula. You could put NOW() in a cell, copy, and Edit Paste Formula Results where you want the result.
    Or if you are "time stamping" a lot, you may find this Automator Service (Dropbox download) helpful. It puts a "Today" function (actually it should be named "Now" because it includes both date and time) in your Services menu like this:
    Just doubleclick the .workflow package to install it. You may have to click "download anyway" in System Preferences > Privacy & Security.
    If you want you can assign the service a keyboard shortcut in System Preferences here:
    SG

  • Using variable in fox formula containing several characteristics

    Hi @all,
    is it possible to use a variable in fox containing more than one characteristic? I need to have some additional information for a few 0SEM_POSITs but don't want to create an attribute.
    I've created variable ZSCV25 containing characteristics 0SEM_POSIT and ZSCADVDEL but wasn't able to get any data by using VARI.
    Anybody an idea? Thanks for your help.
    Regards,
    Thomas

    <FONT FACE = "Tahoma", Font Color = "Blue">
    Dear Thomas<br>
    I don't think FOX Formula Variable can contain more than one characteristic value. <br><br>However I can suggest you to try one thing. Create an Exit Variable and in its ABAP Code refer to the master data table of base variable and retrieve the value of its desired attribute. <br><br>For example, let us assume that you have a characteristic 0COMP_CODE and 0COUNTRY is its attribute. Now you want that depending on the value of 0COMP_CODE selected by User in another variable ZCOMP_CODE , 0COUNTRY should be automatically populated in variable ZCOUNTRY. So in this case, please make ZCOUNTRY as an Exit Variable and write ABAP Code for that. In the ABAP Code, get the value of 0COMP_CODE which is entered by User in the other variable ZCOMP_CODE. Then write a select statement in ABAP and retrieve the value of 0COUNTRY from the master data table of 0COMP_CODE where Company Code value is equal to value of variable ZCOMP_CODE.<br>
    I hope I am getting you and you are getting me :-)<br>
    <br>Please let me know in case of any confusion.
    <br><br>
    Hope it helps.<br><br>
    Cheers Abhijit<br>
    </FONT><FONT FACE = "Verdana", Font Color = "Red">
    Removed
    </FONT>

  • Using BPS numberic variables in the FOX formula???

    Hi all,
    Can someone tell me how to use one variable (<b>the variable type is 'numberic'</b>) in the FOX formula? Thank you.
    FOX formula example:
    <b>Inventory $= inventory unit * inventory (per unit) * depreciation monthS (<u>this is a numberic variable</u>.</b>
    J.

    Hi John,
       You can use the VARV function to get the value of the numeric variable in FOX.
       Lets say your variable for depreciation months is ZDEPMTS.In your FOX, you
       can say: Inventory $= inventory unit * inventory (per unit) * VARV(ZDEPMTS).
       Hope this helps.
    Cheers
    Srini

  • 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

Maybe you are looking for

  • I can't zoom in and out using the scroll wheel

      so i want to zoom in and out on photoshop how i always have...using ctrl and scroll wheel... but when i went to do it how i naturally do it, it didnt work..after some research i found you go into preferences, general and tick the box about zoom scr

  • Itunes store does not show

    When opening my iTunes software on my Windox XP Professional OS PC everything shows ok, but the iTunes store, iTunes Match, Ping and Downloads does not show but a blank screen, I already unistalled and installed 5 times and still can't get a clear id

  • My IPAD is slower after upgrading to OS5. why??

    Since upgarding to new OS5 i have noticed my IPAD is considerably slower, especially the Calendar. anybody experience similiar? thanks

  • Video from built-in ISight camera to FC???

    Greetings. Has anyone ever recorded a video from a 24" LED Apple display using the built-in ISight video camera and then import that into FC? What I did seems to work, but the sequence has to be rendered. Here's what I did. Record video from Isight.

  • Aironet 1310 errors after upgrade

    hi guys, i have a air-br1310g-a-k9-r box. i had the firmware c1310-k9w7-mx.123-8.ja on it. i upgraded this unit to the firmware c1310-rcvk9w8-tar.124-10b.JA3 after doing so my unit doesn't work any more. I'm getting the error the messages as posted i