Fixed lengh file processing

Hi All,
I'm doing fixed lenghth file by small example. but my receiver adapter is showing following error
Receiver Adapter v2123 for Party '', Service 'F1_BS':
Configured at 2006-04-19 17:28:19 BST
No message processing until now
Following is my configuration
My file
123456
venugopalsirangi
Sender communication channel
Record structure: H1,,sub1,
FNAME               Value
H1.fieldNames           KF
H1.fieldFixedLengths     6
H1.fieldFixedType      char
H1.endSeparator          'nl'
sub1.fieldNames          KF,Lname,Sname
sub1.fieldFixedLengths     4,5,7
sub1..fieldFixedType      char
sub1.endSeparator     'nl'
H1.keyFieldValue     '144857'
sub1.keyFieldValue     'venu'
Receiver communication channel
Record structure:
FNAME               Value
H1.fieldNames           KF
H1.fieldFixedLengths     6
H1.fieldFixedType      char
H1.endSeparator          'nl'
sub1.fieldNames          KF,Lname,Sname
sub1.fieldFixedLengths     4,5,7
sub1..fieldFixedType      char
sub1.endSeparator     'nl'
H1.keyFieldValue     '144857'
sub1.keyFieldValue     'venu'
Regards,
venu.

Hi Prateek,
XML file is successfully picked up by the adpater without content conversion.
If I do content conversion it is not receiver adapter not processing the message.
MY file.
0112345010101
021111112222
03100001111112222
03100011111212223
041000011111
021231116722
03100781119012332
041005611001
059453287699
MY xml file
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:LSOUT_MT xmlns:ns0="urn://LengthSpecific">
- <Header>
  <Key1>01</Key1>
  <name>12345</name>
  <date>010101</date>
  </Header>
- <Hbatch>
  <Key2>02</Key2>
  <hvalue1>11111</hvalue1>
  <hvalue2>12222</hvalue2>
  </Hbatch>
- <body>
  <Key3>03</Key3>
  <bvalue1>10000</bvalue1>
  <bvalue2>111111</bvalue2>
  <bvalue3>2222</bvalue3>
  </body>
- <tbatch>
  <Key4>04</Key4>
  <tvalue1>10000</tvalue1>
  <tvalue2>11111</tvalue2>
  </tbatch>
- <trailer>
  <Key5>05</Key5>
  <value1>94532</value1>
  <value2>87699</value2>
  </trailer>
  </ns0:LSOUT_MT>
MY content conversion of sender adapter  is:
record struct :Header,1,Hbatch,,body,,tbatch,*,trailer,1
Header.fieldFixedLengths 2,5,6
Header.keyFieldValue  01
Header.fieldNames Key1,name,date
the same approach i used for  Hbatch, body and tbatch..
My content conversion for receiver adapter is.
Record structure: Header,Hbatch,body,tbatch,trailer
Header.fieldFixedLengths 2,5,6
Header.fieldNames Key1,name,date
Header.processFieldNames fromConfiguration
rest as above.
Regards,
venu.

