XSLT upper-case function()

Does anybody know how to use a upper-case() function in XSLT? I have it in a XSL mapping of a routing service. I want it as below:
<xsl:when test='(upper-case(/imp1:GENERIC4) = "YES") or (/imp1:AWARDTYPE = "227")'>
<top:ccFlag>
<xsl:text disable-output-escaping="no">Y</xsl:text>
</top:ccFlag>
I want it to be true no matter what case of YES is. It can be yes/Yes/YES/or anything.
I also tried the following,
<xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable>
<xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
<xsl:choose>
<xsl:when test='(translate(/imp1:GENERIC4,$lower,$upper) = "YES") or (/imp1:AWARDTYPE = "227")'>
<top:ccFlag>
<xsl:text disable-output-escaping="no">Y</xsl:text>
</top:ccFlag>
</xsl:when>
<xsl:otherwise>
<top:ccFlag>
<xsl:text disable-output-escaping="no">N</xsl:text>
</top:ccFlag>
</xsl:otherwise>
</xsl:choose>
But doesnt work.
Thanks for helping.

this code works for me
    <ns1:testBPELProcessRequest>
      <ns1:input>
        <xsl:value-of select="xp20:upper-case(/ns1:testBPELProcessRequest/ns1:input)"/>
      </ns1:input>
    </ns1:testBPELProcessRequest>
  </xsl:template>maybe you need to use the namespace in front of the upper-case

