How to cast a fieldinput value to upper case.

Im not a java programer I guess that this must be a silly thing.
Im searching data in R/3 from 2 fields 1 numeric and the other alphanumeric. This alphanumeric fields if I put it in upper case works, if I wirte it in lower case doesnt works.
In R/3 when I test the FM doesnt matter if I put it lower or upper case, it works fine.
so I wanna know how can I in WD cast the value that I put in that fieldinput be converted to upper case when I hit the search button.
Thx

> Im not a java programer I guess that this must be a
> silly thing.
>
> Im searching data in R/3 from 2 fields 1 numeric and
> the other alphanumeric. This alphanumeric fields if I
> put it in upper case works, if I wirte it in lower
> case doesnt works.
>
> In R/3 when I test the FM doesnt matter if I put it
> lower or upper case, it works fine.
>
> so I wanna know how can I in WD cast the value that I
> put in that fieldinput be converted to upper case
> when I hit the search button.
>
> Thx
Hi,
When you test the FM in SE37 in R3 there is an option at the top of the screen Called Uppercase/Lowercase - this controls whether the input is automatically converted to upper case for alphanumeric fields.
The other option you have, if it is a custom FM, is to translate the input of the alphanumeric fields in the ABAP - it is quite common to have to translate or convert input data to make sure it is in the same format as the backend system.
I prefer to do this sort of conversion on the backend system as usually you have a better guarentee that it will be in the correct format, than if you do it in the Java element.
Just my opinion,
Gareth.

