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.

Similar Messages

  • Problem with view object for global variables

    Hi,
    I'm using jdeveloper 11.1.2.3.0
    We are using view object with transient attributes for global variables.
    we defined the view as explained here:
    http://docs.oracle.com/cd/E14571_01/web.1111/b31974/bcstatemgmt.htm#ADFFD19610
    also we defined one of the attributes as primary key.
    When we start to test our application with disable connection pooling we got some problems.
    sometimes the row in the global view object is deleted.
    (for example after using executeEmptyRowSet on other view object).
    it looks strange, we couldn't fוnd why does it happen.
    Any idea?

    As Timo said, it is very hard to help without source.
    Are you sure that you do the next step:
    After the call to super.prepareSession(), add code to create a new row in the transient view object and insert it into the view object.

  • Is there a "where used" functionality for SEM variables?

    Hello everybody,
    I am about to do some major changes to a BPS application that i have built and have come to realize that it will be quite some work to go through the whole thing for the purpose of replacing some variables.
    Hence, is there a "where used" functionality for SEM variables somewhere out there?
    Greetings,
    Martin

    Hi Martin,
              Have not seen that functionality before,however I have used the same by creating my own reports.All the variables can be found in the UPC_VAR table.If you are looking for the use of the variables in fox code,use a wild card search with UPC_FORML table in the formula column for %'VARV'%.IF Searching for uses in the conditions field for planning functions , use the table UPC_OPTIOS, column variable.In my case i needed to search the foxcode for variable uses.
    Hope this helps to some extent.
    regs.

  • Where used listing for Query Variables

    Can someone tell me how to get this list from the metadata repository or from the transport connector?
    I have read this thread "where used" list for BEx variables but this isn't working for us.
    Is there some config that is required which we have missing?
    We are running BI7 SP19 if this helps.
    Thanks
    Craig

    Arun,
    Yeah I figured as much, but this is why I am thinking we have something missing, config or otherwise.
    Cause all I get when I do this is a new window with just the Variable details and nothing else, no where used list at all i.e.
    Page Creation Date: 17.03.2009 15:12:03
    Technical name: V_FSTMONTH
    Object version: Active version
    System: BWDCLNT200
    Description (Short): 1st of Month to Toda
    Description (Long): 1st of Month to Today
    Last Changed On 17.03.2009 13:25:39
    Last Changed by ARMSTEC
    Is there something I need to get our Basis Team to do ?
    Thanks
    Craig

  • How to use offset for select-option parameter ?

    Hi experts
    could anybody please let me know how to use offset for select-option parameter. i can able to use offset for table fields, variabiles and all , but don't know how to use for parameters.
    following is my code
    SELECT-OPTIONS: s_prctr  FOR vbsegs-prctr OBLIGATORY.
    here "prctr"  length is 10.
    i'm using two tables  1. vbsegd-bupla
                                    2. vbsegs-prctr
    here prctr+6(4) = bupla.
    "Bupla" length is 4
    SELECT belnr gjahr bukrs bupla sgtxt buzei FROM vbsegd INTO CORRESPONDING FIELDS OF TABLE it_vbsegd FOR ALL ENTRIES IN it_vbkpf
                                                                 WHERE belnr = it_vbkpf-belnr
                                                                   AND gjahr = it_vbkpf-gjahr
                                                                   AND bukrs = it_vbkpf-bukrs
                                                                   AND bupla IN s_prctr.  
    the above statement is not working as prctr and bupla lenths are different. here i want to use offset.
    SELECT belnr gjahr bukrs prctr sgtxt buzei FROM vbsegs INTO CORRESPONDING FIELDS OF TABLE it_vbsegs FOR ALL ENTRIES IN it_vbkpf
                                                                WHERE belnr = it_vbkpf-belnr
                                                                  AND gjahr = it_vbkpf-gjahr
                                                                  AND bukrs = it_vbkpf-bukrs
                                                                  AND prctr IN s_prctr.
    this is working as prctr and s_prctr lengths are equal.
    could anybody please help me out in this.
    Thanks in advance.
    regards
    satish

    Below code will work for you.
    SELECT-OPTIONS: s_prctr  FOR vbsegs-prctr OBLIGATORY.
    RANGES: s_bupla FOR vbsegd-bupla.
    s_bupla[] = s_prctr[].
    DELETE ADJACENT DUPLICATES FROM s_bupla.
    SELECT belnr gjahr bukrs bupla sgtxt buzei FROM vbsegd INTO CORRESPONDING FIELDS OF TABLE it_vbsegd FOR ALL ENTRIES IN it_vbkpf
                                                                  WHERE belnr = it_vbkpf-belnr
                                                                    AND gjahr = it_vbkpf-gjahr
                                                                    AND bukrs = it_vbkpf-bukrs
                                                                    AND bupla IN s_bupla.

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

  • Incorrect value for global variable

    Hi,
    I am facing an issue in a query. In the query there is a Global variable 'Volume type'. In the default value tab of the variable it is given Default value as Litre. In the table RSZGLOBV also i have checked the global variable and there also the 'Internal Characterestic value' is shown as Litre itself. But when I execute the query, it is giving an out put like:
    For the keyfigure Volume,
    If the keyfigure is having some non zero value, it is showing Litre.
    If the kayfigure value is zero, it is showing KG.(which is wrong). For zero also it should display 0.00KG.
    Please help.

    Hi Nitin,
    changing the default within the variable would impact all queries.
    Only if it was an exit variable, you could define within the exit to do different things depending on the query.
    I would suggest the user uses personalization - but this impacts all queries where this variable is used for this user.
    regards
    Cornelia

  • Alternate For Global Variables.

    I am working on Forms6i in Payroll System.
    I have around 300 common global variables in my Module. When I switch over from one form to another, The variables stored in the previous Form are replaced by the new Form.
    When I Come back to oldone form. I have faced Errors. How can I Solve This problem ?
    I tried by using Local Parameters. It works but my forms will be bulky. I Could I solve this problem. Reply Urgently,
    Thanks For Co-ordination.

    Hi,
    What u can do is have Package Variables.
    These Pkg can be created on the Oracle Server and can be used by the form.
    U'r case of Global variable is unique.
    Regards,
    Ganesh R
    null

  • Substitiute for Global variable

    i have a doubt if we can use anything other than a Global variable like:-
    :global.<var_name>
    for a variable i define at the form level, say 'When-new-form-instance' trigger and use it at block & item level.
    In a big application, there is a doubt of using a Global variable twice.
    Regards.

    Hi,
    Decalre a variable in an package specification and use that for your purpose.
    Global variables are good and bad at the same time. Once declared the live for the whole session. Each of them occupy 255 bytes of memory, so it's bad practise to use them heavily. Instead you can use the same variable again and again, but be aware: Since they keep their value they could lead to undesired behaviour unless you are careful and null's them (or give them a default value) each time you have used them. Often I capture their value in the pre-form trigger, store the value in a package variable within the form, and then give the global a value of '-1' (which is my default).
    /Michael

  • User Exit for Global Variables

    Hello Gurus,
    Which is the user exit where I can sed the code for the global variables
    for eg:
    0CYTLM - Cummulated to last month
    If I want to write my own code, is it the same exit
    thanks in advance

    some docs may useful
    http://help.sap.com/saphelp_nw04/helpdata/en/5c/8db0be555411d189660000e829fbbd/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a49bd590-0201-0010-51b9-ea4295036979
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/db37ce90-0201-0010-3c83-948c94792ae4

  • Where used list for planning variable

    Hi
    I have one variable in a  planning area.
    Can I find where it is used..? in which planning function or layout?
    Is there anything like "where used list " for variables in BPS.
    Thanks for your replies.
    Nandita

    Thanks Bindu.
    Is there any other way to solve the question. That will be very useful. A table name or sme thing like that....
    I have very limited access to Client system .Can not create a report program and execute it.
    Thanks for your responce.
    Nandita

  • To use PARAMETERS or GLOBAL Variables

    I want to share data values amongst Forms (I am using Forms 9i), which is a better trade-off using GLOBAL variables or PARAMETERS.
    Which option is a better one ?
    Please Suggest...
    Regards,
    Gaurav Srivastava

    Also if your application uses go_form and allows the user to have two copies of the same form running at once, if you decide to use globals, make sure the form receiving the global erases it immediately on startup. Otherwise the user might go-form to the other copy of the form, which then be seeing the globals.

  • How to use OFFSET for CHAR type value in Bex query

    infoobject A value = 1102007
    Type = CHAR
    I want to have an offset for this infoobject created in query say 1 to 12 months
    in month of 10/2007 value = 1102007
    remember above 1 is always CONSTANT
    then
    in month of 11/2007 value = 1112007
    in month of 12/2007 value = 1122007
    how to do this since the infoobject is of TYPE- CHAR ,its gives we cannot do the OFFFSET in the query ,for doing OFFSET the infoobject must be of type numeric or NUMC.
    is it possible achieve this in to update rules?? since i cannot change the type of this infoobject now in the middle of production support
    please help
    thanks

    Hi,
    You will have to add a characteristic to your cube.
    The format should be NUMC
    In the update-routine you will have to convert the char value to numc
    Success
    udo

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

  • ZXRSRU01 (RSR00001 BI: Enhancements for Global Variables in Reporting)

    Hi,
    we are using Userextit RSR00001 to define partproviders of a multiproviders by using variables and a custom table because our multiproviders contain more than 60 partproviders
    i_step = 1
    SELECT * FROM zvar_cube_userex INTO wa_zvar_cube_userex " 
          WHERE     bex_variable EQ i_vnam.                  
          IF sy-subrc EQ 0.                                   
            l_s_range-low    = wa_zvar_cube_userex-infoprovider.
            l_s_range-sign   = 'I'.                            
            l_s_range-opt    = 'EQ'.                           
            APPEND l_s_range TO e_t_range.                     
          ENDIF.                                              
        ENDSELECT.                                      
    At the end of  i_step = 1   in I_T_VAR_RANGE we get following entries
    ZINP_CP2     0infoprov   I  EQ  ZCPCRAG
    ZINP_CP2     0infoprov   I  EQ  ZCPCRAG01
    ZINP_CP2     0infoprov   I  EQ  ZCPCRAG02
    ZINP_CP2     0infoprov   I  EQ  ZCPCRAG03
    Now our question.
    Cubes ZCPCRAG ZCPCRAG01 and so on are yearly cubes, devided by 0fiscalper. Now we think about,  additional to our 0infoprov determination ( depending on query) using SAP standard possebility "Logical multiprovider partitioning" via table RRKMULTIPROVIDERHINT. 
    - Is that possible ?
    - Is ther somebody who used it in the same way?
    Harald

    Thanks rakesh&sangeetha
    In my senario
    I created one report,on report I created on custmor exit varible
    for calday
    when I execute the report in 3.x analyzer Iam getting break point screen(I will take u to cmod)
    If I execute same report in BI.7 It,s not displying  break point?
    (with out asking the variable values ,its directly executing the report)
    why like this ?

