To add space at the begining of a file

Hi,
  i have a requirement, when you transfer data to a file it should start writing data from 10th place.
ex: data p_ext LIKE rlgrap-filename.
     data: var1(9)  type c value 'test data'.
     data: hold(100) type c.
     p_ext = '/devabap/if/daily/out/test1.rg'.
open dataset p_ext for output in text mode encoding default.
concatenate c_blank
                   var1
                   into hold
                   separated by cl_abap_char_utilities=>horizontal_tab.
transfer cont to p_ext.
close dataset p_ext.
When i do this and check the file contents in AL11.
i can see the contents like
#test data.
but i want to know how this can that be changed to like
                 #test data.
Regards,
Raghavendra.

Hi ,
  When you use concatenate using separating , the separating string  does not come in the first place , it just comes between the values you are concatenating .
so to acheive your result , you should again concatenate  cl_abap_char_utilities=>horizontal_tab , to your result before you transfer it to the file.
concatenate cl_abap_char_utilities=>horizontal_tab cont into cont.
or you can do is use the shift command after the concatenate operation.
Here is a sample
shift cont by 10 places RIGHT.
Regards
Arun
Edited by: Arun R on Jan 22, 2009 1:29 PM

Similar Messages

  • Trying to use GREP to add 2 spaces to the beginning of a line, under a particular circumstance.

    Hello,
    I am trying to add 2 blank spaces to the beginning of any line that has a punctuation at the end of that line, followed by a forced line break.
    I can get the GREP to find the punctuation at the end of a line with a forced line break:
    [[:punct:]](?=\r)
    But, is there a way to tell it to now add 2 spaces to the beginning of that line?
    Any guidence is greatly appreciated.
    thanks
    babs

    If applying a paragraph style works (nice thought!), then finding [[:punct:]]\n and applying the style works fine, no need for the grouping and the lookbehind. But if it's really the case that two spaces need to be inserted, then that's possible only if the text is not formatted at all. Then
    find ^.+[[:punct:]]\n
    change to \x20\x20$0
    will do the trick (\x20 is the space character). If the text does have any formatting, a script is needed.
    Peter

  • Indesign adds an anoying space at the beginning of a line

    Text supplied to me very very often has the combination:
    <tab><bullet><tab>rest of text....
    If I select <tab><bullet><tab> and hit delete, Indesign replaces it with a space.
    It's very annoying because I then have to delete the space. Who needs a space at the beginning of a line like that!?
    Preferences > Autocorrect > [  ] Enable Autocorrect is OFF, so there's no substitution going on (I think).
    Can someone offer any insight as to what I need to adjust in my prefs to stop this behaviour.
    I'm using Mac OS 10.9 and Indesign 2014
    Many thanks,
    K.

    Theway  I choose to to fix this kind of problem is to Use Find and Replace. Under Find, insert the text or code that you want deleted. Under Replace, insert NOTHING, then select Change All. If you don'twant to replace all instances use the Find Next to keep the coding or use the Change/Find that will delete the code and find the next instance. I use this method all the time to get rid of the double-spaces that are frequently found in word processing files. You can probably do the same thing in your word processing program.
    It may sound complicated but it's really quite easy.

  • How to insert a black space at the beginning of a timeline

    Hi guys,
    Sorry for the stupid question....I only bought FCPX yesterday.
    I have figured out how to drop an audio file into the timeline and add some title effects to the beginning. But now i want to add a black space at the beginning.
    Is there an easy way to do this that I have simply missed - I have spent several hours trying to find a way to do it... 
    Thanks in advance for your help  
    Best regards,
    Craig

    Thanks everyone for the help - really appreciate it !!
    I didn't know that there could only be one "correct" answer - so sorry to Tom if I have done this incorrectly. I was too excited that both answers worked for me that I didn't really concentrate hard enough on whose idea it was - I thought I could mark them both as correct.
    Next time I will take more time for a considred response.
    Thanks again everyone - you really helped me out.
    Cheers,
    Craig

  • Space at the beginning of a row in a listbox?

    i want to add rows in that way, that it look like a tree hierachy, but the listbox always remove the spaces at the beginning! what can i do?
    If i use the selectOneListbox from HTML i only can set the value that should be printed, but i can't set a return value if the row is selected, is that right?
    best regards

    ok, here is the outcome:
    <?xml version="1.0"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta content="no-cache" http-equiv="Pragma" />
    <meta content="no-cache" http-equiv="Cache-Control" />
    <meta content="no-store" http-equiv="Cache-Control" />
    <meta content="max-age=0" http-equiv="Cache-Control" />
    <meta content="1" http-equiv="Expires" />
    <title></title>
    <script type="text/javascript" src="/EdithsAddRemoveList/theme/com/sun/rave/web/ui/defaulttheme/javascript/formElements.js"></script>
    <link rel="stylesheet" type="text/css" href="/EdithsAddRemoveList/theme/com/sun/rave/web/ui/defaulttheme/css/css_master.css" />
    <script type="text/javascript">
    var sjwuic_ScrollCookie = new sjwuic_ScrollCookie('/Page1.jsp', '/EdithsAddRemoveList/faces/Page1.jsp');
    </script>
    <link id="link1" rel="stylesheet" type="text/css" href="/EdithsAddRemoveList/resources/stylesheet.css" />
    </head>
    <body id="body1" style="-rave-layout: grid">
    <form id="myForm" class="form" method="post" action="/EdithsAddRemoveList/faces/Page1.jsp;jsessionid=6F2D961C364A5579FCC4A691FA389D5A" enctype="application/x-www-form-urlencoded">
    <select style="height: 168px; left: 96px; top: 72px; position: absolute; width: 96px;font-family:monospace; white-space:pre" class="Lst" id="myForm:listbox1" name="myForm:listbox1" size="12" onchange="listbox_changed('myForm:listbox1');  return false;">
         <option class="LstOpt" value="8">ADAT</option>
         <option class="LstOpt" value="9">  3. Klasse</option>
         <option class="LstOpt" value="10">  4. Klasse</option>
         <option class="LstOpt" value="14">  5. Klasse</option>
         <option class="LstOpt" value="11">Englisch</option>
         <option class="LstOpt" value="12">  1. Klasse</option>
         <option class="LstOpt" value="13">  3. Klasse</option>
    </select>
    <input id="myForm:button1" name="myForm:button1" class="Btn2" onblur="return this.myonblur();" onfocus="return this.myonfocus();" onmouseout="return this.myonmouseout();" onmouseover="return this.myonmouseover();" style="position: absolute; left: 264px; top: 168px; width: 72px; height: 48px" type="submit" value="Button"></input><script type="text/javascript">sjwuic_assign_button('myForm:button1', defaultButtonStrings, true, false, false);</script>
    <input id="myForm_hidden" name="myForm_hidden" value="myForm_hidden" type="hidden" />
    <input type="hidden" name="com.sun.faces.VIEW" id="com.sun.faces.VIEW" value="_id1:_id2" />
    </form>
    </html>

  • How to add spaces at the end of record

    Hi Friends,
    i am creating a file which contains more than 100 records.
    In ABAP i have internal table with on field(135) type c.
    some time record have length 120, somtime 130 its vary on each record.
    but i would like to add space at the end of each record till 135 length.
    Can you please help me how to add speace at the end of record.
    regards
    Malik

    So why did you said that in your first posting? My glass sphere is out for cleaning...
    Instead of type c use strings and add spaces until they have the appropriate length.
    loop at outtab assigning <pout>.
      while strlen( <pout>-val ) < 135.
        concatenate <pout>-val `` into <pout>-val.
      endwhile.
    endloop.

  • How do I delete the blank space at the beginning or end of a project?

    I constantly end up with blank space at the beginning or end of a project - how do I remove it?  I get this ALL the time and I jsut can't get rid of it.  Obviously I want my project to start at 0.00 not at 1.xx.
    Thanks.

    That's not a project. You're inside an multicam angle editor. You need to edit the multicam clip into a project. That's where you edit it.

  • How would I erase the beginning of a file?

    I want to be able to erase the beginning of a file, while writing to the end...WITHOUT reading the whole file and writing it again because that would be a waste of resourses. Obviously I know that option is available.
    My situation is that I am adding lines to a log file, and I want to remove any entries that are X hours old. Logging a lot of information would mean that every few seconds, an entry is older than X hours and needs to be removed. It doesnt have a set number of lines so I can't just recycle the file by doing something like: if at line number Y, start at line 1 and remember the current line number.
    Adding to the top of the file, pushing the others lines down, and making cuts at the end would also work, but the same situation arises, how do I add to the beginning of the file, without having to copy the entire file to add the entry to the top.
    The reason I don't want to read the whole file is because having to read the whole file and write the whole file when an entry is made is time consuming and wastes CPU and memory, especially when the logs are coming in several lines a second.

    I would think it could easily be done. say you want to erase the first 10 bytes, why cant you just say move the start of the file up 10 bytes. Somewhere in the filesystem the start of the file is stored. I found underlying file copying that claims this in FileChannel's transferTo and transferFrom:
    This method is potentially much more efficient than a simple loop that reads from this channel and writes to the target channel. Many operating systems can transfer bytes directly from the filesystem cache to the target channel without actually copying them.
    If I can't just chop, I'll have to copy quickly at scheduled intervals.
    This is code I ran to test the above quote:
        public static void main(String[] args) throws Exception{
            args = new String[2];
            BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
            System.out.println("Enter File Name:");
            args[0] = input.readLine();
            System.out.println("Enter test (0-2):");
            args[1] = input.readLine();
            long time = System.currentTimeMillis();
            int version = Integer.parseInt(args[1]);
            switch (version) {
                case 0:
                    BufferedReader in = new BufferedReader(new FileReader(args[0]));
                    PrintWriter out = new PrintWriter(new FileWriter("tempfile.txt"));
                    in.readLine();//skip line.
                    for (String line = in.readLine();line != null;line = in.readLine()) {
                        out.println(line);
                    in.close();
                    out.close();
                    break;
                case 1:
                    RandomAccessFile raf = new RandomAccessFile(args[0],"rw");
                    String line = raf.readLine();
                    long offset = raf.getFilePointer();
                    byte[] b = new byte[1024];
                    int bytes = 1024;
                    long index = 0;
                    System.out.println("index = " + raf.getFilePointer());
                    System.out.println("index = " + line.length());
                    while(bytes == 1024) {
                        bytes = raf.read(b);
                        index = raf.getFilePointer();
                        raf.seek(index - bytes - offset);
                        raf.write(b,0,bytes);
                        raf.seek(index);
                    raf.setLength(raf.length()-offset);
                    raf.close();
                    break;
                case 2:
                    RandomAccessFile raf2 = new RandomAccessFile(args[0],"rw");
                    String line2 = raf2.readLine();
                    long offset2 = raf2.getFilePointer();
                    FileChannel f = raf2.getChannel();
                    FileChannel g = f.position(0);
                    g.transferTo(offset2,raf2.length() - offset2,f);
                    raf2.setLength(raf2.length()-offset2);
                    raf2.close();
                    break;
            System.out.println(System.currentTimeMillis() - time);
        }and had these results
    166MB Log File
    Linux Mandrake 900Mhz
    Case 0 = 32914 ms
    Case 1 (1k byte[]) = 15043 ms
    Case 1 (16k byte[]) = 6988 ms
    Case 1 (1MB byte[] = 6113 ms
    Case 2 = 6188 ms
    :-/ guess this proves that the FileChannel can't chop

  • How to delete the beginning of a file?

    Hi,
    is there a way to delete the beginning of a file, or do I have to copy the rest of the file and create a new one and then delete the old one?
    Lets say my file contains "ThisIsMyFile" and I want to delete "This", so that my new file contains "IsMyFile", how can I do this?
    thanx

    You have to copy.

  • Append a line at the beginning of a file via UTL_FILE

    Hello,
    is there a way to append a line to the beginning of a file instead of at the end of an existing file via UTL_FILE?
    Thanks in advance,
    Geert

    No, you would have to create a new file.

  • Appending "something" at the beginning of a file

    Hello,
    I am trying to append a character to the beginning of a file, doesnt seem to work with RandomFileAccess. I first called the seek() methond
    seek(0); //zero to send the file pointer to the front 
    write((byte) myCharValue);apparently it overwrites the value at the front instead of adding for example:
    before running the code the file has: "Java is Cool!"
    after running the code the file has: "xava is Cool!"
    Any Ideas?
    Thanks

    1. Create a new file.
    2. Write out whatever you wanted to insert at the beginning.
    3. Copy the data from the old file and append it to the new file.
    4. Close the files.
    5. Delete the old file.
    6. Rename the new file.

  • Unaccountable space at the beginning of a HTML document.

    I've designed and developed a website using Skeleton boilerplate and Perch CMS, and it works perfectly in all desktop browsers I've tested it in and almost does in Firefox 18.0.1 for Windows XP.
    When I browse the site and click on the news page (http://www.f3racing.co.uk/news.html) in Firefox 18.0.1 there's a weird empty space right at the beginning of the document, so the main navigation and header is pushed down maybe 190 pixels from the top of the window pane.
    This ONLY happens on the news page, Firefox doesn't add this on any other page despite it using the same boilerplate.
    When using firebug if I disable this float:
    .container .column, .container .columns {
    float: left;
    in the skeleton.css file the space vanishes, but this is vital to the boilerplate I'm using and removing it would mean a complete re-build of the website, is there a way I can get this page functioning as it does in all other browsers?

    He has a thread over there.
    http://forums.mozillazine.org/viewtopic.php?f=25&t=2655221

  • Add records in the beginning of the table

    Hi,
    Is that possible to add or append the records in the beginning of the table.
    For example,
       CREATE TABLE app_test (n NUMBER, n1 VARCHAR2(200));
       and inserting new records
      INSERT INTO app_test
         VALUES (1, 'test');
      INSERT INTO app_test
         VALUES (2, 'test');
      INSERT INTO app_test
         VALUES (3, 'test');
      select * from app_test;
    N     N1
    1     test
    2     test
    3     test
      Is that possible to add the records like below. Appending newly inserted rows in the beginning of the table.
    N     N1
    3     test
    2     test
    1     test
      Thanks
    Radha K

    hI,
    Radha K wrote:
    To get achieve sorting order, i have done the following, but the when i
    query the record, its not showing the order which i created in the index.
    CREATE TABLE iot_app_test (
    n NUMBER,
    n1 VARCHAR2(10),
    n2 TIMESTAMP);
    CREATE INDEX
    iot_app_test_indx
    ON
    iot_app_test
    SUBSTR(n2,1,9) DESC, SUBSTR(n2,11) ASC);
    INSERT INTO iot_app_test
    VALUES (1, 'test', SYSDATE);
    INSERT INTO iot_app_test
    VALUES (2, 'test', SYSDATE);
    INSERT INTO iot_app_test
    VALUES (3, 'test', SYSDATE);
    INSERT INTO iot_app_test
    VALUES (1, 'test', SYSDATE + 1);
    INSERT INTO iot_app_test
    VALUES (2, 'test', SYSDATE + 1);
    INSERT INTO iot_app_test
    VALUES (3, 'test', SYSDATE + 1);
    INSERT INTO iot_app_test
    VALUES (1, 'test', SYSDATE + 2);
    INSERT INTO iot_app_test
    VALUES (2, 'test', SYSDATE + 2);
    INSERT INTO iot_app_test
    VALUES (3, 'test', SYSDATE + 2);
    SELECT *
    FROM iot_app_test
    WHERE n2 <> SYSDATE + 3
    N     N1     N2
    1     test     4/28/2010 1:59:26.000000 PM
    2     test     4/28/2010 1:59:30.000000 PM
    3     test     4/28/2010 1:59:33.000000 PM
    1     test     4/29/2010 1:59:38.000000 PM
    2     test     4/29/2010 1:59:41.000000 PM
    3     test     4/29/2010 1:59:44.000000 PM
    1     test     4/30/2010 1:59:48.000000 PM
    2     test     4/30/2010 1:59:51.000000 PM
    3     test     4/30/2010 1:59:53.000000 PM
    The query doesn't have an ORDER BY clause, so the results could be in any order. In fact, you can run the exact same query with the exact same data seconds apart, and get a different order every time.
    The index doesn't change that. Someone above mentioned an Index Organized Table (which is not merely a table with an index), where you can control the order in which rows are stored (as if you wanted to). There is still no guarantee that, absent an ORDER BY clause, output will be in any particular order.
    But when i use the same function in order by clause, its showing the correct result.To repeat what others have said already, the only way to get output in any particular order is to use an ORDER BY clause.
    (CONNECT BY queries are the only exception of which I know. There is a partial ordering in CONNECT BY output, even if you don't use ORDER BY or ORDER SUBLINGS BY.)
    >
    SELECT   *
    FROM iot_app_test
    ORDER BY SUBSTR (n2, 1, 9) DESC, SUBSTR (n2, 11) ASC;
    N     N1     N2
    1     test     4/30/2010 1:59:48.000000 PM
    2     test     4/30/2010 1:59:51.000000 PM
    3     test     4/30/2010 1:59:53.000000 PM
    1     test     4/29/2010 1:59:38.000000 PM
    2     test     4/29/2010 1:59:41.000000 PM
    3     test     4/29/2010 1:59:44.000000 PM
    1     test     4/28/2010 1:59:26.000000 PM
    2     test     4/28/2010 1:59:30.000000 PM
    3     test     4/28/2010 1:59:33.000000 PMCan anyone tell me what's wrong with this.Nothing is wrong.
    You're getting the correct output, in the correct order. Why do you think anything is wrong?

  • How do you add space between the Series Name and the chart?

    I'm trying to format a 3D pie chart and the series name is nearly unreadable depending on the angle. I would like to add some space between the series name and the chart.

    On my charts, I just select the legends and drag them away from the chart. Hopefully this example helps:
    Regards,

  • Why dreamweaver add space in the code when i do this:...?

    Hi,
    look at those pictures below.. Those are the steps to show how dreamweaver reacts after a series of actions with part of the code in CODE VIEW...

    Hi Masa,
    Well the answer lies in how you are adding the indentation for better reading.
    I assume you added space of tab to add indentation. So you are doing that in reduced window width and your text wraps as per the width. But when you again resize the window to full lenght your text takes  full space and the spaces and tabs you added for indentation are moved into text itself which is normal (since you have added that space to text).
    So DW is now adding any space it is the space you added for indentation which is showing up when you go to full width view.
    Don't use such indentation for reading in code and anyways HTML will leave out such whitespaces when page renders.
    Hope that helped
    -Vinay

Maybe you are looking for

  • How add a watermark to the smartform page

    Hi All, Can anybody give me some pointers, how to add a watermark to the page . I have to display a water image, when the user trying to see print preview. I.e. on certain condition i need to print the water mark on the page . I have uploaded the BMP

  • Error with gregoriancalendar

    I'm having an error with the gregoriancalendar class. I have a class that gets an initial date froma database, and iterate until today. The problem is that its showing that today is day 262 and we are in day 232 of the year. Whats the problem???? Any

  • Hyperlinks in .chm not working

    I am authoring my content in Frame 7.2, and importing the Frame chapter files one at a time into RH7. The Frame files have numerous cross-references - some to headings in the same chapter, some to headings in other chapters. When I import the chapter

  • Accessing the stored OIM password in CSF from SOA composite

    Is there a guide on how to access CSF - OIM credentials from your SOA composite. I found this example ( http://docs.oracle.com/cd/E14571_01/doc.1111/e14309/soa_api.htm ) which hard codes the xelsysadm's password in the SOA composite. It says See SOA

  • Subtraction of 0Base_line date from 0Clearing date in the Query designer

    Hi How to subtract  0Base_line date from 0Clearing date  in query designer?? I tried using 'Selection' by taking both 0Base_line and 0Clearing date separately in different selection and then subtracting them using formulas. But when i run the query,i