Similar Messages

  • Ho to convert to lower case values and upper case

    hi
    pls let me know how to convert the varlues to lower case
    and how to conver values to uppoer case
    whichis funtion module to do so?
    regards
    Arora

    Hi,
    <b>TRANSLATE</b>
    Converts characters to strings.
    Syntax
    TRANSLATE <c>  TO UPPER|LOWER CASE
                  |USING <r>.
    The characters of the string <c> are converted into upper- or lowercase, or according to a substitution rule specified in <r>.

  • Changing field value to upper case

    I am using EditCurrentRecord. How do I convert the value that the user enters to uppercase?
    There is a setOnChange() method in HTMLInputElement. But how do I get HTMLInputElement from HTMLFieldRenderer in EditCurrentRecord?
    Thanks in advance.
    Stephen

    One central way to solve this problem is to add a method in the Entity Object attribute setter like this:
    public void setYourAttributeName( String value ) {
      // If non-null, uppercase the value before setting it.
      if (value != null) value = value.toUpperCase();
      setAttributeInternal(....);
    }Then, regardless of client, the value will be forced to uppercase.

  • How can I define that the value of a column should always be in UPPER case

    Hi,
    I want to make sure that the value in a column is always in UPPER case.
    Can we give this condition while creating or altering a table.
    A trigger can do it easily, but I was wondering if we could define a column to have values with upper case all the time, independent of what values are inserted. I mean if we give a lower case value in the insert statement, it should be converted automatically to upper case & stored.
    I want something like
    Alter table MY_TABLE Modify ( col1_upper varchar2(25) default UPPER(Col1_upper));
    But the above statement does not work as it references the col of the table.
    Thanks
    Sunil

    Well, you can put a check constraint on to prevent someone from putting lowercase data in:
    alter table my_table add constraint my_table_check_upper check (col1_upper = upper(col1_upper));However, I know of no way to modify the data being inserted/updated in a table without a trigger.
    Richard

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

  • Zero Fill and Upper Case in Visual Composer not working

    Hello,
    I am building my first VC application and hit a small wall from get go. When I create input fields and set text formats for one to have "Zero Fill" and for the other one "Upper Case" they do not seem to work properly.
    “Zero Fill” does not work at all. I set this format and also set max length as 10 to be used as input for customer account #. But it does not perform conversion. When I call a BAPI to get customer list, if I enter 0000000100 it works. When I enter 100 it does not work. Thus "Zero Fill" does not take effect.
    "Upper case" works but only after refresh. If I enter ac10 as company code and then click submit it does not work. However if after entering ac10 I press enter and then submit, it work.
    Does anyone have any info on how to deal with this? We are using VC 7.0
    Thanks,
    Alex

    Hi ALex,
    Now I got your problem. I suggest a solution for it.
    Go to the design board of VC.
    I think you have an Input Form that contains the input fields and the Submit button. There will be a link named "submit"between the Input Form & the Data Service(say BAPI). Click on the  submit link, you will get the Input Fields & Assigned values of the Input Form at the bottom right side. Go to the Assigned Value of the particular field & apply a formula like UPPER(@inputfield). So now whatever case you give in the inputfield, it is converted to UPPER case before Submiting the values.Keep the Upper Case option checked at the formatting tab of the Input field properties, this will help to display the value in Upper case.
    For eg, BAPI_BANK_GETLIST, the input fields are BANK_CTRY & MAX_ROWS.
    Make the assigned value of bank_ctry as UPPER(@BANK_CTRY), you can get this with the help of formula. 
    This will solve your problem.
    Regards,
    Shemim

  • Special character not being converted to upper case

    Hi all,
    I have an issue with special characters and upper/lower case.
    The character "ü" is in one of the values of an InfoObject and when loading we get an error message for this value. The character "Ü" is in RSKC, but still we are getting an error when loading.
    We are converting the values to upper case in the transfer rules, but this special character is not being converted to upper case...
    We start with the value "Heüringen" and after conversion we have the value "HEüRINGEN" where we want to have "HEÜRINGEN".
    Do you have any idea why this characer is not being converted?
    Any ideas are welcome!
    Best regards,
    TMV

    Hi Praveen,
    What does this module actually do? What kind of characters will the special chars be replaced with?
    Br,
    TMV

  • Change string to all upper case...

    How can I make a string all upper case?
    Thanks

    var str : String = "ToUpperCase" ;
    trace( str.toUpperCase() ) ; // TOUPPERCASE
    is that what you want ?????

  • How to write Lower case value to the upper case value in SMARTFORMS

    How to change the from lower case to Upper case in SMARTFORMS
    Ex. india to INDIA

    hi,
    chk this.
    DATA: T(10) VALUE 'AbCdEfGhIj',
    STRING LIKE T,
    RULE(20) VALUE 'AxbXCydYEzfZ'.
    STRING = T.
    WRITE STRING.
    TRANSLATE STRING TO UPPER CASE.
    WRITE / STRING.
    STRING = T.
    TRANSLATE STRING TO LOWER CASE.
    WRITE / STRING.
    STRING = T.
    TRANSLATE STRING USING RULE.
    WRITE / STRING.
    Output:
    AbCdEfGhIj
    ABCDEFGHIJ
    abcdefghij
    xXyYzZGhIj
    reward points if useful...
    -Umesh

  • How can I return multiple values with PL/SQL Web Services

    Hi,
    I'm new to developping Web Services. I'm doing some tests with JDeveloper and OC4J on my local machine with a Web Services based on a PL/SQL function within a package. Right now that function only returns one value. So the xml response only has one output.
    I'd like to know how can I return multiple values with my PL/SQL Web Service. For example, if I want to return an employee's name and id? And that the xml contains two output : <employee>, <empid>?
    Reginald
    ps : I have searched the forum and I couldn't find an answer to this question, if that has been discussed AND answered before, can you please post the link? Thanks

    Alright, I actually found my answer. Since this was asked I think as a followup somewhere else I'll give my answer.
    It is very simple, all you have to do is create an Object Type and then Return that object type. After that, JDeveloper will take care of everything and you will have an xml response with multiple values. Here
    {color:#ff0000}
    create or replace TYPE person AS OBJECT
    ( id_interv number,
    first_name VARCHAR2(50),
    last_name VARCHAR2(50),
    date_birth date
    );{color}
    Then your function used in your Web Service should look something like this :
    {color:#ff0000}
    function info_emp (p_empno IN VARCHAR2) RETURN person AS
    l_emp person := person(-1,'','','');
    BEGIN
    SELECT first_name
    ,last_name
    ,emp_no
    INTO l_emp.first_name
    ,l_emp.last_name
    ,l_emp.emp_no
    FROM emp
    WHERE upper(emp_no) = upper (emp_no);
    {color}
    {color:#ff0000}
    RETURN l_emp;
    EXCEPTION WHEN NO_DATA_FOUND THEN
    l_emp := person (-1,'n/a','n/a','n/a');
    RETURN l_emp ;
    END info_emp;{color}
    {color:#ff0000}{color:#000000}After that, this is what the xml response looks like :{color}{color}
    &lt;first_name xsi:type="xsd:string"&gt;John&lt;/first_name&gt;
    &lt;last_name xsi:type="xsd:string"&gt;Doe&lt;/last_name&gt;
    &lt;emp_no xsi:type="xsd:string"&gt;0250193&lt;/emp_no&gt;

  • How do you assign multiple values to a single element in an array?

    I'm probably not wording the question right.
    I have an array, let's call it M[], and for each element in the array (we'll say M[1]), I need assign three integers: row, col and value.
    I need to set it up so I can do something like this:
    A.row = M[i].col;
    A[i].col = M[i].row;
    A[i].value = M[i].value;
    The algorithm isn't what I need help with, it's assigning .col, .row and .value to an index of an array.
    Please help if you can.

    You are right. You did not word your question perfectly, but I still think I get what you want.
    First of all: A single element in an array always has exactly one value. No more, no less.
    But that's not a problem. The element in an array is either of a primitive type (boolean, byte, char, short, int, long, float, double) or it's a reference (to a Object, String, MyClass, ...).
    You can simply write a class that holds your three values and create an array of that type:
    public class SomeData {
      public int row;
      public int col;
      public int value;
    // somewhere else:
    SomeData[] a = new SomeData[10];
    a[0] = new SomeData();
    a[0].row = 10;
    a[0].col = 5;
    a[0].value = 42;Note how you only assign a single value to the element (a[0]) itself. All other assignment actually go to fields of the object refered to by that element in the array.
    Also note that in Java types (such as classes, interfaces, ...) should start with a upper-case letter, while variables (local variables, members, parameters) and method names should start with a lower-case letter.
    Edit: I'm getting old ...

  • How can I set a value of column in SSIS by using Replace

    How can I set a value of a column in SSIS using a Replace in Derive columns. I have here NameCode and I need to Set = 1 Where NameCode like LIKE '____99____'
    eg. 1006993010... if 5th and 6th characters are 99
    Else 0
    Hope to hear from someone soon and I appreciate great help here.

    If NameCode column is integer then you have to cast it correctly to String.
    I am adding that to the expression provided by Rajen.
    SUBSTRING((DT_WSTR,20)ProductCode,5,2) == "99" ? 1 : 0
    -Vaibhav Chaudhari

  • How can I receive the value of a selected item in the backing bean

    I have a table in a jspx file.
    When I go to the detail page I want to do something with the value of the currentrow.
    I want do a calculaction of the value of ClbId.
    How can I receive the value of the selected ClbId in my backing bean
    <af:table value="#{bindings.Searchteamlist.collectionModel}"
    var="row" rows="#{bindings.Searchteamlist.rangeSize}"
    first="#{bindings.Searchteamlist.rangeStart}"
    emptyText="#{bindings.Searchteamlist.viewable ? 'No rows yet.' : 'Access Denied.'}"
    selectionState="#{bindings.Searchteamlist.collectionModel.selectedRow}"
    selectionListener="#{bindings.Searchteamlist.collectionModel.makeCurrent}"
    rendered="#{backing_FirstFlag_Club_Club.searchFirstTimeClub_Club_AdresAndereClubs == false}">
    <af:column sortProperty="Matricule" sortable="true"
    headerText="#{bindings.Searchteamlist.labels.Matricule}">
    <af:outputText value="#{row.Matricule}"/>
    </af:column>
    <af:column sortProperty="ClbId" sortable="true"
    headerText="#{bindings.Searchteamlist.labels.ClbId}">
    <af:outputText value="#{row.ClbId}">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.Searchteamlist.formats.ClbId}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="Nom" sortable="true"
    headerText="#{bindings.Searchteamlist.labels.Nom}">
    <af:outputText value="#{row.Nom}"/>
    </af:column>
    <f:facet name="selection">
    <af:tableSelectOne text="Select and">
    <af:commandButton text="Submit"
    action="club_AdresAndereClubsDetail">
    <af:setActionListener from="#{row}"
    to="#{processScope.row}"/>
    </af:commandButton>
    </af:tableSelectOne>
    </f:facet>
    </af:table>

    hi tde
    Using an Expression Language helper class like this one from Steve Muench ...
    http://radio.weblogs.com/0118231/stories/2006/12/18/sourceForMyFavoriteElHelperClass.html
    ... you could write something like this in your backing bean:
    Integer vClbId = (Integer)EL.get("#{row.ClbId}");(Make sure to cast it to the correct type.)
    success
    Jan Vervecken

  • How to cast vector to vector with out using loop. and how to override "operator =" of vector for this kind of condition.

    Hi All How to TypeCast in vector<>...  typedef  struct ...  to class... 
    //how to cast the vector to vector cast with out using loop
    // is there any way?
    //================ This is Type Definition for the class of ClsMytype=====================
    typedef struct tagClsMytype
    CString m_Name;
    int m_Index;
    double m_Value;
    } xClsMytype;
    //================ End of Type Definition for the class of ClsMytype=====================
    class ClsMytype : public CObject
    public:
    ClsMytype(); // Constructor
    virtual ~ClsMytype(); // Distructor
    ClsMytype(const ClsMytype &e);//Copy Constructor
    // =========================================
    DECLARE_SERIAL(ClsMytype)
    virtual void Serialize(CArchive& ar); /// Serialize
    ClsMytype& operator=( const ClsMytype &e); //= operator for class
    xClsMytype GetType(); // return the typedef struct of an object
    ClsMytype& operator=( const xClsMytype &e);// = operator to use typedef struct
    ClsMytype* operator->() { return this;};
    operator ClsMytype*() { return this; };
    //public veriable decleare
    public:
    CString m_Name;
    int m_Index;
    double m_Value;
    typedef struct tagClsMyTypeCollection
    vector <xClsMytype> m_t_Col;
    } xClsMyTypeCollection;
    class ClsMyTypeCollection : public CObject
    public:
    ClsMyTypeCollection(); // Constructor
    virtual ~ClsMyTypeCollection(); // Distructor
    ClsMyTypeCollection(const ClsMyTypeCollection &e);//Copy Constructor
    DECLARE_SERIAL(ClsMyTypeCollection)
    virtual void Serialize(CArchive& ar);
    xClsMyTypeCollection GetType();
    ClsMyTypeCollection& operator=( const xClsMyTypeCollection &e);
    ClsMyTypeCollection& operator=( const ClsMyTypeCollection &e); //= operator for class
    void Init(); // init all object
    CString ToString(); // to convert value to string for the display or message proposed
    ClsMyTypeCollection* operator->() { return this;}; // operator pointer to ->
    operator ClsMyTypeCollection*() {return this;};
    public:
    vector <ClsMytype> m_t_Col;
    //private veriable decleare
    private:
    //===================================================
    ClsMytype& ClsMytype::operator=( const xClsMytype &e )
    this->m_Name= e.m_Name;
    this->m_Index= e.m_Index;
    this->m_Value= e.m_Value;
    return (*this);
    //==========================Problem for the vector to vector cast
    ClsMyTypeCollection& ClsMyTypeCollection::operator=( const xClsMyTypeCollection &e )
    this->m_t_Col= (vector<ClsMytype>)e.m_t_Col; // how to cast
    return (*this);
    Thanks in Advance

    Hi Smirt
    You could do:
    ClsMyTypeCollection* operator->() {
    returnthis;};
    // operator pointer to ->
    operatorClsMyTypeCollection*()
    {returnthis;};
    public:
    vector<ClsMytype>
    m_t_Col;//??
    The last line with "vector<xClsMytype>
    m_t_Col;". It compiles but I doubt that is what you want.
    Regards
    Chong

  • How to cast back and use a retrieved Session Bean reference in a servlet?

    Please help!
    1. I invoke a Session Bean from a servlet :
    travelagent = home.create();
    2. I store the travelagent reference in the HTTP Session :
    session.setAttribute( "travelagent" , travelagent );------------------------------------------------------------------------------------------------------------------
    Now, in another servlet, I have to retrieve the reference to the EJB from the HTTPSession.
    I then have to use this reference to call a business method in the EJB Session Bean.
    I have tried two ways to retrieve the reference and cast it before calling the business method. I get errors in both forms of casting.
    The Values you will see below in the code:
    EJB Remote Interface : TravelAgent (TravelAgent.java)
    Business Method : listItineraries( )
    Servlet which calls the above method : ListItinerary.java
    Line 46 of ListItinerary.java : ArrayList itineraries = traveler.listItineraries();------------------------------------------------------------------------------------------------------------------
    The two ways along with the error I get on the servlet page in the browser are :
    (A)
    TravelAgent traveler = (TravelAgent)session.getAttribute("travelagent");The error I get is :
    java.rmi.NoSuchObjectException: CORBA OBJECT_NOT_EXIST 9998 Maybe; nested exception is:
         org.omg.CORBA.OBJECT_NOT_EXIST: vmcid: 0x2000 minor code: 1806 completed: Maybe
    com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:208)
         com.sun.corba.ee.impl.javax.rmi.CORBA.Util.wrapException(Util.java:591)
         javax.rmi.CORBA.Util.wrapException(Util.java:277)
         source.traveler.ejb._TravelAgent_Stub.listItineraries(Unknown Source)
         source.traveler.servlet.ListItinerary.processRequest(ListItinerary.java:46)
    (B)
    TravelAgent traveler  =
    (TravelAgent)PortableRemoteObject.narrow(session.getAttribute("travelagent"), TravelAgent.class);The error I get is :
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException
         com.sun.corba.ee.impl.javax.rmi.CORBA.Util.wrapException(Util.java:597)
         javax.rmi.CORBA.Util.wrapException(Util.java:277)
         source.traveler.ejb._TravelAgent_Stub.listItineraries(Unknown Source)
         source.traveler.servlet.ListItinerary.processRequest(ListItinerary.java:46)
    Could someone advice on how to retrieve and cast the EJBObject's reference from the servlet so that I may use it to call the business method?
    Thanks!

    Thanks guys! It worked.
    1.. I should have used the handle. Got to coding without going deep in the concepts.
    2.. I dont know if I could have used the EJB Reference directly (instead of the handle).
    3.. The error was due to me not mapping the servlets with the EJBs that they could use. I continued to get the same error even after using the handle. Once I put the mapping to the EJBs correctly, everything fell in place.
    Thanks a lot!
    Henry

