How can I convert a space from ABAP to CSV data?

Hello guys,
how can I convert a string like
"This is a%test%"
to
"This is  a test "
into CSV data?
I try to with   REPLACE ALL OCCURRENCES OF '%' IN string_above WITH space,
but I got the string without space, like
"This is  atest"
I read some posts that CSV will ignore space.
But which kind of symbol in CSV represents space?
Thanks for any suggestion!
Regards,
Liying

USE THE CODE AS SHOWN BELOW...
TYPES : BEGIN OF tp_data,
          line(4096),
        END   OF tp_data.
*&      Form  gui_upload
      Upload the data from the input file to the internal table
FORM gui_upload.
*--Local data declaration
  DATA: l_filename_ip TYPE string,
        tl_data       TYPE STANDARD TABLE OF tp_data WITH HEADER LINE.
  l_filename_ip = p_input.
*--Upload Data
  CALL FUNCTION 'GUI_UPLOAD'
       EXPORTING
            filename                = l_filename_ip
            filetype                = 'ASC'
            has_field_separator     = ''
       TABLES
            data_tab                = tl_data
       EXCEPTIONS
            file_open_error         = 1
            file_read_error         = 2
            no_batch                = 3
            gui_refuse_filetransfer = 4
            invalid_type            = 5
            no_authority            = 6
            unknown_error           = 7
            bad_data_format         = 8
            header_not_allowed      = 9
            separator_not_allowed   = 10
            header_too_long         = 11
            unknown_dp_error        = 12
            access_denied           = 13
            dp_out_of_memory        = 14
            disk_full               = 15
            dp_timeout              = 16
            OTHERS                  = 17.
  IF sy-subrc <> 0.
    MESSAGE ID   sy-msgid TYPE 'S' NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    IF sy-subrc = 1.
      MESSAGE e000 WITH text-e04.
    ENDIF.
  ELSE.
    LOOP AT tl_data FROM 2.
*--Taking the contents of the input file leaving the header part
      PERFORM split_and_save USING tl_data-line.
    ENDLOOP.
  ENDIF.
ENDFORM.                    " gui_upload
*&      Form  split_and_save
      Splitting the contents from the input file and saving them into
      an internal table
     -->P_TL_DATA_LINE  text
FORM split_and_save USING fp_data.
*--Local data declaration
  DATA : tl_data TYPE STANDARD TABLE OF tp_data WITH HEADER LINE,
         l_type  TYPE c,
         c_space(1) TYPE c VALUE ' '.
*--Split at the Comma
  SPLIT fp_data AT c_space INTO TABLE tl_data.
  CLEAR inputtab.
*--Move it to the target fields
  DO.
    ASSIGN COMPONENT sy-index OF STRUCTURE inputtab TO <fs_field>.
    IF NOT sy-subrc IS INITIAL.
      EXIT.
    ENDIF.
*--Extract source data
    CLEAR tl_data.
    READ TABLE tl_data INDEX sy-index.
*--Populate the target
    <fs_field> = tl_data-line.
  ENDDO.
*--Append this record
  APPEND inputtab.
ENDFORM.                    " split_and_save
In the above code u can use make inputtab like tp_data and get the result as requires in an internal table as space seperated fields.
In place of space u can also use any other symbol.
And after that u can replace all occurences of space with the comma by using the statement that u have written below.