Maybe you are looking for

  • Why budget check does not work with account assigment distrib. by quantity?

    Hi Gurus, I have an issue in the budget check for Purchase Order (PO). I'm using the FM B31I_ACC_PURCHASE_ORDER_CHECK. The case is next: 1 Item with 21 account assignment type AS and distribution by quantity: ASSET_NO QUANTITY 1           1 2        

  • Problems with the alerts

    Hi to all. I have this problem: I need to know If exists any way, for don't close the alert with the "X", locate in the upper rigth corner. If I close the alert with this th application runs wrong. The application runs in a web. I anybody have any so

  • Re: NO SERVICE+BA​D SERVICE=A POOR COMPANY WITH POOR VALUES UPDATE

    I  HAVE PROVIDED "EXECUTIVE SERVICE DEPT. WITH SPEFICI INFO.  NOT TOO HOPEFUL THEY CAN DO ANYTHING, SINCE THE COMPLAINT MANAGERSMANTRA IS ": NO ONE CAN CHANGE OUR DESICION.  WE ARE FINAL AUTHORITY.  NO ONE ANY WHERE IN THE UNIVERSE CAN MAKE US TO ANY

  • Sub cube information

    Please help me on subecubes ...On what basis sube create ,,,i mean let's ex in essabse ---datablock create based on dense demension members and no of blocks creats on based on sparse members... In the same way can we find in hFM aslo ,,who many subcu

  • Filter out waviness

    Hey there, First of all I'm using LV 8.6.1 so anyone who is willing to help please post modified code for that version. Thanks for that. Attached you'll find a VI mend to filter waviness from roughness using a Gaussian filter as mentioned in industry