Add header line to the text file in receiver file adapter

Hello Experts,
I have to add a new line to the text file generated at the receiver end.
My structure is
Record
   Item......0-unbounded
         field1
         field2
         field3
I have defined below parameters in receiver FCC.
RecordSet Structure : Record,Item
Item.fieldSeparator : ;
Record.fieldSeparator : nl
Record.endSeparator : '0x0D''0x0A' ( this is to get a carriage return at the end of the file)
Item.addHeaderLine : 1
With the above configuration, i am getting the desired output with NO header line.
Please help.
Thanks,
Swetha.

Hi, it looks like that the headerline "specification is only permitted if exactly one structure is defined." Please check [SAP help under Define Parameters for Recordset Structures|http://help.sap.com/saphelp_nw73/helpdata/en/44/686e687f2a6d12e10000000a1553f6/frameset.htm].
One solution would be to generate the header fields in the message payload. Generate an additional first line containing the header names, e.g.
<Item>
<field1>Header1
<field2>Header2
<field3>Header3

Similar Messages

  • How to add many lines in the Text View in Web Dynpro

    Hi friends,
    I have one Text Edit in Web Dynpro. I need to show the result of FM READ_TEXT in Text Edit View element, without lose the text format.
    Cardinality of my node is 0:n and attribute datatype is string_table. after assigning the values using bind_table method, I am getting only the first row of the read_text returns...
    By
    deva

    Hi Deva,
    Text View is not meant to be bound to string_table. Create a string instead and convert that string table into that string with
    <br>
    between each row of string table. TextView component will make <br> into new lines. Code will be similar to following.
    DATA: ROWS TYPE string_table,
          top type string,
          result type string.
          loop at rows into top.
            concatenate result top into result separated by '<br>'.
          endloop.
    Now bind this result string to the text view component. It ll work. Hope it will be helpful for you.
    Regards,
    Fareez

  • How to add header and fooder in text file

    Hi,
    i have created simple application for generate report from database into text file.
    But i need to add header and fooder in text file. I dont know is there any API for adding these.
    Can anyone help me to create header and fooder in text file.
    the below text are needs to be print in the header
    name of the table :
    Recorder type :
    file creation time:
    the below text are needs to be print in the footer
    Recorder Number:
    Record Type;
    the actual code is
                           pst = con.prepareStatement("select REQUEST, DOMAIN_NAME, TRUNC(DATE_OF_CONFIGURATION) AS dateofConfig  FROM employee where id=300");
                               rs = pst.executeQuery();
                            while (rs.next()) {
                                 request = rs.getString("REQUEST");
                                    domain_name = rs.getString("DOMAIN_NAME");
                                    dateofconfig = rs.getString("dateofConfig");
                                    System.out.println(request + " " + domain_name + " " + dateofconfig);
                                   data.add(request + " " + domain_name + " " + dateofconfig);
                            System.out.println("before calling method");
                            writeToFile(data, "c:/Employee.txt");
                            System.out.println("file created successfull");
                            rs.close();
                            pst.close();
           private static void writeToFile(List list, String path) {
                    BufferedWriter out = null;
                    try {
                            File file = new File(path);
                            out = new BufferedWriter(new FileWriter(file, true));
                            for (Object obj : list) {
                                String s=  obj.toString(); 
                                 out.write(s);
                                    out.newLine();
                            out.close();
                    } catch (IOException e) {
    }Thanks
    Jasmin
    Edited by: user13836688 on Mar 21, 2011 4:06 AM
    Edited by: user13836688 on Mar 21, 2011 4:07 AM
    Edited by: user13836688 on Mar 21, 2011 4:08 AM

    user13836688 wrote:
    i have created simple application for generate report from database into text file.First off, when posting code, use &#91;code]...&#91;/code]. or '' tags, not '<code>'.
    But i need to add header and fooder in text file. I dont know is there any API for adding these.
    Can anyone help me to create header and fooder in text file.Well you plainly have the code to write the file contents; and furthermore your report seems to be contained in a List called 'data'. Why not just add the header and footer lines to it? I'd also suggest making 'data' a LinkedList. That way you can add the header afterwards with no performance hit, just in case the information it contains isn't available at the start of your report loop.
    Winston                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to add header line in a file from XI system using file adapters

    Hi All,
    I need to add header line (Column names) in a file coming from XI system.
    I am using file adapters.
    Thanks & Regards,
    Gaurav Mittal

    The Receiver File Adapter is configured, using the following settings:
    1) Choose File Content Conversion as the Message Protocol.
    2) You give the ‘addHeaderLine’ parameter as 1
    3) For the ‘fieldSeparator’ parameter you need to give field separator for both list and substructure (referring to the data type above). For eg: it may be a ‘,’ (comma) for substructure in a comma separated file.
    4) The ‘endSeparator’ parameter needs to given for substructure only. For eg: it may be a ‘nl’ (new line)
    5) Give the file name, the directory and the Construction mode. Activate all the settings. Receiver File Adapter with F.C.C. is configured.
    please visit the blog.
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /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

  • Add new line in the Flat file based on the field value

    Hi,
    Following is my Flat File -
    Customer   X      Y
    1001          1       2
    1002          0       1
    Based on the X and Y value I need to add new lines in the Flat file. If X>0 then add a new line with repeating row and Y>0 add again a new line with repeating row. If X or Y=0 then no need to add any repeating new line. 
    So, here for the above example I need output as-
    Customer    X    Y
    1001          1      2
    1001         1       2
    1001         1       2
    1002          0       1
    1002          0        1
    Suggest how we can achieve this?
    Regards,
    Tridib Konwar 

    Hi Tridib,
        I tried your scenario and You will have to use the custom xslt to get the expected result.
        Please find bellow the xslt code which you can use in your map.
    <?xml version="1.0" encoding="utf-16" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var" version="1.0" xmlns:ns0="http://PracticeAtul.XYFlatFileSchema">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="/">
    <xsl:apply-templates select="/ns0:XYComp" />
    </xsl:template>
    <xsl:template match="/ns0:XYComp">
    <ns0:XYComp>
    <XYComp_Child1>
    <XYComp_Child1_Child1>
    <xsl:value-of select="XYComp_Child1/XYComp_Child1_Child1/text()" />
    </XYComp_Child1_Child1>
    <XYComp_Child1_Child2>
    <xsl:value-of select="XYComp_Child1/XYComp_Child1_Child2/text()" />
    </XYComp_Child1_Child2>
    <XYComp_Child1_Child3>
    <xsl:value-of select="XYComp_Child1/XYComp_Child1_Child3/text()" />
    </XYComp_Child1_Child3>
    <xsl:value-of select="XYComp_Child1/text()" />
    </XYComp_Child1>
    <xsl:for-each select="XYComp_Child2">
    <XYComp_Child2>
    <XYComp_Child2_Child1>
    <xsl:value-of select="XYComp_Child2_Child1/text()" />
    </XYComp_Child2_Child1>
    <XYComp_Child2_Child2>
    <xsl:value-of select="XYComp_Child2_Child2/text()" />
    </XYComp_Child2_Child2>
    <XYComp_Child2_Child3>
    <xsl:value-of select="XYComp_Child2_Child3/text()" />
    </XYComp_Child2_Child3>
    </XYComp_Child2>
    <xsl:if test="XYComp_Child2_Child2/text()!=0">
    <XYComp_Child2>
    <XYComp_Child2_Child1>
    <xsl:value-of select="XYComp_Child2_Child1/text()" />
    </XYComp_Child2_Child1>
    <XYComp_Child2_Child2>
    <xsl:value-of select="XYComp_Child2_Child2/text()" />
    </XYComp_Child2_Child2>
    <XYComp_Child2_Child3>
    <xsl:value-of select="XYComp_Child2_Child3/text()" />
    </XYComp_Child2_Child3>
    </XYComp_Child2>
    </xsl:if>
    <xsl:if test="XYComp_Child2_Child3/text()!=0">
    <XYComp_Child2>
    <XYComp_Child2_Child1>
    <xsl:value-of select="XYComp_Child2_Child1/text()" />
    </XYComp_Child2_Child1>
    <XYComp_Child2_Child2>
    <xsl:value-of select="XYComp_Child2_Child2/text()" />
    </XYComp_Child2_Child2>
    <XYComp_Child2_Child3>
    <xsl:value-of select="XYComp_Child2_Child3/text()" />
    </XYComp_Child2_Child3>
    </XYComp_Child2>
    </xsl:if>
    </xsl:for-each>
    </ns0:XYComp>
    </xsl:template>
    </xsl:stylesheet>
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.
    Atul Toke

  • Open Hub  - Add header line to file on server.

    Hi All,
    How can I add header description to the file being generated in the server from the Open Hub. The open hub generates a fiule with data fields only, however i want a header line.
    Example
    IF my data fields are displayed as below,
    John M 12 2344
    Thomas M 17 8960
    Lin F 10 8467
    Jan M 12 4323
    I need to add, description as NAME above John, Thomas, Lin etc.
    as GENDER above M,M,F etc.
    as CODE above 12, 17,10 etc. and
    as EXTENTION above 2344, 8960,8467 etc
    Can anyone help.
    Points will be assigned

    Hi,
    i don't think this can be done even in BADI.
    what you can do is once the Infospoke run is complete and the file generated , run a custom report for this.
    in the custom report open a file dataset , write header and then close the file dataset.
    then again open the file dataset in append mode , writhe the file that the infospoke generated and close the file dataset.
    include this custom program after you infospoke run in the process chain.
    Regards,
    Neeraj.

  • Add Header Line tot he output File

    Hi,
    Proxy to File Senario.
    Details records are coming through proxy.
    I need to add a static header line in the file that is created..
    The Header line is something Like this :- "SSN";"UPI";"EFF_DATE";"STATUS";"STATUS_ACTION_CD";"PAY_CONTINUATION";"LASTNAME";"FIRSTNAME";"MI";"NAME_SFX";"LOC_CODE";"EMP_CAT";"
    The configuration that i did in Content Conversion:-
    Recordset :- HEADER,ROOT
    HEADER.addHeaderline : 1
    HEADER.headerline : "SSN";"UPI";"EFF_DATE";"STATUS";"STATUS_ACTION_CD";"PAY_CONTINUATION";"LASTNAME";"FIRSTNAME";"MI";"NAME_SFX";"LOC_CODE";"EMP_CAT";"
    ignoreRecordsetName : true
    ROOT.fieldSeparator : ;
    ROOT.endSeparator : 'nl'
    <b>But the error in Communication channel monitoring is : -</b>
    Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'HEADER.fieldFixedLengths' or 'HEADER.fieldSeparator' is missing....
    So Plz help me out in this.....
    Thanks
    Harpreet

    Hi Harpreet,
    You can pass the static header content in your message mapping ....to the target header field..
    and then use a normal FCC to print out the structure...
    Regards,
    Sushil H.

  • How to only read the last line in the text file by using BufferedReader ?

    Dear all,
    Hello, I am new to Java. Do anybody know how to read the last line (this is the last record) in the text file.The method I am now using is reading from the first line until I reach the last line in the text file. Thank you!!
    BufferedReader br = new BufferedReader(new FileReader("c:\\sdk1.4.1\\bin\\dbExport.txt"));
    DataInputStream in = new DataInputStream(new FileInputStream("c:\\sdk1.4.1\\bin\\dbExport.txt"));
    String input;
    String firstinput;
    String secondinput;
    int count=90;
    int year=1955;
    while ((input = br.readLine()) != null) {
    firstinput = input.substring(0, 10);
    secondinput = input.substring(10);
    String insertStore1 = ("INSERT INTO AUTHORS " +
    "VALUES ('" + count + "', '" + firstinput + "', '" + secondinput + "', 1955)");
    System.out.println(insertStore1);
    int result = stmt.executeUpdate(insertStore1);

    I suppose you could use a java.io.RandomAccessFile.

  • Could not parse the file contents as a data set. There were too many variable names in the first line of the text file.

    Could not parse the file contents as a data set. There were too many variable names in the first line of the text file.

    What are the Variables settings, what is the text file’s content, …?

  • How to add a line between the two text fields  in JTabbed Pane

    Hi Friends,
    I would like to add a Line between some text fields to seperate them.. I added those text Fields to a tabbed Pane.. Please help me to create a line between the TextFields......

    http://java.sun.com/docs/books/tutorial/uiswing/components/separator.html

  • How to provide space and new line to the text in AI Script

    how to provide space and new line to the text in AI Script

    ?? can you explain better, can you at least add another sentence?
    space
    var mySpace = " ";
    new line
    var newLine = "\n";

  • The white line over the text in a title

    how can I enlarge the white line over the text in a title to not have the text out of the frame when I want to add another line?

    If you are speaking of the white bar upon which you are entering text in say a 'gradient edge' title, click title in the inspector window having the title selected. There you can change the width of the horizontal bar:
    In the screenshot above I have used gradient edge title. The bar is of black color and you can change the color to white or any other color by tinkering with the controls in the inspector window [red oval]; you can also increase or decrease with the bar's width by changing its parameters within the 'yellow rectangle'; and, if you so need, you can push up or push down the bar by manipulating the bar vertical position tool located below the yellow rectangle.
    Hope this helps. If the white line you have mentioned above is something other than the bar I have referred to, then let me know. Cheers. Have a great day.

  • When we create a Purchase order that has PIR in line item, the text is stored in EINA or EINE?

    Hi Friends,
    I have a requirement that, whenever we created the PO that has PIR in line item, the text is getting stored in EINA or EINE table.
    so here the businees need to move the text which storing in EINA /  EINE to ekpo text id up on saving.
    please suggest how i need to proceed with this issue.
    Thanks in Advance,
    kasi.

    Hi Madan,
    Thank you for your reply.
    As per your suggestions I found  BADI  ME_PROCESS_PO_CUST.
    Could you please help me how to read the "Info record PO text" for each line item in the purchase order and i want to save the readed text into EKPO-txz01.
    Thanks in Advance,
    kasi.

  • How do I edit the text in a pdf file that has been converted to a Word doc

    How do I edit the text in a pdf file that has been converted to a Word doc?

    Hi BridgetteJean,
    Please go through this video this explains how to edit text in a pdf document.
    http://tv.adobe.com/watch/acrobat-tips-and-tricks/editing-text-with-the-typewriter-tool/

  • Help Please - having difficulties creating af link from the text to an attached file i acrobat

    I have been reading the help, but it just wonn't work when I try.
    I have tried as followed (I am working with a danish version, and hope to matched the same word as in the english version of Acrobat Xpro):
    1. From the toolbox i choose content and then 'hyperlink'
    2. I mark the text from which i wish to make a link
    3. Acrobat respond with an popup picture 'create a link'
    4. From the popup I mark 'Open a side' and push 'next'
    5. Acrobat respond with a new popup picture 'create / go to a side'
    6. I go to the navigator and open the list with attached file's that I have embedded in my acrobat file.
    7. I mark the to which i wish to make a link to
    8. In the popup 'create / go to a side' that stilll is open, i push 'Mark hyperlink'
    Then I hoped that I have created a link from the acrobat text to the attached file. In stead Acrobat has made a link to the same sidenumber that respond to the text from which i wish to make a link . F.ex. the linktext is on side 10 - then the link goes to side 10.
    How do i do it right?
    Please help.

    Hello Bernd
    Thanks for a quick respond.
    This corresponds to the text I have tried myself, but apparently I do something wrong
    1.      Open a PDF that contains a PDF file attachment – done
    2.      Go to where you want to create a link. If that location is in the file attachment, click the Attachments button in the navigation pane, select the file attachment, and click open.
    Here I go to side number 10 from which I wish to make a link from (I am not open the attachment file at this moment, as the location not is inside the file attachment).
    (I earlier also tried to  mark the attachment file and click open, and It result that the attached file just opened normally without creating a link to the file).
    3.      Choose Tools > Content > link, and select the area for the link
    Here  I mark the text on side 10 from which I wish to make a link to a attached file
    4.      In the Create Link dialog box, set the link appearance, select Go To A Page View, and then click Next
    Here I have selected ‘Go to a page view’ as told and I click Next
    5.      Set the page number and view magnification you want, either in the parent PDF document or in the file attachment, and then click set link.
    Here I go to the navigation pane and mark the attached file from the file list (the files in the list hasn’t any side number in the list) and then I click Set Link.
    Then I hoped that I have created a link from the acrobat text to the attached file. In stead Acrobat has made a link to the same sidenumber that respond to the text from which i wish to make a link . F.ex. the linktext is on side 10 - then the link goes to side 10.
    What do I do wrong.?
    Med venlig hilsen
    Mogens Pedersen
    Specialkonsulent
    T 33 63 13 07
    F 33 63 10 11
    [email protected]<mailto:[email protected]>
    Fra: Bernd Alheit [email protected]
    Sendt: 2. marts 2012 13:11
    Til: Mogens Pedersen
    Emne: Help Please - having difficulties creating af link from the text to an attached file i acrobat
    Re: Help Please - having difficulties creating af link from the text to an attached file i acrobat
    created by Bernd Alheit<http://forums.adobe.com/people/Bernd+Alheit> in Creating, Editing & Exporting PDFs - View the full discussion<http://forums.adobe.com/message/4241290#4241290

Maybe you are looking for

  • Remote for MacBook Air

    What is the best remote (bluetooth or USB) for the MacBook Air?

  • 5800xm no longer sees my 16gb sandisk micro sdhc c...

    Hi Booted my phone this morning & it didn't see the memory card ! Several reboots & card contact cleans - still no joy. I should have anticipated this a few weeks back, as access to card was playing up occasionally (long boot times, freezing when ope

  • Reload OS with no Disk or TD data

    I wanted to wipe my entire PC and Reload OS. How can I do this if I have no disk or thumb drive OS info? Is there a way to verify I payed already and can make my PC day 1 fresh again?

  • In the develop module, sliders jump about when clicked

    In the develop module, sliders jump about when I try to click on them. This happens after I re-size the window by dragging to the left in order to make the sliders longer. Any ideas on How to stop the sliders from misbehaving?

  • Transport Directory and queue are out of sync after the restore

    Hi all I got a DEV server. Running ECC6 on MAXDB over linux. One user deleted some tables and we restored the database. No file system is restored. Now we are having issues with the transports as the tranport directory is the latest and database is h