How to generate blank spaces at end of the record in a flat file with fixed

Hi,
I am generating a flat file with fixed length.
In my ABAP program, i am able to see the spaces at the end of the recors in debug but when download to applicaiton server i am not able to see those spaces.
How can i generate blank spaces at the end of the record in a flat file?
Please update
Thank you

How are you downloading the file?  And, How are you looking at the file on the application server?
Can you provide snippets of your code?
Cheers
John

Similar Messages

  • How to insert  blank spaces at end of a record

    Hi All,
    i need to write 10 records each of 80 char size. of these 10 records, each record might have different data and the last field will be a filler field which only has space.
    for example:
    DATA : BEGIN OF gs_mrecord        ,
             id(1)         VALUE'M'     ,
             accno(12)                  ,
             refid(2)      VALUE 'RR'   ,
             sec_cd(4)     VALUE '2437' ,
             sub_typ(1)    VALUE '6'    ,
             sub_dt(5)                  ,
             sub_seq_no(1)              ,
             sec_cd1(4)    VALUE '2437' ,
             sub_dt1(6)                 ,
             record_no(6)  TYPE n       ,
             ext_ind(1)                 ,
             plat_id(1)                 ,
             filler_1(1)               ,
             clear_code(3)              ,
             ex_merc_no(16)             ,
             filler_4(4)               , fill blank spaces
             mech_bin_no(6)             ,
             filler(6)             ,  " fill blank spaces
             END OF gs_mrecord .
    like this there are 10 types with 80 char size, however the last field is a filler, in which we need to fill only blank spaces.
    when i wrtie this data to the application server file i can't see the spaces and when download(to .TXT file) also i can't see the spaces.
    is there anyway that i can keep the spaces at the end of the record.
    Please note, in the middle of the record, we can keep the spaces as there is some data after that.
    Any hint would be of great help.
    Cheers,
    SR.

    Hi Srinivas
    Just a thought, try as below:
    Declare a text variable of length 80 characters. Before transferring the record to Output file, move the work area to the text field and add a New Line character at 80th position. Now tranfer this text field to file with length specification.
    Eg:
    DATA: l_cr(1) TYPE c VALUE cl_abap_char_utilities=>cr_lf,
          l_text(80) TYPE c.
    OPEN DATASET ....
    IF sy-subrc EQ 0.
       LOOP AT <itab> INTO <wa>.
          MOVE <wa> TO l_text.
          l_text+80 = l_cr.
          TRANSFER l_text TO <dsn>.
       ENDLOOP.
    ENDIF.
    Hope that helps, also check the codepage in which you download the file from Application server before Viewing. Maybe checking the file contents via AL11.
    Hope it helps.
    Regards
    Eswar

  • Issue in generating space at end of the records.

    Hi All,
        i am working on a outbound flat file interface.i 
        have  a issue in generating the spaces at end of each
        record.
        for ex.,
        My record in the file should contain 80 chars each
        line, in which it will contain values till 74 
        characters and the rest 6 chars should have a blank
        space.
        we were able to generate space in the file using
        class "CL_ABAP_CHAR_UTILITIES".
        But this text file when converted to HEX file, the
        end of the record has values as 20 20 20 20 C2 A0 or
        some junk values.But as per the requirement the HEX
        file should display the end of the record as 20 20 20
        20 20 20.
        Please let me know how i should generate spaces in
        the text file and at the same time proper Records in
        HEX file(i.e., 20(value for space in HEX)).
       Thanks in advance.
       Nanda

    hi,
      empty space at the end of the record will be ignored if you download the file.
    So use an END OF RECORD character like ',' or '.' or some other symbol & give you 6 or 7 characters blank space at the end, will work for you.
    now you will able to see total 80 characters(may be with spaces) & 81st will your END OF RECORD indicator.
    YOur legacy system will take only first 80 characters not the total records (in this case 81)
    regards
    srikanth

  • How to create flat file with fixed lenght records

    I need help to export an Oracle table to a flat file with fixed lenght and without columns separator.
    the fixed length is the more important demand.
    My table have 50 columns with varchar, date and number .
    Date and number columns may be empty, null o with values.
    Thanks a lot for any help.
    [email protected]

    Hi,
    You can use this trick:
    SQL>desc t
    Name                                      Null?    Type
    NAME                                               VARCHAR2(20)
    SEX                                                VARCHAR2(1)
    SQL>SELECT LENGTH(LPAD(NAME,20,' ')||LPAD(SEX,1,' ')), LPAD(NAME,20,' ')||LPAD(SEX,1,' ') FROM T;
    LENGTH(LPAD(NAME,20,'')||LPAD(SEX,1,'')) LPAD(NAME,20,'')||LPA
                                          21                    aF
                                          21                    BM
                                          21                    CF
                                          21                    DM
    4 rows selected.
    SQL>SELECT *  FROM t;
    NAME                 S
    a                    F
    B                    M
    C                    F
    D                    M
    4 rows selected.Regards

  • How to show serial umber for each of the record in a table stating with 1.

    I want to show serial number starting from 1 for each of the row in the table. Is there any why to achieve this in OBIEE answers?

    simple.. take a dummy col and put formula RCOUNT(1)

  • How to handle flat file with variable delimiters in the file sender adapter

    Hi friends,
    I have some flat files in the ftp server and hope to poll them into XI, but before processing in XI, I hope to do some content conversion in the file sender adapter, according to the general solution, I just need to specify the field names, field seperator, end seperator, etc. But the questions is:
    The fileds in the test data may have different amount of delimiters (,), for example:
    ORD01,,,Z4XS,6100001746,,,,,2,1
    OBJ01,,,,,,,,,,4,3     
    Some fileds only have 1 ',' as the delimiter, but some of them have multiple ','.
    How can I handle it in the content conversion?
    Regards,
    Bean

    Hi Bing,
    Plz do refer the following blogs u will get an idea:
    File content conversion Blogs
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Regards,
    Vinod.

  • Since upgrading to Mavericks, 10.9.1, pictures that come attached to emails no longer display.  There is only a blank space that after about 1 minute, has a small box with a question mark.  How can I go back to attached images?

    Since upgrading to Mavericks, 10.9.1, pictures that come attached to emails no longer display.  There is only a blank space that after about 1 minute, has a small box with a question mark.  Double clicking on the box will open the image in a separate window.  It's very slow and tedious for multiple images.  How can I go back to attached and displayed  images?  If I click on "Forward", the images appear instantly in the email to be forwarded.

    Scott,
    My problem seemed to fix itself.  Or, by shutting down the computer one night, instead of putting it to sleep, may have reset something.  Since updating to Mavericks, I always (or usually) let the computer sleep overnight or anytime I'm walking away from it.  A few days ago, I was updating notes for my kids about how to find all my stuff and how to turn on my computer, so I wanted to rewrite the start-up procedures for the iMac, just in case they ever need to.  Well, I shut it down one night so the following morning, I could write down each step.  Lo and behold, the images, etc. are all there again!  Solved, but I'm not sure why.
    Tom

  • My iPad keyboard divided in half with one side on the left side of the tablet, the other on the right side and an equal blank space separating them.  The entire keyboard also became smaller.  How can I get it back to normal?a

    My iPad keyboard (spontaneously?) divided in half with one side on the left side of the tablet, the other on the right side and an equal blank space separating them.  The entire keyboard also became smaller.  How can I get it back to normal?

    You can also turn OFF Split Keyboard
    Settings>General>Keyboard>Split Keyboard>OFF

  • Regarding blank space at the end of the record

    Hi All,
    We have a requirement where in which we have to pass either X or space to that field and this field is at the end of the record.
    I can download it to local pc or to an application server.
    If i pass normal space, i'm unable to view it when i download that to the local pc.
    I tried with cl_abap_char_utilities, i was able to get the tab, can you please tell me how can i acheive space both in the presentation and at application server.
    Thanks,
    Bharathi.

    Sowmya answer should work.
    Are you looking for something like this?
    CONSTANTS: BEGIN OF end_of_file,
      x(2) TYPE x VALUE '0D0A',
    END OF end_of_file.
    DATA: BEGIN OF itab OCCURS 0,
      line(20),
    END OF itab.
    itab-line = 'Hello World '.
    CONCATENATE itab-line end_of_file INTO itab-line SEPARATED BY space.
    APPEND itab.
    CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
              filename              = 'C:\helloworldtest.txt'
              write_lf              = ''
              trunc_trailing_blanks = 'X'
         TABLES
              data_tab              = itab.

  • How to add a SPACE as suffix to the last field in the downloaded text file?

    Hi Experts,
    By using GUI_DOWNLOAD am saving the data(only 3 fields) in a text file on my desk top.
    fine.
    example current record1 : 010001                      354.999            26.000
    here, after 3rd field 26.000, immediately the cursor is jumping to next line in text file.
    but, wanna a SINGLE SPACE after 26.000, say 26.000+space.
    tried with CONCATENATE, OFFSETTING, but no use(may b am using incorrectly)
    so, pls. suggect me, How to add a SPACE as suffix to the last field in the downloaded text file?
    thanq

    Sorry...Typo error...Too many in the last few days -:(
    Wanted to say AFTER -:)
    Do it like this...
    FIELD1 TYPE XXX,
    FIELD2 TYPE XXX,
    FIELD3 TYPE XXX,
    SPACE(1) TYPE C,
    That way you should end with...
    26.000+SPACE
    Greetings,
    Blag.

  • How to Generate a complex smart form for the Sales Order different pages h

    How to Generate a complex smart form for the Sales Order different pages has different page Layouts  explain me?

    in print program in interface when calling the form there should be some option to tell it to make a NEW spool everytime.
    I have it in mind for sap-script it is ITCPO-TDNEWID. Dont have it in mind for SAMRTFORMS but still it should work somehow similar.

  • How to generate an OUTBOUND INVOICE IDOC from the ABAP Program?

    How to generate an OUTBOUND INVOICE IDOC from the ABAP Program? Any Function Module that can be used for this?

    Hi
    This is more of configuration
    (1) Create a Output type with Medium 6 ( Check with your functional consultant)
    (2) Maintain Partner Profiles using WE20 transaction
           Idoc type - INVOIC02
           Message type - INVOIC
           Process Code - SD09
    Regards
    Madhan D

  • How do i make a still image (photo) fit the length of the music? I record music and want to put the tracks to a video file with a still image of my business logo in the background. Any help?

    How do I make a still image (photo) fit the length of the music? I record music and want to convert the tracks to a video file with a still image of my business logo in the background. On windows movie maker you could just select "fit to music" but this program isnt as easy to figure out! Any help?

    Double-click on the still image in the project timeline to open the Inspector. In the Inspector, adjust the duration by typing in a new duration to match the length of your music. I think the limit for a still image is 10 minutes. If you need more than this, simply drag the image into the timeline again then adjust its duration. The two images will play seamlessly (no gap will be visible).
    See this iMovie Help topic:
    http://help.apple.com/imovie/#mov3a883915
    You can achieve more precision when entering durations by changing a preference in the menu item iMovie Preferences. Check (tick) the preference for Show Time As HH:MM:SS:frames. This will enable you to enter the duration of stills down to the frame level, rather than full seconds (NTSC is 30 frames per second; PAL is 25 fps). When entering times, type a colon between each time segment, such as 2:50:15, which represents 2 minutes 50 seconds and 15 frames. For 5 seconds 20 frames you would enter 5:20 and so forth.
    Note that the music will only run to the length of the video in the timeline (in your case, the still images). So, after increasing the stills duration you will need to drag the end of the music track as far as required. The stills can be dragged inwards to reduce the duration if necessary.
    John
    Message was edited by: John Cogdell - added Note

  • How to parse a flat file with C#

    I need to parse a flat file with data that looks like
    01,1235,555
    02,2135,558
    16,156,15614
    16,000,000
    You get the idea. Anyway, I'd like to just used a derived column and move on except I need to put a line number on each row as it comes by so the end looks like,
    1,01,1235,555
    2,02,2135,558
    3,16,156,15614
    4,16,000,000
    I'm trying to do with a script transformation but I can't seem to get the hang of the syntax. I've tried looking at various examples but everybody seems to prefer VB and I'd like to keep all of my packages C#. I've set up my input and my output columns I just
    need to figure out how to write the code that says something like:
    row_number = 1
    line_number = row_number
    record_type = input.split.get the second data element
    data_point_1 = input.split.get the third data element
    row_number = row_number ++

    /* Microsoft SQL Server Integration Services Script Component
    * Write scripts using Microsoft Visual C# 2008.
    * ScriptMain is the entry point class of the script.*/
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
    using Microsoft.SqlServer.Dts.Runtime.Wrapper;
    [Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
    public class ScriptMain : UserComponent
    private int rowCounter = 0;
    // Method that will be started before the rows start to pass
    public override void PreExecute()
    base.PreExecute();
    // Lock variable for read
    VariableDispenser variableDispenser = (VariableDispenser)this.VariableDispenser;
    variableDispenser.LockForRead("User::MaxID");
    IDTSVariables100 vars;
    variableDispenser.GetVariables(out vars);
    // Fill the internal variable with the value of the SSIS variable
    rowCounter = (int)vars["User::MaxID"].Value;
    // Unlock variable
    vars.Unlock();
    // Method that will be started for each record in you dataflow
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    // Seed counter
    rowCounter++;
    // Fill the new column
    Row.MaxID = rowCounter;
    Here is a script to get an incremental ID. On the ReadWriteVariables of the script add the "User::MaxID" variables to get the last number. On the Inputs and Outputs tab, create an output column  here in the code it's MaxID numeric data types.

  • How to load unicode data files with fixed records lengths?

    Hi!
    To load unicode data files with fixed records lengths (in terms of charachters and not of bytes!) using SQL*Loader manually, I found two ways:
    Alternative 1: one record per row
    SQL*Loader control file example (without POSITION, since POSITION always refers to bytes!)<br>
    LOAD DATA
    CHARACTERSET UTF8
    LENGTH SEMANTICS CHAR
    INFILE unicode.dat
    INTO TABLE STG_UNICODE
    TRUNCATE
    A CHAR(2) ,
    B CHAR(6) ,
    C CHAR(2) ,
    D CHAR(1) ,
    E CHAR(4)
    ) Datafile:
    001111112234444
    01NormalDExZWEI
    02ÄÜÖßêÊûÛxöööö
    03ÄÜÖßêÊûÛxöööö
    04üüüüüüÖÄxµôÔµ Alternative2: variable length records
    LOAD DATA
    CHARACTERSET UTF8
    LENGTH SEMANTICS CHAR
    INFILE unicode_var.dat "VAR 4"
    INTO TABLE STG_UNICODE
    TRUNCATE
    A CHAR(2) ,
    B CHAR(6) ,
    C CHAR(2) ,
    D CHAR(1) ,
    E CHAR(4)
    ) Datafile:
    001501NormalDExZWEI002702ÄÜÖßêÊûÛxöööö002604üuüüüüÖÄxµôÔµ Problems
    Implementing these two alternatives in OWB, I encounter the following problems:
    * How to specify LENGTH SEMANTICS CHAR?
    * How to suppress the POSITION definition?
    * How to define a flat file with variable length and how to specify the number of bytes containing the length definition?
    Or is there another way that can be implemented using OWB?
    Any help is appreciated!
    Thanks,
    Carsten.

    Hi Carsten
    If you need to support the LENGTH SEMANTICS CHAR clause in an external table then one option is to use the unbound external table and capture the access parameters manually. To create an unbound external table you can skip the selection of a base file in the external table wizard. Then when the external table is edited you will get an Access Parameters tab where you can define the parameters. In 11gR2 the File to Oracle external table can also add this clause via an option.
    Cheers
    David

