Header output file

Hi all,
I've a problem.
I'm using the KM 'IKM SQL to File Append' in order to generete a file with delimited format and I need to generate the header too. In the KM there is the option GENERATE_HEADER, I set yes but it didn't work.
Can you help me?
Thanks
Giovanni Albetti

Hi G,
please check if all fields r string-type 'cause all target file columns have to be defined as 'string'.
Bye
P

Similar Messages

  • Header Name in the output file using content conversion

    Dear All,
    I want to have a text file with a header in the output. I have given the following values for content conversion:
    RecordSet structure = Record,Row
    Record.fieldSeparator='nl'
    Row.endSeparator='nl'
    Row.fieldSeparator=','
    Row.addHeaderLine=1
    but still I am not getting header in the output file. Please tell me where I am making a mistake in getting the header.
    Reg,
    NJ

    hi chirag,
    thnx for replying.
    i m getting the required output file without any error but i m not getting header. i hve added "addHeaderLine" parameter in content conversion but still i m not getting header in the output file.
    reg,
    nj

  • APD - Rename header at output file

    Hello all,
    I'm using APDs to run a query and download its results to a CSV file.
    I need to rename header texts at output CSV file.
    If you select an option (Insert header row with field names in the first row of the file) headers are generated, but generated format is by default: Field Description +++ Separator +++ Field technical name
    So, you may have something like this in corresponding output file:
    DOC_NUMBER:0DOC_NUMBER         S_ORD_ITEM:0S_ORD_ITEM         SCHED_LINE:0SCHED_LINE
    30229264     30     1
    30229264     30     2
    Desired output:
    Doc Nmbr         My Ord Item          My Sched Ln
    30129264     30     1
    30129264     30     2
    Hope you could help. Thank you in advance!
    Bernardo

    Hi Sekharp,
    No, anybody answered and I didn't researched anymore.
    Regards!

  • Can you fix your help project (via coding) after importing a topic from an output file by mistake?

    Yes - I admit it - I imported html topic files from an output folder of another RH project into the help project I am currently working on (the source files were lost and I needed to bring over a lot of legacy content in a hurry). However, I completely forget that the RH output html file contains unique Java scripting that is used to render the topic properly in a browser, but that same Java Script causes havoc when you open it up in as a source file in another RH Project. Needless to say, it has caused numerous weird things when I went to publish and view my files (but, surprisingly, you don’t really see or notice them in the RH Design WYSIWYG view or preview mode).
    The bad news is that it took about 2 weeks for me to notice the issue (the help output is viewed on a special console running Linux with a QT browser that I only view occasionally). The good news is that is that I figured out what the problem was (that took some hours) and I can restore my help project back to a time before I did the "naughty deed".
    I am now at a crossroads - do I:
    Try to re-enter all of my content from the last two weeks? (Actually, to avoid repeating the same mistake twice, I will need to re-enter the text manually and NOT cut and paste from the RH output files!)
    Or locate and find the offending HTML coding in my topic files (if that is even possible)? Has anybody documented what the RH output file JavaScript code injects into your files, and what files they affect?

    OK - here is the documentation of this weird issue (hopefully, you can read the htlm code in the screen images):
    1. In this topic, I cut and pasted some text into the table you see at the bottom of the screen. I had to reapply the “TableBody” style to this text. After doing this, I moved my cursor to the “Keyboard" text on top. Notice that it is displaying the "TABLEBODY" style, although visually, it is displaying the correct style on screen (“Heading 1”).  
    2.     In HTML view, notice the addition of the class= “TableBody”> code for this “Keyboard” text.
    3.   I then reselected Heading 1 for this “Keyboard” text.
    4.   Notice that the class= “TableBody”> code is now removed for this “Keyboard” text and has just the proper <h1> tagged assigned.

  • How to get the Output File Name as One of the Field Value From Payload

    Hi All,
    I want to get the Output file name as one of the Field value from payload.
    Example:
    Source XML
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_TEST xmlns:ns0="http://sample.com">
    - <Header>
      <NAME>Bopanna</NAME>
      </Header>
      </ns0:MT_TEST>
    I want to get the Output file name as " Bopanna.xml"
    Please suggest me on this.
    Regards
    Bopanna

    Hi,
    There are couple of links already available for this. Just for info see the below details,
    The Output file name could be used from the field value of payload. For this you need to use the UDF DynamicFile name with below code,
    //       Description: Function to create dynamic Filename
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    With this udf map it with the MessageType as
    (File Name field from Payload) > DynamicFileConfiguration>MTReceiver
    Thanks
    Swarup

  • How do I add column headings to an output file?

    Hi,
    I have an internal table that is created in my program and I send that table out as a data file attachment on an email.
    I have a request to include column heading on the data file going out. 
    Does anyone have any ideas as to how I can include a heading line as the first line of the output file?
    I'm an ABAP newbie and I don't know the best way to accomplish this?
    Thanks for your help!
    Andy

    Hi,
    While Building the attachement just add the field description refer following code
    Append header line to download data
      CONCATENATE 'Company Code'(004)
                  'State'(007)
                  'Store'(010)
                  'Tax Type'(013)
                  'Purchase'(015)
                  'Tax Rate'(017)
                  'Gross Tax Due'(021)
                  'Discount'(023)
                  'Net Tax Due'(025)
                  INTO ls_download-data
                  SEPARATED BY lc_tab.
      APPEND ls_download TO gt_download.
      CLEAR : ls_download.
    LOOP AT gt_error_log INTO ls_error_log.
        CONCATENATE ls_error_log-bukrs
                    ls_error_log-budat
                    ls_error_log-monat
                    ls_error_log-gjahr
                    ls_error_log-xblnr
                    ls_error_log-bschl
                    ls_error_log-waers
                    ls_error_log-hkont
                    ls_error_log-wrbtr
                    ls_error_log-prctr
                    ls_error_log-kostl
                    ls_error_log-message
                    INTO ls_attach-line SEPARATED BY lc_tab.
        CONCATENATE lc_cret ls_attach-line  INTO ls_attach-line.
      Append Error log data to attachment Table
        APPEND ls_attach TO lt_objbin.
      ENDLOOP.
    Call the function module to convert the data into Hex
      CALL FUNCTION 'SO_RAW_TO_RTF'
        TABLES
          objcont_old = lt_objbin
          objcont_new = lt_objbin.
    Append converted hex data to attachment table
      LOOP AT lt_objbin INTO lv_line.
        ls_conv = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' endian = 'B').
      Call lmethod to add the data to the output buffer sequentially.
        CALL METHOD ls_conv->write( data = lv_line ).
        lv_buffer = ls_conv->get_buffer( ).
        MOVE lv_buffer TO lv_hexa.
        MOVE lv_hexa TO ls_hex-line.
      Append converted hex data to attachment table
        APPEND ls_hex TO gt_attach.
      ENDLOOP.
    Regards,
    Prashant

  • Get MUTLIPLE output files for SINGLE input file with multiple records

    Hi ,
    I have source xml file  which has multiple records in it and  I want to get multiple seperate  flat files for it.
    this is my source structure
    <root>
    <Header1 fld1=1234 fld2="name1" fld3='SAP1"
    fld4='000" fld5=0 fld6="sdn1"></header>...............no line items here
    <Header2 fld1=123 fld2="name" fld3='SAP"
    fld4='00" fld5=0 fld6="sdn" ><line fld7=value1 fld8=value2 fld9=value3 /line><line fld7=value4 fld8=value5 fld9=value6 /line></header>.....two line items here
    <Header3 fld1=123 fld2="name" fld3='SAP"
    fld4='00" fld5=0 fld6="sdn" ><line fld7=value7 fld8=value8 fld9=value9 /line></header>......one line item here
    Header4 fld1=12345 fld2="name2" fld3='SAP2"
    fld4='0006" fld5=01 fld6="sdn2"</header>.......no line items here
    </root>
    I am trying to get flat files as many time the <b>header</b> values occur that many target files should appear in the target.
    like
    file1:
    1234name1SAP10000~sdn1
    file2:
    123nameSAp000~sdn
    value1value2valu3
    valu4value5value6
    file3:
    123namesap000~sdn
    value7valu8value9
    file4:
    12345name2SAP2000601~SDN2
    here I have 4 headers so i need to get 4 output files ,similarly for 'n' headers I need to get 'n'  output flat files. the above mentioned source xml file is just one file,like that I might get somany sourc xml files which has similar structure in it.
    and also it is important to get the line items,if exists to the header, for the corresponding headers.
    how can I achieve this?do I need to use BPM or any mappings other than Graphical? 
    please suggest me.
    thank you.
    Babu
    sorry,output file structure changed
            Babu

    Babu,
    See the Mapping and the logic.
    Make sure your target message occurrence:http://www.flickr.com/photo_zoom.gne?id=1412748793&size=o
    Check out for source and target structure
    http://www.flickr.com/photo_zoom.gne?id=1412748803&size=o
    http://www.flickr.com/photo_zoom.gne?id=1412748809&size=o
    http://www.flickr.com/photo_zoom.gne?id=1412748815&size=o
    http://www.flickr.com/photo_zoom.gne?id=1412748825&size=o
    Results:http://www.flickr.com/photo_zoom.gne?id=1412748799&size=o
    Note:
    While creating Interface determination choose it as Enhanced/Extended
    The Receiver Content conversion - For field separator and line separator give 'nl' , coz we concatenated all of them using ~ in mapping.
    If you find any discrepancy in the above logic , please let me know.
    raj.

  • Creating .RTF output files - PI7.0  Receiver file adapter

    Hi Experts,
    I am currently facing an issue with the Receiver File adapter where in the output files are required to be of the format of .RTF (Rich Text Format).
    The scenarios is an outbound proxy from SAP ABAP  - >  PI 7.0 ->  .RTF File
    All the data required to be present in the file will be coming in the source structure
    Can the File Receiver Adapter handle this ?
    Is there a way to generate Files with extension .rtf ??
    It is a requriement since the output files will be used as Reports , and so the desired format.
    I am unsure if I will have to use XSLT mapping , in this because i am new to that , Kindly let me know how to go about it ,. any links or pointers on how to achieve the same will be welcome.
    thanks
    Dev
    Edited by: sd on Feb 17, 2010 8:23 AM

    Thanks for your reponse Praveen
    Can you please let me know how can i put the extension as .rtf for the output files i am generating ??
    as far as the formatting is concerned ... it is like ... the header needs to be  of a particular Font , a particular font size , bold etc and  so is the case for line items
    I am unsure if it is possible using an Adapter module  as well
    thanks
    Dev

  • How to fix the length of the output file

    hi,
    I have 1000 records in my source table which need to be inserted into file. But the length of the rows in my file should be only 500 i.e there should be two files getting created for this 1000 records i.e my each output file should contain only 500 rows not more than that.
    Depending on the number of records present in the source, the file getting created will be varying as my file should contain only 500 rows each. for ex: if 5000 rows are present then 10 files need to be created.
    How this can be achieved in ODI.
    Thanks in advance

    I believe this can achieved using jython easily .
    Here is a sample output code
    Command on Source - Select database Technology and required logical schema
    Command on Target - Jython
    import java.sql as sql
    import java.io as io
    import string,re
    import java.lang as lang
    import java.text as text
    myCon = odiRef.getJDBCConnection("SRC")
    myStmt = myCon.createStatement()
    my_query="SELECT * FROM  SCHEMA.TABLE_NAME "
    file_count=1
    i=1
    myRs = myStmt.executeQuery(my_query)
    writer=io.BufferedWriter(io.OutputStreamWriter(io.FileOutputStream('c:\\FILE_'+str(file_count)+'.csv')))
    md=myRs.getMetaData()
    collect=[]
    while (i<= md.getColumnCount()):
        collect.append(md.getColumnName(i))
        i+=1
    header=','.join(map(string.strip,collect))
    #writer.write(header+'\n')
    myRs = myStmt.executeQuery(my_query)
    md=myRs.getMetaData()
    myRs.setFetchSize(5000)
    i=0
    while (myRs.next()):
        j=1
        col=[]
        while (j<= md.getColumnCount()):
            col_type=md.getColumnTypeName(j)
            col_name = myRs.getString(md.getColumnName(j))
            if col_name is None:
                col_name= ''
            col.append(col_name)
            j+= 1
        data=','.join(map(string.strip,col))
        writer.write(data+'\n')
        #print data+ '\n'
        i +=1
        if (i == 500):
            writer.flush()
            writer.close()
            file_count +=1
            writer=io.BufferedWriter(io.OutputStreamWriter(io.FileOutputStream('c:\\FILE_'+str(file_count)+'.csv')))
            i=0
    writer.flush()
    writer.close()
    myCon.close()Please run this code and let me know if you need any other help or modification to get your desired results.

  • How Can I get Concurrent program parameters in the bursting output file????

    I have rtf template. I am passing parameter PC_REPORT_TYPE,pd_week_ending_date in my concurrent program. In rtf header I am passing this parameters as <?PC_REPORT_TYPE?> and <?param@begin:pd_week_ending_date?><?xdofx:to_char(to_date(replace(substr($pd_week_ending_date,1,10),’/’,’-‘),’YYYY-MM-DD’),’MM/DD/YY’)?> .
    I am getting the values in my report which is generated from this concurrent program. But I am not getting these values in my bursting output file which is generated from that previous concurrent program.
    Thanks in advance....

    The same exact video played back perfecly fine 2 weeks ago.  The same project too, with no changes at all.  I have a Nvida card too and have made no changes to that either.  Not sure everything worked a couple weeks ago.  Then every once in a while I started having issues, but I could just close and reopen the project and it would be OK.  Now, I can't get any vieo at all.  If I double click in the monitor box the frame I am on pops up but nothing plays, I just get one frame while audio plays with no issue.

  • XML data in output file

    Hi,
    I am creating a RFC - File scenario and i want the output file in XML format. So I m using "File" in the message protocol of the receiver file.
    My  output file structure format is as below:
    <?xml version="1.0" encoding="UTF-8"?>
    *<ns1:MT_LEBIZ xmlns:ns1="http://lebiz">*
    <HEADER>
    <CODE>TOT</CODE>
    </HEADER>
    <DETAILS>
    <SEGMENT>
    <NUMBER>01</NUMBER>
    <LABEL>Account Assignment Cat</LABEL>
    </SEGMENT>
    <SEGMENT>
    <NUMBER>02</NUMBER>
    <LABEL>GL Account</LABEL>
    </SEGMENT
    </DETAILS>
    </ns1:MT_LEBIZ>
    but i wanted to display www3.org in the namespace in the following line which is marked in bold.
    <ns1:MT_LEBIZ xmlns:ns1="http://lebiz">
    how can i achieve that?

    Hi,
    By using the below code received from Peter, we are were able to remove the prefix, encoding and change the END_DATE format.
    Please find the code below:
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.io.Reader;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class DeletePrefixesEnddateAndEncoding extends AbstractTransformation {
         public void execute(InputStream in, OutputStream out)
                   throws StreamTransformationException {
              // Add your code here
              String inData = convertStreamToString(in);
              String outdata = inData.replaceAll("ns1:", "");
              String outdata2 = outdata.replaceAll("xmlns:ns1=\"http://www.w3.org/2001/XMLSchema-instance\"", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"");
              String outdata3 = outdata2.replaceAll(" encoding=\"UTF-8\"?", "");
              String outdata4 = outdata3.replaceAll(" encoding=\"utf-8\"?", "");
              String outdata5 = outdata4.replaceAll("<END_DATE>0000-00-00</END_DATE>", "<END_DATE xsi:nil=\"true\" />");
              try {
                   // The JAVA mapping output payload is returned using the
                   // TransformationOutput class
                   // arg1.getOutputPayload().getOutputStream()
                   out.write(outdata5.getBytes("ISO-8859-1"));
              } catch (Exception exception1) {
         // Un comment to test the mapping as a standalone code
         /* public static void main(String[] args) {
         *      try {
         *          InputStream in = new FileInputStream(new File("D:/PETER/in.xml"));
         *          OutputStream out = new FileOutputStream(new File("D:/PETER/out.xml"));
         *          DeletePrefixesEnddateAndEncoding myMapping = new DeletePrefixesEnddateAndEncoding(); myMapping.execute(in, out); }
         *      catch (Exception e) { e.printStackTrace();
                                       public void transform(TransformationInput arg0, TransformationOutput arg1)
                   throws StreamTransformationException {
              getTrace().addInfo("JAVA Mapping Called");
              this.execute(arg0.getInputPayload().getInputStream(), arg1
                        .getOutputPayload().getOutputStream());
         public String convertStreamToString(InputStream in) {
              StringBuffer sb = new StringBuffer();
              try {
                   InputStreamReader isr = new InputStreamReader(in);
                   Reader reader = new BufferedReader(isr);
                   int ch;
                   while ((ch = in.read()) > -1) {
                        sb.append((char) ch);
                   reader.close();
              } catch (Exception exception) {
              return sb.toString();

  • Can Flex make a Design Tool with a quality output file?

    Hi there,
    I have a team of developers working on a web-based design tool for a large-format print shop. They built the prototype on a Flex platform and used ImageMagick to handle text and image effects.
    Unfortunately, ImageMagick cannot produce the quality of output file we need for our products (prints up to 3 ft by 6 ft / 1m x 2m). It rasterizes all of the design objects, including text and vector clipart.
    Is it possible for Flex to handle all of these elements (object rotation, scale changes, etc.) and output a final design to high quality PDF or AI files without ImageMagick?
    I'm just not sure if my developers are missing something or if they're just not communicating the technical challenges involved in creating such large, high quality output files for a custom, web-based application.
    Many thanks in advance for any insight!

    I'm still not sure I understand what you need.  Sounds like the image map is the same for all the pages, but the image itself is different, although the images are the same size on each page.  Is that it?
    In that case, you could do this in a number of ways, but the best might be -
    Make the page have a transparent PNG/GIF image the same size as the map that has the 5 mapped areas defined on it.  Make the container for that image have a CSS BACKGROUND image that is the actual map.  Specify this CSS background image's path in an embedded stylesheet in the editable region of the head of the page.
    With this as the template, all you need to do on each page is to respecify the background image - since the embedded stylesheet is in an editable region that's do-able.  In other words the TEMPLATE would be -
    <html>
    <head>
    <!-- TemplateBeginEditable name="head">
    <style type="text/css">
    #foo {
         background-image:url(path_to_map.jpg);
         background-repeat:no-repeat;
    </style>
    <!-- TemplateEndEditable -->
    </head>
    <body>
    <div id="foo">
         <img width="map_width" height="map_height" src="transparent.png" usemap="#foomap">
    <map name="foomap">
    </map>
    </body>
    </html>
    The map image can, itself, be in an uneditable region of the page....

  • How to change XML Header in  file

    Hi,
    How to have the following XML output header XML with simple transformation:
    <?xml version="1.0"> encording="ISO-8859-1"?>
    When I used the following transformation template:
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
    I get the following output header and file is not readable.
    <?xml version="1.0" encoding="utf-16" ?>
    If i call tranformation without encoding option file is creted and readable. Does there is any impact on functionality if file is without header.
    Thanks
    anya

    Hi,
    you could use the below alternative solution also as some Web services do not accept the message , if Content type is application/XML in the HTTP Header, it will accept only Text/XML. So While calling the Web service, the content has to be changed, This is possible using Module of the adapter as shown in the screen shot.
    HTTP Header field values before using the module
    User-Agent: SAP-Messaging-com.sap.aii.messaging/1.0505
    content-id: [email protected]
    content-type: application/xml
    Content-Length: 1280
    Module name - localejbs/AF_Modules/MessageTranspormationBean
    Type - Local Enterprise Bean Module - This is defined by the user, but the same name should be given in the module configuration for passing the parameters. In this case “transform” In the module configuration ,
    Module key - In this case “transform”
    Parameter name - Transform.ContenType
    Parameter Value - text/xml;charset=utf-8
    Here you could use the required parameters and pass the values....:-))
    Thanks
    Swarup

  • Characters missing in output file?

    Hi all,
    In the below code I am not able to see the characters from 500 onwards in output file. What might be the reaon?
    PARAMETERS:P_OUTPUT  type rsfillst-dirname
               DEFAULT TEXT-001 lower case.
    data:vtext(900) type c.
    start-of-selection.
    vtext+0(5) = 'abcde'.
    vtext+100(5) = '1bcde'.
    vtext+200(5) = '2bcde'.
    vtext+300(5) = '3bcde'.
    vtext+400(5) = '4bcde'.
    vtext+700(5) = '7bcde'.
    vtext+895(5) = '9bcde'.
    OPEN DATASET P_OUTPUT FOR OUTPUT in text mode encoding default.
    TRANSFER vtext TO P_OUTPUT.
    CLOSE DATASET P_OUTPUT.
    IF SY-SUBRC = 0.
       WRITE:/ 'ok'.
    ELSE.
    WRITE:/ 'FAIL'.
    ENDIF.
    I can see only characters till '4bcde' in output file.
    Please help.
    Thanks,
    Subba

    Hi,
    You can view upto 512 character in the output.
    Check out the PROGRAM statement of Program PROGRAM rswatch0 (Transaction AL11). 
    PROGRAM rswatch0 MESSAGE-ID s1 NO STANDARD PAGE HEADING LINE-SIZE 512.
    Thats the reason why u can see more that 512 characters.
    You can download the data to ur internal table and check that data is still there.
    Reward points if helpful.

  • Report output file name

    Hi,
    i have created report in reports builder saved it as rdf file and running it from browser using desformat=spreadsheet&destype=cash
    everything works fine - dialog box pop up - open or save - when you click open - the ouput opens in MS Excel
    I need to change default name of output file "rwservlet.xls" to something else (of course not manually after each report run but set it somewhere in some parameters) - any idea how to do it?
    thanx in advance for any help
    Petr

    Hello,
    You can use a Servlet Filter to add the HTTP header "Content-Disposition"
    More details and examples in the note available on Metalink :
    Note.418366.1 How To Change The File Name In The "File Download" Dialog Box For Web Reports?:
    Regards

Maybe you are looking for

  • PSE 7 confusion about folder location, help needed

    Here's some background: I'm using PhotoShop Elements 7 on Win XP.  I have an external firewire hard drive I use for overflow/backups.  Originally, this showed up as a K: drive on my system. I added a RAID controller and two more drives to stripe as a

  • My music is no longer "found" after home sharing

    I recently got a Macbook Pro 15" Retina display computer. I previously had a Dell Inspiron. When I went to transfer my iTunes (which was a pain in the first place) I ultimately used home sharing to transfer all of my music. It's been fine for about a

  • Create VI Reference from VI Reference

    Given a VI reference that is valid, is there an easier way to create a new VI reference, other than by using a property node, pulling the VI name, and using Open VI reference? I've never needed to do this before but I assumed there would be some invo

  • Data structure and out of memory error

    I have a program need to load data files and store the float data values in 3 two dimentional array. These data files are generated from biological experiments and are quite large. For e.g., when I tried to load 59 files, each file has 409,600 rows a

  • Small help in Oracle

    Hai I am using oracle 10g and I am creating several tables and deleting them through servlets The problem is the deleted tables though they r deleted whenever I use the command "select * from tab" I am getting all the deleted tables also with some na