Variables in BPS planning function

Hi all;
I don’t if this is possible but I’m trying to do the following formula:
DATA OV TYPE 0SALESORG.
DATA CD TYPE 0DISTR_CHAN.
OV = VARV ('ZORGVE').
CD = VARV ('ZCANDI').
FOREACH OV, CD.
{ZOV_QTD,CD,OV,L,V_PL_EST,020,ZMERCOVCD,ZPAOV03} =
{ZOV_PERC,CD,OV,#,VTP,010,ZMERCOVCD,ZPAOV03} *
{ZOV_QTD,#,#,L,V_PL_EST,020,ZMERCADOSF,ZPAOV03}.
ENDFOR.
In the level there aren’t any restrictions to the variables assign to OV and CD.
If I restrict the variables to only one value the formula runs, but if I inserted 2 values or an interval a message appears telling there isn’t possible because the variables aren’t restricted to one value (notice that the values of this characteristics are blank in the condition ZMERCADOSF).
My question is: Are any way to run this formula with 2 or more values assign to the variable OV?
Thanks in advance.
Ricardo

Hi Mayank;
The formula works for all the OV’s.
The error no longer appears but it didn’t respect the values assign to the OV (runs for all OV’s)
This is what I use:
DATA OV TYPE 0SALESORG.
DATA CD TYPE 0DISTR_CHAN.
DATA N TYPE I.
DATA I TYPE I.
N = VARC(ZORGVEND).
I = 1.
DO N TIMES.
OV = VARI(ZORGVEND, I).
I = I + 1.
ENDDO.
I’m not sure N and I are declared correctly. Are they Type I?
Regards;

Similar Messages

  • DS 1.3 changing the value of a variable in a planning function

    Hello,
    i created a planning application with Design Studio 1.3 and one of my planning functions is a revaluation function which uses a variable for the revaluation factor. In Analysis for Office you can set a value for this factor by selecting the planning function and then give a fixed value or set a reference to a cell in your workbook. However in Desing Studio i don't see my variable under my planning function and i also couldn't find a script command to use for this problem because the variable is not known to Design Studio. Right now i can only set a default value for the variable in SAP BW (RSPLAN) but i would like to let the user enter a value at runtime of my application.
    Anyone already had a similar problem and can confirm that it is not possible to access variables used in planning functions or has found a way and can tell me how to achieve this?
    Greetings,
    André

    Hi Andre,
    we are using the revaluation function type, too.
    For setting the variable for the factor you should use the following script:
    <ds_planningsequenceOrFunctionAlias>.setVariableValueExt("<techNameOfTheVariable>", <value>);
    It could be possible, that you cannot see the variable in the value help (strg + space) after inserting the planning sequence or planning function to your Design Studio application.
    Please, enter the technical name of the variable manually, it should work.
    We have no problems. In our application the variable is filled by an input field value.
    Kind regards
    Patrick

  • Variable screen in Planning Function for Integrated Planning

    Hi all.
    I have created a planning application with the WAD, based on an Input_ready Query. Manual planning works fine and even planning functions go well, using the command wizard.
    However, if I try to use a variable in a planning function and I set the parameter to pop-up the variable screen within the command wizard for a planning function, I get an 'uncaught exception'. An almost blank IE-window pops up which is supposed to display the variables, but it fails.
    Does anybody know how to solve this?
    Gr.,
    Marc.

    Hello Marc,
    do you still have this error? I encountered the same problem with SPS 9. Maybe you should install at least SPS 10. The variable popup works correct there.
    Best regards
    Martin

  • Execute BPS planning function on opening of web planning layout

    Hi all,
    Does anyone know how to execute a planning function automatically at the moment of opening a web planning layout in a BPS web planning folder(tx code BPS_WB/BPS_WIF0)?
    This was possible in the old BPS planning folder, but does not seem possible in the web planning folders?
    Thanks,
    Rael

    Hello Rael,
    Basically you have 2 options:
    - Use the same trick as in the how to paper "How to call a BPS Web Interface with predefined variable values" (see service market place, alias BW, then BI Planning). In the BSP page you do not set a variable value but use the BPS API to execute a planning function (just call the function module API_SEMBPS_FUNCTION_EXECUTE). When using the url parameters in a similar way as in the how to paper you can call different function modules for different web applications.
    - You can use the application class in the web interface builder and call the function in the "on load" method. There is a how to paper describing how such a application class can be used (Validate key figure values in manual planning - web). Note that there another event is used and thus a check AFTER input is done.
    Well - the second option might be a little more elegant but I think the first one is definitely less complicated and less work...
    Best regards,
    Gerd Schoeffl
    SAP NetWeaver RIG BI

  • SEM BPS - Planning function to distribute total value over months

    Hello,
    We use SEM BPS. In fact we use the integration of SEM BPS in the CRM opportunity component as opportunity planning.
    Now we want to distribute the total value of certain key figures over the months. Either equal distribution or increasing distribution like 1% increase every month. What would be the best way to do that with a planning function?
    We need to take into account that the number of months depends on the start and end date of the transaction (opportunity).
    Best regards,
    Thomas

    Hi Thomas,
    I would probably create a fox formula, do a foreach in selection loop over the months and distribute the values within that formula.
    If you want to use a standard distribution function, you need to create the reference data somewhere before, which could be a bit difficult if the timeframe changes according to user selections.
    regards
    Cornelia

  • BPS Planning Function Performance

    Dear all,
    In our projects we've faced the following problem.
    We have BPS user-exit planning function. This function should process a large amount of data. And, of course, performance of this processing is very critical!
    To increase performance we divided whole data amount into subsets and launch mentioned PF for each subset in background within separated thread ([http://help.sap.com/erp2005_ehp_04/helpdata/EN/c4/3a7f1f505211d189550000e829fbbd/frameset.htm], [http://help.sap.com/erp2005_ehp_04/helpdata/EN/fa/096e92543b11d1898e0000e8322d00/frameset.htm])
    But now the problem:
    Processing time for first thread is more, than 15 minutes of 35.000 records.
    For second one - 5 sec(!!!) for 25.000
    Third thread - 4 sec for 20.000
    and so on...
    In some threads calculation time also increases to 10-15 minutes for one thread. Statistic of calculation is below
    Thread  -  Ecex. Time   -  Total read - Changed - New
    1 - 0:12:46 - 33124 - 16317 - 1252
    2 - 0:00:03 - 12936 - 2202 - 264
    3 - 0:00:05 - 17108 - 6072 - 468
    4 - 0:00:03 - 8540 - 2184 - 402
    5 - 0:00:03 - 0 - 0 - 0
    6 - 0:00:03 - 448 - 56 - 180
    7 - 0:00:04 - 8344 - 2250 - 390
    8 - 0:00:04 - 14112 - 4184 - 404
    9 - 0:00:05 - 24388 - 10190 - 560
    10 - 0:00:03 - 11482 - 4728 - 606
    11 - 0:00:04 - 11508 - 4740 - 616
    12 - 0:00:04 - 0 - 0 - 0
    13 - 0:00:03 - 5936 - 1168 - 180
    14 - 0:00:03 - 15036 - 4900 - 662
    15 - 0:00:04 - 17640 - 5516 - 366
    16 - 0:07:18 - 18284 - 8810 - 572
    17 - 0:07:05 - 17752 - 8064 - 436
    18 - 0:00:00 - 19966 - 6018 - 384
    19 - 0:00:00 - 0 - 0 - 0
    20 - 0:00:01 - 19992 - 6016 - 384
    21 - 0:00:01 - 336 - 82 - 180
    22 - 0:00:00 - 0 - 0 - 0
    23 - 0:00:00 - 11228 - 2302 - 444
    24 - 0:00:03 - 224 - 64 - 180
    25 - 0:00:03 - 7952 - 3510 - 180
    26 - 0:00:03 - 8288 - 2058 - 390
    27 - 0:02:30 - 11928 - 5292 - 180
    28 - 0:00:04 - 19096 - 3964 - 486
    29 - 0:00:00 - 1568 - 490 - 180
    30 - 0:02:29 - 11452 - 2428 - 444
    31- - 0:00:01 - 12656 - 3436 - 504
    32 - 0:00:00 - 0 - 0 - 0
    33 - 0:00:09 - 336 - 126 - 180
    34 - 0:00:08 - 4648 - 1086 - 180
    35 - 0:00:07 - 0 - 0 - 0
    36 - 0:00:06 - 0 - 0 - 0
    37 - 0:00:05 - 336 - 24 - 180
    What is a reason of such behaviour of PF?
    Where is a bottleneck and how to eliminate influence of bottleneck on execution time of whole data amount?
    Your advices

    Hello Dmitry,
    take a look at the runtime statistics in transaction BPS_STAT0 (You might have to turn them on and re-run your process). This will show you where the time is spend (database or BPS).
    If it's database time, then get your Basis Team involved. Check that DB stats are up-to-date, check that InfoCube requests are rolled-up/compressed, do SQL trace and analyze the DB execution plan, etc.
    If it's BPS time, then it's probably something in your exit function. An ABAP trace (SE30) should help to nail down the root cause.
    Processing packages is parallel is in general a good way to make it run faster. However, if the packages are too small the overhead will actually reduce performance. I would start with 5 parallel processes.
    Regards,
    Marc
    SAP NetWeaver RIG

  • Breakpoint in CRM to jump to BW-BPS plan function code?

    I have a BW-BPS planning exit function that runs on the Costs Tab of marketing planner.
    Does anyone know where in CRM to set the breakpoint to let me jump across instances to the breakpoint in the planning function?

    Hi AStine,
    Given the situation that one does not know the CRM codings where the RFC is placed, you may always set a breakpoint on RFC, this will enable the debugger to be stopped at every remote function calls during the execution:
    /h
    Breakpoint at->statement->
    fill 'rfc' in the popup text box
    Then maybe after several debugger stop, you will be able to find the one you want.
    Then use F5 button to step into remote system, please ensure that the remote communication user is set as dialog user.
    Hongyan

  • Integrated Planning vs BPS - Planning Function and filters

    Hi,
    I'm trying to create a planning function previously defined in a BPS system into a new system with Integrated Planning. Some considerations:
    BPS:
    - I define first a planning level on a planning area. In this level I set some selection values.
    - Then I define a planning package that can contain other further filter values
    - Then I create my planning function
    - Then I create a parameter group that contain parameter values the function will use.
    Integrated Planning:
    - I can create a planning level and, separately, I can define more than one group of filters;
    - Then, I can create a planning function, where I can set some fixed values in the "field used for condition" tab. These values are common for every user that launch the function.
    So, from my point of view, it seems that:
    BPS: I have 3 points where I can set filter parameters (level, package and parameter group), and I can launch for example the same function selecting different packages or different parameter groups;
    IP: I have only one point where I can set filter parameters (Filter, defined on level)
    Is all right? In this case, I don't exactly know how to migrate the same function defined in BPS in the Integrated Planning environment.
    Any ideas?
    Thanks for the support!
    Gianluca

    Hello Gianluca,
    BPS: I have 3 points where I can set filter parameters (level, package and parameter group), and I can launch for example the same function selecting different packages or different parameter groups;
    IP: I have only one point where I can set filter parameters (Filter, defined on level)
    In IP you have 2 places, Filter and the function itself. In the function you will get characters for conditions where you can again filter. Migration is simple.
    And in BPS? If I define a planning package with a filter (example: Country = Italy) and I select this filter during the launch of the function, do I see records with country = Italy in my reference data?
    I guess you are mentioning package as filter. If yes then yes you will only get Italy data in your reference.
    The parameter group restrictions in BPS are done in planning function itself in IP. But one difference is in BPS it allowed multiple parameter groups.
    And I think even in BPS FOX brought reference data that were subsets of restrictions made in packages and planning level. I dont think in BPS also we were able to read reference data out of the planning level and package.
    Regards,
    T-Bird.

  • Undo BPS planning function

    Hello
    When running a planning layout in the GUI, it is possible to go the edit menu and undo the planning function. When I create a function, I do  not see 'Undo' as a standard function. Is it possible to undo a planning function on the web ?
    Thanks

    Hello,
    if I understood your question alright you want to execute the undo function in the web interface without "click".
    Did you try to "Generate class" (attribute of Webinterface)? In the class (name also in the attribute) you can find the functions name and in the "on input processing" you will find:
    "        when 'UndoButton1'. " -
              UndoButton1->submit( ).
    So the execution is to add or assign this line to the event you want
    regards
    Eckhard

  • BPS Planning Function

    Hi All,
    I've implemented couple of Planning functions in the Planning Package but for some reason they are not showing up in the layout.
    Am I missing any settings or something???
    Did anyone faced a similar issue before.
    Thanks
    Vani.

    Where are you trying to see the functions, in planning folder or in web interface?

  • Hierarchy node variable in BPS planning level

    Hi gurus,
    I have a set of planning levels and packages that are meant for all users. The users currently are segregated by 0costcenter hierarchy nodes, i.e. groups of users are belonging to different nodes within the 0costcenter hierarchy. These group of users each have its respective authorisation profile assigned based on hierarchy node.
    The planning levels and packages are configured so that 0costcenter is one of the header characteristics in the layout.
    Is there a way for the characteristic 0costcenter in the planning level and packages to derive the cost centers from the authorisation profiles ?
    Advice appreciated.
    Thanks.

    You may consider any of the following:
    1. BPS variables with authorization replacement type.
    2. BPS variables with user defined values replacement type.
    Ravi Thothadri

  • SEM 4.0 - BPS Planning Function - Currency Translation (Account Based) !

    Hi,
    Currently we are migrating from SEM 3.1 to SEM 4.0  and we are using Currency Translation (Account Based)and would like to use the same functionality, but for some reason the CT functionality is not working properly.  It is throwing garbage numbers in SEM 4.0.
    Is anyone out there facing similar problem on the Currency Translation (Account Based) functionality on SEM 4.0.  Appreciate your help. 
    Thx,
    Jay

    Hi,
    We are working on Integrated Planning(IP). We are currently using a key figure based model, where in we have 0amount, 0amocac and 0amoccc for transactional currency, controllling area currency and object currency amounts.
    If we go with account based model for keyfigures, i.e by taking currency type as 00, 20, 10 , we have a problem with the currency translation functions.
    Could you please let us know, how we can handle currency translation with the account based model?
    Thanks,
    Srini.

  • Distribute Planning Function(Using Variables)

    Hi All,
    I'm trying to distribute KeyFigure value between months.
    For example:Between Jan2005 and April2005 i want to distribute values.
    4000 gets distributed as below:
    Jan2005 - 1000
    Feb2005 - 1000
    Mar2005 - 1000
    Apr2005 - 1000
    I want user to select from CalYear/month and To CalYear/month from WebInterface dynamically.
    But,Distribute from Sender to Receiver planning function is not allowing me to use two variables From and To.
    It is allowing me to use only one Variable.
    Could u please suggest me how to use two variables in distribute planning function.
    Thanks in advance,
    Pat.

    Hello Saritha,
    A variable in the BPS can contain a single value or/and a range of values. In the definition of the planning function you can specify an interval by entering the from value and the to value or by choosing one variable containing this interval. This is why the system behaves the way you described it.
    What can you do? Use a variable of type Exit in the definition of the planning function. Use two additional variables in the web interface so the users can enter a from and a to value. Now in the exit (for the exit variable)you read the two values and return the interval. You can find the necessary coding and a more detailed description of such a scenario in the BPS how to guide "How to... Variables of type Exit".
    Best regards,
    Gerd Schoeffl
    SAPNet Weaver RIG BI

  • Sequencing of variables when executing a planning function in IP

    I am using BI Integrated Planning and have created a web application that executes a u201CCopyu201D planning function on the click of a button. The u201CCopyu201D planning function has a number of variables to accept u201CThe Fromu201D and u201CTou201D values. When I click on the button, I am prompted for the variable values. However, I would like to re-sequence the list of variables that appear on the prompt.
    We are on BI 7.0 Support Pack 17.
    Any pointer is appreciated.
    Regards,
    Sanjay Kumar

    Hello Sanjay,
    I am afraid this is not possible. There is no option provided to arrange the order of input variables for a planning function.
    An idea would be to include a query in the web template containing the same variables and arranging them in the query properties; and hide this query in the web template.

  • IP: Use of input-ready variable in planning function

    Dear all,
    I'm using an input-ready variable for fiscal year (0P_FYEAR) in my input ready query. It's used for restricting my columns.
    I'd like to use the value of this variable in my planning function and I use VARV for that in the FOX.
    However, when implementing the pl.function as a button in the BEx Analyzer I need to fill in the static parameters the VAR_VALUE_1 with a value.
    If I delete this line from the static parameters my plfunction end swith an error.
    I like this value of course to be filled with value of fiscal year entered by the user when starting the query.
    Does anybody know how to solve this?
    Kind regards, Harjan

    Hi Johannes,
    Thanks for all the useful information!
    Another thing on using PF.
    I've got two workbooks with different queries but using <u>same</u> filter.
    Queries differ in keyfigures, but are on same cubes in MultiProvider.
    I can run the workbooks simultaneously: no locks occur.
    I've got two planning functions that make calculations on the keyfigures entered in the workbook.
    However when I inplement the PF's in both workbooks and assign the dataprovider as filter, i do get locks!
    So, the PF also uses the same filter, but doesn't take into account the different keyfigures.
    In the fox-formula i don't have the option to make conditions on keyfigure values (field keyfigname), neither to enter them in the filter.
    Do you have any thoughts on this?
    <u>Second</u> point:
    When i filter on a navigational attribute and execute the pf, i get errors on my pf.
    It states it can't find the value of the characteristic to which the navigational attr belongs. F.i. when i filter on nav attr 'customer group'  (attr of char 'customer') and execute pf, the system gives an error on the value of char 'customer'.
    It states: value of characteristic customer is notincluded in the selection.
    Any thoughts on this one?
    Thanks in advance!
    Kind regards, Harjan

Maybe you are looking for

  • Won't let me finish change country transaction

    I change my country but it wont let me finish the transaction. how do i complete?

  • How can I convert a pdf document written in the Cyrillic (Russian) script into a MS Word document in the Cyrillic script?

    I wish to convert a pdf document using a very small font from Cyrillic script into an MS Word document likewise using Cyrillic script. Then I could zoom up the size of the pdf document's script. Is there any way  this can be done? Julyan Watts, Hunga

  • Problems with restore/upgrade

    HI, In the middle up updating my ipad, my computer turned itself off (thats another story!).  My ipad is now saying it needs to be restored, but in itunes it has bee showing preparing ipad for restore for the last 4 hours.  Is this right ?  Should it

  • HTML 2 PDF Failure

    I write to report an issue during a scanning issue.  This is a Canon scanner that has a feature of scanning to a PDF.  Working with Adobe Acrobat 6.0 professional on a Vista Ultimate machine.  The specific message reads: There was an error while load

  • QUESTION-ERROR IN UPGRADING

    Sign in error The account ......(ACCOUNT)..... was registered for GR. Please sign in using an existing account for this country, or create a new account. ANY IDEAS WHY THIS IS HAPPENING? Ok