Get query results to itab; using RSCRMBW_REPORT?

Hi,
I am interested in "calling" a BW query from an R/3 system and getting the results in an internal table.  I'm on the path of using function module RSCRMBW_REPORT, but I'm not sure how to use it since I keep getting an error: "Could not find query definition:" - maybe I am not using the correct parameters?
Currently I'm using:
I_MODE                          OPEN
I_REPORTUID                     Z0VENDOR_TEST >>>the name of the query that I'm trying to test
(along with the defaults).
If anyone can please help out; I'd really appreciate it
Thanks!!

Hi
look at these threads:
Re: Calling BW queries programatically
Re: RSCRM_BAPI
I hope it helps.
Edan

Similar Messages

  • 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

  • Getting query results from a PL/SQL procedure

    Hi! So, I’m a little stumped and I can’t seem to find the answer to what I believe is probably a simple question…
    So, here goes… I have a big ol’ union query that I use to create a report on a page, it’s about 25k – not over the 32k limit, but fails to be able to compile every time (I always get a 400 – Bad Request error). I’m not sure why this is happening, but I can remove a union statement and it compiles just fine – so it has something to do with the size of the query. ANYWAY – I’ve resolved that I should put this bad boy into the database as a stored procedure and just call it from Apex, my problem is I can’t figure out quite how to do this with variables, etc.…
    Instead of giving you my whole big query, I’ll use the emp table as the concept is the same:
    Say we have a query that creates a report on a page:
    select empno, ename, job, mgr, hiredate, sal, comm, deptno
    from emp
    where job = :P_JOB
    and hiredate >= :P_HIREDATE;
    How would I take this query, create it as a stored procedure on the db, pass the variables from Apex and return the query result set from the stored proc as a report?
    I really appreciate any help on this!
    Best,
    Gilcrest

    Hi Gilcrest,
    You should create the query as a View and use the view name and the WHERE clause in the report's sql source.
    Andy

  • Get query result in E-mail

    Hi Everyone,
    I am trying to get SQL Query Result in e-mail with proper format.
    I tired DB mail but result is not in proper format . It's hard to read from attachment. 
    From Below Query HTML format showing first 3 columns good after that all getting mixed up. 
    Select Ticktsno,customer_Id,Phone,Open date-time,OpenedBy,Assign_to,Category,Support_level,Incident_type,Description from dbo.query_result. 
    HTML Code: 
     if @@ROWCOUNT > 0
    begin
    declare @emailSubject varchar(100),
      @columnHeaders varchar(1000),
      @tableHTML nvarchar(max)
    select @emailSubject = 'My Results Email',
          -- Subject of Email
      @columnHeaders = 'tickets</th><th>Customer</th><th>Phone</th><th>Open Date/Time</th><th>OpenedBy</th><th>Assign_To</th><th>Category</th><th>Support_Level</th><th>Incident_Type</th><th>Status</th><th>DEscription'
       -- Column headers (must put </th><th> between each header)
    set @tableHTML =
      '<div><b>My Email Header</b></div><br>' + -- This is the bold text at the top of your email
      '<table border="1" cellpadding="5"><font face="Calibri" size=2>' +
      '<tr><th>' + @columnHeaders + '</th></tr>' +
      convert(nvarchar(max),
       SELECT td =  Tickets,       '',
                        td =  Customer, '',
                        td =  Phone, '',
                        td = [Open Date/Time], '',
                        td = OpenedBy, '',
                        td = Assign_To,
                        td = Category,
                        td =  Support_Level,
                        td = Incident_Type ,
    td = [Description]         
                         from master.dbo.QueryResult_2000
       for xml path('tr'), type))
      +'</font></table>'
    EXEC msdb.dbo.sp_send_dbmail @recipients='[email protected]',
        @subject = 'Query Result',
        @body = @tableHTML,
        @body_format = 'HTML' ;
    end
    What changes should make in HTML code to get report in proper HTML  format
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach A.Shah

    Thanks Uri for kind reply..I was able to edit that script. Script is running fine from SSMS and sending e-mail notification. But When I am running from SQK agent job getting successful but not getting e-mail notification.
    I enabled the profile from SQL job properties also. 
    Any thoughts on this?
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach A.Shah
    Hi Logicinisde,
    According to your description, if you run the scripts in the SSMS, it can send an email with HTML format to your mailbox. When you run this scripts by using SQL Server Agent job, it can show running successfully but you could not get any email. We need to
    verify if you select the correct Mail profile. After configuring the alert system, restart the SQL Server Agent service. If you experience any problems sending e-mail notifications through the SQL Server Agent, check the service account that the agent is running.
    If the SQL Server Agent is running with one of the built-in accounts like the Local System account, resources outside the SQL Server machine will be unavailable. This includes SMTP mail servers that are on other machines. If this is the case, change the service
    account for the SQL Server Agent to a domain account to resolve this issue.
    For more information about using Database Mail in SQL Server and using Database Mail with SQL Server Agent, you can review the following articles.
    http://www.idevelopment.info/data/SQLServer/DBA_tips/Database_Administration/DBA_22.shtml
    http://technet.microsoft.com/en-us/library/ms190606(v=sql.105).aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Ps query results to xml using xml link function registry

    In People tools version 8.46 we need something like where the ps query result output is in the form of XML so that it can be used for external system. The catch I cannot use webservices. It is something like opening peoplesoft queires form excel using hyperlink but in this case we need xml. I looked at David Vandiver's Excel XML libraries which open the data in excel but is there something where the hyperlink output is xml using xml link function registry. I have capatured the data in rowset and now need to create mime type of xml to write the data
    thanks in advance
    vinn

    If I understand correctly, you want to use something like Microsoft Excel's web queries to get data from a PeopleSoft query in XML format. I have never done this before, but if I were to implement this, here is what I would do in PT 8.46:
    1. Create an unstructured message in app designer.
    2. Create a user that only has access to the queries you want to expose to Excel
    3. Write synchronous message handler PeopleCode to call SwitchUser to switch to a specific query user rather than the generic integration broker user and execute a query, returning the results in XML (see [Query.RunToRowsest|http://download.oracle.com/docs/cd/E13292_01/pt849pbr0/eng/psbooks/tpcr/htm/tpcr31.htm#d0e113933] for an example).
    4. Call the message through IB using the HTTP GET URL format as defined in PeopleBooks: [http://download.oracle.com/docs/cd/E13292_01/pt849pbr0/eng/psbooks/tibr/book.htm?File=tibr/htm/tibr33.htm#H4026|http://download.oracle.com/docs/cd/E13292_01/pt849pbr0/eng/psbooks/tibr/book.htm?File=tibr/htm/tibr33.htm#H4026].

  • How to get Query Results based on Analysis Authorization Ranges????

    Hi Experts,
    I have gone through the lot of SDN Links, however not able to find the answer to my question.
    I have an Authorization Issue, “NO Authorization “
    Error : EYE 007 ( Insufficient Authorizations )
    <b>Here is the issue:</b>
    Need to see the complete query result when I gave the range in Analysis Authorization for Controlling Area 001-005. Controlling Area is auth relevant and right now a variable is inserted in the query for it. If I select Controlling Area 001, the result for Controlling Area 001 is displayed in query. If 002 then also displayed. If I do not enter anything, then I get the <b>Eye 007 error message</b>.
    I am not sure how do I display/authorize the entire result in the query for all the Controlling Areas, I have authorized user to see??
    <b>Its really urgent, please help..!</b>
    Here are the logs:
    Authorization Check Log
    Date and Execution Time (Local Server)
    Execution Date: 06.09.2007
    Execution Time: 14:48:41
    Executed Query: 0CCA_C11/GBCCA_MP01_Q0002_AP
    Executed by User ZBI_TEST_001
    Executed with Analysis Authorizations of Another User ZBI_TEST_001
      InfoProvider Check  
    Building the Buffer...
    ...Buffer Built
    Are there authorizations for accessing InfoProvider 0CCA_C11 with activity 03?
    Authorization exists for general access to InfoProvider 0CCA_C11 with activity 03 
      InfoProvider Check  
    Authorization exists for general access to InfoProvider 0CCA_C11 with activity 03 
      Relevant Characteristics for Detailed Authorization Check  
    (Characteristics with Full Authorization Are Not Listed!)
      List of Effective Authorization-Relevant Characteristics for InfoProvider 0CCA_C11:  
    0CO_AREA 
    0TCAACTVT 
      Relevant Characteristics for Detailed Authorization Check  
    (Characteristics with Full Authorization Are Not Listed!)
      List of Effective Authorization-Relevant Characteristics for InfoProvider :  
    List Is Empty:
      There Are No Characteristics That Have to Be Checked in Detail  
      Authorization Check  
      Detail Check for InfoProvider 0CCA_C11  
      Preprocessing:  
    Selection Checked for Consistency, Preprocessed and Supplemented As Needed
    Subselection (Technical SUBNR) 1
    Check Node Definitions and Value Authorizations...
    Node- and Value Authorizations Are OK
    End of Preprocessing
    Filling the Buffer...
    ...Buffer Filled
      Main Check:  
      Subselection (Technical SUBNR) 1  
    Supplementation of Selection for Aggregated Characteristics
      No Check for Aggregation Authorization Required  
    Following Set Is Checked  Comparison with Following Authorized Set  Result  Remaining Set 
    Characteristic  Contents 
    0CO_AREA
    0TCAACTVT
    SQL Format:
    CO_AREA = '0003'
    AND TCAACTVT = '03'
    Characteristic  Contents 
    0CO_AREA  I BT 0001 0005
    0TCAACTVT  I EQ 03
    I EQ 16
    Authorized   
      Subselection (SUBNR) Is Authorized  
      Authorization Check Complete  
      Authorization Check  
      Detail Check for InfoProvider 0CCA_C11  
      Preprocessing:  
    Selection Checked for Consistency, Preprocessed and Supplemented As Needed
    Subselection (Technical SUBNR) 1
    Check Node Definitions and Value Authorizations...
    Node- and Value Authorizations Are OK
    End of Preprocessing
    Filling the Buffer...
    ...Buffer Filled
      Main Check:  
      Subselection (Technical SUBNR) 1  
    Supplementation of Selection for Aggregated Characteristics
      No Check for Aggregation Authorization Required  
    Following Set Is Checked  Comparison with Following Authorized Set  Result  Remaining Set 
    Characteristic  Contents 
    0CO_AREA
    0TCAACTVT
    SQL Format:
    TCAACTVT = '03'
    Characteristic  Contents 
    0CO_AREA  I BT 0001 0005
    0TCAACTVT  I EQ 03
    I EQ 16
    Partially or Fully Authorized (Intersection)   Characteristic  Contents 
    0CO_AREA
    0TCAACTVT
    SQL Format:
    ( CO_AREA < '0001'
    OR CO_AREA > '0005' )
    AND TCAACTVT = '03'
    Value selection partially authorized. Check of remainder at end
    Following Set Is Checked  Comparison with Following Authorized Set  Result  Remaining Set 
    Characteristic  Contents 
    0CO_AREA
    0TCAACTVT
    SQL Format:
    ( CO_AREA < '0001'
    OR CO_AREA > '0005' )
    AND TCAACTVT = '03'
    Characteristic  Contents 
    0CO_AREA  I BT 0001 0005
    0TCAACTVT  I EQ 03
    I EQ 16
    Not Authorized   
    All Authorizations Tested
      Message EYE007: You do not have sufficient authorization  
      No Sufficient Authorization for This Subselection (SUBNR)  
    Following CHANMIDs Are Affected:
    184 ( 0CO_AREA )
      Authorization Check Complete  

    Hi,
        Have you defined the vaule for 0CO_AREA as BT 001-005 in you Authorization for 0CO_AREA.Also how have you defined your Authorization Variable on the query? Have you define as select options or interval? I thing you need to define it as interval or select options.
    Hope it helps,
    Cheers,
    Balaji

  • Export query result to csv using Export Wizard

    Been a decade since I last used Oracle and related tools.
    I had to use Oracle server again, I have a query over multiple tables, I am to run a scheduled script that will spit out the query result as a csv file.
    I started with SQL Developer Export wizard, in step "Specify Data", I am at a loss, where to specify the query itself? I see a Name,Schema,Type input, a text area below, Up,UpAll,Down,DownAll buttons etc etc. Where do I specify my query here? Can someone please help?
    Is this the best way to go about to schedule a data export (query to csv) daily?

    To export a user query rather than a whole table, run it in a worksheet and export using the context menu on the result grid. However none can be scheduled.
    Instead you can look at the SPOOL command and schedule it through SQL*Plus. Any questions can go to the iSQL*Plus and/or SQL And PL/SQL forum.
    Have fun,
    K.

  • Retrieving BEx Query Results Area for use in Excel formulas

    Hello,
    I run BEx queries in workbooks and then use Excel formulas ( mostly VLOOKUP(LookupValue, ResultsArea, ColumnReturned,) ) to retrieve certain information from the query ResultsArea.
    ****Problem:
    Depending on the query parameters, the query "Results Area" is larger or smaller.
    ****Non-optimal solution:
    One way to define the  ever changing Excel range occupied by the Results Area is to create an Excel name as:
    QueryRange = OFFSET(QueryFirstCell,,,COUNTA(OFFSET(Sheet1!$A:$A,,COLUMN(QueryFirstCell)-1,,)),COUNTA(OFFSET(Sheet1!$1:$1,ROW(QueryFirstCell)-1,,,)))
    Then, the only input required is the top-left cell of the Results Area, which stays the same (unless the query definition changes).
    ****Question
    What is the best way to refer to an ever-changing query Results Area in an Excel formula?
    Thank you!
    Louis

    It is actually much easier than that.
    Use a VBA statement like the following:
    Set RptRng = ActiveCell.CurrentRegion
    This will retrieve the data in the Results Area, no matter what the size is.
    Hope this helps...
    Bob

  • Can't get the result if I use SUBSTR From the resultSet

    Hi,
    I have a request that make some changes on a String data.
    This modification is an extraction of a sub string with SUBSTR function of oracle.
    The problem is that I can to get the result on my java code
                   pst = connect.prepareStatement(GET_PATH);
                   rset = pst.executeQuery();
              while (rset.next()) {
                   String chemin = rset.getString("IMG_PATH"); // rset.getString(2);
                   system.out.println("Le chemin récuperé de la base est : " + chemin);
                   chemins.add(chemin);
              }this is the request :
    SELECT DISTINCT nl.img_id, SUBSTR(ni.img_chemin, 1, INSTR(ni.img_chemin, '\', -1)) IMG_CHEMIN from images nlThe oracle documentation say the SUBSTR function return a STRING type.
    Thnaks for your help. (And sorry for my little english)
    Technical Information :
    DB : ORACLE
    DRIVER VERSION : ojdbc14-10.2.0.3.0.jar (tested with version 9 same thing)
    Java 6 update 3
    Edited by: Aberghouss on 29 août 2008 17:11

    Aberghouss wrote:
    Hi,
    I change the INSTR(ni.img_chemin, '\', -1) by number 20 and the program get correctelly the value
    SELECT DISTINCT nl.img_id, SUBSTR(ni.img_chemin, 1, 20) IMG_CHEMIN from images nlNow have you any idea how can I resolve this problem with INSTRLittle confusing what you are actually doing.
    You need to post code that actually has the problem.
    Given that you are using names, rather than indexes, usually the problem is that the name doesn't match what is actually in the meta data. Try printing the meta data. And try using indexes just to verify that there is in fact a result (which would be another reason for not getting it.)

  • Why do I get this result when I use split

    Hello guys
    I have created a script that looking for the active path,
    var myPath = (File($.fileName).parent.parent.parent.fullName);
    alert(myPath)
    I recieve "/xxxxx/xxxx/xxxx/341542"
    the only thing I am interested of in this information it's the number,
    so I added on the code
    var myPath = (File($.fileName).parent.parent.parent.fullName).split("xxxx/xxxx/xxxx/");
    the problem is
    I recieve ",341542"
    why do I recieve a comma before the number??
    there is no comma. in the path.

    Laubender,
    in my opinion on Mac OSX  path.fullname also get the folderpath separated with "/"
    Isn't it so?
    But back to the problem.
    The best way is to use name instead of fullname:
    alert(decodeURI(File($.fileName).parent.parent.parent.name))
    Otherwise with the match function:
    If there are no digits at the end of the path - the result is null and match fails.
    I'm with Trevor and Kai Rübsamen: .match(/[\/:]\d+$/) or the split method should be the best in this case.

  • Displaying Query Results as Hyperlinks using PHP

    I have a table returning a query, one of the fields returns
    an email address. I want to link this so the admin user can click
    on it and have his or her email client open to that address. The
    address does not go in the DB as a link. Here is the code:
    .$row[4]. being the returned value, I tried adding a <a
    href='mailto:'> the value</a> several different ways but
    it just breaks the page. any insight?
    Thanks,
    Steve

    steevo2 wrote:
    > Thanks, it didn't work , but got me going in the right
    direction. double
    > quotes will not work inside any tag
    Complete nonsense. The reason it didn't work is because I
    missed out a
    single quote. The correct code is this:
    echo '<td width="175"><a
    href="mailto:'.$row[4].'">'.$row[4].'</a></td>';
    Note the extra single quote after the first $row[4].
    > Double quotes do work outside of tags, I have them
    surrounding the rest of my
    > table tag elements, but single quotes work in that
    respect as well.Thanks for
    > responding, plan on getting your books soon.
    If you get one of my books, you'll find a detailed discussion
    of the
    difference between single and double quotes, and how to mix
    them. It's a
    subject that confuses many beginners. And, as my mistake
    shows, it
    catches out more experienced people too. The difference
    between a
    beginner and a more experienced developer is that the latter
    can spot
    more quickly where the error lies.
    > I must confess, pulling this off
    > in CF is much easier. But hey, open source is free. I
    use CF at work and PHP at
    > home.
    Personally, I don't find CF easier, but I'm sure it's more a
    question of
    what you're used to, rather than one being "easier" than the
    other.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • How to execute SQL Query in Code behind Using infopath 2010?

    Hi,
    I've repeatable on infopath form, and want bind it throuth code behind from SQL table. My question is that how to execute SQL Query in code behind from infopath as well as how would get Query result to bind repeatable control?
    Thanks In Advance
    Shoeb Ahmad

    Hello,
    You first need to add new SQL DB connection then you need execute connection from code behind.
    See below link to create new connection
    http://office.microsoft.com/en-in/infopath-help/add-a-data-connection-to-a-microsoft-sql-server-database-HP010092823.aspx:
    http://www.bizsupportonline.net/infopath2010/connect-infopath-2010-sql-server-2008-table.htm
    Then use below code to execute this connection:
    AdoQueryConnection conn = (AdoQueryConnection)(this.DataConnections["Data connection name"]);
    string origCommand = Select * from tablename;
    conn.Command = origCommand;
    conn.Execute();
    Finally bind your table:
    http://www.bizsupportonline.net/infopath2007/4-way-programmatically-add-row-repeating-table.htm
    http://stevemannspath.blogspot.in/2010/09/infopath-20072010-populate-repeating.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Search criterias in one page, the query results in another page?

    Hi, can I put search criterias in one page, and get query results in another page?
    Need help
    Thanks in advance
    karman

    If you meant a situation like: Page 1 has some items and page 2 has a report which refers page 1 itemsThen your report _query would fetch proper results provided the page 1 item values are available in the session_.
    That is, after submitting their values(using page submit,dynamic action,ajax etx) to session state , their values would be available in any page (anywhere in that session ) , until the page cache for the item page(page 1) is cleared.

  • Problem viewing Query Result

    Hi- I occasionally come across this issue when I run any query in SQL Developer (3.0.02), the Query Result tab shows a bold red Exclamation point and the display grid is blank. It says "Fetched 50 rows in 0.235 seconds" but the results aren't displayed. There is nothing wrong with the queries so it seems like some type of display problem but I can't figure out how to fix it. Like I said, it doesn't happen all the time and I run the same saved queries so I know it's not a problem with the actual queries. Has anyone ever seen or heard of this before?

    Hi,
    Sounds like you are using an early adopter version of 3.0. Why not upgrade to the latest production release (3.1.07.42)?
    A similar situation is described in this old thread:
    Re: Randomly not getting query results
    Regards,
    SQL Developer Team

  • How to get the query result of improvement (Before and After ) using sql de

    how to get the query result of improvement (Before and After ) using sql developer.

    Check
    http://www.oracle.com/technetwork/articles/sql/exploring-sql-developer-1637307.html

Maybe you are looking for

  • How to get an accounting document number from an Invoice number

    Dear All, I have a requirement where I need to know which accounting document is created against a  particular invoice. As we know that in the document flow of invoice we can see the Accounting document also. But to develop the report I need to pick

  • Time Machine drive is no longer readable

    I have just completed a reformat of my MacBook Pro early 2011 with an install of Mavericks.  I have a Time Machine backup drive that I have manually been pulling files from.  It has been working great with no issues.  I decided to plug the Time Machi

  • External hard drive for quick access to photos/music

    Hi! I have a 13" Macbook Pro circa 2009. I want to purchase a large and fast external hard drive that I can actively use. Meaning this external hard drive would become my storage for all photos and music, NOT just a backup drive. I want to be able to

  • Apple applications crashing immediately on launch

    Hi All I am having a problem with a 2007 iMac running 10.7.2. Whenever I try to launch an Apple application almost all of them are immediately crashing. This includes Safari, Mail, iTunes etc. Non-Apple applications like Word, Excel (2008) seem to be

  • Where are MY ALERTS and weekly lists of new releases

    I regret downloading Itunes 9. I know how difficult it is to undo it. There are many things I don't like, but particularly I can't seem to access my alerts nor to be able to browse the weekly lists of new releases. Judging by all the complaints I hop