How to make MessageTextInput as a readonly field.

Hi,
I want to make MessageTextInput as readonly field.
OAMessageTextInputBean textBoxName = (OAMessageTextInputBean)webBean.findChildRecursive("MytextField");
textBoxName.setReadOnly(true);
When i am using above code it will not render field on page.
Same thing is happening while trying to use readonly = True property at design time.
could anyone help on this?
Thanks in advance
Laukik Pachanekar

Hi,
Thanks for your response.
I am using below code in processRequest method.
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAMessageTextInputBean textBoxName = (OAMessageTextInputBean)webBean.findChildRecursive("MytextField");
textBoxName.setReadOnly(true);
Thanks,
Laukik

Similar Messages

  • How to make Sales group and office field mandatory in VA01 first screen

    hi gurus,
    can anybody tell me how to make Sales group and sales office mandatory field on VA01 tcode first screen. i have requirement to make it compulsary on the first screen otherwise they wont be able to goto next screen.
    will reward points for sure
    thanks
    mandy

    Hi! Mandy,
    Try using t.code SHD0, choose your transaction variant here, further choose your screen variant.
    Next select your screen variant and in the Menu bar select Variant> change with processing>Make repairs in foreign namespaces only if they are urgent> Continue(Enter)>again 'enter'>Object can only be created in SAP package>continue(enter)> Exit and save >This variant contains other screens, adopt these as well?>enter>enter> scroll down to the entry required by you make the necessary changes(Output only, invisible or required) and save.
    The system will prompt to assign a package and request enter the necessary values.
    Provide your feedback.
    Regards,
    PATHIK

  • How to make default values in selection field?

    hi,
          i have selection field date , using data element 'QENTST' using following code in view INIT Method. i get the input selection field when i test application.
    DATA: LT_RANGE_TABLE TYPE REF TO DATA.
    CALL METHOD WD_THIS->M_HANDLER->CREATE_RANGE_TABLE
      EXPORTING
        I_TYPENAME                     =     'QENTST'
      RECEIVING
        RT_RANGE_TABLE           =     LT_RANGE_TABLE.
    CALL METHOD WD_THIS->M_HANDLER->ADD_SELECTION_FIELD
      EXPORTING
        I_ID                                     = 'QENTST'
        IT_RESULT                         = LT_RANGE_TABLE
        I_OBLIGATORY                 = ABAP_TRUE.
    What i need now , to make default value in this selection field( low = sy-datum and high = sy-datum + 10 ) . I have checked , i found one method called... SET_RANGE_TABLE_OF_SEL_FIELD. Bt i m not able to understand how to assign values to input table parameter in this method?
    Thanks In Advance.
    Saurin Shah

    Hi,
    Refer this Article by Thomas on how to make default values in Select Options:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60474842-91ca-2b10-3390-d2fd30f335fd
    I hope it would solve your problem.

  • How to make a SELECT LIST READONLY

    Hi,
    I have a form to update the existing values in a table. Primary column is based on a Select List.
    So when user goto update screen they SHOULD NOT BE ABLE TO CHANGE the primary filed(means the value display in the Select List).
    SO to make this one I have make that select list read only. But not like other items even when we make select list read only it still allow user to change the value. So basically read only property not working for select text.
    There are many post in this regading same issue. Some of them recomended to make it disabled. But when we make a item disabled then when user POST that form, Apex not POST any disabled item values. Basically disabled items values not passing next form. So making item dissable also not a solution.
    I have read almost 20 post in here regarrding this and didnt get any solution for this. So please let me know if anyone knows how to make a select list read only (which is working same as read only text boxes, means that value pass when user POST the form).
    Thanks in advance...
    mc

    You define a function(this is based aorund jQuery selectors) in the page header like
    <script>
      var makereadonly = function(selector, makeReadonly) {
          $(selector).filter("select").each(function(i){
              var select = $(this);
              //remove any existing readonly handler
              if(this.readonlyFn) select.unbind("change", this.readonlyFn);
              if(this.readonlyIndex) this.readonlyIndex = null;
              if(makeReadonly) {
                  this.readonlyIndex = this.selectedIndex;
                  $(this).css('background-color','#CDCDCD'); //Adds a background colour to readonly item
                  this.readonlyFn = function(){
                      this.selectedIndex = this.readonlyIndex;
                  select.bind("change", this.readonlyFn);
          //For input items
          $(selector).filter("input,textarea").attr('readOnly','readOnly');
          $(selector).filter("input,textarea").css('background-color','#CDCDCD');
    </script>and apply it using a jQuery selector (call it in the "execute on page load" or any other JS code)
      makereadonly('#ITEMNAME1,#ITEMNAME2,#ITEMNAME3',true);Not that all of these methods(that act at the client side) will only prevent the user from modifying it 'normally', they could manipulate these readonly items using Javascript(or using firebug or any tool like that). So its better to make sure that your don't use the item value(from the page) for processing.

  • How to make a selection screen two fields obligatory

    Dear friends...
       I wish to know how i make two fields obligatory in the selection screen
    like
       select-options  Po_Num for  ekpo-ebeln obligatory.
       select-options  Po_Date for  ekko-aedat.
       select-options  Material for  mara-matnr.
    in the above example i am looking for po_num and po_date both obligatory but if i dont enter data in the po_num, po_dat becomes obligatory and po_dat has no data entererd po_num is obligatory. i wish to know how i achieve single field act as a obligatory in absence of another field. please help in this regards..
    thanking you,,,
    regards.
    Naim

    REPORT  ZMM_COMP_POS  no standard page heading line-size 225
    tables:  ekko, ekpo, mara.
    data: begin of i_ekko occurs 0,
          ebeln like ekko-ebeln,
          ebelp like ekpo-ebelp,
          matnr like mara-matnr,
          aedat like ekko-aedat,
          waers like ekko-waers,
          ernam like ekko-ernam,
          end of i_ekko.
    data: begin of i_ekpo occurs 0,
          ebeln like ekpo-ebeln,
          ebelp like ekpo-ebelp,
          matnr like mara-matnr,
          aedat like ekpo-aedat,
          waers like ekko-waers,
          menge like ekpo-menge,
          meins like ekpo-meins,
          ernam like ekko-ernam,
          lgort like ekpo-lgort,
          netwr like ekpo-netwr,
          recd(16) type p decimals 3,
          rec_val(16) type p decimals 3,
          end of i_ekpo.
    data: lines type i.
    data :itab_output like i_ekpo occurs 0 with header line.
    data: itab_output3 like standard table of itab_output .
    data  data.
    data  total like sy-dbcnt.
    data  recd(16) type p decimals 3.
    data  rec_val(16) type p decimals 3.
    data : it like i_ekpo occurs 0 with header line.
    selection-screen begin of block b1 with frame title text-010.
    select-options Po_Num for ekpo-ebeln .
    select-options Po_Date for ekko-aedat.
    select-options Material for mara-matnr.
    selection-screen end of block b1.
    at selection-screen.
    if po_num[] is initial
      and po_date[] is initial.
    message e001(00) with 'Make at least one entry'.
    endif.
    start-of-selection.
    if  PO_NUM is initial and
         Po_Date is initial or
         Material is initial.
             select ebeln ebelp matnr
                    menge meins netwr
                    aedat
                    from ekpo
                    into corresponding fields of table i_ekpo
                    where ebeln in Po_Num.
    endif.
            loop at i_ekpo.
                  select ebeln aedat waers ernam
                         from ekko
                         into corresponding fields of table i_ekko
                         where ebeln in Po_Num.
                  if sy-subrc = 0 .
                     i_ekpo-aedat = i_ekko-aedat.
                     i_ekpo-waers = i_ekko-waers.
                     i_ekpo-ebeln = i_ekko-ebeln.
                     i_ekpo-ernam = i_ekko-ernam.
                     modify i_ekpo transporting ebeln aedat waers
                                                ernam
                                                where ebeln = i_ekko-ebeln.
                     clear i_ekko.
                   endif.
               endloop.
               describe table i_ekpo lines lines.
               if lines le 0.
                  message e017(zk).
               endif.
          select ebeln ebelp matnr
                 menge meins netwr
                 werks
                 from ekpo
                 into corresponding fields of table i_ekpo
                 for all entries in i_ekko
                 where ebeln = i_ekko-ebeln .
          sort i_ekpo by ebeln ebelp.
          sort i_ekko by ebeln.
          loop at i_ekko.
            read table i_ekpo with key ebeln = i_ekko-ebeln.
            if sy-subrc = 0.
                     i_ekpo-aedat = i_ekko-aedat.
                     i_ekpo-waers = i_ekko-waers.
                     i_ekpo-ebeln = i_ekko-ebeln.
                     i_ekpo-ernam = i_ekko-ernam.
               modify i_ekpo transporting ebeln aedat waers
                                          ernam
                                          where ebeln = i_ekko-ebeln.
           endif.
        endloop.
      describe table i_ekpo lines lines.
      if lines le 0.
        message e017(zk).
      endif.
      loop at i_ekpo.
       write:/1 sy-vline,
           (5) i_ekpo-ebeln left-justified ,sy-vline,
           (10) i_ekpo-ebelp left-justified ,sy-vline,
           (15) i_ekpo-aedat left-justified ,sy-vline,
           (18) i_ekpo-ernam left-justified ,sy-vline,
           (23) i_ekpo-matnr left-justified , sy-vline,
           (27) i_ekpo-menge UNIT i_ekpo-meins left-justified , sy-vline,
           (29) i_ekpo-meins left-justified , sy-vline,
           (31) i_ekpo-netwr CURRENCY 'INR' left-justified ,sy-vline,
           (33) i_ekpo-waers left-justified ,sy-vline.
    endloop.
       write:/(743) sy-uline.
    top-of-page.
        write:/30  'ESSAR CONSTRUCTIONS LTD.' color 6 inverse.
        write:80 'DATE :' color 6 inverse, sy-datum  color 6 inverse.
        new-line no-scrolling.
        write:/30 'PO Details.' color 7 inverse.
         write: /(743) sy-uline.
      format color col_heading on.
         write:/1 sy-vline.
         write: (5) 'PO no.',sy-vline,
               (10) 'Item no.',sy-vline,
               (15) 'PO Date' color 1,sy-vline,
               (18) 'PO Created By.',sy-vline,
               (23) 'Material No.', sy-vline,
               (27) 'PO Quantity', sy-vline,
               (29) 'PO Unit', sy-vline,
               (31) 'PO Value',sy-vline,
               (33) 'Currency' , sy-vline.
        write:/(743) sy-uline.
        format reset.

  • How to make a column as Password field?

    Hi,
    I need to change the column as "Password" field.
    I.e. the data should be shown as "******" in DB Also.
    How to make this happen in Table column?
    Kindly guide / help me on this.
    Thanks,
    Orahar.

    Orahar wrote:
    Dear Kumaran,
    Thanks.
    Can you explain me about the view which I need to create to displays the column value as stars ("*****")?
    Thanks,
    Orahar.
    SQL> create table tbl_test (id number, name varchar2(10));
    Table created.
    SQL> insert into tbl_test values(111,'test');
    1 row created.
    SQL> select * from tbl_test;
            ID NAME
           111 test
    SQL> create or replace view vw_test as
      2  select '*****' id, name from tbl_test;
    View created.
    SQL> select * from vw_test;
    ID    NAME
    ***** test
    SQL> insert into tbl_test values(2,'test2');
    1 row created.
    SQL> select * from vw_test;
    ID    NAME
    ***** test
    ***** test2
    SQL>

  • How to Make u0091Contactu0092 Profile a required field in BP Maintenance?

    We are using "status" tab in the Tcode: /nBP- BP Maintenance and trying to do following two things:
    1.     Make ‘Contact’ filed as REQUIRED fields in BP Master in under ‘Status’ tab, and
    2.     Restrict one or more communication method(s) as ‘Disallowed’ while others remain Allowed. Here is the scenario: BP chooses NOT TO BE CALLED on Phone but agrees to receive Letters and/or Emails.
    We believe this would require development, but wonder if there are other options, or if anyone has done something similar and would be willing to share?
    Thanks in advance,
    Purush Chitkara

    Hi,
    Sort Key can be made as mandatory through SPRO settings.
    SPRO > Financial Accounting New > Accounts receivable and accounts payable > vendor accounts > Master Data > Preparations for creating vendor master data > Define Account groups with screen layout > Double click on your account group > Double Click on company code data > Double clcik on account management  > Make the field sort key as required entry.
    Regards,
    Prabu

  • How to make Plant as an optional field in ME21N

    Dear Experts,
    Is it possible to make plant as an optional field while creating a PO(me21n)? If so then please suggest the T-code and procedure.
    Thanks and Regards,
    Manish

    Dear All,
    I completely agree to all of you that Plant is mandatory, but since I am procuring with reference to WBS element, plant is already picked up. I am trying to avoid the error of assigning 2 plants to same PO.
    Please advise,
    Thanks and Regards,
    Manish

  • How to Make one of 2 Selection Fields Obligatory

    Hi All,
    On my seletion screen, i have about 5 select-option input fields. The thing is I want to make the 'article' (s_matnr) and the 'merchandise category' (s_matkl) fields obligatory. The way it should be is that one of them should be obligatory at a time not the 2 at the same time. And 1 of them must be filled they can't be run wide open.
    So in Summary, the user must either provide an input for either the ariticle or the merchandize category, not the 2 at the same time and not neither.
    Thanks.

    hi basil
    how you did

  • WRT54GC How to make more port range forwarding fields?

    Hello I only have 15 port forwarding fields to enter all my programs and it is not enough since I have two pcs accessing the router getting two different ips for each one. Each aplicattion needs two forwards one for 192.168.1.100 the other for 192.168.1.101. How can I add more fields? thanks a lot

    hi , this is a product limitation that you cannot add more than 15 entries.....what you can try though , is to "trigger" the ports instead of forwarding them....triggering does not require you to specify an IP address....the port will open for whichever PC makes the request from within the network...

  • How to make a component as readonly dynamically....

    Hi,
    I have a requirement and working on it since long time... I want to make a component readonly at runtime...
    I have to take a value(true/false) from message bundle and based on that value, I have to create a component as readonly or not...
    How to do this....
    I tried to do like below...
    <h:inputText style="width:170px;" value="#{bean.firstName}" readonly="#{msg.readOnlyFirstName}"></h:inputText>
    but it is giving exception like this...
    org.apache.jasper.JasperException: Could not get property readonly of component
    Please help me on this...
    thanks in advance..

    Hi,
    I think i should give answer to your question in two folds,
    #1) Dont use the properties files for such opeation(enable and diaplbe of component), and if you wnat to use this then you need to do it via backing bean. What you have to do is, you can declare a property in backing bean of that page whcih will tell rendered about the enabling/disabling the particular component. To set the property delclared in backing bean read the property file and then set it to true or false based on your need.
    #2) Use backing bean directly by omitting the property file from picture.
    By taking a look at your exception it seems that the something is wrong with readonly attribute, can u post complete exception.
    --Surya
    thoughts can change everything
    null

  • How to make a validation for a field?

    Is any possible to make input value
    validation for a field?
    E.g. Force the user enter ItemCode in a
    correct format with proper prefix XX-BB-.... .
    If SDK is a only solution, how to do it?
    Regards,
    Kenneth

    You can't realy do it with out sdk. You could always try to right a query that will clear the code when it isn't in the correct format. then if they press add it will give an error cause there is no item code. But you'll struggle to get this right and it won't be full proof.
    In sdk in your item event you'll test if the specific edit box lost focus and before the action, if that is true then check the value. If it is not correct then bubble the event and give an error. when you bubble the event it won't do the action they wanted to do.
    Hope this helps.

  • How to make the text of the field to mixed case of the transaction COMMPR01

    Hi,
    There is a text description field in the COMMPR01 for a product.
    Now when i entered any text into the field, it is changed to UPPER CASE.But i want that when i enter any text , it will save the text as it is that means in both upper case and lower case.
    Suppose i entered a text as  Dummy Text, then when i save this product this text should display as Dummy Text.It should not display as DUMMY TEXT.
    Please suggest me how to do this .
    Thanks and Regards,
    Sudhansu

    I just verified and the Description for Products (and possibly other objects too) are stored in table COMM_PRSHTEXT.
    The relevant Data element is COMT_PRSHTEXTX which has the domain PRSHTEXT40.
    If you look at this domain you have a parameter "lowercase" which is available as a flag option.
    <u><b>The explanation about this Flag is the following:</b></u>
    Lowercase letters allowed/not allowed
    If this flag is set, upper case and lower case are distinguished when you enter values with screen masks.
    Otherwise all the letters entered will be converted to upper case when you enter values with a screen mask.
    This mechansim is in effect for all the fields referring to this domain.
    <b>Solution would be</b> to verify if for this data-element the same Domain is used.
    If yes, you can flag this option in the domain.
    this should solve your problem.
    kind regards
    davy pelssers
    please reward if helpful.

  • How to make a lov value readonly on click of other lov on seeded OAF page

    Hi all,
    I have a requirement to make some lov value of "currency" readonly on click of other LOV payment template.
    I tried to extend controller of page to check lov event of payment template if it is clicked the other LOV becomes readonly . Here is my code(not working...)
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    if (oapagecontext.isLovEvent())
    String lovInputSourceId = oapagecontext.getParameter("PaymentTemplate");
    Hashtable lovResults =
    oapagecontext.getLovResultsFromSession(lovInputSourceId);
    if (lovResults!=null)
    OAMessageLovInputBean msglovbean= (OAMessageLovInputBean)oawebbean.findIndexedChildRecursive("currency");
    msglovbean.setReadOnly(true);
    Please help....thx

    Hey Sunil,
    sims wrote:
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    if (lovResults!=null)
    OAMessageLovInputBean msglovbean= (OAMessageLovInputBean)oawebbean.findIndexedChildRecursive("currency");
    msglovbean.setReadOnly(true);---We cant change the webBean properties in ProcessFormRequest.
    ---Use SPEL and PPR
    or --Try below
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    if("Lov1".equals(pageContext.getParameter(SOURCE_PARAM)) &&
    "lovValidate".equals(pageContext.getParameter(EVENT_PARAM))
    && "lovUpdate".equals(pageContext.getParameter(EVENT_PARAM)))
    pageContext.putSessionValue("Flag", Flag);
    pageContext.forwardImmediatelyToCurrentPage(null,
    false,
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    if(pageContext.getSessionValue("Flag") != null)
    OAMessageLovInputBean msglovbean= (OAMessageLovInputBean)oawebbean.findIndexedChildRecursive("currency");
    msglovbean.setReadOnly(true);}
    Regards
    Meher Irk
    Edited by: Meher Irk on Dec 2, 2010 6:17 PM

  • How to make Acrobat Pro 7 form fields same size

    I can manually enter form fields in my version of Acrobat Pro 7 but I have to hand draw them.  is there a good way to make them all the same height?  I know that if I copy the form field that I draw, it will link itself to whatever form field I copied it from.
    TIA

    The best way is to copy & paste the fields, and then rename them so that
    they are no longer "linked".
    If you have many such fields to rename, you might want to consider this
    tool, developed by me:
    http://try67.blogspot.com/2010/10/acrobat-convert-duplicated-fields-to.html

Maybe you are looking for

  • Temporarily offline for maintenance.

    DW8, XP, check in, check out enabled. Customer updated the site from her local files. I downloaded everything to update my files. I updated the library item which is on each template page. Made changes to each template page. Updated the site, library

  • Inserting Selection Criteria in Query Output

    Hello guys How can I insert a "Selection Criteria" for a query in its output. The final outcome should be: 1. The user runs the query. 2.The Selection Criteria pops up. The user enter the values. Then executes the query. 3. The query is displayed: a.

  • Read URL Parameters programmatically

    Hi I wish to read the URL parameters in the WDDOINIT method of the component controller before the default plug is hit on the entry window and therefore the parameters are passed into the method automatically. Is there a way this can be done programa

  • Why is the wifi working on my mac but not on my other devices?

    The mac i have is connected to the wifi and is working just fine, but my other 5 devices are not working with the wifi network that i have with the AirPort and my TimeCapsule. they were working fine the other day and just stared to act up... i alread

  • Why does my iTunes hang every time when using automatic device detect?

    Why does my iTunes hang every time that I connect either of my devices (iTouch-4th Gen, iPod Nano-5th Gen), to my Win 7 (64-bit) PC desktop?  By the way, this does not happen if I open iTunes first, and then connect the device.  So my workaround was