Similar Messages

  • "to upper case"-function in where condition

    Hello all,
    This code below meets my purpose, but I find it very "ugly":
    * c1 is %
    TRANSLATE NACHN TO UPPER CASE.
    CONCATENATE c1 NACHN c1 into NACHN.
    TRANSLATE VORNA TO UPPER CASE.
    CONCATENATE c1 VORNA c1 into VORNA.
    SELECT *
      INTO CORRESPONDING FIELDS OF it0002
      FROM PA0002.
       TRANSLATE it0002-nachn TO UPPER CASE.
       TRANSLATE it0002-vorna TO UPPER CASE.
        if it0002-nachn cp NACHN AND it0002-vorna cp vorna.
        endif.
    ENDSELECT.
    What I really want is to find something like this:
    TRANSLATE NACHN TO UPPER CASE.
    CONCATENATE c1 NACHN c1 into NACHN.
    TRANSLATE VORNA TO UPPER CASE.
    CONCATENATE c1 VORNA c1 into VORNA.
    SELECT *
      INTO CORRESPONDING FIELDS OF it0002
      FROM PA0002.
      WHERE upper(nachn) like upper(nachn) AND upper(vorna) like upper(vorna).
    ENDSELECT.
    The code above doesn't work (you cannot use "upper" on the table pa0002 fields)
    Can anyone help me on this one?

    Hi,
    You can write your code in below way.
    TRANSLATE NACHN TO UPPER CASE.
    CONCATENATE c1 NACHN c1 into NACHN.
    TRANSLATE VORNA TO UPPER CASE.
    CONCATENATE c1 VORNA c1 into VORNA.
    SELECT *
      INTO CORRESPONDING FIELDS OF it0002
      FROM PA0002.
      WHERE nachn like NACHN 
      AND      vorna   like VORNA.
    ENDSELECT.
    Hope this may help.
    Regards,
    Sravanthi

  • RFC function callls a SAP Business Connector Flow - only upper case

    Hi everybody,
    I wrote a function in SE37 which is calling a Flow in SAP Business Connector.
    R/3 and SAP BC, both are Non Unicode systems.
    The export parameter is TYPE makt-maktx.
    The call to SAP BC works fine. Only all the text I can see in the pipeline of SAP BC is upper case.
    I checked wether the domain of the makt-maktx allows case sensitive texts.
    This is OK.
    I have no idea how I can tell SAP BC to receive case sensitive texts.
    I checked the forums. Seems nobody had such a problem.
    Can somebyody help?
    Best regards
    Jochen
    Hi to all,
    it was not the JAVA Version, or a bug or whatelse.
    I just ingnored while testing in SE37 that there is
    a Flag [X] case sensitive - That's all!
    Shame on me!
    Greetings Joe
    Message was edited by:
            Jochen Seeliger

    Hi Priya
    Seeing the messages, it appears that server is down.
    "java.net.ConnectException" occurs whenever you try to connect to a system which is not up and running.
    cheers
    Sameer
    PS: Please award points if you find the answer useful

  • Function Module for Translation of text from Lower to Upper Case

    Hi All,
    Can any one give me function module for translation of text from lower to upper case.
    If we use Translate statement for the program in the Extended Syntax check it is giving error.
    Thanks in advance.
    Regards,
    srinivas

    Hi Srinivas,
    You can use any of the Function Modules below.
    AIPC_CONVERT_TO_UPPERCASE
    2054_TRANSLATE_2_UPPERCASE
    HR_99S_CONV_UPPER_CASE
    Please reward if useful.
    regards,
    Raj

  • Calling Function Module for upper case to lower case in Transformation

    Hi all,
    We have the data load happening everyday for the Account Receivables data. The DSO activation is failing because of the invalid characters. It gives the messages as below
    "Value 'bdmg0808dm' (hex. '620064006D006700300038003000380064006D00') of characteristic ZINVNUM contains invalid characters"
    We understood that the character ZINVNUM is maintained only for uppercase letter wherein the lower case check box is not ticked. We have a function module which is build within BI which can be used to permit non permitted characters including space. Just want to know how can I call this function module in a transformation and which is the best option to call the function module(start routine/end routine).
    Regards
    Vijay

    You can use statement in end routine to convert text to upper case. No need of calling any function module. Just loop through records of RESULT_PACKAGE and for that particular field convert text using below statement.
    LOOP AT RESULT_PACKAGE.
    TRANSLATE RESULT_PACAKGE-/BIC/ZNAME TO UPPER CASE.
    ENDLOOP.
    Edited by: ABHIJIT TEMBHEKAR on Nov 14, 2008 2:22 PM

  • How do I male keywords (only) upper case in a JTextPane

    I'm using a DefaultStyledDocument subclass to handle SQL syntax highlighting but what I want to do is ensure that keywords are converted to upper case so as to maintain a "good" style without the hassle of shift or caps lock.
    Now, the StyledDocument seems the wrong place to implement this functionality as it should be just for display purposes while changing text to upper case is an actual change to the character values selected by the user.
    The JTextPane class itself has a replaceSelection(String content) method but this relies on the text being selected.
    I guess I could do this if I had a hook back to the JTextPane from my StyledDocument. When I find a keyword, select the text and replaceSelection.
    Is there a cleaner way to do this?

    Okay, top tip.
    I added the document listener which processed the text on each insert.
    At this stage, I've only implemented keyword checking on single character inserts (to capture changes as they are typed) - multi character inserts need to be handled differently.
    If I have a character I know can signal the end of a SQL keyword (space, carriage return, brace, parenthesis, comment etc) then I jump back to the last space in the document. This gives me the last "word" in the document.
    Remove the last character (as this is the character that has triggered the event) and then see whether it is upper case or not? If not, should it be (is it a keyword)? If so, insert the upper case String in its place.
    It was a bit fiddly to put the pieces together (a document listener which then has to use SwingUtilities to make the change using a third Runnable class) but it does exactly what I ask of it.
    I have to implement a similar algorithm now to cope with deletions (what if a delete the "a" at the end of "selecta") and multi-character inserts.
    Thanks for the advice. I've not used DocumentListeners before so this was doubly helpful.

  • How to get the first letter alone in Upper case?

    SQL*Plus: Release 9.2.0.1.0 - Production on Thu Jan 15 11:13:44 2009
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options.
    Hi all,
    Sorry if i am posting this one as a clone. I want the first letter alone in UPPER case in the given data. Is there any specific SQL function to do it or can we do it in REGEXP?
    I have tried with this below one query.
    select Upper(substr('oracle code',1,1))||substr('oracle code',2) from dual;
    Oracle code
    Is anything better than this in performance wise? If so please help me.
    Thanks,
    Ram

    Hi,
    what if the string is like this
    SELECT INITCAP(substr('oracle code Error ', 1, instr('oracle code Error ', ' '))) ||
           substr('oracle code Error', instr('oracle code Error ', ' '), length('oracle code error '))
    FROM dual;

  • Translate search parameters to lower and upper case

    Hi All,
    I need to create a search function. Is it possible to translate the search paramaters to  both upper and lower case because inside the data there are data with upper case or lower case or both.
    Thanks in advance.

    Hi ,
      As per your requirement you have to write logic for three conditions :
    1. Translate whole word into upper case .
        TRANSLATE  your field name  TO UPPERCASE.
    2. Translate whole word into lower case .
        TRANSLATE  your field name  TO LOWERCASE.
    3. First character of your field should be in uppercase rest in lower case .
    so write your logic now considering third point also .
    Regards ,
    Nilesh Jain .

  • Converting lower case to upper case data of flat file

    Hi All,
    I have a requirement purche order creation by using bapi function module.My requirement is  when I am uploading the flat file and if flat file  contains the data in lower case then before passing it to the function module i want to convert it in to Upper case. please tell me how can I do this.
    its very urgent.
    Regards,
    Amit.

    hi,
    Use translate statement ..
    DATA letters(3) TYPE C.
    MOVE 'abc' TO letters.
    TRANSLATE letters TO UPPER CASE.
    write : letters.
    Also refer
    /people/alvaro.tejadagalindo/blog/2006/12/21/does-abap-lacks-of-string-processing
    Regards,
    Santosh

  • How to Handle the lower and upper case in 'POPUP_GET_VALUES'

    Hi All
    i am using the following FM and when i enter value on the
    popup in lower case or with capital letters i see the field
    with upper case ,this is problem for me since i need to
    take the field and compare it ,there is a way to handle this
    issue ?
    CALL FUNCTION 'POPUP_GET_VALUES'                      "#EC FB_RC
            EXPORTING
              popup_title     = lv_head_msg
            IMPORTING
              returncode      = lv_rc    " User response
            TABLES
              fields          = lt_field    " Table fields, values and attributes
            EXCEPTIONS
              error_in_fields = 1
              OTHERS          = 2.
    Best regards
    Alex

    Hi Alex,
    This because, the field and table name that You are passing in lt_field, has a conversion attached to it, which causes the converison in case.
    For e.g. If You pass MARA-MATNR and try to get the values from pop-up, the value will get converted to upper case, but if You pass MAKT-MAKTX (which does not have a converison attached to it), the value will be retrieved as it was entered. This is standard SAP, which is correct.
    If You need to get values of any text field, pass any SAP text field as reference in your table lt_field. Hope this helps...
    Rgds,
    Birendra

  • To translate the text to upper case

    Hi,
          I have an requirement to translate the text to upper case.  please suggest.
    Thanks.
    Tony

    Hi,
        you try this FM  2054_TRANSLATE_2_UPPERCASE
    Example,
    CALL FUNCTION '2054_TRANSLATE_2_UPPERCASE'
           EXPORTING
                I_STRING            = P_V_TEXT
           IMPORTING
                E_STRING            = P_V_TEXT
    Regards,
    Joan

  • [IDCS2-PC] PMString - convert to upper case

    Hi everybody,
    does somebody meet the problem that some of character couldn't be converted to upper case.
    I have
    PMString initialized with text
    "lørdag". When I call function
    ToUpper() I got
    "LøRDAG", where there is one character in lower case which wasn't transformed.
    Do somebody know why and which function should I used instead of that to be succesfull?
    ThanX,
    pyso

    Hi everybody,
    I've just found a solution. In SDK there is probably error because
    PMString.ToUpper() doesn't work well but
    WideString.ToUpper() works fine.
    bye,
    pyso

  • Translate to Upper Case in Transformation

    Hello BI experts,
    Extractor has more than 100 fields in combination of Char, Num, Date etc...
    Some Char fields are bringing data in lower case letters. 
    Here I am looking for ABAP code in Start routine, where I can translate all Char fields lower case letter to Upper case.
    I know how to translate for each individual field level (infoobject routine level).  But I need in Start routine for all Char fields at once.  In other words,  I think, we have to filter out Char fields from <Source-Fields> and translate them to Upper case.
    Any help would be greatly appreciated.
    Thanks much,
    Anil

    Hi,
    try the following logic in start routine& let me know if you find any difficulty..
    data : r_itab type table of rstrucinfo,
              v_sytabix like sy-tabix,
              wa type rstrucinfo.
        FIELD-SYMBOLS : <fs1> type any,
                     <fs2> type any.
        CALL FUNCTION 'GET_COMPONENT_LIST'
          EXPORTING
            program    = sy-repid
            fieldname  = 'SOURCE_PACKAGE'
          TABLES
            components = r_itab[].
        loop at SOURCE_PACKAGE assigning <fs2>.
          v_sytabix = sy-tabix.
          loop at r_itab into wa where TYPE = 'C'.
            assign component wa-COMPNAME of structure <fs2> to <fs1>.
            translate <fs1> to upper case.
          endloop.
          modify SOURCE_PACKAGE from <fs2> index v_sytabix.
        endloop.
    regards,
    raju

  • Force Upper Case on Account Name

    Hi
    We want to force upper case Account Name. Can we do this using post default value of Field Set up..I see function UPPER.. what is the syntax..
    Appreciate ur help..
    Regards
    Sundar

    Having the same problem i have the following which works if the information is all lower case but if there is an uppercase value in the infomation it then doesnt see this as an issue.
    FindNoneOf([<IndexedShortText0>], "abcdefghijklmnopqrstuvwxyz")>0
    Under Field Validation Error Message i have "Please enter in Caps"

  • Check Writer XML Upper Case

    Hello All,
    Currently, the name of the employee is in INIT Caps. We need to convert the whole name into Upper Case? I tried using the function upper-case but in vain. Can somebody help me?
    Thanks, Naveen G

    Hey NAV,
    Re: Converting to UPPER case within an IF statement
    OR
    <?xdofx:upper(ELEMENT_NAME)?>

Maybe you are looking for