WRITEQUERY

Hi All,
In my installation, they run a report (ABAP) produce a file, download it and then send it to other agency using FTP. I amtrying to automate the process as it takes couple of days of work. I am reproducing the report using BEX and all BI objects rae all developed.
Now when I try to automate the process using ABAP. I am running into series of issues. In BW 3.x the variants were written in VARI, VARIT, VARID tables. In 2004s the variants are created in RSRVARAINT tables. The function modules that I use are reading from VAR* tables. I am not able to use variables in my query and I am using WRITEQUERY to get this one done.
Can anyone suggest what and how this can be done?
Thanks,
Alex(Arthur Samson)

Alex,
We have a similar thing every monday.  We run some ABAP query and it generates XML file.  It will be sent to other server and it processes the data sends back.  We have our ABAPers developed the programs for us.  Try to get ABAP help in your case.
Hope this helps.

Similar Messages

  • WRITEQUERY program output issue..

    hi,
    we are using writequery program for one of our apps. when using writequery prg. the description is not displalyed completly in the output, but displays properly in BEx query output. Any thoughts on this issue..we have to use writequery for our app..
    thanks

    Hi,
    Create a Background job schedule it will runs in background automatically it will creates a spool. 
    To Create Background job schedule         T-Code SM36
    To Execute the Background job schedule T-code SM37
    To see the spool                                     T-code is SP01.
    Thanks
    Ganesh

  • WRITEQUERY to be excuted in program and filling Variable values

    Hi SDN Community,
    Is it possible to execute the WRITEQUERY FM, within ABAP,
    And at the same time have the variables in the query populated.  ie.  do not force the variable screen to popup and fill it in.
    Can you please provide a simple example if this is possible.
    Thank you.
    Simon

    Thank You Praveen.
    These look very useful, i will shortly be testing them.
    You may be able to answer the following questions:
    1) The output of those BLOGS is XML.  would it be possible to simply put the contents in a table directly.
    Do you think it would also be possible to do the following:
    1) Create a function module that calls ZWRITEQUERY
    (ZWRITEQUERY is a copy of the original code)
    If we could then pass the genuid to this code via the input paramater to be set up in our FM.
    to uncomment any code that displays the variable screen.
    To then allow the code to execute
    I would also like to try to find the code where there variables can be passed.
    But then i think the above is quite complicated.
    Thank you.
    Simon

  • Transaction RSRT and agregattes.

    When I execute transaction RSRT, To execute + Debuging, I select to show aggregates, the process generates dump with the following legend:
    If the error occures in a non-modified SAP program, you may be able to  
    find an interim solution in an SAP Note.                                
    If you have access to SAP Notes, carry out a search with the following  
    keywords:                                                                               
    "RAISE_EXCEPTION" " "                                                   
    "SAPLRRSV" or "LRRSVF03"                                                
    "RAISE"                                                                               
    or                                                                               
    "SAPLRRSV" "IOBJ_VALUE_NOT_VALID"                                                                               
    or                                                                               
    "WRITEQUERY " "IOBJ_VALUE_NOT_VALID"                                    
    Query is on multiprovider.
    Thanks for yuor help.

    Hi,
    Please check the OSS Note:
    877308
    -Vikram

  • Error while executing huge no.of records in RSRT

    Hi Everyone,
    I have around 80000 records in our customized infocube, while executing the query for this in RSRT it throws up this runtime error.
    As before suggested I set the mode to application server as explained in oss note 656060 which was suggested earlier in this forum.
    Now this is the error message it throws up what can be done.
    <b>
    Unable to fulfil request for 67108864 bytes of memory space.
    Each transaction requires some main memory space to process                  
    application data. If the operating system cannot provide any more            
    space, the transaction is terminated.                                        
    The termination occurred in the ABAP program "SAPLRRK0 " in "SETXX_FUELLEN_02"
    The main program was "WRITEQUERY ".                                                                               
    The termination occurred in line 1125 of the source code of the (Include)    
    program "LRRK0F07 "                                                         
    of the source code of program "LRRK0F07 " (when calling the editor 11250).</b>   
    Any help will be of great use to me.
    Thanks,
    Prashant.

    No ideas as such but try to publish on web while running from RSRT instead of excel or screen...
    may be that could help and try to run when the system is free and less loaded..
    regards,
    Hari

  • 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 .

  • Identifying the BW report behind a long-running DIA wp

    Hello - if you see a long running work process in sm66/50...then i can correlate it to the oracle session w/ st04...and then i can see the actual query and explain plan, etc.
    however, i am having trouble tying this back to the BW "report" which the user launched.  i know it's a web report, and all i could find in st03 was RFC time. 
    i looked in se16 at RSDDSTAT for the timeframe in question, but couldn't find a record that correlated to what i saw running actively in sm66/50/st04.  any other way to do this? (other than calling the end-user directly)
    thanks

    Hi Ben,
    I believe now I understand your issue... and I only see two possible options:
    1. Activate trace for the user that is getting the long-running process (you can do it from RSRTRACE, and those logs are not very big). If you see queries that have a very big time on CMD_PROCESS     WAIT, then those are candidates to review.
    The main problem with this option is that you can't catch the user instantly, cause user should log out and log in in order to activate the trace, and you'll need to constantly analyze his logs to catch the annoying query.
    2. Debug the dialog process and find the WRITEQUERY execution (by using F7). There, on g_s_repkey you'll find query technical name on compid. The problem here is to get the authorization from your basis team to perform debugging on a production system (it is not recommended).
    Maybe you can also try to analyze BW Statistics... let's see other opinions.
    Hope this helps,
    David.

  • When executing a query showing as ABAP runtime error RAISE_EXCEPTION

    Hi all,
    When i executed a query, it is showing as ABAP runtime error RAISE_EXCEPTION in the short dump.
    This is the Analysis in Short dump (ST22)...............
    Exception condition "DATE_BEFORE_RANGE" raised.   
    What happened?                                                                               
    The current ABAP/4 program encountered an unexpected  
    situation. 
    Error analysis                                                                               
    A RAISE statement in the program "SAPLSCAL" raised the exception
    condition "DATE_BEFORE_RANGE".                                  
    Since the exception was not intercepted by a superior program   
    in the hierarchy, processing was terminated.                                                                               
    Short description of exception condition:                                                                               
    Date is earlier than factory calendar definition                                                                               
    For detailed documentation of the exception condition, use      
    Transaction SE37 (Function Library). You can take the called    
    function module from the display of active calls.               
    How to correct the error                                                                               
    You may able to find an interim solution to the problem                       
    in the SAP note system. If you have access to the note system yourself,       
    use the following search criteria:                                                                               
    "RAISE_EXCEPTION" C                                                           
    "SAPLSCAL" or "LSCALU06"                                                      
    "DATE_CONVERT_TO_FACTORYDATE"                                                                               
    or                                                                               
    "SAPLSCAL" "DATE_BEFORE_RANGE"                                                                               
    or                                                                               
    "WRITEQUERY " "DATE_BEFORE_RANGE"                                                                               
    Could you pls any one tell me what could be the problem and how to reslove this issue.
    Thanks & Regards,
    Ravi Kumar.

    Hi Andre,
    Maintain your factory calendar idents Valid To year field (BJAHR) in Table TFACD
    You can do this via tcode SCAL, or navigate through SPRO.
    Most likely you have your factory calendars set with Valid To dates as 2010. You may also be encountering some load issues depending on exit routines used in transformations in determining workdays/factory days etc.
    Thanks,
    Eric Filmer

  • How to pass BI Query parameters from Function Module

    Hi,
    We are executing the BI queries using the Function Module "RS_VC_GET_QUERY_VIEW_DATA_FLAT" by passing the query name and the provider information.
    Is there a way, to pass the filter parameter values also to the query by using this function module? I am not sure how the VC  tool is using this Function Module to call the BI queries and passing the filter values.
    Your help is appreciated.
    Thanks
    Suri

    Suryanarayana,
    Are you trying to execute a query in batch?. If you want to execute try to look at WRITEQUERY - which is a standard SAP program. You can execute this program directly or you can customize it completely and produce the output in .CSV file.
    Hope this helps. Award points if useful.
    Goodluck,
    Alex (Arthur Samson)

  • Query Quetsion  APD or Reporting Agent or ?

    I have a query , It's having around 3 million Records ,
    what's the best way to suggest client to dump the query into Flat file or Excel.
    Is it possable through APD's OR  Reporting Agent or Whether it's achiveable in some other means in BW,   if so can you explain me in Detail.
    your input's will be highly appreciated.
    we are on 3.50 BW
    Thanks in adv

    Hi Murli,
    Welcome to SDN!!
    Use the ABAP Program <b>WRITEQUERY</b> to dump the output into a flatfile.
    Bye
    Dinesh
    <i>Assigning point to the helpful answers is the way of saying thanks in SDN. you can assign points by clicking on the appropriate radio button displayed next to the answers for your question. yellow for 2, green for 6 points(2)and blue for 10 points and to close the question and marked as problem solved. closing the threads which has a solution will help the members to deal with open issues with out wasting time on problems which has a solution and also to the people who encounter the same porblem in future. This is just to give you information as you are a new user.</i>

  • 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

  • CS13 Result In A Table

    Dear Gurus,
          I am writing a program in which we need same result as CS13 providing but I need this result in an internal table for further processing. Can anyone guide me that how to do this?
    Regards,
            FR

    Hi Tina,
    If your are in good in ABAP then you can try creating an ABAP program and use the program WRITEQUERY in it. The WRITEQUERY takes the query as the parameter and you can customize the code to store the query output in an internal table. Now use this internal table to update the DB table.
    Hope this helps.
    Bye
    Dinesh

  • Query to CSV file

    Hi,
    Is there a way to execute the query and save it in application server as csv format .  I've aleardy tried couple of the options -
    RSCRM_BAPI - due to complex restrictions in the query, the output is not consistant.
    Information Broadcasting - can either store in KM folder(portal) or email, not in application server.
    I have gone thro the couple of forum threads wr - abap to csv(Execute BW query using ABAP Part III), writequery, RRW3_GET_QUERY_VIEW_DATA ..   The abap with direct output to application server will be interested.
    Thanks
    Sreedh

    Hi,
    I hope it will help.
    Exporting as a CSV File 
    In order to process a query executed in a Web application further, you have to export the query as a CSV file or MS Excel 2000 file.
    Prerequisites
    ·        You have executed a query in your Web application and want to display it in a different format and continue processing the query.
    ·        To export the data to an Excel file, you have opened the BEx Analyzer
    Procedure..
           1.      From the context menu (left mouse-click on the text of a characteristic, characteristic value, structural component, description of exception, description of condition), choose Export As.... ® CSV File or Export As.... ® MS Excel 2000 File. The system exports the data into a CSV file or an MS Excel 2000 file.
    Export to MS Excel files from MS Excel 2000 is supported.
           2.      If you choose Export As...® CSV File, the query is displayed in CSV format (comma separated value). The numerical values of the query are displayed in a list that is separated with commas. The numerical values context, formatting (for example, displaying exceptions) and the filter data are available in the CSV file. You cannot navigate further with BW functions.
    Thanks
    Hema

  • Did anyoine seen this behaviour....

    Hi All,
    I have written a query and created a variant for it. When I execute the query in BEX Analyzer or RSRT or a batch program to execute the query I get the same result. I am using customized WRITEQUERY program to execute the query in background. But when I execute the same program using process chain all my query results seem to be divided by 1000. It is strange, because I run the same program from SE38 and pass the same variant to generate the files. But when I use the process chain the results are different?
    Anyone has ever had anything simillar to this and possible cause?
    I need this resolved immediately...Thanks for your input.
    Alex (Arthur Samson)

    Sorry. Still the issue remains. But closing the question.

  • VariableOneToOneMapping bug

    Hi,
    This is in TopLink 9.0.4.2.
    We're in the process of trying to determine if we should upgrade our TopLink from 2.5 to 9.0.4, and have not yet purchased a support contract because we haven't made the final decision yet, so I'm just posting this bug here in hopes that someone can submit the bug.
    VariableOneToOneMapping's insert( WriteObjectQuery ) method is missing a line. If you look at the corresponding method on OneToOneMapping, you will see the following at the very end of the method:
              WriteObjectQuery writeQuery = new WriteObjectQuery();
              writeQuery.setObject(object);
              writeQuery.setObjectChangeSet(changeSet);
              writeQuery.setCascadePolicy(query.getCascadePolicy());
              query.getSession().executeQuery(writeQuery);
    In the VariableOneToOneMapping class, the exact same lines are there, except the line writeQuery.setObjectChangeSet(changeSet); is missing.
    The bug manifested itself when a new instance of class A with a VariableOneToOneMapping to a new instance of class C was in the same UOW as a new instance of class B that had a OneToOneMapping to the same new instance of class C. In our particular case, the ordering of the descriptors was A,C,B, and so the new C object got inserted when A was inserted, but because the ChangeSet was not properly propagated, it does not get recorded correctly in the UOW as being committed. So, later on, when B is committed, it checks to see if the ChangeSet for C has also been committed, but it has not been recorded, so it tries to re-insert the same new C object, resulting in a PK violation.
    Two relatively easy workarounds are to call UOW.setUseOldCommit(true), or after your session is loaded, to call descriptor.addConstraintDependencies() on A's descriptor for every class that its VariableOneToOneMapping can point to.
    Thanks,
    Greg

    Hi Greg,
    I was just in touch with support and engineering. They have seen your origional post on V1-1, and have looked at this related post as well.
    Indeed, you appear to have uncovered an issue and it's been logged with engineering as bug #3667037 and is closely related to a similar issue logged as bug #3615656. The fix will likely be backported into the 9.0.4 stream -- you should open a tar, mention those bug numbers, add your related info (cut and paste your post), so that you can be tracked and notified.
    The work arounds you've suggested are all that I can suggest at this time.
    - Don

Maybe you are looking for