Similar Messages

  • External tables-Fixed length file

    Hi All,
    I have a fixed length file that i load daily using an External table. Recently, one of the field, IP length was changed and customer wants to send both old records with 8 byte length and new records with 11 byte length in the same data file, until complete migration takes place.
    Will it be possible for External tables to handle this requirement?. Or Is there any other possibility to treat it.
    The old file contains 104 fields with IP field position form 490 to 498. Total
    The new file contains 104 fields with the IP position from 490 to 501.
    Thanks,
    Sri.

    If the two record types are mixed in the same file, then you will have problems loading them. I can see two possible solutions, in no particular order of preference (using your example data):
    1. Redefine the external table something like:
    Position (record_type (1:1)
              version     (2:5)
              data        (6:41))then parse the remaining fields based on the version number when you select from the external table.
    2. Create two external tables over the same file, one for version 1.00 and one for version 1.01 using the LOAD WHEN clause to determine which set of data to load when you select. Something like:
    CREATE TABLE version1 ...
    ORGANIZATION EXTERNAL ...
    ACCESS PARAMETERS
    (RECORDS DELIMITED BY newline
      LOAD WHEN (version = 1.00)
    < definition for the old format >
    and
    CREATE TABLE version101 ...
    ORGANIZATION EXTERNAL ...
    ACCESS PARAMETERS
    (RECORDS DELIMITED BY newline
      LOAD WHEN (version = 1.01)
    < definition for the new format >Then yor processing would use something like:
    SELECT ip, last_name
    FROM version1
    UNION ALL
    SELECT ip, last_name
    FROM version101HTH
    John

  • Creating a Fixed Length File

    Greetings,
    I'm creating an application that need to create a fixed length file on a UNIX system and need help. I have an internal table(s) which contain structures with fields of different lengths (type c) and so I have a routine that concatenates these fields into a single record to be sent to a file using the open dataset. This process is squeezing out all my spaces and so my fixed length file is lost. Can someone assist in creating a fixed length file from an internal table without using delimiters?
    Thanks!

    " May be placing a carriage return end of each records
    " will solve your problem
    class cl_abap_char_utilities definition load.
    data : begin of itab,
            field1(1) type c,
            field2(2) type c,
            field3(3) type c,
            field4(4) type c,
    crlf(2) type c value cl_abap_char_utilities=>cr_lf. "<<<See this line<<<
    data : end of itab.
    Data : begin of itab1 occurs 0.
            Field(20) type c.
    Data : end of itab1.
    Loop at itab.
         Move itab to itab1.
         Append itab1.
    Endloop.
    Open dataset  ........
    Loop at itab1.
       Transfer itab1 TO dataset.
    Endloop.

  • Reading a fixed length file

    Hi All,
    I am trying to read a fixed length file with .DAT extension through an FTP Adapter. I am using a read(polling) operation.
    In the file there are three records(H,D,T). The length of all the three records is more than 100.When I am trying to build a schema for that file using native format builder, maximum position that i get is 100 and if i manually try to put the position beyond 100 say 120,while building the schema and then run the composite using the generated schema, the file is not polled from the location So if anyone could help me to clarify my doubts regarding reading of fixed length files.
    a. Can i read i fixed length file which contains records whose position is more than 100.
    b. If yes, then how do i do that?
    Any help is appreciated.
    Thanks in Advance.

    Here's one way to start. Extend this class for the particular functionality you want:import java.io.DataInputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    /** Processes binary files which have embedded data records. */
    public abstract class BinaryInputFile extends File
    * Class constructor.
    * @param fileName The input file name.
    * @throws NullPointerException if the <code>pathname</code> parameter is <code>null</code>
    protected BinaryInputFile(String fileName) throws NullPointerException
       super(fileName);
    * Reads the file, one line at a time, passing each line to the subclass� process()
    * function.
    * @throws IOException if an error occurs.
    public void process() throws IOException
       DataInputStream stream = new DataInputStream(new FileInputStream(this));
       process(stream);
    * Process the file data.
    * @param stream The input stream.
    protected abstract void process(DataInputStream stream);
    }

  • MFL Exception while parsing fixed length file

    Hello Folks,
    I am getting a MFLException when I run a fixed length file through a MFL Format tester.
    <MFLException>
    <ErrorMessage>Did not completely process all input data.</ErrorMessage>
    <Details>
    <Detail>
    <Name>ErrorCode</Name>
    <Value>-3</Value>
    </Detail>
    <Detail>
    <Name>DataOffset</Name>
    <Value>2720</Value>
    </Detail>
    </Details>
    </MFLException>
    Added a Filler to handle any new line characters at the EOF.
    Any ideas what's wrong with my MFL ?
    Cheers,
    Abhijeet

    Hi Atheek,
    Thanks for the response. I sent an email to you gmail id with MFL & sample message being used.
    Cheers,
    Abhijeet

  • Please help with reading fixed-length file

    I am reading a fixed-length file from a batch program and I need to read through each line, parsing out records in each, and replacing the first character in each line after I finish processing. I am using a RandomAccessFile, but I am not sure if this is best for my needs.
    Here is essentially the code that I am using:
    RandomAccessFile raf = new RandomAccessFile(File, "rw");
    int pointer = 0;
    int recordLength = 65;
    int counter = 0;
    string test = "X";
    pointer = raf.getFilePointer();
    while ((line = raf.readLine()) != null) {
    //set file pointer
    seek(counter * recordLength);
    counter ++;
    if (line.substring(0, 1).equals(test)) {
    continue;
    var1 = line.substring(7, 22);
    var2 = line.substring(23, 41);
    var3 = line.substring(42, 52);
    var4 = line.substring(53, 53);
    //PROCESSING
    raf.writeChar(test);

    Thanks for the suggestion. I think that the
    BufferedReader is the way that I will go. Do you
    happen to know the best way to update the 1st Char of
    each line as I'm reading each line using Buffered
    Writer?Hi,
    To update the first char of each line, you could read each line of the file into a StringBuffer, modify the value, and then write the value back out to the file.
    I had to do something similar.
    eg.
    StringBuffer buf = new StringBuffer();
    BufferedReader in = new BufferedReader(
        // data file source
    new FileReader(db_location));
    String s;
    // while there are still items to read
    while ((s = in.readLine()) != null)
        System.out.println("reading file");
        // split into component parts so we can modify
        StringTokenizer t = new StringTokenizer(s,",");
        int id = Integer.parseInt(t.nextToken());
        String code = t.nextToken();
        int quantity = Integer.parseInt(t.nextToken());
        // copy component parts into StringBuffer
        buf.append(id+",");
        buf.append(code+",");
        buf.append("\n");
         // use StringBuffer methods here to isolate first character
         // use StringBuffer methods to replace first value of input in buffer
         // eg.
              buf.replace(index,length,","+ new_code);
    // print out the StringBuffer to rewrite updated file
    PrintWriter output = new PrintWriter(
        new BufferedWriter(
        new FileWriter(db_location, false)));
    output.println(buf.toString());
    output.close();As always, there is more than one way to skin a cat. But this is my way.
    I think that JDK 1.4 has some new methods, but not 100% sure of that.
    //Daniel.

  • Fixed length file to xml file

    Hi,
    Fixed length file to xml files.
    i have to generate 2 xml files based on a field in the incoming file. structures of both xml files are same.
    I want to know how many target data type ,target msg interfaces have to be created?
    Thanks.

    Ok got you. Best thing would be to use  a simple OS command copy in your receiver communication channel. So do one mapping and generate one file and then use the OS command in receiver comm. channel after message processing then it should work for you.
    Regards,
    ---Satish

  • ITouch does not appear in iTunes - file processes missing

    I recently updated to 9.2 about three weeks ago. When I plug in my iTouch, it is recognized by Windows and charges; however, it never appears in iTunes. I have a classic iPod. iTunes will recognize it and sync it. When I looked into the file processes running and what should run according to apple, two files are missing: AppleMobileSync.exe. and SyncServer.exe. Would this be the reason the iTouch will not sync?
    I have tried to restart the apple server as posted on the troubleshooting pages. I have done everything but restore my iTouch.
    I really want to be able to move new music to my touch. I have upgraded to iTunes 9.2.1 hoping that was a fix. Any ideas?
    iTouch: OS3.1.3 32GB
    iTunes: 9.2.1
    Windows XP Home on Sony Vaio
    Message was edited by: Panda411

    You may need to remove and reinstall the Apple Mobile Device Service that is installed with iTunes.
    See this article: http://support.apple.com/kb/HT1747?viewlocale=en_US

  • Individialized multiple file processing

    Hi everybody,
    I would appreciate your answer in the following: Does PSE provide a frame for individual setting of multiple file processing (macro command function?). The standardized one does not help me, as the quick fix option do not turn out as I need it.
    I usually have about 30-40 photos per day which I need to adjust with "smart fix 1%" - takes ages to do these all individually.
    Thanks for your reply.

    No, there's no macro function.  What you see in the "Process Multiple Files" dialog is all you get.
    You can use the free XnView image viewer application:
    http://www.xnview.com/
    which allows batch processing with image adjustments which can be customized.
    Ken

  • Multiple file processing

    I have a large number of jpeg files that I would like to process at one time, applying the Enhance/Auto Smart Fix tool, and then saving and overwriting the original files in the original folder.
    Is this possible? If so, how do I do it. 
    Thanks for help
    Bill

    bcselltime wrote:
    I have a large number of jpeg files that I would like to process at one time, applying the Enhance/Auto Smart Fix tool, and then saving and overwriting the original files in the original folder.
    Is this possible? If so, how do I do it. 
    Thanks for help
    Bill
    In Expert mode, use the menu 'File / process multiple files'.
    You have the option to overwrite the original files (a very bad idea in my opinion) and you can specify which automatic enhancements you want.

  • Error message by periodic weekly: No output from the 1 file processed

    Hi there,
    since four weeks, I got a problem with the maintenance script periodic weekly. Up to December 22nd, the script did, what it should do: rebuilding the database of locate and whatis, rotating log-files. Since one week later, I got the error message: No output from the 1 file processed.
    Normally, I use Anacron to do the job. When I noticed the problem, I tried to start the script with Tinker Tool System getting the same result. Another try using the Terminal (sudo periodic weekly) also failed. The commands locate and whatis are working, locate.updatedb and makewhatis also. I'm running 10.4.8; in the past, I did not have such problems. Anyone with an idea or solution?
    Thanks
    Klaus
    MacBook Pro   Mac OS X (10.4.8)  

    Hi Gary,
    here is the output you were asking for:
    Last login: Thu Jan 25 20:03:55 on console
    Welcome to Darwin!
    DeepThought:~ dirk$ sudo /private/etc/periodic/weekly/500.weekly; echo $?
    Password:
    Sorry, try again.
    Password:
    Rebuilding locate database:
    Rebuilding whatis database:
    find: /usr/local/man: No such file or directory
    makewhatis: /usr/share/man/man1/fetchmailconf.1.gz: No such file or directory
    Rotating log files: ftp.log lpr.log mail.log netinfo.log ipfw.log ppp.log secure.log
    access_log error_log
    Running weekly.local:
    Rotating psync log files:/etc/weekly.local: line 17: syntax error near unexpected token `)'
    /etc/weekly.local: line 17: `if [ -f /var/run/syslog.pid ]; then kill -HUP 0 80 79 81 0cat /var/run/syslog.pid | head -1); fi'
    2
    DeepThought:~ dirk$ ls -loe /private/etc/periodic/weekly/500.weekly
    -r-xr-xr-x 1 root wheel - 2532 Jan 13 2006 /private/etc/periodic/weekly/500.weekly
    DeepThought:~ dirk$
    It seems, Rogers idea, PsynX respectively the deficient uninstalling by me is responsible for my problems, is correct. Should I remove the whole file weekly.local or should I only remove the content? I prefer removing the whole file, because it was created while installing PsyncX. The date of creation is the same as the date of installing the app (December 25).
    Klaus
    By the way: it seems to me, the solution of my problem is in sight. So I want to thank you all for the amazing aid I got from you!

  • Fixed lenght file and row separator

    Hi experts.
    Im using open data set and close datd set commands to create a text file in background.
    It is separated by comma.when a field is blank it just displays , , .
    I want the file to be a fixed length file. I want to see as many spaces as the length on the field if it is initial.
    Also i see a smaal box as the row separator. I want a new line separator ( ASCII char) as the row separator.
    Any suggestions ?
    Thank You
    Radhika.

    Hi,
    Instead of assigning the work area to file, use MOVE command :
    gt_file = gt_data.  " Comment this line
    Move gt_data to gt_file. " Add this line
    Use cl_abap_char_utilities=>NEWLINE for line seaparator.
    Best regards,
    Prashant

  • A DNG File Processed by an Earlier Version of ACR--How to Re-Process in ACR 8.4

    I have thousands of DNG files processed by the ACR versions that came with CS4 and CS5. I was hoping to re-process some of them with the later ACR versions that came with CS6. But when I open a previously edited DNG file in ACR 8.4, it seems to revert to the earlier version in which the file was originally edited/processed. I made a duplicate of a file and reverted it to Default--sort of like restoring its virginity--but ACR 8.4 was not fooled; it still opened the earlier version. What to do???????

    The earlier version of ACR was using a previous Process Version. 
    If you want the newer adjustment sliders, set your Process Version to 2012 on the Camera Calibration tab.

  • Gui_download issue - trailing spaces getting truncated for fixed length fil

    Hi All,
    I have a requirement where I need to download an internal table as a fixed length file.
    The code is as follows:
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    FILENAME = L_FILE
    FILETYPE = 'ASC'
    APPEND = 'X'
    WRITE_FIELD_SEPARATOR = ' '
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = ' '
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    DATA_TAB = IT_TEXT
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    Each row in the internal table IT_TEXT is 242 chars long.
    The FM is truncatinf the trailing blanks on the file. How do I get the FM to not truncate the trailing blanks in each row?
    My internal table has multiple rows and the number of rows on the table should be same as the number of rows on the downloaded file.
    I tried setting the WRITE_LF parameter to space.
    In this case, the trailing spaces are not truncated(which is as per my requirement), BUT all the rows in the internal table appear in a single line on the downloaded file instead of multiple rows.
    I also tried setting the TRUNC_TRAILING_BLANKS field to space but that does not work either. Spaces at the end of the row are still truncated.
    so the requirement is: the spaces at the end of each row should not be truncated and
    each row on the internal table should have a corresponding row on the downloaded file.
    (it is a fixed length file)
    I also tried using the following code
    class cl_abap_char_utilities definition load.
    DATA: BEGIN OF IT_TEXT OCCURS 0,
           TEXT(242) TYPE C,
           cr_lf TYPE c VALUE cl_abap_char_utilities=>cr_lf,
          END OF IT_TEXT.
    when i compile, i get the following error
    The type "CL_ABAP_CHAR_UTILITIES" is unknown.     
    Im using R/3 4.6C. Could this be a problem?     
    Please suggest a solution for this problem.
    Thanks!
    Sandeep
    Edited by: sandeep reddy on Jul 25, 2008 7:16 PM

    Hi,
    Try this..This worked..Add a dummy character at the end of the internal table...Then pass trunc_trailing_blanks   = ' '...
    PARAMETERS: p_file TYPE rlgrap-filename
                DEFAULT 'c:\test_download.txt'.
    DATA: BEGIN OF s_data,
            data TYPE char10,
            dummy,      " Added this.
          END OF s_data.
    DATA: t_data LIKE TABLE OF s_data.
    s_data-data = 'Test'.
    APPEND s_data TO t_data.
    s_data-data = 'Test2'.
    APPEND s_data TO t_data.
    s_data-data = 'Test3'.
    APPEND s_data TO t_data.
    s_data-data = 'Test4'.
    APPEND s_data TO t_data.
    * Download.
    DATA: v_file TYPE string.
    v_file = p_file.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                = v_file
        trunc_trailing_blanks   = ' '
      TABLES
        data_tab                = t_data
      EXCEPTIONS
        file_write_error        = 1
        no_batch                = 2
        gui_refuse_filetransfer = 3
        invalid_type            = 4
        no_authority            = 5
        unknown_error           = 6
        header_not_allowed      = 7
        separator_not_allowed   = 8
        filesize_not_allowed    = 9
        header_too_long         = 10
        dp_error_create         = 11
        dp_error_send           = 12
        dp_error_write          = 13
        unknown_dp_error        = 14
        access_denied           = 15
        dp_out_of_memory        = 16
        disk_full               = 17
        dp_timeout              = 18
        file_not_found          = 19
        dataprovider_exception  = 20
        control_flush_error     = 21
        OTHERS                  = 22.
    Thanks
    Naren

  • 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>

Maybe you are looking for

  • Nano bluetooth won't connect to or find devices

    Hi, I have a new ipod nano that I can't connect to anything.  When searching for BT devices it doesn't ever find anything.  I used my tablet to pair the device so I could at least see the tablet in the BT list, but I'm not able to connect to it. I al

  • Save data to multiple files

    Hi! I am trying to save measurement data to multiple files using the Write to measurement Express VI. The problem is that no matter what I do the program always save the data to one huge file, even if I configure the VI to save the data as a series o

  • Need solution for sub site when we click on the list item of a list? by using out of out of box feature in share point 2010

    Hi  all ,I have Task that When click on list item a new sit will open fo  for ex:   I created a List (test list)  and list items are Project name,Application, Start date ....,when i click on Project name a new sub site will open, Is there any out of

  • T61 8897-03U constant audio problem

    Notebook has pretty much always had this problem, system board even replaced. Ever since I got this notebook the audio has never worked right. A month after getting it Lenovo replaced the mobo for a different issue. Still with this new board my audio

  • Extremely new to the Mac.

    Hey everyone! I recently bought the Mac OS x version 10.9.5 a few weeks ago and before then I have been reading up on wether or not to get a malware protection or not. It has been mixed reviews as I have seen that some say the os X has built in malwa