Maybe you are looking for

  • [Solved] [YAKA] Yet Another KDE 3.5.9+hal+ntfs-3g Automount Prob

    Ok so the basics KDE 3.5.9 from kdemod (not the full version): from desktop go to control center -> Desktop -> Behavior -> Device Symbols (3rd Tab) and make sure the box is checked (Checked) --> I got the corresponding Icons On Desktop CD-ROM/DVD-ROM

  • How to update ArrayCollection at runtime?

    Am facing some problem with arraycollection.. am having an arraycolelction like this... var dpHierarchy:ArrayCollection = new ArrayCollection([ {Region:"Demand1"}, {Region:"Demand2"}, {Region:"Demand3"}, {Region:"Demand4"}] now what am looking for is

  • ¿Como recuperar mi número de serie?

    Recientemente mi máquina fue formateada y no se desactivo el serial de CS5.5, ahora compre una actualizacion a CS6 pero debo actualizar del CS5.5 y mi serial quedó atrapado. Al querer usarlo me dice que ya exedí el numero de equipos permitidos. ¿Como

  • Why doesn't the length of a new event correspond to the size?

    I see three new events with the following length and size:      97.43 minutes     -     29.34 gb      107.3 minutes     -     22.86 gb      103.2 minutes     -     24.08 gb Why does the shortest file (97 min) have the most size (29 gb) while the oppo

  • JRun Connector Errors

    We've migrated from ColdFusion MX 6.1 to 8 recently and we're seeing an alarming number of error messages like these: Server Error The server encountered an internal error and was unable to complete your request. JRun Connector Protocol Error. We're