10.1.3--Disable a field according to values of another field.

Hi,
I am trying to set a filed on the JSP to be disalbed according to values of another field.
eg. When the value in "ID" field is NOT 10 or 20, the "Bill" field should be disabled.
I have tried using only one condition which is when "ID" != 10 or "ID" != 20. They work fine. But when I try to combine two conditions together using "&&" sign, I got a syntax error. The JSP does not display at all. I asked an expert about it, the answer is:
#{(bindings.Deptno.inputValue.value !=10) &&(bindings.Comm.inputValue.value > 1000)}. I tried this on my application and got the same syntax error.
Has anybody had a similar situation? Any idea what could be wrong? Thanks in advance.
Annie

Hi bsalvador,
I've had a simular situation once where I needed to make items disabled or required depending on a workflow step and on depending on other page items. Basically the disabling of items is done by javscript, keep in mind that readonly is not the same as disabled. When you use readonly, the item can still be manipulated with javascript. When you disable an item, the item is not even submitted to the database, so you have to make sure that your submit process can hadle that.
There are two different situations:
First you have the page load / page submit, there you can use PL/SQL to check which items should be submitted, hand them a javascript class or make them readonly/disabled straight away.
Second you have a situation where you want to disable certain items depending on the value of other items. This is done 'on the fly' and should be handled with a javascript function.
Keep in mind however that javascript runs client side and isn't a secure way to handle data integrity, so you would need a database process to validate which items need to be submitted as well.
Regards,
Vincent Deelen

