Download report into a flat file format

Hi Friends,
I would like to know your thoughts on what is the best practice most of you using to download a report into a flat file(NOT csv).
In my application business users want a report to be downloaded into their local desktop (just like a .csv) but into a flat file and they have their byte specific format.
My concerns :
1) Is there any straight method to download a report into a flatfile (like it is now for CSV) from Apex 3.1.2 ?
2) If I write my own code using UTL_FILE, can I let the user to save them to their desired directory on their desktop ?
Your thoughts would definitely help me in delivering a right solution to the users in this regard.
Thanks a lot.
Raj.

Raj:
You could create a 'Before Header' page process to create this 'flat file'. The code for the page process will be something similar to declare
v_file_name   VARCHAR2 (2000) := 'fixedFieldsFile.txt';
--- Client Record Format
f1 char(20);
f2 char(20);
f3 char(20);
---- End format
begin
OWA_UTIL.mime_header ('application/txt', FALSE);
htp.p('Content-Disposition:attachment;filename="'|| v_file_name|| '"');
OWA_UTIL.http_header_close;
for c1 in (select * from emp) loop                           ----- The report query
f1:= c1.empno;f2:=c1.ename;f3:=c1.sal;
htp.p(f1||f2||f3);
end loop;
apex_application.g_unrecoverable_error:=true;
exception when others then
null;
end; Varad