Similar Messages

  • How can i convert video files from my mac to watch them on my iphone?, how can i convert video files to watch them on my iphone?

    how can i convert video files from my mac to watch them on my iphone?, how can i convert video files to watch them on my iphone?

    Turns out the answer to that question changes if you ask it more than 4 times, so ask it again....
    The answer depends on the type of video files you want to convert.  If they are DRM protected commercial videos, no help can be given here.  Google.

  • How can I convert .cp projects from Captivate 2 to .cptx projects for Captivate 7?

    How can I convert .cp projects from Captivate 2 to .cptx projects for Captivate 7? Do I have to use some other version between 2 and 7 to do this?

    I doubt you are going to be able to find all those previous versions and the time it would take to install, open the project, verify it, and everything in between (and without license keys, they would only be saved from trial versions which would be an issue), it seems it would be better just to start with Cp7 and put the effort into that.
    Completely off topic, one of the things I like about Authorware is that Macromedia provided previous versions that would allow you to open up and save the projects to get to version 7. It was a nice little touch they provided for developers. I don't believe that Adobe does this for Captivate though.
    Dave

  • How can I convert/read out from a string Hex (8-bit), the bit 0 length 1

    How can I convert/read out from Hex (8-bit), the bit 0 length 1 (string subset!!??) and convert it to decimal.
    With respect to one complement and two complement ?

    Just like Jeff, purely guessing here.
    It almost sounds like you just need to Read from Binary File?
    AND the 8-bit number with 1?
    Need more details.  What exactly do you have to start with?  What exactly are you trying to get out of it?  Examples help.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How can I convert datalog files from LV5.0 to LV6i?

    I have some datalog files from LV5.0 and I'd like to use them in LV6i, but when although I push convert when asked in the moment of reading the file,it provides input parameter invalid when reading. I'm using the same vi I used to create and read them in LV5, so it's not supposed to be a program mistake. How can I convert them?"

    Hello,
    Thanks for answering my question. I downloaded LV6.02 as you suggested but the problem persists.
    I don't know maybe it's something very simple. I have attached 1 program to read the datalog file and another one that reads it in every version (LV5.0 and LV6.02) in case you can help me.
    Thanks again,
    Javi
    Attachments:
    WriteLV5.vi ‏65 KB
    OpenLV5.vi ‏74 KB
    OpenLV6.vi ‏59 KB

  • How can I print PDF attachments from ABAP report in transaction ME23N?

    Hi,
    Users attach PDF files using "services for objects" in transaction ME23N.
    How can I print the PDF attachments from ABAP report ?
    Thanks in advance,,

    Hi,
      check this link,this might help you to solve your problem
    /people/thomas.jung3/blog/2005/04/28/setting-up-an-adobe-writer-for-abap-output
    Regards
    Kiran Sure

  • How can i convert my file from RGB to CMYK?

    I need to convert my pages project from RGB to CMYK.  How can I do this?

    Which version of Pages and can you be more specific about what file you have and what you are intending to do with it?
    Peter

  • How can I convert my imovie from ipad to burn dvd on PC

    I have produced a 30 minute video for my son's football team using Imovie on my ipad.  I do not have an apple computer and need to convert the imovie to my PC in order to burn DVD's.  This process seems impossible.  I have read many forums and am trying to export the project to my camera roll, however the process never completes itself.  It will export for literally hours without completing the process.  This project have taken me weeks to complete, mainly because the process is very slow with imovie and extremely frustating.  Now, I'm ready to finish up and am so worried I will never get it off my ipad.  What do I do??

    NO files larger that 500mb (which is **** near any video)  will not transfer!
    At: http://support.apple.com/kb/HT4083
    It incorrectly state this:
    "Windows XP cannot import video files larger than 500 MB using Camera and Scanner Wizard. You can transfer these files directly from your device by selecting them in My Computer and dragging or copying the movie files to your computer's hard drive."
    Problem is that NO videos are shown as I open my ipad up in "My Computer", only photographs I have taken
    THIS INSANE.  You put Hign Def Video camera on the IPAD and NO simple way to get the you home made videos of it?  Search this topic "transfer video from ipad to computer"  you get NO help.  the only responses are from people hocking there "computer programs that will do it"  or "apps" that transfer files. 
    Apple here is the reality. At this point, regarding computers, PC is King...get it?  We do not all have apple computers to go along with our ipads.  ... So incase i need to break it down for you....YOU NEED TO HAVE A EASY WAY TO REMOVE VIDEOS FROM AN IPAD TO A FREAKIN PC...
    I am not sure what is most amazing:
    -ipad designers not seeing this as a problem
    -the lies at http://support.apple.com/kb/HT4083 that discuss easy it is to simply open up "my computer" and drag an drop
    -ignorant people responding to several other people with my same simple problem with stupid response like "so you want to put a video on your ipad, you do that thru itunes" or "gosh it's been a while since i did this but its real easy, i think..."
    There are not even any you tube videos on the subject... Am I in Bizzaro World here????

  • How can i convert a url from https to http?

    Hi,
    SSL is enabled in WLS 9.2 and its wrkng fine. And iam able to access login page in secure(https)mode. After this page i need to convert the url from https mode to http. For enabling https i added some code in web.xml. For switchinng https to http i dn't knw anythng.
    Pls gve me suggetion.
    Thanks in advance.

    Export it from iPhoto. This process will make a QuickTime movie of it. That will play on an PC that has QuickTime installed - and that's a free download for PC, and comes with iTunes for PC
    Regards
    TD

  • How can I convert a l7680 from USB to wireless

    I have a L7680 setup to print via a USB connection.  How can I change that to a wireless connection without un/reinstalling the whole program.
    Thx
    Dave
    WinXP SP3 IE8 MDE all updates
    This question was solved.
    View Solution.

    Hi,
    Your printer has a NIC (wired) therefore you can add it to your home network thru a router which has LAN port(s) using CAT5 or CAT5e or CAT6 cable. Please use this book as a guide how to connect:
      http://h10032.www1.hp.com/ctg/Manual/c00389927.pdf
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How can I convert a catalogue from PSE on an old PC to a PSE 11 catalogue on another PC?

    I tried to do it according to the instructions in the help menu, however PSE 11 does not even recognize the file format.

    How did you transfer the pictures and catalog to the new PC ? The recommended way is to do a full backup on the old PC, and a restore on the new one.
    http://helpx.adobe.com/photoshop-elements/kb/backup-restore-move-catalog-photoshop.html
    The restore process should first restore the picture files, then convert the catalog to the new PSE11 format.
    The problem is different if you install PSE11 on the same old computer, you don't have to move files, only convert to the old format catalog.

  • How can I convert a project from LabWindows/CVI 2010 to a Visual Studio 2011 project?

    I have a good sized project, 12 source files, 14 headers, 1 uir, that I want to be able to edit and compile in MS Visual Studio 2011, MSVC++.
    I remember being told that LabWindows dropped support for C++ in 2008 and no longer had a wizard for converting projects. I know I can go the DLL route, but I have never created a DLL before and wouldn't know where to begin with it. What would be the best way to go about this conversion?
    Solved!
    Go to Solution.

    CVI 2010 still supports the Visual Studio Conversion Wizard for Visual Studio 2005/2008. We do plan to add support for VS 2010 in a future release.
    If you need a VS 2010 project now, you can use the Visual Studio 2008 conversion wizard, then upgrade the VS 2008 project to VS 2010.
    National Instruments
    Product Support Engineer

  • HT5182 How can I convert Raw images from iphoto to jpg for the web?

    I have some pictures in Raw mode stored in my Iphoto that I need to convert in JPG for the web and to print in business cards, I have been going around e-mailing the pictures to myself in large or medium size and then saving them again to my iphoto. Is there a way to do this from iphoto directly?

    iMac (24-inch Early 2009), iOS 6
    Are your pictures on your iMac or on an IOS device?
    On your iMac use "File > Export " set the jpeg quality and size you want:
    Regards
    Léonie
    Sorry, Ralph, I see, we have been cross posting

  • How can I delete the space from "other" in my iPhone 5?

    I have an iPhone 5 (iOS 8.1.2) and the "other" space is taking 5.63GB! I've tried a few things like deleting old mails or messages but it's not getting better. Please help!!

    See Kappy's very well written user tip:
    What is "Other" and What Can I Do About It?

  • How can I convert iPad AWAY from Verizon? Or am I trapped forever?

    I only need iPad connectivity when traveling, so I sign up for 30 days and one gig. But it auto renews. 
    Now, Verizon 800 phone number has "technical problems " please call back later, and live chat says my agent is typing while at the same time saying I'm not in chat please wait..
    Is there any way to dump these people without buying a new iPad? (their much ballyhooed coverage fails miserably when in Austin btw)

    The Verizon model is locked to different frequencies than the AT&T one. They are physically different models. You're stuck with them unless you can get a trade-in.
    Another, cheaper, option would be to buy a mobile hotspot from your choice of carrier and connect to that over wifi.

Maybe you are looking for