Maybe you are looking for

  • Error at the time of Shopping cart creation.

    Hi experts, Can any one tell me, I get an error message at the  time of raising a SC, The error is Partner 22452 not found with with partner function type goods recipent. Account 54102022 requires an  assignment to an CO object No address found for p

  • How to get Oracle Developer 2000 for Windows

    Hi all, I have some fmx and rep developed by "Oracle Developer 2000 for Windows" product. I can not run this fmx because of I dont have "Oracle Developer 2000 for Windows" product. I look up download.oracle.com to download but I dont find this produc

  • Error message in console

    Can anyone tell if this message is okay to have while running Safari? With Safari on it seems to reduce the battery life. 14/07/11 4:12:12 PM    [0x0-0x26026].com.apple.Safari[203]    Thu Jul 14 16:12:12 Vikram-Singhs-MacBook-Pro.local Safari[203] <E

  • Can I programmatically control an xbox 360 console from a PC using a USB cable?

    I have an application that may require LabVIEW, some software normally associated with LabVIEW or both... I would like to be able to programmatically control an Xbox 360, via a PC, and through the use of a USB cable connecting both. I have setup a se

  • VPC 7/XP Home won't run H & R Block Tax Cut Premium

    Hello, I have a G4/733/10.4.4/superdrive/40g & 250g Mac.I installed vpc7/xp home on my mac.I then installed Tax Cut PC version in the virtual machine. I double click on the desktop icon and i keep getting this error .(Oxc0000005)Application failed to