Similar Messages

  • TCODE TO DOWNLOAD IDOC INTO A FLAT FILE

    Hi All,
       Please let me know if there is any tcode to download IDOC into a flat file..
    Regards,
    Kaveri

    try with we60 where you should have links to download the idoc type.
    Please check this:
    1. How to Download a Hierarchy to a Flat File
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb
    2. How To Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0 Version 1.10
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    run the report RSEOUT00 with the idoc number, flat xml file will be generated at the location user/sap/XI/SYS/global/idoc_file
    Please rewrds if found help ful

  • How to download data into a text file format ?

    Hi, all.
    My situation now is: I have a report pogram which can retrieve data from database, and I would like to export or download those data to outside as a text file (.txt) in my local computer.
    So, does anyone know how to do it? i mean my report coding should add on or enhance with what coding in order to do like that.
    Thanks in advance.

    Hi,
    Use GUI_DOWNLOAD Function module.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                  =
        filename                      = 'FILEPATH'* 
    FILETYPE                      = 'ASC'
      APPEND                        = ' '
       WRITE_FIELD_SEPARATOR         = 'X'  (Field separator )
      HEADER                        = '00'
      TRUNC_TRAILING_BLANKS         = ' '
      WRITE_LF                      = 'X'
      COL_SELECT                    = ' '
      COL_SELECT_MASK               = ' '
      DAT_MODE                      = ' '
      CONFIRM_OVERWRITE             = ' '
      NO_AUTH_CHECK                 = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      WRITE_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      tables
        data_tab                      = t_customer ( give internal tablename )
    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 .
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.                                 " IF SY-SUBRC

  • DOWNLOAD CHEQUE FORMAT INTO A FLAT FILE

    hi,
       i have a requirement to download cheque format into  a flat file.
    as shown below. can any one guide me in this.
                                    Check No.   Date      Payment Amt
                                     1200175681  16/05/07           229.26  CAD
      Pay     TWO HUNDRED TWENTY NINE & 26/100*************************** CANADIAN D
      To The  MINISTER OF FINANCE
      Order   BARRIE SMALL CLAIMS COURT
      Of      114 WORSLEY STREET
              BARRIE ON L4M 1M1                  ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      BARRIESMCC                     1200175681   16/05/07
      Payee
      MINISTER OF FINANCE
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 BARRIESMCC02MAY                          0.00 CAD           229.26
                                                                                    Check No.   Date      Payment Amt
                                     1200175682  16/05/07           149.96  CAD
      Pay     ONE HUNDRED FORTY NINE & 96/100**************************** CANADIAN D
      To The  BELLEVILLE ONTARIO HRDC
      Order   REMITTANCES
      Of      PO BOX 6767
              MATANE QC G4W 4T1                  ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      BELLEVONHR                     1200175682   16/05/07
      Payee
      BELLEVILLE ONTARIO HRDC
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 HRDCQC09MAY07                            0.00 CAD           149.96
                                                                                    Check No.   Date      Payment Amt
                                     1200175683  16/05/07         1,590.00  CAD
      Pay     ONE THOUSAND FIVE HUNDRED NINETY & 00/100****************** CANADIAN D
      To The  CANADIAN ENERGY EFFICIENCY
      Order   ALLIANCE
      Of      2800 SKYMARK AVENUE
              MISSISSAUGA ON L4W 5A6             ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      CANENERGEF   02                1200175683   16/05/07
      Payee
      CANADIAN ENERGY EFFICIENCY
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      11/05/07 2117                                     0.00 CAD         1,590.00
                                                                                    Check No.   Date      Payment Amt
                                     1200175684  16/05/07         8,701.83  CAD
      Pay     EIGHT THOUSAND SEVEN HUNDRED ONE & 83/100****************** CANADIAN D
      To The  CITY OF HAMILTON
      Order   ACCOUNTS RECEIVABLE
      Of      120 KING ST WEST
              SUITE 900, STANDARD LIFE BLDG      ______________________________
              HAMILTON ON L8P 4V2
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      CITYHAMIL    01                1200175684   16/05/07
      Payee
      CITY OF HAMILTON
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      12/04/07 112949                                   0.00 CAD         8,701.83
                                                                                    Check No.   Date      Payment Amt
                                     1200175685  16/05/07        23,104.38  CAD
      Pay     TWENTY THREE THOUSAND ONE HUNDRED FOUR & 38/100************ CANADIAN D
      To The  MINISTRY OF COMMUNITY AND
      Order   SOCIAL SERVICES,  DIRECTOR
      Of      FAMILY RESPONSIBILITY OFFICE
              PO BOX 2204  STATION P             ______________________________
              TORONTO ON M5S 3E9
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      FAMILYREOF                     1200175685   16/05/07
      Payee
      MINISTRY OF COMMUNITY AND
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 FRO02MAY07                               0.00 CAD        23,104.38
                                                                                    Check No.   Date      Payment Amt
                                     1200175686  16/05/07           553.85  CAD
      Pay     FIVE HUNDRED FIFTY THREE & 85/100************************** CANADIAN D
      To The  HAROLD MCQUAKER ENTERPRISES
      Order   LTD
      Of      BOX 538
              EMO ON P0W 1E0                     ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      HAROLDMCEN                     1200175686   16/05/07
      Payee
      HAROLD MCQUAKER ENTERPRISES
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      17/03/07 121                                      0.00 CAD           553.85
                                                                                    Check No.   Date      Payment Amt
                                     1200175687  16/05/07       428,684.44  CAD
      Pay     **********428,684.44************************************* CANADIAN D
      To The  MERIDIAN CREDIT UNION
      Order   STE 160 S
      Of      483 BAY ST
              TORONTO ON M5G 2E1                 ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      HEPCOEDRUN   12                1200175687   16/05/07
      Payee
      MERIDIAN CREDIT UNION
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 MERIDIEN02MAY07                          0.00 CAD       428,684.44
                                                                                    Check No.   Date      Payment Amt
                                     1200175688  16/05/07         7,319.15  CAD
      Pay     SEVEN THOUSAND THREE HUNDRED NINETEEN & 15/100************* CANADIAN D
      To The  HYDRO ONE EMPLOYEES AND
      Order   PENSIONERS CHARITY TRUST
      Of      483 BAY STREET 14TH FL
              NORTH TOWER                        ______________________________
              TORONTO ON M5G 2P5
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      HYDROONEEP                     1200175688   16/05/07
      Payee
      HYDRO ONE EMPLOYEES AND
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 CHARITY02MAY07                           0.00 CAD         7,319.15
                                                                                    Check No.   Date      Payment Amt
                                     1200175689  16/05/07           357.97  CAD
      Pay     THREE HUNDRED FIFTY SEVEN & 97/100************************* CANADIAN D
      To The  MINISTER OF FINANCE
      Order   KENORA SMALL CLAIMS COURT
      Of      216 WATER STREET
              KENORA ON P9N 1S4                  ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      KENORASMCC                     1200175689   16/05/07
      Payee
      MINISTER OF FINANCE
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 KENORASMCC09MAY                          0.00 CAD           357.97
                                                                                    Check No.   Date      Payment Amt
                                     1200175690  16/05/07           692.41  CAD
      Pay     SIX HUNDRED NINETY TWO & 41/100**************************** CANADIAN D
      To The  MURRAY, WALTER
      Order   .
      Of      1721 CEDAR LANE
              BRACEBRIDGE ON P1L 1W9             ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      MURRAYWALT                     1200175690   16/05/07
      Payee
      MURRAY, WALTER
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      09/05/07 EXS2007710                               0.00 CAD           692.41
                                                                                    Check No.   Date      Payment Amt
                                     1200175691  16/05/07         2,437.44  CAD
      Pay     TWO THOUSAND FOUR HUNDRED THIRTY SEVEN & 44/100************ CANADIAN D
      To The  PACE, ROBERT
      Order   .
      Of      5121 SACKVILLE ST, 7TH FLOOR
              HALIFAX NS B3J 1K1                 ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      PACEROBERT                     1200175691   16/05/07
      Payee
      PACE, ROBERT
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      09/05/07 EXS200711                                0.00 CAD         2,437.44
                                                                                    Check No.   Date      Payment Amt
                                     1200175692  16/05/07         2,718.35  CAD
      Pay     TWO THOUSAND SEVEN HUNDRED EIGHTEEN & 35/100*************** CANADIAN D
      To The  RECEIVER GENERAL FOR CANADA
      Order   CANADA CUSTOMS REVENUE AGENCY
      Of      875 HERON RD
              OTTAWA ON K1A 1B1                  ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      RECEIVEGEN                     1200175692   16/05/07
      Payee
      RECEIVER GENERAL FOR CANADA
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 CRABNW02MAY07                            0.00 CAD         2,718.35
                                                                                    Check No.   Date      Payment Amt
                                     1200175693  16/05/07         7,688.00  CAD
      Pay     SEVEN THOUSAND SIX HUNDRED EIGHTY EIGHT & 00/100*********** CANADIAN D
      To The  RECEIVER GENERAL FOR CANADA
      Order   INDIAN & NORTHERN AFFAIRS
      Of      100 ANEMKI DRIVE
              RR #4                              ______________________________
              THUNDER BAY ON P7J 1A5
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      RECEIVGECA   77                1200175693   16/05/07
      Payee
      RECEIVER GENERAL FOR CANADA
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 P2107132007                              0.00 CAD         7,688.00
                                                                                    Check No.   Date      Payment Amt
                                     1200175694  16/05/07         4,155.20  CAD
      Pay     FOUR THOUSAND ONE HUNDRED FIFTY FIVE & 20/100************** CANADIAN D
      To The  REUTERS CANADA LIMITED
      Order   CANADA
      Of      PO BOX 1519, STATION A
              TORONTO ON M5W 3N9                 ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      REUTERINSV                     1200175694   16/05/07
      Payee
      REUTERS CANADA LIMITED
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      01/04/07 ICA807040667                             0.00 CAD         4,155.20
                                                                                    Check No.   Date      Payment Amt
                                     1200175695  16/05/07         4,155.20  CAD
      Pay     FOUR THOUSAND ONE HUNDRED FIFTY FIVE & 20/100************** CANADIAN D
      To The  REUTERS CANADA LIMITED
      Order   CANADA
      Of      PO BOX 1519, STATION A
              TORONTO ON M5W 3N9                 ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      REUTERINSV                     1200175695   16/05/07
      Payee
      REUTERS CANADA LIMITED
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      01/05/07 ICA807050645                             0.00 CAD         4,155.20
                                                                                    Check No.   Date      Payment Amt
                                     1200175696  16/05/07        10,000.00  CAD
      Pay     TEN THOUSAND & 00/100************************************** CANADIAN D
      To The  WATERLOO REGIONAL CHILDRENS
      Order   MUSEUM
      Of      10 KING ST W
              KITCHENER ON N2G 1A3               ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      WATERLRECM                     1200175696   16/05/07
      Payee
      WATERLOO REGIONAL CHILDRENS
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      29/11/06 2006050034                               0.00 CAD        10,000.00

    Raj:
    You could create a 'Before Header' page process to create this 'flat file'. The code for the page process will be something similar to declare
    v_file_name   VARCHAR2 (2000) := 'fixedFieldsFile.txt';
    --- Client Record Format
    f1 char(20);
    f2 char(20);
    f3 char(20);
    ---- End format
    begin
    OWA_UTIL.mime_header ('application/txt', FALSE);
    htp.p('Content-Disposition:attachment;filename="'|| v_file_name|| '"');
    OWA_UTIL.http_header_close;
    for c1 in (select * from emp) loop                           ----- The report query
    f1:= c1.empno;f2:=c1.ename;f3:=c1.sal;
    htp.p(f1||f2||f3);
    end loop;
    apex_application.g_unrecoverable_error:=true;
    exception when others then
    null;
    end; Varad

  • XML data (Output) into a flat file

    I need to convert XML data into a flat file, which is having "|" as delimiter and ftp the same to a server. The XML data is an output of BPEL activity. The XML data is employee records. Each employee records should come as one line in the flat file.
    Is it possible to do this? if so, what will be the steps
    Thanks

    Hi,
    You need to use file adapter to write your XML payload as a flat file.
    Following are the steps to write XML payload into a flat file:
    1. Create a sample flat file and add few rows in which fields should be delimited with pipe symbol. See the record sample given below:
    Name|Age|Address|City|State|Zip
    Sam|32|2788 Viking Dr|Green Bay|WI|54304
    Here first row is the header row, you can remove the header row if it is not required.
    2. Create a file adapter service using adapter configuration wizard. Give file name and folder location where you want to write flat file. On step 5 of the adapter configuration wizard you have to define or select message schema. Click on Define Schema for Native Format button, then Native Format Builder Wizard will be opened, here you can define message schema for your flat file.
    2.1 Here you need to select Delimited for file type.
    2.2 Give details about your flat file, select your sample flat file here, which you have created in step 1 above.
    2.3 Click Next button twice and go to step 4, here give namespace and element names you want and click on Next.
    2.4 In step 5 you need to specify delimiters. Wizard doesn’t shows *|* as a delimiter so you need to enter *|* in the Delimited By combo box and click on Next button.
    2.5 Complete remaining steps and click on Finish in the wizard.
    3. Finish "Adapter Creation Wizard". Add BPEL activities (assign, invoke) to pass XML payload to file adapter and file adapter will generate *|* delimited flat file and write it to the given folder.
    See the following article for more details on Native Format Builder Wizard:
    http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm#CCHCIGCA
    Regards,
    Dharmendra
    http://soa-howto.blogspot.com

  • New EDI Implementation - Flat File format for SPSI in eCommerce Gateway

    Hi,
    we are trying to setup EDI with a business partner, goal is to import a DELFOR message into Oracle Order Management. Plans are: translate the inbound message into the SPSI flat file format, load it through eCommerce Gateway / Release Management into Order Management.
    For this purpose I'd like to test to the import of a SPSI flat file into eCommerce Gateway / Release Management, however I have difficulties to get a proper flat file. Is there a way to generate example flat files somehow? I tried to generate my own flat file, based on the Oracle manuals, but how can I be sure that the format is correct (besides of running the import program)? Any advice on this?
    Or is there a better way, e.g. through XML files?
    Thanks in advance,
    David.

    Hi, thanks for the response.
    Yes I use that report already to get the details of the flat file. But what I am missing is for example which records are repeated, e.g. for every 4000 record, do I need one 0010 record, or can I put multiple 4000 records within one 0010 record?
    regards,
    David.

  • Standardize a flat file format w.r.t OWB

    Hi Pat,
    or anyone,
    Can u help me to standardize a flat file format with respect to OWB?
    I have 15 financial source systems. The client agreed in giving the data in csv format. Now I need to standardize the feed file so that it would be easy for me handle it in OWB. Please note depending on my standardization the client would give me the data and in turn it would be easy for me to handle it OWB External Tables. The records size for a single feed file is 1 million. So my questions are
    1.How should I standardize a date field in flat file?. Please note target date field is default date in Oracle.
    2.How should I standardize an address field? I.e. normally here I have 3 address fields. But I want the output in 1 field. What is the best possible methodology to do this? Or can I handle this issue in OWB front.
    3.How should I standardize a feed file name (generic)?
    4.How should I standardize a feed file folder (generic)? Please note the folder will reside in UNIX environment. The concept is, there would be respective folders in UNIX and the feed files would automatically fall into these respective folders in a fortnight basis. So what should I do to achieve this? I know I have to write a shell script for the automatic process. If so how will I do this and schedule it.
    5.And w.r.t above question, how will I tell OWB to go and fetch the files in those folders. I know it is done while mapping. But my question is Is that the only best way I can achieve it?
    6.If I left anything related to feed file, please tell me?
    Please note that based on my standardization, the client would extract the data and give it to me. So if I standardize the feed file which would be easy for me to handle it in OWB, then that would be a great success. And also note this is for a long run. Minimum 10 years.
    Regards,
    rem.

    Good afternoon Rem,
    It's all very theoretical indeed, talking about standards and all. I'll try to answer some of your questions according to my experiences.
    @1, Usually we load flat files into external tables using varchar2-fields only, occasionally number fields; dates however are always loaded into varchar2's and then when reading the external table into the staging area they are converted to Oracle dates using a simple TO_DATE transformation.
    @2, I don't think there's a real standard for that, it should simply meet YOUR needs, so when loading EXT into STG simply perform a transformation concatenating those 3 fields to form one.
    @5, you have to register the location where you have defined your flat files, this should be some Unix location; after that the connector between EXT and STG will know what to do when running the mappings from EXT to STG (thus: no other action is needed to 'tell OWB' where to fetch data from flat files).
    As far as I know there a no standards in naming conventions for files and folders, just go with what seems logical/practical in your situation.
    Regards, Patrick

  • What is the best way to export the data out of BW into a flat file on the S

    Hi All,
    We are BW 7.01 (EHP 1, Service Pack Level 7).
    As part of our BW project scope for our current release, we will be developing certain reports in BW, and for certain reports, the existing legacy reporting system based out of MS Access and the old version of Business Objects Release 2 would be used, with the needed data supplied from the BW system.
    What is the best way to export the data out of BW into a flat file on the Server on regular intervals using a process chain?
    Thanks in advance,
    - Shashi

    Hello Shashi,
    some comments:
    1) An "open hub license" is required for all processes that extract data from BW to a non-SAP system (including APD). Please check with your SAP Account Executive for details.
    2) The limitation of 16 key fields is only valid when using open hub for extracting to a DB table. There's no such limitation when writing files.
    3) Open hub is the recommended solution since it's the easiest to implement, no programming is required, and you don't have to worry much about scaling with higher data volumes (APD and CRM BAPI are quite different in all of these aspects).
    For completeness, here's the most recent documentation which also lists other options:
    http://help.sap.com/saphelp_nw73/helpdata/en/0a/0212b4335542a5ae2ecf9a51fbfc96/frameset.htm
    Regards,
    Marc
    SAP Customer Solution Adoption (CSA)

  • Error Loading Data into a flat file

    I am recieving the following error when loading data into a flat file from a flat file. SQL 2005 is my back end DB. If I cut the file iin half approx 500K rows my ODI interface works fine. Not sure what to look at.. I rebuit the interface which before was just dying giving no error and now I am getting this.
    Thanks
    java.lang.Exception
         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.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)

    Figured it out, found similar post that stated changing the HEAP size
    Increase the page size in odiparams.bat in the bin folder and restart Designer.
    For eg:
    set ODI_INIT_HEAP=128m
    set ODI_MAX_HEAP=1024m

  • Output report data to excel file format or csv format

    Is there any way to save softcopy of report output to excel file format or csv format.

    Hi,
    Regarding csv file format, i have no issues. The file is generating without any issues in using oracle reports without using any PL/SQL code.
    My requirement is to design oracle reports to generate excel (.xls) file with multiple worksheets. Each sheets are having many data and graphs(chart).
    Using oracle reports alone, how to achieve this.
    In oracle reports 10g 1.2.0 version, I tried by creating .rdf file but, it is generating single worksheet only.
    In oracle reports 10g 1.2.0 ver, I tried by creating .jsp file. For this first i am creating excel template about how my ouput column headings all that going to be with one sample hard coded data and save the excel file as web page.
    Eg employee.html.
    Next open the html file in oracle reports builder and double click the websource now, you will see the jsp tags, html and xml tags. Now include the contentType="application/vnd.ms-excel " and charset also.
    Next, include the <rw:foreach id="G_EMPNO_1" src="G_EMPNO">
    here insert the fieldl for each column by removing the hard coded values.
    close the tag
    </rw:foreach>
    Save the file as .jsp and deploy it in oc4 enabled folder (say, devsuite_home/reports/j2ee/reports_ids/web
    Start the oc4J server
    Run it in the browser http://server:port/reports/emp.jsp?useride=uid/pwd@db
    It is invoking the Microsoft excel with 3 sheets default and my emp table output in the first page.
    We can save this output file as .xls file by clicking file -> save as.
    1) The question is, it is working fine with Microsoft excel 97-2003 version. But for excel 2007, i am not able to create single html file like how 2003 save web page option.
    2) I found this in oracle getting started demo
    http://www.oracle.com/technology/products/reports/htdocs/getstart/demonstrations/index.html
    Which is more useful. This is what i am looking for.
    I done that in excel 2003 as per demo. But excel 2007 with reports 10g issues.
    Is there any demo for 10g with excel 2007
    3) For most of excel issues working fine with excel 2003 and 10g. But excel 2007 with 10g reports are issues.
    I want the excel output from oracle reports with multiple worksheet similar to the above demo.
    Thank you.

  • Flat file format - importing vs typing it out

    Hi.  I've heard there is a way to import the format (rather that typing it out in connection mgr) of a fixed width flat file.  What r the general steps or where is there a set of instructions online?  I generally have a txt doc with column
    names (lots of them) , widths etc that I would use for import and could easily transfer them to a spreadsheet if necessary.   So far the word import is bringing up a lot of unwanted subject matter in my web searches.   I am spending a lot
    of time typing out flat file formats in conn mgrs and am thinking it may be worth a look at ssis's ability to "import" a format.   We generally land our data in "untyped" staging tables 1st so ssis could assume everything is string.  
    I dont really want to read my records as one long string and parse them later.

    thx.   I suppose I can write and share with the community some general t-sql that generates the following but would like to know a couple of things. 
    First, is any old guid ok in each of the places where a guid is indicated?  I would generate a new one for each guid.
    Second, what is the locale id?
    Of course i would only paste the results in a pkg (dtsx file) that doesnt reference the cols (beyond the connection stuff) yet.
    What gotchtyas am I looking at if i try this with the intention of pasting the generated code over the top of what ssis already generated (inside the dtsx file) in a one column connector created the usual way?
    <DTS:ConnectionManagers>
    <DTS:ConnectionManager
    DTS:refId="Package.ConnectionManagers[Flat File Connection Manager]"
    DTS:CreationName="FLATFILE"
    DTS:Description="ZZZZZZ"
    DTS:DTSID="{some guid}"
    DTS:ObjectName="Flat File Connection Manager">
    <DTS:PropertyExpression
    DTS:Name="ConnectionString">@[User::fileName]</DTS:PropertyExpression>
    <DTS:ObjectData>
    <DTS:ConnectionManager
    DTS:Format="FixedWidth"
    DTS:LocaleID="1033"
    DTS:HeaderRowDelimiter="_x000D__x000A_"
    DTS:RowDelimiter=""
    DTS:TextQualifier="_x003C_none_x003E_"
    DTS:CodePage="1252"
    DTS:ConnectionString="c:...">
    <DTS:FlatFileColumns>
    <DTS:FlatFileColumn
    DTS:ColumnDelimiter=""
    DTS:ColumnWidth="2"
    DTS:MaximumWidth="2"
    DTS:DataType="129"
    DTS:ObjectName="XXXXX"
    DTS:DTSID="{some other guid}"
    DTS:CreationName="" />
    <DTS:FlatFileColumn
    DTS:ColumnDelimiter=""
    DTS:ColumnWidth="2"
    DTS:MaximumWidth="2"
    DTS:DataType="129"
    DTS:ObjectName="YYYYYY"
    DTS:DTSID="{some other guid}"
    DTS:CreationName="" />

  • PO Idoc in Flat File format

    Hi all,
    I am able to generate the PO Idoc in Flat file format using standrad FM IDOC_OUTPUT_ORDERS. but the Flat file appearing is not in a appropriate format.
    I'm looking to generate the Flat file in such a way that there will be only one line for each Idoc Segment.( with Line termination).
    How to Achieve this.
    Regards,
    S Anand

    Resolved.
    we can use CG3Y transaction.
    Regards,
    S Anand

  • Export records into a flat file

    Hi...
    I have to export some tables into a flat file. The output must be like this:
    insert into table (col1, col2.....) value (one, two......)
    insert into table (col1, col2.....) value (one, two......)
    insert into table (col1, col2.....) value (one, two......)
    how can I do that.......with PLSQL code?
    Thanks
    Message was edited by:
    marckcos

    I got this package : and I got the follwing error:
    4:35:19 PM Execution failed: ORA-20011: GENERATE_STMT Error in populating file. Message: ORA-00904: "CHANGE_DATATYPE": invalid identifier
    What can I do?
    CREATE OR REPLACE PACKAGE BODY UTILITY
    IS
    -- VARIABLES USED by PROCEDURE generate_stmt
    -- File Related PACKAGE Variable
    cmn_file_handle UTL_FILE.file_type;
    PROCEDURE close_file
    IS
    BEGIN
    UTL_FILE.FCLOSE (cmn_file_handle);
    EXCEPTION
    WHEN UTL_FILE.INVALID_FILEHANDLE THEN
    RAISE_APPLICATION_ERROR(-20003, 'File handle was invalid');
    WHEN UTL_FILE.INVALID_PATH THEN
    RAISE_APPLICATION_ERROR(-20004, 'Invalid path for file');
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR(-20005, 'CLOSE_FILE Error in creating file. Message: ' || SQLERRM);
    END close_file;
    PROCEDURE open_file (
    prm_output_folder IN VARCHAR2,
    prm_output_file IN VARCHAR2)
    IS
    BEGIN
    cmn_file_handle := UTL_FILE.FOPEN (prm_output_folder, prm_output_file, 'a', 32767);
    EXCEPTION
    WHEN UTL_FILE.INVALID_FILEHANDLE THEN
    close_file;
    RAISE_APPLICATION_ERROR(-20000, 'File handle was invalid');
    WHEN UTL_FILE.INVALID_PATH THEN
    close_file;
    RAISE_APPLICATION_ERROR(-20001, 'Invalid path for file');
    WHEN OTHERS THEN
    close_file;
    RAISE_APPLICATION_ERROR(-20002, 'OPEN_FILE Error in creating file. Message: ' || SQLERRM);
    END open_file;
    FUNCTION change_datatype (
    prm_value IN VARCHAR2,
    prm_data_type IN VARCHAR2)
    RETURN VARCHAR2
    IS
    BEGIN
    IF prm_value IS NULL THEN
    RETURN ('NULL');
    END IF;
    IF prm_data_type = 'C' THEN
    IF INSTR(prm_value, CHR(10)) > 0 THEN
    RETURN ('REPLACE(' || '''' || REPLACE (prm_value, CHR(10), CHR(977)) || '''' || ', CHR(977), CHR(10))');
    END IF;
    ELSIF prm_data_type = 'D' THEN
    RETURN ('TO_DATE(' || '''' || prm_value || '''' || ', ' || '''' || 'DD-MON-YYYY HH24:MI:SS' || '''' || ')');
    ELSIF prm_data_type = 'N' THEN
    RETURN (prm_value);
    END IF;
    RETURN ('''' || prm_value || '''');
    EXCEPTION
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR(-20002, 'CHANGE_DATATYPE Error in Converting DataType. Message: ' || SQLERRM);
    END change_datatype;
    PROCEDURE generate_stmt (
    prm_table_name IN VARCHAR2,
    prm_where_clause IN VARCHAR2,
    prm_output_folder IN VARCHAR2,
    prm_output_file IN VARCHAR2)
    IS
    TYPE ref_cols IS REF CURSOR;
    mmy_ref_cols ref_cols;
    mmy_column_name VARCHAR2(100);
    mmy_column_data_type VARCHAR2(1);
    mmy_col_string VARCHAR2(32767);
    mmy_query_col_string VARCHAR2(32767);
    BEGIN
    IF prm_table_name IS NULL OR
    prm_output_folder IS NULL OR
    prm_output_file IS NULL THEN
    RAISE_APPLICATION_ERROR(-20012, 'Invalid Argument Passed');
    END IF;
    OPEN mmy_ref_cols
    FOR SELECT LOWER(column_name) column_name,
    DECODE (data_type, 'VARCHAR2', 'C', 'CHAR', 'C', 'LONG', 'C', 'NUMBER', 'N', 'DATE', 'D') data_type
    FROM user_tab_columns
    WHERE table_name = UPPER(prm_table_name)
    ORDER BY column_id;
    LOOP
    FETCH mmy_ref_cols INTO mmy_column_name, mmy_column_data_type;
    EXIT WHEN mmy_ref_cols%NOTFOUND;
    mmy_col_string := mmy_col_string || mmy_column_name || ', ';
    IF mmy_column_data_type = 'D' THEN
    mmy_query_col_string := mmy_query_col_string || 'change_datatype(' || 'TO_CHAR(' || mmy_column_name || ', ' || '''' || 'DD-MON-YYYY HH24:MI:SS' || '''' || ')' || ', ' || '''' || mmy_column_data_type || '''' || ') || ' || '''' || ', ' || '''' || ' || ';
    ELSIF mmy_column_data_type IN ('N', 'C') THEN
    mmy_query_col_string := mmy_query_col_string || 'change_datatype(' || mmy_column_name || ', ' || '''' || mmy_column_data_type || '''' || ') || ' || '''' || ', ' || '''' || ' || ';
    END IF;
    END LOOP;
    CLOSE mmy_ref_cols;
    IF mmy_col_string IS NOT NULL AND
    mmy_query_col_string IS NOT NULL THEN
    IF NOT UTL_FILE.IS_OPEN(cmn_file_handle) THEN
    open_file(prm_output_folder, prm_output_file);
    END IF;
    mmy_col_string := 'INSERT INTO ' || LOWER(prm_table_name) || ' (' || CHR(10) || CHR(9) || CHR(9) || mmy_col_string;
    mmy_col_string := RTRIM (mmy_col_string, ', ');
    mmy_col_string := mmy_col_string || ')' || CHR(10) || 'VALUES ( ' || CHR(9);
    mmy_query_col_string := RTRIM (mmy_query_col_string, ' || ' ||'''' || ',' || '''' || ' || ') || ' one_pare';
    OPEN mmy_ref_cols
    FOR ' SELECT ' || mmy_query_col_string ||
    ' FROM ' || prm_table_name ||
    ' ' || prm_where_clause;
    LOOP
    FETCH mmy_ref_cols INTO mmy_query_col_string;
    EXIT WHEN mmy_ref_cols%NOTFOUND;
    mmy_query_col_string := mmy_query_col_string || ');';
    UTL_FILE.put (cmn_file_handle, mmy_col_string);
    UTL_FILE.put_line (cmn_file_handle, mmy_query_col_string);
    END LOOP;
    CLOSE mmy_ref_cols;
    If UTL_FILE.IS_OPEN(cmn_file_handle) THEN
    close_file;
    END IF;
    END IF;
    EXCEPTION
    WHEN UTL_FILE.INVALID_FILEHANDLE THEN
    IF mmy_ref_cols%ISOPEN THEN
    CLOSE mmy_ref_cols;
    END IF;
    close_file;
    RAISE_APPLICATION_ERROR(-20009, 'File handle was invalid');
    WHEN UTL_FILE.INVALID_PATH THEN
    IF mmy_ref_cols%ISOPEN THEN
    CLOSE mmy_ref_cols;
    END IF;
    close_file;
    RAISE_APPLICATION_ERROR(-20010, 'Invalid path for file');
    WHEN OTHERS THEN
    IF mmy_ref_cols%ISOPEN THEN
    CLOSE mmy_ref_cols;
    END IF;
    close_file;
    RAISE_APPLICATION_ERROR(-20011, 'GENERATE_STMT Error in populating file. Message: ' || SQLERRM);
    END generate_stmt;
    END utility;
    ############################################################

  • How to split column wise into separate flat files in ssis

    IN SSIS...
    1.---->I have a sales table country wise regions  like (india, usa, srilanka) ....
    india usa
    srilanka
    a b
    c
    d e
    f
    so i want output like in
    flat file1.txt has india               flat file2.txt has usa             flat file3.txt has srilanka
         a b
    c
         d e
    f
    2.----->i dont know how many regions in my table....dynamically split into separate flat files ....
     pls help me.....thank u

    I think what you can do is this
    1. Do a query based on UNPIVOT to get the data as rows instead of columns
    For that you can use a query like this
    IF OBJECT_ID('temp') IS NOT NULL DROP TABLE temp
    CREATE TABLE temp
    Country varchar(100),
    Val decimal(25,5)
    DECLARE @CountryList varchar(3000),@SQL varchar(max)
    SELECT @CountryList = STUFF((SELECT ',[' + Column_Name + ']' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '<SalesTableNameHere>' FOR XML PATH('')),1,1,'')
    SET @SQL= 'SELECT * FROM <SalesTableNameHere> t UNPIVOT (Val FOR Country IN (' + @CountryList + '))p'
    INSERT temp
    EXEC (@SQL)
    Once this is done you'll get data unpivoted to table
    Then you can use a execute sql task with query like above
    SELECT DISTINCT Country FROM Temp
    Use resultset option as full resultset and store the result to an object variable
    Then add a ForEach loop container with ADO enumerator and map to the object variable created above. Have variables inside loop to get inidvidual country values out.
    Inside loop place a data flow task. Use a variable to store source query , make EvaluateAsExpression true for it and set Expression as below
    "SELECT Val FROM Temp WHERE Country = " + @[User::LoopVariable]
    Where LoopVariable is variable created inside loop for getting iterated values
    Inside data flow task place a oledb source, choose option as  SQL command from variable and map to the above query variable.
    Link this to flat file destination create a flat file connection manager. Set a dynamic flat file connection using expression builder. Make it based on a variable and set variable to increment based on loop iteration
    The core logic looks similar to this
    http://visakhm.blogspot.ae/2013/09/exporting-sqlserver-data-to-multiple.html
    dynamic file naming can be seen here
    http://jahaines.blogspot.ae/2009/07/ssis-dynamically-naming-destination.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Regarding conversion of PDF Reports into .XLS or .XLSX format report in SAP MII

    Hi,
    Is there any way out within the scope of SAP MII to convert PDF Reports into .XLS or .XLSX formatted output.
    It is possible to convert PDF Reports into .CSV format through SAP MII, but I am not sure about .XLS format.
    Can anyone help me doing this?

    Hi Sue,
    I would like to assist! I just reached out to you directly. It will come from: [email protected]
    Let's see what we can figure out!
    Kind regards, Stacy

Maybe you are looking for

  • Migration from 10.2.8 to SL

    I have been using my imac running 10.2.8 for 8 years!! A very nice friend knew I needed a new computer and surprised me with a brand new imac 22" running SL. Imagine my surprise! But, now this is my issue, I have all this "stuff" on my old comp (itun

  • RH8 browse sequence based on TOC not working as expected

    I have several standalone projects for which RoboHelp's browse sequence tool correctly generates the browse sequence based on the TOC using a book level of 0 (zero) so that it picks up everything in order.  If a project has books A and B (which are n

  • Fetch field names & Description for Table

    Hi,    My requirement is if i enter the Table name i have to get all the field names and description .Please tell me how to do. Thanks, Mohan

  • TNS couldpt resolve service name

    Hi all, I installed Orale8i on win 2000 server.Later i deinstalled and installed Oracle 9.0.2 on Win 2000 server.I am successfully logging into Oracle 9i through SQL Plus.If i try to log in Oracle thru TOAD getting following error Building Oracle HOM

  • Open hub destination of text and attribute for Functional Area

    Hi Expert I have a requirement to accommodate both attribute ( 0FUNCT_LOC_ATTR)  and text ( 0FUNCT_LOC_TEXT ) for functional area in open hub destination .For this a DSO has been created from both 0FUNCT_LOC_ATTR, 0FUNCT_LOC_TEXT data sources .Proble