EXPORT to text or CSV format from a form

Dear all,
Could you please help me to export the data from my form to a text file or to a csv format. I am very new to forms.
i need to export the data from the oracle form to a text file or CSV file format.
I had created form named as form1.
In form1 i have a block named as block1. In this block i have 4fields as field1, field2, field3, field4. using a tabe1 which has the same 4fields.
This form is in tabular form.
Example:
In the form i have data like as below and i got this data from table1. I used a execute query to get the data from the table into this form.
field1 field2 field3 field4
raj 1234 abc 510
dil 777 hi 787
Now my requirement is i need to export this data into a file, when i click on a button(Export) it has to browse for a folder on my desktop and i have to name the filename to save the data.
Please help me.
Thanks in advance.

This should be almost same as in your previous task for import data.
Try this:
DECLARE
   v_file_name   VARCHAR2 (100);
   v_file        client_text_io.file_type;  
   v_delimiter VARCHAR2(1) := ',';
BEGIN
   v_file_name := webutil_file.file_save_dialog;
   v_file := client_text_io.fopen (v_file_name, 'w');
   GO_BLOCK ('block1');  
   FIRST_RECORD;
   LOOP
        client_text_io.PUT_LINE(v_file, :block1.field1||v_delimiter||:BLOCK1.field2||v_delimiter||:BLOCK1.field3||v_delimiter||:BLOCK1.field4);
    IF :SYSTEM.LAST_RECORD = 'TRUE' THEN
         EXIT;
    END IF;     
    NEXT_RECORD;
   END LOOP;
   client_text_io.fclose (v_file);
END;

