Formula Variable to Validate Input Values

Hi experts,
I created a query with some exceptions which uses formula variables to validate these exceptions. But I have a requirements for these formula variables. Eg: Certain user can only enter the selection range of values 1-50 for this formula variables during the run time, if the user enter the values more than > 51, the user will not be able to see the report results and the query will show message saying that the user is not authorized to see the results with this selection. And certain user will be able to see the report results for selection values more than 51.
Any idea of how to achieve this? I planning to create a customer exit but I do not know what code to use here.
Thanks alot.

Just now i noticed that even wtih user hooks, it is not feasible: Please validate my approach is correct or not.
i used query:
select api_module_id, module_name, module_package
from hr_api_modules
where module_name like '%ELEMENT%ENT%';
API_MODULE_ID MODULE_NAME MODULE_PACKAGE
78 CREATE_ELEMENT_ENTRY PY_ELEMENT_ENTRY_API
79 UPDATE_ELEMENT_ENTRY PY_ELEMENT_ENTRY_API
80 DELETE_ELEMENT_ENTRY PY_ELEMENT_ENTRY_API
178 PAY_ELEMENT_ENTRIES_F     
but .. i dont see any hook record for api_module_id = 78 in hr_api_hooks table.
select *
from hr_api_hooks
where api_module_id = 78;
-- No Records for above Query.
My conclusion is, we cannot register our custom package with PY_ELEMENT_ENTRY_API.create_element_entry module.
Please validate my conclusion is correct or not.
if this is correct, It is really unfortunate that, i cannot implement this simple validation.
Message was edited by:
user552453

