VARIABLES IN FOX

Hi Ragav,
One more Question, how to create variables for charecteristics in fox formula.
can you give me the syntax. like user have to enter the year for fox formula.

Hi,
my scenorio is like this, if user enters 2 account numbers , the amount in first account shoud become -ve and it should add to 2nd account.
Ex: before  acc1    500
                 acc2   100
       after     acc1  -500
                  acc2   600
where user have to enter 2 account numbers for which he want to do transactions.

Similar Messages

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

  • How to get the value of a variable in FOX?

    Hi,
    In the FOX program how to get the value of a variable defined in planning area?
    can anyone give me some sample code?
    thanks

    Adding to the last reply,
    you can use VARI(variable) to get the count of the values.
    In the latest version of BPS, you may also use the following new foreach construct:
    FOREACH var IN VARIABLE  variable_id.
    Regards - Ravi

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

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

  • IP usinge a variable with FOX forumula

    Hallo Experts,
    we are using IP (not BPS). In a query with a variable (mandatory, single value). We use this variable also in a FOX formula.
    The problem is:
    When using the FOX-Formula the system want to have a value for this variable. But by opening the query the user must give in already a value for this variable (it is the same variable we use in the query definition and in the FOX-Formula).
    What is the reason, that the FOX-Formula does not get the already given in value???
    Thank you very much.... we have not found a solution in OSS...
    Santra

    Santra,
              The behavior of variable value depends where you are running the FOX Function. IF you are running the Fox formula in the planning modeler then there is no surprise you dont have the value for the variable. If you create a Web Application Designer with both the querry and Fox function as pushbutton and then run the WAD and Give the value for the variable and then run the function. You will overide the problem you have now.
              Or under Planning Sequence tab, you have personalization section. give the value for the variable there and run the Fox planning sequence then you will get the variable value. Hope I have Addressed you issue.
    Regards,
    sanjay.

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

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

  • Variable in FOX - bps

    Hello all
    i am using variable in BPS  in order to multiply data with the value in the variable.
    When i execute the FOX, i get a dump, error.
    The error goes " GETWA_NOT_ASSIGNED  - Field Symbol has not yet been assigned"
    Can you tell me what can be the problems?
    Best
    Yuval

    Hi,
    May be you set up incorrectly a value for the vaiable. This value is not in master data of charater for this variable.
    Regards,
    Veronika.

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

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

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

  • 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

  • Populating multiple values in variable and accessing it in FOX

    Hi Experts,
    In one of my requirement, I have restricted a default value in the variable within modeler filter. The properties of variable are:
    Manual Entry/Default Value, multiple single values, optional, and not ready for input.
    I will need to access this variable in customer exit for Global Variables code (ZXRSRU01) and populate some values based on certain logic in a different variable (processed by customer exit). I will have to access this customer exit variable in FOX.
    I want to understand whether the above mentioned linkage between FOX and cusotmer exit code is possible and further will I be able to access the customer exit variable values through VARC and VARI functions supported by FOX.
    Appreciate if some one can post a document or link.
    Thanks in advance,
    Pankaj.

    Hi,
    please check:
    [http://help.sap.com/saphelp_sem40bw/helpdata/en/5d/12a0386de311d4b2f40050dadfb23f/content.htm]
    [http://help.sap.com/saphelp_nw70/helpdata/EN/47/8776aa5129500be10000000a421937/frameset.htm]
    Try using VARV, VARC and VARI and loops.
    Hope this helps.
    Regards Matthias

  • How to... get local fox variable into WAD

    Hi guys,
    we have a (technical) weird requirement to fullfill. There is a parameter (a string) we need to update several times when running our web templates. We have this parameter in our fox coding and it needs to be updated i.e. when loading the templates the first time, when buttons are triggered etc (if we use a customer exit we can not update the parameter when i.e. a button is triggered).
    What do we need this parameter for? We have to display it in a text field in our templates (it must not be a text field but it has to be present all the time in these about 70 templates). However if we use a text field the best would be to link the parameter using a variable. Anyway I do not know how to set a global variable within fox coding...
    What do you suggest? How can a global variable be set using fox the easiest way? Or is there any other way to display a local fox variable in WAD (using javascript or something else)?
    Any helpful ideas or answers will be <removed by moderator>.
    Thks & Brgds,
    Marcel
    Edited by: Siegfried Szameitat on Dec 3, 2008 3:04 PM

    Your requirement didn't get very clear to me but maybe you can explore whether you can achieve it by calling an FM from inside the fox code.

  • Issue with IP variable binding in WAD

    Hi experts,
    I'm having issues while trying to bind variable1 to variable2 in WAD. Here's the scenario:
    I have configured through T-code rsbbs the QUERY A, which is passing two "generic" characteristic values to the receptor (QUERY B).
    These two characteristic values are sent to the variables that are executed by formula (sequence) AND also to the variables in QUERY B.
    The issue is when the user changes the variable selection (thru pop-up) for the formula (sequence), it does not update the variable from the Query B, thus, I can't see the correct selection for Query B after executing the sequence.
    I've read numerous postings and I tried to bind these two variables (variable from formula sequence to QueryB variable) as a next command after the sequence execution unsuccessfully. The variables are not updated, it always shows the values before the user change.
    PS: version 7.
    Please help!
    Thanks,
    Orcamento

    Hi Prathish,
    Thanks for your reply. However, the issue has not been solved.
    Let me try to explain in more detail...
    E.g.
    Step 1: Query A sends value thru RSBBS to Variable 1 (Query B), and Variable 2 (fox formula from IP) by right clicking on "GO TO" from selected cell>> OK.
    Step 2: WAD opens with Query B - with variable values sent from Query A >> OK.
    Step 3: User changes value of FOX Variable 2 (this value was first sent from step 1)... let's say that value passed from Query A was 10, and user changes to 20. Then, execute the function >> OK.
    Step 4: Since Variable 1 still contains value 10 sent by RSBBS, Query B does not show results just changed (value 20).
    I believe that I can bind these two variables through WAD, but I tried unsuccessfully.
    Do you know if there are any configuration that I can bind these two variables in WAD, which should work dynamically?
    Thank you so much for your help!
    Orcamento

  • Variable with multiple values.

    Hi All,
    Can anyone help me  to create a  variable with multiple values like it should accept two Buisness Area AU10,PH10 in Query.As well as how to use this variable in fox using VARV, VARI,and VARC.
    Thanx&Rgds,
    Indu

    Hi,
      You can write an exit for variable to retrieve two values.
    Usage of this variable in FOX..
    TOTALCOUNT= VARC(variable).
    COUNT = 1.
    DO .
    IF COUNT < TOTALCOUNT.
    varval = VARI( variable, COUNT ).
    COUNT = COUNT + 1.
    ENDIF.
    Hope this helps.
    Regards,
    Bindu

Maybe you are looking for

  • I need help with Dreamweaver.

    I had purchased Dreamweaver CS5-5 version 11.5 last year for my Mac X 10.8.3. Working on several web pages did just fine. I did not use Dreamweaver for the last 4 months. I do pro bono for four sites and they had not given me changes until yesterday

  • Error in response

    HI have a IDOC - Soap Communication. its IDOC - BPM- SOAP. It has 3 entries in MONI. 1. IDOC - BPM 2. BPM - Soap 3. Soap- XI in the message 1, I see ackonwledgement has no errors. when I double click on this message and check for the acknowledgement,

  • My ipad 3rd gen is on ios 7.0.4 and its slow as ****....how do i fix this?

    My ipad 3rd gen is on ios 7.0.4 and its slow as ****....how do i fix this?also there these apple people are not upto releasing ios 7.1 soon...i ve seriously lost all my fun in using this ipad.....what should I do?its lagging a lot...thanks in advance

  • SOAP DataStore for MS CRM Dynamics is empty!!

    All, I've tried to setup a web services SOAP DataStore to a MS CRM Dynamics instance.  After putting in the URL for the WSDL nothing shows up in the external metadata for import??? I do not receive any error messages (that I can find).  I've also tes

  • Show modal dialog in the windows process bar

    I've made a solution where all reports are spawned off the main program in a separat SAP session. The result is shown in a modal screen as PDF. Now I have the problem that the users would like the PDF modal screen to be shown in the Windows processba