Transfer records to UNIX with different record length

Hi all,
I have the following problem. I have to transfer records to a UNIX file. The maximum length of a record is 2000. The records are TAB seperated. I also have records which have a length less then 2000. When i look at the file in Excel the last field is always very large. Isn't there a way to only transfer the real length of the record. I have tried to transfer the record in Binary an Text mode. I used the Length statement, but nothing worked for me.
Hope anyone can help me.
Greetings Maarten

Hi Maarten,
"Transfer" with "length" option should work. I am not sure what you passed as length to the "transfer" command. Did you used a fixed length of 2000 or did you actually found out the record length of each record and passed that value?
Scenario 1.
Here in this scenario, you will always have the last field set to maximum length.
loop at itab.
transfer itab-record to file length 2000.
endloop.
Scenario 2.
In this second scenario, you should have your excel's last field set to the maximum occupied length of that field.
loop at itab.
v_len = strlen( itab-record ).
transfer itab-record to file length v_len.
endloop.
Hope this helps.
Srinivas

Similar Messages

  • Reading fixed length file with different record types

    Hi,
    I need to read a fixed-length file with different record types, but the record identifier is in 31st position and not in 1st position.
    But if I give 31 as position in File adpater wizard, BPEL takes whole 1-31 as identifier.
    How we need to read such files.
    Thanks
    Ravdeep

    hi ,
    u cannot use the default wzard for this
    use some thing like this nxsd:lookAhead="30" nxsd:lookFor="S"have a look at the below link it has some examples
    http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm

  • Transfer data in unix with tab-delimited

    Hi,
    How can we transfer data to unix with tab-delimited? I have incoming file with tab-delimited and want to copy as backup file in another folder in unix. When I read the incoming file, tab separator is translated into '#' so when I do transfer data to the backup folder, the file contains '#'.
    Is there a way to transfer data in tab-delimited?
    thank you
    alia

    try to use delimiter cl_abap_char_utilities=>HORIZONTAL_TAB.
    here is a piece of code:
    REPORT  ztestfile                               .
    DATA: BEGIN OF gt_file_out OCCURS 0,
            filed(2000),
          END OF gt_file_out.
    START-OF-SELECTION.
      DATA: lv_file_out LIKE filename-fileextern.
      CONCATENATE 'Hello' 'World' INTO gt_file_out SEPARATED
        BY cl_abap_char_utilities=>horizontal_tab.
      APPEND gt_file_out.
      lv_file_out = '
    XXXX\XXXX\mytest1.txt'.
      OPEN DATASET lv_file_out FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      LOOP AT gt_file_out.
        TRANSFER gt_file_out TO lv_file_out.
      ENDLOOP.
      CLOSE DATASET lv_file_out.
    Message was edited by: joseph fryda

  • Can clips made with different recording modes (SP/LP) be put in same movie?

    My cousin recorded the family reunion in LP mode while I had my digital camcorder set to SP. I'm using Premiere Elements 4 to make a DVD using everybody's stills and the two digital camcorders' movie clips. Does it matter about the different recording modes? Can I put clips of both speeds in the same authored movie? If not, I guess I could make two movies and burn both files to the same DVD disk. Can they have the same menu? Or how do I make it easy for viewers to play both movies on their TV (not on a computer)? Thanks for your help and for any suggestions.

    If you're talking about a miniDV camcorder that's recorded in both LP and SP -- it won't make any difference at all. Digital data is digital data, as far as Premiere Elements is concerned.

  • LSMW load a file with different record format

    anyone can help me out here?
    I am trying to load a file which has exactly same record format except for the first line, and the first line is not neglectable. If i want to load this file to SAP within one LSMW load, is it feasible?
    thanks in advance.

    LSMW records fields screen by screen.  When you have recorded your LSMW, the country code, company code and personnel area are in the first screen.  So, this data must be on every line of your data file.
    Example of how your data file should be:
    Country     CoCd      Pers.Area         Field1DataLine1          Field2DataLine1         ...
    Country     CoCd      Pers.Area         Field1DataLine2          Field2DataLine2         ...
    Country     CoCd      Pers.Area         Field1DataLine3          Field2DataLine3         ...

  • Recording in QT with iSight - recording time & higher quality video

    Hi
    I would like to make long recordings with iSight & QT. I want to just click the record button and forget about it for several hours. I know I have ample disk space. I'm wondering if there is any automatic shut-off feature that I have to be aware of. Is the iSight/QT set to stop recording after a certain amount of time?
    Also, while I like the quality of the "Better" setting (H.264, 240x180), I'm wondering how to get even better quality within QT. "Good" and "Better" seem to be the only two settings.
    Many thanks
    steve

    iSight automatically shuts off (actually goes to low-power mode; see How to turn iSight (really) off) only if it is not in use.
    Video files require large amounts of disk space. If you are using external Firewire drives for "several hours" of disk space, be aware of Possible hardware or software conflicts. iSight can be picky about how and with what it shares the Firewire connections on your Mac.
    You are correct that there is no "More Than Better" setting in QuickTime Pro. For more info on QT settings and whether QT Pro can automatically shut off, try QT Discussions if you do not get authoritative answers here.

  • RFC export variable with different output length.

    I have an RFC returning language from R/3 with Datatype SY-LANGU. When I run RFC from R/3, I see language being  returned in two chars. But  I get only one char when I run  the same from Web Dynpro.
    When  I look at Web Dynpro model dictionary,  It is imported  with fixed length '1" and external length as "2".
    From ABAP Dictionary it is of  one char, But output length is two chars with some conversion routine.
    Is it possible to get language output in web Dynpro with two chars with out changing the signature of the RFC?

    Hi,
    I think you can achive this.
    You can involve value attribute context for this tranformation.
    Ashutosh

  • Error when transfer 2 oil materials with different UoMs into 1

    Hi experts,
    I have an urgent & tough issue like this:
    Our customer have a process of transferring 2 materials with 2 different base-unit-of-measure into one single material. See the following example for better understanding.
    Material 1: Mazut measured in Kg
    Material 1: Diesel measured in L15
    Some time Mazut seem to have very bad quality and need to be qualified before selling out, so our customer merge Mazut and Diesel together to improve the quality of Mazut. But it seems to be impossible in SAP.
    I've asked SAP support but no luck, it's been designed that way.
    I want to know whether other Oil projects encountered this before and what was the solution? Otherwise can you tell me how do they manage these 2 kinds of materials?
    Thank you very much,
    Best regards,

    Hi,
    I just one to know: What is the based unit of Diesel (Mazut) in other oil&gas company in the would?
    If you have any information of based unit of Diesel that is difference with DiepDH case. Please let us know.
    Thank so much,
    Huyen

  • How do I transfer a Numbers file with different tabs to an excel file?

    Hello
    I am a teacher and for each class I have a file in numbers. In each file I have different tabs for each period. Now I want to tranfer my files to my Macbook to print them out but from each file there is only one tab tranfered. How can I transfer all the tabs from each file? I transfer my files trough ITunes.
    help me please!

    Looks like I should be more careful when reading.  You did post in the iOS forum (in which case I expect most people here have iOS devices).  I do apologize for not being more carfeul.
    Here is a link to an APPLE web page that may help you transfer the document using iTunes:
    http://support.apple.com/kb/HT4088
    I hope this helps!
    Regards,
    Wayne

  • Complete data transfer to another iPhone with different iOS

    i have migrated from iPhone 4 to 5s, and my apps and contact been backed up through iTunes, While Photos and Messages still not. whenever i try a get a message that backup session has expired.... using lastest iTunes. Some Body kindly Guide Please

    Howdy amjidfromcharsadda,
    It sounds like you did a restore from your backup but the photos and messages didn't migrate over.  Now when you try again you get the error.
    Please check out this article for restore help.
    If you can't back up or restore your iPhone, iPad, or iPod using iTunes - Apple Support
    Thank you for visiting Apple Support Communities.
    Nubz

  • RE: Multiple asset posting with different dates

    Hello can we post and transfer multiple asset codes with different posting dates to different asset in one single transaction i have use ABUMN with multiple selection but it is not provide to use different posting date for different asset codes.
    Regards
    Abhisekh Mandal

    ABUMN is supporting multiple assets but not multiple dates.  Post twice with two different dates.
    Srinivas

  • How to get the previous record value in the current record plz help me...

    In my sql how to get the previous record value...
    in table i m having the field called Date i want find the difference b/w 2nd record date value with first record date... plz any one help me to know this i m waiting for ur reply....
    Thanx in Advance
    with regards
    kotresh

    First of this not hte mysql or database forum so don;t repeate again.
    to get diff between two date in mysql use date_format() to convert them to date if they r not date type
    then use - (minus)to get diff.

  • How can i compare two excel files with different no. of records.

    Hi
    I am on to a small project that involves us to compare two excel files. i am able to do it but am struck up at a point. When i compare 2 different .csv files with different no. of lines i am only able to compare upto a point till when the number of lines is same in both the files.
    Eg. if source file has 8 lines and target file has 12 lines. The difference is displayed only till 8 lines and the remaining 4 lines in source lines are not shown.
    Can you help me in displaying those extra 4 lines in source file. I am attaching my code snippet below..
    while (((strLine = br.readLine()) != null) && ((strLine1 = br1.readLine())) != null)
                     String delims = "[;,\t,,,|]";
                    String[] tokens = strLine.split(delims);
                    String[] tokens1 = strLine1.split(delims);
                   if (tokens.length > tokens1.length)
                    for (int i = 0; i < tokens.length; i++) {
                        try {
                            if (!tokens.equals(tokens1[i])) {
    System.out.println(tokens[i] + "<----->" + tokens1[i]);
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + tokens1[i]);
    out.println();
    sno++;
    } catch (Exception exception)
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + "");
    out.println();
    Thanks & Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    A CSV file is not an Excel file.
    But apart from that your logic makes no sense.
    If the 2 files are of different sizes the files are different by definition, so further comparison isn't needed, you're done.
    If you want to compare individual records, you need to compare all records from one file with all records from the other, unless the order of records is important in which case your current system might work.
    That system however is overly complicated for comparing CSV files.
    As you assume a single record per line, and if one can assume those records to have identical layout (so no leading or trailing whitespace in or between columns in one file that's not in the other) comparing records is simply a matter of comparing the entire lines.

  • Master Data: 2 records with different FROM-TO dates

    Hi,
    I am extracting the master data from R/3. In R/3 the master data record is created with valid FROM: 01/01/1900 and valid TO: 12/31/9999. But when I extract the data into BW it is coming as 2 records one with 01/01/1000-12/31/1899 range and the other with 01/01/1900-12/31/9999.
    What settings/steps I need to change to get only one record for now and of course in future any change to the records will comes as different valid date range.
    When I schedule the info package, the update tab consist of Fixed time interval start date: 10/20/2005; end date: 12/31/9999.
    Time being to avoid this in the transfer rule of FROM date info object selected constant option with date 01/01/1900 as in R/3????
    Appreciate your help on this.
    Thanks.
    Sudha.

    Hi Nagesh,
    Thanks for reply.
    I have assigned one-to-one from R/3 to BW.
    In R/3 I have FROM and TO date and assigned these two fields to Transfer structure FROM and TO info objects.
    I have maintained Transfer rule only after getting two records into BW for every one entry in R/3. In the rule I just assigned constant date to avoid 2 records for every entry from r/3. So nothing to do with the routine.
    I want to see one record in BW for every entry coming from R/3. At present in the BW master data sitting as 2 records.
    Example:
    one record in R/3 with:
    FROM date: 01/01/1900; TO date: 12/31/9999.
    Inserted 2 records into BW with:
    FROM date: 01/01/1000; TO date: 12/31/1899.
    FROM date: 01/01/1900; TO date: 12/31/9999.
    Thanks.
    Sudha.

  • 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

  • Battery Probs; Could it be the charger?

    Had a battery for my PowerBook 2.4 GHz Intel Core 2 Duo (early 2008) replaced under warranty 3 months ago, and the replacement battery is already showing signs of going the same way; 95% health. I've noticed that the transformer on the charger makes

  • TileList Add/Remove function problems for a flex beginner

    I am starting up a new project for my university course which will allow users to drag and drop icons into their own area. I wanted to use a TileList to provide the buttons for the users to select their area i.e. when a user clicks on a button in the

  • Uknown Error (-50) when re-creating library from .xml

    I was fooling around with my library trying to get it to work properly within another program (Native Instruments Traktor Pro) and goofed it up. My entire library (lib, xml and mp3s) reside on an external hard drive. Somehow the lib was overwritten w

  • Where's the task bar gone?

    The task bar and the status bar have both disappeared. How do I restore them?

  • Deutsches PageMaker-Forum?

    Hallo! Weiter unten hatte ich zwei Fragen zum PageMaker gestellt. Da mir bisher leider niemand helfen konnte, glaube ich, daß ich mit meinen Problemen in diesem Forum falsch bin (es heißt ja auch Meinungsforum). Andererseits bin ich sicher, daß sich