Formulae function fox

Hello,
as i try to repost a char value based on the condition of the value of a Kfig,( on an existing record)
I want to go from
Char1 value =: "#"        KFIG 1 value : " 1"
to
Char1 value : "A1"    if    kFIG 1 value  ="1"
then it would be; "A2" for" 2"        "A6" for "3"         "B1" for"4" ( i use the Kfig to score suppliers)
It is a kind of repost function but based on the value of a Key figure,
Deepti Maru  (thank you) gave me that code
DATA L_KF TYPE KEYFIGURE_NAME.
FOREACH C1.
IF L_KF = 'K1' AND {L_KF, C1} = 1.
{L_KF, 'A1'} = {L_KF, C1}.
ENDIF.
ENDFOR.
But the formilae builder is expecting a variable name ( i ve got a variable on that condition)
There must be something that i am doing wrong, could you replace correctly my char and Kfig in the code? as you have understoud I am not used to coding
Key figure name:
ZCALC3
Characteristic:
ZREASCOD
Characteristic Variable name
ZTEST007
Many thanks for help and time, much more appreciated
Stephane

Hi Stephane,
Try this code..
DATA CHAR TYPE ZREASCOD.
DATA VAR TYPE ZREASCOD.
DATA VARV ( VAR).
FOREACH CHAR.
  IF CHAR IS INITIAL.
     IF {ZCALC3,CHAR} = 1.
     {ZCALC3,VAR} = 1.
    ENDIF.
ENDIF.
ENDFOR.

