Work with text with blank spaces, how separate text?

Hi:
I have a problem in abap programming, I hope you could help me.
I have a txt file, with a code and its description. I have this file uploaded to a sap internal table, in same field of internal table are code and description.
The problem is next:  I need only the code, not the description, but length of code is not constant, and it is separated from description for at least two blank spaces. The code contains also a blank.
Do you know how I can take only the code until these two blanks spaces? Any abap function, any idea..?
Thanks in advance for your help.

Hi,
You could use split. if you code always contain a blank space then you won't have any problem.
data: a(30).
data: b(10).
data: c(10).
data: d(10).
a = 'XY ABCDEF  EFGHI'.
SPLIT a at space into b c d.
Regards,
Nitin.

Similar Messages

  • Why FileUtils::CopyFile doesn't work with blank space?

    Hi all,
    If I have a destination directory with blank space inside, looks like: "C:\Users\Pattrick James\Documents" for Windows or "Macintosh HD:Users:Pattrick James:Documents" for Mac.
    Then I want to copy a file to that directory, use FileUtils::CopyFile(src, des). Why it doesn't work?
    Can someone please help me to resolve this issue without change my path?

    Sorry, it works fine. It happens because the permission of the directory.

  • How to replace a character in a string with blank space.

    Hi,
    How to replace a character in a string with blank space.
    Note:
    I have to change string  CL_DS_1===========CM01 to CL_DS_1               CM01.
    i.e) I have to replace '=' with ' '.
    I have already tried with <b>REPLACE ALL OCCURRENCES OF '=' IN temp_fill_string WITH ' '</b>
    Its not working.

    Hi,
    Try with this..
    call method textedit- >replace_all
      exporting
        case_sensitive_mode = case_sensitive_mode
        replace_string = replace_string
        search_string = search_string
        whole_word_mode = whole_word_mode
      changing
        counter = counter
      exceptions
        error_cntl_call_method = 1
        invalid_parameter = 2.
    <b>Parameters</b>      <b> Description</b>    <b> Possible values</b>
    case_sensitive_mode    Upper-/lowercase       false Do not observe (default value)
                                                                       true  Observe
    replace_string                Text to replace the 
                                         occurrences of
                                         SEARCH_STRING
    search_string                 Text to be replaced
    whole_word_mode          Only replace whole words   false Find whole words and                                                                               
    parts of words (default                                                                               
    value)
                                                                               true  Only find whole words
    counter                         Return value specifying how
                                        many times the search string
                                        was replaced
    Regards,
      Jayaram...

  • Fill with blanks(spaces) a VARCHAR2 type

    Thanks in advance,
    I have a VARCHAR2 type rtesta's var of length x(100 char)
    how i can fill(write) it without create a other varchar2 var that it'll be only filled with blanks(spaces). e.g
    rtesta := ' PC'||fil1||'xxx||fill2....
    where fil1 = say 10 spaces.. fill2 = 63 spaces and so on
    I would like something as
    rtesta := ' PC'|| RPAD(null,10)||'xxx||RPAD(null,63) ...
    but.... Oracle treats an empty string as null. And nulls are always a bit special within Oracle. Particularly, rpad('', n) and lpad('', n) returns null.
    Exists a built in for my problem?
    Thanks

    alter table your_table modify(your_column char(100));
    update your_table set your_column = ' '
      where your_clumn is null;  /* (added) But,this is no good for performance */
    alter table your_table modify(your_column varchar2(100));Exapmples.
    SQL> set null (null)
    SQL> create table test (vc varchar2(100));
    Table created.
    SQL> insert into test values ('');
    1 row created.
    SQL> insert into test values ('a');
    1 row created.
    SQL> insert into test values ('abcde');
    1 row created.
    SQL> select substr(vc,1,10) vc,length(vc) len from test;
    VC                          LEN
    (null)               (null)
    a                             1
    abcde                         5
    SQL> alter table test modify(vc char(100));
    Table altered.
    SQL> update test set vc = ' ' where vc is null;
    1 row updated.
    SQL> alter table test modify(vc varchar2(100));
    Table altered.
    SQL> select substr(vc,1,10) vc,length(vc) len from test;
    VC                          LEN
                                100
    a                           100
    abcde                       100----
    I misread OP's problem, sorry.
    Message was edited by:
    ushitaki

  • Pass parameter with blank space for report ver 6

    Hi,
    I face a problem that i willing to pass the acno where it's value with blank space, for example ' 9' as parameter into my report, and assign it as v_acno. Inside the report query i add a where condition, acno >= :v_acno. When i run the report and pass acno without ' , it do not show any record. But when i run the report and pass acno with ' then able to show the records.
    for example the value i key in
    with ' = ' 9'
    without ' = 9
    So how i can solve it by pass the acno without ' but the record still able to show?
    thks
    Message was edited by:
    user569740
    Message was edited by:
    user569740

    Hi Nick,
    It occurs because an argument of the DTExec commands must be enclosed in quotation marks if it contains a space. From the dtexe (SSIS Tool): Syntax Rules section of the
    dtexec Utility (SSIS Tool) document, we can see:
    All options must start with a slash (/) or a minus sign (-). The options that are shown here start with a slash (/), but the minus sign (-) can be substituted.
    An argument must be enclosed in quotation marks if it contains a space. If the argument is not enclosed in quotation marks, the argument cannot contain white space.
    Doubled quotation marks within quoted strings represent escaped single quotation marks.
    Options and arguments are not case-sensitive, except for passwords.
    So, you need to make the value of the variable @QUERY_STRING within double quotes in the value of the variable @Cmd or remove the space within the @QUERY_STRING value.
    Regards,
    Mike Yin
    TechNet Community Support

  • Replacing # with blank space in Bex Analyser

    Hi All,
    Can any one help me out in replacing # values in Bex analyser with blank space.
    I tried with the macro:
    Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
    ' First Query in the workbook
    If queryID = "SAPBEXq0001" Then
    ' Selects the area where the report query is rendered
    resultArea.Select
    'Replace "" with 0
    Selection.Cells.Replace What:="", Replacement:="0", LookAt:=xlWhole, _ SearchOrder:=xlByRows, MatchCase:=False, MatchByte:=True
    End If
    End Sub
    Means I have include the macro to the Excel, but still it is not working.
    If this macro is the correct solution, then may be I am not using it properly(in the sense I'm not calling with proper syntax).
    Please provide me with the solutiuon to get rid of this problem.

    Hi,
    We are using BEX 7.0.
    I got a macro code which is working. The code is as follows.
    Dim resultArea As Range
    Set resultArea = varname(1)
    Dim c As Range
    For Each c In resultArea.Cells
    If c.Value = "#" Then c.Value = " "
    Next c
    This works fine but the problem is that this macro code should be added each and every time when the query is run.
    Can any one suggest me where the code can be added in Bex Analyzer itself, so that when the query is run the above macro runs along with it and removes the #.
    Thanks and Regards,
    Geetha.

  • I bought Numbers because my Excel files would not work with Mavericks. How can I import a non-functioning Excel file into numbers? (As of now, the file NAME transfers but data is not.) but

    I bought Numbers because my Excel files would not work with Mavericks. How can I import a non-functioning Excel file into numbers? (As of now, the file NAME transfers but data does not.)

    HI Dave,
    I'm surprised you get no message when you attempt opening the Excel document in Numbers.
    I'm assuming Numbers 3.1, since you are running Mavericks.
    Does the Numbers file that opens show any content?
    Does it contain a table?
    How large?
    Does it contain more than one tab (indicating more than one sheet)?
    Do those other tabs contain a table?
    Have you checked those tables for data content?
    There have been cases in the past of imported documents opening with white text on a white background, giving the appearance of containing nothing. Check for this by selecting a block of cells, then applying a Fill colour or a Text colour using the Format button (paintbrush).
    I'd also suggest attempting to open the Excel files using LibreOffice, which can be downloaded from the linked website.
    Regards,
    Barry

  • Working with Chinese characters: How to paste and modify them as sentences; not as individual images?

    Working with Chinese characters: How to paste and modify them as sentences; not as individual images?
    From 2004, this is so far the most detailed answer I could find: http://en.allexperts.com/q/Adobe-Illustrator-1027/FONTS-display-problem-Adobe.htm, but is this really still the most up-to date solution?
    Is it possible at all to work with Chinese characters, if I don't have the Chinese version of Illustrator? (http://www.proz.com/forum/dtp_desktop_publishing/221125-chinese_in_indesign.html)

    Thanks for your reply.
    I'm using Version 17.1.0 (64-bit) - basically CS6.
    Operating system is Windows 8.1. Installed is the simplied Chinese language package.
    I have received the text in a Word document. It contains mixed characters, something like this:
    教授资料
    学术背景:
      博士;曾于波恩大学(Rheinische Friedrich-Wilhelms-Universität Bonn)、台湾师范大学、
    I have tried to paste it in the two following ways:
    1) to create a text box and paste the text. The result is that some of the characters are not showed correctly.
    2) Paste it directly without any preparation. This result into a single "image" or group of images. I can cancel modify each character one at a time, or I can dissolve the group, but the result is the same.

  • Change Filenames with blank spaces in the Filename

    I want to change many filenames with blank spaces and replace
    blank spaces with underbar character.
    Example:
    File One change to File_One
    File Two change to File_Two
    Here is my script:
    for file in `ls`
    do
    i=`ls -1 *" "*`
    b=`ls -1 *" "* | sed -e s/\ /_/g`
    done
    mv "$i" $b
    Please advise what is wrong with my script that isnt
    working. The script works if I only have one filename
    with a blank space. But if I have several filenames
    with blank spaces in the name then it doesnt work.

    I want to change many filenames with blank spaces and replace
    blank spaces with underbar character.
    Example:
    File One change to File_One
    File Two change to File_Two
    Here is my script:
    for file in `ls`
    do
    i=`ls -1 *" "*`
    b=`ls -1 *" "* | sed -e s/\ /_/g`
    done
    mv "$i" $b
    Please advise what is wrong with my script that isnt
    working. The script works if I only have one filename
    with a blank space. But if I have several filenames
    with blank spaces in the name then it doesnt work.

  • Adobe Pro XI deletes and/or replaces letters with blank spaces or an x

    How do I fix the problem where Adobe Pro XI deletes and/or replaces letters with blank spaces or an x.
    This is really annoying to have to go back to each thing I type into a document and re-choose the fonts to get them to be correct.
    Thanks for your help!

    Adobe is a company, not a program... do you mean ACROBAT Pro?
    If yes, this is the Premiere Pro video editing forum, you need to go to http://forums.adobe.com/community/acrobat

  • I like the idea of auto back-up for my new iMac, Ipad and PC Netbook, particularly if I can access all files and data stored on any device.  But I have a Conceptronic router.  Will Time Capsule work with this and how?

    I like the idea of auto back-up for my new iMac, Ipad and PC Netbook, particularly if I can access all files and data stored on any device.  But I have a Conceptronic router.
    1. Will Time Capsule work with this and how?
    2. Can my printer USB be plugged in and then shared between the devices?
    3. Can I create a network and how?
    4.  What happend when a visitor logs onto my existing wireless router?
    I'm new to Macs (well a returning user having started with Mac Plus!!) and not very technical.  Any help / advice will be much appreciated.
    Ray

    The key to what you seem to want to do is to be able to get Apple's Time Capsule router to "join" the network that your Conceptronic router.  I believe that works with some third-party routers, but I've never seen a list of those that work in such a configuration and I have no experience with Conceptronic equipment.
    You might be better off with a Network-Attached Storage (NAS) device instead of a Time Capsule.

  • I just upgraded to the maverick and, of course, the iPhoto does not work with it.  How do I upgrade to version 11?  I cannot find it anywhere

    Recently upgraded to Maverick and the version of iphoto does not work with it.  How do I get and download the version 11?    I can't find it anywhere

    Which iPhoto? 9.4.6  and 9.5.1 work here.
    FWIW, iLife '11 is available here: http://www.amazon.com/Apple-MC623Z-A-iLife-VERSION/dp/B003XKRZES

  • 4.0 won't work with my computer, how can I redownload the older version

    4.0 won't work with my computer, how can I redownload the older version?

    You can get Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html

  • Since Prelude doesn't work with Red footage, how can I add logging info to a file in Premiere Pro

    Since Prelude doesn't work with Red footage, how can I add logging info to a file in Premiere Pro CS6?

    RED footage has a restriction on metadata.  We are looking into what it would take to get full metadata support into our system, but you cannot tag red footage at this time.

  • Why Photoshop stopped working with Lightroom and how to fix it?

    Why Photoshop stopped working with Lightroom and how to fix it?

    As I am editing photos in lightroom and just right click on the photo to select to edit in photoshop the opting shows up in gray out  but it isn't available for selection anylonger. It was working just fine a few days ago.
    Thank you for your reply!!!

Maybe you are looking for

  • Report on Project committment

    Is there any standard report on project commitment ? Project commitment carries PR/ PO created for the project and does not include already paid items / quantities.

  • Ssd cache and hybrid drive

    I am looking to order the HP 17t-j000 with 8GB of memory.  It offers both SSD cache and a Hybrid drive as options, and you can choose both.    Does it make sense to get both, or is this just redundant?   I

  • No disk found error

    Hi guyz, I am trying to install Solaris 8 in a compaq machine. The installer started and proceeded until setting up of Time Zone. After that I got the following error: No disk found. Check cable or connection. Please help me to correct this error. re

  • I need some help Regarding Cumulative totals

    Hi , i have a requirement 1) we have columns calender Periods and actual to date. The requirement is we need cumulate the actual to date. i have applyed RSUM function in column formula. 2) it is working fine. But again the requirement is this cumulat

  • Premiere CS4 weird behaviour. Please help!!

    Hello all, I recently purchased cs4 production premium as an upgrade to my cs3 suite. After installing everything seems normal, but when i try to open videos in premiere en encore it doesnt work properly: the video gets some kind of a weird blue/red