User input formula variable with greater than/less than operators for KFG

Hello all,
I have used a formula in my query that is a difference of two key figures .For e.g:
Difference = tax from system A  -  tax from system B.
Now when the users run the report they should be prompted for the 'Difference' threshold for seeing the report say where difference is greater 100 or equal to 10 and so on.Currrently I have created a formula variable with 'user input' and created a 'condition' to display 'Difference' greater than the user entered value.
However,it is required to have various selection options for setting the threshold of difference.For e.g User should be able to set say 'equal to'/'greater than/less than/not equal to operator for 'difference' in the initial selection screen of the report.
With the current user-input formula variable I am not getting these 'greater than' etc operators.Any ideas on how to achieve this?

Ya know, that's all well and good ... BUT ... WHAT IF you do want to sort text type columns with Greater Than and Less Than operatiors??
SQL does it just Fine ... so WHY does APEX have the limit??? This is an Oracle BUG ... it SHOULD NOT limit the operators ... I realize "they" may be trying to be helpful with proper constraints to field searches ... but ... if SQL can do it, then ... no need for a limit.
EG ...
Show the records where
the "Begin_Year-Wk" data is less than or equal to "2009-09" AND
the "End_Year-Wk" data is greater than or equal to "2009-04"
... to give everything that was running in that 5 week period whether or not it starts within that time frame
I can run this query perfectly fine via SQL ... but not in APEX ... unless I reconvert a lot of strings back to numbers, and for sorting / formatting / explain-to-user purposes, I really don't want them to be numbers.
So ... there's gotta be a hidden tweak for operators somewhere ...

