Execute query without navigation

hi all,
My problem today that I want to execute query without navigation.
I create a global variable
(:global.usr := :block.username;)
as you see the global variable takes the value of the current user accessing the system.
I want the user to be able to change his password without any privilage to see the other users.
when_new_form_instance
execute_query;
that what I did but what I want is to restrict his access only according to the value in the global variable

I tryed to run the following code but I dont know why the condition in the else clause always execute.     
if :global.usr = :global.usr = upper('ADMIN') or
     :global.usr = upper('SYS_ADMIN') then
     set_block_property('SYS_USER', DEFAULT_WHERE, '');
     execute_query;
     else
               set_block_property('SYS_USER', DEFAULT_WHERE, 'USER_NAME = :global.usr');
               execute_query;
     end if;

Similar Messages

  • Error when executing query without passing variable selection

    Hi Gurus
    I am getting an error while executing a query with out passing values for variables
    When executing the query by passing the filter values report returns the data
    When executing the query with out passing variable selections the error message is
    Unknown error in SQL interface
    Error reading the data of Info Provider ZCRM_O08
    Error while reading data; navigation possible
    System error in program SSAPLRS_EXCEPTION and form
    RS_EXCEPTION_TO_MESSAGE
    No Data Available
    can any one please help me in resolving this
    Thank you

    Hi Srini
    Thanks for your quick response
    When i am executing the query with selection it is returning the data
    giving error when executing with out passing the selection
    is there any other cause for this problem
    like any particular info object causes this sort of problem
    Thank you

  • How to validate a Query without executing it?

    How to validate a Query without executing it?
    For example if I have:
    ReadAllQuery myQuery = new ReadAllQuery(myClass);
    myQuery.setSelectionCriteria(myExpression);
    What can I do to have must validation as possible been done before executing the query?
    Validation that could be done are:
    - Expression reference fields that really exist in TopLink mapping
    - Literal provided to expression are of compatible type
    - Parameter setting set against the query are all compatible

    Your could prepare the query.
    query.prepareCall(session, record);
    This will do all query validation and generate the SQL for the query.

  • CPU Cost of a Query without executing it?

    Is there any mathematical formula to find CPU cost of a query without executing it? Thanks

    902181 wrote:
    Is there any mathematical formula to find CPU cost of a query without executing it? ThanksAny why do you want the cost? What do you expect it to tell you? How are you planning to apply this in your code? Make sure you understand what cost tells you and what it does not tell you. And use that value in a sane fashion.
    As for an alternative to using EXPLAIN PLAN, you can simply parse a SQL into a cursor without executing it. Then determine the SQL cursor id and address and use DBMS_XPLAN to display its execution plan.
    E.g.
    SQL> create or replace procedure ParseSQL( sqlStatement varchar2 ) is
      2          c       integer;
      3  begin
      4          c := DBMS_SQL.open_cursor;
      5 
      6          DBMS_SQL.parse(
      7                  c,
      8                  sqlStatement,
      9                  DBMS_SQL.native
    10          );
    11 
    12          DBMS_SQL.close_cursor( c );
    13  end;
    14  /
    Procedure created.
    SQL>
    SQL> var sqlID varchar2(100)
    SQL> var childNumber number
    SQL> var sqlText varchar2(4000)
    SQL> begin
      2          ParseSQL( 'select /* TEST1 */  * from emp' );
      3 
      4          select
      5                  sql_text, sql_id, child_number into :sqlText, :sqlID, :childNumber
      6          from    v$sql
      7          where   sql_text like 'select /* TEST1 */%';
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> col PLAN_TABLE_OUTPUT format a50
    SQL> select
      2          rownum, p.plan_table_output
      3  from       TABLE( DBMS_XPLAN.Display_Cursor( :sqlID, :childNumber, 'BASIC,COST' ) ) p;
        ROWNUM PLAN_TABLE_OUTPUT
             1 EXPLAINED SQL STATEMENT:
             2 ------------------------
             3 select /* TEST1 */  * from emp
             4
             5 Plan hash value: 3956160932
             6
             7 -----------------------------------------------
             8 | Id  | Operation         | Name | Cost (%CPU)|
             9 -----------------------------------------------
            10 |   0 | SELECT STATEMENT  |      |     3 (100)|
            11 |   1 |  TABLE ACCESS FULL| EMP  |     3   (0)|
            12 -----------------------------------------------
            13
    13 rows selected.
    SQL> The problem is extracting intelligence from the output as it is raw text. Perhaps not that complex as a where clause can be added to only display line id 0 and then extract the cost value from that line. Regular expressions (not my forte) will likely do this easily.

  • How to find out the current number of rows in a form without navigation

    Hi.
    Is there any way to count the rows in a form (block) without navigation to the last record?
    I am modifying CUSTOM.pll and have to count the rows before user commits changes.
    All records are new in this case. Can anyone halp me? Thanks.
    Regards
    Tomáš

    Magoo wrote:
    no, such a block-property ^unfortunately^ does not exists.
    you can just go to to the block, call the last_record build-in and find out, where the cursor is.
    But with this you call restrictred procedures and their are not everywhere allowed ...
    If you execute a query on a block, may not all records getting retrieved from database.
    For this forms does not know, how many records are really in the block and
    for this there is no build-in like get_block_property ( records_count ).It does exist indeed. GET_BLOCK_PROPERTY('BLOCK',QUERY_HITS);
    Of course, this will return the number of records that would get fetched to the block (based on the where condition), but not the records with NEW status (i.e new records which are not yet committed).
    -Arun

  • Error in while Executing Query in the Query Designer

    Hi,
    I  created info Set based two  info object and  three Data Store Objects. and join condition is Left Outer Join.
    there are Business Partner info object, CRM  BP Sales View Info Object and Data Store Objects are  BP: Roles (0BP_ROLE),Partner: Industries(0BP_IS),CRM Marketing Attributes for Business Partner(0ATR_DS01)
    I given some Selection Parameters while executing query in the Query Designer. in That i given city is selection parameters
    and i creted variable for this info object.
    it gives the Error Messages
    Beim Lesen der Daten sind Fehler aufgetreten. Navigation ist möglich
    Der Wert "New Delhi " von Merkmal 0CITY40 enthält an der 10.ten Stelle einen Fehler
    it is very urgent , can any one help me regarding this.

    Hi Reddy,
    The Error message in english is this
    While reading the data mistakes have appeared. Navigation is possible
    The value " New of Delhi " from sign 0CITY40 contains a mistake at the 10.ten place
    and i think you need to run the change run and run the report with out selecting the variable option.and navigate in the report by filtering the report for your requirement.
    Try this and let me know.
    Thanks,
    RK

  • 5200 : Error in executing  query -- Hyperion Financial Reporting

    Problem in accessing the Hyperion Financial Reports.User is having full access and able to access all the folders except one folder(Legal Folder reports). We are getting 5200: Error Executing the query error. Recently we have upgraded Hyperion to 11.1.1.3 version . Before upgrade user is not facing the problem. After Upgrade user is getting these errors while accessing the reports. we did research and found in "Error 5200: Error Executing Query" When Viewing Financial Reporting (FR) Reports". Is this error is relevant to the Information provided in Metalink and also can you please tell us is there any impact on doing the solution provided in the below. Why is this error is coming is any preferences needs to be changed.Please help us on this.
    Error Description:
    5200: Error executing query
    Servername/ApplicationName/DatabaseName/Error(1007090) Unknown Member name [Current Point of view for years] in Outline Query
    Doc ID 1107142.1:
    Possible Cause 1:
    If members have recently been added, moved, or deleted from the data source, Essbase, HFM, or Planning, the existing User POV records become out of sync.
    The User Point of View record uses indexing to identify the member. If the index changes because of changes in the outline, the User Point of View record no longer points to the correct location in the outline.
    To resolve the issue, you need to run the ManageUserPOV utility on a Windows server that has the Financial Reporting Reports Server, or in a Unix or Linux environment, has the Financial Reporting Print Server installed.
    You will need to provide a BIPlus Global Administrator user ID and password to run the utility.
    The utility will provide the correct syntax to run the command.
    1. In \Hyperion\products\biplus\bin\ManageUserPOV.properties, specify the following parameters:
    a. ReportServer
    b. DatasourceUser
    c. DatasourcePassword
    d. User
    e. Datasource (You can find the datasource in Workspace under Tools>Database Connection Manager in the Name column.)
    2. From the command line, cd to Hyerion\products\biplus\bin
    3. Type in "ManageUserPOV" without the quotes. The executable will read the parameters previously set in the ManageUserPOV.properties file.
    Thanks,
    Naresh.

    Take a look at this: http://adistrategies.com/index.php?loc=knowledge1&item=291
    Hope it helps.
    Mehmet

  • Error Opening Reports (Cannot find Dimension Scenario, Error executing query: the member null doesn't exist in this application)

    Hello,
    two of our users get the following error message, when opening two specific reports:
    First Report: Cannot find Dimension Scenario.
    Second Report: Error executing query: the member null doesn't exist in this application.
    Other users can access these reports, and the same users where the problem occurs can access other reports in the same folder.
    I set the same rights for me, but i can access the reports without problems.
    Somebody encountered the same problem before?

    Hi there,
    I had the same issue a few weeks ago... not sure how it happened but it was related only with my username.
    In order to fix it:
    1. I created a report which does not require to select the scenario in advance. Try to use the default data-grid that you get when you first create a report for example.
    2. When the user runs the report, try to see if he can see the dimension. Do not use the missing dimension on rows or columns. If he can see the dimension, ask him to select one scenario. This will solve the issue.
    3. If he cannot see the dimension, try to change the layout of the report.
    Regards,
    Thanos

  • CANT execute query with parameter on user defined tables using query genera

    Dear All,
    I have problem when executing query with parameter on user defined tables using query generator.
    It seems SBO cannot accept parameter to query user defined tables.
    I've tried these:
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = [%0] --- this FAIL
    I try to pass the value directly without using parameter and It works
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = 2 --- this SUCCESS
    This one works
    SELECT * FROM RDOC T0 WHERE T0.width =[%0]  --- this SUCCESS
    and this one works too
    SELECT * FROM RDOC T0 WHERE T0.width = 595  --- this SUCCESS
    Is there anyone can help me ....???
    Thanks,
    Alfa

    I  generated this code using query wizard ....
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = (N'2' )
    and replaced the (N'2' ) with [%0]
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = [%0]
    and It worked ......
    Thanks 4 all .....

  • Can I rewrite the following query without using Row_number() function ??!!

    Hello every one, can I rewrite the following query without using the 'ROW_NUMBER() OVER ' part.
    The query is supposed to pull out the records whose CODE is not NULL and has most
    recent date for UPDATE_DATE . The reason I wanted to do this is, When I embed this query
    in between many other queries along with JOINs, My oracle server is unable to execute. So, I thought
    its better to supplant 'ROW_NUMBER() OVER ' logic with something else and try it. .
    SELECT a.* FROM
    (SELECT b.*, ROW_NUMBER() OVER (PARTITION BY b.PIDM
    ORDER BY b.UPDATE_DATE DESC) AS Rno
    FROM
    SELECT *
    FROM SHYNCRO WHERE CODE IS NOT NULL
    )b
    )a
    WHERE a.Rno = 1

    Hi,
    You didn't write over 150 lines of code and then start testing it, did you?
    Don't.
    Take baby steps. Write as little as pssiblem test that. Debug and test again until you have something that does exactly what you want it to do.
    When you have somehting that works perfectly, take one baby step. Add a tiny amount of code, maybe 1 or 2 lines more, and test again.
    When you do get an error, or wrong results, you'll have a much better idea of where the problem is. also, you won't be building code on a flimsy foundation.
    If you need help, post the last working version and the new version with the error. Explain what you're trying to do in the new version.
    The error message indicates line 133. It looks like line 133 of your code is blank. Does your front end allow completely blank lines in the middle of a query? SQL*Plus doesn't by default; you have to say
    SET  SQLBLANKLINES  ONto have a completely blank line in SQL*Plus. (However, lines containing nothing but at commnet are always allowed.)
    You may have noticed that this site normally doesn't display multiple spaces in a row.
    Whenever you post formatted text (such as indented code) on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
    The 4 people who posted small code fragments for you to read all did this.  It would be so much easier for people to read your humongeous query if it were formatted.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Need to give access to users for report painter query without GR55

    Hi,
    I need to create a transaction code for a query created using report painter. We do  not want to give access to user for GR55.
    Please help us in achieveing this one or any other way to execute report without GR55 access.
    Regds,
    Servesh
    Moderator: Please, search before posting - it has been answered several times

    Hi,
    You can create the transaction the same using SE93 transaction code.
    Also see the below link for detailed rocess:-
    [http://home4sap.com/Blog/2009/08/how-to-create-a-transaction-code-for-report-painter-reports/]
    Regards,
    Gaurav

  • Looping a query without cursor

    Hi everybody
    i want to know that is there is any way by which we can loop through Resultset of a query without using cursor for loop in plsql
    vipul

    No. Reason:
    Any SQL statement in PL/SQL is a cursor. Any rows "obtained" from a cursor, is fetched via a read-cursor-loop mechanism.
    This can be an explicit cursor, where you open the cursor and manually code the loop with the FETCH statement.
    It can be an implicit cursor, where you simply code something like [SELECT col INTO var FROM table] - in which case PL/SQL still creates a cursor and still uses a cursor fetch to read the result of that cursor.
    PL/SQL is no different than Java or Delphi or C in this aspect. It takes a SQL statement and deliver that to the SQL Engine. The SQL Engine deals with SQL statements as cursors. It returns a cursor handle to the caller. The caller then has to fetch the rows from the cursor.
    What makes PL/SQL different is that the PL/SQL language and compiler integrates so tightly with SQL, that you can mix two different programming languages in the same source code. Unlike Java, Delpi and C, you can code native SQL inside your PL/SQL code. The PL/SQL compiler is clever enough to know what it can execute, and which source lines are SQL that need to be "wrapped and delivered" to the SQL Engine.
    Question though - why do you ask for another method? What do you view as a problem with using a cursor loop to fetch rows?

  • While Executing Query  with out giving any inputs  to selection variables

    Hi,
    While Executing Query   in the Query Designer  with out giving any inputs  to selection variables.  I got an error message  in german Language this is translating of german to English .
    In the reading of the data, mistakes appeared.  Navigation the value is contains possible "New Delhi" of feature 0CITY40 at that
    10. ten place a mistake Notification Number BRAIN 290
    This is very urgent  can you please help me .
    Thanks & regards
    Subba Reddy.

    Double click this error message it will give you more details. Post that.

  • Query without using connect by

    Hi Guys,
    I need to rewrite the following query without a connect by command. Is there a way to do this?
    [code]
    SELECT DISTINCT *
      FROM serial_structure_table str,
           serial_catalog_table   psc,
           serial_table           sop,
           life_serials_table     lls,
           part_table             mp,
           serial_parts_table     vs,
           events_table           pe,
           task_table             lmt
    WHERE str.part_no       = psc.part_no
    AND   str.serial_no     = psc.serial_no
    AND   str.part_no       = sop.part_no(+)
    AND   str.serial_no     = sop.serial_no(+)
    AND   str.part_no       = lls.part_no(+)
    AND   str.serial_no     = lls.serial_no(+)
    AND   str.part_no       = vs.part_no
    AND   str.serial_no     = vs.serial_no
    AND   mp.maint_prog     = vs.maint_prog_id(+)
    AND   mp.maint_prog     = vs.maint_prog_rev(+)
    AND   mp.part_no        = vs.part_no(+)
    AND   mp.maint_group    = vs.maint_group(+)
    AND   str.part_no       = pe.part_no(+)
    AND   str.serial_no     = pe.serial_no(+)
    AND   str.serial_no     = lmt.serial_no(+)
    AND   str.part_no       = lmt.part_no(+)
    AND   mp.maint_code     = lmt.maint_code
    AND   str.parent_seq_no IS NOT NULL
    AND   str.seq_no IN (SELECT seq_no FROM serial_table
                          START WITH seq_no = (SELECT vss.seq_no
                                               FROM serial_structure_table vss, vehicle_serial_table vehicle
                                               WHERE vss.part_no      = vehicle.part_no
                                               AND vss.serial_no      = vehicle.serial_no
                                               AND vehicle.vehicle_id = '120')
                          CONNECT BY PRIOR seq_no = parent_seq_no)
    [/code]
    Many Thanks,
    Napster

    Hi Frank,
    This query which fetches a data set to a report... So when executing this query in the report I will need to have a sql expression something like below...
    select *
    from MY_VIEW
    where vehicle.vehicle_id = '&Vehicle_Id'
    When the above is run user will be asked to insert a vehicle id and that will be the user input for my sql statement... (I inserted the value 120 here just for the testing purpose). In here I will need to create a view (something like MY_VIEW which consist of the entire sql expression) as long sql expressions are not supported in our tool. So I have to compile a view with the results set without the connect by clause...
    Just let me know if it is still not clear..
    Thanks
    Napster

  • How to design a query without using Net Weaver Query Designer

    Does anyone know if any alternative way to <b>design an query without using Net weaver GUI</b>? in order to reduce the time consuming, I am wondering if there have any method which can define/modify a stack of cells, characteristics and structures without work through the GUI.
    Deeply thank for any of your advices.

    Can you give an example?
    Just from what you write, I would assume that you talk about something like a mass-property-changer. As far as I know the BEx this is not really possible, but what I do normally is building one query and then either using query-views (saving more or less the navigation state) or by copying and changing the properties of the few characteristics and key figures.
    But without a specific example it's difficult to exactly understand what you exactly need.
    Mario

Maybe you are looking for

  • How do I stop iTunes from automatically changing artist, album.....?

    How do I stop iTunes from automatically changing artist, album, and genre names? I keep my itunes library folder very organized. You wont find the same artist spelled two different ways in it. But itunes automatically changes the artists, album names

  • How to setup outlook on my laptop

    How do I set up outlook on my laptop so I can view my 2me.com mail?

  • Plot fill hides the grid.

    I want to use color regions on my graph. But, if I use a background image, it doesn't adjust with the scale. If I use plot fill and create data arrays for my boundaries, it hides the grid. Does anyone know how to accomplish this? (see attached pictur

  • Class not found JBoss rules

    servlet crashes at run time: 06/09/27 16:44:52 CharScanner; panic: ClassNotFoundException: org.antlr.stringtemplate.language.ChunkToken 06/09/27 16:44:52 Shutting down OC4J... I've checked and the class is included in the project libraries (In fact I

  • How to trouble shoot my HP 380 G5 server

    my HP 380 G5 server is not booting please i need manual for it. the manual should be sent to this e-mail [email protected]