Current Query in Query mode

Hello.
I have the following scenario.
When user presses f7 to enter query mode, he has a choice to immediately press f8 to execute query(retrieve all data) or to enter values in random fields and then press f8. So in first case, if user doesn't enter any values, I need to know that user didn't enter any values, so I can execute a select statement with proper where clause.
So is it possible to get select statement that would be executed on pressing f8 in pre-query trigger and modify it or just to know if user has entered any values while in query mode ?
Thanks in advance.

I've encountered another problem.
When I loop through all items on data block, i don't know how to get current value of that item.
Here's part of my code:
loop
w_nextItem := get_item_property(w_block||w_nextItem,nextitem);
begin
w_item := find_item(w_block||w_nextItem);
if lower(get_item_property(w_block||w_nextItem,item_type)) <> 'button' then
if get_item_property(w_block||w_nextItem, database_value) is not null then
return true;
end if;
end if;
exception when others then
null;
end;
exit when w_lastItem = w_nextItem;
end loop;
I tried to use database_value property, but that would return value fetched from database and I need the one user entered in query mode.
So is it possible to get the value of an item through properties or somehow else ?
Thanks.

Similar Messages

  • Get Current year in Query Designer

    Dear all
    I don't know how to determine current year in Query Designer.
    I have a report, i want to see some indexs in bance sheet and income statement in current year and previous year. but, I can only assign with the fixed year (ex, 2010), this is not flexible. I want to get current year on system and calculate previous year.
    Please help me solve this problem
    Thanks

    Hi,
    You can use the SAP Exit variable 0CALYEAR for current year. For Previous year you can offset this by -1.
    You can refer this link for more Information,
    http://help.sap.com/saphelp_bw33/helpdata/en/3f/89533e5ff4d064e10000000a114084/content.htm
    Regards,
    Hari.
    Edited by: Hari Krishnan K on Jul 20, 2010 10:36 AM

  • How to display current date in query header?

    Hi,
    How to display current date in query header?
    I use Query Designer for development.
    Thanks,
    Arun KK

    Hi Arun,
    You can define fixed header lines and footer lines so that when you generate the query list, they can receive current values of certain fields. When you define a header line or a footer line, you must specify a character string of the type &field, where field is the short name of a field.
    This function allows you (for example) to place a sort criterion in the header line.
    You can include the following fields as variables in the headers directly:
    %NAME
    Name of the user processing the query
    %DATE
    Current date
    %TIME
    Current time
    %PAGE
    Current page number (6 characters)
    %P
    Current page number (3 characters)
    These fields can be used in the short forms N,D,T and P. If you want to use these letters as short names for query fields, the field values from the query are used.
    You can also see the link
    [http://help.sap.com/saphelp_nw70/helpdata/EN/6e/dd68721faf11d6b1d500508b6b8b11/frameset.htm]
    Regards,
    NR

  • SEM CPM - Link a Query in Web Mode

    Hi all,
    Im working with SEM-CPM ; i can't add a link to a query in web mode ; i have tried this :
    1)Add URL ; works fine but i cannot add the URL dinamycally in order to take the local server ; for example when i transport to QAS then links points to DEV.
    2)Add Query : execute the query in Excel.
    How can i add a link to a report in order to executed in Web Mode ?
    I will rewards asap.
    Thanks !!

    Hi,
    You have to assign the URL of the respective Query Link as per the connectivity of
    the server..if it is DEV then you can specify only DEV Query link with DEV Web Browser connectivity..and similar to PRO..
    I think you cannot cross link the URL - Query Links with DEV to PRO or visa versa..
    Hope this helps..
    assign points if useful..
    Cheers,
    Pattan.

  • Hide Operators select box in Query Panel Advanced mode

    Hl All,
    I need to Hide all operators in the select Dropdown in the View Query Panel Advanced mode.
    Please help me.
    Thanks,
    Balaji Mucheli.

    Hi Balaji,
    Use the below code for operator hide
         <CompOper Name="Equals" Oper="=" ToDo="-1"></CompOper>
        <CompOper Name="Does not Equal" Oper="&lt;&gt;" ToDo="-1"></CompOper>
        <CompOper Name="Less than" Oper="&lt;" ToDo="-1"></CompOper>
        <CompOper Name="Less than or equal to" Oper="&lt;=" ToDo="-1"></CompOper>
        <CompOper Name="Greater than" Oper="&gt;" ToDo="-1"></CompOper>
        <CompOper Name="Greater than or equal to" Oper="&gt;=" ToDo="-1"></CompOper>
        <CompOper Name="Name" Oper="BETWEEN" ToDo="-1"  MinCardinality="0"  MaxCardinality="0"/> 
        <CompOper Name="Name"  Oper="NOTBETWEEN"  ToDo="-1"  MinCardinality="0"  MaxCardinality="0"/>
        <CompOper Name="Name" Oper="ISBLANK" ToDo="-1"  MinCardinality="0"  MaxCardinality="0"/> 
        <CompOper Name="Name"  Oper="ISNOTBLANK"  ToDo="-1"  MinCardinality="0"  MaxCardinality="0"/>
    Thanks
    Prabhat

  • Query read / cache modes are set in BW

    Hi Experts,
    What is query read / cache modes are set in BW in order to improve the query performance?
    Thanks
    Rohan

    Hi
    The read mode determines how the OLAP processor gets data during navigation. You can set the mode in Customizing for an InfoProvider and in the Query Monitor for a query.
    http://help.sap.com/saphelp_nw04/helpdata/en/57/b10022e849774f9961aa179e8763b6/content.htm
    Assign points if it helps...
    Regards,
    ARK

  • How to set input ready query to display mode and set edit mode in WAD?

    when I create A input ready query but not set query propery  start  query in change mode ,but I want to set this query in input ready mode ,how to set this in WAD?
    hope anyone can help me
    regard  by
    wenlong

    Hi,
          You can get all the info from this thread , try it out
           WAD - set data entry mode
           Hope it helps.
    Regards,
    Priya.

  • Error while trying to Open and Delete a BEx Query in Query Designer.

    Hi Experts,
    I have been facing this issue with BEx Query in Designer mode for a couple of days now in Development Environment in BI 7.0.
    I would like to Delete an unwanted BEx Query because I need to give it's name to another BEx Query.
    Whenever I try to Open this Query in BEx Query Designer to Delete, it gives out an error saying:
    "An error occurred while communicating with the BI server.
    As a result of this error, the system has been
    disconnected from the BI server.
    Detailed Description:
    STOP: Program error is class SAPMSSY1 method : UNCAUGHT_EXCEPTION
    STOP: System eror in program CL_RSR and form GET_CHANMID-01 - (see long text)"
    Details text is as below:
    Diagnosis
    This internal error is an intended termination resulting from a program state that is not permitted.
    Procedure
    Analyze the situation and inform SAP.
    If the termination occurred when you executed a query or Web template, or during interaction in the planning modeler, and if you can reproduce this termination, record a trace (transaction RSTT).
    For more information about recording a trace, see the documentation for the trace tool environment as well as SAP Note 899572.
    I have tried with SAP Note 899572, but still it's the same.
    Has anyone faced similar issue? Could you please let me know if you have better ideas or solution?
    Your time is much appreciated.
    Thanks,
    Chandu

    Arun - Thanks a million. You saved me Nine. It worked.
    Could you also please tell me how to rename (Technical) a Query or is it still "Save the Query As" the only way...?
    Points already assigned.
    Thanks,
    Chandu

  • Unable to create new query using query manager

    Hi friends,
    I have been trying to create a query using query manager for couple of hours but still not able to.I am following the instructions given in oracle Peopletools 8.52 : Peoplesoft query
    Chapter - creating new queries.
    Below are the steps I am going through to create new query:
    Step - I open the component Reporting Tools-> Query->Query Manager , I don't get the tabbed pages one for search an existing query and another for create new query.
    Please follow this link to see how the page is displayed in first step:
    http://uploadpic.org/v.php?img=EvMvVAXX1E
    Step 2 - When I click on create new query link, I am redirected to a page where it asks for record name to add in the query. But, even this page is not displayed as how it supposed to be
    http://uploadpic.org/v.php?img=GzHh3f6krU
    Step 3 - Following the above step, when I click on Person record to add into my query I am asked to select the fields that I want to display in the output.
    But I somehow do not get the proper tabbed pages where individual pages are there to add the attributes to complete the query like adding multiple records, fields, query, expressions, prompt...etc
    http://uploadpic.org/v.php?img=Wbbla3Q3jE
    I am neither able to select multiple records in my query nor able to customize my query to get the desired results.
    Below is the query that I want to create using query manager:
    SELECT P.EMPLID,P.BIRTHDATE, N.NAME, A.ADDRESS1, A.ADDRESS2, A.CITY
    FROM PS_PERSON P, PS_NAMES N, PS_ADDRESSES A
    WHERE P.EMPLID = N.EMPLID AND
    N.EMPLID = A.EMPLID AND
    P.BIRTHDATE BETWEEN to_date('1990/1/1','yyyy/mm/dd') and to_date('1991/1/1','yyyy/mm/dd');

    Hi,
    As I cannot access your screenshot by the blocking of company firewall rules.
    I'm guessing currently you are using PT 8.52.00 version, correct?
    This should be a bug, that you need to apply the 8.52.0X patch, not sure which patch fix this, you can apply the latest one to solve this issue for no tab page of query manager. (PT 8.52.06)
    Hope this helps.
    Thanks,
    Saxon SI

  • Query Of Query Not Working

    What is wrong with this query of query... Basically it seems like the "IF" logic in the select statement isn't looking at the current results, but instead the first line of the AllCategories() query.  Any ideas would be much appreciated.
        <cffunction name="getCategoryDetail" returntype="query" >
            <cfargument name="CategoryID" default="">
            <cfset AllCategories = Application.Celerant.QueriesCached.getAllCategories()>
            <cfquery name="CategoryDetail" dbtype="query" >
                SELECT
                    <cfif AllCategories.typ eq 'EMPTY'>
                        'DEPT' as ThisLevel,
                        AllCategories.Dept as ThisName
                    <cfelseif AllCategories.subtyp_1 eq 'EMPTY'>
                        'TYP' as ThisLevel,
                        AllCategories.typ as ThisName
                    <cfelseif AllCategories.subtyp_2 eq 'EMPTY'>
                        'SUBTYP_1' as ThisLevel,
                        AllCategories.subtyp_1 as ThisName
                    <cfelseif AllCategories.subtyp_3 eq 'EMPTY'>
                        'SUBTYP_2' as ThisLevel,
                        AllCategories.subtyp_1 as ThisName
                    <cfelse>
                        'SUBTYP_3' as ThisLevel,
                        AllCategories.subtyp_1 as ThisName
                    </cfif>
                FROM
                    AllCategories
                WHERE
                    AllCategories.web_taxonomy_id = #arguments.CategoryID#
            </cfquery>
            <cfreturn CategoryDetail>
        </cffunction>

    Basically it
    seems like the "IF" logic in the select statement isn't
    looking at the current results, but instead the first line
    of the AllCategories() query. 
    That is exactly what is happening. The IF is not evaluated within the QoQ. It is evaluated once, before the QoQ executes, using the values in the first record of the query.
    QoQ are very limited. AFAIK they and do not support that kind of logic. So you must loop through the query, one row at a time, and calculate the desired values.

  • How to implement enter-query , execute-query in Apex Forms

    Hi,
    I am new to Oracle Application Express. I want to know what is the equivalent of ENTER-QUERY and EXECUTE-QUERY features of Oracle Forms in Oracle APEX? I saw a lot of documentation, but everywhere I found that APEX forms only have 3 database actions, (1) INSERT (2) UPDATE & (3) DELETE.
    Does anybody know how we can do QUERY in APEX Forms? (like we do in Oracle Developer Forms).
    Thanks in advance.

    Oracle APEX is a web/ stateless environment. So you do not have the same functionality/ features as in a Oracle Forms environment which is session/state oriented.
    You can however achieve functionality similar to Enter Query / Execute Query through other means.
    The easiest is to use the Forms with Report wizard. It creates 2 pages, the first one is a report and the other a Form. Clicking on the Report rows takes you to the Form page in Edit mode where as the the Create button takes you to the Form in Insert mode.
    If you want to have the enter-query / execute query on a single page it will require significant effort and skills. Try it when you have acquired some more skills in Apex.
    In APEX , like any other web application, you have to think in the web paradigm and not client-server. Even Forms 11g is essentially client-server like and is session oriented through the forms applet.
    Regards,

  • SAP Query & ABAP Query

    Hi,
    I just want to know the difference between   SAP Query & ABAP Query.
    How to procede with these two methods,Which method is used for which purpsoe.
    In which cases SAP Query is prfered or in which cases ABAP Query is prefered.
    Thanks in Advance,
    Irfan Hussain

    Hi Irfan,
        This is what sap help says,
    SAP Query
    Purpose
    The SAP Query application is used to create lists not already contained in the SAP standard system. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    SAP Query's range of functions corresponds to the classical reporting functions available in the system. Requirements in this area such as list, statistic, or ranked list creation can be met using queries.
    All the data required by users for their lists can be selected from any SAP table created by the customer.
    To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. Then you can edit list display in WYSIWYG mode whenever you want using drag and drop and the other toolbox functions available.
    ABAP Query, as far as I Believe, is the use of select statements in the ABAP Programming. This needs a knowledge of Open SQL commands like Select,UPdtae, Modify etc. This has to be done only by someone who has a little bit of ABAP experience.
    To sum up, SAP queries are readymade programs given by SAP, which the user can use making slight modification like the slection texts, the tables from which the data is to be retrieved and the format in which the data is to be displayed.ABAP queries become imperative when there is no such SAP query existing and also when there is a lot of customizing involved to use a SAP Query directly.
    Regards,
    Ravi

  • Query of query - running slower on 64 bit CF than 32 bit CF

    Greetings...
    I am seeing behavior where pages that use query-of-query run slower on 64-bit Coldfusion 9.01 than on 32-bit Coldfusion 9.01.
    My server specs are : dual processer virtual machine, 4 GIG ram, Windows 2008 Datacenter Server r2 64-bit, Coldfusion 9.01. Note that the coldfusion is literally "straight out of the box", and is using all default settings - the only thing I configured in CF is a single datasource.
    The script I am using to benchmark this runs a query that returns 20,000 rows with fields id, firstname, lastname, email, city, datecreated. I then loop through all 20,000 records, and for each record, I do a query-of-query (on the same master query) to find any other record where the lastname matches that of the record I'm currently on. Note that I'm only interested in using this process for comparative benchmarking purposes, and I know that the process could be written more efficiently.
    Here are my observed execution times for both 64-bit and 32-bit Coldfusion (in seconds) on the same machine.
    64 bit CF 9.01: 63,49,52,52,52,48,50,49,54 (avg=52 seconds)
    32 bit CF 9.01: 47,45,43,43,45,41,44,42,46 (avg=44 seconds)
    It appears from this that 64-bit CF performs worse than 32-bit CF when doing query-of-query operations. Has anyone made similar observations, and is there any way I can tune the environment to improve 64 bit performance?
    Thanks for any help you can provide!
    By the way, here's the code that is generating these results:
    <!--- Allrecs query returns 20000 rows --->
    <CFQUERY NAME="ALLRECS" DATASOURCE="MyDsn">
        SELECT * FROM MyTBL
    </CFQUERY>
    <CFLOOP QUERY="ALLRECS">
        <CFQUERY NAME="SAMELASTNAME" DBTYPE="QUERY">
            SELECT * FROM ALLRECS
            WHERE LN=<CFQUERYPARAM VALUE="#ALLRECS.LN#" CFSQLTYPE="CF_SQL_VARCHAR">
            AND ID<><CFQUERYPARAM VALUE="#AllRecs.ID#" CFSQLTYPE="CF_SQL_INTEGER">
        </CFQUERY>
        <CFIF SameLastName.RecordCount GT 20>
            #AllRecs.LN#, #AllRecs.FN# : #SameLastName.RecordCount# other records with same lastname<BR>
        </CFIF>
    </CFLOOP>

    BoBear2681 wrote:
    ..follow-up: ..Thanks for the follow-up. I'll be interested to hear the progress (or otherwise, as the case may be).
    As an aside. I got sick of trying to deal with Clip because it could only handle very small Clip sizes. AFAIR it was 1 second of 44.1 KHz stereo. From that point, I developed BigClip.
    Unfortunately BigClip as it stands is even less able to fulfil your functional requirement than Clip, in that only one BigClip can be playing at a time. Further, it can be blocked by other sound applications (e.g. VLC Media Player, Flash in a web page..) or vice-versa.

  • Error while accessing Query using Query Analyzer

    dear experts...
    while accesiing the query using query analayzer...
    we are getting below error...
    What has happened?
    URL http://xxx.xxx.xxx.xx:XXXX/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex call was terminated because the corresponding service is not available.
    Note
    The termination occurred in system BI1 with error code 404 and for the reason Not found.
    The selected virtual host was 0 .
    What can I do?
    Please select a valid URL.
    If you do not yet have a user ID, contact your system administrator.
    ErrorCode:ICF-NF-http-c:001-u:ANAND-l:E-i:PSRCCPRDA003_BI1_00-v:0-s:404-r:Notfound
    HTTP 404 - Not found
    Your SAP Internet Communication Framework Team
    thanks for helping me...
    anand

    Hi friends,,
    instead of getting the link like
    http://128.222.125.57:9000/sap/bw/bex?cmd=ldoc&infocube=ZMC_SRH1&query=AGINGV21A&sap-language=EN(working link)
    am getting below link...which is getting an error....
    http://128.222.125.57:9000/sap/bw/://:/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=AGINGV21A
    above marked is the unwanted thing so how can i change my link in query designer???
    please suggest me firneds

  • Using NVL in Query of Query resulting in error

    I'm still using CF8 and Oracle 11G back-end.
    When I use NVL in the query of query I got error....Can't I use NVL to check on null value? Please help
    Here is my codes:
    <cfquery name="GetC2" datasource="#Trim(application.OracDSN)#">
         SELECT CamID2, rel2_2,p_ln2,p_fn2,ins,l_year
         FROM prt_temp
         WHERE Ins = 'CC'
         AND l_year =  '1481'
    AND NVL(Child_LN2,' ') <> ' '
    AND NVL(Child_FN2,' ') <> ' '
        </cfquery>
    <cfif GetC2.Recordcount NEQ 0>   
    <cfquery name="CheckRel2C2" dbtype="QUERY">
      SELECT CamID2, rel2_2
      FROM GetC2
      WHERE NVL(Rel2_2,' ') <> ' '
    AND NVL(p_ln2,' ') = ' '
    AND NVL(p_fn2,' ') = ' '
    AND Ins = 'CC'
    AND l_year =  '1481'
    </cfquery>
    </cfif>
    The error:
    Error Executing Database Query.
    Query Of Queries syntax error.
    Encountered "NVL ( Rel2_2 ,. Incorrect conditional expression, Expected one of [like|null|between|in|comparison] condition,

    NVL is an Oracle function, and is not available in ColdFusion Query of Query.  If you are trying to check for null values, then use IS NULL or IS NOT NULL.  So
    WHERE NVL(Rel2_2,' ') <> ' '
        AND NVL(p_ln2,' ') = ' '
        AND NVL(p_fn2,' ') = ' '
    becomes
    WHERE Rel2_2 IS NOT NULL
        AND p_ln2 IS NULL
        AND p_fn2 IS NULL
    -Carl V.

  • Current  date  in  add mode ?

    i want to show the current  date  in  add mode but it s not working
    is there any changes thats working properly.
    If oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
                oEdittext = oForm.Items.Item("MrolVal").Specific
                oEdittext.String = Format(DateTime.Today, "ddMMyy")
            End If

    Hi John,
    Try this Code:
    string dtdate=DateTime.Now.Date.ToString("MM/dd/yy")
    string strdate= GetEditTextDateValue(dtdate);
    public   string  GetEditTextDateValue(string  dtdate)
                   try
                        string date;
                        string Year,Month,Day;
                                  Day =(dtdate.Substring(0,2));
                                  Month=(dtdate.Substring(3,2));
                                  Year  =(dtdate.Substring(6,4));
                                  date =(Month.ToString() + "-" + Day.ToString() + "-" + Year.ToString());
                                  return date;
                   catch(Exception ex)
                        throw ex;
    And Finally you can set the Value as
    oEditText.Value=strdate;
    By this way you can set any kind of Date Value to the EditText.
    HTH
    Prashant Bansal

Maybe you are looking for