Execute a Query from a report sending it parameters and capture the result

Hello everybody,
Greetings from Peru, I want your help, Do you know how to execute a query from a report sending parameteres and capture the result in a internal table?
The attached imaged has in red square the parameteres I want to send from a report.
The idea is to have a JOB that executes everyday and parameters like DATE PERIOD will change automatically.
Thanks for your time.

Hi Enrique,
You can call a query from a report by using submit statement.
Every query has a corresponding program associated with it.
Execute the query from SQ01. On te selection screen of query, goto SYSTEM  from menu and then click on STATUS, you will get program name (In this case aqzzzent_struct=zmm_ent_struc1). Use this program to call the query from your custom program.
Also populate the rspar int table as per the selection criteria you want to pass to query.
   DATA: rspar     TYPE TABLE OF rsparams,
    wa_rspar  LIKE LINE OF rspar.
      wa_rspar-selname = 'SP$00001'.
      wa_rspar-kind = 'S'.
      wa_rspar-sign = 'I'.
      wa_rspar-option = 'BT'.
      wa_rspar-low  = s_cmp_cd-low.
      wa_rspar-high = s_cmp_cd-high.
      APPEND wa_rspar TO rspar.
   SUBMIT aqzzzent_struct=zmm_ent_struc1 WITH SELECTION-TABLE rspar AND RETURN.
Thanks,
Sachin