Similar Messages

  • Obtain a value of the  char ( In a FOX formula) when CHAR is Modifiable

    Hi ,
      We are doing Integrated planning in NW04S BI.
      Assume we have a Agg level field1, field2, field3, field4 and Amount field.
    we defined a filter with Field1 and Field2.
    We have defined Field3 and Field4 as changeable in the Planning function ( FOX)
    In the planning function, we can use OBJ() to obtain values for Fiield1 and Field2 BUT not Field3 and Field4.
    We have processing logic where we need to know the field value of Field4 and Field5 for the data object.
    Is there a way to obtain Charteristic value, when the chartestics are actually defined as' To be changed' in the FOX planning function?
    Appreciate your help.
    BPSIP

    Shyam,
    While your answer is helpful, I would request you to provide a little detail of the exact syntax. For example, I have provided the logic below. Please let me know if I get the correct syntax of the FOREACH .
    Thanks
    assume field1, field2, field3, field4 all are info object in BI and are part of the Aggregation level.
    field3 and field4 are configured as 'To be changed' in the planning function.
    Here is the FOX CODE
    data   v_field1 type field1.
    data   v_field2 type field2.
    data   v_field3 type field3.
    data   v_field4 type field4.
    v_field1 = obj().
    v_field2 = obj().
    foreach v_field3.
    if v_field3 is initial.
    I like to do some complex processing here. for some
    reason, looks like it's not working, PLEASE HELP WITH *THE CORRECT SYNTAX for reading and comparing the value *of v_field1 for this data block.
    endif.
    endfor.
    end of  FOX CODE

  • How to realize special scenario with FOX formula - FOREACH, variables

    Hello,
    we want to use the integrated planning for the following thing within the portal:
    A salesman should add manual values (planned turnover) for his top 10 customers. The rest of his yearly budget should be distributed automatically and equally to the rest of his customers.
    I thought a lot about it and arrived at the conclusion that:
    - we have somehow to put the salesman number into a variable maybe also the year for which the planning should be done -- Which possibilities are given to do this?
    - We need an additional flag that tells if this customer has to be planned / was planned manually.
    After the manual planning a planning function (FOX formula) has to be executed in order to
    1. get the budget that was already planned manually
        use of FOREACH in combination with an IF clause
        -- Which kind of FOREACH do I have to use?
    2. calculated total budget - manual planned budget = budget that has to be distributed
        after FOREACH
    3. count on how many customers the distribution has to be done and calculate the
        turnover per customer (rest budget / counted customers)
        use of another FOREACH loop which counts every value that hasn't got the flag set
    4. distribute the remaining budget on the customers that weren't planned manually
        -- Can it be done with something like turnover=value that should be assigned ?
    Maybe it's simple to realize this scenario but I'm a absolute "newbie" on that theme.
    Thanks
    Bettina

    Hi,
    I have been following this thread for quite long, here's my take on this
    1. Please create all the master data like sales man, customers in BI. for the key customers  add an attribute to key customer which can be a single character field.
    2. Add Sales man as an attribute to customer master and maintain values for each customer.
    3. Create an exit variable for customer number, this should read value from the sales man variable and populate all the key customers.
    4. Create an agg level with the above 2 and the required time characteristic. There will be 3 variables on the input ready query a. sales man number b. key customer exit variable c. some time period variable.
    5. Create a planning function of type generate combination for the agg level created in the above step. Add this function to the work book or the web template.
    6. Now salesman will be able to go in and create his budget for the key customers.
    Annual budget entry
    1. Create an agg level without customer, add salesman and time characteristics.
    2. create a query which will allow to enter data (yearly budget) for the salesman.
    Allocation to non key customers
    1. Create an agg level that should create the missing combinations sales man and non key customers. If designed properly the first agg level can also be used for this function.
    2. Create a fox function which with foreach loop for customer and sales man if the amount is 0 add 1 to counter, also read the value wtih customer as blank (yearly budget), lastly if the amount is not blank sum up the amount. This will help in getting the balance amount.
    3. get balance figure as total - allocated. One more foreach loop same as above if the amount is blank then amount = balance / counter.
    Tried to answer
    thanks

  • Web Interface - Call a function when web interface starts

    Hello,
    my problem is to call a function (fox formula) when the web interface starts. This function may execute only once.
    Can somebody help me?
    Thanks
    Stefan

    Hi,
    1. Create a custom class ZCL_BPS in SE24 inheriting the properties from superclass CL_UPWB_BSP_APPL.
    2. Redefine the method LOAD of this class ZCL_BPS and call your FOX formula over here using function module API_SEMBPS_FUNCTION_EXECUTE.
    eg. code
    METHOD LOAD .
    TRY.
    CALL METHOD SUPER->LOAD
      EXPORTING
        APPLICATION_NAME = APPLICATION_NAME
      RECEIVING
        APPLICATION      =  APPLICATION.
    CALL FUNCTION 'API_SEMBPS_FUNCTION_EXECUTE'
      EXPORTING
        I_AREA           =  'ZAREA01'
        I_PLEVEL         =  'LEVL001'
        I_PACKAGE        =  'PACK001'
        I_FUNCTION       =  'PFUN001'
        I_PARAM          =  'FOXF001'.
    ENDTRY.
    ENDMETHOD.                    "LOAD
    3. Replace CL_UPWB_BSP_APPL  by ZCL_BPS in the Application Class property of your Web Interface.
    This works for sure.
    Please grant points if it solves your purpose.
    Regards,
    Deepti

  • Us Planning Function to Update BPS Variable

    I have read through several 'How To' papers on variables, but did not come across this.  Is it possible to develop a planning function (FOX or User Exit) to prgramatically read and then update a BPS variable?

    <FONT FACE = "Tahoma", Font Color = "Blue">
    Hi<br>
    --> You can write an ABAP Exit Variable and populate TO variable as From Variable + 1. You can then use both these variables in a Planning Level and use Normal BPS Copy to copy data from FROM version to TO version. You can include this Function in a Global Planning Sequence and later on include this Sequence in a process chainby creating variant on Standard Program UPC_BUNDLE_EXECUTE.<br><br>
    Let us assume that because of some reasons you don't want to write ABAP Exit. Then you can write a FOX Code to do copy for you. Choose Version as Field to be changed. You can use TMVL operator in FOX to increment your FROM variable and populate your TO variable. You would have to include all of your characteristics in your planning level to be safe. But please note that this is not a recommended way to do copy. You should use standard BPS Copy Function as far as possible.
    <br><br>
    Hope it helps.<br>
    Cheers Abhijit</FONT><FONT FACE = "Verdana", Font Color = "Red">
    Please assign Reward Points if I deserve them in your opinion
    </FONT>

  • Perform BPS functions on the background

    Is there way to perform BPS functions (Fox Formula or User Exit type of function) on the background? In this case putting all the functions in a Global Planning Sequence.
    I have the request to load data to the BPS cube and perform BPS function during the weekend in a way that on Monday morning I'll have the users to check on the data already calculated? What's the procedure?
    Thank you.
    Heverton

    Hi Heverton,
    Yes, we have executed planning sequences in the background to copy and calculate data using scheduled background jobs. As a future reference, you may use the following steps to schedule a background job:
    Transaction SM36 (Define Background Job) - enter a job name and click on Start Condition.
    Click on 'Date/Time' button and enter the scheduled start date and time to run the job.
    Click 'Period values' button and select the period in question. Click 'Save' button.
    On the Define Background Job screen, click on (foot) 'Step'.
    Click on 'ABAP program' and enter 'UPC_BUNDLE_EXECUTE' in the 'Name' field. Select the appropriate variant in the 'Variant' field. Click 'Save'.
    Note: to schedule more than one variant in one job, click (foot) 'Step' and from 'Step List Overview' screen click 'Create' and repeat steps to select and save variant.
    Click 'Save'. System display message 'Job <name> saved with status: Released'
    You can monitor the background job using transaction BPS0, select 'Global planning sequences' and then 'Logs' button. Enter date/time/user, which matches the timeframe when job was executed. Click 'Execute' and verify the job log.
    Hope this helps.
    Kind regards,
    Cassio

  • *** FOX in basic infocube ??? ***

    Hi !
    Do I need to create an infocube real-time type to execute just a FOX formula or a FOX formula run without problem in a basic infocube ?
    Thanks,
    Leandro.

    Hi Leandro,
    We use Planning functions (FOX, etc.) to accompolish automatic processing of the plan data. Real time Infoproviders (InfoCubes, ODS, etc) are write-enabled whereas Basic Infoproviders are read-enabled.
    So since you are manipulating the data and subsequently writing the data in the cube with the execution of FOX, Real time Cube is a must.
    We can at best flip the switch to 'Load mode' to act as a basic cube for loading purposes.
    Manoj

  • Difference in Planning function in BPS and IP

    Hi All,
         Can somebody tell me is there a difference in 1) planning function Fox in BPS and IP where exactly is the difference and 2) what all planning functions are different in IP

    Hi,
    First take a look at this thread and then the presentation.
    BPS VS IP
    http://csc-studentweb.lrc.edu/swp/Berg/Conferences/SAP_NW2008_and_Admin_2008/BI/Track4/Track4_session7.pdf
    Regards.

  • BI-IP / Formula navigation attribute

    Hi,
    i have the following problem and hope somebody can help.
    I have a BI-IP planing function (Fox-Formula) which simply copies the keyfigure Amount from the characteristic company (#) to the characteristic company (8703).
    { KI_LCCUR, 8703 } = { KI_LCCUR,# }.
    this characterisic has also a navigation attribute headquarter.
    when i run the function the following error message appears:
    8703,# is invalid: Valid is 8703,DE. Characteristic "ZCompany"
    which means  to me the master data for charactersitic company 8703 and its attribute Headquarter # is not valid, which is true. But what do i need to do in order to use the right combination 8703,DE?
    Is there a way to make fox formula to find the right value for the attribute? is there a way use navigation attribute in fox formule?
    Thanks for your help in advance!
    Mike

    Hi,
    The problem can be due to the mapping in the cube.
    Please reactivate your cube.
    If you are using a multi-provider, then please check that the navigational attribute is defined in all the cubes in mulitprovider.
    Regards,
    Amit

  • Calculated key figures in manual planning

    I'm trying to set up a Material Planning system using BPS.
    One of the requirements my customer wants is that in the manual planning he can both modify a multiplier as well as one of the resulting amount key figures.
    The multiplier is used to calculate the consensus amount based on a consolidated amount.
    In my manual planning I have the possibility to allow input on the multiplier as well as the consensus forecast (that has been calculated upfront). Now I need the consensus forecast to change when th multiplier is changed.
    How can I best tackle this? (Yes, I'm fairly junior to BPS...)
    Thanks for any guidance in this matter.
    Regards,
    Eric

    Hi Eric,
    to give business the most flexible solution, allow them to manually change the multiplier or the result and provide two planning functions (FOX). One for calculating the result from the multiplier, and one for the reverse. Then the user can choose which direction they want to go.
    Regards,
    Marc
    SAP NetWeaver RIG

  • Character Encoding in Crystal Reports

    Hi,
    We are using HTML character encoding to prevent SQL injection, i.e. when a special character like apostrophe (') is entered, it is saved as &#39;. I wanted to know if we could manipulate the data in between the two operations of fetching the data from the DB and displaying the data using Crystal?
    We could use formulae/functions in the design/query, but I am looking for a more generic solution using Crystal API. I have attached a screenshot of how Mc'Donald is displayed in the Report.
    Thanks for the help!
    Noopur

    All you need to do is format the field in CR to use HTML Text Interpretation. However note that CR does not support all HTML tags. For details see the following KBAs:
    1217084 - What are the supported HTML tags and attributes for the HTML Text Interpretation in Crystal Reports?
    1272676 - Not all the standard HTML tags are interpreted in Crystal Reports when using HTML Text Interpretation
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Authorization/Allocations for XMLForms

    Where can i allocate km and security zones?
    The standard roles were copied and limited on necessary functions. In this framework however the call went from XML form lost. I could imagine that the problem lies in the Security Zones or km authorizations. With copy of the roles the allocations to km and security zones are not taken over. I could find no references to necessary authorization/allocations for XMLForms.
    Regards

    Indeed the allocation function is and will not be supported in integrated planning if you want it I think you should install SEM on top of it.
    But using the standard allocation function is not really recommended because the set up is done within BPS or IP modeler and if the allocation run changes a lot the user should have authorization to this and that is not recommended. A standard allocation function can be easily recreated using an input screen with all kind of allocation keys and a formula function(FOX). You have also more possibilities then in the standard function.
    So create an input screen for entering stat key figures or % for sender and receiver. And create within FOX a function that uses these parameters to run the allocation function.
    Kris Bornauw

  • Validate mandatory field in BPS Excel layout

    Hi Sdner
    In my BPS Excel layout i want to have some characteristic as mandatory.If i don't put any value for them system will put a # by default which i don't want. system should prompt a error message that particular field is mandatory and enter some value. I can check this thru planning function(FOX) but the problem is all characteristics in that row will greyed out after function execution and hence can't be changed by user.
    Does somebdy know if there is any workaround to solve this ?
    Thanks
    Tripple k

    Hi Tarun
    Use XL macros to validate data in a column.
    When macro executes it first unprotect the worksheet,then we have our custom code for validation and error message, after that it is followed by a  protect sheet command.
    My Prob is that if error is there in any field raised by macro, user should be able to edit those fields but as we are protecting our worksheet in macro, editing is not possible.
    I can't unprotect the worksheet because then user can change anything.
    +Use a read function module on planning layout. While you are in layout change mode use lbexit_fm as a transaction code. You can read data from planning layout and write validation code and error message in ABAP function module.+_
    I  used this Tcode and FM, but they are ment to read Non SAP area of Excel sheet. The actual layout(Data Record)(SAP Area) which we want to read is not coming in internal table while executing FM.
    On Execution it is saying that reading and writing on SAP protected data is not allowed.
    If you have done any of these workaround then can you please put some more lights on this ?
    Thanks
    Tripple k

  • SAP BPC DOORS SHEET MIS TEMPLATE IMPLEMENTATION

    Hi ALL,
    In my first Input Template I got the data for individual one.like... Particular -Sales group,  Region, Product we get value.
    Whereas in my Second MIS Template I need data for the sum of all data from first Template and result for one GL Account in 2nd template.
    Is it possible to make it?
    Because if I need total value of 1st template then I can make it ,but it becomes parent.And Parent data cannot be brought out in script logic and result it into the particular GL of 2nd template.
    Please suggest.
    Regards,
    Kanishka

    Hi Neeraj
    As Andrew said it is purely business call.
    It will be better to have all GL Accounts related to P & L , Balance Sheet in your MIS Model.
    As You need to integrate & get data from other Models like Sales, Production etc. You can get data into GL Accounts from other models and Final P& L will be on MIS.
    You can build logic for the same. (Script Logic, Planning Functions,FOX  etc.)
    Rgds
    SriG

  • Update variable value from Web Item Drop Down Box

    Hi Experts,
    My issue is that i have dropdown on Characteristic 0EMPLOYEE so when ever the user enter the template restricting with a costcenter then the the list of employee will be displayed but when user restricts the template view to a employee using the dropdown then can we pass the employee restricted in dropdown box to a variable in Planning function.
    Regards,
    Raj

    Hi Raj,
    You can do the following.
    1. Create a filter on your aggregate level. Add 0Employee to the filter. Create an user input variable (ZV_EMPLOYEE) on 0Employee which will be used to hold the values entered by the user.
    2. Assing the above created variable to the 0employee in filter.
    3. In the planning function (FOX), create a local variable for 0Employee . Eg. DATA VAR_EMPLOYEE TYPE 0EMPLOYEE.
    4. Assign the variable value passed by user to this local variable in FOX
    VAR_EMPLOYEE  = VARV(ZV_EMPLOYEE).
    5. If the employee count is more use FOREACH statement in the FOX. like FOREACH VAR_EMPLOYEE.
    6. Creat a planning sequence which will have the same filter and the function.
    7. You can also use the same filter in your plan query as well, so that the data set remains same.
    This will solve your problem. Please writ back in case any clarification is required..
    Regards, Rishi

Maybe you are looking for

  • Problem with bios K7N2 delta - L

    i come frome poland and i have a problem i have msi k7n2 delta - L ,athlon 2600XP,ddr 400/512,msi ti 4200x8 i have bios in my computer version 5.20 and when i upgrade to version 5.30 , 5.40 and 5.50 5.60 when i play in games or when run 3dmar 2001 sy

  • SCCM 2012 R2 sp1 cu1 ccmsetup.exe still 5.00.7958.1000

    I downloaded sccm 2012 r2 sp1 cu1.  I applied the server update to our Primary server.  I also pushed out the client update (5.00.7958.1203) to all of our servers.  But I have noticed that any new servers are still showing client version as 5.00.7958

  • Can't update FM 10.0.1 to FM 10.0.3

    Application: Frame 10.0.1. Trying to install the patch to fix the "License expired" error that started showing up on 1/1/13 (this would bring FM up to 10.0.3). Patch installer said my Adobe Application Manager was broken, and told me to download a ne

  • DWLoader works in SSIS Execution Process Task?

    Does anyone knows if PDW's DWLoader works in SSIS Execution Process Task? Is there a sample? I struggle to find documentation on using DWLoader.exe in Execution Process Task (EPT) of SSIS. There are articles in PDW BOL about DWLoader.exe or SSIS to l

  • Customer's tab data is defaulted in ME53N

    Hi All, how to code that everytime user wants to display ME53N, the tab defaulted is customer tab. pls advice