Similar Messages

  • Disable a field programatically in the OAF Page...pls  help !!!!!!!!!!!!!!

    Hi ,
    My requirement is-
    I have a region in the page which has 4 fields.Based on a condition I need to disable these fields.
    For this I tried extending a VO and created a transient Boolean Attribute and kept a SPEL expression in Read Only property for these attributes so that if i set the value in the controller to true / false the fields will be enabled or disabled accordingly.
    I extended the controller and wrote the below code.But it is not working as expected.PLSSSSSSSSSSSSSSSSS hELP.
    HzPuiOrganizationProfileAMImpl aam = (HzPuiOrganizationProfileAMImpl)oapagecontext.getApplicationModule(oawebbean);
    oawebbean.
    //OAViewObject mreqVO = (OAViewObject) (HzPuiOrganizationProfileAMImpl)oapagecontext.getApplicationModule(oawebbean).findViewObject("xxHzPuiOrganizationProfilesVO");
    // xxHzPuiOrganizationProfilesVOImpl xvo = (xxHzPuiOrganizationProfilesVOImpl)oapagecontext.getApplicationModule(oawebbean).findViewObject("xxHzPuiOrganizationProfilesVO");;
    //xvo.getCurrentRow().getAttribute("DisableAttr");
    xxHzPuiOrganizationProfilesVOImpl xvo = (xxHzPuiOrganizationProfilesVOImpl)oapagecontext.getApplicationModule(oawebbean).findViewObject("HzPuiOrganizationProfilesVO");
    int i =xvo.getRowCount();
    // throw new OAException("test "+String.valueOf(i),OAException.ERROR); -- HERE I GET THE COUNT AS 1
    String rowReference = oapagecontext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    if(rowReference != null)
    xxHzPuiOrganizationProfilesVORowImpl xxvorowimpl = (xxHzPuiOrganizationProfilesVORowImpl)aam.findRowByRef(rowReference);
    xxvorowimpl.setDisableAttr(Boolean.FALSE); //setreadOnlyAttr(Boolean.TRUE);
    throw new OAException("hi",OAException.ERROR);
    RowSetIterator Iter = xvo.createRowSetIterator("DataIter");
    Iter.setRangeStart(0);
    Iter.setRangeSize(i);
    Row row = null;
    row = Iter.getRowAtRangeIndex(0);
    row.setAttribute("DisableAttr",Boolean.TRUE);
    //xvo.getCurrentRow().setAttribute("DisableAttr",Boolean.FALSE);
    pls help me in solving the issue.
    Thanks
    Ramya

    Hi,
    Sample Method:
    public void DeleteMeasurePeriods()
    int fetchedrowcount;
    RowSetIterator deleteIter;
    OADBTransaction tr = getOADBTransaction();
    PeriodsVORowImpl row=null;
    PeriodsVOImpl mpvo=getPeriodsVO1();
    fetchedrowcount=mpvo.getRowCount();
    deleteIter = mpvo.createRowSetIterator("deleteIter");
    deleteIter.setRangeStart(0);
    deleteIter.setRangeSize(fetchedrowcount);
    for(int i=0;i<fetchedrowcount;i++)
    row= (PeriodsVORowImpl)deleteIter.getRowAtRangeIndex(i);
    if()
    row.setAttribute("DisableAttr",Boolean.TRUE);
    else
    row.setAttribute("DisableAttr",Boolean.FALSE);
    deleteIter.closeRowSetIterator();
    Regards
    Meher Irk

  • Enable / disable classification fields in material master?

    Hi experts
    We hope to assign one group who could change the matieral master fields on classification.
    Like one gropu who could change the classification fields- date, on mateiral master . others only could display
    Is that possible to modify the program to enable or disable one field ?
    Now we have mm02 for normal user and zmm02 for specific user.
    Thanks
    ALice

    Hi
    When you create a role with transcation MM01, the Authorisation objects related to Classification are inherited from the transaction.
    If you want to give the user only diplay options maintain the Activities as 03 for the authorisation object C_KLAH_BKL & give the Class Type Z01.
    For the Chracteristics (Class maintenance)in the authorisation object C_TCLS_MNT maintain Activity 03 & Class type Z01
    Similarly create another role & assign it to the user whco is authorised to create or chnage values, Give hm the activiies 01,02 & the class type Z01.
    I feel that there is no requiremnt of changing the Program, as the authorisation objects are laready available.
    Thanks & Regards
    Kishore

  • Disable certain fields during the creation of SC using "create limit item"

    Hi,
    I have a requirement to disable certain fields from the role "SHOP" associated with the operational purchaser role. I would like to disable the fields "Unlimited check box", "Service Agent", " Invoice Only radio button", "Unknown account assignment radio button" from the screen I get during creation of SC using the option "Create Limit Item". Also i need to disable the option "Good / Service" entry box as we are using only free text items and donu2019t want this option to be seen in the screen when using the operational purchaser role.
    Please advise how can I achieve this.
    Regards
    GGL

    Hi,
    I have a same requirement to disable certain fields from the Shopping Cart Limit Item. I would like to disable the fields  "Service Agent", "Unknown account assignment radio button" from the Detail  screen. during creation of SC using the option  Limit Item .  Also i need to make default Value "Known" and "Invoice Only". But this is in SRM 7.0. Notes You have mentioned supports only Release 5.5, But I am in Release 7.0. Any idea?
    I appreciate your help
    Thanks,
    Monica

  • How to disable a field in a standard transaction

    Good day,
    Can any one tell me , with an example of , how to disable (the field should not allow any input ) a parameter  or a select option in a standard transaction.

    Probably the only way to achieve this is by creating transaction variants:
    In the SAP Reference IMG, you can create transaction variants. Choose Basis Components ® Application Personalization ® Tailoring of Application Transactions ® Configure Transaction-Related Display Values for Fields (Transaction SHD0). Transaction variants allow you to preset values for fields in a transaction, set field attributes, or hide entire screens.
    To execute a transaction variant, you define a variant transaction using the Transaction Maintenance transaction (SE93).
    Once you have entered a transaction code and short description, choose transaction type Transaction with variant (Variant transaction).
    To define a variant, enter the name of the transaction and the name of the variant. You can then use the new transaction code to start the special variant of the transaction.
    Steps :-
    Transaction SHD0 - Create a variant for the required transaction bychanging the layout through hiding fields and screens.
    Transaction SE93 - Create a variant transaction (e.g. for VA02 you canname it as ZA02). Next allocate the transaction variant to this varianttransaction.

  • Disable a field in a Table layout based on the condition

    Hello,
    In the seeded page, there is a table layout region with viewobject name as View1. It has 3 fields displayed as Field A, Field B, Field C with multiple rows displayed when the page opens. Fields B and C are MessageTextInputs and Field A is MessageChoice. So in the displayed rows in the table, if the value selected in the Field A is "Bonus" then the fields B and C needs to be disabled so that the user should not be able to enter any information. So if there are 5 rows in that table, only 1 or 2 rows might have the value "Bonus" in the field A and only for those rows, fields B and C needs to be disabled.
    I would appreciate if anyone can provide me with a logic. I know how to disable a field based on the value of other field but in this case here, its a table region with multiple rows and only few of them needs to be disabled. I couldn't think of any logic here. Any help is greatly appreciated.
    Thank You
    KK

    Similar problem
    Re: How to make Advanced table readonly

  • Disabling subscreen fields..

    hi,
    i have a screen with a subscreen that has a tabstrip with 5 tabs.
    during one of the operations i need to disable all the fields in all the screen areas of that screen inclduing the subscreen tabstrip fields.
    its not working, in my PBO module i write as follows:
    LOOP AT SCREEN.
        SCREEN-INPUT = '0'.
        MODIFY SCREEN.
    ENDLOOP.
    only the fields of the current screen are disabled. the fields in the tabstrip in subscreen are still in input mode !! what to do ?
    thks

    you need to do the same logic for the subscreen also.
    if you placed the above logic for main screen . place the same logic for subscreens also.
    main screen logic
    process before output.
    call subscreen sub including sy-repid '0200'.
      module status_0100.
    process after input.
    module user_command_0100.
    subscreen logic.
    process before output.
    * MODULE STATUS_0200.
      module status_0100.
    process after input.
    * MODULE USER_COMMAND_0200.
    module code.
    module status_0100 output.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
    loop at screen.
    screen-input = 0.
    modify screen.
    endloop.
    endmodule.                 " STATUS_0100  OUTPUT
    this work for me, you try it from your end.

  • Disabling certain fields on the selection screen.

    Hi all,
              I want to disable certain fields on selection screen of my program, also i want to display certain fields on selection screen only if a particular field on the selection screen is checked or selected. Please guide me how this can be achieved via coding in a program.
    Thanks & regards,
    Chetan.

    Hi Chetan,
    try this.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: pa_file TYPE rlgrap-filename MODIF ID abc,
    pa_lifnr TYPE lfa1-lifnr MODIF ID abc,
    pa_vkorg TYPE vbak-vkorg MODIF ID abc.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: pa_kunnr TYPE vbak-kunnr MODIF ID def.
    SELECT-OPTIONS: s_lifnr FOR gs_lfa1-lifnr MODIF ID def,
    s_date FOR gs_lfa1-erdat MODIF ID def,
    s_augru FOR gs_vbak-augru MODIF ID def,
    s_vbeln FOR gs_vbak-vbeln MODIF ID def.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pa_upd RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'."#EC *
    SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_upd.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pa_rep RADIOBUTTON GROUP g1 ."#EC *
    SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_rep.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b3.
    IF pa_rep EQ gc_x.
    LOOP AT SCREEN.
    IF screen-group1 = gc_abc.
    screen-input = gc_zero_num.
    ELSEIF screen-group1 = gc_def.
    screen-active = gc_one_num.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    ELSEIF pa_upd EQ gc_x.
    *For Reprocessing
    LOOP AT SCREEN.
    IF screen-group1 = gc_def.
    screen-input = gc_zero_num.
    ELSEIF screen-group1 = gc_abc.
    screen-active = gc_one_num.
    ENDIF.
    MODIFY SCREEN.
    CLEAR pa_upd.
    ENDLOOP.
    ENDIF.
    REPORT zrich_001.
    PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X'
    user-command chk,
    p_rad2 RADIOBUTTON GROUP grp1.
    SELECT-OPTIONS: s_datum1 FOR sy-datum MODIF ID d1,
    s_datum2 FOR sy-datum MODIF ID d2.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF p_rad1 = 'X'
    AND screen-group1 = 'D2'.
    screen-active = '0'.
    ENDIF.
    IF p_rad2 = 'X'
    AND screen-group1 = 'D1'.
    screen-active = '0'.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    reward if useful.
    regards,
    sravanthi.

  • Disable Form Field

    I have created a form that is a mathematical worksheet. There
    are 3 types of fields: (1) fixed value, (2) user entry and (3)
    calculated results. In order to make the calculated result fields
    stand out their style is set to BOLD RED. The fixed value and
    calculated results fields have been "disabled" to prevent users
    from changing the values and also to force tabbing to skip over
    these fields. But disabling these fields makes them "gray" and the
    calculated results fields do not match the style (i.e. BOLD RED).
    Using "readonly" solves the style issue but then the user can
    access the filed and try to change it. How can I get around this?
    The site is at www.pacificproductsinc.com

    Hi -
    All you need to do is assign a class to the input field, that
    styles the
    text color red and bold, like so:
    (This goes before the closing </head> tag)
    <style type="text/css">
    <!--
    .red { color: #FF0000; font-weight: bold; font-size: .9em }
    -->
    </style>
    And then apply it to your input field, for example:
    <input type="text" disabled="true" value="$$$$"
    class="red">
    If you're using an external stylesheet, just add the ".red"
    class to the
    stylesheet.
    HTH, take care.
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    Proud GAWDS Member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================
    "tomgu" <[email protected]> wrote in message
    news:e8urb1$mih$[email protected]..
    >I have created a form that is a mathematical worksheet.
    There are 3 types
    >of
    > fields: (1) fixed value, (2) user entry and (3)
    calculated results. In
    > order to
    > make the calculated result fields stand out their style
    is set to BOLD
    > RED. The
    > fixed value and calculated results fields have been
    "disabled" to prevent
    > users
    > from changing the values and also to force tabbing to
    skip over these
    > fields.
    > But disabling these fields makes them "gray" and the
    calculated results
    > fields
    > do not match the style (i.e. BOLD RED).
    >
    > Using "readonly" solves the style issue but then the
    user can access the
    > filed
    > and try to change it. How can I get around this?
    >
    > The site is at www.pacificproductsinc.com
    >
    >

  • Disable Date Fields

    I am using javascript to disable date fields, so the users are forced to use the date pickers. The field is disabled and the date picker works but when I save the record the entry in the date field disappears.
    Page Header
    <script language="JavaScript1.1" type="text/javascript">
    function disFormItems(item1){
    disItem = document.getElementById(item1);
    disItem.style.background = '#ffffff';
    disItem.disabled = true;
    </script>
    Region Footer
    <script language="JavaScript1.1" type="text/javascript">
    disFormItems('P1_TEXT_AREA');
    </script>
    Any ideas
    Gus

    Tried as you suggested. The filed is disabled but there is no button for the calendar.
    Changed date field to text and in post element I copied:
    <script type="text/javascript">
    function genCal0_p_t16_18()
    w = open("wwv_flow_utilities.show_as_popup_calendar" +
    "?p_element_index=" + escape('p_t16') +
    "&p_form_index=" + escape('0') +
    "&p_date_format=" + escape('DD-MON-YY') +
    "&p_bgcolor=" + escape('#666666') +
    "&p_dd=" + escape('') +
    "&p_hh=" + escape('') +
    "&p_mi=" + escape('') +
    "&p_pm=" +
    "&p_yyyy=" + escape('2006') +
    "&p_lang=" + escape('en-gb') +
    "&p_application_format=" + escape('Y') +
    "&p_mm=" + escape('12'),
    "winLov",
    "Scrollbars=no,resizable=yes,width=258,height=210");
    if (w.opener == null)
    w.opener = self;
    w.focus();
    </script>
    Is this correct
    Gus

  • Enabling / Disabling a field on a Form

    Hi, I would like to enable a field for user input query value,
    but once the data is returned to the form, I want to disable that
    field so that it cannot be editable. (i.e. it is the PK for that
    table). Anyone has any suggestions / Ideas.
    Thanks
    Srini

    Hi,
    If you can find the form element in Javascript using
    document.forms[0].elements[i] - where i is the element number
    then you can disable it by
    document.forms[0].elements.disabled=true;
    and enable it by
    document.forms[0].elements[i].disabled=false;
    the javascript would be something like:
    if (document.forms[0].elements[i].value > "") {
    document.forms[0].elements[i].disabled=true;
    this will disable the field if it has a value.
    you should put this in AFTER displaying the form since otherwise
    the form is not there for the code to run on.
    Regards Michael

  • Disable a field at Item level for SC confirmation Screen

    Dear All ,
    PLEase help me with a step by step instruction on how to disable field at Item level of  confirmation screen of SC .
    I tried in Webdynpro component : Web Dynpro Component:/SAPSRM/WDC_DODC_CONF_IBD in se80 and below is what I get ;
    When I click on Display it asks me for an access key which I dont have ..
    When I click on the enhancement option it asked me to create an implemenation which I did as seen in yellow below and still the enabled field is not getting editable so tha I can uncheck and make the field dissapper .
    Please can some one really help me in understanding what exactly I am doing wrong ?
    Also  Please let me know if the SPRO path related in this to be able to do in any which way ... I tried expanding
    Configure field control .. and it doesnt expand so dont know which other option to use ..
    Thanks for your help in advance .
    Kindly let me know !!
    Regards
    Vinita

    HI Laurent .
    1. Thanks for your input . I wasnt able to open the SPRO path coz I was using SAP 720 and when I installed 730 I was able to use it .
    2. I am still not able to udnerstand how to configure it through Meta data .. What does Final_Entry mean .. I want to disable the field Last del indicator and its flag box and the label as well ..
    3. I tried through component configuration and it worked ..as below :
    I went to the webdynpro component and started the component configiurator :
    Here I made both the field and Label insisible and was able to do this .
    Please can some one help ,me know how to configire this through Meta data concept as well .. I wanted to try that method as well for my understanding ..
    Would appreciate your help and would be closing this post soon ..

  • Disabling the field 'Bill-to party' in sales order screen

    Hi friends,
    I need to disable following fields in the partner functions tab of sales order ,while creating/changing a sales order,since they will be automatically populated and user should not be able to modify.
    1.Bill-to party.
    2.Payer.
    I have tried with user exit MV45AFZZ,but program control is not coming there regarding PARTNERS tab,for diabling the screen.
    Can you give me some hints like,any other EXIT or BADI exists for writing the code for this?
    Thanks & Regards
    Seshagiri.

    Hi,
    Your requirement is to identify the bill to based on ship to. if so do the following.
    maintain the partner tab in ship to master record, here you assign the bill to party to whom you have to send the bill.
    Now in partner determination procedure maintain the bill to source as ship to. In partner determination procedure you have all the options from where system has to look for the other partner functions.
    In this processes system first checks with Sold to, finds out a ship to, now from ship to partner tab it automatically finds out the bill to in to the sales order.
    Hope you understood, if not let me know.
    Reward if it helps you.
    Venkat Cheedalla

  • How to disable amount field in me21n/me22n

    Hi all,
    In me22n how to disable amount field in condition tab based on condition type.
    Regards
    suni

    Hi,  check SPRO

  • How to disable individual field of a search view

    Hi All,
    Is there a way to disable individual search field of an advance search view ?
    The reason for this is that for a particular search field I am defaulting the value and do not want the user to be able to change this default value, in effect filtering out their search.
    I have tried get_i method but the advance search (thtmlb:advancedSearch) does not seem to trigger the get i method, disabled just disable every fields likewise the global edit/viewgroup context.
    Thanks in advance for your assistance.
    Edited by: ANDREW NGUYEN on May 12, 2010 10:45 AM

    Hi,
    I checked it now and found that the GET_I_FIELD is not getting triggered. Sorry for my wrong solution.
    You can use the rt_result parameter in GET_POSSIBLE_FIELDS method in IMPL class.
    It returns the search fields visible in the view.
    Regards,
    Arun Kumar
    Edited by: Arun Kumar on May 12, 2010 11:35 AM
    Edited by: Arun Kumar on May 12, 2010 11:38 AM

Maybe you are looking for