Special character '  in the string variable

Hi,
I need to insert in the string veriable the special character '. How should I do it ?
variable = '''.
It does not work ...
BR
Wojcieh

1)Declare a variable and assign the special character to that variable.
2)Then use the CONCATENATE option to get the value in the string variable.
Just copy and execute this code.
REPORT zztest.
<b>DATA : temp(1) VALUE ''''.</b> Decalare your special character
DATA : variable TYPE string.
START-OF-SELECTION.
  BREAK-POINT.
  variable = 'SDNSAP'.
  CONCATENATE temp variable temp INTO variable.
  WRITE : / variable.
<b>The output is</b>
'SDNSAP'
Regards,
AS.

Similar Messages

  • Replace a character in the string using JavaScript

    Hello,
    I would like to ask for help. I have a field in the xml file, which contains a string, that is bound to a text box on the form.
    What would be the syntax to replace a special character in the string with the carriage return?
    Thank you.

    Huh?
    I didn't post my script...
    It sure is no clean programming since I just took Steve's solutions and delted the ligns I didn't want (the app allert)
    Though in the end I've taken the boolean out, or better replaced it with the replacement function, it repeats the replacement no matter how much "ü"'s are in there. (I needed the boolean though, since as long as it was true, the if should be executed.)
    Somehow it worked... not 100% sure why, but it worked.
    if (findChar(this.rawValue)) {
    function findChar(str)
    {  for (var i=0; i < str.length; i++)
            if (str.charAt(i) == "ü")
               this.rawValue = this.rawValue.replace(/ü/,"ue")

  • Replacing a special character in a string with another string

    Hi
    I need to replace a special character in a string with another string.
    Say there is a string -  "abc's def's are alphabets"
    and i need to replace all the ' (apostrophe) with &apos& ..which should look like as below
    "abc&apos&s def&apos&s are alphabets" .
    Kindly let me know how this requirement can be met.
    Regards
    Sukumari

    REPLACE
    Syntax Forms
    Pattern-based replacement
    1. REPLACE [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF]
    pattern
              IN [section_of] dobj WITH new
              [IN {BYTE|CHARACTER} MODE]
              [{RESPECTING|IGNORING} CASE]
              [REPLACEMENT COUNT rcnt]
              { {[REPLACEMENT OFFSET roff]
                 [REPLACEMENT LENGTH rlen]}
              | [RESULTS result_tab|result_wa] }.
    Position-based replacement
    2. REPLACE SECTION [OFFSET off] [LENGTH len] OF dobj WITH new
                      [IN {BYTE|CHARACTER} MODE].
    Effect
    This statement replaces characters or bytes of the variable dobj by characters or bytes of the data object new. Here, position-based and pattern-based replacement are possible.
    When the replacement is executed, an interim result without a length limit is implicitly generated and the interim result is transferred to the data object dobj. If the length of the interim result is longer than the length of dobj, the data is cut off on the right in the case of data objects of fixed length. If the length of the interim result is shorter than the length of dobj, data objects of fixed length are filled to the right with blanks or hexadecimal zeroes. Data objects of variable length are adjusted. If data is cut off to the right when the interim result is assigned, sy-subrc is set to 2.
    In the case of character string processing, the closing spaces are taken into account for data objects dobj of fixed length; they are not taken into account in the case of new.
    System fields
    sy-subrc Meaning
    0 The specified section or subsequence was replaced by the content of new and the result is available in full in dobj.
    2 The specified section or subsequence was replaced in dobj by the contents of new and the result of the replacement was cut off to the right.
    4 The subsequence in sub_string was not found in dobj in the pattern-based search.
    8 The data objects sub_string and new contain double-byte characters that cannot be interpreted.
    Note
    These forms of the statement REPLACE replace the following obsolete form:
    REPLACE sub_string WITH
    Syntax
    REPLACE sub_string WITH new INTO dobj
            [IN {BYTE|CHARACTER} MODE]
            [LENGTH len].
    Extras:
    1. ... IN {BYTE|CHARACTER} MODE
    2. ... LENGTH len
    Effect
    This statement searches through a byte string or character string dobj for the subsequence specified in sub_string and replaces the first byte or character string in dobj that matches sub_string with the contents of the data object new.
    The memory areas of sub_string and new must not overlap, otherwise the result is undefined. If sub_string is an empty string, the point before the first character or byte of the search area is found and the content of new is inserted before the first character.
    During character string processing, the closing blank is considered for data objects dobj, sub_string and new of type c, d, n or t.
    System Fields
    sy-subrc Meaning
    0 The subsequence in sub_string was replaced in the target field dobj with the content of new.
    4 The subsequence in sub_string could not be replaced in the target field dobj with the contents of new.
    Note
    This variant of the statement REPLACE will be replaced, beginning with Release 6.10, with a new variant.
    Addition 1
    ... IN {BYTE|CHARACTER} MODE
    Effect
    The optional addition IN {BYTE|CHARACTER} MODE determines whether byte or character string processing will be executed. If the addition is not specified, character string processing is executed. Depending on the processing type, the data objects sub_string, new, and dobj must be byte or character type.
    Addition 2
    ... LENGTH len
    Effect
    If the addition LENGTH is not specified, all the data objects involved are evaluated in their entire length. If the addition LENGTH is specified, only the first len bytes or characters of sub_string are used for the search. For len, a data object of the type i is expected.
    If the length of the interim result is longer than the length of dobj, data objects of fixed length will be cut off to the right. If the length of the interim result is shorter than the length of dobj, data objects of fixed length are filled to the right with blanks or with hexadecimal 0. Data objects of variable length are adapted.
    Example
    After the replacements, text1 contains the complete content "I should know that you know", while text2 has the cut-off content "I should know that".
    DATA:   text1      TYPE string       VALUE 'I know you know',
            text2(18)  TYPE c LENGTH 18  VALUE 'I know you know',
            sub_string TYPE string       VALUE 'know',
            new        TYPE string       VALUE 'should know that'.
    REPLACE sub_string WITH new INTO text1.
    REPLACE sub_string WITH new INTO text2.

  • Detect special character from a String

    Hello guys,
    Some of the files in unix box contain special characters . I need to strip these special character in the filename to underscore. however, I do not want to strip off special character like _ - ^ . @
    Pattern escaper = Pattern.compile("([^a-zA-z0-9_-^.@])");
    I couldn't strip off the caret. Appreciate any advice please. Thanks in advance!
    Cheers,
    Mark

    Hi Alice,
    I tried your suggestion:
         public static void main(String[] args) throws IOException {
              rename(args[0], args[0].replaceAll("[^a-zA-Z0-9\\\\/:@._^-]","_"));
         public static void rename(String from, String to) throws IOException{
              // File (or directory) with old name
              File file1 = new File(from);
              // File (or directory) with new name
              File file2 = new File(to);
              // Rename file (or directory)
              boolean success = file1.renameTo(file2);
              if (!success) { // File was not successfully renamed
                   System.out.println("failed to rename : " + file1);
    C:\workspace\TestOnly\bin>java -cp . com.test.TestClass C:\Apps\mud\1~2.txt
    C:\workspace\TestOnly\bin>java -cp . com.test.TestClass C:\Apps\mud\1^2.txt
    failed to rename : C:\Apps\mud\12.txt
    C:\workspace\TestOnly\bin>java -cp . com.test.TestClass C:\Apps\mud\[email protected]
    C:\workspace\TestOnly\bin>java -cp . com.test.TestClass C:\Apps\mud\1@2$-_3mn.txt
    C:\workspace\TestOnly\bin>java -cp . com.test.TestClass C:\Apps\mud\1@2$-_3mn.txt
    failed to rename : C:\Apps\mud\1@2$-_3mn.txt
    C:\workspace\TestOnly\bin>java -cp . com.test.TestClass C:\Apps\mud\1@2$-_3m'n.txt
    C:\workspace\TestOnly\bin>java -cp . com.test.TestClass C:\Apps\mud\1@2$-_3m'^n.txt
    failed to rename : C:\Apps\mud\1@2$-_3m'n.txt
    C:\workspace\TestOnly\bin>java -cp . com.test.TestClass C:\Apps\mud\1@2$-_3m'^n.txtbut however, whenever I put in a caret in the filename, it always failed to rename. Appreciate your further advice please. thanks in advance!
    Cheers,
    Mark

  • A special character in the last column in my external table

    Hello,
    I'v made a external table that looks like this :
    CREATE
    TABLE "REC_XLS"
    "FINANCE_DATE" VARCHAR2(50 BYTE),
    "CREATION_DATE" VARCHAR2(50 BYTE),
    "SENT_DATE" VARCHAR2(50 BYTE),
    "REMARKS" VARCHAR2(200 BYTE),
    "REMAINING_QUANTITY" VARCHAR2(30 BYTE),
    "CODE" VARCHAR2(30 BYTE)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER DEFAULT DIRECTORY "LOADER" ACCESS PARAMETERS (
    RECORDS DELIMITED BY newline LOAD WHEN CODE!=BLANKS Skip 1 FIELDS
    TERMINATED BY 0X'09' MISSING FIELD VALUES ARE NULL REJECT ROWS
    WITH
    ALL NULL FIELDS ( Finance_date,
    creation_date, sent_date, Remarks,
    remaining_quantity, code) location ( 'Finance.tsv' )
    I exported the result in xls file and I saw in the last column a special character. The result of a copy and paste is prenseted here : "ABE
    You should notice that the last quote is in the upper line instead of at the end of ABE. This means, I think, that there is a carriage return at the end. And the 0X'09' is the tab separator. How can I get rid of this character ?

    my guess is that you run the load on unix server which uses default LF end-of-line character and the file has dos CRLF end-of-line, the easiest option is to change records delimiter in the DDL and replace "RECORDS DELIMITED BY newline" with code below
    RECORDS DELIMITED BY '\r\n'in general end-of-line can be really any character, sample above shows CRLF but it can be TAB, space, | or any other character or set of characters. I have samples of special characters on my blog http://jiri.wordpress.com/2009/01/29/oracle-external-tables-by-examples-part-1/
    hope this helps
    jiri

  • Can I add special character "$" in the function module parameter name??

    Hi Friends
    Can I add special character "$" in the function module parameter name??
    awaiting for your reply,
    Regards
    Praveen

    >
    prashanth kishan wrote:
    > Thomas,
    > ... What if Praveen passes the $ parameter in that unknown FM and suddenly theres smoke coming from the rear of the CPU? Who's answerable to that??
    >
    > pk
    Blame Canada!

  • No mapping at the fault address error while accessing the string variable

    Hi
    we have a application which runs fine on AIX and HP but is throwing error on SOLARIS.
    the application runs well (and use of string variables are also working fine ) till it hits Zone.cpp file
    where the string variable is not getting initialized and throws no mapping at the fault address
    the code snippet is as follows
    #include <string>
    #include <vector>
    const string ZONE_ATTR_TYPE_ZN("ZN");
    const string ZONE_ATTR_TYPE_FC("FC");
    const string ZONE_ATTR_TYPE_ST("ST");
    void Zone::AddAttributeValueAndCountryCode(const string &attributeValue,
                                                      Int attribSeq,
                                                      const string &countryCode,
                                                      ZoneSearchLocMap& zoneSearchLocMap)
         string key = "";
         if ((_attributeType == ZONE_ATTR_TYPE_FC) ||
              (_attributeType == ZONE_ATTR_TYPE_CT))
              key = _attributeType+DELIM+attributeValue;
    we are running it on
    CC: Sun C++ 5.9 SunOS_sparc Patch 124863-04 2008/04/16
    compiled with these option
    -g0 -xspace -KPIC -D_XPG5 -m32 -xarch=sparcvis -mt -DNCURSES -DEXC_HANDLING -DRW_NO_BOOL
    and the created the execuatble with these option
    -i -z rescan -g0 -xspace -mt -D_XPG5 -m32 -xarch=sparcvis -mt -DNCURSES -DEXC_HANDLING -DRW_NO_BOOL -lpthread -lsocket -lnsl -ldl -lposix4 -lCrun -lCstd -lc -lm -lnsl -lsocket
    the dbx output
    t@1 (l@1) program terminated by signal SEGV (no mapping at the fault address)
    where -h
    Current function is Zone::AddAttributeValueAndCountryCode
    56 if ((_attributeType == ZONE_ATTR_TYPE_FC) ||
    (dbx) where -h
    current thread: t@1
    =>[1] Zone::AddAttributeValueAndCountryCode(this = 0x194c088, attributeValue = CLASS, attribSeq = 1, countryCode = CLASS, zoneSearchLocMap = CLASS), line 56 in "Zone.cpp"
    [2] ZoneLoader::Load(trans = CLASS, zoneList = CLASS, prZoneList = CLASS, zoneSearchLocMap = STRUCT, planningCompany = 0x1890f20), line 90 in "ZoneLoader.cpp"
    [3] ZoneManager::ZoneManager(this = 0x1933e28, shipperId = 1000, consDBConnection = CLASS), line 24 in "ZoneManager.cpp"

    I see you are compiling with -KPIC. Is the code going into a shared library?
    Run "ldd" on all the C++ shared libraries you create, and on the main program. You should see a dependency on /usr/lib/libCrun.so.1 and /usr/lib/libCstd.so.1, and no dependency on any other libCrun or libCstd.
    Do you have a particular reason for using -D_XPG5? Changing the Unix version presented by the system headers in /usr/include can sometimes create incompatibilities with the C++ headers and runtime libraries that are intended for the default Unix version.
    Are all of the object files created with the same options, especially the -mt option?
    If none of the above considerations raise any red flags, you might have run into a bug in the compiler or the C++ runtime libraries, or you might have a bug in your code that by accident does not show up in other environments.
    There is no way to evaluate whether you have a compiler or runtime library bug without a test case that demonstrates the problem.
    You might have heap or other data corruption in your program due to invalid pointer use, use of an uninitialized variable, reading or writing outside the bounds of an object, double deletion of an object, use of an object after it has been deleted. You might also have an MT programming error where a critical region is not properly guarded, or where a shared variable is not declared volatile.
    By accident, data can be read or written incorrectly, or a data-race condition can exist, but without causing program failure. A program containing these errors can appear to run successfully on one platform and fail on another, or on the same platform under other conditions.
    Running the program under dbx with Run-Time Checking enabled will show many of these errors.
    The Thread Analyzer can find data race conditions.
    If you think you have found a problem with the compiler or libraries, please file a bug report at
    [http://bugs.sun.com]
    with a test case that can be compiled and run to show the problem.

  • NewLine Character in the String received from Interactive Adobe Form

    Hello Experts,
    Following is the issue we have with interactive Adobe Form
    We have a text area within the form. User enters the text in multiple lines in this text area.
    We are calling a backend function module designed in SE37 that accepts and process the data from the adobe form.  We are also processing the string data user enters in the text area.
    When we receive the string from the form, the newline character within the string is displayed as '#' in the debugger. We tried splitting this string using cl_abap_char_utilities=>newline and cl_abap_char_utilities=>cr_lf  but NO luck. Though in the debugger we see cl_abap_char_utilities=>newline  as '#'  in the debugger and also '#' is present within the string, for some reason when string is processed to find cl_abap_char_utilities=>newline, we can find/locate it.
    Because ABAP code is not able to identify the newline character within the string received from Adobe form, we are not able to maintain the formatting of the string as it was entered in the form.
    Any help to resolve this issue is appreciated.
    Thanks in Advance.
    Regards,
    Bhushan

    Hi Bhushan,
    I was going through your issue, and I feel this is something you can do with scripting. Basically you should read whole string and find the new line character and replace with a space or comma, as per your requirment.
    Do like following:
    In the exit event of the field select java script and write following code:
    var strng = this.rawValue;
    strng.replace(/\n/g, " ");
    above im reaplcing new line with a space.
    I think it should work I have not tested it. Pls update if you test it .
    Regards,
    Ravi.D

  • How can i view the already permitted special character in the system

    Hi,
         How can i check already permitted special character in the BI System.
    Suppose i am adding some special character with the help of RSKC.
    I want to view the already permitted special character in the system.
    Usefull answers are really helpfull.
    MRC.

    hi,
       Thanks for your all user full answer.
    Actually my problem is, i am loding some datas with some speicial character(*,&,#).My data got loaded with out any error.
    The same special character(*,&,#) i checked it over the table RSALLOWEDCHAR.
    But the special character character is not available in that table.
    Thats why i am thinking , with out any error how my datas got uploaded.
    At the sametime special char is not maintained in the table RSALLOWEDCHAR.
    Is there is any other way to maintain the Special char(*,&,#).
    Shall i want  to check any other table apart from the  above tabe.
    Kindly explain the same.
    Thanks & Regards,
    MRC.

  • ' character in the string

    Hello.
    I'm trying to insert string to varchar value in the database which contains the ' character. But it throws the error....
    how can i replace this character to some another character in the string before inserting it to the database?
    thanks

    public String replace(char oldChar,
    char newChar)Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.
    Fred

  • SharePoint key word query, how does the "Query Text" query special character in a query variable?

    I have a no code sandbox solution, in a content by search web part, I want to return pages from the library except the page I am visiting.
    I have 2 pages:
    Page A, the title is: Page title without special character
    Page B, the title is: Page title with special character "a b c d ..."
    And then I use Title<>{Page.Title} in the query text of the CSWP.
    While I visit Page A, the CSWP returns Page B, it works as expected.
    But while I visit Page B, the CSWP returns nothing, expected result should be Page A. I just consider, whether the special characters in the Title of Page B breaks the query text.
    I can not find similar topics in the forum, Does anyone have idea?
    Many thanks!

    Thank you for your feedback, Daniel.
    I have some updates, and found the root cause: if the field value contains special characters, the CSWP will not render the double quotation marks around the field value.
    View the page html source, and then find the text "QueryModification", you will see what happen:
    Query Text Input: Title<>{Page.Title}
    1. While the page title is "Test Page 1" (without special character), the rendered query text is
    Title<>\"Test Page 1\". It works as expected.
    2. While the page title is "Test-Page-1" (with special character "-", of cause we have more special characters on production), the rendered query text is
    Title<>Test-Page-1.  The double quotation marks are not rendered by the CSWP, so the query text are broken. It does not work as expected.
    If I make the query text as Title<>"{Page.Title}"
    1. While the page title is "Test Page 1", the rendered query text is
    Title<>\"\"Test Page 1\"\". It does NOT work since the
    quotes are duplicated (no sure why CSWP duplicates the quota mark),
    2. While the page title is "Test-Page-1", the rendered query text is
    Title<>\"Test-Page-1\".  Quotes are correct, but it does NOT work as expected still.
    The expected rendered query text (view from the html source) should be
    Title<>\"Test\\\-Page\\\-1\". (Here is test url: <a href="http://server/_api/search/query?querytext='Title<>"Test%5c%5c%5c-Page%5c%5c%5c-1"'&rowlimit=10">http://server/_api/search/query?querytext='Title<>"Test%5c%5c%5c-Page%5c%5c%5c-1"'&rowlimit=10)
    From the above information, I can say the CSWP not handle the special character correctly ("\" is not inserted before any special charactor).
    Is there any setting in CSWP can be used to resolve above problem?

  • Is there a Special Character for the number of pages in a document?

    I'm creating a template (in cs6) for a series of documents of variable length, and each document needs to be numbered with the format, "page A of Z." I see the special character for inserting the current page number (A) and I'd like to have the number of pages in the document (Z) added automatically as well. Is there a wildcard, special character, or script that will accomplish this? I'd rather not have to enter the number of pages manually as the value will change as these go through the editing process; I'd prefer to have the numbers update automatically. Has anybody done this before?

    Your first suggestion is the only way to capture the last page of a book that's comprised of independent document files. The last page number text variable works only within a single document.
    Anyone who wants a last page in book text variable badly enough can post a feature request at Wishform.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices    
    Arïel wrote:
    Stop press!
    You can also, much more simply, create a new text variable. There is
    specifically one for "last page number". That's much simpler.
    Type>Text Variables>Define>New, and in the Type dropdown just select
    "last page number".
    ariel

  • Special character [ ] on the mainframe

    I'm trying java on the mainframe (03/390 with Unix System Services Enabled, Java 1.3.1). This is all new to me so bare with me.
    When I compile the HelloWorld.java code:
    class HelloWorld {                                         
    public static void main(String[]args) {         
    System.out.println("Hello World!") ;
    in my DOS window it works fine and I am able to run it.
    When I compile the same,exact code in my unix shell, I receive the following compile error:
    HelloWorld.java:3: illegal character: \168
    public static void main(String[]args) {     

    HelloWorld.java:5: ')' expected

    Is there a difference in the character sets between the systems or am I just missing something?

    Doesn't 0S/390 use some form of EBCDIC which is not ASCII compatible?
    If encodings are the problem, you can force "javac" to interprete the file using a particular character encoding with the "-encoding" switch. Example:
    javac -encoding US-ASCII HelloWorld.java

  • Problem to put a special character in a string

    I read a file that contains some special characters.
    One of them has a hexadecimal value '8D'.
    When i put this in a string or a char, it give me '?'.
    If i read my file int by int, this char value is 65533
    How can I do to display this character as it must be? How can i transform it to put it in a string?

    8D is "reverse linefeed" in unicode: http://www.unicode.org/charts/PDF/U0080.pdf
    Obviously it's something else in your system's character encoding. What do you think you should get from 8D?

  • Request for an sql to scan for a special character from the tables

    Hi Gurus
    request for an sql statement for finding the character (and replace with a single byte character ) which occupy
    multibytes(in a unidata char set database) the database which is yet to be migrated to unidata(multibyte) database
    any kind of help is highly apprciated
    Thanks in advance

    Query below will find all bulti-byte characters in string column:
    select  string_column,
            substr(string_column,column_value,1)
      from  some_table,
            table(
                  cast(
                       multiset(
                                select  level
                                  from  dual
                                  connect by level <= length(string_column)
                       as sys.OdciNumberList
      where lengthb(substr(string_column,column_value,1)) > 1
      order by string_column,
               column_value
    /SY.

Maybe you are looking for