Forcing Case Conversion in Databound Components

Has anyone found a good way for forcing case conversion of input data in a data-bound text field?
I am trying to figure out how to force conversion of input data to upper case without having to create a validator and throwing an error when the user uses lower case.
Thanks

Unfortunately, using UPPER() in the rowset query is not possible when the rowset is updatable.
To solve the problem, I ended up writing a very simple custom converter which converts the entered text to uppercase. Code follows:
* UpperCaseConverter.java
* Created on July 26, 2005, 8:18 AM
package cms.jsf.common;
import javax.faces.component.*;
import javax.faces.context.*;
import javax.faces.convert.*;
import java.text.*;
import javax.faces.application.*;
* @author julianray
public class UpperCaseConverter implements Converter {
protected static final String NULL_FORMAT = "";
/** Creates a new instance of PhoneNumberConverter */
public UpperCaseConverter() {
public Object getAsObject(FacesContext facesContext, UIComponent uIComponent, String str) throws ConverterException {
if ((str == null) || (str.length() == 0)) {
return NULL_FORMAT;
return str.toUpperCase();
public String getAsString(FacesContext facesContext, UIComponent uIComponent, Object obj) throws ConverterException {
     if (obj == null) {
return NULL_FORMAT;
     // make sure that we can cast the input type to a string
     try {
String str = (String) obj;
return str.toUpperCase();
} catch (ClassCastException e) {
     //FacesMessage errMsg = MessageFactory.getMessage(1, (new Object[] {obj, str}));
throw new ConverterException("Error converting input value to String.");
}

Similar Messages

  • Upper/Lower case conversion

    Hi folks,
    Apart from the Infoobject General tab where an infoobject can be selected to allow Lower case letters, are there any other areas where this can be done? We need to allow this for a standard infoobject and thinking is that we can change this at some other level such as do a conversion at the datasource level so only uppper cases flow through. This is a char field but can contain both Upper cases and Lower cases. Right now, with the standard infoobject the DTP load fails when trying to load the data with lower case characters.
    Thanks for your help.

    Hi,
    As mentioned above you will have to use TRANSLATE command to do the conversion. Now you can either write a routine at Infoobject level or write a field routine for conversion. In case of infoobject routine again you might have to change the original infoobject so I would suggest you to go for Field level routine in transformation.
    RESULT = source_fields-XYZ.
    TRANSLATE RESULT TO UPPER CASE.
    Regards,
    Durgesh.

  • Upper and lower case conversion

    Hi,
    I need small help on conversions.
    I need to convert the data in database tables to lower case.
    Like i need to pick some data from a database table. The data stored in the database table is in uppercase. Here i need to convert the data to lowercase through the select statement. Is there any way to do this.
    Regards,
    Ram

    Hi ram,
    1. in r/3,
       working with upper/lower case,
       with database tables, is very tricky.
    <b>(SIMPLY USING SQL WILL NOT
    FETCH BOTH KIND OF DATA - UPPERCASE/lowercase/MIXED)</b>
    2. For your requirement,
    3.
      a) just get ALL data from vendor master
         (without any filteration of name)
          in ITAB
      b) LOOP AT ITAB.
         IF ITAB-VENDORNAME CS 'GOOD'.
         ELSE.
         DELETE ITAB.
         ENDLOOP.
    4. After the step (b),
      <b> itab will contain only GOOD vendors. 
      (irrespective of capital / lowercase) / mixedCASE</b>
    regards,
    amit m.

  • Case conversion for SQL and PL/SQL reserved key words

    Hi!
    Do we have available in Developer automatic conversion of the reserved words to upper cases?
    For example in vim, it is possible to customize such way that after typing a reserved word : 'create' as am example and I type next a space it automatically converts it to upper case: 'CREATE'
    Thanks,
    Radu

    You can do it afterwards with Format (CTRL-F7), but that will rearrange everything in your worksheet.
    Also using code completion, the reserved words are always lower case. This is very disturbing, as I have to fix the case afterwards and lose more time than I initially won using the code completion.
    I recon the case should be converted automatically upon typing, using the settings from the formatter.
    In case development doesn't agree right away, I've added a feature request: http://htmldb.oracle.com/pls/otn/f?p=42626:39:1041303283166847::NO::P39_ID:10621
    Please go vote to add weight to see it implemented.
    Thanks,
    K.

  • Case conversion problem

    Hai experts,
    I am doing an File to HTTP scenario.
    In the receiver configuration of HTTP communication channel there is an option to add additional header fields.Any value you can give there.
    it contains two columns
    Headerfields
    Name      :     Value
    My problem is that although i enter the values as below
    Name                   :     Value
    FROM                  :    ASTUL
    NOTIFICATION TO :   MANTUL
    when this reaches the target
    i get
    from:ASTUL
    notification to:MANTUL
    I want this to be in the format as i sent .That is i want that to be
    FROM      :ASTUL
    NOTIFICATION TO:MANTUL
    or atleast
    From     :ASTUL
    Notification To:MANTUL.
    Can any body help me in this regard

    Hai Prateek,
        It is rellay required.
    As i said  i want atleast the first letter of Notification that is 'N' to be in uppercase.I tried a different option.
    I sent the following way
    Name : Value
    FROM : ASTUL
                NOTIFICATION TO : MANTUL
    that is I am sending the NOTIFICATION TO:MANTUL inside the Value part of header field
    when this reaches the target
    i get
    from:ASTUL
           :NOTIFICATION TO : MANTUL
    As you can see an additional :(colon) is coming which is not the expected format.can you help me out to remove the colon atleast.Can somebody help me out?

  • Choosing profiles for forced RGB to CMYK color conversion

    When a mixed RGB/CMYK PDF is opened in Illustrator CS6, Illustrator forces a conversion to one color space or the other. See this screenshot: http://imgur.com/sK8iEdn
    I assume this is a limitation of Illustrator and there's no way to keep both color spaces. Under that assumption, Is it possible to choose the profiles used for the conversion from RGB to CMYK? Can Illustrator be made to use the RGB and CMYK profiles defined in its Color Settings to make this conversion?

    I did some experiments with Illustrator CS6 and the MacBeth RGB test chart and verified my results with Photoshop CS6. I discovered Illustrator is (mostly) doing what it should be doing, within a 1% error (probably rounding) on the output CMYK values. Here's a summary, in case anyone else needs this info:
    Assuming the source file's elements are all untagged, when a mixed RGB/CMYK PDF is opened in Illustrator and CMYK mode is
    chosen, Illustrator will use the profiles and rendering intent defined in
    Color Settings to make the color conversions from RGB to CMYK. Thus, we
    have control over the profiles used for this conversion.
    If the RGB elements in the PDF file have embedded ICC profiles,
    Illustrator will use the embedded ICC profile instead of the RGB profile
    defined in Color Settings. This ONLY happens, however, if the PDF file
    also includes the correct CMYK output intent profile.
    If the PDF doesn't contain a CMYK output intent, Illustrator will fall
    back on the Color Settings RGB profile for RGB->CMYK conversion. I believe it
    would be more correct for Illustrator to use the embedded RGB profile and
    the CMYK profile defined in Color Settings, but that's not how it seems to work.
    If the PDF contains the incorrect CMYK output intent, Illustrator will
    ignore the Color Settings and respect the embedded RGB and CMYK profiles
    for the conversion, as might be expected.

  • Case sensitive Tab/Col Names

    Hi every one,
    I'm having a problem with my Mixed case Table names and column names,when my precompiled application try to query those tables.
    I have Table names like "ImmunTypeFollowUp" in Uper and Lower case letters. In my application I have Table names in Uper and Lower case letters "ImmuntypeFollowup". Now my querys are not working because
    "ImmunTypeFollowUp" != "ImmuntypeFollowup"
    But if I change the table name to "IMMUNTYPEFOLLOWUP" it works.
    "IMMUNTYPEFOLLOWUP" == "ImmuntypeFollowup"
    So is there any server side parameter to force even my table names are in diferent cases, consider them as UPPER case.
    Any help will save droping/recreating my entire DB.
    Thanks.
    Nandana
    null

    By default, Oracle will create the names/columns of objects in upper case (provided the name/components of the object are not in mixed case and quoted). For example: CREATE TABLE "MiXeD_Up_TbL"... will create the table MiXeD_Up_TbL, and the statement CREATE TABLE MiXeD_Up_Tbl... will create the table MIXED_UP_TBL.
    There is no setting I'm aware of to turn this off - generally it's not a problem. If you plan to migrate your product to another database, it would probably be better to follow the Oracle "standard" of all upper-cased object names.
    Instead of dropping the database, determine what the real name of the tables/columns are : SELECT TABLE_NAME FROM ALL TABLES... or SELECT TABLE_NAME, COLUMN_NAME FROM ALL_TAB_COLUMNS... I suspect all the tables and columns as created on the database (under the schema your queries run under) are all upper case. Change the code to look for upper case names by either coding them that way or using UPPER(TABLE_NAME) = UPPER(&table_var_name) in your queries. NOTE: This may bypass index usage depending on what your objects/indexes look like.
    Hope this helps.
    null

  • Conversion of Legacy AR,AP and GL to 11i.10

    Hi,
    I am looking for some help on conversion of legacy AP/AR/GL to Oracle APPS.
    I am aware of the API's interfaces that each module has for import.
    My questions :
    1. Are there any tools to estimate the required effort ?
    2. Are there any white papers/presentations/experience that people can share ?
    3. What are the critical things that we need to keep in mind.
    4. Are the steps need to be perfomed in a sequence i.e GL first and then AP/AR
    or other way around ?
    Thanks

    Hi,
    As per my knowlwdge there are no such tools to help you estimate the effort required to setup Oracle Apps from a legacy system.
    You first need to understand the As-is business process and see how much can be handled by standard Oracle, else you may need to initiate some Process change if there are some bad practices or customize Oracle Apps to cater to the business needs. (in my experience almost all companies have some peculiarities when it comes to the way of doing their business).
    Also, you need to identify how many RICE (Reports, Interfaces, Conversions and Extensions) components need to be developed. Define each of these RICE components into Simple, Medium and Complex effort wise by utilising the services of an experienced consultant and identify the effort it would take to complete. Once you have the rough effort estimate you can know the development effort. Assuming you have the legacy data in some system, migrating the data to Oracle will be a major effort.
    If the organisation already has AP/AR/GL systems in place, you can implement all the three in Oracle. You need to setup GL first and then AP and AR, as you first need to define your chart of accounts, calendar, currency, Set of Books, etc in GL.
    Regds,
    Krishanu
    http://krishanu.blogspot.com

  • Update column data to Upper Case in parent and child table

    Hi ,
    I am facing issue while updating column value to upper case in parent table and child table. How can i do that ?
    when updating parent row:
    ORA-02292: integrity constraint (XXXXXXXXXXXXXX_FK) violated - child record found
    When updatng corresponding child row:
    ORA-02291: integrity constraint (XXXXXXXXXXXXXXXX_FK) violated - parent key not found
    how can i update on both the places ?
    Regards,
    AA

    I am facing issue while updating column value to upper case in parent table and child table. How can i do that ?
    Why do you need to do that?
    That is just ONE of several questions you should answer before you start modifying your data.
    1. What is your 4 digit Oracle version? (result of SELECT * FROM V$VERSION)
    2. If both values are the same case what difference does it make what that case is?hen you don't need to alter your original data.
    3. What is the source of the column values you are using now? If you change your data to upper case it will no longer be identical to the source data.
    4. What is your plan for enforcing future values to be stored in UPPER case? Are you going to use a trigger? Have you written and tested such a trigger to see if it will even work the way you expect?
    5. Why aren't you using a surrogate key instead of a 'business' data item? You have just demonstrated one reason why surrogate keys can be useful: their actual value is NOT important.
    You should reexamine your problem and architecture and consider other alternatives.
    One alternative is to add a new 'surrogate key' column to use as the primary key. Just create a new sequence and use a trigger to populate the new column. Your current plans will require a trigger to perform the case conversion so instead of the just use the trigger to provide the value.
    If the change is being done to facilitate searching you could just add a VIRTUAL column UPPER_MY_COLUMN and index that instead. Then you could search on that new virtual column and the data values would still be identical to the original data source.

  • High Availability Test Cases for ECC6.0, PI 7.0, BI 7.0???

    Dear All
    I am in a pretty difficult situation here. I have to write test cases for the components in the High Availability environment. We are running AIX 5L with HACMP/XD clusters ACTIVE/PASSIVE setting. The following components are in the landscape, ECC6.0, PI 7.0 BI 7.0 cFolders 4.0 Portal 7.0 SLD 2004s and Solman 4.0. I have to write test cases for the above components especially ECC, PI BI and cFolders in the HA environment as to
       1.<b>WHAT WILL BE THE EFFECT ON OTHER COMPONENTS IF ECC</b> <b>FAILOVER  and so on for PI and BI</b>,
       2. How do I check the consistency of the system after a failover, since the time for a failover will be anywhere between 3 - 4 mins.
    Can anyone pls give me a 5 or 6  checks like
    Checking RFC connections
    ABAP dumps
    Consistency check (txn: SICK)   and so on
    In the test cases I have to make sure that after a failover the system is up and ready to perform the activities that it was able to before the Failover......
    Will appreciate any suggestions and will definitely reward points for any helpful answers....Thanks in advance.

    Hi Shailesh,
    If you want you can activate SCM_SNC_GEN_1 depending upon business needs or configuration.
    As per my understanding there is no need to activate any business function but if you need additional feature of SNC to be used then refer below help link for more details:
    http://help.sap.com/saphelp_SNC700_ehp01/helpdata/en/a2/6d67d9b60149cb887acf72ae0b90ac/frameset.htm
    In ECC you are going for EPh5 which means no need to activate any additional business function(Normally SNC needs EPh4 only for some the latest feature to be use like in workorder collaboration ManufacturingWorkOrderInformation and ManufacturingWorkOrderProductionProgressNotification XML are used if ECC is with EPh4)
    Regards,
    Nikhil

  • CASE in Stored Procedure Not Working

    Why is this not working?
    SET NOCOUNT ON;
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
    SELECT
    dbo.Components.*,
    CASE ISNULL(dbo.Components.MarkupPrice,0)
    WHEN 0 THEN dbo.Components.Quantity * dbo.Components.UnitCost.
    ELSE dbo.Components.Quantity * dbo.Components.MarkupPrice END AS ExtCost,
    FROM ...
    Error Message
    Msg 156, Level 15, State 1, Procedure procGetReportSpecBook, Line 64
    Incorrect syntax near the keyword 'ELSE'.
    Thanks!

    Please try below instead of THE case when in Your code:
    Case when ISNULL(dbo.components.markupprice,0)= 0
    THEN dbo.components.quantity*dbo.components.unitcost
    Else dbo.components.quantity*dbo.components.markupprice
    End as ExtCost
    OR
    Case when COALESCE(dbo.components.markupprice,0)= 0
    THEN dbo.components.quantity*dbo.components.unitcost
    Else dbo.components.quantity*dbo.components.markupprice
    End as ExtCost
    OR
    Case when dbo.components.markupprice IS NULL
    THEN dbo.components.quantity*dbo.components.unitcost
    Else dbo.components.quantity*dbo.components.markupprice
    End as ExtCost
    Regards, Reshma
    Please Vote as Helpful if an answer is helpful and/or Please mark Proposed as Answer or Mark As Answer when question is answered

  • Case sensitive data in workflow

    I am working with some case sensitive data in a work flow. To set and get the values from the container, I am using the macros swc_set_element and swc_get_element.
    I realized that these macros automatically convert the case of the data I am passing to upper case. I don't want the case conversion to happen, and want to retain the original case of the data (which is a mix of upper and lower case).
    Can somebody suggest an approach to handle the same?? Its kinda urgent.
    Thanks,
    Srihari

    Hi,
      The data is generally converted to Uppercase if the Domain of the data you are using is not marked as case sensitive. You can set the "Lowercase" check box for the respective domains so that data is maintained in a case sensitive manner. May be you can copy the code of these macro's and change them to use your own case sensitive domains.
    Regards,
    Sesh
    Message was edited by:
            Seshatalpasai Madala

  • UoM Conversion in Bex Query

    Hi All,
    I am using UOM (ZUOM) conversion variable in the keyfigures.
    If i execute my selection screen i have a Select UoM field (ZUOM) for selection. The Keyfigure values are created in Litres L. If i select Tonne (TO) and execute the report the KF1 and Kf2 value is L getting converted to TO but i have created a formula ( KF1 + KF2) in that case conversion is not working i am still getting the original values i.e L.
    for example
    KF1 KF2  (KF1+KF2)
    10L  20L  30L
    In selection screen i entered Tonne (TO) in UoM the below values are displayed
    KF1   KF2  (KF1+KF2)
    5TO  10TO  30          
    the ouput should be 15 not 30.
    Please help me out in resolving the same.
    Thanks in Advance.

    Create a RKF1 with conversion
    Create RKF2 with conversion
    Create CKF = RKF1 / RKF2 with conversion
    have u tried this way?
    Thanks,
    Krishnan

  • Rounding components in planned orders

    Looking for a solution for this issue:
    We produce semifinished goods which can be components for several finished goods. The semis are produced in case quantities, and are only handled in case quantities. The BOMs for the finished goods are set up in each.
    Since MRP adds up all the requirements coming from finished goods BOMs first, we run into shortages all the time.
    For example, say our semifinished good is produce in case quantities of 200 (which, again, can not be split up).
    Now we have the following FG requiring the following quantities:
    A - 2500
    B - 1300
    C - 700
    So MRP adds them up to 4500, adds 100 to tell us to produce 23 cases.
    We do that, and now distribute them to the various FG. A gets 13 cases, B gets 7 cases, and C needs 4 but OMG only 3 are left!
    There must be a way to fix that one, so we get exactly the number of cases that we need. Is there a way to configure BOMs or planned orders to round up to full case quantities for their components?
    Any help is appreciated.

    Thanks again for your replies.
    Well in that case, maybe you would have to re-look at the way your BOM is structured. Keep the qty in multiples of the lot size, thereby preventing a rounding off at each requirement. As even the lot size EX totals up the day's requirement in MTS scenario.
    I played around with that, and could not get it to work. I set up the BOM with the production unit (tray) and increased the base quantity accordingly. However, the finished goods don't appear as multiples of plug tray quantities, so in the end it doesn't matter how I set up the BOM. I can not affect the FG quantities, they are rounded according to their own case size.
    The other alternative which i can think off is to use user-exit during MRP run, but that would not be advisable as your MRP run will become very very complex then.
    Yeah, I don't want to go there. I wish this whole MRP thing would be a bit more flexible, and better accommodate some of the requirements for perishables.

  • Use of Conversion Agent

    Hi Guys can any one give me a brief overview of conversion agent by SAP for EDI interfacing....
    Detailed workflow is appreciated.

    hi
    check the below blogs
    CONVERSION AGENT                                                  
    TO IMPLEMENT CUSTOMIZING CONVERSION IN XI                                                  
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10a2d61b-098d-2910-7d9e-ea14af4d01eb                                                  
    How to get started using Conversion Agent from Itemfield                                                  
    How to get started using Conversion Agent from Itemfield                                                  
    Conversion Agent - Silence of the RepeatingGroup (Part 1)                                                  
    Conversion Agent - Silence of the RepeatingGroup (Part 1)                                                  
    Conversion Agent - Silence of the RepeatingGroup (Part 2)                                                  
    Conversion Agent - Silence of the RepeatingGroup (Part 2)                                                  
    Mr. (Conversion) Agent in 'Mark the Marker' Case                                                  
    Mr. (Conversion) Agent in 'Mark the Marker' Case                                                  
    Conversion Agent a Free Lunch?                                                  
    Conversion Agent a Free Lunch?                                                  
    More on the SAP Conversion Agent by Itemfield                                                  
    More on the SAP Conversion Agent by Itemfield                                                  
    You Can Use (Semi-) (Non-) Structured Data in SAP NetWeaver                                                  
    You Can Use (Semi-) (Non-) Structured Data in SAP NetWeaver                                                  
    Integrate SAP Conversion Agent by Itemfield with SAP XI                                                  
    Integrate SAP Conversion Agent by Itemfield with SAP XI                                                  
    News around SAP Conversion Agent                                                  
    News around SAP Conversion Agent                                                  
    regards
    kummari

Maybe you are looking for