Save sap query into file

Hi,
I am running my sap query and saving automaticaly into a file by using the 'file store' option. But i am running in background. I can see the result in the spool but how can i create the result in a TXT file directly.
Thanks for your help.
Regards,
Cesar

You have to give your application Path like "/USR/folder or /temp/filename.txt .. if you`re running in background .
you can see the paths using Tr. AL11
Thanks
Saquib

Similar Messages

  • Transform sap query into transaction

    hi!
    my question is not related to mm but also not to other forums in this site.
    i'm trying to transform sap query into transaction using se93 transaction.
    i just learing sap in a class and we use an old version of sap.
    user group name: ofer6
    infoset name: ofer9
    query name: ofer8
    all created in global area
    when i enter se93 i write t-code ZSTART and press "create".
    then i choose: "transaction with parameters" in the popup window.
    in the second screen i write the transaction ZSTART again.
    i mark "skip initial screen" and "inherit gui attributes"
    at the bottom of the page in "default values" i use the following:
    D_SREPOVARI-EXTDREPORT     OFER8
    D_SREPOVARI-REPORT          OFER6 G
    D_SREPOVARI-REPORTTYPE     AQ
    when i press enter i get  messages:
    transaction ZSTART does not exist
    Screen 0000 of program  does not exist
    The field D_SREPOVARI-REPORTTYPE does not exist on the called screen
    The field D_SREPOVARI-REPORT does not exist on the called screen

    Hi,
    Please check the link below:
    http://www.freesaptutorial.com/how-to-create-transaction-code-in-sap-using-se93/
    Hope this will be helpful to you.
    Thanks,
    Neeraj

  • SAP Query into FTP through ABAP

    Hi Experts,
    I have an SAP query which needs to be run on a daily basis (through a back ground job) and the data that is pulled has to be stored in a file in tab delimited format and the same should be extracted to an FTP site. Can you please suggest ways for this?
    Thanks,
    Shashank.

    Hi ,
    Thanks for our reply.
    I have pasted some example code into my additional field which I have created in SAP Query But im not sure how the loop bit works and how I can populate the additional fields that I have created , could you please explain this
    CALL FUNCTION 'HR_READ_INFOTYPE'
      EXPORTING
        pernr                 = '000000019'
        infty                 = '01'
        BEGDA                 = '18000101'
        ENDDA                 = '99991231'
      tables
        infty_tab             = p0008
      EXCEPTIONS
        INFTY_NOT_FOUND       = 1
        OTHERS                = 2
        LOOP AT p0008.
    NOT SURE WHAT TO PUT IN THIS SECTION *****
      ENDLOOP.
    I have created 3 additional Fields in the infoset Current FTE ,FTE1 FTE2 , and I want to loop through the records and populate the relevant Additional field with the employees FTE  (I only want to populate  where there is a change)
    Sample Data
    Begda              Endda             FTE        Salary
    1/1/2010         31/12/999       60%         19K          (Current  FTE)
    01/08/2009     31/12/2009     100%       27k           (FTE1)
    01/07/2008     31/7/2009         50%       17K          (FTE2)
    Thanks in anticipation
    DM

  • Integrate Sap Query into ESS and MSS

    Hello
    I have been following this http://scn.sap.com/docs/DOC-50736;IDSactivation=99FDF6E06B5918D0293BF0BE7884FBCB0606A0F376FFD7908517BA7F2738E3A6
    for the intergration of SAP Query.
    However i am getting stuck at step 6 as it appears RP_MSS_CONVERT_MDT_TO_LPD_CUST
    does not exist and ideas what i am missing.
    So i have had to convert my MDT scenario using PWPC_CONV_MDT_TO_LPA
    From there i have then been able to run program APB_LPD_LPA_CUST_TO_LPD_CUST
    which has converted it into a launchpad in LPD_CUST, however once there it has no system alias defined for my applications so they won't launch and the launchpad entries for managers desktop don't give me a system alias option.
    Regards
    Adam

    Hi Adam,
    what release are you on? Do you use any Add-ons? The document you are following is written for EHP6, and I think MSS Add-On 1.0 is also needed as this add-on brings the WD ABAP applications for MSS.
    The report you don't have in your system is located in the WDA specific package for MSS, so I think it comes with the Add-on. The transaction you use for launchpad generation is the "old" one, that can be used from Enterprise Portal. Inside portal, you have a launchpad iView with properties for the scenario and the system alias.
    Do you have a possibility to install MSS Add-On 1.0? This should solve your problem and let you follow the guide.
    Regards,
    Marc

  • Ho i may save filtered image into file...?

    Image dst=panel.createImage(new FilteredImageSource(dst.getSource(),new AlphaFilter((jSlider1.getValue() * 255) / 9)));
    how i may save this into file?

    Object object=dst.getProperty("data", jTree1);
                //          iio..createImageInputStream(in);
                ImageInputStream iis;
              iis = (ImageInputStream) object;
                BufferedImage input= ImageIO.read(iis);i have this error Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.Object cannot be cast to javax.imageio.stream.ImageInputStream

  • Error While importing SAP query into quality system

    Hi,
    When Itried to import the dataset(Transport Request)  generated in develoment system into Quality system I am getting the following error.
    Query already exists and Infoset contains a structures which is not there in data dictionary .
    How to oversome this error to import successfully into quality system
    thanks

    hi,
    You need to transport your Z tables to the quality.
    Make sure you transport all the data elements , domain.. etc to the quality.
    Thats why its giving you the error.
    It does not find the Z tables in Quality
    Regards,
    Vinod

  • How to save navigations of Query into Portal favorites?

    Hi,
      i  executed a query in the portal. i made some changes by navigating, drag & drop options ( added new fields, displayed attributes, removed 1 field for example).
    how to save this navigation into portal favorites? will it possible?
    if i save my query into Federated portal favorites, user can able see those later. is that true?
    thanks in advance.
    Regards,
    Nagesh Ganisetti.

    Hi Nagesh,
          Can you please explain how did u solve this issue. I am also facing same issue?
    Thanks and Regards
    Satish Arra

  • Converting SAP Query to Report Program

    Hello Experts,
    I'm stuck up with an issue.
    I want to convert SAP query into a report program as the things which I need to implement is not possible with SAP Query anymore.
    So I need to convert SAP query to Report program.
    I'm very much aware about the SQ01--> Query --> More functions --> Display Report Program
    But this Report Program generates is AQ..................... but if you see the code there will be buch of dynamic calls not as clear as ABAP code and not much flexibility to modify...
    Please Provide a solution to this.
    Regards,
    Titiksha

    Hi Bhange,
    Glen Anthony has said very well and I support him. Even I suggest you to ignor the report generated with Query and develop a new report with the required business logic.
    Regards,
    Vijay

  • Get picture into file

    Dear all,
    How to save a picture into file from an image item.
    best regards
    Jansen

    Hi!
    Use Write_Image_File built-in.
    Hope this helps.
    Sergey.

  • SAP Query : Save to file in XLS format in background

    Hello everybody,
    I used the enhancement SQUE0001 for saving result (an XLS file) of SAP query in background.
    I used also the ABAP commands 'OPEN DATASET', 'TRANSFER' and 'CLOSE DATASET' as described in the SAP note 537735.
    The execution of SAP query generated multiple columns. But when I go to see my downloaded file (.xls), all generated columns are condensed into 1  !!!
    How to save the file (.xls) and keep the separated columns, please?
    Thanks for your answers.

    For saving the file in Excel format in the App server you have to first convert the data in XLS format and then use the transfer statement.
    You can either use FM SAP_CONVERT_TO_XLS_FORMAT for that.
    OR
    Create a comma sepreated file which will open in excel.
      open dataset file for output in text mode.
      loop at itab.
        concatenate itab-field1 itab-field2 itab-field2 into str
                      separated by ','.
        transfer str to file.
      endloop.
      close dataset file.

  • Procedure to save the output of a query into excel file or flat file

    Procedure to save the output of a query into excel file or flat file
    I want to store the output of my query into a file and then export it from sql server management studio to a desired location using stored procedure.
    I have run the query --
    DECLARE @cmd VARCHAR(255)
    SET @cmd = 'bcp "select * from dbo.test1" queryout "D:\testing2.xlsx;" -U "user-PC\user" -P "" -c '
    Exec xp_cmdshell @cmd
    error message--
    SQLState = 28000, NativeError = 18456
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'user-PC\user'.
    NULL
    Goel.Aman

    Hello,
    -T:
    Specifies that the bcp utility connects to SQL Server with a trusted connection using integrated security. The security credentials of the network user,
    login_id, and password are not required. If
    –T is not specified, you need to specify
    –U and –P to successfully log in.
    -U:
    Specifies the login ID used to connect to SQL Server.
    Note: When the bcp utility is connecting to SQL Server with a trusted connection using integrated security, use the
    -T option (trusted connection) instead of the
    user name and password combination
    I would suggest you take a look at the following article:
    bcp Utility: http://technet.microsoft.com/en-us/library/ms162802.aspx
    A similar thread regarding this issue:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/b450937f-0ef5-427a-ae3b-115335c0d83c/bcp-connection-error-sqlstate-28000-nativeerror-18456?forum=sqldataaccess
    Regards,
    Elvis Long
    TechNet Community Support

  • 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

  • Error 'Unable to open file' when downloading SAP Query to Excel

    Hi all
    I'm running a SAP Query which is set to download straight to a spreadsheet (Pivot Table / Microsoft Excel).  Intermittently it does not work -  apparently at random (at least, I've can't recreate the error at will).
    It does one of the following:
    - Works ok, and creates the pivot table
    - Gives an Excel error message 'Unable to open file', then returns to the 'save the data in a spreadsheet' popup when enter is pressed on the error.
    - Does not issue error message, just goes to the 'save the data in a spreadsheet' popup.
    In the last two cases, the excel pivot table sheet is not created.
    Has anyone seen anything similar, or have any idea as to what is causing the problem?
    Any help gratefully received!
    Not urgent as I've found a way round -  further testing seems to show that I don't get the error is Excel is already open - but in the past I've run many SAP query downloads without needing to open Excel first.  I suppose it's possible that this is just something to do with the Excel setup at the user site
    Message was edited by:
            E Gregory

    Hi,
    Ensure that file name with same name and in same path should not be open while saving the data.
    Award if it helps.
    Jogdand M B

  • To open & Edit the XLS file in edit mode after Extracting SAP data into it

    Hello Experts,
      I have a requirement to open and edit the xls file imidiately after downlaoding the SAP data into this XLS file. The XLS file is getting saved on presentation server (e.g. Destop/C: drive).
      I have used function module "GUI_DOWNLOAD" OR "DOWNLAOD" to download the data from SAP table to XLS file. But now I need this XLS file to be get opned automatically after finishing the Download, so that user can make changes into XLS file and can save the changes into it. After saving I have to upload this modified Data into SAP table again.
    For this I am really not aware how to get it done..but I believe you experts will definately help me out..waiting for your reply.
    Thanks,

    HI,
    did you ur problem was solved if not check this code once.
    now only i tried it my system , it opens xl file and save all data in it.
    DATA: ZKNA1 LIKE STANDARD TABLE OF KNA1 WITH HEADER LINE.
    SELECT * FROM KNA1 INTO TABLE ZKNA1.
    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
      EXPORTING
        FILE_NAME                       = 'C:\Documents and Settings\rajesh.NACL\Desktop\XLSSDSDS.XLS'
      CREATE_PIVOT                    = 0
      DATA_SHEET_NAME                 = ' '
      PIVOT_SHEET_NAME                = ' '
      PASSWORD                        = ' '
      PASSWORD_OPTION                 = 0
    TABLES
      PIVOT_FIELD_TAB                 =
       DATA_TAB                        = ZKNA1[]
      FIELDNAMES                      =
    EXCEPTIONS
      FILE_NOT_EXIST                  = 1
      FILENAME_EXPECTED               = 2
      COMMUNICATION_ERROR             = 3
      OLE_OBJECT_METHOD_ERROR         = 4
      OLE_OBJECT_PROPERTY_ERROR       = 5
      INVALID_PIVOT_FIELDS            = 6
      DOWNLOAD_PROBLEM                = 7
      OTHERS                          = 8
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    thanq,
    rajesh.k

  • How to spool the result of an query into a file in sql 2000

    Hi All,
    I have an SQL query which iterates through number of times for checking on some conditions and will return results each time. I wants to save the results into an different xml file each time. I tried using below query:
    exec xp_cmdshell 'bcp "use Mimsadaptorlogs; select top 10 * from log order by logdate" queryout "D:\cdr_cg.xml" -T -c -t,'  ---> Its not working as expected.
    I got the Below output:
    NULL
    Starting copy...
    SQLState = 01000, NativeError = 5701
    Warning = [Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context to 'MIMSAdaptorlogs'.
    NULL
    10 rows copied.
    Network packet size (bytes): 4096
    Clock Time (ms.): total       62
    NULL
    Could you anuone please suggest me on this.......
    Thanks and Regards, Bala

    You will need to write a client program to do this. SQL Server is not intended for writing files. People still do it by calling BCP through xp_cmdshell, but this is a dubious practice. Better is to write a CLR stored procedure for the task. However, you
    are on SQL 2000, and the CLR support was added in SQL 2005. Furthermore, there is no XML type in SQL 2000, and the only way to generate XML is with the FOR XML clause. But this output is not well understood by BCP. Then I try: [code} bcp "SELECT * FROM Northwind..Customers
    FOR XML RAW" queryout slask.bcp -c -T [/code] on SQL 2000, I get [code] 11 rows copied. [/code] which is complete hogwash, because there are 91 rows in that table, and the output should be a single XML document, and the output looks like this: [code] <row
    CustomerID="ALFKI"... Bouchers" City="Marseil... tomerID="DUMON" Company... 0.32.21.21" Fax="40.32.... los Hern ndez" ContactT... n Steel" ContactTitle="... e" ContactTitle="Market... ="Salzburg" PostalCode=... " Phone="(21) 555-3412"... ty="Charleroi" PostalCo...
    <row CustomerID="WARTH"... [/code] I have truncated the output on the right side, but the left side is authentic. It really is that bad.
    Erland Sommarskog, SQL Server MVP, [email protected]

Maybe you are looking for

  • Cannot connect to wireless network

    Hello, I am trying to connect to my wifi network which is secured using WPA2. I have tried wpa_supplicant and netctl. Relevant part of ip link 3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000 link/ether 00:0

  • Remove Column Headers in FlexUi Layout

    HI, I am displaying a Km folder using flexui layout....I am using the following components, Layout Controller:GridListLayoutController and the modifed versions of ConsumerFileListRenderer and ConsumerResourceRenderer. The resources are getting displa

  • View Memo option in UWL

    Hello, I am trying to include the "View Memo" option for a couple of different work items in UWL under the "You can also" section. The View Memo shows up fine for one work item and doesn't show up for the other. However I have similar UWL configurati

  • Why the tree show different while i use XML and XMLList as the data provider

    Code is as follows: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:services="services.*" layout="vertical"> <services:CommonSvc id="ws" NameSpace="ws.wsSysDict" creationComplete="ws.getXmlList()

  • 1076 songs in iTunes library, all of them checked, however only 961 songs go to iPhone... how to i change this??

    I have 1076 songs in my iTunes library but only 961 download to my iPhone.... Why? How do i get all of them to my iPhone.... and yes all of them are checked. Thanks