Similar Messages

  • Split Message, send to webservice and consolidate the results

    Hello,
    I am looking for some support / examples for following situation:
    A webservice is existing that only allows a single message to be entered. The webservice will return the result on this message. The structure of the message is very simple as it contains only one element. (Same for the response)
    What I would like to do is to be able to send a list of several values to be checked by this webservice. The idea is to build a BPM to send a multi-element message (repeating element / different values) , split this multi element message into seperate messages including one element, send all these messages accordingly to the webservice, receive and collect all according responses and consolidate these again in a multiu-element response message.
    If someone would have a description or an example with the different needed steps how to build this BPM, this would be nice.
    Thanks in advance !
    Edited by: Keno Torfs on Mar 4, 2008 11:30 AM

    hi,
    just open asynch synch bridge
    you will be creating multi-line container with interface variable as instance.
    assumption is a source system is pumping messages of same data type.
    recieve step to get the messages.
    you just collect the messages using container
    then use reciever determinaton step to get the receivers in receiver variable .
    use the transformation step to get the target messgaes
    loop through the target message container and execute send step. after send step collect message.
    note:in loop step we have decrement message counter  send step which has collection variable for response.
    hope you got some  idea.
    Regards,
    Ram

  • I have a neslab chiller and want to read the temperature by sending ASCII characters and graph the results, any advice?

    I am having difficulty having the chiller recognize (RT[CR]) which is the signal recognized by the chiller to read the temperature. The signal that is returned is (xxx.xx[CR]) which is the temperature. I am attempting to be able to read the temperature and graph this vs time and possibly be able to change the setpoint as well from the UIR.

    I agree with Randy that Hyperterminal is a good starting point to test cabling and communication.
    In your program, be careful to serial port initialization (how to set baud rate, parity, data bits and stop bits depends on the language used) and to termination character ([CR] means Carriage return: if you are usng CVI it DOESN'T add CR to the message unless you esplicitly put it in).
    Another interesting point is the time the instrument takes to respond to the message: it can vary from message to message and is usually described in the instrument's documentation. If you test for a shorter time, you catch a false 'no response'. You could make a while loop and test in it the number of bytes received, then decide whether to end the loop for timeout or answer recei
    ved...
    To continue help you, we need some details of your developing environment (CVI or LabVIEW?) and of problems you are having at present.
    Hope to hear you soon
    Roberto
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Execute a VO '4' times and show the result in single table at once.

    Hi,
    I want to execute single a VO query multiple times with different parameters and show the results together in a Table at once
    In Detail
    I have a table to which is associated with a VO.
    The VO contains SQL whose WhereClauseParameters need to be dynamically binded.say headerId and lineId
    Select ... from ....where headerId = :1 AND lineId = :2
    I have to pass these 4 values and show all the results in a single table
    headerId lineid
    H1 ............... L1
    H1 ............... L2
    H2 ............... L1
    H2 ............... L2
    I understand that i need to bind parameters dynamically and exceute the VO.
    As i have 4 different set of parameters, the view object will be executed 4 times.
    I want to show all the results together in a single table.
    How can I do it.
    thanks,
    Gowtam

    Hi Mani,
    Thanks a lot for the patience and detailed solution.I will try it out and tell you the status.
    Meanwhile, I have 2 questions on this solution(just curious)
    I will give you the snapshot of the table
    Table - ModelInfo
    Model......Tube..... Float....Size......Col5.....Col6.......Col7.......
    M1............T1.......... F1. .....1..........C15......C16.....C17.....
    M1............T1...........F1.......2..........C25......C26.....C27.....
    M1............T2......... .F2.......1..........C35......C36.....C37.....
    M1............T2...........F2.......2..........C45......C46.....C47.....
    M2............T1.......... F1. .....1..........
    M2.............T1..........F1.....2.........Cn5.......Cn6........Cn7
    .<continues...>
    .<till>
    .Mn............Tn..........Fn.......n........Cxy.......Cpq.......Crs....
    Question 1:
    if you notice this data,
    The Columns 5 to 7 are dependent on Combination of Model,Tube,Float and Size.
    Hence will this query work properly(without mixing up data from other Pk combination) and will it be efficient?(I Know this is a stupid qst, still double checking..As your solution assumes that each row is unique for Model only..which is not true)
    Select ...From....Where
    Model in(M1,M2,..Mn) AND Tube in(T1,T2..Tn) AND Float in(F1,F2,....Fn) and Size in(1,2...n).
    In short, will C15,C16 and C17 appear only with M1,T1,F1,1..I believe it will.
    Question 2:
    As I told,
    Third party program will return Array of Objects.
    Each object will have a variable called Flow along with
    Model,Tube,Float and Size.
    Flow is not stored in the database(can not be stored due to functional reasons).I want to show this Flow also along with other columns fetched from the DB for all 100+ rows.
    How can I do it?
    I will give u the scenario(with just 2 rows)...please check(Flow is not stored in DB)
    Third Party object : ObjModel
    Model......Tube..... Float....Size......Flow
    M1............T1.......... F1. .....1..........100
    M1............T1...........F2.......2...........200.
    M1............T2.......... F1.......1..........300
    M1............T2...........F2.......2..........400
    My concern is,
    After the VO executes and shows other 6 columns, it should show Flow appropriately.(associated with each object in the array)
    I understand that I need to have a Transient attribute in VO called[b] Flow.But I don't know how to perform the two tasks simultaneously..
    Task1:Your solution on showing table columns
    Task2:Showing Transient data for each object returned from program.
    thanks,
    Gowtam

  • Help required in executing the stored procedure and capturing the responce

    Hi,
    I have to execute a stored procedure in oracle database and if it successful then have to create a status IDOC.
    The stored procedure may throw an exception(it is not an out parameter), in such cases i should capture the exception as part of the response message and send this information while creating the status IDOC.
    i would like if the below is possible.
    As the stored procedure is not returning( this means if you execute the procedure manually it will display the result), will it be possible to capture the result which has the exception details?
    any direction to this will be highly appreciated.
    Many thanks.
    Regards,
    Rahul

    @Bhaskar,
    i need to execute the procedure by sending the input data from a file and capture the result after executing the procedure to create a status idoc
    im not sure how the provided links helps me here.
    i m not looking for any look ups. i would like to know is there any way that we can capture the result after executing the database procedure?
    Edited by: Rahul_10416 on Dec 5, 2011 10:07 PM

  • Central Management server - executed a query but how to send the query output in the form of mail?

    Hi All,
    i have used CMS in SQL 2008 R2. i have added couple of servers in its group. i have executed a query & i need to send the query output in the form of email.
    basically query is checking the rows count from couple of user tables in servers.
    issue here is how to copy the data that is used by CMS? i need to work on automate the rows count in difft user table in db servers
    could you please suggest how can i achieve this?

    Copy to what?
    SELECT COUNT(*) FROM sys.objects
    Running the above statement returns two columns (server name and count)
    All the servers SS2005  and onwards , then use
    EXEC msdb.dbo.sp_send_dbmail 
         @profile_name = 'name', 
         @recipients = '[email protected]', 
         @query = 'SELECT COUNT(*) FROM sys.objects', 
         @subject = 'Count rows'
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • See sql query from crystal report without crystal report

    see sql query from crystal report without crystal report 

    Hi,
    Depends on datasource type but you could have a look at ODBC trace or if you have access to the SQL Server you could use profiler to monitor the session.
    Regards,
    Craig
    And this will only be of use if you know which Server/Insstance/Database the Report is connecting to...
    Please click "Mark As Answer" if my post helped. Tony C.

  • ORA-27092 Error while executing any query from client

    Hello
    I am getting following error while executing any query from client remotly.
    IAMDBA@TEST_OAT.ABCD > select userid from dual;
    select userid from dual
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01116: error in opening database file 1
    ORA-01110: data file 1: '/u01/prod/system/system01.dbf'
    ORA-27092: size of file exceeds file size limit of the process
    Additional information: 131071
    Additional information: 286209
    But while local connection,its working.

    hi,
    ulimit command- Limit user resources
    su - oracle
    ulimit -n (this command will show you the current value for ulimit the default value is 1024)
    to increase its value:---
    ulimit -n <some value> ( this command will change value for current session only)
    example
    ulimit -n 101062
    once done check the value as:--
    ulimit -n( for verification)
    search in google for more explanation or revert back to me for any suggestions.... :)
    Edited by: varun4dba on Jan 31, 2011 4:09 PM

  • How can I execute a query from a BSP application?

    How can I execute a query from a BSP application?
    I´m trying to execute a Query from intranet. I´ve been looking for examples, but the templates I´ve found doesn´t help me.
    does anybody has an example?
    Thanks.

    Hi
    Have you designed the BSP application ?
    design it first with one page
    page will have layout and Event handlers
    Design the layout with the fields
    in the event handler there are events
    in the event On Initiailization or ON inputprocessing write the select query similar to what we write in routine ABAp and fetch the data into ITAB and that has to be passed to the Layout
    see the doc
    BSP
    To learn how to create Web applications with Business Server Pages, you can work through the simple tutorials that build on each other. You should be able to run through all of the steps described here in your own system.
    If you want to develop Web applications with BSPs, your system must meet the following requirements: Prerequisites for Creating Web Applications.
    The following tutorials are available:
    · First Tutorial: First Steps with Business Server Pages…
    · Second tutorial: A Small BSP Application and A Small BSP Application with HTMLB
    · Third tutorial: Our First Online Bookshop
    · Fourth tutorial: Further Developing the Bookshop
    · A small Tutorial is also available for your first steps with the Model View Controller design pattern.
    · For a more complex MVC tutorial based on the third tutorial, see: Our Little Online Bookshop Using MVC and HTMLB
    When creating BSP applications, note the browser dependencies described in Note 598860.
    steps:
    1) start the transaction RZ10.
    2) now u u have to select Profile name, so select the INSTANCE Profile from the list of options given with the Profile parameter list.U may find multiple instance profile in the list, so select the profile in which ur server name is given.
    3) u will also find three options in the same window.
    Administrator data, Basic Maintenance, and Extended Maintenance. So select the last one from that.
    4) Now click on change button.
    5) here u will find parameter icm/host_name_full, so now set it as FQDN.
    6) Now copy ur settings with new version number.
    7) Activate that version.
    8) And now please restart ur WAS.
    So this will set ur FQDN, and also don't forget to login using Admin User.
    Now u also check for following service are active in your ICF setting or not,( just start transaction code SICF)
    /default_host/sap/bc/bsp/sap
    /default_host/sap/bc/bsp/sap/system
    /default_host/sap/bc/bsp/sap/public/bc
    /def ault_host/sap/public/bc
    /default_host/sap/public/bc/ur
    /default_host/sap/public/bsp/sap/public
    /default_host/sap/public/bsp/sap/public/bc
    /defaul t_host/sap/public/bsp/sap/system
    /default_host/sap/public/bsp/sap/htmlb
    if not then activate all.
    check this link
    Read this weblog...
    /people/brian.mckellar/blog/2003/09/25/bsp-in-depth-fully-qualified-domain-names
    http://www.thespot4sap.com/articles/SAP_WAS_Creating_BSP_Apps.asp
    it consists of screen shots also
    Check it.
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/101c3a1cf1c54be10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e9/bb153aab4a0c0ee10000000a114084/frameset.htm
    Regards
    Anji

  • How to input data from labview to executable application and export the results back to labview

    I have a simple function written in m file under Matlab enviornment,
    function [c]=myadd2(a,b)
    c=a+b;
    I built it into a executable file (.exe), then I want to call it in labview and get the results.
    I followed this tutorial and some other information on line:
    http://digital.ni.com/public.nsf/allkb/5CF9526FF069EA8E862564C400579DBA
    But I didn't see any telling me how to get the Labview array data input to the EXE file and return the results data back to another indicator in labview.
    Any one have some idea?
    I appreciate the help very much.
    Arnold

    You probably need to include some command line arguments on your executable that would be the name of a file to get the data from. You could also include a command line argument telling that exe where to store the results.
    I am not familiar with Matllab to give you advice on how specifically to do that with your exe though.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Convert this query to ABAP and display the results

    Hi Everyone,
    I have a sql query in native sql (oracle). I want execute it in ABAP editor and display the results.
    I need to get this to an internal table and display the results. How do i write the script any help will be great use to me.
    Here is the query:
    <i> select (select decode(extent_management,'LOCAL','*',' ') ||
                   decode(segment_space_management,'AUTO','a ','m ')
              from dba_tablespaces where tablespace_name = b.tablespace_name) || nvl(b.tablespace_name,
                 nvl(a.tablespace_name,'UNKOWN')) name,
           kbytes_alloc kbytes,
           kbytes_alloc-nvl(kbytes_free,0) used,
           nvl(kbytes_free,0) free,
           ((kbytes_alloc-nvl(kbytes_free,0))/
                              kbytes_alloc)*100 pct_used,
           nvl(largest,0) largest,
           nvl(kbytes_max,kbytes_alloc) Max_Size,
           decode( kbytes_max, 0, 0, (kbytes_alloc/kbytes_max)*100) pct_max_used from ( select sum(bytes)/1024 Kbytes_free,
                  max(bytes)/1024 largest,
                  tablespace_name
           from  sys.dba_free_space
           group by tablespace_name ) a,
         ( select sum(bytes)/1024 Kbytes_alloc,
                  sum(maxbytes)/1024 Kbytes_max,
                  tablespace_name
           from sys.dba_data_files
           group by tablespace_name
           union all
          select sum(bytes)/1024 Kbytes_alloc,
                  sum(maxbytes)/1024 Kbytes_max,
                  tablespace_name
           from sys.dba_temp_files
           group by tablespace_name )b
    where a.tablespace_name = b.tablespace_name order by 1;
    </i>
    Thanks,
    Prashant.

    Hi Prashant,
    Native SQL commands in ABAP are placed between EXEC SQL and ENDEXEC. You can place all your statements in between these EXEC SQL and ENDEXEC in a report.
    EXEC SQL [PERFORMING <form>].
      <Native SQL statement>
    ENDEXEC.
    Check this link to know about Native SQL
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/frameset.htm
    Thanks,
    Vinay

  • Executing Abap Queries in Abap Code and processing the result

    Hi,
    I want to execute ABAP Queries (designed by sq01) in an abap report and processing the result in an internal table.
    How could it be work?
    Thanks a lot for your responses,
    with kind Regards
    Reinhold Strobl

    Hello,
    GO to SQ01 and select your query. Go to Menu QUERY-->More Functions->Display Report Name.
    You can then take that report name and go to SE38. Copy the code before END-OF_SELECTION and then modify as per your own requirements.
    Regrads
    Saket Sharma

  • Executing Procedure in SQL SERVER and Storing the results in Oracle 10g

    Hello,
    I am trying execute SQL SERVER procedure from Oracle 10g and store the results in a oracle table. When I tried executing the procedure i am getting errors.
    I am using Oracle Heteroeneous Services.
    Steps I followed.
    1. Created ODBC DSN on Oracle Server connecting to SQL SERVER database.
    2. Created Listner entry and TNSNAMES entries.
    3. Created Database link and able to select the data from the SQL SERVER tables.
    Here is the code i tried to execute the procedure.
    BEGIN
    "META"."extract"@abc;
    END;
    "META"."extract"@abc;
    ERROR at line 2:
    ORA-06550: line 2, column 1:
    PLS-00201: identifier 'META.extract@ABC' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    Please help me.
    Thank You,
    Seshadri Thope

    Hi thopevs,
    Can you please tell me the right syntax of calling procedures(on sql server) from oracle?
    I am getting following error:
    SQL> execute "GetdateSys"@oratosql;
    begin "GetdateSys"@oratosql; end;
    ORA-06550: line 2, column 7:
    PLS-00201: identifier 'GetdateSys@ORATOSQL' must be declared
    ORA-06550: line 2, column 7:
    PL/SQL: Statement ignored
    SQL>
    Your help will be highly appreciated.
    Thanks & Regards,
    M.U.N.A

  • I have a document made up of separate PDF files which reside in a folder and are linked to each other via hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I link from one PDF file to another and use the "Previous View" button

    I have a document made up of separate PDF files which reside in a folder and are linked to each other via hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I link from one PDF file to another and use the "Previous View" button to navigate back to my starting point the bookmarks are replaced by "page thumbnails". Is there anyway to stop this from happening?

    Hi Pusman,
    While setting up the links, if you choose to open the file in a new window then you won't face this issue, then you can simply switch to the previous file and bookmark view will remain as it is.
    Does that helps with your query?
    Regards,
    Rahul

  • How to execute a string formula and assign the result to a number field

    How to execute a string formula and assign the result to a number field
    Hi,
    we have a function that returns a string like this:
    '(45+22)*78/23'
    After we should calculate this string and assign the value to a numeric block field
    Example:
    k number(16,3);
    k:=fun1('(45+22)*78/23'); where fun1 execute and translate to number the string.
    Does exist a function like fun1 ??
    How can we do ?
    Regards

    Hello,
    this is the code that does the job:
    SQL> set serveroutput on
    SQL> DECLARE
    2 ch VARCHAR2(20) :='22+10' ;
    3 i NUMBER ;
    4 BEGIN
    5 EXECUTE IMMEDIATE 'select ' || ch || ' from dual' INTO i;
    6 dbms_output.put_line ('i = ' || TO_CHAR(i));
    7 END ;
    8 /
    i = 32
    Procédure PL/SQL terminée avec succès.
    SQL>
    just you have to do is to create a small stored function that take the string to calculate and return the number result
    Francois

