How to handle single quote between two single quotes in ABAP?

Dear SAP Gurus
I have a question regarding handling a string data.
Say I have a string  ABCD'\&%$!!ABC'AAA123.   Please notice that there are single quotes in my string.
I am writing a parser code in ABAP and getting into problem with if statement to check if the character read is a single quote.
When I type the following with a singleQuote between 2 singleQuoes as below, it gives error.
If CHAR = '''.
ENDIF.
How do I handle that? I searched for escape sequence and couldn't get any useful info.
Any feedback will be highly appreciated.
Thanks
Ram

Or just use string literals
if char = `'`.   "note that ` is the "backquotation" mark not a regular quotation mark '
Regards
Marcin

Similar Messages

  • SQL Injection, replace single quote with two single quotes?

    Is replacing a single quote with two single quotes adequate
    for eliminating
    SQL injection attacks? This article (
    http://www.devguru.com/features/kb/kb100206.asp
    ) offers that advice, and it
    enabled me to allow users to search name fields in the
    database that contain
    single quotes.
    I was advised to use "Paramaterized SQL" in an earlier post,
    but I can't
    understand the concept behind that method, and whether it
    applies to
    queries, writes, or both.

    Then you can use both stored procedures and prepared
    statements.
    Both provide better protection than simply replacing
    apostrophes.
    Prepared statements are simple:
    Set myCommand = Server.CreateObject("ADODB.Command")
    ...snip...
    myCommand.CommandText = "INSERT INTO Users([Name], [Email])
    VALUES (?, ?)"
    ...snip...
    myCommand.Parameters.Append
    myCommand.CreateParameter("@Name",200,1,50,Name)
    myCommand.Parameters.Append
    myCommand.CreateParameter("@Email",200,1,50,Email)
    myCommand.Execute ,,128 'the ,,128 sets execution flags that
    tell ADO not to
    look for rows to be returned. This saves the expense of
    creating a
    recordset object you don't need.
    Stored procedures are executed in a similar manner. DW can
    help you with a
    stored procedure through the "Command (Stored Procedure)"
    server behavior.
    You can see a full example of a prepared statement by looking
    at DW's
    recordset code after you've created a recordset using version
    8.02.
    "Mike Z" <[email protected]> wrote in message
    news:eo5idq$3qr$[email protected]..
    >I should have repeated this, I am using VBScript in ASP,
    with an Access DB.
    >

  • How do I share music between two accounts on the same i-mac

    How do I share music between two accounts on the same i-mac

    iTunes: How to share music between different accounts on a single computer - http://support.apple.com/kb/HT1203 - relocating iTunes' media folder to a shared area but leaving separate library files - extra tip at https://discussions.apple.com/message/17331189

  • How to share the data between two or more frames

    How to share the data between two or more frames based on the database relationship in JDeveloper?

    You can pass data between frames by passing it as parameters.
    That is when you are invoking another frame, pass your data as arguments through the constructor to that frame .
    You can also achieve this through static or public methods, but static variables as we know is not suggested which might occupy more memory space.
    Regards,
    Srinivasan AShwath
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
    How to share the data between two or more frames based on the database relationship in JDeveloper? <HR></BLOCKQUOTE>
    null

  • How do I share files between two Macs on my wireless network?

    I have an iMac G4 and an ibook G3 on a wireless network. I have "file sharing" activated on both computers. (Also Appletalk, which may or may not be a misguided move, but I got the idea from OSX "Help.")
    When I try to get from either computer onto the other, my computer is recognized by name (another alternative is to log on as a "guest"). I'm prompted for a password. None of the passwords I use works. I've tried the administrative passwords for both computers.
    How do I get beyond this hurdle to share files? I've posted elsewhere to no avail. This must be an easy one. How do you share files between two macs on one network?

    Do your accounts on the machines have the same short name? It's an issue I've seen a few names.. one machine with bsmith, the other with bobsmith, but the long names for both being "Bob Smith". The login windows would confuse users because it showed their names, but because the short names didn't match, it wouldn't work.
    The password you should use is the administrative one, so I don't know why you're not having luck.

  • In BADi , How to pass the values between two Method

    Hi Experts,
    We have two methods in BADis. How to pass the value  between two Methods. Can you guys explain me out with one example...
    Thanks & Regards,
    Sivakumar S

    Hi Sivakumar!
    Create a function group.
    Define global data (there is a similiar menu point to jump to the top include).
    Create one or two function modules, with which you can read and write the global data.
    In your BADI methods you can access the global data with help of your function modules. It will stay in memory through the whole transaction.
    Regards,
    Christian

  • How e-mail is routed between two servers

    Hi ,
    Please anybody tell me how e-mail is routed between two servers , from the software point of view as well as hardware point of view .
    And how Java mail API related to that .
    Thanks,
    Kiz

    If you're looking for a simple answer there isn't one. Here's a place to start.
    http://community.roxen.com/developers/idocs/rfc/rfc974.html

  • How can i get report between two dates?

    Hi
    how can i get report between two dates?
    for example i want get reports between 20/4/2002 & 27/4/2002.
    my table has date column and i can get first date( exam : .... where date:=a and/or ....i don't know this part)
    thanks alot.
    Regards
    The Oracle Reports Team
    http://otn.oracle.com/

    where exam_date between :from_date and :to_date
    from_date and to_date are user_parameter

  • How to delete a path between two anchor points

    hi ,
    it's all in the title ,
    could you tell me  please how to delete a path between two anchor points without using the path eraser tool ?
    When I select these two anchor points and press delete everything is gone.
    ps : I want to keep the anchor points after the deletion
    Thank you

    Silkrooster wrote:
    With some experimentation, I did find that selecting the path can leave orphan points. So keep that in mind as it may be necessary to use Object>Path>Clean up...
    You will not get orphan points if you delete a segment that is not at the end of a path.  For segment that is at the end of a path, or is the entire path, select the end point/s and press delete. For the one segment that is entire path you can use the selection tool (black pointer) or hold Alt with the direct selection tool (white pointer) which is useful for objects in a group.

  • How to create radio button between two slection screen

    hello all.
    could you please guide me how to create radio button between two SELECTION-SCREEN  in screen painter.
    Thank you,
    srinivas

    hi
    SEE THIS CODE
    REPORT  ZNNR_REPORT NO STANDARD PAGE HEADING MESSAGE-ID ZNNR LINE-SIZE 100 LINE-COUNT 65(4).
    ******DATA DECLARATIONS**********
    DATA : BEGIN OF IT_PLANT OCCURS 0,
            MATNR LIKE MARA-MATNR,
            WERKS LIKE MARC-WERKS,
            PSTAT LIKE MARC-PSTAT,
            EKGRP LIKE MARC-EKGRP,
           END OF IT_PLANT.
    DATA : BEGIN OF IT_PONO OCCURS 0,
            EBELN LIKE EKKO-EBELN,
            EBELP LIKE EKPO-EBELP,
            MATNR LIKE EKPO-MATNR,
            WERKS LIKE EKPO-WERKS,
            LGORT LIKE EKPO-LGORT,
           END OF IT_PONO.
    TABLES EKKO.
    ********END OF DATA DECLARATIONS*********
    ********SELECTION SCREEN DESIGN ***********
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1.
    SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : R3 RADIOBUTTON GROUP G2 DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R3.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : R4 RADIOBUTTON GROUP G2.
    SELECTION-SCREEN COMMENT 5(20) TEXT-004 FOR FIELD R4.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-004.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : R1 RADIOBUTTON GROUP G1 DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 5(20) TEXT-002 FOR FIELD R1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : R2 RADIOBUTTON GROUP G1.
    SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    ******END OF SELECTION SCREEN DESIGN****************
    <b>rEWARD IF USEFULL</b>

  • How to remove white space between two answer reports

    How to remove white space between two answer reports
    In Dashboard section I have 2 rqeuest. Each request renders Table View. When I display dashboard, it show white space separating the 2 table views. How do I get rid of the white space/white band ?

    See this link
    Re: Eliminating the space between two reports in OBIEE dashboard page Section
    Regards,
    Sandeep

  • How to Break the cluster between Two servers

    Hi Experts,
    Since Iu2019m new to BOBJ XI R2.I would like to know how to break the cluster between two servers.
    Description :
    So far we took the copy of QAS Server1 to the new QAS server2 (Through Mirroring Tool ). Now those two servers are cluster together, I can see QAS server1 CMS Name, Cluster Name, cluster member name in QAS Server2 (CMC-> Setting -> Cluster).
    Besides in QAS Server1 CMS Name and Cluster name are pointing to the QAS Server1, except Cluster Member (This is still have two members Server1 and Server2).(CMC-> Setting -> Cluster).
    In QAS Server1 and QAS Server2 (CMS-> Servers), I can able see both server name under Machine Name tab.
    I would like to make those two servers as independent servers. There are two different data source for those two servers. I want to remove the cluster in both servers.
    Right now QAS Server1 is running and QAS Server2 is stopped.
    If i create/modify a group under new Mapped NT Member Groups in QAS server2 ,it is getting reflecting in QAS server 1.
    Could you please tell me the steps to resolve this problem.
    BO Version: BO XI R2
    Regards,
    Sridharan

    Hi,
    Maybe the external CMS is still 'attached' to your SIA node. Please go to the CCM (Central Configuration Manager) and stop the SIA (Server Intelligent Agent). On one of the tabs you can see if there is an external CMS part of your environment. Delete it and restart the SIA. Retry if you can delete the services now from within your CMS. It may well be that you have to stop both environments and delete each others CMS via the CCM to get it working. If you have not changed any permissions for your Administrator account the security model will not be the one causing this.
    Hope this helps...
    Martijn van Foeken
    Focuzz BI Services
    http://www.focuzz.nl
    http://nl.linkedin.com/in/martijnvanfoeken

  • How to insert an image between two pages?

    How to insert an image between two pages? and how do remove the line of separation between two pages?.
    Attached image shows, there is a photo of two pages and no line of separation in the pages!

    Michi Thanks, but that option is only available on one page (2 columns), not to put two pages! see new image

  • Is there a way to sync past messages from my old iPhone to my iPhone 5 ? I'm aware of the iTunes backup syncing but how would I transfer that between two devices ?

    Is there a way to sync past messages from my old iPhone to my iPhone 5 ? I'm aware of the iTunes backup syncing but how would I transfer that between two devices ?

    Restore from old iPhone backup can past all data including messages to your new iPhone. Or you can resfer to this iPhone 4/4S SMS to iPhone 5 transfer tutorial. It shows you how to transfer messages only.

  • How to to make Cluster between two server 2012 Datacenter with share storage and Hyper-V role then install Exchange 2013 on each server datacenter then make DAG between Exchange servers

    Dears,
    I have IBM Flex server with built in storage,  
    HOW to to make Cluster between two  server 2012 Datacenter with share storage and Hyper-V role then install Exchange 2013 on each server datacenter then make DAG between Exchange servers?
    If there any prerequisites of the Share storage types ?and any configuration guide to deploy Cluster between two Server 2012 datacenter ?

    Microsoft Failover Clusters require shared storage.  If you wish to create a failover cluster with local storage, you need to use third party software to mirror the disks and present it to the hosts (siog.com, datacore.com, starwind.com).  If you
    use third party software, you will need to follow their instructions for configuring the environment.
    Questions on how to configure Exchange environments are better asked in an Exchange forum.
    .:|:.:|:. tim

Maybe you are looking for

  • Unable to delete file after in a file adapter

    Hello, I have a BPEL process , which gets invoked when there is a new .PDX file in a folder. After processing the data from the file , I want to move into the archive folder. The process moves the file properly to the archive folder, but I am unable

  • WORKED FOR ME : MacBook Pro mid 2010 black screen problem

    Hello Good news 'til now : Like for some mid-2010 macbook pro owners, I started to have a recurrent (daily) problem : when I was using the trackpad to do something in Opera, Safari or QuickPick (Launchpad clone), I had very often seen suddenly my lap

  • Maximum file size on SM19 ( Dynamic Configuration )

    Hello,     How i can change <b>Maximum File Size</b> on SM19 (Dynamic COnfiguration no static) ?     Thanks in Advance     Jean Pierre Telschow

  • Converting all to upper case

    Hi, Am loading from a flat file. I need to convert all the data into upper case before loading. Can some one help me out with this. Where and how? Thanks.

  • Calculation procedure TAXINJ and tax key E1 not in table T007A

    Hi guys, While creatig a sales order I am getting the following error: " Calculation procedure TAXINJ and tax key E1 not in table T007A" Kindly suggest corrective measures. Bst regards, Ashok