Export to fixed length field format

Sometimes we need to export records from our student system as fixed length text file to integrate with other software.
Basically the report will only contains  rows of records, But we want to export it to fixed length field text file.
And then automate the process.
We also have Crystal enterprise server.  What is the easy and best way to accomplish this?
Thanks

Sorry.  Please ignore my last message.  It went into the wrong thread. 
There is one huge problem with exporting to Fixed Length in 8.5.  The Fixed Length will truncate any trailing white space.  So if you have a could that's 5 characters long but the current value is only 3, it will only be 3 characters long. 
To get around this, I've had to create a formula for each column in the report and check the lenght of the field and pad or truncated accordingly. 
For example:
If Length ({Table.FIELD1}) > 10 Then
     {Table.FIELD1} [1 to 10]
Else {Table.FIELD1} & ReplicateString ("*", (10 - Length ({Table.FIELD1}));
So this column should be 10 characters long.  If the field is longer than 10 characters it will truncate it to 10, otherwise it will pad the extra spaces with *.  You can't use spaces to pad because the export driver will truncate them so I decided * were the best choice because for my purposes I knew that character would never be used. 
Good luck,
Brian

Similar Messages

  • BPC 7.5 NW -- Data Manager Export:  Fixed-Length Fields?

    Hi Experts,
    Client has a requirement that we export a batch of transaction data from BPC, which is generally no problem, but in this case they want to do it with Fixed-Length fields in the Export file.
    I've done a lot of BPC Data Manager Imports with Fixed-Length fields, and that function really works well.  But, has anyone tried to use the Export package with this option?  It doesn't seem to be working in my case yet.
    Any tips?
    Thanks so much, as always,
    Garrett
    =======================
    Update -- After going back to review documentation, it looks like the the *PAD() function is actually intended for export not really importing, which makes sense.  ...The SAP online help library says that it's meant for import, but I now believe that is a typo.
    Also, I've added the line "OUTPUTFORMAT = NORMAL" in my *OPTIONS section.  Anyone else manage to get export working on BPC 7.5 NW
    Edited by: Garrett Tedeman on Mar 3, 2011 1:37 PM

    Update -- This problem may now be resolved.
    I have been able to conduct test IMPORTs of 48,000, then 96,000 and then 1.7 million records.  All were fine.
    It turns out that that difference is that the text files were sorted by amount in the ones that failed.  They were sorted by GLAccount in column A for the ones that succeeded.
    Edit:  Yep, all files loaded normally when re-sorted by GLACCOUNT, etc. on the left-hand side.  Apparently, when you're doing a lot of records that might confuse the system or something
    Edited by: Garrett Tedeman on Nov 18, 2010 11:41 AM

  • Exporting to fixed length text using Crystal Enterprise 10

    Post Author: adamsueryan
    CA Forum: Deployment
    I would like to know if it is possible to export from Crystal Enterprise 10 to a fixed length text file similar to the text exporting option using Crystal Reports 8.5.  From Enterprise 10 I see you can export to Rich Text Format but that is not really the same.
    Adam

    Post Author: hamish_sco
    CA Forum: Exporting
    I normally use these settings, which work pretty well; Excel Format:  CustomOptions:  Column width based on - Detailsthen the following boxes ticked;Export Object FormattingMaintain Relative Object PositionMaintain Column AlignmentExport Page Header and Footer CheersHamish

  • Output file as a text file with tab delimited and fixed length fields

    Hi all,
    I have developed a custom report which outputs an excel file on the user desktop who executes that report.Now i need to create an additional (second) excel file with almost the same data as the first file.
    Im using the FM GUI_DOWNLOAD to create the file.i need have the 2nd file as txt file(seperated by space/tab delimited) and also i want the fields to have fixed length.For this format of the file,what parameters do I need to pass to the FM ?
    BR,
    SRM Tech.

    Thanks for the prompt reply.
    Also in the sel screen,Im entering the path where  the o/p file needs to be downloadede.g. C:/Output_folder/Output.xls...Now if I need a text file,do I need to give the fielname as C:/Output_folder/Output.txt.?

  • How to output non-fixed length field by DMEE?

    Hi,
    In DMEE, I need to set a fixed length for each field. If the source data length is less than what we set, it will ouput space to fill in rest of the place. Is that a way I could just out put exactly what I need? No extra space to be output.
    Thank you!

    Hi
    The extra spaces can be removed as follows:
    In the transaction DMEE --> Head --> Format attributes --> Field type = 1
    Best regards
    Jean Daniel

  • File Adapter fixed length Native format Builder schema not reading the data as expected

    Hi
    We are using a File Adapter for reading a fixed length data. Using the schema we are able to read the file but the places are incorrect. Following is the schema that we used and the payload.
    At the last you can find our expected read of data how it should be.
    With out the record type code we are not even reading the file. Hope there should be a correction in the schema. Please suggest
    Schema that we are using:
    <?xml version= '1.0' encoding= 'UTF-8' ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
         xmlns:tns="http://xmlns.energy.com/CreateReturnedItemGENVNDRPReqABCSImplFileAdapterReadReturnedItem"
         targetNamespace="http://xmlns.energy.com/CreateReturnedItemGENVNDRPReqABCSImplFileAdapterReadReturnedItem"
         elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:version="NXSD" nxsd:stream="chars"
         nxsd:encoding="US-ASCII">
        <xsd:element name="GENVNDRReturnedItem">
            <xsd:complexType>
                <xsd:sequence minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="fixedLength" nxsd:length="1">
                    <xsd:element name="HeaderRec" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:startsWith="1">
                        <xsd:complexType>
                            <xsd:sequence>
                                <xsd:element name="RecordTypeCode" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="1" nxsd:padStyle="tail"/>
                                <xsd:element name="PriorityCode" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="2" nxsd:padStyle="tail"/>
                                <xsd:element name="ImmediateDstn" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="10" nxsd:padStyle="tail"/>
                                <xsd:element name="ImmediateOrgin" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="10" nxsd:padStyle="tail"/>
                                <xsd:element name="FileCrDt" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="6" nxsd:padStyle="tail"/>
                                <xsd:element name="FileCrTm" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="4" nxsd:padStyle="tail"/>
                                <xsd:element name="FileIdMdfr" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="1" nxsd:padStyle="tail"/>
                                <xsd:element name="RecSize" type="xsd:string" nxsd:style="fixedLength" nxsd:length="3"
                                     nxsd:padStyle="tail"/>
                                <xsd:element name="BlockingFctr" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="2" nxsd:padStyle="tail"/>
                                <xsd:element name="FormatCd" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="1" nxsd:padStyle="tail"/>
                                <xsd:element name="ImmediateDstnNm" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="23" nxsd:padStyle="tail"/>
                                <xsd:element name="ImmediateOrginNm" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="23" nxsd:padStyle="tail"/>
                                <xsd:element name="RefCd" type="xsd:string" nxsd:style="fixedLength" nxsd:length="8"
                                     nxsd:padStyle="tail"/>
                            </xsd:sequence>
                        </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="BatchHdrRec" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:startsWith="5">
                        <xsd:complexType>
                            <xsd:sequence>
                                <xsd:element name="RecordTypeCode" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="1" nxsd:padStyle="tail"/>
                                <xsd:element name="ServClsCode" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="3" nxsd:padStyle="tail"/>
                                <xsd:element name="CmpnyName" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="16" nxsd:padStyle="tail"/>
                                <xsd:element name="CmpnyDiscretionaryData" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="20" nxsd:padStyle="tail"/>
                                <xsd:element name="CmpnyIdfn" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="10" nxsd:padStyle="tail"/>
                                <xsd:element name="StdClsCode" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="3" nxsd:padStyle="tail"/>
                                <xsd:element name="CmpnyEntryDesc" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="10" nxsd:padStyle="tail"/>
                                <xsd:element name="CmpnyDescDate" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="6" nxsd:padStyle="tail"/>
                                <xsd:element name="EffEntryDate" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="6" nxsd:padStyle="tail"/>
                                <xsd:element name="SettlementDate" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="3" nxsd:padStyle="tail"/>
                                <xsd:element name="OrgntrStatusCode" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="1" nxsd:padStyle="tail"/>
                                <xsd:element name="OrgntrBatchCode" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="15" nxsd:padStyle="tail"/>
                            </xsd:sequence>
                        </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="FileControlRec" nxsd:style="terminated" nxsd:terminatedBy="${eol}"
                         nxsd:startsWith="9">
                        <xsd:complexType>
                            <xsd:sequence>
                                <xsd:element name="RecordTypeCode" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="1" nxsd:padStyle="tail"/>
                                <xsd:element name="BatchCnt" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="6" nxsd:padStyle="tail"/>
                                <xsd:element name="BlockCnt" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="6" nxsd:padStyle="tail"/>
                                <xsd:element name="EntryAddendaCnt" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="8" nxsd:padStyle="tail"/>
                                <xsd:element name="EntryHash" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="10" nxsd:padStyle="tail"/>
                                <xsd:element name="TtlDbtEntryDlrAmt" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="12" nxsd:padStyle="tail"/>
                                <xsd:element name="TtlCrdtEntryDlrAmt" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="12" nxsd:padStyle="tail"/>
                                <xsd:element name="Reserved" type="xsd:string" nxsd:style="fixedLength"
                                     nxsd:length="39" nxsd:padStyle="tail"/>
                            </xsd:sequence>
                        </xsd:complexType>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
    </xsd:schema>
    Sample data:
    1011390714890 0910000191406110449A094101MCSCLDA_TESTIN    
    XPLLS KNRGO CNNK         
    5200MCSCLDA_TESTIN  e-Bill         
    2390714890TELe-Bill     
    1406100001091000017000001
    6262759774891010000074743
    0000033793102651-013  U  HOLBACH KARLA & JAMES   1091000013925011
    799R01091000013925011 
    27597748                                       
    091000010000001
    820000000200275977480000000337930000000000002390714890                    
    091000010000001
    9000060000025000001200995048661000001265867000000000000                                 
    Read File receive Activity:
    <GENVNDRReturnedItem>
      <HeaderRec>
        <RecordTypeCode>0</RecordTypeCode>
        <PriorityCode>11</PriorityCode>
        <ImmediateDstn>390714890</ImmediateDstn>
        <ImmediateOrgin>0910000191</ImmediateOrgin>
        <FileCrDt>406110</FileCrDt>
        <FileCrTm>449A</FileCrTm>
        <FileIdMdfr>0</FileIdMdfr>
        <RecSize>941</RecSize>
        <BlockingFctr>01</BlockingFctr>
        <FormatCd>M</FormatCd>
        <ImmediateDstnNm>CSCLDA_TESTIN X</ImmediateDstnNm>
        <ImmediateOrginNm>PLLS KNRGO CNNK</ImmediateOrginNm>
        <RefCd></RefCd>
      </HeaderRec>
      <BatchHdrRec>
        <RecordTypeCode>2</RecordTypeCode>
        <ServClsCode>00M</ServClsCode>
        <CmpnyName>CSCLDA_TESTIN e</CmpnyName>
        <CmpnyDiscretionaryData>-Bill 2</CmpnyDiscretionaryData>
        <CmpnyIdfn>390714890T</CmpnyIdfn>
        <StdClsCode>ELe</StdClsCode>
        <CmpnyEntryDesc>-Bill</CmpnyEntryDesc>
        <CmpnyDescDate>1</CmpnyDescDate>
        <EffEntryDate>406100</EffEntryDate>
        <SettlementDate>001</SettlementDate>
        <OrgntrStatusCode>0</OrgntrStatusCode>
        <OrgntrBatchCode>91000017000001</OrgntrBatchCode>
      </BatchHdrRec>
      <FileControlRec>
        <RecordTypeCode>0</RecordTypeCode>
        <BatchCnt>000600</BatchCnt>
        <BlockCnt>000250</BlockCnt>
        <EntryAddendaCnt>00001200</EntryAddendaCnt>
        <EntryHash>9950486610</EntryHash>
        <TtlDbtEntryDlrAmt>000012658670</TtlDbtEntryDlrAmt>
        <TtlCrdtEntryDlrAmt>00000000000</TtlCrdtEntryDlrAmt>
        <Reserved></Reserved>
      </FileControlRec>
    </GENVNDRReturnedItem>
    Expected Read data how we are looking:
    <GENVNDRReturnedItem>
      <HeaderRec>
        <RecordTypeCode>0</RecordTypeCode>
        <PriorityCode>11</PriorityCode>
        <ImmediateDstn>39071489</ImmediateDstn>
        <ImmediateOrgin>0091000019</ImmediateOrgin>
        <FileCrDt>140611</FileCrDt>
        <FileCrTm>0449</FileCrTm>
        <FileIdMdfr>A</FileIdMdfr>
        <RecSize>094</RecSize>
        <BlockingFctr>10</BlockingFctr>
        <FormatCd>1</FormatCd>
        <ImmediateDstnNm>MCSCLDA_TESTIN</ImmediateDstnNm>
        <ImmediateOrginNm>XPLLS KNRGO CNNK</ImmediateOrginNm>
        <RefCd/>
      </HeaderRec>
      <BatchHdrRec>
        <RecordTypeCode>2</RecordTypeCode>
        <ServClsCode>200</ServClsCode>
        <CmpnyName>MCSCLDA_TESTIN</CmpnyName>
        <CmpnyDiscretionaryData>e-Bill</CmpnyDiscretionaryData>
        <CmpnyIdfn>2390714890</CmpnyIdfn>
        <StdClsCode>TEL</StdClsCode>
        <CmpnyEntryDesc>e-Bill</CmpnyEntryDesc>
        <CmpnyDescDate/>
        <EffEntryDate>140610</EffEntryDate>
        <SettlementDate>000</SettlementDate>
        <OrgntrStatusCode>1</OrgntrStatusCode>
        <OrgntrBatchCode>091000017000001</OrgntrBatchCode>
      </BatchHdrRec>
      <FileControlRec>
        <RecordTypeCode>0</RecordTypeCode>
        <BatchCnt>000060</BatchCnt>
        <BlockCnt>000025</BlockCnt>
        <EntryAddendaCnt>00000120</EntryAddendaCnt>
        <EntryHash>0995048661</EntryHash>
        <TtlDbtEntryDlrAmt>000001265867</TtlDbtEntryDlrAmt>
        <TtlCrdtEntryDlrAmt>000000000000</TtlCrdtEntryDlrAmt>
        <Reserved/>
      </FileControlRec>
    </GENVNDRReturnedItem>

    at step 8 of 9 of the file adapter wizard, the icon appears as a cog, on the right, with caption "define schema for native format".
    I have JDev 11..1.1.3.0
    The problem might be with the version of the SOA extensions you have installed....

  • Fixed width field format in txt file

    I want to create text file for sending to bank. Every row in the text file is of variable length. For Ex: 1st row contains name and a fixed length of 33 char. 2nd row contains company and fixed length of 12 char.
    Howewer when i download the data using GUI_DOWNLOAD it is taking the row with full length i.e. 256 char that of the internal table line.
    If I use the truncate trailing blanks parameter, it removes all the spaces that are on the right of the name. what is our requirement is that irrespective of whatever is the actual length of the name it should take only 33 characters in first row. (ie If i place cursor on first character and press END button on keypad the cursor must move to 34 char).
    But at present what is happening is that it is either moving to the actual end of the name or column 256 ie the end of line.
    Any help to this will be highly appreciated.

    You have to move the contents to a string variable. Put the Line feed(cl_abap_char_utilities=>newline) or CR_LF (cl_abap_char_utilities=>dr_lf) at the offset as required by you.
    Download the file as 'BIN' using GUI_DOWNLOAD. You have to pass the length as the length of the string variable.
    Try this & come back if you have any doubts.
    BR,
    Suhas

  • Fixed length fields??

    Hi,
    can anyone suggest a simple way of doing the following...
    using rightnow as an instance of a calendar,
    rightNow.get(Calendar.MINUTE) returns the minute, but if its less than 10, doesn't have the leading zero, but i want it, so i display 09 instead of just 9. could do it with an if statement, but i think thats messy. Cheers
    Steve

    Hi,
    Simply use the following:
    DecimalFormat df = new DecimalFormat( "00" );
    System.out.println( df.format( j ) );
    Works with any number. The format given to the DecimalFormat class tells it the minimum number of fields to use for any given number. For example:
    int j = 9; --> 09
    int k = 12; --> 12
    int m = 113; --> 113
    Not messy at all ...
    Regards,
    Manfred.

  • Fixed length field in conky

    Please note the "Net: 271B " in the second line on conky. This screenshot was taken when internet was almost idle.
    When the internet speed increases to something like 250Kbps, the while second line shifs by 1 or 2 pixels, resulting into the movement of the whole second line.
    How can I avoid that?
    Screenshot:-
    http://img830.imageshack.us/i/conkyissue.png/
    My .conkyrc file:-
    #avoid flicker
    double_buffer yes
    #own window to run simultanious 2 or more conkys
    own_window yes
    own_window_transparent yes
    own_window_type desktop
    own_window_hints undecorate,sticky,skip_taskbar,skip_pager
    #borders
    draw_borders no
    border_margin 1
    #shades
    draw_shades yes
    # Stippled borders?
    stippled_borders 8
    # border margins
    border_margin 40
    # border width
    border_width 1
    #position
    gap_x 0
    gap_y 0
    alignment top_left
    #behaviour
    update_interval 1
    #colour
    default_color 8f8f8f
    #default_shade_color 000000
    own_window_colour 262626
    #font
    use_xft yes
    xftalpha 0.8
    xftfont bauhaus:pixelsize=10
    override_utf8_locale yes
    #to prevent window from moving
    use_spacer yes
    minimum_size 1268 0
    #mpd
    mpd_host localhost
    mpd_port 6600
    TEXT
    Cpu: ${color e0e0e0}${font} ${freq}Mhz ${cpu}% ${cpubar 7,50} | ${color} Temp: ${execi 60 ~/thermal} | ${color} Mem: ${color e0e0e0}${font}${mem} ${membar 7,50} | ${color} Root: ${color e0e0e0}${font}${fs_free /} ${color} | ${color} Email: ${color e0e0e0}${execi 300 ~/gmail} | ${color} Mpd: ${color e0e0e0}${font}${mpd_smart} | ${color} Up: ${color e0e0e0}${font}${uptime_short}${color} | ${color} ${execi 5 ~/battery}
    Net: ${color e0e0e0}${font}${downspeed eth0} Kb/s ${color} ${totaldown eth0} downloaded | ${color} ${color e0e0e0}${upspeed eth0} Kb/s ${color} ${totalup eth0} uploaded${color}

    anonymous_user wrote:
    For example, in the last line, use this:
    Net: ${color e0e0e0}${font}${downspeed eth0} Kb/s ${color} ${goto 150}${totaldown eth0} downloaded | ${color} ${color e0e0e0}${upspeed eth0} Kb/s ${color} ${totalup eth0} uploaded${color}
    Tweak the value of the goto if necessary.
    cool. that did the job...
    Thanks

  • Export Data To Fixed Length File

    Hello,
    I have a requirement to export a couple of files that need to be in a fixed length format. 
    I've tried opening the dataset and writing the records passing the column that the records should appear:
        WRITE /, field1, 10 field2, etc...
    I've also tried to do it through SAP_CONVERT_TO_CSV_FORMAT and the text version as well.
    Is there a predefined function that will allow me to export as fixed length? 
    Thank you in advance

    Hi Jeff,
    Following is the code to do the same:
    DATA: file TYPE string VALUE `flights.dat`,
          wa   TYPE spfli.
    FIELD-SYMBOLS TYPE x.
    OPEN DATASET file FOR OUTPUT IN BINARY MODE.
    SELECT *
           FROM spfli
           INTO wa.
      ASSIGN wa TO CASTING.
      TRANSFER TO file.
    * TRANSFER LENGTH 200 to file.
    ENDSELECT.
    CLOSE DATASET file.
    Best regards,
    Prashant

  • Multiple idoc segment values to field fixed length FCC

    Friends,
    I need help to resolve a mapping issue. here is the brief about the scenario.
    Scenario: IDoc to Flat file Fixed length fields
    Issue: Idocs has values in multiple segments. i need to check condition for each segment occurrence if value exists then pass value if not then pass constant (i have to pass constant so that i can get the actual column width after FCC)
    Iam using the following logic.
    If condition then value1 -> remove contexts -> split by value -> target
    My scenario works fine for the above mapping however when i try introduction a constant in "if then else" then all my contexts in the target structure messes up.
    Thanks for your help.
    Regards,
    Pavan

    Did you tried MapWithDefault before Remove Contexts? To give more perfect solution , we would like to see a sample structure.
    raj.

  • Bank statement: problem to load variable length field

    we have many bank accounts with different banks, and we would like to use the bank reconciliation module to do bank reconciliation.
    we have problem in load the MT940 bank statement. All these banks are providing so called standard SWIFT940 format, which not able to give fixed length field.
    we have problem on line 61 which have a lot of variable length fields.
    line 61 comprise of 7 fields, which are:
    A) Value date - fixed 6 chars.
    B) Entry date - fixed 4 chars.
    C) Credit/debit - variable 1-2 chars.
    D) Fund Code - fixed 1 char
    E) Transaction amount - variable 15 chars
    F) Transaction code/type - fixed 4 chars
    G) MID, cheque#, BIS - variable 16 chars
    How can we write the SQL Loader script if there is no delimiter, and the start position of the fields are not fixed?
    we can load A and B easily, but C onwards we will have problems.
    please help.
    INTO TABLE ce_stmt_int_tmp
    WHEN rec_id_no = '61'
    TRAILING NULLCOLS
    (rec_no RECNUM,
    rec_id_no POSITION(1:2) CHAR,
    column1 POSITION(4:9) CHAR,
    column2 POSITION(10:13) CHAR,
    column3 ??
    column4 ??
    column5 ??
    column6 ??
    column7 ??
    ------

    Hi Linda,
    As said by gupta, please check, whether the bank statement has the statement 62F:
    If not, please get the statement again from bank and ensure that the end statement 62F exists in the statement..
    This will help you to overcome your problem..
    Regards,
    Praisty

  • XSLT Mapping : XML to Fixed Length File

    Hi,
    I have to code a XSLT mapping which converts the XML into a Fixed Length File Format. I am getting the output but it has some garbage values (Some extra spaces in front of first record and also extra blank lines before the first record)
    I am pasting my xsl sheet :
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="text" indent="yes" media-type="text/plain"/>
         <xsl:template match="Employees">
              <xsl:for-each select="Employee">
                   <xsl:value-of select="Name"/>
                   <xsl:value-of select="ID"/>
                   <xsl:value-of select="ADD"/>
                   <xsl:text>&#xA;</xsl:text>
              </xsl:for-each>
         </xsl:template>
    My input XML file is as follows:
    <?xml version="1.0"?>
    <p1:Test02 xmlns:p1="http://www.infosys.com/xi/training/hyd/66289">
            <Employees>
              <Employee>
                 <Name>Anurag</Name>
                 <ID>1121</ID>
                 <ADD>Hyderabad</ADD>
             </Employee>
             <Employee>
                 <Name>Divya</Name>
                 <ID>1122</ID>
                 <ADD>Hyderabad</ADD>
             </Employee>
             <Employee>
                 <Name>Rasmi</Name>
                 <ID>1123</ID>
                 <ADD>Bangalore</ADD>
                </Employee>
         </Employees>
    </p1:Test02>
    And the output i am receiving is as follows:
        Anurag1121Hyderabad
    Divya1122Hyderabad
    Rasmi1123Bangalore
    Please do help.....

    hi,
    >>>>
    <xsl:output method="text" indent="yes" media-type="text/plain"/>
    you allow the spaces by using indent="yes"
    try with indent="no"
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • How to map xml to a fixed length string?

    Hi All,
    I have a requirement to map request xml to a string of fixed length and format:
    For eg,
    Source:
    <Person>
    <Name>George</Name>
    <Age>21</Age>
    </Person>
    Target:
    String of format
    Name : 8 chars
    Age : 2chars.
    so the required mapping should result in
    "George 21".
    Note: 2 blanks after "George" to allow for 8 characters. Is this kind of mapping possible using ALSB xquery? I have tried to create a MFL representation for the string , and used it in the xquery as the targer but it is generating
    "George21".Only data present in source is getting mapped :(

    My advice would be to use MFL transformation for that.
    Documentation about MFL can be found at edocs: http://edocs.bea.com/alsb/docs26/fbhelp/index.html
    Find tips and tricks about ALSB at my blog: http://dev2dev.bea.com/blog/jordinho/

  • FIXED LENGTH files supported by SAP

    Hi All,
    While loading Flatfile in SAP BI system we can specify data file format as either FIXED LENGTH or CSV(in Extraction tab of Datasource).
    So my question is which files we can store in a FIXED LENGTH data format.
    Thanks,
    Shamkant

    Hi,
    In Fixed length file we load ASCII file, any file having ( *.TXT or *.DAT ) can be loaded as fixed length.
    Thanks
    Mayank

Maybe you are looking for

  • Error while posting data with BAPI_ACC_ACTIVITY_ALLOC_POST

    Hi All I am using BAPI_ACC_ACTIVITY_ALLOC_POST to post documents but getting error as 'The document has too many line items (maximum number = 997). Even though my input file has only 900 records. I tried reducing it to 600 . Even then I am getting sa

  • TS1406 I have followed all instructions to try and fix the "not a Win32 app"

    but I still get the error. Anything else I should try?

  • Query Performance Please Help

    Hi can any body tell me how do I improve the performance of this query.This query takes forever to execute. PLEASE HELP select substr(d.name,1,14) "dist", sum(r.room_net_sq_foot) "nsf", sum(r.student_station_count) "sta", sum(distinct(r.cofte)) "fte"

  • How to create  records in java

    hi, i would like to know the way to create a record in java(arrays of object with various data type). i never used this site before so please tell me how and when will i get the result for this and how r u going to contact me. i will be glad if you h

  • Steaming video is distorted

    Recently my video playback has been distorted. When playing Youtube videos for example, there is a line splitting the picture when there is fast action being played. However, any video that has been saved to the disk doesn't show this interference. a