Similar Messages

  • Formula Variable with User Exit....Problem

    Hi
      My requirment is to create a Formula Variable on User Exit that will give me Current Cal Year...so that i can use that vale in Formulas
    Created Formula Variable with processing Type Customer Exit single Value,Mandator and Unchecked the Variable input ready
    The below code in CMOD
    WHEN 'XXXXXXX'.
    Year  = sy-datum(4).
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = Year.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND l_s_range TO e_t_range.
    But when i execute the query i am getting the below error
    No value could be determined for variable xxxxxxx.
    Incorrect call of OLAP layer CL_RSR_OLAP; error in BW-BEX-ET
    Diagnosis
    This error diagnosis is specific only to the variables 0P_FVAEX or 0P_CTPCA !
    Termination message BRAIN 632 appears:
    Could not determine value for variable 0P_FVAEX (or 0P_CTPCA).
    WHAT WRONG I AM DOING...please update me

    Use the code:
    WHEN 'XXXXXXX'.
         IF i_step = 2.
              Year = sy-datum(4).
              CLEAR L_S_RANGE.
              L_S_RANGE-HIGH = Year.
              L_S_RANGE-SIGN = 'I'.
              L_S_RANGE-OPT = 'EQ'.
              APPEND l_s_range TO e_t_range.
         ENDIF.
    Let me know, if it is work or not!
      - Balajee Kannan

  • Formula Variable with User Entry

    Hi,
    I'm  confused with Formula Variable with Replacement Path and Formula Variable with User Entry.
    PLz, Explain with an example .....In which senarios  Formula Variable with Replacement Path is used and In which senarios Formula Variable with User Entry is used.

    Hi,
    Suppose you have some key figure sales.
    Now in the report you want to display 10% of sales or may be 20% of sales based on the user input.
    In this case you will define formula variable with user input. Because here percentage will be varying based on user input.
    And suppose you have a key figure price which is attribute of material and you want to use that price for calculation in the report. In this case you will define formula varible with replacement path.
    Let me know if you need more information.
    Regards,
    Mansi

  • Filtering Interactive Reports with Greater Than Less Than Operators

    The available filter operators in the interactive reports do not include greater than or less than. How is it possible to enable an application user to filter records where greater than or less then logic is needed?
    For example the user wants to query records where sysdate falls between a start and end date.
    Regards,
    Todd

    Ya know, that's all well and good ... BUT ... WHAT IF you do want to sort text type columns with Greater Than and Less Than operatiors??
    SQL does it just Fine ... so WHY does APEX have the limit??? This is an Oracle BUG ... it SHOULD NOT limit the operators ... I realize "they" may be trying to be helpful with proper constraints to field searches ... but ... if SQL can do it, then ... no need for a limit.
    EG ...
    Show the records where
    the "Begin_Year-Wk" data is less than or equal to "2009-09" AND
    the "End_Year-Wk" data is greater than or equal to "2009-04"
    ... to give everything that was running in that 5 week period whether or not it starts within that time frame
    I can run this query perfectly fine via SQL ... but not in APEX ... unless I reconvert a lot of strings back to numbers, and for sorting / formatting / explain-to-user purposes, I really don't want them to be numbers.
    So ... there's gotta be a hidden tweak for operators somewhere ...

  • Formula variable with replacement path to another input variable

    Hi @ all,
    i have a question regarding "Formula variable with replacement path to another input variable".
    My Problem is that in selection screen and for info-fields the input variable is shown with its key and not with its description.
    Scenario:
    A formula variable (X) is used to get an input value of a characteristic variable (Y) for 0Fiscper3 to realize a IF-Then scenario.
    The formula variable (X) uses replacement path by variable (Y) replace by "key".
    In selection screen of the query variable (Y) is named with its key "ZAB_BUPE01" and not with its description " fiscal period". Same as for info-fields where the description is "ZAB_BUPE01" and not " fiscal period".
    Does anybody have a solution to display the selection variable correctly?
    Regards
    Tobias

    Issue Solved!
    The input varaible (y) for 0Fiscper3 was saved globally on the InfoProvider. This results in that the formula variable with replacement path only shows its technical name. I put the input variable in the query itself and it soved the problem. The variable is displayed with its description in selection screen.
    Regards

  • Formula variable with User Exit

    Hi,
    Can we create a Formula Variable of processing type USER EXIT...which will display a constant Value Y
    Any syntax would be helpful
    Thanks

    Hi,
    check this for formula variables with user exits;
    http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    http://sap.ittoolbox.com/groups/technical-functional/sap-bw/customer-exit-to-derive-formula-variable-to-text-variable-sap-bw-35-3030684
    Also Check the issues and solution :
    Formula Variable with User Exit....Problem
    Thanks
    Hemav

  • Formula variable with replacement path

    HI ,
    1. Is it possible to use "Customer exist- without user entry variable in the formula variable with the replacement ?
    2. if I use two variable for a same time char in one report (one is User entry variable and the other is customer exit variable for calculating current system date), then how it will work ? (User entry variable is there in the "Char restrictions" section and the customer exit variable is customer exit used in formula variable)
    Thanks in Advance.
    Thanks
    Rajesh

    1. Is it possible to use "Customer exist- without user entry variable in the formula variable with the replacement ?
    Yes. use I_step=1
    I_STEP = 1
    Call takes place directly before variable entry. Can be used to pre populate selection variables
    I_STEP = 2
    Call takes place directly after variable entry. This step is only started up when the same variable is not input ready and could not be filled at I_STEP=1.
    I_STEP = 3 In this call, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called again.
    2. if I use two variable for a same time char in one report (one is User entry variable and the other is customer exit variable for calculating current system date), then how it will work ? (User entry variable is there in the "Char restrictions" section and the customer exit variable is customer exit used in formula variable)
    Yes you can use both the variable of time char to restrict a characteristic but that should not be used on single characteristic.
    You can use the sys defined  0date on one field and the customised one Zsydatum on other char.
    Regards
    KP

  • User Exit Formula Variable - to calculate #days of any month

    Hello Team,
    I need a column in my report layout which shows the #days of any month entered by the user. User entry 01.2014 to 03.2014 report should have 31 28 & 31 according to the Calendar month in the rows.
    To achieve this I'm using a user exit formula variable in my local calculation. An Optional Interval User Entry variable on CALMONTH is also put in at the filter section.
    I created a CLASS with 2 methods CONSTRUCTOR( vNam = 'ZC2C_DSONWDAYS') & GET_VALUES. We may also use FM /OSP/GET_DAYS_IN_MONTH but i need the code because I failed terribly.
    GET_VALUES method code:
    if i_step = 2.
       DATA: wa like line of i_t_var_range[].
       DATA: L_V_INDICATOR TYPE SCAL-INDICATOR.
       data: begin of ccrange ,
               iobjnm(30) type c,
                 sign(1),
                  opt(2),
                  low(7) type c,
                 high(7) type c,
             end of ccrange.
      data: l_s_range type rrrangesid,
            no_of_wrkdays type i value 0,
            startdate     type d,
            enddate       type d,
            startmth(2)   type c,
            endmth(2)     type c,
            startyr(4)    type c,
            endyr(4)      type c,
            endday(2)     type c,
            leapyear      type i value 0,
            dayofmth      type syst-datum.
    DATA:  day           type SCAL-INDICATOR.
      loop at i_t_var_range into wa.
        if wa-iobjnm = '0CALMONTH'.
           ccrange-sign = wa-sign.
           ccrange-opt = wa-opt.
           ccrange-low = wa-low.
           ccrange-high = wa-high.
           exit.
        endif.
      endloop.
      startyr  = ccrange-low+0(4).
      startmth = ccrange-low+4(2).
      endyr    = ccrange-high+0(4).
      endmth   = ccrange-high+4(2).
      concatenate startyr startmth '01' into startdate.
    * determine last day of the end month
      if endmth = '02'.
         leapyear = endyr mod 4.
         if leapyear = 0.
            endday = '29'.
         else.
            endday = '28'.
         endif.
      elseif ( endmth = '04' or endmth = '06' or endmth = '09' or endmth = '11' ).
           endday = '30'.
      else.
           endday = '31'.
      endif.
      concatenate endyr endmth endday into enddate.
      dayofmth = startdate.
    IF startmth <= endmth.
       startmth = startmth+1.
    ENDIF.
    * do it for all days in space of time
       WHILE dayofmth <= enddate.     "to date
         CALL FUNCTION '/OSP/GET_DAYS_IN_MONTH'
         EXPORTING
           input = startmth
         IMPORTING
           output = no_of_wrkdays.
           CLEAR l_s_range.
           l_s_range-sign = 'I'.
           l_s_range-opt = 'EQ'.
           l_s_range-low = no_of_wrkdays.
       append l_s_range to e_t_range.
           startmth = startmth + 1.
           CONCATENATE startyr startmth '01' into dayofmth.
        ENDWHILE.
    endif.
    endmethod.

    Hi Vasavi,
    1)  Create a FV to calculate no.of days  like below, with calmonth in ref characteristics :
    2. If you see number of days is an attribute of calmonth. Please enter that as below :
    3. Create a formula with above variable and make sure calmonth is added in the row.
    Its giving output like this :
    I hope this will help you.
    Thanks,

  • Formula Variable with Replacement Path - drillup ref.char and still working

    Hi all,
    I have a requirement, where formula variable (with replacement path) shouldn't work when I remove the reference characteristic from the rows. But this is not the case at the moment
    I have 'Brand' and 'Material' in the rows and there is 'Material Indicator' in the columns. This 'Material Indicator' is a formula and there is formula variable in it with the type replacement path.
    Reference char is 'Material'; Replace with 'Attribute Value' is selected also. As attribute I am selecting one of the attributes of the 'Material'.
    In the report output, I am seeing relevant attribute values when Material is in the rows. But when I remove the Material from the report, I still see the values for this Material Indicator column. But I expect to see blank instead..
    Can you please share your comments?
    Thanks in advance.
    S.P.

    hi,
    Irrespective of the drilldown on Material, the fomula variable will be replaced by material value. This is how replacement variable should behave. You might have to change the design. For  more inputs, let me know your requirement exactly.

  • BEx Analyzer: Formula Variable with Replacement path change Month with Day

    Hi experts I'm facing this issue in BEx Analyzer.
    I need to have some dates in format DD/MM/YYYY in Index Structure, in order to do this I've created a formula variable with replacement path referenced to 0CALDAY characteristic.
    The formula works but it behaves in a strange way:
    if the day is higher than 12 the displaied result is correct (DD/MM/YYYY)
    if the day is lower or equal 12 the displaied result is wrong (MM/DD/YYYY)
    I'm on BW 7.01 SP6 and BEx Analyzer 7.10 SP12, excel 2007.
    anybody has faced this issue before?
    any help will be appreciated
    Daniele Cortopassi

    Hi Daniele,
    This seems pretty strange. Pls. redo validation with the dump data, as being a flat struture BEx does not apply any logic changes. May be it might have been MM/DD/YYYY format as in workbooks. Else you may change the property of 0calday display as "Text". Business Explorer > Display > KeyMaster Data/Texts > Texts (Plese check this option). If you are using some text table you may maintain the same using BI0/TCALDAY (Similar to BI0/TCALMONTH2). Guess it should be an excel based issue; if not you may try the same in WAD/Report designer to verify the nature of the issue. If you don't face these inconsistencies in WAD/RD then you may change excel formatting options. Lastly, please let us know if the infoobject has some predefined settings in RSA1 > Infoobject > (BEx) Properites.
    Thanks,
    Arun Bala

  • Date formula variable with replacement path.

    Hi ,
    I have date formula variable with replacement path.
    Variable pop up with date format yyyymmdd. but i want dd.mm.yyyy.
    I have checked my user profile setting and it is dd.mm.yyyy.
    Can u please suggest it .
    Thanks
    Pramod

    Thanks for the rely , but basically i need a variable only for selection.
    thats why i have created formula variable processing my cutomer exit.
    But i think customre exit variable comes with text format .
    any1 has an idea for the same.
    Thanks
    Babu

  • A formula with a formula variable with a replacement path delivers X

    A formula with a formula variable with a replacement path delivers X as a result if the characteristic of the replacement is not in the drilldown
    I have Created on ( date ) on which I have a Formula variable . I have used that Formula Variable in my calculated Key figure .
    Now the Problem is If I use Created on in ROW , The calculated key figure works . But if I don't use in Row , The calculated Key figure shows X . Situation is Users don't want to see Created on in ROW .
    If I use in row and hide also , then number of Records  will be same .
    Pls guide me what shoud I do .
    Is this problem related to support pack .

    hi
    i would like to know how to create the replacement path and authorisation variables.
    what are the steps we need to follow in rsa1.
    Edited by: vasu reddy on Apr 9, 2008 11:28 AM

  • Realtime scenarios for text &formula variable with replacementpath

    Please search the forums before posting
    i want real time scenarios for Text & formula variable with replacement path separately & how to solve it
    Edited by: Arun Varadarajan on Mar 15, 2009 7:26 PM

    Hi Karen,
    This require a text Variable with customer exit which reads the User entry formula variable and populate the coloum heading
    Hope you got it
    Regards
    Happy Tony

  • BW 3.5 - Issue with formula variable with replacement path

    Dear experts,
    I'm facing an issue with formula variable with replacement path.
    Just to clarify, I know replacement paths is raising a lot of questions but I've been using this functionnality extensively in the past, both in 7.0 and 3.5, so I'm not looking for basic information about how to use it.
    I'm trying to setup a simple report that would show total values per plant of Purchase Order < 100 €
    To do so I've setup a calculated key figure as follow:
    VAR1 * ("PO value" < 100 ) * "PO value"
    VAR1 is a formula variable with replacement path on 'purchase order' and value attribute 'constant =1'.
    (The report has to show values summarized by plant but should not show the detail PO by PO, so I'm not looking at a solution based on condition)
    The report as characteristic "plant" in rows and my CKF in columns.
    Now let's take an example. I have 3 POs in Plant 1:
    PO1 -> 150€
    PO2 -> 90€
    PO3 -> 80€
    Because of the variable with replacement path, the result in my query should be:
    plant1 = 170 (even though characteristic "purchase order" is not in my rows, system should evaluate PO one by one and return values only for those two that are below 100).
    But the result coming is 320, which is wrong.
    I've done the same report on many other 3.5 systems and it worked perfectly, and I am not able to get proper support from SAP OSS who keep saying that this functionnality is not ready in 3.5 (although I've provided screenshot of this working on another 3.5 system!!! how frustrating...)
    They have also pointed to problems of Before and After aggregation but that has absolutely no impact. Once again, the scenario is working perfectly on other 3.5 systems with the same query design, so i'm sure it has nothing to do with Query Designer options.
    Would anyone have ever come to an equivalenet problem? I'm wondering whether the DB itself could not play a role in the variable with ref  characteristic 'constant =1' ...
    Any though is welcome!
    thanks

    Hi,
    The text variable is replaced when the exact date is clear for this key figure column according to the restriction.
    To achive this, please make sure that either the variable is directly restricted in the key figure selection, or that the date characteristic is in drilldown.
    Regards,
    Patricia

  • Formula variable with replacement path on system date

    Hi Experts,
    I got a requirement to calculate "Days without payment" in report level.
    Days without payment = System Date - Payment Date.
    (Payment date field is available in CUBE, but system date field is not available in the CUBE)
    As we know, the difference b/w 2 dates is not possible directly.It can be possible by creating 2 formula variables with replacement paths on the dates and by writing aformula on these 2 formula variables.
    But the thing is I dont have system date readily available, and I tried by using SAP Exit. But we cant create formula variable replacement path on another variable (SAP EXIT).
    Do we have any SAP variable  for formula with replacement path readily avaliable to get system date (or) any other suggession.
    Please suggest me.
    Thanks,
    Sai Chand.S

    Hi Arminder,
    Thanks for your valuable answer.
    I tried doing the same previously.As u said we can get system date by creating customer exit variable.
    But the thing is to find difference b/w 2 dates, we cant do it directly, we need to create 2 formula variables with replacement path.
    1) Var1 = Formula variable with replacement path on system date(custoer exit variable).
    2) Var2 = Formula variable with replacement path on paymanet date.
    Number of days = var1 - var2.
    But as in 1st point, we cant create formula variable with replacement path on another variable, as system date is already a variable of type customer exit.
    We can create replacement paths only on characteristics.
    Please suggest me .
    Thanks,
    Sai Chand.S

Maybe you are looking for

  • To put a new page when month changes in sap script

    hello experts, how to put a page break whenever the month changes from the date range given ... e,g : 12.03.2007 to 12.09.2007 ... here i want to put the page break betwwen the records of month 03 .. 04..05..06... 09...

  • HT1529 How to mirror screen with OS 10.6 and apple TV

    I just purchased an apple TV and wondering if I can mirror my computer with the apple TV.  Can I purchase the software to do it?

  • Handling process in a remote system

    how to list processes, start processes, and kill processes in a remote system from a server. and how to get configuration information of a remote system. Return information regarding: logical memory configuration, physical and logical disk and partit

  • Newbie. Using Mac. I synced without deleting podcasts. My first sync

    I have been able to delete one at a time 12 min Adobe Creative Suite podcasts by Terry White. If i could get more than one deleted I would have space in my IPOD Touch 32. I feel so dumb. My first sync. I took so long setting up mail I am afraid to re

  • Unlock by imei

         Hi i have received the message "congratulations your iphone is unlocked" but my iphone still not working in the signal advice show no service, what can i do???