Similar Messages

  • Function module to validate input value

    Hi all,
    can you please provide me the name of the function module to validate input value.
    I have a case where i have to validate decimal values. sometimes users may enter wrong decimal values by mistake instead of  "0.23" "0..23' and it gives CONVT_NO_NUMBER runtime error so have to come up with some solutions to validate user input.
    Please provide me Function module if anybody knows.
    Thanks,

    Try this one
    data: lv_htype TYPE dd01v-datatype.
        CALL FUNCTION 'NUMERIC_CHECK'
          EXPORTING
            string_in = my_number
          IMPORTING
            htype     = lv_htype.
        IF lv_htype NE 'NUMC'.
           Raise an error here...
        ENDIF.

  • Validate input value against calculated value

    Hi Chaps,
    Need a bit of guidence with some PHP code.
    I have a Query that estimates a quote ($price_total) for a job.
    The estimate ($price_total) is the value of an input (jobquote), and the database is updated once the form is submitted (using a seperate script.php page).
    What I need, is to validate the entered value of 'jobquote' against the estimated value of $price_total, just incase a 'custom' price has been agreed with a customer.
    If the values are different, then I need an 'admin override' radio button (admin_quote enum('y','n')) to appear.
    If someone can help or point me in the right direction, I'd be most grateful.
    Cheers

    Got a bit further:
    PHP Code:
    <input type='text' name='jobquote' value="<?php echo $price_total; ?>"/>
            <input type='hidden' name='original_jobquote' value="<?php echo $price_total; ?>"/>
            <?php
    if ($_POST['original_jobquote'] != $_POST['jobquote'])
    { ?>
    <span id="spryradio1">
    <input type="radio" name="jobquoteadmin" value="y" id="radio" />Confirm<br />
    <span class="radioRequiredMsg">Please confirm Admin Override</span></span>
    <?php };
    ?>
    Problem 1. The information is '$_POST'ed to a script file, not to the page itself and at the moment, the $_POST takes place before the PHP validation takes place. If I remove the link to the script page, the validation works.
    Problem 2. (link to script removed for testing) If I change the value (from the default 'original_quote'), then submit, the page reloads, the 'Confirm' radio button appears, but the value of 'job_quote' has reverted back thte default:
    1. Start - job_quote = £350
    2. Change - job_quote = £100
    3. Submit
    4. Page reloads - job_quote = £350, confirm appears
    Is there a way around this?

  • Validate input value against database

    Is it possible to check the value of an input field (regular input, not cfinput) against a database to check for duplicate values?

    Probably.

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

  • Formula variable in 2004s displays '?No/Value'

    Hi,
    I have created a formula variable to display characteristic value in a query. it works fine in 3.5 version but when i migrated this query in 2004s. It displays "?No/Value" in report. I tried to look at couple of settings but i didnt find anything. Is there any setting i missed out in 2004s?
    Thanks
    Abhijit

    <FONT FACE = "Tahoma", Font Color = "Blue">
    My Dear Friend<br>
    <u>Please try the below code:</u><br><br>
    Case vnam.<br>
    When 'Z_OPT1'.<br>
    check i_step = 2.<br>
    <br>
    read table I_T_VAR_RANGE INTO loc_var_range with key vnam = 'Z_OPTSEL'.<br>
    <br>
    if sy-subrc = 0.<br>
    Clear l_s_range.<br>
    if loc_var_range-low = '1'. <br>
    l_s_range-low = '2'.<br>
    endif.<br>
    if loc_var_range-low = '2'.<br>
    l_s_range-low = '0'.<br>
    endif.<br>
    endif.<br>
    l_s_range--sign = 'I'.<br>
    l_s_range-opt = 'EQ'.<br>
    APPEND l_s_range TO e_t_range.<br>
    endcase.<br>
    <br><br>
    Hope it helps.<br><br>
    Cheers Abhijit<br>
    </FONT><FONT FACE = "Verdana", Font Color = "Red">
    Removed
    </FONT>

  • Catch Elements Where no Input Value Added

    Hello
    Before I begin can I just say I'm new to Oracle HRMS so if I say/state something stupid please bear with me!
    I have a non-recurring earnings element that has two input values, one to hold the pay value that is created via Fast Formula (very simply multiplies the Number of Units by a Unit Rate held as Global Variable) and a second that allows user to enter a number of Units, this value is passed into my formula. This part is all fine and works. Where I’m getting into trouble/can’t figure out is around the area of input validation.
    I’ve then created a second fast formula to validate input and then made a reference to the fast formula through the elements Input Values screen and returned result as error. Most of my validation in here is fine however I’m trying to figure out how do I figure out if the user hasn’t placed or has removed a value from element after its been attached?
    Let’s say I’ve attached my element to my assignment. I then go in and add 3 units. At this stage everything is fine and I save record. Then let’s say I go back in a remove the units entered and saved my record. Is there anyway I can get a message which says a null value has been entered? Is this something I do through a fast formula? I tried using isnull function but this doesn’t work. I’ve also tried defaulting my value in the fast formula and using was defaulted but again it doesn’t seem to work.
    Thanks for bearing with me! Any pointers/help would be gratefully received.

    Hello. My Element Input Validation Fast formula is
    Inputs are entry_value (text)
    IF ISNULL(entry_value) = 'Y' then
    (formula_Status = 'e'
    formula_message = 'Must enter something')
    If to_num(entry_value) < 1 or to_num(entry_value) >= 40
    then
    (formula_Status = 'e'
    formula_message = 'Night Duty overtime hours only claimable from 1 to 40 hours')
    ELSE
    (formula_Status = 's'
    formula_message = ' ')
    RETURN formula_Status,formula_message

  • Zero Suppression Not working in Bex Query with Formula Variable

    Hi Friends,
    I have a peculiar issue here. We upgraded from 3.5 to 7.0 recently. Some of our Bex queries have been behaving abnormally after this. In these queeries,
    we have some key figures which use formula variables (ready for input and mandatory) in 3.5. User can enter either 1 or 0. The actual key figure is multiplied to the formula variable so, the entire column gets the actual key figure value if the user enters a value '1' and the gets the value 0 if the user enters '0' in the formula variables. Zero suppression is activated on the rows and columns and this report. This technique was used successfully to show/hide a column.
    After upgrade, the same query works but, the zero suppression is not working. When the user enters a value of '0' in these formula variables, all the entries in the column for the key figure are displayed as 0 but the column is still displayed. It is like the zero suppression setting is not active at all.
    I created one of those queries in Bex 7.0 to see if that works but, the issue still exits. Have anyone come across this kind of a scenario? Please get back to me if anyone has any idea on this situation.
    Thanks and Regards
    Subray Hegde

    Which SP level are you at in BI 7? There is an OSS Note that would need to be applied if you're on lower than SP10. That note is:
    [OSS Note 964756 - Formula variables with replacement from difference in BI 7.0|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=964756]

  • Web item for formula variable in WAD

    Hi,
        I have a formula variable in my IP application where user can input the percentage for a function, which web item I should used in WAD to bind the user's input data with the formula variable? The input field item does not have the data binding property.I did it in my last project but can not remember it anymore.

    Basically, in IP you do not need to configure  web item for formula variable, it will automatically pop-up when you run the function, at that time you can input the value for the variable. while in BPS, we need to input the numerical value before we run the function.
    Since the input field web item does not have data binding property, I am not sure it is useful, the data you input has no effect on your processing data set. Anybody has some other idea?

  • Is it possible to add more input values for a payroll element?

    Hi All
    I have created an element with 1 default input value 'pay value' and another input value '1xx1'. I have linked this to payroll and attached to many employees. Now due to business requirment, I need to add one more input value '2yy2' and also I need to change the formula. Eventhough its a minor change in formula, without a new input value it will not work. I tried to add a new one by datetracking to the element creation date without sucess.
    Is it possible to add input values after saving an element?
    Regards
    Rahman

    You can Change the Required Input Value to Not-required
    Alter the Sequence of the Input Value to be displayed in the Element Entry Screen
    You can Change the Input Value Validation Rule minimum, Maximum, Lookup and Formula
    Change your specification of which input values create Database Items. Note, however, you cannot remove Database Items if they are used in any formulas or QuickPaint reports.
    You cannot remove existing input values or add new one if you have created any entries for the element
    For more details you can refer http://ramesh-oraclehrms.blogspot.com/2007/08/maintaining-element.html

  • Date Difference between to date formula variable

    Hi Expert,
                    I have create two formula variable one for Document Date and another one for Goods reciept date
    and through formula variable I am subtracting these two formula variable and getting the no. of days between
    document date and GR date.
    This Shows me the correct value for one document date because i am filtering my query according to document
    date,
    while i am giving the date range for document date is shows me incorrect result. bucause document date formula
    variable contains only one date.
    Eg. i am giving the document date range like 01.02.2010 - 28.02.2010.
          In document date formula variable it contains only 01.02..2010 and GR date formula variable it contain correct
    value, thats why the date difference is incorrect because those PO which has PO date like 12.02.2010 for that Doc
    formula variable bring the same date like 01.02.2010.
    Please tell me the solution
    Thanks and Regards
    Lalit Kumar

    Hi Expert,
                     Actually i have created two formula variable on for PO date and another for GR date
    and i've restrict the query through PO date.
    while i am taking the single PO date in Selection parameter it showing me correct difference
    eg: Selection Parameter for PO: 01.01.2010
    But while i am taking the date interval for PO date
    eg: 01.01.2010-30.01.2010
    PO No: XXXXX123 , Doc date: 01.01.2010 GR date: 7.01.2010 then date difference is : 6
    PO No: XXXXX432, Doc date: 03.01.2010 GR date: 8.01.2010 then date difference is : 7 but it is 5
    Thanks and Regards
    Lalit Kumar

  • 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

  • Formula variable for a user input DATE value

    Hi All,
    I want to create Formula variable for a user input DATE value as I need to use it in a formula to compare between user entry date & date in the DSO. Does any body has any idea about it?
    I tried to create formula variable with manual entry but then I am not getting DATE option.
    Regards,
    Sonal

    Hi ,
    You have to create a formula variable in the formula.
    The formula variable in the general tab would have the reference characteristic as your date characteristic on which you have created a user entry variable or on which you intend to create a date entry variable.
    Give the proceesing type as replacement path.
    Next in Replacement path mention you would replace the variable with value of another variable.
    Mention the variable name.(This is the actual varaible created on the selection screen),
    Also mention you would replace only from value/to value of the variable.
    Check the following help link
    [Replacement path type formula variable|http://help.sap.com/saphelp_nw70/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm]
    Hope this helps,
    Best regards,
    Sunmit.

  • 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

  • Drop-Down-Box (F4 Input Help) for formula variable in BEx Analyzer (BI 7.0)

    Hi Gurus,
    is it possible to get a drop down box for a ready for input formula variable in the BEx Analyzer (not BEx Web!)?
    We want to let the users choose scaling factors 1, 1000 or 1000000 (implemented via this formula variable). In the settings of the formula variable you can only choose a default value but there seems to be no option to provide all three factors in a drop down box like the ones for characteristic value variables.
    We could prevent other entries in the variable pop up via customer exit (i_step 3) but the business is wishing an F4 input help like the ones for characteristic values.
    Thanks for your help,
    Marco

    Hi Macro,
    Its not possible to get drop down box for a ready for input formula variable. Because it is possible only for characterstic value variables but not formula variable.u donnot get any drop down box like ready for input for formula variable.
    Regards,
    Premalatha.C

Maybe you are looking for