Table validations

i have couple of pages where i have an editable table. when user edits table data, i need to do some validations on values entered. these validations depend on other values of fields in row. table is based on a VO / Data control which is entity object based. sometimes i have to enable or disable a row and some fields depending on values of fields in a row. besides this, i have an action menu. i have to enable / disable command menu items depending on values of fields in row. what is the best practice / place to implement such validations. should these be kept at business components or view layer. jdev 11 1 1 6

Validation is part of the business logic so it should be defined and enforced there. However (and this it what the framework does), some validations are better done in the UI as you otherwise need a roundtrip to the server.
Next you have to think about the ui experiance the user have. If you disable fields right after he enters a value into another field it might disturb his thinking (e.g. he entered the wrong value in a field which causes other fields to get disabled). On the other hand users might like this as they always see what they can do and so see the error right away.
It depends on the use case and the users how to do the validation. From what I read out of your use case it'll be a mix.
Timo

Similar Messages

  • How to use the :$PROFILE$ token in a table validation value set

    Hi Community,
    Let me explain the scenario.
    We have a Flex Value Set (CLIENTES SERVICIO DIRECTO) with a table validation, included in the PO Headers DFF, which shows a LOV with the Ship-to addressfrom the customer which we want to serve the goods; i.e. we are acting as a commisionists and the supplier puts the goods in the Ship-to address of the customer.
    This Flex Value Set, as I mentioned, have a table validation, with the following validation table information:
    Table Application: Oracle Receivables
    Table Name: RA_ADDRESSES_ALL a, RA_CUSTOMERS b
    Table Columnns: b.CUSTOMER_NAME Varchar2(20), a.PARTY_LOCATION_ID Varchar2(20)
    Where/Order By: a.CUSTOMER_ID = b.CUSTOMER_ID
    Additional Columns: a.ADDRESS1 "Dirección"(20), a.CITY "Ciudad"(10)
    If we translate this to a SQL code:
    select a.address1,
    a.city,
    a.party_location_id,
    b.customer_name
    from ra_addresses_all a,
    ra_customers b
    where a.customer_id = b.customer_id
    and b.customer_id = 6283 <--- This last condition clause is for narrowing the result to the interested customer.
    This select retrive us two records; for the same customer, one of them for one organization_id (let's say 85) and one of them for the other organization_id (84).
    What we are looking for and want is that the LOV, which actually display the two records, shows only the ship-to site of the customer that belongs to the organization_id which belongs the user who queries or creates the Purchase Order.
    I.e. Suppose that we enter to Purchasing using the responsibility assigned to the Operating Unit or Organization_id 84. We want that theLOV only shows the Ship-to Site from the customer that belongs to the Operating Unit or Organization_id 84.
    I believe that we can achieve this using the :$PROFILE$ token, but we do not know how.
    Any ideas?
    Thanks a lot for your answer.

    Hi Rcana,
    We have just test your suggestion and it works. We believe that the correc sentence was fnd_profile.get('profile_name'), but the value feature solve the problem. Thanks for your help.
    Regards.

  • How to use a bind variable in a table-validated flexfield

    Hi,
    I want to prepare a table-validated descriptive flexfield, which uses as source a select statement.
    So, in the form "Validation table information" I use as table name the statement:
    (SELECT my_procedure('test_value') FROM DUAL)
    Up to here it works fine.
    But instead of 'test_value' I want to use the value of a field in the form or a value of another flex (using $FLEX$ bind variables).
    Please advice if it is possible to perform this in "table name" statement. I use it in "where/order by" clauses and it works fine.
    Thank you.

    Hi,
    I have posted in the place where you did advise,
    https://forums.oracle.com/thread/2560192
    but they reply there that this is an EBS question, with no much relation to dev tools in general.
    Please, can I continue in this place with this question?
    Thank you.

  • Table Validation - Report errors without losing changes

    Hi all,
    I am experimenting with table validation based on Denes Kubicek's example at http://apex.oracle.com/pls/otn/f?p=31517:41. I have had no problems getting this working,
    but I need to stop if loosing data when the validation rules are not met.
    If I have 10 rows in my table and the user updates 6 of these with valid new values and 1 with an invalid value then the submit button causes the error message to be shown as expected, but the page / table reverts back to the data from the databse and all the other changes are lost.
    How can I get the page to keep the entered values when the page is refreshed?
    Thanks,
    Martin

    Martin,
    You may need to replace the validation using JS. JS equivalent for Denes e.g.
    Put this in page HTML Header..
    <script type="text/javascript">
    function f_validate()
         var comm;
            var dept;
            var err ='';
         for (i=0;i < document.wwv_flow.f02.length;i++)
         comm = document.wwv_flow.f07.value;
         dept = document.wwv_flow.f08[i].value;
         if (comm > 2000 && dept == 20)
              err = err + 'Error at Row ' + i;
    if (err == '')
    doSubmit();
    else
    alert (err);
    document.wwv_flow.f07[0].focus();
    </script>
    Change the 'Submit' button target to URL and type javascript:f_validate(); as URL Target
    Cheers,
    Hari
    Edited by: Hari_639 on Oct 29, 2009 7:07 PM

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

  • Jdev 11 Table validations bug.

    Validation errors on ADF editable table fires only when you change a row by clicking.
    If you press any submit button they disapear.
    Also validations dont fire if you navigate to a diferent row by pressing Tab key.
    is this a bug?
    Is there any way that these validation errors do not disapear when i press any button?
    details:
    [http://adfbugs.blogspot.com/2009/08/table-validations-bug.html]

    Hi,
    don't think this is a bug because you perform sever side validation that is not existing on the client. So this validation only happens when you change the row currency on the binding layer, which is not happening when you use the tab. To see this error immediately you would need to assign a submit event when leaving a filed. So if you set autosubmit=true on your cell component renderers then this fires quite happily (but who wants to pay the price for this ?)
    Frank

  • Table validation question

    Hi
    I have created 2 tables zposition, zwork.
    The fields in zposition is department and position.
    The fields in zwork is empid, department, position, firstname and lastname.
    I wanted to create a validation that when i insert the data into the zwork, the system will automatically check against the zposition tables for the department and position that was store inside it. How do i do it?

    in ur zwork table where u find the fields department and position..
    in the table fields of zwork just put the cursor on this field say department and click the key button(on the top) it will propose for a check table and in there give the zposition table relavant field department.
    the answer is there in ur question itself ...
    // check against the zposition tables for the department and position--> u need to propose the check table on that field .
    so all in ur are validating the zwork department entry with zposition department field..

  • Table validation

    Hi,
    I'm validating rows in a table.
    When any error occurs in a row I have to highlight particular column.
    As of now I'm getting the last error row with highlighted column.
    How to get all the errors to be highlighted???
    Thanks,
    Suba

    Hi ,
    use the method  report_attribute_t100_message of IF_WD_MESSAGE_MANAGER , it has a paramater in which u can pass the node element and the attribute name which has error .
    Hope this will solve ur problem .
    Regards
    Yash

  • Alv table validations

    Hi all,
    I have alv table for create PR. i have entered values in first row but incomplete and tries to add another row but it show the message like enter the value in the field(field name). after the values are entered completely in the first row, it should allow to add the others rows..
    can anybody suggest where exactly in alv i should write this validations.?
    Thanks all

    Hi ,
    Are you using the standard alv button or custom button.
    regards
    Kuldeep

  • Qualified Table - Validations

    Hi ALL,
    I have field in the Main table, where I need to run a assignment on this field, based on the validation results from qualified table (qualifier).
    Lets say field in Main table is " Global Status " ; Qualified table ( qualifier field - plant status).
    if plant status = Z3 then Global Status is Active --> i can have more than one qualified links and may the Plant status= Z3 is first qualified link or last qualified link.
    Is this possible?? to writie a validation for the same.
    please revert to me asap.
    thanks,
    Alexander

    Hi Alexander,
    As per my understanding, I think this is possible to run a validation if plant status = Z3 then Global Status is Active.
    This validation is true if any of the qualified links has Plant Status = Z3, either this is 1st Qualifed link or last and fails only if none of qualifed links has plant status = Z3.
    As you are running Validations this should run as expected. Further on the based of Validation result you can run assignment.
    I also feel that you can also run Assignment directly if any of the qulified link has plant status = Z3 then populate Global status = Active as Global status field belongs to main table not qualified table.
    Just check and revert with result as I dont have MDM installed on my PC so would able to check it tomorrow from my end.
    Regards,
    Mandeep Saini

  • Drop down  ! check table validating ?

    Hi,
    For ALV edit mode i am creating a fieldcatalog-checktable field fill with value ! , then also while in the drop values are get validated with check table?
    It is validating the entry with checktable? why ? after giving  ls_fcat-checktable = '!'.
    * Here YDROP_DOWN field have check tabke values " ", 1, 2
      ls_fcat-fieldname = 'YDROP_DOWN'.    
      ls_fcat-datatype  = 'INT4'.
      ls_fcat-checktable = '!'.
      ls_fcat-no_out    = c_x.
      append ls_fcat to pt_fieldcat.
      describe table pt_fieldcat lines v_rows.
      call method cl_alv_table_create=>create_dynamic_table
        exporting
          it_fieldcatalog = pt_fieldcat
        importing
          ep_table        = g_hts.
      assign g_hts->* to <i_status>.
    Then during the first display
      call method g_grid->set_table_for_first_display
        exporting
          is_layout            = gs_layout
          i_save               = 'A'
          it_toolbar_excluding = i_exclude[]
        changing
          it_fieldcatalog      = gt_fieldcat[]
          it_outtab            = <i_status>[].
      call method g_grid->set_ready_for_input
        exporting
          i_ready_for_input = v_input.  " it will be 1 or 0

    Hi ARS,
    See the below link and i am sure it will help you lot
    /people/srilatha.t/blog/2007/04/16/alv-grid-150-insert-row-function
    /people/david.halitsky/blog/2007/04/24/so-youve-got-to-code-an-editable-alv-inside-an-sap-provided-exit-and-x-function-group
    Problem in ALV
    Thanks
    Seshu
    Message was edited by:
            Seshu Maramreddy

  • Entry does not exists in check table -- Validation

    Hi friends..,
      I am able to create new entries in my table with INSERT statement through a function module.
    But, the problem is..,
    I am having one key field in my table, and T1(another table) is check table for this.
    So while creating the entries through SE11, its giving error message like ENTRY DOES NOT EXISTS IN CHECK TABLE. But the same entry i am able map through my function module..!
    Any extra settings reuired for this..?
    Or.,
    Am i need to write validation code?
    Thanks,
    Naveen.I

    Hi...Rama chary..,
    I am having separate function modules to do this..!
    So here I can't to update two table at time.
    My function module updating a table field with out checking it wrt its check table..!
    Even i write code to check table , it will not meet the functionality of SE11 error..!??
    so what can i do..?
    Thanks,
    Naveen.I

  • Internal table validation

    Hi,
    i have a situation like this.
    db table
    CODE........NAME
    A123  |      AAA
    B234  |      BBB
    internal table  1 is
    code |  name|   group|
    A123 | AAA   | M
    A123 |  AAA  |  N
    B234 |  BBB  |  M
    B234 |  BBB  |  N
    B234 |  BBc  |  L
    B234 |  abc  |  L
    C234 |  ccc  |  K
    INTERNAL TABLE 3 IS EMPTY
    after validating internal table with my db table, 2nd internal table would contain all the matching records with db table only though other fields are different.
    INTERNAL TABLE 3
    code   name   group
    A123 |  AAA  |  M
    A123 |  AAA  |  N
    B234 |  BBB  |  M
    B234 |  BBB  |  N
    your help would be appreciated.
    thanks,
    kranthi.

    select all ur data base entries in to itab_data base.
    add one more field in your first internal table (itab1)
    say  it will look like this.
    code
    name
    group
    flag
    loop at itab_data.
    itab1-flag = 'X'.
    modify itab1 where
                 code = itab_data-code
                 name = itab_data-name.
    endloop.
    delete itab1 where flag = space.
    you will be left with only entries which are in your data base.
    I am sure you can do it many (better??) ways , jst an idea while sipping my tea .-)
    I hope you like too :-).
    Rgds,
    Mano Sri

  • What are the Master Table validations required for below fields

    Hi,
    I have created a selection screen with following fields.
    Can anybody tell me what are the exact master table vaidation i can do for the same!
    <b>Order Type[VBAK-AUART],
    Order Number[VBAK-VBELN],
    Customer PO #[VBKD-BSTKD],
    Sold-to Party No[VBPA-PARVW - SP as key],
    Ship-to Party No[VBPA-PARVW - SH as key],
    Division[VBAK-SPART].</b>
    Agaist which master tables i need to vaidate above fields!
    Also please clarify what is meant by [SP as Key] & [SH as key]! Is it needs to be defaulted!
    Thanks in advance.
    Thanks,
    Prasad.

    Hi Prasad,
    For your another Query
      SH- Ship To Party,
      SP - Sold To party.
    You can set anyone of them as Default depending on ur Bsuiness requirement ie. You are Forwarding ur Invoice to ship to or sold to Party.
    Regards,
    Leo

  • Check table validation

    Hi all,
    I have created a customized table. In one field I have assigned check table and foreign key checkbox is checked. But when this table is updated through a program it goes on creating any entry. Entry is not restricted to the check table values only. It goed on creatting values which are not in the check table.
    How to avoid it?
    Regards,
    Jeetu

    Hey Matt,
    My 10 points was deducted when I had previously asked for points same as Ankesh.
    Just wanted to know what in cases like this ;-).
    Believe post by Ankesh has been removed by Moderator.
    Cheers,
    Jayant
    Edited by: Jayant Sahu on Dec 4, 2008 4:22 PM

Maybe you are looking for

  • PA40 doesnot contain any actionType

    Hi all Iam new to SAP HR Security and trying to learn on this I started create the Personnel master record using PA40, but in that iam not able to see the Action type list in my screen. Do i need to do any setting at any tcode for getting this done r

  • HOW TO SEE THE NONACTIVE MATERILA LIST

    HOW TO SEE THE NONACTIVE MATERILA LIST

  • Parked Documents Display

    Dear Team, Is their any Standard Report in SAP through which I want to check the status of Parked Documents through TCODE MIR7. EG If an Invoice is Parked on 25.04.11 and the same doc is  Posted on 02.05.11. So Now on 19.05.11 I want to know the stat

  • How to remove external contact from office 365 Global Address List

    Try this below. $file1 = "file1.csv" $file2 = "file2.csv" $f2Names = import-csv $file2 | select -ExpandProperty Name Import-Csv $file1 | Where { $f2Names -notcontains $_.Name }

  • Why doesn't apple tv appear when playing video in safari?

    Hi Guys:      I just bought an apple tv. I am able to use the mirroring function with no problem, and I can see the apple tv in the "Airplay" menu.      But When i play a video in safari(mirroring turned off), I can not see my apple TV in the "AirPla