SQL to FILE interface with column headers

Hi All,
I have designed an interface to extract the data from Oracle to flat file (.txt file ) .
1) I am getting the column headers in the output file(. txt file) but I don't want to see any column headers
2) While creating the data source in data Model If I give any column type as date I am getting null value in the output file, but If I give column type as string for date filed I am able to see the data in output file.
Thanks ,
Patel.

Hi Patel
1) I am getting the column headers in the output file(. txt file) but I don't want to see any column headers
You can to the flow properties and set GENERATE_HEADER = flase.
-- step by step approach on how to load data from an oracle table to flat file
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/odi/odi_11g/odi_project_table-to-flatfile/odi_project_table-to-flatfile.htm
http://odiexperts.com/oracle-to-flat-file/
2) While creating the data source in data Model If I give any column type as date I am getting null value in the output file, but If I give column type as string for date filed I am able to see the data in output file.
I do not think you can use a Date Datatype while loading into flat file. You can go with string or number/integer (if date does not have any special characters. You can use a conversion function here to convert existing Date datatype as per your requirements , but make sure you select " on source or on staging")
Regards
kk

Similar Messages

  • How to export data with column headers in sql server 2008 with bcp command?

    Hi all,
    I want know "how to export data with column headers in sql server 2008 with bcp command", I know how to import data with import and export wizard. when i
    am trying to import data with bcp command data has been copied but column names are not came.
    I am using the below query:-
    EXEC master..xp_cmdshell
    'BCP "SELECT  * FROM   [tempdb].[dbo].[VBAS_ErrorLog] " QUERYOUT "D:\Temp\SQLServer.log" -c -t , -T -S SERVER-A'
    Thanks,
    SAAD.

    Hi All,
    I have done as per your suggestion but here i have face the below problem, in print statment it give correct query, in EXEC ( EXEC master..xp_cmdshell @BCPCMD) it was displayed error message like below
    DECLARE @BCPCMD
    nvarchar(4000)
    DECLARE @BCPCMD1
    nvarchar(4000)
    DECLARE @BCPCMD2
    nvarchar(4000)
    DECLARE @SQLEXPRESS
    varchar(50)
    DECLARE @filepath
    nvarchar(150),@SQLServer
    varchar(50)
    SET @filepath
    = N'"D:\Temp\LDH_SQLErrorlog_'+CAST(YEAR(GETDATE())
    as varchar(4))
    +RIGHT('00'+CAST(MONTH(GETDATE())
    as varchar(2)),2)
    +RIGHT('00'+CAST(DAY(GETDATE())
    as varchar(2)),2)+'.log" '
    Set @SQLServer
    =(SELECT
    @@SERVERNAME)
    SELECT @BCPCMD1
    = '''BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT '
    SELECT @BCPCMD2
    = '-c -t , -T -S '
    + @SQLServer + 
    SET @BCPCMD
    = @BCPCMD1+ @filepath 
    + @BCPCMD2
    Print @BCPCMD
    -- Print out below
    'BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername'
    EXEC
    master..xp_cmdshell
    @BCPCMD
      ''BCP' is not recognized as an internal or external command,
    operable program or batch file.
    NULL
    if i copy the print ourt put like below and excecute the CMD it was working fine, could you please suggest me what is the problem in above query.
    EXEC
    master..xp_cmdshell
    'BCP "SELECT  * FROM  
    [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername '
    Thanks, SAAD.

  • Copy/Past from SQL Worksheet with Column Headers

    Is there a way to copy & paste results out of a SQL Worksheet and have the column headers included?
    Message was edited by:
    user640368

    Hi,
    I've never known that this feature has been implemented.
    The feature exchange said that it is Accepted without giving the detail of when would it be implemented.
    http://apex.oracle.com/pls/otn/f?p=42626:39:1324151408296493::NO::P39_ID:5021
    The current release notes don't say anything about this as well.
    My mistake than if it was noted on previous version.
    However, glad to hear if this has been possibly to be done.
    I'll have it a try once I've access to my SQL Dev.
    Regards,
    Buntoro

  • SQL Developer: How do I copy data with Column Headers from the output grid?

    Hello,
    I am using Version 2.1.1.64.
    I run a SQL query, I get the results grid in the "Query Result" window down below. Say I get 10 rows returned, with 5 columns.
    I want to Copy this entire grid, plus the column headers/names, to the clipboard. So I can paste it under the original query to document the results of that query.
    I can't find any way to do this. I can copy/paste the results grid, but it doesn't copy the headers.
    The only way I see to do it is to go through numerous steps to Export to a TXT file, then paste that. Unfortunately, that is a lot of wasted steps if I need to do this over and over, plus, the output gets pasted in an ugly format with double quotes, etc.
    It seems like the simplest functionality is to copy/paste the entire results grid, and of course you might the headers. Why is this so complicated/impossible to do?
    (I believe Toad has the same problem. DBArtisan allows you to copy/paste the entire results, plus headers, though.)
    Any assistance would be appreciated!
    Thanks,
    John

    Ah, ok...
    I had tried that before, and it didn't work, it seemed to copy the path of filename I was using. But I think that was because I had clicked on a Column Header first, and it had asked me if I wanted to filter. I think then it lost track that it was in the grid. It's a little flukey.
    What I did now was to click on an individual cell in the output, then hit CTRL-A to select all, then hit SHIFT-CTRL-C. That gives me exactly what I want.
    Thanks very much for your quick solution, I appreciate it!
    John

  • How can I save a table with column headers?

    Hi
    I want to save the content in table to a text file. I used Write file.vi for doing that but the column headers didn't be saved. My column headers are changed depends on my testing result so that the column number is not fixed. Any suggestions?
    Bill.

    You can retrieve column headers with the ColHdrs[] table property and save them to disk before the table contents.
    Roberto
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Oracle (SQL) to File Interface

    I am trying to export data from Oracle to Flat file. I have defined both models which include the datastores and I have used them in the interface.
    What LKM should I use? I don't want to load data in a different staging area. Also, I can't use IKM SQL to File Append (it doesn't show in the Flow window)
    2) I know there is another option (ODISQLUnload) but I think it's better to export / import via text file when dealing with large volume of data.
    Thank you

    Indeed. I had to select the staging area as different from target. First I got confused because I don't want to move data around to waste time.
    However, running the interface I got an error. The file is on local system (W32). I can't figure out why it returned this error since I am able to read/write to the target folder.
    java.io.IOException: CreateProcess: insert into table_name ( field1, field2) values ( :field1, :field2) error=2
        at java.lang.Win32Process.create(Native Method)
        at java.lang.Win32Process.<init>(Unknown Source)
        at java.lang.Runtime.execInternal(Native Method)
        at java.lang.Runtime.exec(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execOsOrders(SnpSessTaskSql.java)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrdersOSOder(SnpSessTaskSql.java)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
        at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
        at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
        at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
        at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
        at com.sunopsis.dwg.cmd.e.k(e.java)
        at com.sunopsis.dwg.cmd.g.A(g.java)
        at com.sunopsis.dwg.cmd.e.run(e.java)
        at java.lang.Thread.run(Unknown Source)

  • How to create tree table with column headers

    hi,
    when i drag and drop a view object onto my .jspx page as a af: tree table ,
    am not able to get the column header of each column. all the columns in the table are just clubbed together not separated as in af:table.
    can anyone say how the column headers are created for the columns when we drop a view object as a tree table?

    Hi,
    this is not an option with the treeTable as it gets rendered by default when dragging and dropping the collection to the page. I haven't tried it, but I think you will have to check which node is getting rendered and based on this information add your own row layout . Sounds like a bit of coding work
    Frank

  • Populate a cell with column headers, seperated by a comma, if any of the columns rows contain text

    I have a table, much like the one below:-
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    N
    O
    P
    Q
    R
    S
    John
    Yes
    Paul 
    No
    Dave
    Jay
    No
    Matt
    Yes
    Yes
    Karl
    Lois
    Jane
    Maybe
    Anna
    Barry
    No
    Yes
    Maybe
    I want to populate a cell on another sheet with the column headers if the row contains text. For examplein the case of 'Matt', the value I want returned is 'E, R' becuase there is text in the 'Matt' Row in columns E and R
    Anyone have any ideas?
    Thanks,
    Karl

    Hi Hans,
    Thanks for that. It works to an extent in that it returns the correct Column, but I actually want it to return the Column heading. It's my fault for not making it clear, I should have used different names for the column headings rather than just A to S......apologies.
    Other than that, it does work, but if you have any suggestions on how to get the actual column heading, that would be great.
    For example:-
    Mon
    Tue
    Wed
    Thu
    Fri
    Sat
    Sun
    Mon
    Tue
    Wed
    Thu
    Fri
    Sat
    Sun
    Mon
    Tue
    Wed
    Thu
    Fri
    John
    Paul
    Yes
    Dave
    Jay
    Yes
    No
    Matt
    Karl
    Yes
    Lois
    Yes
    Jane
    Anna
    Barry

  • ALV download to Excel--Problem with Column Headers

    Hi,
    I have created a dynamic internal table and displaying it as ALV using SALV classes. Problem is that  when I download this ALV to Excel I'm not getting Column headings same as they are in ALV display.
    I mean in Excel it is showing Column headings taken from domain or data element.
    While creating dynamic table i'm passing short/ Medium & Long text too. Still it is not working.
    Any kinda help is appreciated.
    Thanks & Regards,
    Vivek Gaur
    Edited by: Vivek  Gaur on Nov 4, 2009 2:04 PM

    Look I cant actually post the code as it is divided in some global classes and main program. But i can elaborate the steps little further:
    1: I have created a field catalog for Dynamic internal table. In it i have passed every necessary field along with short/medium/Long texts.
    2: I fill up this dynamic table with data.
    3: I assign a field symbol to this dynamic internal table.
    4: I pass this field symbol to the factory method of CL_SALV_TABLE  Class.
    Thats it buddy..Hope u have understood my problem.

  • JTable: Easy groupable column headers with hideable columns

    Hi All,
    I have a requirement to make a JTable which displays
    columns with 2 values - a current value and an old one.
    The old value can be hidden or shown by user preference.
    The values are not editable. The 2 values have a single
    heading.
    I've been mucking about with GroupableTableHeader and
    HideableTableColumnModel and all that. This way of
    solving the problem requires siginificant coding.
    Then I had an idea - just use the TableCellRenderer to
    make it look like 2 columns ! This fits my requirements
    and is much simpler.
    So for anyone who has the same requirement, here is
    some sample code. I think you'll all agree that in my
    specific case it is a very good way of providing the needed
    functionality.
    Here is the sample code:
    import javax.swing.*;
    import javax.swing.border.AbstractBorder;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.DefaultTableCellRenderer;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    public class DoubleColumnTable extends JTable {
        private boolean secondValueVisible = true;
        public DoubleColumnTable() {
            super();
            setModel(new AbstractTableModel() {
                public String getColumnName(int column) {
                    return column + "";
                public int getColumnCount() {
                    return 5;
                public int getRowCount() {
                    return 5;
                public Object getValueAt(int rowIndex, int columnIndex) {
                    return new Integer[]{new Integer(rowIndex), new Integer(columnIndex + 10)};
            setDefaultRenderer(Object.class, new DefaultTableCellRenderer() {
                public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                    Integer[] twoValues = (Integer[])value;
                    JPanel panel = new JPanel();
                    if (secondValueVisible) {
                        panel.setLayout(new GridLayout(0, 2));
                        JLabel firstLabel = new JLabel(twoValues[0].toString(), JLabel.CENTER);
                        JLabel secondLabel = new JLabel(twoValues[1].toString(), JLabel.CENTER);
                        secondLabel.setBackground(Color.lightGray);
                        secondLabel.setOpaque(true);
                        secondLabel.setBorder(new LeftBorder());
                        panel.add(firstLabel);
                        panel.add(secondLabel);
                    } else {
                        panel.setLayout(new GridLayout(0, 1));
                        JLabel firstLabel = new JLabel(twoValues[0].toString(), JLabel.CENTER);
                        panel.add(firstLabel);
                    return panel;
        private void toggle() {
            secondValueVisible = !secondValueVisible;
            repaint();
        class LeftBorder extends AbstractBorder {
            public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
                g.setColor(Color.gray);
                g.drawLine(x, y, x, height);
        public static void main(String[] args) {
            JFrame frame = new JFrame();
            frame.setSize(300, 300);
            frame.setLocation(300, 200);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            Container contentPane = frame.getContentPane();
            final DoubleColumnTable table = new DoubleColumnTable();
            contentPane.add("North", new JButton(new AbstractAction("Toggle") {
                public void actionPerformed(ActionEvent e) {
                    table.toggle();
            contentPane.add("Center", new JScrollPane(table));
            frame.setVisible(true);
    }Message was edited by:
    NY_Consultant
    Message was edited by:
    NY_Consultant
    Message was edited by:
    NY_Consultant

    This should read
    "I have a table with column headers and a row headers using a single column from a second table."

  • TableView column headers do not line up with rows

    Right now I have a tableview with column headers that are wider than the cells in the rows of the table.
    Anyone know what property or css style I need to adjust to give the cells a little more padding? I have not had any luck searching the web or these forums.
    Edited by: astep on Feb 26, 2013 6:59 AM

    Sorry it took me a little bit to strip things down and create the project. I used NetBeans to reproduce the effect and I tried to follow the same pattern in case it had a side effect. Sorry there is so much code here for such a simple demo. I'm going to play around with it some to see if removing some of the css eliminates the effect.
    Sample.fxml
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import java.util.*?>
    <?import javafx.scene.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.*?>
    <AnchorPane fx:id="ConstraintsAnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="460.0" prefWidth="480.0" style="-fx-background-color:black" xmlns:fx="http://javafx.com/fxml" fx:controller="testtableview.SampleController">
      <children>
        <TitledPane fx:id="ConstraintsTitlePane" alignment="CENTER" animated="false" collapsible="false" contentDisplay="CENTER" opacity="0.75" text="Constraints by Stream Class">
          <content>
            <TableView fx:id="constraintsTableView" prefHeight="445.0" prefWidth="480.0" />
          </content>
        </TitledPane>
      </children>
    </AnchorPane>stylesheet.css
    .root {
    -fx-base: rgb(50, 50, 50);
    -fx-background: rgb(50, 50, 50);
    -fx-control-inner-background:  rgb(50, 50, 50);
    .table-view {
    -fx-table-cell-border-color:derive(-fx-base,+10%);
    -fx-table-header-border-color:derive(-fx-base,+20%);
    .text-field{
         -fx-prompt-text-fill: White;
    .table-cell {
         -fx-border-color: black;
    .table-cell:hover {
         -fx-background: DimGray;
         -fx-background-color: DimGray;
    .table-cell:selected {
         -fx-background: DimGray;
         -fx-background-color: DimGray;
    .table-row-cell {
         -fx-border-color: black;
         -fx-control-inner-background: black;
    .table-row-cell:hover {
         -fx-background: DimGray;
         -fx-background-color: DimGray;
    .table-row-cell:selected {
         -fx-background: DimGray;
         -fx-background-color: DimGray;
    }TestTableView.java
    package testtableview;
    import javafx.application.Application;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.Parent;
    import javafx.scene.Scene;
    import javafx.stage.Stage;
    public class TestTableView extends Application {
        @Override
        public void start(Stage stage) throws Exception {
            Parent root = FXMLLoader.load(getClass().getResource("Sample.fxml"));
            Scene scene = new Scene(root);
            stage.setScene(scene);
            scene.getStylesheets().add(TestTableView.class.getResource("stylesheet.css").toExternalForm());
            stage.show();
        public static void main(String[] args) {
            launch(args);
    }Model.java
    package testtableview;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    public class Model {
         private static Constraint temp = new Constraint();
         private static Model instance = null;
         private Model() {
         public static Model getInstance() {
              if (instance == null) {
                   instance = new Model();
                   constraintsList.add(temp);
              return instance;
         private static ObservableList<Constraint> constraintsList = FXCollections
                   .observableArrayList();
         public ObservableList<Constraint> getConstraintsList() {
              return constraintsList;
         public static class Constraint {
              private SimpleStringProperty ColumnOne = null;
              private SimpleStringProperty ColumnTwo = null;
              private SimpleStringProperty ColumnThree = null;
              private SimpleStringProperty ColumnFour = null;
              private SimpleStringProperty ColumnFive = null;
              private SimpleStringProperty ColumnSix = null;
              private SimpleStringProperty ColumnSeven = null;
              public String getColumnOne() {
                   return ColumnOne.get();
              public void setColumnOne(String input) {
                   ColumnOne.set(input);
              public String getColumnTwo() {
                   return ColumnTwo.get();
              public void setColumnTwo(String input) {
                   ColumnTwo.set(input);
              public String getColumnThree() {
                   return ColumnThree.get();
              public void setColumnThree(String input) {
                   ColumnThree.set(input);
              public String getColumnFour() {
                   return ColumnFour.get();
              public void setColumnFour(String input) {
                   ColumnFour.set(input);
              public String getColumnFive() {
                   return ColumnFive.get();
              public void setColumnFive(String input) {
                   ColumnFive.set(input);
              public String getColumnSix() {
                   return ColumnSix.get();
              public void setColumnSix(String input) {
                   ColumnSix.set(input);
              public String getColumnSeven() {
                   return ColumnSeven.get();
              public void setColumnSeven(String input) {
                   ColumnSeven.set(input);
              public Constraint() {
                   this.ColumnOne = new SimpleStringProperty("");
                   this.ColumnTwo = new SimpleStringProperty("");
                   this.ColumnThree = new SimpleStringProperty("");
                   this.ColumnFour = new SimpleStringProperty("");
                   this.ColumnFive = new SimpleStringProperty("");
                   this.ColumnSix = new SimpleStringProperty("");
                   this.ColumnSeven = new SimpleStringProperty("");
    }ConstraintsTableViewModel.java
    package testtableview;
    import testtableview.Model.Constraint;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    public class ConstraintsTableViewModel {
         private static TableView<Constraint> table = new TableView<Constraint>();
         private static ObservableList<TableColumn<Constraint, String>> columnList = FXCollections
                   .observableArrayList();
         public static TableView<Constraint> setupView() {
              TableColumn<Constraint, String> ColumnOneCol = new TableColumn<Constraint, String>("Example Exam1");
              ColumnOneCol.setMinWidth(95.0);
              ColumnOneCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnOne"));
              columnList.add(ColumnOneCol);
              TableColumn<Constraint, String> ColumnTwoCol = new TableColumn<Constraint, String>("Example 2");
              ColumnTwoCol.setMinWidth(55.0);
              ColumnTwoCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnTwo"));
              columnList.add(ColumnTwoCol);
              TableColumn<Constraint, String> ColumnThreeCol = new TableColumn<Constraint, String>("Example3");
              ColumnThreeCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnThree"));
              ColumnThreeCol.setMinWidth(70);
              columnList.add(ColumnThreeCol);
              TableColumn<Constraint, String> ColumnFourCol = new TableColumn<Constraint, String>("Example4");
              ColumnFourCol.setMinWidth(60.0);
              ColumnFourCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnFour"));
              columnList.add(ColumnFourCol);
              TableColumn<Constraint, String> ColumnFiveCol = new TableColumn<Constraint, String>("Example5");
              ColumnFiveCol.setMinWidth(60.0);
              ColumnFiveCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnFive"));
              columnList.add(ColumnFiveCol);
              TableColumn<Constraint, String> ColumnSixCol = new TableColumn<Constraint, String>("Example6");
              ColumnSixCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnSix"));
              ColumnSixCol.setMinWidth(55);
              columnList.add(ColumnSixCol);
              TableColumn<Constraint, String> ColumnSevenCol = new TableColumn<Constraint, String>("Exam7");
              ColumnSevenCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnSeven"));
              ColumnSevenCol.setMinWidth(55);
              columnList.add(ColumnSevenCol);
              table.getColumns().addAll(columnList);
              return table;
    }SampleController.java
    package testtableview;
    import testtableview.Model.Constraint;
    import java.net.URL;
    import java.util.ResourceBundle;
    import javafx.fxml.FXML;
    import javafx.fxml.Initializable;
    import javafx.scene.control.TableView;
    public class SampleController implements Initializable {
        @FXML
         private TableView<Constraint> constraintsTableView;
         private Model cm = null;
        @Override
        public void initialize(URL url, ResourceBundle rb) {
            cm = Model.getInstance();
         constraintsTableView.setItems(cm.getConstraintsList());
         constraintsTableView.getColumns().addAll(ConstraintsTableViewModel.setupView().getColumns());
    }

  • Internal Table to Excel with Column Header line

    Hello everyone,
    I need to download Internal table data to excel with a column header line.
    My Code is as follows:
    TYPES:  BEGIN OF y_hdr,
            head(30) TYPE c,
            END OF y_hdr.
    Data:  t_hdr TYPE STANDARD TABLE OF y_hdr.
    Fill internal table t_adrcdata
    fill the header table t_hdr
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            filename                      = C:\test.xls
            filetype                        = 'DBF'
        IMPORTING
          TABLES
            data_tab                        =  t_adrcdata
           fieldnames                       =  t_hdr
         EXCEPTIONS
           file_write_error                = 1
           no_batch                        = 2
    This code gives me a row with column headers.
    However they are all truncated after 10 chars.
    The truncation is independent of column data length. Data could be of length 2,5 or 40 but the header always displays upto 10 chars.
    Keeping the filename as test.xls, when I download it in ASC format instead of DBF the headers are of proper length.
    What could I be doing wrong?
    I know this topic has been discussed before but my question is pertaining to DBF Format download. The reason I chose DBF format is because it downloads the data in DB format and does not give in to Excel formatting.
    FOr example in ASC format:
    1, A field of type Char(12) used to get downloaded into excel without the leading zeros. 000012345678 --> 12345678
    2. Date in format dd-MMM-yyyy in a char(11) field used to get downloaded to excel in dd-MMM-yy format.
    When I chose DBF, this issue was resolved. However, the column headers got truncated at 10 chars.
    Please feel free to recommend any other way of downloading to Excel and preserving format if this method is incorrect/ there is a better way.

    Hi,
    Take 'ASC' format for file type.
    But when you declare your internal table to pass for FM you have to create all the fields with char.
    Example:
    data: begin of it_exl occurs 0,
            bukrs(04) type c,
            belnr(10) type c,
            buzei(03) type c,
    end of ut_exl.
    You need to manipulate your date format and other stuff before appending to this internal table.
    Thanks,
    Deepak.

  • PL/SQL to Java Interface - Overwhelming Overhead?

    My company is running Oracle 10g R2. I am currently exploring the use of java classes from PL/SQL. This is because we have multiple code bases, including Java, PowerBuilder (which can interface with Java), and PL/SQL (which can interface with Java).
    Doing some performance testing, I found some rather alarming results. Running a simple java function 1 million times, I tested performance of PL./SQL to java and PowerBuilder to Java.
    In PL/SQL, the 1 mil calls executed in ~120 s.
    In PowerBuilder, the 1 mil calls executed in ~54 s.
    Is it possible that our database is incorrectly configured for best java performance? Not only does it appear that PowerBuilder, a much less pervasive language than PL/SQL, is over twice as fast, but the PB test was run on my laptop, which is no where near as powerful as the database server that the PL/SQL procedure ran against, leading me to believe that the performance gap is actually much wider.
    Anyone have any tips to improve the performance? Or is this simply the nature of the beast? I can't seem to find any posts on the net about people experiencing huge PL/SQL to Java overhead, so I'm hoping it is just something I am doing wrong.
    Thanks for your help!
    -Brett Birschbach

    Below is my test code. Any suggestions are appreciated.
    Thanks!
    -Brett
    ==================================================
    Java Class:
    public class TestConvert {
        // For running straight from Java
        public static void main(String[] args){
            System.out.println(callAndTime());
        // For running 1 mil calls with only one call from PowerBuilder or PL/SQL
        public static long callAndTime(){
            TestConvert.convertEsnDecToHex("13005454488");
            long start = System.currentTimeMillis();
            for (int i = 0; i < 1000000; i++){
                TestConvert.convertEsnDecToHex("13005454488");
            long end = System.currentTimeMillis();
            return end-start;
        // For performing the actual work
        public static String convertEsnDecToHex(String esn) {
            String result = null;
            result = Integer.toHexString(new Integer(esn.substring(0, 3)).intValue());
            result += Integer.toHexString(new Integer(esn.substring(3)).intValue());
            return result.toUpperCase();
        // Non-static wrapper necessary for PowerBuilder
        public String callAndTimeNS(){
            return String.valueOf(callAndTime());
        // Non-static wrapper necessary for PowerBuilder 
        public String convertEsnDecToHexNS(String esn){
            return convertEsnDecToHex(esn);
    }PL/SQL Script for 1 Million Java Calls:
    DECLARE
      var       VARCHAR2( 20 );
      t_begin   NUMBER;
      t_end     NUMBER;
    BEGIN
      var := testconvert.convertesndectohex( '13005454488' );
      t_begin := DBMS_UTILITY.get_time;
      FOR i IN 1 .. 1000000
      LOOP
        var := testconvert.convertesndectohex( '13005454488' );
      END LOOP;
      t_end := DBMS_UTILITY.get_time;
      DBMS_OUTPUT.put_line( var );
      DBMS_OUTPUT.put_line(  ( t_end - t_begin ) / 100 || ' seconds' );
    END;
    /PowerBuilder for 1 Million Java Calls:
    EJBConnection lEJBConn
    TestConvert lnv_test
    String ls_ret
    Long i
    Time t_begin, t_end
    lEJBConn = CREATE EJBConnection
    lEJBConn.CreateJavaInstance( lnv_test, "TestConvert")
    ls_ret = lnv_test.convertesndectohexns("13005454488")
    t_begin = now()
    FOR i = 1 TO 1000000          
         ls_ret = lnv_test.convertesndectohexns("13005454488")
    NEXT
    t_end = now()
    MessageBox("Hex Version",ls_ret + " - " + String(SecondsAfter(t_begin, t_end)) + " seconds")
    DESTROY lEJBConn

  • Display Periods in Column headers for CO-PA report

    SDNers
    I'm trying to create a CO-PA Report with Column headers that are required to be showing Current Period, last period etc until 6 months back.
    I've tried to put in &0FP .. but that only display the Current period/year...
    How do i get the previous periods displayed in the column headers??
    thanks

    hi Sruthi....
    In standard SAP, the only reports which are available are line item reports - KE24 (Actuals) and KE25 (Plan). However, using Report writer / painter we can create reports as per Business requirements.
    Once we create reports as required, we can execute the same using transaction code KE30 (Execute report).
    You can create / change / display COPA reports using transaction codes KE31 / KE32 / KE33 respectively.
    Once again create the new Report and then execute it.....
    http://help.sap.com/saphelp_erp2005/helpdata/en/7a/4c48c64a0111d1894c0000e829fbbd/frameset.htm
    Regards
    Ranjit

  • How to make column headers in table in PDF report appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp

    Hi my name is vishal
    For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
    Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    using System.Diagnostics;
    using System.IO;
    namespace DRRS_CSharp
    public partial class frmPDF : Form
    public frmPDF()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(6);
    table.TotalWidth =530f;
    table.LockedWidth = true;
    PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
    cell.Colspan = 6;
    cell.HorizontalAlignment = 0;
    table.AddCell(cell);
    Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
    para.Alignment = Element.ALIGN_CENTER;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(105f, 105f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("Reprocessing Date");
    table.AddCell("Patient Name");
    table.AddCell("Dialyzer(Manufacturer,Size)");
    table.AddCell("No.of Reuse");
    table.AddCell("Verification");
    table.AddCell("DialyzerID");
    while (dr.Read())
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
    table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
    table.AddCell("@count".ToString());
    table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
    table.AddCell(dr[0].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
    if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
    var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
    this.Close();
    The above code executes well with no problem at all!
    As you can see the file to which i create and save and open my pdf report is
    AssignedDialyzer.pdf.
    The column headers of table in pdf report from c# windows forms using iTextSharp are
    "Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
    "DialyzerID".
    However the problem i am facing is after execution and opening of document is my
    column headers in table in pdf report from
    c# and datas in it all appear in bold.
    I have browsed through net regarding to solve this problem but with no success.
    What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
    Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
    I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
    Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
    If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
    vb6,adodb with ms access using iTextSharp?
    I have approached Sound Forge.Net for help but with no success.
    I hope anyone/someone truly understands what i am trying to ask!
    I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
    Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
    I hope i get a reply in terms of solving this problem.
    vishal

    Hi,
    About iTextSharp component issue , I think this case is off-topic in here.
    I suggest you consulting to compenent provider.
    http://sourceforge.net/projects/itextsharp/
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • For abap-hr i need datatype and length for the fields which i selected

    hi seniors,       I got one task for which i have to get the data type and length for the fields of a table in abap-hr. I am using dd03l table, but my team leader told me to not to use this. So, please anybody can help, i will be thankfull.       I h

  • Standard adobe form workflow error

    Hey Expert, I am using the standard workflow template WS17900260 for any adobe form. In this task there is a task which is TS17900108. I have some workflow that end in error because of this task raising an exception "Exception CX_SY_NO_HANDLER trigge

  • Downloading Pictures from iWeb

    I published some photos with iWeb but my hard drive crashed and I lost those photos; I would like to download the photos again to my computer, how can I do this?

  • BC_MSG slow performance

    I experience slow performance in a SAP PI 7.1EHP1 SP05 installation. The BC_MSG table contains about 550.000 messages. I archive and delete message that are 10 days old. The environment is Redhat Linux 5.5 64bit with 16GB RAM and oracle 10.2.0.4.<br>

  • Problem on Normalized Frequency to original analog frequency

    I'm having a problem regarding normalized frequency. The Sine wave .vi, says that the input to the frequency  must be a normalized frequency. What I did is tha I divide my frequency to the number of samples. However, when I attached Tone Measurements