Getting a character at a given index in a String and returing as a String

Hello,
How do I simply grab one character in a string and return it as a string? I saw the substring() method but it does not like when I invoke:
String test = "abcd";
test = test.substring(0,0);
**Above produces a runetime error. ***I need something that does this:
String test = "abcd"
test.needtodo(0) returns String "a".
test.needtodo(1) returns String "b".
ETC.
---- Thanks for the help.

Ok I used Kaj's method, but what I am trying to do still inst working properly. Here is what I am trying to do:
public String stringToBinaryStringWithLeadingZeroz(String input) {
     String binaryString="";
     int sizeOf = input.length();
     for(int i=0; i < sizeOf; i++)
          int intRepresentation = Integer.parseInt(String.valueOf(input.charAt(i)), 16);
          binaryString += Integer.toBinaryString(intRepresentation);
     return binaryString;
}I am trying to take in a String that is Hex and return a string that is binary with leading zeros.
So if the input is: stringToBinaryStringWithLeadingZeroz("3");
It should be returning 0011 but its still only returning 11. It shouldnt be returning 0011 though. I am passing each character indivudally into the method toBinaryString() which just returns the result and appends onto the result.
** SCRATCHING MY HEAD **

Similar Messages

  • Getting one character at a certain position from a string array

    Hi, i'm new at learning java, but have strong experience at C++ and asm. How would i get one character at a certain positon from a string array.
    for example:
    String Phrases[] = {"To be or not to be, that is the question","The Simpsons","The Mole","Terminator three rise of the machines","The matrix"};
    that is my string array above.
    lets say i wanted to get the first character from the first element of the array which is "T", how would i get this

    ok well that didn't work, but i found getChars function can do what i want. One problem, how do i check the contents of char array defined as char Inchar[];

  • How to get one character at a specified index and put it in a mutablestring

    I am new in cocoa programing and i am stock.
    I am trying to get a character in a NSString and i want to put it in a NSMutableString with the command appendString.
    For now it's not working. I try with different approach but i didn't find the right way to do that. It's probably very simple but i just don't see hit.
    I try with characterAtIndex and with getCharater. And now i am thinking to use charcaterRange but i don't know how to articulate an NSRange.
    Maybe somebody could show an example of of what i have to do to do that.
    I put this <<<<<<<<<<<<<<<< to show where in my code it's not working
    Thanks a lot for your help it's very appreciate.
    *The header:*
    #import <Cocoa/Cocoa.h>
    @interface Controleur : NSObject
    NSMutableArray *touche_presser;
    NSMutableArray *typedevariable;
    NSMutableString *formule;
    int calculencours;
    int i;
    int n;
    IBOutlet NSTextField *affichagede_laformule;
    IBOutlet NSTextField *informationdesupport;
    -(void) awakeFromNib;
    -(IBAction)touche_clear:(id)sender;
    -(IBAction)touche_0:(id)sender;
    -(IBAction)touche_1:(id)sender;
    -(IBAction)touche_2:(id)sender;
    -(IBAction)touche_3:(id)sender;
    -(IBAction)touche_4:(id)sender;
    -(IBAction)touche_5:(id)sender;
    -(IBAction)touche_6:(id)sender;
    -(IBAction)touche_7:(id)sender;
    -(IBAction)touche_8:(id)sender;
    -(IBAction)touche_9:(id)sender;
    -(IBAction)touche_plus:(id)sender;
    -(IBAction)touche_moins:(id)sender;
    -(IBAction)touche_multiplier:(id)sender;
    -(IBAction)touche_diviser:(id)sender;
    -(IBAction)touche_egale:(id)sender;
    -(NSString *) constructionde_laformule;
    -(NSNumber *) analysed_unerafale: (NSString *) elementd_uneformule;
    @end
    *The Methode:*
    -(NSNumber *) analysed_unerafale: (NSString *) elementd_uneformule;
    // Ici, j'analyse une partie de la formule et retourne le résultat (nsnumber)
    // dans la variable resultatde_l_analyse_de_larafale
    int ia;
    int nombrede_caractere_dans_element_de_laformule;
    NSNumber *resultat_actuel;
    resultat_actuel = [[NSNumber alloc]initWithInt:0];
    NSNumber *resultat_precedant;
    resultat_precedant = [[NSNumber alloc]initWithInt:0];
    NSNumber *resultatde_l_analyse_de_larafale;
    resultatde_l_analyse_de_larafale = [[NSNumber alloc]init];
    NSMutableString *caractere_x;
    caractere_x = [[NSMutableString alloc]init];
    NSMutableString *operateur;
    operateur = [[NSMutableString alloc]init];
    nombrede_caractere_dans_element_de_laformule = [elementd_uneformule length];
    ia = 0;
    for (n=1; n <= nombrede_caractere_dans_element_de_laformule; n = n+1)
    ia++;
    char y = [elementd_uneformule characterAtIndex:ia]; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< here
    NSString *x = [[NSString alloc] initWithUTF8String: y]; //[NSString stringWithFormat:@"%@", y]; <<<<<<<<<<<<< and here
    [caractere_x setString:@""];
    [caractere_x appendString:x];
    return resultatde_l_analyse_de_larafale;
    @end
    P.S.
    Excuse my bad english i am french speaking

    I also couldn't figure out what your code is doing, but hope this sample code will help:
    NSString *firstString = @"Canada";
    NSMutableString *secondString = [NSMutableString stringWithCapacity:10];
    int index = random() % [firstString length];
    // get a substring of length 1 at the index position of firstString
    NSString *oneCharString = [firstString substringWithRange:NSMakeRange(index, 1)];
    // append the single-character substring to secondString:
    [secondString appendString:oneCharString];
    NSLog(@"firstString=%@ index=%d secondString=%@", firstString, index, secondString);
    I was testing the above when your first reply was posted. It uses the same method Et suggested, but I didn't want to just throw it away.

  • Delete  all occurances of any character outside a given set in a string

    Hi Experts,
    I have a situation in which I have to send a  file to some external system.
    The file is a fixed length file and I have been provided with the range of
    acceptable ASCII character set for the external system, which comprises of
    alphabet,digits and specific symbols: '-=\][';/.,!@#$%&*()_{}|:"?<>
    If any fiield of the file has any character outside this range, then I have to delete it.
    Looking at the huge length of the file.
    Please suggest some Function Module or anything that can handle this
    scenario without leaving an advese effect on the performance.
    Thanks in advance.
    Regards,
    Amit.

    Hi,
    @Srinivas--> Thanks for your solution , but I have a different situation, I have to exclude all the characters which are not in the range provided. I don't know what are those characters.
    @Katigiri---> Thanks for your solution, but using search I can find the known field. Here I have to find all those fields which are not in this range and delete them.
    Experts, please suggest me a procedure to find all the fields which are not in this range . So, that I can find them and delete them.

  • "llegal character in path at index" Error While Using wsimport from ant.

    Hi,
    I am getting the following error, while using wsimport from ant build script. you have the details below. I dont have a clue on this error.
    Error :
    wsimport:
    [echo] Generating the client stubs
    [wsimport] error: Unable to parse "HelloService_schema1.xsd" : Illegal character in path at index 25: file:/D:/Study/WebService Eclipse Project/examples/jaxws/helloservice/service/server/wsdl/HelloService.wsdl#types?schema1
    [wsimport] line 0 of file:/D:/Study/WebService Eclipse Project/examples/jaxws/helloservice/service/server/wsdl/HelloService.wsdl#types?schema1
    [wsimport] error: Unable to parse "HelloService_schema1.xsd" : Illegal character in path at index 25: file:/D:/Study/WebService Eclipse Project/examples/jaxws/helloservice/service/server/wsdl/HelloService.wsdl#types?schema1
    [wsimport] line ? of file:/D:/Study/WebService Eclipse Project/examples/jaxws/helloservice/service/server/wsdl/HelloService.wsdl#types?schema1
    [wsimport] error: Element "{http://endpoint.helloservice/}sayHello" not found.
    Java WebService :
    package helloservice.endpoint;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    @WebService()
    public class Hello {
    private String message = new String("Hello, ");
    @WebMethod()
    public String sayHello(String name) {
    return message + name + ".";
    Ant Build.xml
    <project name="${project.name}" basedir="." default="ear">
         <property file="WS_build.properties"/>
         <target name="init">
              <!-- Path Setting-->
              <echo description="Setting the path for the project"/>
              <path id="classpath">
                   <fileset dir="${lib.dir}" includes="*.jar"/>          
                   <fileset dir="${commonWSLib.dir}" includes="*.jar"/>
              </path>
              <!-- WSGen -->
              <echo description="WSGEN Definition"/>
              <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
                   <classpath>
                        <path refid="classpath"/>
                   </classpath>
              </taskdef>
              <!-- WS Import-->
              <echo description="WSImport Definition" />
              <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
                   <classpath>
                        <path refid="classpath"/>
                   </classpath>
              </taskdef>
         </target>
         <target name="Compile" depends="init">
              <echo description="Compiling the project"/>
              <mkdir dir="${build.dir}"/>
              <mkdir dir="${build.dir}/classes"/>
              <javac destdir="${build.dir}/classes" srcdir="${java.base}">
                   <classpath>
                        <path refid="classpath"/>
                   </classpath>
              </javac>
              <copy todir="${build.dir}/classes">
                   <fileset dir="${java.base}" excludes="**/*.java"/>
              </copy>
         </target>
         <target name="wsgen" depends="Compile">
                   <echo message="Generating the wsdl file[${project.name}Service.wsdl]" />
                   <mkdir dir="${service.dir}"/>
                   <mkdir dir="${service.dir}/server"/>
                   <mkdir dir="${service.dir}/server/classes"/>
                   <mkdir dir="${service.dir}/server/src"/>          
                   <mkdir dir="${service.dir}/server/wsdl"/>                    
                   <wsgen sei="${sei.class}" destdir="${service.dir}/server/classes" genwsdl="true"
                   sourcedestdir="${service.dir}/server/src" resourcedestdir="${service.dir}/server/wsdl">
                        <classpath>
                             <path refid="classpath" />
                             <pathelement location="${build.dir}/classes" />
                        </classpath>
                   </wsgen>
         </target>
         <target name="copy" depends="wsgen">
                   <echo message="Copying class and config files into ${web-inf.dir} folder" />
                   <copy todir="${web-inf.dir}">
                        <fileset dir="${build.dir}"/>
                        <fileset dir="${service.dir}/server" includes="**/*.class"/>
                        <fileset dir="." includes="${lib.dir}/*.jar"/>
                   </copy>
                   <copy todir="${web-inf.dir}/${lib.dir}">
                        <fileset dir="${commonWSLib.dir}" includes="*.jar"/>
                   </copy>
                   <copy todir="${web-inf.dir}">
                        <fileset dir="${web-inf.dir}" includes="**/*.xml"/>
                   </copy>
         </target>
         <!-- Create the WAR file     -->
         <target name="war" depends="copy">
              <echo message="Creating the war file [${project.name}.war]" />     
              <mkdir dir="${dist.dir}"/>
              <mkdir dir="${dist.dir}/server"/>
              <war destfile="${dist.dir}/server/${project.name}.war" webxml="${web-inf.dir}/web.xml" basedir="${web.dir}"/>
         </target>
         <target name="wsimport" depends="war">
              <echo message="Generating the client stubs" />          
              <mkdir dir="${service.dir}"/>
              <mkdir dir="${service.dir}/client"/>
              <mkdir dir="${service.dir}/client/classes"/>
              <mkdir dir="${service.dir}/client/src"/>     
              <wsimport wsdl="${basedir}/${service.dir}/server/wsdl/${project.name}.wsdl"
                   destdir="${service.dir}/client/classes"
                   package="${wsimport.package}"
                   sourcedestdir="${service.dir}/client/src">
              </wsimport>
         </target>
         <target name="clientjar" depends="wsimport">
    <echo message="Creating the client jar file [${project.name}Client.jar] " />
    <copy todir="${service.dir}/client/classes">
    <fileset dir="${service.dir}/client/src"/>
    </copy>
    <mkdir dir="${dist.dir}/client"/>
                   <tstamp>
                   <format property="TODAY" pattern="yyyy-MM-dd hh:mm:ss" />
                   </tstamp>
    <jar destfile="${dist.dir}/client/${project.name}Client.jar"
    basedir="${service.dir}/client/classes">
                   <manifest>
                   <attribute name="Built-By" value="${user.name}"/>
                   <attribute name="Built-Date" value="${TODAY}"/>
                   <attribute name="Implementation-Version" value="${version}-b${build.number}"/>
              </manifest>
              </jar>          
    <mkdir dir="${dist.dir}/client"/>
         </target>
         <!-- JAR THE ENGINE -->
         <target name="enginejar" depends="clientjar">
         <echo message="Creating the engine jar file for local call [${project.name}.jar] " />
              <!-- <copy todir="${build.dir}/classes">
                        <fileset dir="." includes="${config.dir}/hibernate.cfg.xml"/>           
         </copy> -->
              <tstamp>
                   <format property="TODAY" pattern="yyyy-MM-dd hh:mm:ss" />
              </tstamp>
         <jar destfile="${dist.dir}/server/${project.name}.jar"
         basedir="${build.dir}/classes">
                   <manifest>
                        <attribute name="Built-By" value="${user.name}"/>
                        <attribute name="Built-Date" value="${TODAY}"/>
                        <attribute name="Implementation-Version" value="${version}-b${build.number}"/>
              </manifest>
              </jar>          
              </target>
              <!-- GENERATE EAR FOR THE ENGINE -->
              <target name="ear" depends="enginejar" >
                   <echo message="Creating the ear file [${project.name}.ear]" />
                   <ear destfile="${dist.dir}/server/${project.name}.ear" appxml="META-INF/application.xml">
                   <fileset dir="${dist.dir}/server" includes="${project.name}.war"/>
              </ear>
                   <antcall target="clean"></antcall>
              </target>
              <!-- CLEAN UP THE FOLDERS     -->
              <target name="clean">
                   <echo message="Cleaning up folders " />          
                   <delete dir="${build.dir}"/>
                   <delete dir="${service.dir}"/>
                   <delete dir="${web-inf.dir}/classes"/>
                   <delete dir="${web-inf.dir}/lib"/>
                   <echo message="${project.name}.ear, ${project.name}.war, ${project.name}.jar and ${project.name}Client.jar is available in project's ${dist.dir} folder"/>
              </target>
    </project>
    Generated wsdl(HelloService.wsdl) :
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <definitions targetNamespace="http://endpoint.helloservice/" name="HelloService" xmlns:tns="http://endpoint.helloservice/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
    <types>
    <xsd:schema>
    <xsd:import namespace="http://endpoint.helloservice/" schemaLocation="HelloService_schema1.xsd"/>
    </xsd:schema>
    </types>
    <message name="sayHello">
    <part name="parameters" element="tns:sayHello"/>
    </message>
    <message name="sayHelloResponse">
    <part name="parameters" element="tns:sayHelloResponse"/>
    </message>
    <portType name="Hello">
    <operation name="sayHello">
    <input message="tns:sayHello"/>
    <output message="tns:sayHelloResponse"/>
    </operation>
    </portType>
    <binding name="HelloPortBinding" type="tns:Hello">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="sayHello">
    <soap:operation soapAction=""/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    <service name="HelloService">
    <port name="HelloPort" binding="tns:HelloPortBinding">
    <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
    </port>
    </service>
    </definitions>
    Generated : HelloService_schema1.xsd
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <xs:schema version="1.0" targetNamespace="http://endpoint.helloservice/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="sayHello" type="ns1:sayHello" xmlns:ns1="http://endpoint.helloservice/"/>
    <xs:complexType name="sayHello">
    <xs:sequence>
    <xs:element name="arg0" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="sayHelloResponse" type="ns2:sayHelloResponse" xmlns:ns2="http://endpoint.helloservice/"/>
    <xs:complexType name="sayHelloResponse">
    <xs:sequence>
    <xs:element name="return" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    If u need any other information let me know.

    This has been resolved by uploading relevant jar file

  • Functional module to get the File from a given Directory

    Hi all,
    I am using a FM name 'subst_get_file_list' to get the file from a given directory but it is accepting only 40 Character length file only my requirement is to accept file name other than 40 char,
    give me good sugestion
    regards
    paul

    Hi Paul,
    Check the Function Module Gayathri has given. ie. 'SO_SPLIT_FILE_AND_PATH'.
    In the exporting parameter FULL_NAME , give the path name and in the importing parameter stripped_name , you will get the filename.
    Check this code.
    REPORT ZSHAIL_SPLITFILE.
    data: it_tab type filetable with header line,
          gd_subrc type i.
    tables: rlgrap.
    data: path type string,
          file_name type string.
    parameters file_nam type rlgrap-filename .
    data: user_act type i.
    at selection-screen on value-request for file_nam.
    CALL METHOD cl_gui_frontend_services=>file_open_dialog
      EXPORTING
        WINDOW_TITLE            = 'select a file'
       DEFAULT_EXTENSION       = '*.txt
        DEFAULT_FILENAME        = ''
        FILE_FILTER             = '*.txt'
        INITIAL_DIRECTORY       = ''
        MULTISELECTION          = abap_false
       WITH_ENCODING           =
      CHANGING
        file_table              = it_tab[]
        rc                      = gd_subrc
        USER_ACTION             = user_act
       FILE_ENCODING           =
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_GUI            = 3
        NOT_SUPPORTED_BY_GUI    = 4
        others                  = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    if user_act = '0'.
    loop at it_tab.
    file_nam = it_tab-filename.
    endloop.
    endif.
    path = file_nam.
    CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
      EXPORTING
        full_name           = path
    IMPORTING
       STRIPPED_NAME       = file_name
      FILE_PATH           =
    EXCEPTIONS
      X_ERROR             = 1
      OTHERS              = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    at selection-screen.
    message i001(zmess) with file_name.
    Regards,
    SP.

  • How can i get current time of a given timezone

    how can i get current time of a given timezone
    for example: Asia/Hong_Kong
    my code is like this, but the result is not correct.
    what's wrong?
    import java.util.*;
    public class test {
    public static void main(String[] args){
              String s = "Asia/Hong_Kong";
              String tempS = "";
              TimeZone myTime = new SimpleTimeZone(s);
              //TimeZone myTime = TimeZone.getTimeZone(s);
              Calendar myCal = new GregorianCalendar(myTime);
              tempS = myCal.get(Calendar.YEAR)+"-"+
                        (myCal.get(Calendar.MONTH)+"-"+
                        myCal.get(Calendar.DATE)+" "+
                        (myCal.get(Calendar.HOUR)+":"+
                        myCal.get(Calendar.MINUTE)+":"+
                        myCal.get(Calendar.SECOND);
              System.out.println(tempS);
    output is : 2001-7-15 11:16:48
    but the correct time should be: 2001-8-16 7:17:48
    the correct time should be 2001-8-16

    Certain indexes in the Calendar API start at 0 rather then 1, so, when you get the value, you may want to increment.
    I'm not sure why the time is incorrect. You may want to call getAvailableIDs() and make sure that the desired TimeZone ID is supported by your version. I doubt that Sun would have incorrect support for the time zone, but it may not be included, or perhaps it is included with a diffrent ID. You can always create your own time zone as well, by passing the String offset to getTimeZone(), the offset being how many hours beyond or before GMT. Hopefully this helps.

  • My ipod has broken. a friend has given me her ipod. but how do i get to use as mine. i can erase her songs and i have mine all on my pc in itunes. help me please friends

    my ipod has broken. a friend has given me her ipod. but how do i get to use as mine. i can erase her songs and i have mine all on my pc in itunes. help me please friends??

    It appears that something happened to yur computer/iTunes files.  It happens sometimes.  To recovery:
    - Import the old music into the current iTunes library
    - Make sure all the apps are also in the library
    - If in the USA and therplaces where iCloud has benn released you can redownload most iTunes puchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    - You can always redownload apps at no additional cost as long as you are singned into the same iTunes account the originally purchased them.
    - After all the suff in in the iTunes library, make a backup of the iPod by connecting the iPod to the computer and right clicking on the iPOd under Devices in iTunes. 
    - Restore the iPod from backup and restore as necessary.

  • How to get each character in a string

    as in 'C' we use arrays to get each character of a string stored in array.how can we get each character of a string stored in a variable.

    Hi,
    For that you need to do offset.
    for example one variable called VAR contains string 'HUMERAH'.
    if you want each character of that string then you need to decalre as many variable as the number of string.
    like
    data : var1(1),
             var2(1),
    var(3),
    var(4).
    var1 = var+(1).
    var2 = var+1(1).
    var3 = var+2(1).
    var4 = var+3(1).
    now var1,var2,var3,var4. contains the single characters.
    Regards,
    Guru
    mark helpful answers

  • SSRS 2008 R2 - Try to Open RDL - I got an error saying "Failed to open report 'reports_List.rdl' ... "Invalid character in the given encoding. Line 1, position 1".

    Hi,
    I am working on SSRS 2008 R2.
    My Colleague gave me one RDL. I have added it to my SSRS project on BIDS  & Tried  to Open by double-click on that RDL.
    I got a popup error saying "Failed to open report 'reports_List.rdl'. clicked on
    Details button & noticed error explanation as . "Invalid character in the given encoding. Line 1, position 1". 
    When i try to View Code of this RDL, I got another error message saying "Exception from HRESULT: 0x80041FEB"
    Can anybody suggest me ... what exactly the root cause of it?  how can i resolve it ?
    thanks a lot in advance !
    best regards,
    Venkat

    Hi Venkat,
    Did you use Visual Studio 2010 on your test? It is a known issue of Visual Studio 2010. Please refer to the following document. It has fix method provided by the Microsoft Web Development Tools team to work around the issue.
    https://connect.microsoft.com/VisualStudio/feedback/details/552134/hresult-error-creating-timetracking-sample-web-site-project
    Since the issue related to Visual Studio. I suggestion you post the question in the following forum:
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=Vsexpressvb 
    It is appropriate and more experts will assist you.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • How to get number of digits in given amount

    Hi Experts,
    How to get number of digits in given amount.
    Regards
    Mohit

    Check this :
    data: v_data1 type p decimals 3 value '12.860',
          v_char1 type char20,
          v_char2 type char20,
          v_char3 type char20,
          len type i.
    write v_data1 to v_char1.
    split v_char1 at '.' into v_char2 v_char3.
    len = strlen( v_char3 ).
    write:/ v_char2,
          / v_char3, " this holds the digit value
          / len.     " number digits

  • How can I get file list for a given directory?

    Hi,
    How can I get file list for a given directory? Is there a function?
    Thanks.

    Hi friend,
    Try this sample report. It displays all files in a directory.
    While executing give some directory name in input. ex:  C:\
    Mention file type in filter parameter. ex: *.DOC
    REPORT ztests.
    DATA : file_table LIKE TABLE OF sdokpath WITH HEADER LINE .
    DATA : dir_table LIKE TABLE OF sdokpath WITH HEADER LINE .
    PARAMETERS:p_dir(50) TYPE c.
    CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
      EXPORTING
        directory  = p_dir
        filter     = '*.DOC'
      TABLES
        file_table = file_table
        dir_table  = dir_table
      EXCEPTIONS
        cntl_error = 1
        OTHERS     = 2.
    LOOP AT file_table .
      WRITE:/ file_table-pathname.
    ENDLOOP.
    Might be helpful...
    Thanks.....
    Edited by: Guest77 on Feb 11, 2009 5:30 AM

  • Getting immediate character behind to the cursor in JTextPane?

    when i use left arrow, i am not getting the immediate character behind to the cursor, but i am getting the character after 2 position in JTextPane. It works fine for the right arrow. since we get the character based on the caretposition. how can i get immediate character behind to the cursor when i use other arrow's other than right arrow?
    thnx in advance

    Swing related questions should be posted in the Swing fourm.
    The simple answer would be to use getCaretPosition -1. But this is probably not what you are looking for and you question is not very detailed.
    So, posting a simple 10 line executable demo program would be nice. Its probably a problem with the order of events.

  • Getting special character while saving adobe form from portal

    Hi All,
    I am getting Special character while saving adobe form. I am using webdynpro java application, in which I am using download file UI element.We are facing this issue after support packs were implemented in staging system.
    Kindly advise.
    Regards
    Shashwat

    Hi,
    We have ABAP system as backend system seperately and Single sign on is configured.
    when we access the portal with domain name line http://hostname.domain/52000/irj/portal, we are able to access the adobe form which is develope on abap system without any issue.
    but our issue started when we are trying to access portal only with hostname as http://hostname:52000/irj/portal
    we are able to login to portal but when we are trying to open the adobe form we are getting error
    No switch to HTTPS occurred, so it is not secure to send a password
    Since you have configured SSL, I assume that this configuration is done with fully qualified hotsname. Hence the certificate is generated based on this hostname.
    Now when you access your portal without typing fully qualified hostname, system is unable to locate a relevant certificate. Hence it lands up with a message "No switch to HTTPS occurred, so it is not secure to send a password"
    Hope this answers your query
    Regards,
    Deepak Kori

  • Detect a certain character and return it's index in the string

    what's the function that detects a certain character e.g."X" in a string line and returns its index then continues to detect the next 'X" in the same line. do i also need to store them in an array?

    You have to write one. Also, please stop starting new threads on this topic. This is all related to the same problem you're having, and posting so many threads makes it tough on everyone who wants to help you. It's rude, and wasteful of other people's time; namely, the folks that are actually trying to help you solve your problem.

Maybe you are looking for