Query result in application server as a .CSV file

HI
Can any one tel me how can i place the query result in application server as a .CSV file.
when am executing WRITEQUERY program it asking query name and displaying result in excel sheet, i don't what is next step to keep file in app server.
read writequery prog,it is genrated in excel sheet, now i need to send that data to application server path in csv format
actually i am not able to get the internal table in writequry where the query data is stored.
please provide me the sample code i can understand. plz.
plz do favour for me, take this high priority and asap.
Thanks a lot

HI,
Actually i don't want how to create abap querey,
My requirment is,  WRITEQUERY program  wherenever we r excuting it vil display qurery data in excel format,
now i don't want any excel format display,  I need that data, should go to application server in .CSV format.
Actually i am not understanding writequere program, in that which internal table i have to pass application server.
PLz give me reply anyone
Help me out .

Similar Messages

  • Send Query Results to Application server in CSV format

    HI All,
    I need to schedule a query on a regular basis and send the results to Apllication server in csv format(rows will be more than 65,000).
    I tried RSCRM_BAPI transaction but i think it has lot of restrictions like, cannot use texts, calculated keyfigures, etc. so cannot use this.
    cannot use Infospoke since there are calculated keyfigures in the query.
    Information Broadcasting is not setup in my system
    Tried WRITEQUERY but it only send the results to Spool, special handling is needed to move the data from spool to Appl. server.
    is there any other way i can achive this, is it even possible?
    Thanks,
    S.B.

    I dont know if this helps.
    1)You can save the file as a normal CSV file on your desktop.
    2) and Based on the ABAP code using ( OPEN DATASET and CLOSE DATASET  statements) You can put your file into the application server
    but i am not sure if you can use this methodilogy for an automated and continous process
    Regards
    satish

  • How to send query to an application server?

    hello everybody
    I'm working on a project in which i've implemented a presentation layer
    for rich client (with java swing)
    the issue now is how to send a query to the application server
    i have the choice between :
    -XML
    -EJB
    -WEB SERVICES
    -RMI
    and i must chose the best method and justify it
    could u please help me
    thank u and have a nice a day

    Hello,
    I'm sorry but this is not a swing related subject.

  • Move file to application server  or delete a file from application server

    Hi all
    I have one application in which if succeful uploading  of BMP file  from application server is not  done , File has to move to another folder like 'ERROR' Folder
    but i am unable to do that.
    here is the code:
    CONDENSE g_t_ws_move.
    CALL 'SYSTEM' ID 'COMMAND' FIELD g_t_ws_move
      ID 'TAB'     FIELD g_t_ws_command_line[].
    where
    <b>G_T_WS_MOVE= 'MOVE /Y /sapin/XVZ/journeyplan/0000000.BMP /tmp/0000000.BMP'
    means  i have to move 000000.bmp file from XVZ to tmp directory ,</b>

    Hello Neetu
    Alternatively you could use a combination of the following function modules:
    - EPS_FTP_PUT
    - EPS_DELETE_FILE
    Regards
      Uwe

  • How to send the report output to the application server in a excel file

    Hello,
    how to send the report output to the application server in a excel file.
    and the report runs in background.
    Thanks in advance.
    Sundeep

    Dear Sundeep.
    I'm providing you with the following piece of code ... Its working fine for me ... hopefully it suits your requirement ...
    D A T A D E C L A R A T I O N *
    TYPES: BEGIN OF TY_EXCEL,
    CELL_01(80) TYPE C,
    CELL_02(80) TYPE C,
    CELL_03(80) TYPE C,
    CELL_04(80) TYPE C,
    CELL_05(80) TYPE C,
    CELL_06(80) TYPE C,
    CELL_07(80) TYPE C,
    CELL_08(80) TYPE C,
    CELL_09(80) TYPE C,
    CELL_10(80) TYPE C,
    END OF TY_EXCEL.
    DATA: IT_EXCEL TYPE STANDARD TABLE OF TY_EXCEL,
    WA_EXCEL TYPE TY_EXCEL..
    E V E N T : S T A R T - O F - S E L E C T I O N *
    START-OF-SELECTION.
    Here you populate the Internal Table.
    Display - Top of the Page.
    PERFORM DISPLAY_TOP_OF_PAGE.
    E V E N T : E N D - O F - S E L E C T I O N *
    END-OF-SELECTION.
    SET PF-STATUS 'GUI_STATUS'.
    E V E N T : A T U S E R - C O M M AN D *
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'EXPORT'.
    Exporting the report data to Excel.
    PERFORM EXPORT_TO_EXCEL.
    ENDCASE.
    *& Form DISPLAY_TOP_OF_PAGE
    text
    --> p1 text
    <-- p2 text
    FORM DISPLAY_TOP_OF_PAGE .
    SKIP.
    WRITE: /05(128) SY-ULINE,
    /05 SY-VLINE,
    06(127) 'O R I C A'
    CENTERED COLOR 1,
    132 SY-VLINE.
    WRITE: /05(128) SY-ULINE,
    /05 SY-VLINE,
    06(127) 'Shift Asset Depreciation - Period/Year-wise Report.'
    CENTERED COLOR 4 INTENSIFIED OFF,
    132 SY-VLINE.
    WRITE: /05(128) SY-ULINE.
    E X C E L O P E R A T I O N
    CLEAR: IT_EXCEL[],
    WA_EXCEL.
    PERFORM APPEND_BLANK_LINE USING 1.
    WA_EXCEL-cell_02 = ' XYZ Ltd. '.
    APPEND WA_EXCEL TO IT_EXCEL.
    CLEAR: WA_EXCEL.
    WA_EXCEL-cell_02 = 'Shift Asset Depreciation - Period/Year-wise Report.'.
    APPEND WA_EXCEL TO IT_EXCEL.
    PERFORM APPEND_BLANK_LINE USING 1.
    ENDFORM. " DISPLAY_TOP_OF_PAGE
    *& Form APPEND_BLANK_LINE
    text
    -->P_1 text
    FORM APPEND_BLANK_LINE USING P_LINE TYPE I.
    DO P_LINE TIMES.
    CLEAR: WA_EXCEL.
    APPEND WA_EXCEL TO IT_EXCEL.
    enddo.
    ENDFORM.
    *& Form EXPORT_TO_EXCEL
    text
    --> p1 text
    <-- p2 text
    FORM EXPORT_TO_EXCEL .
    DATA: L_FILE_NAME(60) TYPE C.
    Create a file name
    CONCATENATE 'C:\' 'Shift_Depn_' SY-DATUM6(2) '.' SY-DATUM4(2)
    '.' SY-DATUM+0(4) INTO L_FILE_NAME.
    Pass the internal table (it_excel which is already populated )
    to the function module for excel download.
    CALL FUNCTION 'WS_EXCEL'
    exporting
    filename = L_FILE_NAME
    tables
    data = IT_EXCEL
    exceptions
    unknown_error = 1
    others = 2.
    if sy-subrc <> 0.
    message e001(ymm) with 'Error in exporting to Excel.'.
    endif.
    ENDFORM. " EXPORT_TO_EXCEL
    *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    When you click the button - Export to Excel ( GUI-Status) you'll be able to export the content of the Internal Table to an Excel file .......
    Regards,
    Abir
    Don't forget to award Points *

  • Write the results script of results log pane to XLS or CSV file with VBA.

    Hi,
    How can I write the results script of results log pane to XLS or CSV file with VBA code or something? I tried so hard but i can't.
    Thanks

    MoGas,
    This is actually not a trivial process. You need to use the results object and code it to write to your file (it is described in the help files).
    e-Tester automatically saves the results log as a text file so you may just want to stick with that for simplicity.

  • Directory in application server has multiple flat files

    Hi
    How should we know that the Directory in application server has multiple flat files.
    my requirement is, daily my program runs in batch at night. So, i  have to know are there more than 1 flat file existing in the directory.
    regards
    mac

    Try this FM,
      CALL FUNCTION 'SUBST_GET_FILE_LIST'
        EXPORTING
          dirname      = ws_filepath
          filenm       = ws_fname
        TABLES
          file_list    = i_rsfillst
        EXCEPTIONS
          access_error = 1
          OTHERS       = 2.
    Pass the path and
    say ur file name starts with ALPXXXXX
    then pass
    ws_fname =  'ALP*' .
    In the table i_rsfillst you will get all the file in directory.
    Try this through a sample prorgam ,dont try through SE37, it will show ACCESS_ERROR.
    Regards,
    Message was edited by: sreejesh purapadiath
    Message was edited by: sreejesh purapadiath

  • Tracing query generated from application server

    Hi all,
    I'm trying to trace a session which is logged in to an application server.
    The application server and database server are in a windows 2003 platform.
    When I'm trying to generate a report from the application server it seems that it generates another session and when I checked on the program column from v$session, it was executed by java.exe.
    There are 2 similiar reports that existed in the application server the other one is really fast and the other one is really slow.
    using the deprecated parameter sql_trace which I can set to true, I can always get the trace file.
    How can I trace that fast generated report that I need to compare with the slow one without using the sql_trace parameter?
    My difficulty is just that when I click on the preview button which is going to preview it to PDF, it will spawn another session and that session will execute java.exe to generate the report.
    May be any of you can give me a suggestion on the things that I need to do with this.
    Regards,
    Adhika

    Hi Finbar,
    for the slow report, I was able to see the session from v$session but for the fast report, even if I prepred the query first before running the report, I don't have enough time to check it.
    it was just to fast. so definitely the fast query has something which is really right so it can generate the query really really fast compare to the slow report.
    FYI, my office is not in the same office as the developer so there's no way I can ask them either and also, there's no way for me to comunicate directly to developer as I need to go through some levels and procedures in my company.
    Thank you,
    Adhika

  • Sending internal table data to application server as an XML file

    Hi All,
    I am trying to send the internal table data to application server which should be stored in XML format.
    I am using the following code:
    DATA:
              result TYPE xstring.
            CALL TRANSFORMATION id
            SOURCE tab = p_output-xsfdata
            RESULT XML result.
            OPEN DATASET l_xml_full_path FOR OUTPUT IN BINARY MODE.
            TRANSFER  result TO l_xml_full_path.
            CLOSE DATASET l_xml_full_path.
    And the content in the internal table is :
    3C3F786D6C2076657273696F6E3D22312E30223F3E3C736620786D6C6E733D2275726E3A736
    73796D206E616D653D22534653592D44415445223E30362F31302F323030393C2F73796D3E2
    50617961626C653C6E65772D6C696E652F3E50617274206F6620746865204E616D653C6E657
    .......and so on
    With this a file is getting created on the application server, but the data is not correct. I am getting the data something like:
    <?xml version="1.0" encoding="utf-8"?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values><TAB><item>
    PD94bWwgdmVyc2lvbj0iMS4wIj8+PHNmIHhtbG5zPSJ1cm46c2FwLWNv
    MDA6eHNmIj48c21hcnR4c2Y+PGhlYWRlcj48Z2VuZXJhbD48dmVyc2lvbj4xLjE0LjI8L3ZlcnNp
    b24PGZvcm0WkJMX1NESU5WX0xfMzwvZm9ybT48bGFuZ3VhZ2U+RU48L2xhbmd1YWdlPjxkZXZp
    Y2UUFJJTlRFUjwvZGV2aWNlPjxvdXRwdXQtZGV2aWNlPlNYU0Y8L291dHB1dC1kZXZpY2UPC9n
    ZW5lcmFsPjxwYWdlIG5hbWU9IkZJUlNUIiBpZD0iMDAxIi8PC9oZWFkZXIPGRhdGEgeG1sOnNw
    YWNlPSJwcmVzZXJ2ZSIgc3R5bGU9Ii9TTUIxMS9CTF9TRiI+PGdyYXBoaWNzIG5hbWU9IkNPTUxP
    R08iIG9iam5hbWU9Ii9TTUI0MC9MRUFGIiBvYmplY3Q9IkdSQVBISUNTIiBpZD0iQk1BUCIgdHlw
    ZT0iQkNPTCIgcGFnZT0iRklSU1QiIHBhZ2UtaWQ9IjAwMSIgcmVzb2x1dGlvbj0iMDEwMCIvPjx3
    aW5kb3cgbmFtZT0iU0VOREVSIiBwYWdlPSJGSVJTVCIgcGFnZS1pZD0i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PC9jaHIPC9wPjwvdGV4dD48L3dpbmRvdz48
    d2luZG93IG5hbWU9IkJJTExUT1BBUlRZIiBwYWdlPSJGSVJTVCIgcGFnZS1pZD0iMDAxIj48dGV4
    dCBuYW1lPSJXSU5ET1dfVEVYVCIgc3R5bGU9Ii9TTUIxMS9CTF9TRiIgbGFuZz0iRU4iPjxwIG5h
    bWU9IlRIIj5CaWxsLVRvLVBhcnR5PC9wPjwvdGV4dD48YWRkcmVzcyBuYW1lPSJCSUxMQUREUkVT
    UyIgYWRkcm51bWJlcj0iMDAwMDAyMjQyNyI+PHRleHQgbmFtZT0iQklMTEFERFJFU1MiIHN0eWxl
    PSIvU01CMTEvQkxfU0YiIGxhbmc9IkVOIj48cCBuYW1lPSJUMiI+VGVjaCBJbmM8bmV3LWxpbmUv
    Could anyone tell me the reason why am I getting the data in this way?
    Thanks in advance,
    Swapna.
    Edited by: NagaSwapna Thota on Jun 10, 2009 5:44 PM

    HI,
    Use this FM SAP_CONVERT_TO_XML_FORMAT to convert the data to XML format and then upload the convert data from the internal table to Application server.

  • CLR to get the SQL Server Data into .CSV File

    Hi,
    I transformed 10 columns 1000 rows from the source table to 1 column 1000 rows in the destination table by making the comma separated columns ( Just like ..
    Insert into DestinationTable
    SELECT col1+','+col2 ....
    FROM SourceTable
    Then I want to take this column into CSV file.
    I dont have the rights to command shell.
    I heard that we may use CLR procedure for this. Can someone throw light?

    using System;
    using System.IOM
    using System.Data;
    using System.Data.SqlClient;
    using System.Data.SqlTypes;
    using Microsoft.SqlServer.Server;
    public class ExportFileClass {
    [Microsoft.SqlServer.Server.SqlProcedure]
    public static void export_file()
    using (SqlConnection connection = new SqlConnection(
    "context connection=true"))
    connection.Open();
    // Operation to open file goes here.
    SqlCommand command = new SqlCommand("SELECT col FROM YourTable");
    // Consume result set and write rows.
    Build this from the command line:
    sn -k keypair.snk
    csc /target:library /keyfile:keypair.snk exportfile.cs
    Then run in SQL Server (assuming that the files are in C:\temp on the SQL
    Server machine:
    [sql]
    USE master
    go
    -- To be able to create an external-access assembly, we need to load
    -- the key, the assembly is signed with. The key needs a password, but we
    -- don't need to know the password.
    DECLARE @sql nvarchar(MAX),
            @password char(40)
    SELECT @password = convert(char(36), newid()) + 'Ab4?'
    SELECT @sql = 'CREATE ASYMMETRIC KEY slog_loopback FROM FILE = ' +
                  '''C:\temp\keypair.snk'' ' +
                  'ENCRYPTION BY PASSWORD = ''' + @password + ''''
    PRINT @sql
    EXEC(@sql)
    -- And then a login to carry the permission.
    CREATE LOGIN exportfile$asymkey FROM ASYMMETRIC KEY ExportFile
    GRANT EXTERNAL ACCESS ASSEMBLY TO exportfile$asymkey
    go
    -- Now we can go back to our regular database and create the assembly.
    USE youddatabase
    go
    CREATE ASSEMBLY ExportFile FROM 'C:\temp\exportfile.dll'
    WITH PERMISSION_SET = EXTERNAL_ACCESS
    go
    CREATE PROCEDURE ExportFile AS
    EXTERNAL NAME ExportFile.ExportFileClass.export_file
    [sql]
    It is likely that you will have to do ask your DBA to do things in the
    master database.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Problem with finding correct application to open a .csv file from Downloads

    Hi Guys. I've been a Mac user for some time now but have only just found this forum! Anyway, I've downloaded a .csv file to my Download folder but when I click on it to open it I get the "Can't find an application etc. " message. When the dropdown "Choose Application" menu appears it wont choose (ie the "Open" button won't enable). What is a .csv file and what Application would open it (if I can get the thing to choose one in the first place?)
    Your help would be greatly appreciated. (BTW the file comes from my Paypal history if that helps.)

    A .csv file is a standard text file which typically contains data of some sort.
    CSV stands for Comma Separated Values.
    You could open the file using TextEdit, or a Word processor... but the content of the file might look a little strange and it won't be easy to read.
    Your best bet is to import this .csv file using a Spreadsheet application such as Microsoft Excel or other.

  • How to get query result in comma dilimited text or excel file?

    Does anybody know how to get query results in comma delimited
    text file or excel file, I tried spool abc.txt, but the result
    showed some ------ lines
    Thanks

    Try doing this in your sql scripts
    set heading off
    set pagesize 0
    set linesize 4000
    set feedback off
    set verify off
    set trimespace on
    set colsep ","
    spool output.txt
    select * from dual (or whatever you are querying
    spool off
    There may be a couple other set statement that you could add but
    this should get you started in the right direction

  • 1099 MISC output to Application Server Issue 2010 DME file

    Dear all,
    I have an issue where I cannot output my clients IRS file to our application server. Using program RFIDYYWT we enter the parameters. The output group is supposed to place the file on the application server, and create using the 2010 DME file.
    However, this is not happening.
    The strange thing is, I can use the 2009 DME file and create data for 2010. However, this will create it in the 2009 format which is not valid this year.
    The most interesting piece is that all of my output groups point to the application server, however I do not specify the file to go there during the program (RFIDYYWT) parameters. I just give my desktop. Still, the file will create on the application server using the 2009 DME.
    Again, this does not happen with the 2010 DME. Where is the program pulling the file path from?
    If I do specify the file path to the app server during the program parameters, it just creates it in binary. This is true for both the 2009 DME and the 2010 DME. Therefore, I am sure it is pulling a file path from somewhere else.
    Any suggestions?
    Thanks,

    Thanks Shannon, that was very helpful. We're going to go down the route of the OSS note which should address the issue.
    We still don't know why the system, in its as is state, acts the way it does. But with the FAQ attached to one of the notes I at least see how to fix it and go about it another way.
    Thanks again,
    David L.

  • Migrate Weblogic Query into Oracle Application server

    how can i migrate weblogic.ejb.Query into oracle10g?

    This document is for 9iAS but it could help give you an idea of what to do
    http://www.oracle.com/technology/products/ias/pdf/weblogic_migration.pdf

  • Sap query output to save on application server

    Hi All,
    I have one requirement, want to save the output of sap query on application server as a text file?
    Is there any work around?
    Regards
    Vasumathi
    Edited by: komma vasumathi on Nov 5, 2009 10:32 AM

    Hi Vasumathi,
    Application server path cannot be accessed unless otherwise using OPEN DATASET. More over, Infoset cannot be executed directly. It can be accessed through SAP Query only.
    Writing Logic for 2 or 3 tables with Inner Join will not be a big deal. Writing Abap program will be optimum for you FTP requirement.
    1. create a folder in AL11 as \sap\common\
    2.  create z program and Declare sel-screen parameters : selopt1, selopt2
    3. Query : Select Afield1 Afield2 Bfield1 Bfield2 from table1 as A inner join table2 as  B on Afield1 eq Bfield1 where Afield1 in selopt1 and Afield2 in selopt2  into corresponding fields of table itab.
    4. creating file  at application sever
          w_fileloc = '\sap\common\file.txt'
         OPEN DATASET w_fileloc FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
        . Loop itab into wa_itab.
          Transfer wa_itab to w_fileloc.
         clear w_fileloc.
        endloop.
    5. goto AL11 and check the file file.txt in  folder \sap\common
    Please let me know if you need more information or close this thread by offiering the points( If you are satisfied).
    Regards,
    Sakthivel N

Maybe you are looking for

  • How can I see track length in a playlist in music on iPad.

    How can I see the track lengths in a playlist in music app on iPad the new version ios7, it was fine before. I use it for my work and need to see at a glance the length of all the tracks in a playlist so I can decide what track to play. Thanks

  • Mac Mini vs LG TV

    I have an older 2007 Mac Mini connected to my LG tv. Everything looks good all the way to the sign in screen. When you hit enter after you type your password it goes black and says invalid format. First time Apple user.

  • Mirrored RAID

    Hello, I have a RAID with 14 x 250GB Drive. Its a RAID 5 accross all drives and we used disk utility to mirror the arrays. Drive 14 showed an amber warning light las friday....so we replaced it with a new Apple Drive module of the same capacity. Our

  • HP530 not hibernating when USB WLAN stick plugged in, works unplugged.

    This problem came up when the laptop's builtin wlan card didn't connect to our wlan because of the 13 byte key (5 byte key worked fine but my dad wants to use the 13 byte key). I tried using an external USB wlan stick which connected fine to our netw

  • I've been using iMovie '09 for more than a year and now .MTS files won't upload?

    I've been using iMovie '09 for more than a year and each time I would plug in my SD card (using a card reader) the import box would open and I could select the clips I wanted to work with. Now, suddenly, today the import box won't open. Why??? I lite