API to validate a value against a value set

I have a 'Table' Value Set based on the MTL_CATEGORIES_V view, and need to validate some loaded data against it to check the loaded values are are valid. Rather than use a cursor to perform a lookup of the value in MTL_CATEGORIES_V, is there an API that can be used instead?
I thought I'd found something when I discovered "FND_FLEX_VAL_UTIL.is_value_valid", but this seems to just check that a value meets the criteria of the valueset based on the datatype. size, hi-lo range etc, it doesn't check if the value is actually permitted within the set.
Andy

Hi,
you can use fm FM_DOMAINVALUE_CHECK. Pass parameter values for I_DOMNAME and I_DOMVALUE.
If the value is invalid, exception VALUE_NOT_ALLOWED will occur.
Regards,
Klaus

Similar Messages

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

  • How can I graph muliple sets of y-values against a single set of x-values?

    Hi.  I am trying to write a VI that will take columns of data stored in a 2D array and plot it with the first column being the x-coordinates and all subsequent columns (different parameters) of data being y-coordinates.  The number of these parameters is determined by the user, but it could be as high as 128.  I think that I need to write a for loop that will pair each column of y-coordinates with  the column of x-coordinates in a cluster, and then create an array of clusters to be plotted with an xy graph, but I am not sure how to do this. 
    Also, it would be nice if each parameters could be its own color so they can be distinguished on the graph (each parameter is over 40,000 data points)
    Thank you in advance!
    -Pushrod

    What have you tried so far? A for-loop is a good way to do this since you have so many columns, and you can automatically have it create the array of clusters necessary for the XY graph. Basically you just need to index out the first column to get your X values, and then drive a for-loop for the number of Y values. You can determine this by simply using Array Size on the 2D array. It will return to you the number of rows and the number of columns. The coloring of each trace is automatic. One solution:
    Attachments:
    Example_VI.png ‏21 KB

  • Checking a value against a BC set

    I have a BC set with different ranges of values, and I need to check if one particular value is included on the set.  Are there any function to check that?
    I was searching on forum posts and I've found some answers referring to some functions, but I don't understand the interface of any of these functions.  So if you'll give a function list to do it please I'll appreciate a brief explanation of what the function need to work.
    Thanks!

    Hi,
    Check FM G_SET_FETCH. You have to pass set name and it will return a table containing ranges and values that are included in your set. Most likely you have to pass set name in the following format: 0000XXXX...XXX where XXXX...XXX stands for set name.

  • Validation of a form field value against existing values in database tables - urgent.

    Hi,
    I have created a "form based on a table". Is there a way of validating the fields entered by checking that they are valid values existing on another table in the database? So if they are not valid values, the data would not be inserted and an error would be flagged to the user.
    I have not yet been able to find any questions on this forum which deal with this exactly.
    Thanks,
    Steve.

    On Insert button try following (change to your requirement),
    declare
    usr_id varchar2(100) := portal30.wwctx_api.get_user;
    usr_name varchar2(100);
    my_deptno number(10);
    begin
    my_deptno := p_session.get_value_as_NUMBER(
    p_block_name => 'DEFAULT',
    p_attribute_name => 'A_DEPTNO');
    usr_name := null;
    begin
    select ename
    into usr_name
    from emp
    where dept=my_deptno;
    exception
    when others then null;
    end;
    if usr_name is null
    then
    htp.p('<script> alert("Dept wrong"); </script>');
    else
    doInsert;
    end if;
    end;

  • Validate a value against table validation value set within PL/SQL

    Hi,
    I am trying to import price list lines along with Pricing attribute values.
    I have to validate the uploaded values against the pricing attribute value set, before I import them into base tables.
    Value set defined is of type table validation.
    I wanted to know if there are any public APIs that can be used to validate the value against the Value set values within my PL/SQL procedure
    Also please point me to documentation that lists various public PL/SQL APIs
    Regards,
    Mrutyunjay

    You can find functions and procedure for Value sets in packages FND_FLEX_VAL_API or FND_FLEX_VAL_UTIL.
    Example : get_table_vset_select gives you the select statement of your value set. Executing this statement will allow you to validate your values.

  • Verify a value against value set

    Hi,
    I am trying to import price list lines along with Pricing attribute values.
    I have to validate the uploaded values against the pricing attribute value set, before I import them into base tables.
    Value set defined is of type table validation.
    I wanted to know if there are any public APIs that can be used to validate the value against the Value set values within my PL/SQL procedure
    Also please point me to documentation that lists various public PL/SQL APIs
    Regards,
    Mrutyunjay

    Hi,
    You can query the fnd_flex_values or fnd_flex_value_segments_vl to find the name of the value set defined.
    Another point is that the Value Set is defined of validation type Table so the values are dependent on the base tables.
    There are no such API's to cater the need for Verfying a Value against a Value Set.
    If u want to search for public API's go to the metalink.
    Regards

  • OIM 11g R2 - API to validate user's password

    Hi,
    Is there any API available to validate if an user's password in OIM is valid.I have an user login and password and need to verify if the user's password in OIM is same the input password.I am not looking for the API to validate my password against password policy,for which I have the API.
    Thanks.

    One of the ways to do it would be to decrypt the current password and then compare with the new password. Where are you doing this check? Depending upon where you want to do this, you can use different ways to decrypt the current password of the user.
    There are various posts in the forum about decryting the password.
    On a side note, if your policy does not allow same password, then new password validation against the policy should suffice your requirement.
    -Bikash

  • Validate field value against LOV in JClient

    Hi,
    I have wondered is it possible when i have a LOV attached to a textfield or column from JTable to validate entered value against values in LOV. I mean when i enter wrong value in field, automatically to invoke LOV panel when the field lost focus.
    Thanks in advance!

    Hi,
    this is currently not a feature available in JClient. We are evaluating this as a new feature in a next version fo ADF JClient (which will be named ADF Swing then)
    Frank

  • Need an API to Validate the Segment Values of an GL Code Combination

    Hi,
    I have a requuirement wherein i need to validate the semgent values of an GL Code Combination. I want to know is there any API to Validate the Segment Values. The API should be able to validate the segment values for existence in value set, enabled/disabled, Posting flag enabled or disabled (i.e Compiled Attributes Validation).Please provide me some pointers.
    Thanks & Regards,
    Siva

    look at FND_FLEX_EXT or FND_FLEX_KEYVAL
    FND_FLEX_KEYVAL.validate_segs

  • With a contract number, how to know the total PO release value against it?

    Usually one contract corresponds to multiple PO records, now we know the contract number, then how to know the total PO release value against this contract.  In other word, we would like to know the total release value of all the POs with the same contract number.  To just input the contract number in EKPO table? but then look for which field in this table to add these PO release values up?
    We will give you reward points!
    Thanks!

    hi Mohammad,
    By following your instruction, input the contract number 4800000112 into Document number field, then hit Enter, get the following (only copy two records here for example), but kind of a mess.  Could you let us know which one is the PO release value for this contract?
    Contract   Type Vendor     Name                                 PGp Agmt. date
      Item  Material           Short text                               Mat. group
      D I A Plnt SLoc                 Targ.qty. Un       Net price  Curr.   per Un
    4800000112 WK   2000012012 GULF INTERSTATE FIELD SERVICES       QBH 06/20/2006
    Agreement start06/20/2006 Agreement end 12/31/2007
    Tgt. val.        1,000,000.00  USD   Open          1,000,000.00 USD   100.00 %
      00001                    Inspection Svcs, Construction            R3VNI
      L   U                                  0  UL            0.00  USD       1 EA
      00002                    Chief Inspector                          R3VNI
      L   U                                  0  DAY         390.00  USD       1 DAY

  • PO Order value against Contract

    Hi,
    I am loading data from 2lis_02_hdr, 2lis_02_itm, 2lis_02_scl datasources in to cusotmized cube.
    In the ITM datasource we have fields EBELN(PO Number), KONNR(Agreement number), and we have a filed NETWR(Net Order value) against the PO number.
    Here requirement is they want report which contain Target value(KTWRT), Order Value(NETWR) against Agreement no(KONNR).
    In the customized cube I consider Agreement and Agreement Item fileds as per requirment
    I have created query with the following navigations:
    I restricted PO number with Doc type=WK (for Agrement number)
    selcted PO number in Rows
    selected Target value and Order value in columns.
    In Query Output it is not showing Order value against the Agreement number,
    As we know One Agrement number can have more than One PO's but in datasource level he maintains Order value against PO number.
    So How will I get the Order value against Aggrement number..what calculations are required at what level..if routines required let me know the code in brief
    Thanks in Advance
    I will assign points for each reply..please help out this problem immediately..

    hi,
    Wht exactly do you need??
    yes, once you use del. comp. indicator and then you post the doc. later, the qty remains same it doesn't get updated bcoz by default system updates it in PO History...
    Why do you want same with GR?? Why you wanna keep GR histories?? it'll increase complications and will create problem while invoicing and that the reason sap has not provided it...
    Regards
    Priyanka.P

  • Coding to calculate net purchase order value against the contract?.

    Hi ,
    Please help.
    Can any one send me the coding to calculate net purchase order value against the contract?.
    Thanks

    I got the below coding and information from SDN, would you please help me to fix this coding
    infomation from SDN
    For the above requirment I have coded a program in Endroutine but it is not populating cummulative Order value against Contract.
    DATA:
    WA_ty_t_TG_1 TYPE tys_TG_1.
    data: netsum type char15.
    types:begin of ty_net,
    netsum type /BI0/OINET_PO_VAL,
    V_EBELN TYPE /BI0/OIOI_EBELN,
    end of ty_net.
    data:t_net type standard table of ty_net .
    data:wa_net type ty_net.
    SORT RESULT_PACKAGE BY CONTRACT.
    loop at RESULT_PACKAGE INTO WA_ty_t_TG_1.
    WA_NET-V_EBELN = <RESULT_FIELDS>-CONTRACT.
    AT END OF CONTRACT.
    netsum = WA_ty_t_TG_1-NET_PO_VAL + NETSUM.
    ENDAT.
    WA_NET-netsum = NETSUM.
    APPEND WA_NET TO T_NET.
    CLEAR:T_NET,NETSUM.
    ENDLOOP.
    loop at RESULT_PACKAGE assigning <RESULT_FIELDS> .
    READ TABLE T_NET INTO WA_NET WITH KEY
    V_EBELN = <RESULT_FIELDS>-CONTRACT
    <RESULT_FIELDS>-/BIC/YNET_VAL = NETSUM.
    CLEAR: WA_NET-NETSUM.
    endloop.
    <RESULT_FIELDS>-/BIC/YNET_VAL = netsum.
    CLEAR:NETSUM,<RESULT_FIELDS>-/BIC/YNET_VAL.
    ENDLOOP.
    I have coded above one..let me know what mistake I have done.in the bolded loop I have given INTO instead of Assigning, because I need all records which assigns to WorkArea, but while executing DTP its leading to shortdump.if I replace Assigning statement,its working fine. but zero values in output( I think wrong in logic part)
    Let me know the brief coding part if I am wrongly coded.

  • Cumulative credit value against the combined invoice value

    Is there any FI table where we can find cumulative credit value against combined invoice value.
    The scenario is..
    There is a combined invoive created  for multiple sales documents for the value 5000 dollers .
    1.I have created a credit memo& accounting document for 2000 dollers with ref. to the above invoice.
    2.Again I can create credit memo&accounting document for 5000 dollers with ref. to the same invoice
    also we can keep on creating credit memos with the value more than the combined invoice value.
    I would like to put the check that the system should issue the warning while try to create credit memo with the cumulative value more than the invoice value
    Kumar

    Dear Megha,
    Max.open.item % is meant for different purpose, and we can mention Maximum percentage of overdue open items/customer balance in that field.
    In order to meet up your requirement, use the option Oldest Open ITEM. This will solve your issue.
    Activate the indicator OLDESTOPENITEM indicator; and check the STATUS/BLOCK indicator.
    If you enter Days oldestItem as 1; then, the system will check if there are any open items (open accounting documents) which are due for one day; If the sysetm finds such open items, then it will block subsequent orders.
    You can make use of the transaction FD10N to find out the overdue open items.
    I have not tried with value 0 for this particular field. Just try. Hope this will solve your issue.
    Thank you
    Venkatesh SP
    Edited by: venkatesh paulraj on Mar 2, 2011 12:02 PM

  • How will i get Netorder value against contract

    Hi,
    I have loaded 2lis_02_hdr, itm, scl datasources in to customized cube which contains Purchasing document(EBELN), Item(EBELP), Doctype(BSART), Contract(KONNR), Item(KTPNR), Netordervalue(NETWR)
    Here my requirment is I want to cummulate Netordervalue against Contract no.
    In query level if I selected Purchasing doc with doctype=WK(it means it is value Contract), it is not showing any Ordervalue against Contract.
    How will acheive this to get Cumulative order value against Contract.
    Please share your suggestions to acheive this requirement.
    For clarifications please revert back.
    Thanks in Advance
       sudhir.

    Hi,
    For the above requirment I have coded a program in Endroutine but it is not populating cummulative Order value against Contract.
    DATA:
          WA_ty_t_TG_1        TYPE  tys_TG_1.
    data: netsum type char15.
    types:begin of ty_net,
        netsum type /BI0/OINET_PO_VAL,
        V_EBELN TYPE /BI0/OIOI_EBELN,
        end of ty_net.
        data:t_net type standard table of ty_net .
        data:wa_net type ty_net.
    SORT RESULT_PACKAGE BY CONTRACT.
    <b>loop at RESULT_PACKAGE INTO WA_ty_t_TG_1.</b>
          WA_NET-V_EBELN = <RESULT_FIELDS>-CONTRACT.
          AT END OF CONTRACT.
            netsum  = WA_ty_t_TG_1-NET_PO_VAL + NETSUM.
          ENDAT.
          WA_NET-netsum = NETSUM.
          APPEND WA_NET TO T_NET.
          CLEAR:T_NET,NETSUM.
    ENDLOOP.
        loop at RESULT_PACKAGE assigning <RESULT_FIELDS> .
            READ TABLE T_NET INTO WA_NET WITH KEY
                                  V_EBELN = <RESULT_FIELDS>-CONTRACT
            <RESULT_FIELDS>-/BIC/YNET_VAL = NETSUM.
            CLEAR: WA_NET-NETSUM.
        endloop.
        <RESULT_FIELDS>-/BIC/YNET_VAL = netsum.
        CLEAR:NETSUM,<RESULT_FIELDS>-/BIC/YNET_VAL.
        ENDLOOP.
    I have coded above one..let me know what mistake I have done.in the bolded loop I have given INTO instead of Assigning, because I need all records which assigns to WorkArea, but while executing DTP its leading to shortdump.if I replace Assigning statement,its working fine. but zero values in output( I think wrong in logic part)
    Let me know the brief coding part if I am wrongly coded.
    Thanks in Advance
    sudhir.

Maybe you are looking for