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.

Similar Messages

  • Any way to set global variables except EAS console?

    Hi pros,
    I am searching for a way to set global variables (used by business rules) automatically.
    I got several variables which should change each month. I know the rule to set them.
    However, I cannot find any way to set them through scripting or something else.
    I tried to research EAS repository. The one that I found relevant is HBRVariables table.
    I cannot find any tool can help this.
    Any one knows how?
    Appreciated......
    Casp Huang

    Yes you can use substitution variables in business rules and they are widely used, it is relatively easy to automate the changing of values for subtitution values.
    You can also put a sub var into the default value for a global variable in business rules.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Using offset for global variables in FOX

    Dear all,
    I'm using global variables (i.e. defined in planning area)in my FOX formulas by using VARV-command.
    I'm doing this for fiscal year, which has default value current year. However I'd like to use this variable also for next year thus creating the following code:
    DATA CURYEAR TYPE 0FISCYEAR.
    DATA NEXTYEAR TYPE 0FISCYEAR.
    CURYEAR = VARV(Z021VA01).
    NEXTYEAR = CURYEAR+1.
    This gives a syntax error. Anabody any idea how I can use offset in the FOX for my variables?
    Thanks in advance!
    Kind regards, Harjan

    Harjan,
    Use TMVL function to get the offsets.
    DATA CURYEAR TYPE 0FISCYEAR.
    DATA NEXTYEAR TYPE 0FISCYEAR.
    CURYEAR = VARV(Z021VA01).
    NEXTYEAR = TMVL(CURYEAR, +1).
    hope it helps.

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

  • Setting global variable to be used in a SQL task

    I am trying to create a simple SSIS package to be used in the SQL Task
    The SQLStatement is
    Update dbo.Users
    set FirstName = ?
    where UserID = 2
    Added a parameter mapping for User::strDataString
    From the data manager dynamic script, I included following code to prompt for the value and set to the global variable and then call the excecute SQL task.
    PROMPT(TEXT,%strData%,"Enter value",,"")
    GLOBAL(@[User::strDataString],%strData%)
    TASK(Execute SQL Task,,)
    When the check the database, the table is getting updated only with the default value of the strDataString but not with the value entered in BPC.
    Am I missing any link?
    Thanks
    Omkar
    Edited by: yomkar on Mar 17, 2010 1:13 PM

    Hello,
    on which version of BPC are you running ?
    Can you try to make all your SSIS variables upper case, it helped me on earlier versions of BPC.
    Be aware too that if you have an instruction like GLOBAL(STR,some_value), BPC will do a string replacement within the MODIFYSCRIPT variable  : "STR" -> "some_value".
    for example :
    GLOBAL(STR,some_value)
    TASK(STR TSK,....) will be replaced by TASK(some_value, ....).
    Vladimir.

  • Variables in FOX formulas in IP

    Hi All!
    I would like to create FOX planning function that will be based on variables.
    So, we have 2 variables AA and BB based on characteristics:
    1. For 0CALMONTH with tech. name AA
    2. For ZPROJECT with tech, name BB
    I have a query, where at the first screen I make a selection for ready-for-input variables AA and BB. Then, at the second screen I execute planning function via button.
    The sense of PF is copy all values of key figure ZKEYFIGURE from ZPROJECT = '0', 0CALMONTH = selected value of variable AA to ZKEYFIGURE of ZPROJECT = selected value of variable BB, 0CALMONTH = selected value of variable AA.
    In master data of characteristic ZPROJECT we have different projects. but 1 is with technical name 0. This is the first master data in table.
    DATA VAR1 TYPE 0CALMONTH.
    DATA VAR2 TYPE ZPROJECT.
    DATA VAR3 TYPE ZPROJECT.
    VAR1= VARV(AA).
    VAR2 = VARV(BB).
    VAR3 = VARI(BB, 1).
    {ZKEYFIGURE, VAR1,VAR2}={ZKEYFIGURE,VAR1,VAR3}.
    After execution I see , that records were read, but 0 generated, 0 changed.
    Maybe someone can advice what I do wrong?

    Firstly,for 0calmonth,the from and to value is same as you are using the selected values of variable AA.
    So no change in the value of 0CALMONTH
    Secondly, in the fox formula,  for zproject, you are using the same variables. Hence the fox formula understands that there is no change in the value.
    Define two variables for zproject, lets say proj1 and proj2.
    Assign proj1 ='0'.
    I have modified your fox code, give a shot with the following code, hopefully you might get the results as you want.
    DATA VAR1 TYPE 0CALMONTH.
    DATA PROJ1 TYPE ZPROJECT.
    DATA PROJ2 TYPE ZPROJECT.
    VAR1= VARV(AA).
    PROJ1 = 0.
    FOR EACH 0CALMONTH IN VARIABLE VAR1.
    PROJ2 = VARI(BB,1).
    {ZKEYFIGURE, PROJ2}={ZKEYFIGURE,PROJ1}.
    Endfor.

  • Setting global variable that are static but I want them to change

    I'm trying to set a global variable so I can let the user change the state in the Plugin Manager.  I've created a checkbox (in PluginManager.lua)
    f:checkbox {
         title = 'Show HTTP response',
         value = _G.showHttpResponse,
    that references the global variable (in PluginInit.lua)
    _G.showHttpResponse = true
    The state of the checkbox accurately reflects the initial value as set.  Everything seems fine but after unchecking the checkbox, the value is always true in my plugin.  I expected _G.showHttpResponse to change to reflect the setting in the checkbox.
    What have I overlooked?  Is this only for setting static globals?
    Abe

    Reading the Lightroom SDK manual seemed to indicate that using globals would be the way to go.  I'm thinking that it is only appropriate for static text.
    I've taken both your suggestions and have used the plugin preferences.  I didn't think you could get and set them in the Plugin Manager but they work just fine.  Now I set my debug flags in the plugin manager screen and they are available to the plugin and are persisted as well.
    Thanks for the suggestion.  Everything is working.

  • How do I set global variables for use by ALL form1.#subform[0] items?

    Hi All,
    I know how to code javascript but am new to Adobe LiveCycle.  When I open script editor, I have the following code (all code is in un-bolded):
    ----- form1.#subform[0]::initialize: - (FormCalc, client) ------------------------------------------
    // BEGIN: SET GLOBAL PRICES //
    var Cityscope_Sydney_CostUser1 = 60.39;
    var Cityscope_Sydney_CostUsers2to5 = 3.02;
    var Cityscope_Sydney_CostUsers6to20 = 1.21;
    var Cityscope_Sydney_CostHardCopyWithOnline = 14.59;
    var Cityscope_Sydney_CostHardCopyWithoutOnline = 54.67;
    var Cityscope_Sydney_CostHardCopyAdditional = 14.59;
    var Cityscope_NorthSydney_CostUser1 = 48.40;
    var Cityscope_NorthSydney_CostUsers2to5 = 2.42;
    var Cityscope_NorthSydney_CostUsers6to20 = 0.97;
    var Cityscope_NorthSydney_CostHardCopyWithOnline = 14.59;
    var Cityscope_NorthSydney_CostHardCopyWithoutOnline = 43.54;
    var Cityscope_NorthSydney_CostHardCopyAdditional = 14.59;
    // END: SET GLOBAL PRICES //
    ----- form1.#subform[0]::enter: - (FormCalc, client) -----------------------------------------------
    ----- form1.#subform[0]::exit: - (FormCalc, client) ------------------------------------------------
    ----- form1.#subform[0]::calculate: - (FormCalc, client) -------------------------------------------
    ----- form1.#subform[0]::validate: - (FormCalc, client) --------------------------------------------
    ----- form1.#subform[0]::preSave - (FormCalc, client) ----------------------------------------------
    <<======= etc etc etc =======>>
    ----- form1.#subform[0].Item1Cost::initialize: - (JavaScript, client) ------------------------------
    ----- form1.#subform[0].Item1Cost::enter: - (FormCalc, client) -------------------------------------
    ----- form1.#subform[0].Item1Cost::exit: - (FormCalc, client) --------------------------------------
    ----- form1.#subform[0].Item1Cost::calculate: - (JavaScript, client) -------------------------------
    //Store form values in user-friendly names.
    var AreaSelected = Item1Area.rawValue;
    var NumberOfUsersSelected = Item1Users.rawValue;
    //Declare other vars.
    var Users1Calculation;
    var Users2to5Calculation;
    var Users6to20Calculation;
    //Calculate individual User Cost "components" based on number of users selected for the area.
    switch(true)
    case (NumberOfUsersSelected < 2):
      Users1Calculation = NumberOfUsersSelected * Cityscope_Sydney_CostUser1;
      Users2to5Calculation = 0.00;
      Users6to20Calculation = 0.00;
      break;
    case (NumberOfUsersSelected > 1 && NumberOfUsersSelected < 6):
      Users1Calculation = Cityscope_Sydney_CostUser1;
      Users2to5Calculation = (NumberOfUsersSelected - 1) * Cityscope_Sydney_CostUsers2to5;
      Users6to20Calculation = 0.00;
      break;
    case (NumberOfUsersSelected > 5):
      Users1Calculation = Cityscope_Sydney_CostUser1;
      Users2to5Calculation = 4 * Cityscope_Sydney_CostUsers2to5;
      Users6to20Calculation = (NumberOfUsersSelected - 5) * Cityscope_Sydney_CostUsers6to20;
      break;
    default:
      alert("BROKEN: Calculate individual User Cost components based on number of users selected for the area.");
    //apply total cost for this item
    Item1Cost.rawValue = Users1Calculation + Users2to5Calculation + Users6to20Calculation;
    ----- form1.#subform[0].Item1Cost::validate: - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Cost::mouseEnter: - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Cost::mouseExit: - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Cost::change: - (FormCalc, client) ------------------------------------
    ----- form1.#subform[0].Item1Cost::full: - (FormCalc, client) --------------------------------------
    ----- form1.#subform[0].Item1Cost::mouseUp: - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::mouseDown: - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Cost::click: - (FormCalc, client) -------------------------------------
    ----- form1.#subform[0].Item1Cost::preSave - (FormCalc, client) ------------------------------------
    ----- form1.#subform[0].Item1Cost::postSave - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::prePrint - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::postPrint - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Cost::preSubmit:form - (FormCalc, client) -----------------------------
    ----- form1.#subform[0].Item1Cost::docReady - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::docClose - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::ready:form - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Cost::ready:layout - (FormCalc, client) -------------------------------
    ----- form1.#subform[0].Item1Users::initialize: - (FormCalc, client) -------------------------------
    ----- form1.#subform[0].Item1Users::enter: - (FormCalc, client) ------------------------------------
    ----- form1.#subform[0].Item1Users::exit: - (FormCalc, client) -------------------------------------
    ----- form1.#subform[0].Item1Users::calculate: - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Users::validate: - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Users::mouseEnter: - (FormCalc, client) -------------------------------
    ----- form1.#subform[0].Item1Users::mouseExit: - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Users::change: - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Users::full: - (FormCalc, client) -------------------------------------
    ----- form1.#subform[0].Item1Users::mouseUp: - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::mouseDown: - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Users::click: - (FormCalc, client) ------------------------------------
    ----- form1.#subform[0].Item1Users::preSave - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Users::postSave - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::prePrint - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::postPrint - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Users::preSubmit:form - (FormCalc, client) ----------------------------
    ----- form1.#subform[0].Item1Users::docReady - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::docClose - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::ready:form - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Users::ready:layout - (FormCalc, client) ------------------------------
    ...and so on and so forth....
    In short, I want the code within:
    ----- form1.#subform[0].Item1Cost::calculate: - (JavaScript, client) -------------------------------
    ...to be able to access the variables I have created in:
    ----- form1.#subform[0]::initialize: - (FormCalc, client) ------------------------------------------
    (I have assumed that this is where I would store Global variables)
    At this stage, the global variables cannot be accessed with the configuration above.  The only was I can get this to work is to cut and paste the global vairables into each form1.#subform[0] item, which of course defeats the purpose of global variables!  I plan to have many more items so would not want to duplicate the global variables for all of them!
    Can somebody show me how to do this?
    Any help is very much appreciated!
    Thanks
    Stanbridge
    Message was edited by: stanbridgej - colors and or fonts won't save.  Have bolded my question to make code (non-bolded) easier to read (I hope).

    Hi MorisTM,
    Thanks for the reply!
    Yes, I saw that option (I should have mentioned I already knew about it), but was wondering if there is a way I can do this via code.
    There are two reason I want to be able to do it via code (only one of which may be valid):
    1) I can automatically generate my pricing code form another inhouse app.
    2) I am hoping that later on once I get this working I will be able take it a step further and get the data directly from a MySQL database!
    Cheers though!
    Any other suggestions?
    Regards,
    Stanbridge

  • Shell script: function doesn't set global variable when piped

    Hey there, just started to play around with some bash scripting and I bumped into this issue today.
    My code:
    #!/bin/sh
    MY_VAR=0
    echo "First: $MY_VAR"
    my_func() {
    MY_VAR=1
    my_func | grep "Fail"
    echo "Pipe: $MY_VAR"
    my_func
    echo "Func: $MY_VAR"
    Result:
    First: 0
    Pipe: 0
    Func: 1
    I assume that bash is starting a subshell to run my function when piping the result to grep. Is there any way to set the variable and pipe the output at the same time?

    Thanks, that does confirm why it doesn't work as expected. At the moment my only solution is something along the lines of:
    #!/bin/sh
    MY_VAR=0
    my_func() {
    MY_VAR=1
    #echo "Some Text"
    MY_OUTPUT="Text that I was going to echo"
    my_func
    echo $MY_OUTPUT | grep "Text"
    This sets MY_VAR to 1 as expected and I can still pipe the output to some other application but it looks awfully hackish, not to mention that it requires me to change every 'echo' to some var...
    If anyone comes up with a better solution I'll be glad to hear it.

  • Global Variable in Fox Code?

    Via a Parameter Group, I am trying to copy existing records.  During the copy I am trying to replace one characteristic with a sequencial number.  However, during a single execution of the parameter group, the variable is being reset to it's initial value after each new record is created.
    Is there a way to store the value of a variable so sequencial numbering can be achieved?
    Thank you in advance for any suggestions or advice!
    CODING I HAVE TO DATE
        DATA EXISTBPSID   TYPE ZTA_BPSID.
        DATA BPSIDNO      TYPE ZTA_BPSID.
        BPSIDNO  = VARV(BPSTAS2).        [[Set based on entry in intial variable]]
        IF EXISTBPSID = '#'.
           = .
           BPSIDNO = BPSIDNO + 0000000001.       [[FACT: Successfully tested that this will add one to the variable BPSIDNO]]
        ENDIF.
    EXISITING SAMPLE DATA  (Where VARV(BPSTAS2) = 16)
    HIRE....BPS ID........QTY
    AB............#...............2
    CD............#...............1
    EF............#...............4
    EXPECTED RESULTS
    HIRE....BPS ID........QTY
    AB............#...............2
    AB...........16..............2
    CD............#...............1
    CD...........17..............1
    EF............#...............4
    EF...........18..............4
    ACTUAL RESULTS
    HIRE....BPS ID........QTY
    AB............#...............2
    AB...........16..............2
    CD............#...............1
    CD...........16..............1
    EF............#...............4
    EF...........16..............4

    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.

  • 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

  • How to print global variable in smart form table cell

    hi,
    i have smartform and i insert table in it, i also have set global variable, i want to show variable in table cell.
    regards
    shahid rais

    Hi Shahid Rais 
    You can use this global variable that has been declared in anywhere as you like.
    For displaying global variable in table lines, You can first set the column and row of the table by using the table tab in table node . Then, u can decide either the variable u want to used will be placed on header, main, or footer. After that, right click on one of the table part, and choose create table line. After choosing the correct line type as already been declared in the table painter, just simply right click on the table cell, and then create text node.
    You can now enter your variable by using "insert field".
    And don't forget the & & signs before and after your variable name.
    Regards,
    William Prawira

  • Icon name as Global variable

    Hi,
    In my forms i can set a single static icon name for a button. Is it possible to give the icon name as global variable name to change the icon of the button dynamically by changin the value of the global variable.
    Using set_item_property i can change. But it seems tough to implement in my forms.
    Please Help!
    Balaji.M

    What's the problem with set_item_property??
    You can use the global variables to store the name of icon file to associate with the button.
    But, ultimately you'll have to use the set_item_property to reflect the changes dynamically.
    set_item_property(<block.item name>,ICON_NAME,:global.<icon file name>);
    I don't think, by just setting global variables you can get your requirement to work.
    You'll have to use set_item_property, if you want to change the icon file name dynamically.
    Please mark answer as helpful / correct, if it helps you
    Navnit

  • 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

  • Global variable not being seen by other formulas

    Hi
    I've set a global variable in my report, but other formulas don't recognise it. What have I done wrong?
    In my group1 header I have a formula 'w' which is just
    Global Numbervar v1 := 0;
    In my details section I have a formula 'x' which is
    if {Command.INVLINETYPE} = 1 and previous({Command.INVLINETYPE}) <> 999 then
       {Command.LINEVALUE};
        v1 := v1 + {Command.LINEVALUE};
    else
    if {Command.INVLINETYPE} = 999 and {Command.ORDERNO} <> previous({Command.ORDERNO}) then
       {Command.LINEVALUE}
    else
       0
    this gives an error of 'Missing ) ' when I try to save it. If I put in a local variable in place of v1, the formula saves. This is the first time I've used variables in this way, which I'm having to do to try to sum this formula which uses Previous. Thought that I could create a global variable and use it to record the total.
    Thanks
    Steven

    Sharon
    thanks for this. Unfortunately I get the same when I move the ).
    Is it something to do with where the Global variable is declared (though I have tried moving it around).
    Regards
    Steven

Maybe you are looking for

  • Imessage is working but sms is not

    i bought an iphone today and my sms is not working. when i send a message it says 'not delivered' however my factime, imessage etc are all working. i can call but my number comes up as 'unknown'. I have plugged my iphone into my computer and have syn

  • Computer won't detect BB Curve

    Hi folks. This has been an issue for some time now. My PC won't detect my BB Curve 8330. It used to, but one day it just stopped. I just installed the latest BB Desktop Software (7.1), and I also upgraded to Windows 7 (and got the updates) and it did

  • Desktop Manager - Reconcile Messages Grayed out....

    Hi...I'm not able to configure my messages in the Synchronize tab because it is grayed out...any ideas what to do?  We've uninstalled and reinstalled the software, upgraded to 4.3 and its still grayed out...why? how can i fix this?  My previous black

  • ECC 6.0  Installation Encountered with error FCO-00011

    Hi Gurus, Iam Installing ECC 6.0/MSSQL 2005 On windows (64 bit) QAS Box. I got a error FCO-00011  The step getDBInfo with step key |NW_Uninstall|ind|ind|ind|ind|0|0|NW_System_Uninstall|ind|ind|ind|ind|2|0|NW_uninstallDB|ind|ind|ind|ind|1|0|NW_getDBIn

  • Volume level bar no longer displays

    I used to have a volume level bar. Every once in a blue moon in reappears but very rarely. Whats the deal?