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

Similar Messages

  • Webinar: How to implement secure scenarios with SAP NW PI 7.1

    SAP Intelligence Platform & NetWeaver RIG APJ Expert Call
    Dear valued SAP Experts,
    Next SAP Intelligence Platform & NetWeaver RIG Expert Call Session will take place on Tuesday, August 18.
    The SAP Intelligence Platform & NetWeaver RIG Expert Call Sessions are designed to support consultants, partners and customers  during their implementation projects. The sessions cover all different aspects of SAP NetWeaver and are aimed at
    thus provide knowledge which is not available via standard training courses. The session duration is typically 60min and includes questions and answers.
    Tuesday, August 18, 2009:
    How to implement secure scenarios with SAP NetWeaver Process Integration 7.1
    Time: 2.00 - 3.00 p.m. Singapore Time (UTC +8)
    This event will feature Makoto Sugishita with the SAP Intelligence Platform & NetWeaver Regional Implementation Group.
    Makoto provides the following abstract:
    In this session you will learn more about the core security concepts that are provided with the service-oriented architecture (SOA)
    management capabilities in SAP NetWeaver Process Integration (SAP NetWeaver PI). This session will cover main use cases and
    supported scenarios of secure SAP NetWeaver PI deployments. 
    SAP Connect Link: https://sap.emea.pgiconnect.com/I016095
    (no passcode needed)
    Dial in:
    For dial in details please register here http://www.surveymonkey.com/s.aspx?sm=EFeuZl9PxrwKOW5i5W556g_3d_3d
    Kind regards,
    Sarma Sishta
    SAP Intelligence Platform & NetWeaver RIG APJ

    hi,
    I'm making this a sticky thread till August 18 so it will have better visibility
    Regards,
    Michal Krawczyk

  • Unable to create new records with FOX formula (IP)

    Dear Guys,
    We created a FOX formula that could not create any records within an empty infocube (got 0 records read, 0 created, 0 changed, 0deleted). how to change this formula to make sure record are created?
    DATA K_0FISCPER3 TYPE 0FISCPER3.
    FOREACH K_0FISCPER3 IN SELECTION.
         { 0AMOUNT, K_0FISCPER3 } = 100.
    ENDFOR.
    Many thanks!
    Kind Regards
    Olivier DESFOUR

    Hello,
    this behaviour is explained in the docu.
    Internal Data Objects and Address
    The internal data objects that are edited are subsets of the transaction data contained in the planning package. The user executes a planning function by selecting a package and a parameter group. This package is divided into smaller data objects made up of transaction data. If a formula requires reference data, these data objects are also created from this reference data. Note: If it is not possible to create data objects, a formula is not executed.
    You will find this detailed docu, if you press F1 in the formula editor in transaction BPS0.
    For BI-IP this detailed docu will be part of one of the next docu shipments.
    The docu belongs to the data element UPC_Y_FLINE. Therefore you can access the docu from the transaction SE11. Choose data type = UPC_Y_FLINE. Press the button DISPLAY.
    Best regards
    Hans-Juergen Schwab

  • 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 to realize czech texts with ResourceBundles

    Hi!
    I have got a big problem trying to make one of our german applications available in czech.
    We are using ResourceBundles with .properties files for our texts and have now translated them into czech. When loading the bundle by calling:
    ResourceBundle rb = ResourceBundle.getBundle("x.x.x.BundleName", locale);all seems to work and there is no exception thrown.
    But when i try to get any text out of it i.e. by calling:
    rb.getString("name");i get an exception:
    java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key name
    I tryied to use native2ascii with several encodings (Cp1252, ISO-8859-1, ISO-8859-2, UTF-8, UTF-16, ...) but i never got one that realy works the way i want. Most of the encodings i tryied changes some of the special characters in the file but also left some of them so that i can get some translated texts but most of them with boxes or question symbols within. native2ascii with UTF-8 encoding only answers with a sun.io.MalformedInputException in the comand line. UTF-16 initially looked fine cause nearly all special characters was translated into \uXXXX escape sequences but also there i got a problem with one special character: � (hope it will be displayed correctly here). This character seems to annoy the native2ascii tool cause the following characters would also be translated into escape sequences even if this is not necessary. Also i got some question symbols in the GUI again (having the charset in the HTML/JSP file set to UTF-16).
    I don't know why the original translated property file could not be read in getting an exception only when trying to get a text not when loading the file. Another thing confusing me is that all encodings (except UTF-16) that i tryied for the translated file corrupted the file by seperating each character with a blank one (so i.e. name = jm�no appered as n a m e = j m \u00e9 n o).
    Some of the special characters in the translation are: � � � � � (and also some other characters with those symbols).
    Please can anyone help me or does anyone has experiences with translating a (web) project to czech or any similar/related language.
    Thanks a lot
    Juergen

    You also seem to have a problem with using native2ascii. You say that you tried to use it with Cp1252, ISO-8859-1 (among others), but how can you possibly have a Czech file in those code pages? They don't support the Czech characters set. You simply need to know which source code page your file is actually in, and then run native2ascii on the file specifying that encoding. I have never had a problem executing native2ascii on a Czech file, it seems to work just fine - as long as the correct source encoding is used.

  • How to realize 'parent first'  with grid api?

    I can realize most of the functions as realized in hyperion analyzer with SetGridOption function in grid api except 'parent first' function. Hyperion analyzer version 5.03 can work in 'Use Grid Api' mode, and can produce the right result, with parent member listed on the top of all it's children members. So I am sure grid api can do it. Could someone tell me how to do it?

    You'd think so, but no. The Grid API works the same way as the spreadsheet add-in - Analyzer has some client code that does the manipulation to "flip" the zoom in results to show the parent first.None of the available options in the SetGridOption function pertain to the positioning of the parent member.Regards,Jade-------------------------------Jade ColeSenior Business Intelligence ConsultantClarity [email protected]

  • How to realize the scenario of Inclusive Free Goods without Item Generation

    I include the condition type NRAB in my pricing procedure, but it shows me that this condition ignored(requirement 059 not fulfilled).
    why?

    Hi,
    Prerequisites
    In the free goods master record in the Free goods category field, select free goods category 3 (inclusive free goods without item generation).
    Follow the foll. procedure:
    In free goods master data maintenance, this new free goods type is dealt with in the same way as the inclusive free goods procedure described above.
    In order processing, you can not create order sub-items.
    For pricing in the main item, you need to create a discount. The standard system provides pricing procedure RVAA01 and condition type NRAB.
    Condition type NRAV is set up as follows:
    It does not determine a discount from a condition record. It uses condition basis formula 029 in the pricing procedure to determine a discount from the free goods factor.
    The condition receives the new pricing requirement 059 in the pricing procedure. This requirement checks whether free goods have already been determined.
    The condition type receives condition category f. This condition category ensures that the condition is redetermined every time the quantity is changed, since this can also mean a change to the free goods quantity.
    regards,
    Siddharth.

  • How to replace special characters with html code characters automatically?

    A colleague and I work on these html pages. They eventually end up as emails, but we have the cold fusion server to pre process them. One thing we are trying to do is eliminate problems caused by unencoded copyright, trademark and smart quote symbols.
    How could I create an array of find / replace commands in the header so it processes the HTML with correct character codes.
    I"m not cold fusion aware, so any kind of starter info would be great. Eventually I might add more replacements to the array.
    As an example TM (font character) would process to ™ and a smart quote or apostrophe would process to a straight one. an en dash character would become –
    Because we copy paste from places, this often happens and it seems like cold fusion could solve the problem quickly and repeatedly all at once.
    thanks for any help
    -smick

    CF has a built in HTMLEditFormat function for handling <  &  > characters.  For handling trademark and smart quote characters you might try searching for a user defined function at http://cflib.org or writing a user defined function yourself that will handle the specific characters needed in your application.

  • HOW TO USE ATTRIBUTE VALUE IN FOX FORMULA LOOP

    HI,
    IAM SUMMING UP AMOUNT BASED ON BELOW COMBINATION AND THROWING MESSAGE IF AMOUNT IS EXCEEDING OPENPO VALUE....AND IS WORKING FINE...NOW I HAVE A ENHANCE MENT THAT I HAVE TO USE ATTRIBUTE PROFIT CENTER VALUE IN THE LOOP. I HAVE DECLARED THIS --- PC = ATRV('0PROFIT_CTR',CC,CA). AND TRY TO USE PC IN LOOP..BUT SYSTEM PROPOSING PC SHOULD BE FIELD TO BE CHANGED..BUT IN MY CASE IT IS ATTRIBUTE WHICH WILL DISPLAY IN LAYOUT...AND FIRST LOOP SHOULD HAPPEN BASED ON PC ( FOREACH CCODE,FP,CR,CA,GL,PO,PC.)....PLEASE PROVIDE UR HELP.
    DATA SUM1 TYPE F.
    DATA SUM TYPE F.
    DATA PO TYPE EBELN1.
    DATA GL TYPE 0GL_ACCOUNT.
    DATA CC TYPE 0COSTCENTER.
    DATA VN TYPE 0VENDOR.
    DATA SN TYPE SCRNUM1.
    DATA SD TYPE SCRDATE.
    DATA VS TYPE KDATB.
    DATA VE TYPE KDATE.
    DATA CCODE TYPE 0COMP_CODE.
    DATA CA TYPE 0CO_AREA.
    DATA FP TYPE 0FISCPER.
    DATA CR TYPE XPRV_CIR.
    DATA PC TYPE 0PROFIT_CTR.
    CCODE = VARV('XCOMPCO').
    CA = VARV('XCOAREA').
    FP = VARV('XPERIOD').
    CR = VARV('XPRVCIRC').
    PC = ATRV('0PROFIT_CTR',CC,CA).
    FOREACH CCODE,FP,CR,CA,GL,PO,PC.
    SUM = 0.
    FOREACH CC,VN,SN,SD,VS,VE.
    IF {0AMOUNT,CCODE,CC,CA,FP,GL,PC,VN,PO,VS,VE,SD,SN,CR}
    {OPENPOVAL,CCODE,CC,CA,FP,GL,PC,VN,PO,VS,VE,SD,SN,CR}.MESSAGE E001(UPF)WITH
    'PROVISION AMOUNT SHOULD BE LESS THAN OPENPOVALUE'.
    ELSE.
    SUM = SUM +
    {0AMOUNT,CCODE,CC,CA,FP,GL,PC,VN,PO,VS,VE,SD,SN,CR}.
    ENDIF.
    ENDFOR.
    FOREACH CC,VN,SN,SD,VS,VE.
    IF {0AMOUNT,CCODE,CC,CA,FP,GL,PC,VN,PO,VS,VE,SD,SN,CR} = 0
    AND
    {OPENPOVAL,CCODE,CC,CA,FP,GL,PC,VN,PO,VS,VE,SD,SN,CR} = 0.
    SUM1 = 0.
    ELSE.
    SUM1 = SUM.
    ENDIF.
    IF SUM1 >
    {OPENPOVAL,CCODE,CC,CA,FP,GL,PC,VN,PO,VS,VE,SD,SN,CR}.
    MESSAGE E001(UPF)WITH
    'PROVISION AMOUNT(SUM) SHOULD BE LESS THAN OPENPOVALUE'.
    ENDIF.
    ENDFOR.
    ENDFOR.
    THANKS,
    RAJA

    Hi,
    If you want to read the value of profit center using keyword ATRV then you need to input values of parameters CC and CA.
    Now the first line that you have written, to derive PC based on CC and CA
    PC = ATRV('0PROFIT_CTR',CC,CA).
    [code}
    here CC value is not determined at runtime ; I mean what will be the value of CC when this line is executed. This line is not inside any foreach loop nor you are reading the value of CC using any variable.
    if you want to use PC in first FOREACH CCODE,FP,CR,CA,GL,PO,PC. loop then CC value have to be  present.
    Put ATRV code inside a loop where CC and CA values are read.
    Thanks
    Pratyush

  • How to export branching scenario with clear images

    using Captivate 7.0 .
    when i export branching scenario, the images are very obscure. (window -->branching view)
    i tried sliding to zoom in and out. the images are not clear, and the texts and images cannot be read at all.
    when exporting, the images are naturally not clear.
    is there any way to make and export clear braching scenario?

    Hello,
    This seems more .NET issue so please confirm if you are suing above code in sharepoint or not.
    For you issue, you can first convert in HTMl then convert HTML to PDF to support all office versions.
    http://forums.asp.net/t/1920685.aspx?Export+grid+into+Powerpoint+2010
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How can I fill down with this formula

    =IF((D2>0, C2-D2, G2) but I want G2 to remain for each cell, I only want the true condition to change. So cell E3's formula would be =IF((D3>0, C3-D3, G2) and so on.
    Thanks

    GE,
    You might enjoy reading Chapter 6 of the Numbers User Guide PDF. You can download it from the Help menu.
    On page 129 there is a section titled Distinguishing Absolute and Relative Cell References that addresses your situation. The dollar sign signifies the column or row in the formula as being Absolute (vs. Relative). Absolute references don't update when you Fill or Copy/Paste.
    Jerry

  • Fox Formula Variable In Query Designer

    Hi Experts,
    I have created 1 variable in fox formula of type VARV and i want this Variable to show in query designer while creating new Variable so that i can replace the Query Variable With Fox Formula by Using Replacement Path.
    While Creating new variable in Query Designer it is not Showing that Fox Formula variable.
    Because i want to use this in WAD While Executing the Planning Sequence.
    Is there any way we could get That Fox Formula variable in Query Designer.
    Regards
    Girish

    Hi Marc,
    While Creating Variable from Query Using Query Properties it is still not Showing That Variable in Fox Formula.
    And My Requirement was to Replace that Fox Formula Variable With Query Designer Variable.
    Please Suggest any Solution.
    Thanks
    Girish

  • Concatenate with 'enter' on a variable

    Hello!
    How can I concatenate text with 'enter' in a variable of text.
    For example:
         IF p_pais IS INITIAL.
            CONCATENATE v_msg ' - v_1000' INTO v_msg.
          ENDIF.
         IF p_est IS INITIAL.
            CONCATENATE v_msg ' - b_1000' INTO v_msg.
         ENDIF.
    MESSAGE i000(su) WITH v_msg.
    I try that the result in a message.
                               - v_1000
                               - b_1000
    not v_1000-b1000
    thanks!

    Your code seems to work ok on 4.6c.
    DATA:
      v_msg(132)   TYPE c.
    PARAMETERS:
      p_pais AS CHECKBOX,
      p_est AS CHECKBOX.
    START-OF-SELECTION.
      v_msg = 'Here''s the message '.
      IF p_pais IS INITIAL.
        CONCATENATE v_msg ' - v_1000' INTO v_msg.
      ENDIF.
      IF p_est IS INITIAL.
        CONCATENATE v_msg ' - b_1000' INTO v_msg.
      ENDIF.
      WRITE:/ v_msg.
    And the output is
    Here's the message - v_1000 - b_1000

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

  • Problem with Nested loop in Fox-Formula

    Dear Experts,
    Let s share the scenario :
    MaterialGroups with following Keys for Example AAAA, BBBB, CCCC..., Materialgroups are selected in the 1st input ready query, which is assigned to DataProvider DP_1 in a  webtemplate.
    every Materialgroup has several Materials, for instance:
    Materialgroup AAAA has following Materials: AAAA10, AAAA11, AAAA12, AAAA13...
    Materials are  selected in a second  input ready Query, which is assigned to a second DataProvider DP_2 in the Same Webtemplate as the query 1.
    Both Materialgroup and Material are based on the same Aggreagtion level and same real time cube.
    I want to copy the input values for every  MaterialGroup ( 1st query, DP_1) only to it s own Materials (2cond Query, DP_2).
    To resolve this Issue i wrote the following Fox Formula code with a nested loop, however it does not work properly. when I m debugging the code, i could release that the second Loop was ignored.but wehn i replace the second loop (nested loop) with a fixed value it s seems to work properly
    DATA MG1 TYPE MATG.<------ MaterialGroup
    DATA MT1 TYPE MAT.<----
    Material
    DATA S1 TYPE STRING.
    DATA S2 TYPE STRING.
    DATA S3 TYPE STRING
    DATA K TYPE F.
    DATA Z TYPE F.
    FOREACH MG1.
    To check Materialgroup in debugger
    S1= MG1.
    BREAK-POINT.
    K = {KEYfIG, #, MG1}.
    BREAK-POINT.
    FOREACH  MT1.   <----- if i set MT1 to a fixed value like AAAA11 then S3 get the wished value namely AAAA
    S2 = MT1.
    BREAK-POINT.
    S3 =  SUBSTR (MT1, 0, 4).  
    BREAK-POINT.
    IF S1 = S3.
    {KEYFIG, MT1, #} = K.
    following Statement is only used To check in debugger if Material has become the same Materialgroup value
    Z = {KEYFIG, MT1, #}.
    BREAK-POINT.
    ENDIF.
    ENDFOR.
    ENDFOR.
    Thakns for any help
    Frank
    Edited by: FRYYYBM on Mar 17, 2011 10:54 PM
    Edited by: FRYYYBM on Mar 17, 2011 11:06 PM

    Hi,
    Please try this way.
    DATA MG1 TYPE MATG.<------ MaterialGroup
    DATA MT1 TYPE MAT.<----
    Material
    DATA S1 TYPE STRING.
    DATA S2 TYPE STRING.
    DATA S3 TYPE STRING
    DATA K TYPE F.
    DATA Z TYPE F.
    FOREACH MT1.
    FOREACH MG1.
    To check Materialgroup in debugger
    S1= MG1.
    BREAK-POINT.
    K = {KEYfIG, #, MG1}.
    BREAK-POINT.
    FOREACH MT1. <----- if i set MT1 to a fixed value like AAAA11 then S3 get the wished value namely AAAA
    S2 = MT1.
    BREAK-POINT.
    S3 = SUBSTR (MT1, 0, 4).
    BREAK-POINT.
    IF S1 = S3.
    {KEYFIG, MT1, #} = K.
    following Statement is only used To check in debugger if Material has become the same Materialgroup value
    Z = {KEYFIG, MT1, #}.
    BREAK-POINT.
    ENDIF.
    ENDFOR.
    ENDFOR.
    ENDFOR.
    Thanks.
    With regards,
    Anand Kumar

Maybe you are looking for

  • Mail e-mail account problem

    I have a very annoying problem. (I specify that my preference setting (under "Composing") is "Send new messages from Account of selected mailbox") For all the emails that are local ("ON MY MAC") classified in folders when I hit "Reply", the new e-mai

  • I am trying to update Flash player but is not working...

    Why the Lates version of Flash player is not working on my computer? I am unable to watch online videos, and have constant massage on YouTube to get the latest version of Flash Player (which I have).

  • VB code for fitting graphics, deleting pages, updating TOC

    Thanks again to all who helped me to find the object model info and other specifics I needed for completing my VB project. I'm not sure if this will be of any use to those who helped me, but at least I can "pay it forward". The following code snippet

  • Ihave aproblem with imessege my country is not listed

    guys ihave aproblem with imessege my country is not listed so when i add one of my friends phone number without the country code and he call me his name shows but in the imessege ican just his numbers without the name but when i add the country code

  • SOAP Header in java

    Hi, Here is my scenario - NWCE 7.1, EJB as a WebService and I want to access the SOAP Header,  what would be the best way. I'm thinking of using handler-chains, appreciate any suggestions. Rajiv.