How to check whether a char string is in uppercase or not

Hi,
I know how to convert strings to change strings to uppercase or lowercase, but is there any function to check, beforehand, if the field is in uppercase, for instance ? The intention here is simply to spare processing in situations where the string is already in uppercase, and thus not needing any further processing (given I want to turn the string into uppercase.)
Thanks in advance,
Avraham

Hi Avraham ,
To check whether the string is in upper case or not use CA keyward.
To check  try the following code  ---
DATA : W_STRING(5) TYPE C,
W_ABCDE(26) TYPE C VALUE 'abcdefghijklmnopqrstuvwxyz'.
w_string = 'abcd'.
IF W_STRING CA W_ABCDE.
TRANSLATE w_string TO UPPER CASE.
ELSE.
MESSAGE 'It is a uppercase string' TYPE 'S'.
ENDIF.
Try this link  this will definitely help you -
https://wiki.sdn.sap.com/wiki/display/ABAP/Validationofastringintermsof+case
Regards
Pinaki

Similar Messages

  • How to check whether a Document in KM is classified or not using JAVA API

    Hello Everyone,
      Can anyone tell me, How to check whether a Document in KM is classified or not, using JAVA API's??
    Thanks & Regards,
    Adren D'Souza

    Hi,
    The code is as follows:
    IIndexService indexService = null;
    try {
       indexService = (IIndexService) ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
    } catch (ResourceException e) {
       if (indexService == null) {
         log.errorT("Error on instanciating the index service");
         return this.renderMessage(this.getBundleString(RES_NO_INDEX_SERVICE), StatusType.ERROR);
    // get index
    IIndex index = null;
    try {
       index = indexService.getIndex("YourIndexID");
    } catch (WcmException e1) {
       log.errorT("Error when trying to get the index");
       return this.renderMessage(this.getBundleString(RES_NO_INDEX), StatusType.ERROR);
    // check if the index is a instance of AbstractClassificationIndex
    AbstractClassificationIndex classiIndex = null;
    if (index instanceof AbstractClassificationIndex) {
       classiIndex = (AbstractClassificationIndex) index;
    } else {
       log.errorT("The index " + index.getIndexName() + " is no classification index");
       return this.renderMessage(this.getBundleString(RES_NO_CLASSIFICATION_INDEX), StatusType.WARNING);
    //give your KM Resource here for which you want to know if it is classified or not
    boolean classified = classiIndex.isDocClassifiedInAnyTax(resource);
    Regards,
    Praveen Gudapati

  • How to check whether my iphone 5 is factory unlocked or not??

    how to check whether my iphone 5 is factory unlocked or not??

    Did you buy it unlocked at full, non-subsidised price?  If not, then it's not unlocked.

  • How to check whether weblogic server is in DEBUG mode or not

    Hi
    I want to check in my OSB proxy whether weblogic server is in Debug mode or not?
    IF abv thing is not possible ,
    I have check whether server is in development mode or production mode from my OSB proxy service?
    I m not able to find any doc on this??Please let me know how it can be done?
    Thanks

    There isnt any other way except for doing a Java Callout. In the callout method you can access the Domain/Server MBean for the information that you seek. Based on the callout result you can go ahead with the logic in your PS..
    Here is a sample Java Code to get the Server Log Level and ascertain whether the server is in Production Mode or not.
    package com.dell.mbean;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.util.Hashtable;
    import javax.management.MBeanServerConnection;
    import javax.management.MalformedObjectNameException;
    import javax.management.ObjectName;
    import javax.management.remote.JMXConnector;
    import javax.management.remote.JMXConnectorFactory;
    import javax.management.remote.JMXServerErrorException;
    import javax.management.remote.JMXServiceURL;
    import javax.naming.Context;
    public class MyConnection {
         private static MBeanServerConnection connection;
         private static JMXConnector connector;
         private static final ObjectName service;
         static {
              try {
              service = new ObjectName("com.bea:Name=DomainRuntimeService,Type=weblogic.management.mbeanservers.domainruntime.DomainRuntimeServiceMBean");
              catch (MalformedObjectNameException e) {
              throw new AssertionError(e.getMessage());
         * Initialize connection to the Domain Runtime MBean Server.
         @SuppressWarnings("unchecked")
         public static void initConnection(String hostname, String portString,
         String username, String password) throws IOException,
         MalformedURLException {
         String protocol = "t3";
         Integer portInteger = Integer.valueOf(portString);
         int port = portInteger.intValue();
         String jndiroot = "/jndi/";
         String mserver = "weblogic.management.mbeanservers.domainruntime";
         JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port,
         jndiroot + mserver);
         Hashtable h = new Hashtable();
         h.put(Context.SECURITY_PRINCIPAL, username);
         h.put(Context.SECURITY_CREDENTIALS, password);
         h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,"weblogic.management.remote");
         h.put("jmx.remote.x.request.waiting.timeout", new Long(10000));
         try {
         connector = JMXConnectorFactory.connect(serviceURL, h);
         connection = connector.getMBeanServerConnection();
         } catch(JMXServerErrorException jmxSE)
              jmxSE.printStackTrace();
         catch(Exception ex)
              ex.printStackTrace();
         public static String getLogSeverity(String hostName, String portName, String userName, String password) throws Exception {
              initConnection(hostName, portName, userName,password);
              connector.close();
              ObjectName domainConfig = (ObjectName) connection.getAttribute(service,
              "DomainConfiguration");
              ObjectName logMbean =(ObjectName) connection.getAttribute(domainConfig, "Log");
              String logFileFilter = (String) connection.getAttribute(logMbean, "LogFileSeverity");
              System.out.println("Log File Filter= "+ logFileFilter.toString());
              return logFileFilter;
         public static boolean isProductionModeEnabled(String hostName, String portName, String userName, String password) throws Exception {
              initConnection(hostName, portName, userName,password);
              connector.close();
              ObjectName domainConfig = (ObjectName) connection.getAttribute(service,
              "DomainConfiguration");
              boolean prodEnabled= (Boolean) connection.getAttribute(domainConfig, "ProductionModeEnabled");
              System.out.println("Is Production Mode Enabled=" +prodEnabled);
              return prodEnabled;
    Make sure you have wlclient.jar and wljmxclient.jar as your dependent libraries.

  • How to check whether java.sql.Connection has been dropped or not

    Hi,
    How can i check whether the connection is dropped from the database or not by using java.sql.Connection API.
    Thanks

    There's a few ways to check Connections, each with a different use:
    (1) conn.isOpen()
    (2) conn == null
    (3) the last one is a little more involved and adds some overhead. You can run SELECT 1 FROM dual; (Oracle) or SELECT 1 (MSSQL) and check for exceptions.
    The only way to check a connection, as far as I know, is to use it. That said, there must be a better way???

  • How to check whether a SMTP server is supporting Authentication or not

    Hi All,
    We are using Java Mail API 1.3.1/1.3.2 to send the messages. some of the SMTP servers that we use are supporting authentication and some of them are not.
    As the SMTPTransport.supportsAuthentication() is not available only in Java mail API 1.4.1, we are identifying the SMTP server whether it is supporting authentication or not in the following way.
    Socket clientSocket = null;
    InetSocketAddress socketAddress = null;
    OutputStream outStream = null;
    InputStream inStream = null;
    InputStreamReader inReader = null;
    OutputStreamWriter outWritter = null;
    try
    clientSocket = new Socket();
    socketAddress = new InetSocketAddress(host, port);
    clientSocket.connect(socketAddress, timeout*1000); // convert timeout from second to miliseconds
    // 1: now try to execute the given command by passing that on Out-Socket
    outStream = clientSocket.getOutputStream();
    outWritter = new OutputStreamWriter(outStream);
    outWritter.write("ehlo localhost" +"\n");
    outWritter.flush();
    // 2:Read output of above command
    inStream = clientSocket.getInputStream();
    inReader = new InputStreamReader(inStream);
    // This array limit would be fine to get "AUTH" extension of smtp server.
    char[] arr = new char[16384];
    StringBuilder strBuilder = new StringBuilder();
    inReader.read(arr);
    for(int i=0; i< arr.length; i++)
    strBuilder.append(arr);
    System.out.println(METHOD_NAME + "SMTP server response for ehlo localhost command ->"+strBuilder.toString());
    // The output EHLO command comes like below :
    // ehlo localhost
    // 250-ap9058pc.us.oracle.com Hello ap614ses.us.oracle.com [130.35.33.43], pleased to meet you
    // 250-ENHANCEDSTATUSCODES
    // 250-PIPELINING
    // 250-8BITMIME
    // 250-SIZE
    // 250-DSN
    // 250-ETRN
    // 250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
    // Since for XATUH ( like internal IP),
    // we are not sure, so just checking for AUTH capability.
    supported = strBuilder.indexOf("250-AUTH") >=0? true : false;
    As shown in above code, we are issuing 'ehlo localhost' command to SMTP server, if the response i. 'strBuilder' contains '250-AUTH' then we are assuming that it is supporting authentication.
    But for one SMTP server the 'strBuilder' value is showing as '220 mail.durofelguera.com ESMTP Service (Lotus Domino Release 8.5.2) ready at Thu, 16 Feb 2012 13:57:20 +0100' only which is socket connection output but not 'ehlo localhost' command output.
    where as the telnet test output is showing correct only as below
    # telnet mail.durofelguera.com 25
    Trying 172.20.16.65...
    Connected to mail.durofelguera.com.
    Escape character is '^]'.
    220 mail.durofelguera.com ESMTP Service (Lotus Domino Release 8.5.2) ready
    at 0
    ehlo localhost
    250-mail.durofelguera.com Hello localhost ([172.20.15.209]), pleased to meet
    yu
    250-HELP
    250-AUTH LOGIN
    250-SIZE
    250 PIPELINING
    AUTH LOGIN
    The question is why the 'strBuilder' is not showing 'ehlo localhost' conad output where as the telnet test results are showing correctly, what is going wrong here?
    Is there any other way to check that whether SMTP server is supporting authentication or not?
    Edited by: sarojak on Feb 19, 2012 10:11 PM

    There are so many things wrong with your code, it's hard to know where to start...
    Basically, the problem is not as simple as you think it is.
    For example, some servers might not allow authentication until you've issued
    the STARTTLS command.
    These days, essentially all servers allow authentication. You're probably better
    off just assuming the server supports.

  • How to check whether a Oracle server is installed or not ?

    Hi,
    How cani check whether a Machine has oracle server installed or not ?
    I have a machine where i have the client tools installed but not server. In that case how can i check whether this machine has oracle server is installed or not?
    Thanks in Advance..

    user11000236 wrote:
    Hi,
    How cani check whether a Machine has oracle server installed or not ?
    I have a machine where i have the client tools installed but not server. In that case how can i check whether this machine has oracle server is installed or not?
    Thanks in Advance..http://tinyurl.com/ngunhv
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • How to judge whether the chars contain only number and letter

    how to judge whether the chars contain only number and letter, for example :
    'AEs4386' is valid , but '‘´‘¼ew78' is not
    thanks for your help !

    Hi,
    try the following:
    data: l_test(36) type c.
    concatenate sy-abcde '0123456789' into l_test.
    l_test contains all letters all numbers now
    translate YourVariable to upper case.
    YourVariable contains only upper case letters
    check YourVariable co l_test. " or use if instead of check
    YourVariable contains only letters or numbers
    regards
    Siggi

  • How to check whether a field contains at least one numeric value

    how to check whether a field contains at least one numeric value..

    Hi,
    I hope that this code will works.
    constants:
       c_digit_grp        TYPE char11         VALUE '0123456789',        " Digit group
    * Data Declaration
    data :
      str   type string.
    * if you want check entire string and pass entire string
    if  str CA c_digit_grp.
    * write your logic ---this block will execute atleast one numeric value exists in the string
    Endif.
    Regards
    Bhupal Reddy

  • To check whether all chars meet ISO-8859-1 char set

    HI,
    I am Getting the Description of the Material number in a Report.
    I Need to check whether each char by char of Material description belongs to ISO-8859-1 char set.
    How to check that?
    Regards,
    Raja Senthil N

    HI,
    I am Getting the Description of the Material number in a Report.
    I Need to check whether each char by char of Material description belongs to ISO-8859-1 char set.
    How to check that?
    Regards,
    Raja Senthil N

  • R12.1.1 staging complete! How to check whether the stage is Good

    Hi Gurusl,
    I have completed staging R12.1.1 for Hp unix B.11.31. I want to know how to check whether the stage is good for installation or whether it is corrupted. Is there any metalink note or script from where we can check it. Ur help will be highly appreciated. Thanks in advance
    regards,

    Hi,
    Please refer to (Note: 802195.1 - MD5 Checksums for R12.1.1 Rapid Install Media).
    Regards,
    Hussein

  • How to check whether transport path exist between two systems in sld??

    Hi,
         I have two systems namely 'A' and 'B' and created business systems for both of them.Then i created transport path between the two systems.How i check whether what i have done is right in SLD.

    <b>WRT to CMS</b>
    am not sure with this but u can try:
    1. Start CMS: http://<host>:<J2EE Engine http port>/webdynpro/dispatcher/sap.com/tcSLCMS~WebUI/Cms.
    2. Goto lansdscape configurator and check there
    Message was edited by:
            Prabhu  S

  • How to check whether follow on document is created for sc or po,is there any table or fm available?

    How to check whether follow on document is created for sc or po,is there any table or fm available?

    Hello Venu
    Check FM: BBP_PD_SC_GETDETAIL and BBP_PD_PO_GETDETAIL table E_HEADER_REL
    Check this: SRM Shopping cart and PO tables link
    Regards

  • How to check whether there r new txt files in a folder n file creation date

    How to check whether there r new text files in a specified folder and what is the date of creation of the text file.........?

    Hi
    I have been searching for a solution to find the date of creation of a file for over 6 months now but haven't found it. So I presume that it is not possible though I havent found any authentication of my assumption in any document.
    Cheers!
    Shailesh

  • How to check whether User is alreadylogged in or not

    Hi..I want to check whether Particular User is already logged in or not ?? I had userid,password and status in my database.
    If anybody shows me how to implement it ??
    Reggards
    Chintan

    If you want to prevent multiple logins happening, use a profile on the database server that limits a login to a set number of simultaneous connections.
    If you just ant to check which users are logged in, the v$session table will have that information.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

Maybe you are looking for

  • Changes in stock value of the material even after closing period

    The client closes the accounts every month end. Say they close the books of accounts for the month of Jan’07 on 31st Jan 2007. After closing the account they are running MC.9 to know the stock value of different plants for the previous month. i.e.  f

  • DIY HD replacement iMac 2011

    I was about to purchase an new HD for my 2011 27" iMac to replace the existing one since I started to notice errors and performance issues. Mainly PM kernel: disk0s2: I/O error. I came upon sites indicating fan issues with generic (non Apple) SSD's o

  • SQL Developer 1.5.3: Specify location of PLAN_TABLE for EXPLAIN PLAN?

    In a competitor's product, I am able to set the schema location and name of the PLAN_TABLE in the preferences. This is important because there is no shared PLAN_TABLE in the databases I use. Is there a way to point SQL Developer to the PLAN_TABLE in

  • Group by sql statement is not sorted.

    execut sql statement include group by clause in a oci program, the result is not sorted. I don't know why.. in SqlPlus, same sql statement return sorted data. SELECT A.SHOP_ID,A.RESALE_TYPE, SUM(A.DEAL_AMT,0) DEAL_AMT FROM SHOP_ACC A, CD_TAB C WHERE

  • Software 1.2.1-Blank "Smart" Playlists?

    Thought to try a new thread as there seems to be a lot of -48 issues (which I do not have). For MANY years I have used about 250 "smart" playlists by artist and play count. Every time I sync, any songs by that artist that have been played come off th