I want lagging spaces to be written in the output file ..!

Hi Gurus,
Just check the below.
data v_string type string.
v_string = '     abcd        '.
Open dataset v_file for output in text mode encoding
utf-8.
transfer v_string to v_file.
close dataset v_file.
and my file just has the following and I need the line with lagging spaces. Any suggestions ?
    abcd

Suppose you need 10 spaces after 'abcd' you can code as below:
  l_cr = cl_abap_char_utilities=>cr_lf.
  v_string+4(1) =  l_cr.
* Writing to application server.
  TRANSFER v_string to v_file LENGTH 14.
The value 14 is just an example. It can be a variable.
<<Text removed>>
Regards,
Abhishek
Edited by: Matt on Oct 5, 2011 9:40 AM

Similar Messages

  • Want to display a space after last field in the output txt file

    hi
    I want to display a space after last field in the output txt file which is generaed by my program on utility server the last field lengyt we have defined is four and in database it is of three characters and requirement is to disppaly the last fourth field as space in the output file w hich is not shown as the txt file automatically gets closed at the third place as it is the last field in the record and ind atabase records are of therss char only but user wants to display this fourth position in the notepad output file as space ( which is last field in the output file)
    eg
    name house  street country
    record output coming in file
    ram   h3      street3  thn      now this thn which is last field the notepad get closed at thn only
    i want to display one space in last field for the whole of output file
    ie ram      h3   street3  thn(space)
        sham   h4  street4   sgp(space)  so on......
    we need to show this space in the output file as blank
    regards
    Arora

    hi Atish
    i am using
    loop at gt_sagadr_outtab into wa_sagadr_outtab
    move wa_sagadr_outtab-country to wa_sagadr_text+223(226).
    endloop
    in this last field ie country i need to display the last 226 as blank as only country key is two char in database so the last space is not shown
    i am not unsing the fM as tolb by  you
    and afterwards
    i am usning
    Concatenate 'Sagadr_' sy-datum sy-uzeit '.dat' into gv_filename_sagadr.
    CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
      CLIENT                        = SY-MANDT
        LOGICAL_FILENAME              = gc_lfile
        OPERATING_SYSTEM              = SY-OPSYS
        PARAMETER_1                   = gc_param1
        PARAMETER_2                   = gc_send
        PARAMETER_3                   = gv_filename_sagadr
      USE_PRESENTATION_SERVER       = ' '
      WITH_FILE_EXTENSION           = ' '
      USE_BUFFER                    = ' '
      ELEMINATE_BLANKS              = 'X'
      IMPORTING
      EMERGENCY_FLAG                =
      FILE_FORMAT                   =
        FILE_NAME                     =  gv_filepath_sagadr
    EXCEPTIONS
      FILE_NOT_FOUND                = 1
      OTHERS                        = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    and lastly
    open dataset gv_filepath_sagadr for output in text mode encoding default.
        if sy-subrc eq 0.
         loop at gt_sagadr_text into wa_sagadr_text.
         transfer wa_sagadr_text to gv_filepath_sagadr.
         endloop.
        endif.
       close dataset gv_filepath_sagadr.
        if sy-subrc = 0.
        message S002 with gv_filepath_sagadr. "Files & created on Application server
        endif.
    SO NOT SURE WHERE TO USE THE CODE AND HOW

  • How to get required tags and name spaces in the output File?

    Hello,
    I am doing IDOC to File sceanrio and I am able to get the file but the problem is that I am unable to get the required tag names. Out put file is having  ns0 ns1 and so on..
    Eg:
    ns2:MaterialDefinitionProperty><ns2:MaterialDefinitionProperty><ns2:ID>CU_NET_WEIGHT</ns2:ID></ns2:MaterialDefinitionProperty><ns2:MaterialDefinitionProperty><ns2:ID>EAN_SKU</ns2:ID></ns2:MaterialDefinitionProperty><ns2:MaterialDefinitionProperty><ns2:ID>CUPerCase</ns2:ID>
    and so on..
    Source structure is IDOC
    Target structure is External Defination imported with references.
    How can I get the output file with the exact namespaces and tags as imported through External Definations.
    Thanks in Advace.

    HI! Rajeev,
    I have gone through this forum and we having 100% same to same requirement here in my project.
    We want this at the top of the Output Payload..
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SyncMaterialDefinition xmlns="http://www.siemens.com/ad/mes/b2mt-1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bml="http://www.wbf.org/xml/b2mml-v02" xmlns:sit="http://www.siemens.com/ad/mes/b2mml-v02-SITExt-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oag="http://www.openapplications.org/oagis">
    - <oag:ApplicationArea>
    and also isome part of payload nstead of    ns0:  and ns1:
    we want it as below for some part of same output payload
    <oag:ApplicationArea>
    - <oag:Sender>
      <oag:LogicalId>SAP</oag:LogicalId>
      <oag:Component>PMConnector</oag:Component>
      <oag:ReferenceId />
      <oag:Confirmation>Always</oag:Confirmation>
      </oag:Sender>
      <oag:CreationDateTime>2009-06-14T22:23:29.42Z</oag:CreationDateTime>
    </bml:MaterialDefinitionProperty>
    - <bml:MaterialDefinitionProperty>
      <bml:ID>XXXXXXX</bml:ID>
    - <bml:Value>
      <bml:ValueString>0.0</bml:ValueString>
      <bml:DataType>string</bml:DataType>
      <bml:UnitOfMeasure>n/a</bml:UnitOfMeasure>
      <bml:Any />
      *</bml:*Value>
    Check the above code how we want but we are getting in normal way .
    Could you please review this and guide me in detailed way how to do in a step by step manner if possible by taking my above payload condition.
    Regards:
    Amar Srinivas Eli

  • Import Wizard fails to export - object could not be written in the ids-file

    Hello,
    the complete export of the BO environment into a biar-file with the import wizard fails. In the wizard's dialog every option is choosen as "all". When the export is started it stops already in the folder objects. The log file says the object allocation could not be written in the ids-file. So I presume a problem with references.
    In order to figure out which object is responsible for the error I varied the export and finally identified the "repository objects" as the the responsible type of objects. When I now run the export and only use the needed repository objects it works fine.
    But I don't know, if export is complete (I presume it).
    Has anyone a idea what the reason can be for this problem? Can it be fixed in the database? This kind of export did work fine the week before.
    thanks, matthias

    Could you quote the entire error message, word-for-word, verbatim? What Import settings are you using ... Copy, Move, Add?
    Most likely you have a permissions issue, but it will be much more clear to me if I can see the entire message.

  • HT1338 I made a movie in iMovie and want to make copies.  I lost the iMovie file, I just need to know how to copy a disk.  HELP!

    I made a movie in iMovie and want to make copies.  I lost the iMovie file, I just need to know how to copy a disk.  HELP!

    Not sure if you really mean disk (HD) or disc (CD/DVD).  Check out this YouTube video

  • DMEE : Delete Trailing spaces in the output file..

    Dear Friends
    I am using a DMEE Tree t generate a payment file.
    Everything is fine except that teh bank requires the trailing spaces to be deleted.
    i.e. I am getting an output like below but with spaces in place of dots
    :50H:/09618078222002EUR....................<CR/LF>
    Sana'a............................................ <CR/LF>
    :70:DMEE-TEST14.................<CR/LF>
    Note:The dots represents spaces which I want to remove. The dots are added to show you the output...
    The <CR/LF> is printing at the end of the field length. I mean if the field is 34 Chr long then the
    <CR/LF> is getting printed at 35th Char irrexpective of teh field contents...
    But the bank requires in the below format. i.e. remove the spaces thats all.
    :50H:/09618078222002EUR<CR/LF>
    Sana'a<CR/LF>
    :70:DMEE-TEST14<CR/LF>
    Can anyone help.
    I am working on SAP 4.6C
    Help will surely be reawrded....

    Hello Sam,
    I DO NOT know if i can make you understand the logic, but will give it a try )
    The <CR/LF> is printing at the end of the field length. I mean if the field is 34 Chr long then the
    <CR/LF> is getting printed at 35th Char irrexpective of teh field contents...
    You define an element of length 35 char, then in the "Mapping Procedure" select the "Own Mapping (Atoms)" & set the "Atom Handling" as 01 (Concatenate values in element).
    Then create the ATOMS: one with the value "DMEE-TEST14" & the other atom with the value "<CR/LF>
    ". The output will be a concatenation of the two fields )
    Did you get what i wanted to tell you )
    BR,
    Suhas

  • When I share a file to YouTube, where does the output file live? I want also to make a DVD. And is this a best practice or is there a better way?

    I want also to make a DVD, but can't see where the .mov files are.
    And is this a best practice or is there a better way to do this, such as with a master file?
    thanks,
    /john

    I would export to a file saved on your drive as h.264, same frame size. Then import that into youtube.
    I have never used FCP X to make a DVD but I assume that it will build the needed vob mpeg 2 source material for the disk.
      I used to use Toast & IDVD. Toast is great.
    To "see" the files created by FCP 10.1.1 for YouTube, rt. (control) click on the Library Icon in your Movies/show package contents/"project"/share.

  • Receiver SFTP adapter giving spaces between characters in the Output file

    Hi PI Experts,
    My Scenario is: Paymul (EDI file ) ECC -> PI -> SFTP server.
    Source Sender File adapter able to pickup this Paymul D96A file and able to send messages to target SFTP server using SFTP receiver adapter.
    But, Generated Output file having single space between each character. I am not using any content conversion modules in Receiver SFTP adapter.
    Also not having any mappings to transform the messages. it is just pass through interface.
    I have attached example Output file. I have changed the .Dat file to .txt just to attach here.
    Could any one try to help me on this. Please let me know incase need any more details.
    Thanks,
    Govindu.

    Hi Govindu,
    Please see if the below Endcoding settings wont resolve your issue.
    File Type - Text
    File Encoding - ISO-8859-1
    Regards,
    Jannus Botha

  • N8: are image tags written into the image files?

    I spent time adding tags to my recent images on my N8 using the standard picture browsing
    application. Afterwards, when I transferred the images to the PC, I could not see those tags.
    They don't seem to be picked up by Picasa, nor can I see them in IrfanView which shows
    me the EXIF and IPTC data for a file.
    Are tags being written to the files in some other format?
    N8 / RM-596

    I meant custom tags.
    My firmware is translated, so forgive me if I'm using the wrong English terms.
    In the picture browsing application, you can add custom tags to images, this is how:
    1. click on the check-mark icon
    2. mark an image
    3. click options
    4. click the third option from the bottom (add a tag)
    5. pick new tag
    6. type in a name for the tag
    It is these custom tags that I have added to my photos and which I can't see when I transfer them to my PC.
    PC photo-manipulating applications (such as Picasa) usually also allow you to add tags to images. They are then stored within the image file itself, usually in the IPTC format.
    I'm wondering whether I am doing something wrong or Nokia N8 simpy doesn't have this.
    N8 / RM-596

  • Deploying web applications - jsp generated servlet's may be written over the same file!

    Hi, I have made the following test:
    Created two simple web applications with one jsp page, and deployed it
    with different context names, in weblogic.properties I have:
    weblogic.httpd.webApp.weirdApp=\java\weblogic\myserver\weirdApp.war
    weblogic.httpd.webApp.weirdAppTwo=\java\weblogic\myserver\weirdAppTwo.war
    (Note: I have used two diferent war files, because I have a different
    implementation of the jsp page, I could have used the same warfile, and
    deployed it two times with the same different names I have used)
    These two applications have a jsp named myHomePage.jsp
    If I access the first application, like this:
    http://myServer:7001/weirdApp/myHomePage.jsp
    the servlet for myHomePage is created in
    /java/weblogic/myserver/WEB-INF/_tmp_war/jsp_servlet/_myhomepage.class
    If I access the second application, like this:
    http://myServer:7001/weirdAppTwo/myHomePage.jsp
    the servlet for myHomePage is created in
    /java/weblogic/myserver/WEB-INF/_tmp_war/jsp_servlet/_myhomepage.class
    It overrides the first one! Because the servlets are keeped in memory by
    a different class loader this seems to not affect the other servlet, but
    I am wondering what may happen with this strange beaver from weblogic!
    Bruno Antunes,
    Java Software Engineer
    email: mailto:[email protected]
    Phone: +351.21.7994200
    Fax : +351.21.7994242
    WhatEverSoft - Java Center
    Centro de Competencia Java
    Praca de Alvalade, 6 - Piso 4
    1700-036 Lisboa - Portugal
    URL: http://www.whatevernet.com
    ****************** Internet Mail Footer ****************************
    A presente mensagem pode conter Informação considerada Confidencial.
    Se o receptor desta mensagem não for o destinatário indicado, fica
    expressamente proibido de copiar ou endereçar a mensagem a terceiros.
    Em tal situação, o receptor deverá destruir a presente mensagem e
    por gentileza informar o emissor de tal facto.
    Privileged or Confidential Information may be contained in this
    message. If you are not the addressee indicated in this message,
    you may not copy or deliver this message to anyone. In such case,
    you should destroy this message and kindly notify the sender by
    reply email.

    I have a separate java class that gets my data and returns a Result object. Do you mean java.sql.ResultSet?
    In my main servlet I do the following:
    request.setAttribute("supporttracker",
    supporttracker.findsupporttracker(monthYear));
    and then in my JSP I can iterate through the Result
    like the following with no problems:
    <c:forEach var="supporttracker" begin="0"
    items="${supporttracker.rows}" varStatus="counter">
    My problem is that I can only iterate through this
    once in the page whereas I have no problem doing
    multiple forEach loops through other types of
    lists/collections such as an ArrayList. Right, because a ResultSet is a database cursor and doesn't act the same way that an ArrayList does. It's more like an InputStream - once you read it, you close it. If you want to re-read it, you have to re-initialize it again.
    Iterators behave that way, too. Once you walk through them, you have to re-initialize them.
    I've looked
    on the web and in a couple of books, I first thought
    it may be scope or some attribute in forEach that I
    was missing but I'm stumped. It seems like it's
    because the pointer to the result set is at the end
    of the result set when trying the second iteration,
    but I thought by using the begin="0" would put the
    pointer at the first row again, on my second
    iteration I'm getting no rows/data outputed.
    Please help and thanks in advance!The better thing to do is for your method to return a List of objects, one per row, that represent what the ResultSet returns. Have that method iterate through the ResultSet, loading the rows into the List, and close it before you leave in a finally block. A database cursor is a scarce resource, so it's a good idea to close it as soon as you can.
    %

  • Trailing Spaces in the output file

    I am executing one script from the cron. This script extracts some data from the Oracle database and creates a spool file. But it is creating the file with lot of trailing spaces for each record.
    1. If the same script is executed from the command prompt there are no trailing spaces.
    2. Same script is working fine from the other box.
    3. No problems in the data ( obvious from the point 1).
    Any ideas why this happns only from the cron ?

    Not sure why, (a code snippet would help). But there are some differences between cron and command line.
    1. By default cron uses /bin/sh
    2. What user are you running as in crontab?
    3. The default PATH for non-root cron jobs is /usr/bin:/usr/ucb:.
    4. The default PATH for root cron jobs is /usr/sbin:/usr/bin
    5. Take a look at /etc/default/cron to see if the PATH is set to something you don't expect.
    6. Read the manpages for cron and crontab. Lots of useful info there.
    My guess is that you're picking-up a different version of a command.
    HTH,
    Roger S.

  • How do I control the order of files as written to the LST file of FileNameGet command with multiple files

    The UseFileCommand is not loading my files in alphabetical order...nor in timestamp order...nor in the order I select them in the FileNameGet dialog box.
    How do I control this?
    It appears that the LST file created is where the problem lies.  The UseFileList variable, it appears, reads from the last entry, and works forward.
    So I need a way to manage this..so that my data is processed according to the timestamp (earliest first) OR filename (alphanumeric sort, ascending)
    Thanks

    Hmm, seems I did a better search this morning...and came across the following....
    Previous sort request
    Maybe an enhancement? 
    In my case, the issue is I'm trying to process multtiple data files collected over 6 months of durability testing.  Out of the risk of losing data, our DAQ team has elected to open a new file every hour.  So, I end up with thousands of files.
    I parse through these files, calculating time between various events.  Its CRITICAL that the calculations are in time-order.  The files each 1 Gb in size, so I prefer to utilize the filename (date/time sortable) or original timestamp.
    If processed out of order, the durability data will likley imply something quite wierd (like improvement over time).  Of course, that would be great for a management review...but not so good when warranty starts coming back
    I can write/copy any number of sort routines...I just thought the file order should be intuitive (either forward or reverse...not last, first, middle, etc...
    Anyhow...I'd like to formally request an enhacement in the next ve.  rsion of Diadem; one that provides an additional parameter to be passed...SortField.  Useful options would include FileNameForward, FilenameReverse, TimeForward, TimeReverse, etc...

  • Cookies are written to the cookie file but sites are not finding them. I've tried all the suggestions I could find. I'm using OS 10.5.8 Could there be something in the OS causing the problem? My Win7 laptop works with the same sites.

    I cannot log-in to accounts on other websites e.g. eBay, Amazon, for starters. I get messages that I need to turn on cookies. They are on and I can see the cookies in the cookie file but the programs are not making the connections and not finding the cookies. I've found that I have the same problem with Safari and Camino. Could something in the OS be interfering and if so, how can I fix this? The problem only exits on my Mac with OS 10.5.8 On my new Windows 7 laptop Firefox has no problem logging into any of my existing accounts.

    If clearing the cookies doesn't help then it is possible that the file <i>cookies.sqlite</i> that stores the cookies is corrupted.
    Rename (or delete) <b>cookies.sqlite</b> (cookies.sqlite.old) and delete <b>cookies.sqlite-journal</b> and <b>cookies.txt</b>, if they exist, in the Firefox Profile Folder in case the file cookies.sqlite got corrupted.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Cookies
    *http://kb.mozillazine.org/Websites_report_cookies_are_disabled

  • I want to free up pc disk space. Can i delete app data/files from my pc now I use iCloud??

    Hi
    I have not been able to find a relevant thread, if there is one please direct me.
    Sorry if my use of jargon/process is not that clear.
    I am using iCloud.
    Can I, and how do I, delete app data from my laptop and keep all apps running normally and still on my ipad and ipod as they currently are?
    My computer is overflowing and I see iCloud as a chance to clear some hard disk space.
    If i delete the apps from my itunes browser on PC then it deletes them from my entire Itunes account. Can I just go into my itunes folder and delete the base application files?
    If I remove files/apps and I sync my devices using my pc for music/video/photos etc then will it pick up that the apps and app data is missing from my pc?
    Thanks in advance
    lach

    Im trying to get an answer to this same question. My poor pc is almost out of hard drive space bc of all the iphone backups pre icloud. I want to know if I go into the itunes file on my pc and delete all those files will they still be safe considering they are on icloud now? Its frustrating bc I cant seem to get an answer to this question. Have you come across any information on this issue since posting this question? Thanks so much!

  • TS4498 Can i move my installation of Logic 10 to another hard drive, as its nearly full and i want to free up space so i can install the additional audio files too.

    Hi All,
           ....i've recently bought and downloaded Logic Pro X.........the software is great.......i love it. But when i bought it from apple, it gave me no choice where to install it. It just went ahead and installed it in the drive which has my operating system in it. Which, in itself is not a problem........but, in my case, the hard drive in question is almost full...........so when i decided to add the additional audio files which come with Logic...........a message was displayed that not enough free space is available for additional audio files.......please remove files to free up space!  
            I would love to free up space, but i only have a small 64gb SSD (which is where my operating system is installed). Normally, by moving files around (to another hard drive for example) would be the answer to this problem, but.........and here's the problem..........Logic, and my operating system cannot be moved to another hard drive, once installed it seems logic is there for good.
            Come on Apple!!!!!!!!!!.................i have a terrabyte of space on my other hard drive!! ready and waiting for some music files and or Logic!!!!  .........why on earth could you not of given me the option of an installation disk choice!!!!!
          .......well, it seems i'm stuffed now, and £130 lighter in the pocket. I could be the next Mody or Fat Boy Slim............but alas............it's not even looking like i'm gonna even be a one hit wonder.
         ........if anyone knows how to move logic to another destination drive, please help and when i'm famous, i'll sing at your wedding :-)

    The vast majority of applications must be install on the system drive in order to run correctly.
    Generally the applications take up very little disk space. It is usually the files they produce that need the space. Seeing as how I don't use Logic I can't do this but you might want to check how to move the files generated by Logic to another drive.
    Allan

Maybe you are looking for

  • IPod shuffle 2nd Gen not appearing in Windows Vista

    Dear All: I have a 2nd Gen shuffle that will not show up in iTunes or Windows on a Vista Home Basic machine. Vista finds an unrecognized USB device and cannot find a driver. The orange light on the shuffle blinks, and the Vista device manager keeps d

  • Itunes stops working when as soon as iphone connected

    My iphone syncs perfectly but my wife's iphone immediately starts syncing and itunes stops working. any ideas?

  • Regarding : back ground jobs

    Hi, Please let me know , in how many ways we can shedule a program as a background job, and  how we pass variants to the job. Thanks in advance jogu

  • Webpage not displaying content in Firefox?

    Hi friends, Following is the address of the Indian Income Tax Department website: http://law.incometaxindia.gov.in/DIT/Income-tax-acts.aspx As you can see, the sections of the Tax Act are listed. The content of each section is displayed in another wi

  • Copying DataBase in Business One

    Hi!!, Can anyone please tell me the steps to copy the Database of a company in same SAP Business one server. Suppose if i have created a Database of a company ABC in Business one,I want to copy that database as XYZ in same Business one server. Thanks