Maybe you are looking for

  • Is it possible to migrate the app from latest version to older version

    Hi all, I have a adf application in jdeveloper 11.1.1.4.0.Due to some issues i have to do it in jdeveloper 11g release 2 (11.1.1.2.0).Is it possible to migrate the application from latest version to older version of jdev. Thanks.

  • Unable to use action blocks in xMII 12.0.2

    Hi, We recently started working on MII 12.0.2 and migrated our xMII 11.5 transactions using the migration tool provided by SAP with MII 12.0 version. In MII 12.0.2, when i open the migrated transactions all the action block images are shown as yellow

  • SCM export as SCAP: Issue with external variables

    SCM can export some of the baselines as SCAP v1.0 XML files (including CPE, OVAL and XCCDF). Here's an excerpt of an OVAL file generated by SCM for Windows 7: <definitions> <definition ...> <title>Network security: Do not store LAN Manager hash value

  • Advice for cleaning up files from my drive

    I'm going through old directories and want to delete what I do not need from old projects and transfer what I do to other drives. Is there any reason to keep: 1.) Thumbnail Cache Files? 2.) Render Files that have subfolders called Constant Frames? 3.

  • Change condition price

    When I create item in sales order, then it will determine the price using pricing procedure, I would like to know, can I write somethings in userexit, when the item create, the price will be hardcode somethings intead of use priceing procedure. For e