Similar Messages

  • How can I export the universe  to CSV format in Rational      (java)

    How can I export the universe to CSV format in Rational ,please give me one demo .thanks!!

    There's no direct access to an Universe from Java - Universes do have an SDK, but it's COM-based.
    If what you want is to retrieve data from the Universe, what you can do is create a Web Intelligence document reporting off that Universe, create a Query with the data you want from the Universe, then use the ReportEngine (REBean) SDK to retrieve the ResultSet from the Query - note that there's no CSV export option, so you'd have to walk through the ResultSet and write to an CSV yourself.
    Sincerely,
    Ted Ueda

  • Exporting Cystal Reports into CSV format

    Hi,
    I wanted to export some reports in CSV format with following options checked in Crystal 2008:
    These options are given under separated Values exports options:
    1. Mode = Standard Mode
    2. Isolate Report/Page sections and Isolate Group Scctions check boxes checked
    I could not find properties in CR object to set as per above requirement in VB6 code.
    I am searching these properties in  ReportObj.ExportOptions
    Can anyone please advise in this regard.
    Thanks in advance.
    Regards-
    Bhoopendra

    Hi Bhoopendra,
    The Report Designer Component (RDC) COM component has been retired with the release of CR2008. Using CR2008 in VB6 is not supported, and it's not expected to work.
    The recommended upgrade path is to migrate to the Crystal Reports .NET SDK. You can find getting started information in the [.NET Development - Crystal Reports|SAP Crystal Reports, version for Visual Studio; forum.
    Sincerely,
    Dan Kelleher

  • Exporting JSP FIle to CSV Format

    I have a JSP report.I want to export this report into CSV(Comma Seperated Values) Format.Hot can I do this?

    Please see this previous thread and in the future try searching the forums before posting your question. Someone may have already asked a similar question.
    http://forum.java.sun.com/thread.jsp?forum=136&thread=542107

  • Download into CSV format from internal table

    Hi,
      I would like to download my internal table records in CSV format without any manual formating.
    It is easy to concatenate internal table fields into a string with ',' seperator. But I would like to do in a better way that this becasue of more number of fields in my internal table.
    Could you someone help me in this, I have searched in this form for help I found few function modules which did not help me.
    SAP_CONVERT_TO_CSV_FORMAT / LIST_DOWNLOAD .
    Prabhu Rajesh.

    Sravan,
    type-pools: truxs.
    DATA : BEGIN OF itab OCCURS 0,
    name1(10),
    name2(10),
    END OF itab.
    DATA : itab1 TYPE truxs_t_text_data.
    DO 10 TIMES.
      itab-name1 = 'Prabhu'.
      itab-name2 = 'Rajesh'.
      APPEND itab.
      CLEAR : itab.
    ENDDO.
    LOOP AT itab.
      WRITE:/ itab-name1, itab-name2.
    ENDLOOP.
    CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
      EXPORTING
        i_field_seperator          = ';'
      I_LINE_HEADER              =
      i_filename                 =
      I_APPL_KEEP                = ' '
      TABLES
        i_tab_sap_data             = itab
    CHANGING
       I_TAB_CONVERTED_DATA       = itab1
    EXCEPTIONS
      CONVERSION_FAILED          = 1
      OTHERS                     = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Static text is not appearing from the form designer

    Hi,
    We are using Adobe Live Cycle designer 6.0 to design print forms.
    The problem we are facing is, sometimes static text element created on the Body Page of the form does not appear at all(when we open the form designer after creating the Static text element), though we can find the static text in XML Source of the form.
    For example, if a text element is created with text "XYZ" on body page, it is not visible on the body page whereas the XML Source  contains "XYZ" in it.
    What can be the problem ?
    Regards,
    V Joshi.

    Hi Nikhil,
    I tried using static text from Standard Library and ISR library too. Still the text disappears when i activate the form.
    More inputs on this will be helpful.
    Also, we are using the Form Designer Version 6.0 which is in-built component of NWDS 2.0.16 installation.
    Regards,
    V Joshi.

  • How Export to CSV format from WDA

    Hi masters!
    i need to export an ALV table to CSV fromart
    i use the following code
      CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
        EXPORTING
          i_field_seperator    = ';'
        TABLES
          i_tab_sap_data       = lt_t_book
        CHANGING
          i_tab_converted_data = lt_t_book_cvs
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.
      IF sy-subrc = 0.
        "Download data using GUI_DOWNLOAD
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            filename = 'C:\Documents and Settings\lucas.mena\Desktop\csv_test.txt'
            filetype = 'ASC'
            CODEPAGE = LC_1160
          TABLES
            data_tab = lt_t_book_cvs.
      ENDIF.
    as a result, i have received the following error message: Error in Control Framework
    thanks,
    Lucas

    Hello Luca,
    1) First read the table's data into an internal table.
    2) Convert the internal table data to STRING format.
    3) Now convert it into tab separated format as how desired.
    4) Convert this STRING format to XSTRING format
    5) Make use of the attach_file_to_response method.
    METHOD onactionon_submit .
      DATA: lv_node TYPE REF TO if_wd_context_node,
            lt_mara TYPE if_main=>elements_mara,
            wa_mara TYPE if_main=>element_mara,
            lead_selection_index TYPE i,
            mara_string  TYPE string,
            mara_xstring TYPE xstring.
      lv_node = wd_context->get_child_node( name = 'MARA' ).
      CALL METHOD lv_node->get_static_attributes_table
        IMPORTING
          table = lt_mara.
      LOOP AT lt_mara INTO wa_mara.
        CONCATENATE mara_string
                    wa_mara-matnr
                    wa_mara-ersda
                    wa_mara-ernam
                    wa_mara-matkl
                    wa_mara-meins
                    cl_abap_char_utilities=>cr_lf INTO mara_string
                                            SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
      ENDLOOP.
    ** Now you need to add the column headers & the desired extra information through coding to
    ** mara_string
      CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
        EXPORTING
          text   = mara_string
        IMPORTING
          buffer = mara_xstring.
      CL_WD_RUNTIME_SERVICES=>attach_file_to_response(  i_filename  = 'TEMP.XLS'
                                                        i_content   = mara_xstring
                                                        i_mime_type = 'EXCEL' ).
    ENDMETHOD.
    Regards,
    Uday

  • Automate several table download in csv format from Oracle database

    Hi All,  I am new to Oracle database usage and currently using SQL Developer and PL/SQL for my day to day work.  Please help me with the below.
    Currently I am querying a table for few columns and using EXPORT facility from Query Result tab.  However, I want to do this for several tables.  If possible I would like to keep all these table downloads as overnight job.  Is there a way to do this?
    Thanks in advance.

    I guess you should post this in the SQL Developer forums. However; if you don't mind using other tools I have an idea: recently a feature has been added to the free mod_owa module to output a ref cursor in various formats; e.g. in CSV:
    https://oss.oracle.com/projects/mod_owa/dist/documentation/modowa.htm#_refcur
    so in essence you'd need a stored procedure returning ref cursors and an apache with the module configured. You'd simply have to do HTTP Requests and store the response in a file.
    cheers

  • Exporting table data in csv format

    hi all...
    my schema has total 672 tables and i need to export thedatas of all tables in separate csv files(i.e for one table there will be one csv)..
    I am using plsql developer...but i got no tool to do that..
    Manually doing that is next to impossible for all the tables...
    Is there any way out???
    please help...

    hi...is it possible to do this using simple cursor...
    i have tried this...but its not working...
    SQL> spool d:\abcd.csv
    Started spooling to d:\abcd.csv
    SQL>
    SQL> declare
    2 cursor c1 is select table_name from user_tables;
    3 v_c1 c1%rowtype;
    4
    5 begin
    6 open c1;
    7 loop
    8 fetch c1 into v_c1;
    9 exit when c1%notfound;
    10 select * from v_c1.table_name;
    11 end loop;
    12 close c1;
    13
    14 end;
    15 /
    declare
    cursor c1 is select table_name from user_tables;
    v_c1 c1%rowtype;
    begin
    open c1;
    loop
    fetch c1 into v_c1;
    exit when c1%notfound;
    select * from v_c1.table_name;
    end loop;
    close c1;
    end;
    ORA-06550: line 11, column 20:
    PL/SQL: ORA-00942: table or view does not exist
    ORA-06550: line 11, column 1:
    PL/SQL: SQL Statement ignored
    SQL>

  • Export multiple entries in CSV format - Adobe Captivate Results Analyzer

    I'm currently developing and testing a quiz in Captivate 8, which I have set up with the assistance of my IT colleagues to report to an internal server.
    All appears to be working correctly with regard to capturing the data. I can access and read the data using Adobe Captivate Quiz Results Analyzer 1.5.
    I note that I can see the individual responses and I can drill down to see the details of the interactions - interaction type, correct answer, student answer etc.
    My issue is that it seems that you can't batch export this detailed information for multiple participants when I use the 'Export to CSV' function. It appears to only allow you to export the data for each individual that you have drilled down into. Given that I have several hundred participants that isn't going to work.
    Can someone tell me if this is a limitation of Adobe Captivate Results Analyzer or is there a way to do this using this tool?
    Thanks

    Hi there, I have similar issue that I have explained in this post. Any ideas please?
    Thank you
    B

  • Problem exporting to mpeg-2 DVD format from Premiere Pro CSF

    I just purchased Premiere Pro CS5 and have been going through the video tutorials on Lynda.com.  I have created a short video sequence and am trying to export it to mpeg-2 DVD format using the default "MainConcept MPEG Video" codec.  After the video is exported to my hard drive and imported into Encore, I see all of these green lines and green shading in the video I just created in Premiere that wasn't there when I rendered my sequence in Premiere prior to export.  Does anyone know why these green lines and shading are added to the video?  I figure I must be using the wrong export settings in Premiere Pro. 
    I've also tried to export this video segment to Quicktime .mov format using the default DV25 NTSC codec, but when I do this the final exported video has audio only and the video is black (I made sure there was a check in the Export Video check box). 
    I have a Macbook with 2.2 GHz Intel Core 2 Duo processor, 4 GB 667 MHz DDR2 SDRAM and Max OS X version 10.6.3 (Snow Leopard) with all appropriate updates.  Does anyone have any ideas on how to address this issue or where I can read up on appropriate combinations of video formats and codecs?

    Hi, thanks for the answer.  Yes, I just tried importing the Premiere project directly into Encore using the dynamic link function and it worked just fine.  Once I made some changes to the to the Premiere project; however, the green lines appeared when i would preview the project in Encore.  Based on your feedback, I won't worry about the extra green lines though and will attempt to build another DVD.  Like you said, I think the key is to import the Premiere project into Encore using the dynamic linking.

  • Cannot export crystal report in excel format from crystal report viewer

    This problem occurs on only one workstation.
    Open Advanced Reports > Enter workorder # > Click on 'workorder work(uninvoiced)' > Work order opens.
    Click on icon "Export report"
    Save as type: change to .xls
    Error: Crystal Report Windows Forms Viewer. Error in file
    SAP.......rpt:
    Error detected by export DLL:
    Export failed.

    Try adding c:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86 to your windows enviroment variable PATH then restart.

  • SAP Standard Text (SO10) Character format in Adobe forms

    Hi Friends
    I created a standradrd text using 'S010' with Few character formats like 'bold' and 'italic' but when created 'Inlude text' element in adobe forms i could see only text coming in pdf output but not the formatting. Is there any way i could get the text character formatting also from standard text to adobe?. I appreciate your help.
    Thanks

    Total Posts:  534 
    Total Questions:  183 (4 unresolved) 
    Forum Points:  0 
    You ask a lot, but never helped a living soul. Why would anybody help you/ do your job?
    By the way the same question was asked a zillion times, so if you would care to search you would not receive this comment.
    Otto

  • Change 'new form submission' text when receiving email from contact form.

    Hi,
    One of our clients has asked us to change the text they receive when they get an email from their contact form.
    It currently says: 'new form submission'
    they want it to say: 'West of the Moon ~ Ayr ~ Website Enquiry'
    We have tried changing the name of the form but this only changes the subject in the email not the wording on the email. Is there any way to do this?

    Hi Richard,
    Please check the php script to which the web form submits to and then open that with a text editor and edit the verbiage that you want to there.
    PS - You will need to make these changes after every export from Muse as Muse will override them on every export/upload.
    - Abhishek Maurya

  • Calling report in JSP format from oracle forms...

    I created a report and save it in 2 formats (.rdf and .jsp)...
    Now instead of using the rdf format(which opens in a pdf inside a web browser) ...i want to call the report in jsp format

    Suhail,
    You can even call a .rdf report in HTML format. You have to set the Report Destination Format to html.
    For calling the jsp report , you don't have to do that differently either. Place your jsp report in the REPORTS_PATH directory.
    Then set your report object to that of html destination.

Maybe you are looking for

  • SharePoint 2010 Web Analytics

    Good Morning, i need to know where sharepoint gets the usernames for the web analytics reports (for example "top visitors"). I know there is a complex sequence of timer jobs to generate the reports. Does anybody know if the username is imported via t

  • EAP-FAST Security level

    Hi all, I use EAP-FAST in my network and I have some questions about it. 1) is there any vulnerability detected with EAP-FAST? 2) Can I restrict the establishment two or more simultaneous sessions using the same account and same PAC? how 3) Can I use

  • Finding nemo app no longer available- says server not available - why

    Why can't I access my finding nemo app anymore. It says server not available

  • Problem in configuring my Laptop to run JSP files

    I am having problem in testing my finished JSP files in my laptop. Everytime I run my JSP, it continues requesting for internet connections. It cannot run in an offline modus. I am using Mindows 2000, JDeveloper 3.2.3 and Oracle 9i database.I install

  • Photoshop Elements 11 Costco speciaal edition

    I received a copy of photoshop elements 11 but nothing happens when I put the dvd in the dvd drive.  The link in the documentation no longer exists.  (www.adobe.com/go/learn_installpse11_en.)  what do I do to get this loaded?