Using item values in the query

Hi,
Is there a way I can use item values in the query...?
as an example, something like this
select a.*, :P20_CUST_NAME as CUSTOMER_NAME
from
table TEMP a;
haven't tried it yet but want to get the feedback first before making an attempt...
Thanks

Yes, as long as that item has a value in session state..
Thank you,
Tony Miller
Webster, TX

Similar Messages

  • How to use Item value in chart query

    Hi Folks,
    I am looking to use calander item value in sql query used to populate flash chart. I tried with following query where P2_DATE1 is the calander item name. This says no data found. I am not sure if I am missing some thing with BUTTON settings which I am using to put data into chart.
    Select null "link",to_date(entry_date,'dd-mon-yy hh:mi:ss') "Time in GMT", to_number(load_avg_5,'99.99') "Load Avg 5 Min" from oracle_ocm.top_load_avg --where trunc(entry_date)=:P2_DATE1
    I am new to APEX
    Please help

    Here are few things for you to try:
    Hardcode the value and see if it works. "where trunc(entry_date) = to_date('01-May-2010', 'dd-Mon-yyyy')". If it works, then click Session link at the bottom of the page, and check the value of the item P2_DATE1. If null, then you have a problem. If not null, please ensure that you use TO_DATE function as shown above with proper format mask.
    Good luck.
    Ravi A

  • Problem with 0FIGL_VC1 when use constant selection in the query

    Please kindly help me. I have this problem for 2 weeks already.
    When I create a query from virtual cube 0FIGL_VC1 (balance sheets / p&l statements), if I use constant selection in any of key figure, my report could not display financial statment correctly. 
    My report layout
    Columns :  key figures  (including 0FIGL_VC1_CK001)
    Rows:  0GLACCEXT  (financial statement item) << as hierarchy
    Initially, the query is processed correctly.
    However, based on the requirement from my customer, I really have to use "constant selection" for some of my columns. Whenever I do so, the query display incorrectly. (Some nodes of financial statement item just disappear. (it seem like all contra item will disappear.)  
    Please help!

    If I dont use constant selection in the query, data are display correctly.
    But If I use constant selection in the query, some financial statement item dont display any value
    Example :
       Financial statement item(Display in hier)     Period1   Total Period1(Constant selection)
                 A                                                       10            60
                 B                                                       20            60
                 C                                                       30            60
                 D                                                       0              60
    - Financial statement item "D"  has some value.
    - Financial statement item "D"  is in the hierarchy,one gl account has been assigned to more than one group differentiated by debit/credit indicator.
    Please help!!

  • CHAR's value in the query but not in the report??

    Hi all,
    I loaded master data and crm transaction data from ODS to Cube. The data is in the cube but there is no value in my report when running it. EX: there are some CHARs in my report, I checked those CHARs have value in the query but it shows 'not assign' in my report when I run it. What happen?
    Thanks.
    J.

    Please see below text and also the sent link..
    If a navigation attribute is used in an aggregate, this aggregate has to be adjusted using a change run as soon as new values are loaded for the navigation attribute (when master data for the characteristic belonging to the navigation attribute is loaded.) This change run is usually one of the processes that are critical to the system performance of a production BW system. This is why, by avoiding using navigation attributes or not using navigation attributes in aggregates, you can improve the performance of this process. On the other hand, not using navigation attributes in aggregates can lead to poor query response times. The data modeler needs to find the right balance.
    http://help.sap.com/saphelp_nw04/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm
    cheers,
    Vishvesh

  • Text Box Value in the Query Bind Parameter

    Hi
    I have to use text box value in the query bind parameter
    Thanks to help...

    Hi,
    - drag Execute with params
    - use EL
    Frank

  • How to get the max value in the query??

    Plant  calday(mm.dd.yyyy)       Soldout.Qty
    0001   01.01.2005               10
    0001   01.02.2005               20
    0001   01.03.2005               05
    0001   01.04.2005               16
    0001   01.05.2005               10
    0001   01.06.2005               14
        From the above values , how can i findout Max(Soldout.Qty)(i.e 20) for the above week...Suppose present aggregation = summation...How can i findout the value in the Query??don't want to do changes to design...

    Hi Bhanu,
      I tried the calculation results as...Maximum,..
      But that will pick the maximum value among the avialable values..like
    plant1 max 10
    plant2 max 20
    plant3 max 30
    then it will show as..
    plant1 max 30
    plant2 max 30
    ...like this...but my case is
    plant1 calday1 10
    plant1 calday2 05
    plan1  calday7 08
    plant2 calday1 10
    plant2 calday2 05
    plan2  calday7 20
    so for each set it need to bring the maximum value...

  • Restrict the values in the Query Designer

    Hi Guru’s,
    I want to Restrict PLANT or  SALES ORG  values in the Query Designer, in the Query, PLANT has selected in the rows and having variable and SALES ORG is display attribute of the PLANT. In this scenario How can we Restrict the values?
    Thanks in Advance,
    Ravi.

    Hi Ravi,
    You cannot restrict values on the display attributes. Better change it to navigational attribute and check the box as navigational in the cube.
    Regards
    Ram

  • How to pass line item values in the table paramer of FM

    Hi all,
    When i will give the import of  the FM as VBELN"sales order number.
    I want to display all the line items for "PO Quantity in the out put of the FM.
    For this i thnk i have to pass the line item values in the table parameter of the FM.
    Can any body please tell me how to pass the values for the line items in the table parameter fo teh FM.
    Please give a example.
    Thanks

    Sub pLoopThroughPivotFields()
    Dim oItem As Excel.PivotItem
    Dim oField As Excel.PivotField
    Set oField = ThisWorkbook.Worksheets("Sheet1").PivotTables("Pivot Table name").PivotFields("field name")
    For Each oItem In oField.PivotItems
    oField.CurrentPage = oItem.Name
    'Put your copy code here
    DoEvents
    Next oItem
    End Sub
    Felipe Costa Gualberto - http://www.ambienteoffice.com.br

  • Using AS values within the same query

    Is this possible. What would the syntax look like? I am trying to use exp24 result in the same procedure like below.
    Thanks
    Code:
    AS
    SELECT sheet2.id,EmployeeDerivedTable.note,
    CASE
    WHEN EmployeeDerivedTable.note IS NOT NULL THEN 'Bob'
    else 'good'
    END AS exp24
    CASE
         WHEN exp24 = 'Bob' THEN 'Joe'
         else 'bad'
    END AS exp33
    from [dbo].sheet2
    left JOIN.......

    You can use that in this way ->
    SELECT CASE
            WHEN exp24 = 'Bob' THEN 'Joe'
            else 'bad'
           END AS exp33
    FROM (
            SELECT  sheet2.id,EmployeeDerivedTable.note,
                    CASE
                    WHEN EmployeeDerivedTable.note IS NOT NULL THEN 'Bob'
                    else 'good'
                    END AS exp24
            from dbo.sheet2
         )N.B.: Not Tested.....
    Regards.
    Satyaki De.

  • Error While Filtering a Particular Value in the Query Navigation

    Hi ALL,
            we have a time charecteristic 0FISCPER in our query and the output of the query  is fine until we filter this on the variant  V3 ,system is throwing an error
      "System error in program SAPLRRK0 and form SORT_END_TRUE-01- (see long text)"
         i have tried to fix this in "analysis and repair of infoobjects " by mentioning the name of the  infocube  then the system is showing the inconsistancies by  the  following messages 
    >>InfoCube XFIGL_C11 was marked as a Cube with an inconsistent time dimension.
    >>Record with the DIMID 44 contains non-fitting time characteristics
    >>This DIMID is used by 2475 records of the fact tables
    >>No master data found for characteristic of test described subsequently
    >>Time characteristic 0FISCPER value 102006000 does not fit with time char 0FISCPER3 val 0
                this error is there both on the development and also the production servers. any light thrown on this issue is a awewlcome and i promise to reward points,
    regards

    Hi,
    There are a couple of threads on the same issue.
    Refer to these, just might be handy.
    Re: Uncaught_exception in Report Designer
    Program error in class SAPMSSY1 method  : UNCAUGHT_EXCEPTION in Report
    Good Luck!
    Sandeep Tudumu

  • Passing multiple values to the QUERY BDOC parameter?

    hi All,
    Below is my Query BDOC Anchor Before Query Execute even handler... I'm trying to pass multiple values to the         bq.Z_PartnerFunction query parameter... i.e. 
    PARTNER_FCT in( '00000012','ZDIVMGR','ZAREADR')
    is it possible without creating new Query Bdoc ?
    ====================================
    Private Sub aempchoicewinTCWSearchTAnchor_beforeQueryExecute(ByRef bq As BusinessQuery, ByRef cancel As Boolean)
    If Not bq Is Nothing Then
            If sWcDummy = "Yes" Then
                    bq.WcDummy = sWcDummy
            End If
            bq.Z_PartnerFunction = "00000012"
            If ctrlZ_Territory.Value <> "" Then
                 bq.PRNB_TerrID = "*" & ctrlZ_Territory.Value
            End If
    End If
    End Sub
    ================================
    Thanks in advance
    Hetal

    Hi,
    it looks that you already enhanced the query BDoc because you have a new query parameter bq.Z_PartnerFunction, right?
    To which BDoc parameter is this BQ parameter mapped? And how looks the related where clause?
    For a single filter normally a "=" operator is used. Therefore your example with "in" won't work.
    If these three partner functions are fixed then you might hardcoded them directly in the where clause (supposed the BDoc is not used somewhere else where you don't want to have this filter).
    Or you might add 3 new BDoc parameters, add 3 new where clauses using a disjunction for them (and using an embracing bracket). In this case always all these 3 BQ parameters need to be filled (or all stay empty) to avoid a SQL syntax error.
    Regards,
    Wolfhard

  • Using "in" clause in the query in Database control

    Hi,
    I have a database control and need to fire an update query to update a set of rows based on a list of values as input
    Like below
    update tablename
    set column1="value1"
    where column2 in (.......)
    I need to pass a list of values for this query where column2 is a NUMBER field in Oracle DB.
    can anyone help me how to go about passing this list of values?
    Help is appreciated.
    Thanks

    You may build the comma-separated list in Java and use " {sql: ...} " in your query: http://e-docs.bea.com/workshop/docs81/doc/en/workshop/java-class/com/bea/control/DatabaseControl.html (sorry, I can't find the documentation for WLI 9.2).

  • Unable to use Navigational Attr in the query ?

    Hi experts,
    We are using BEx 3.X.
    We have a report based on an infoset. We want to use some navigational attributes in the query and
    restrict the values of these attributes.
    But we are unable to use them as navigational attr. They are displayed as display attributes only.
    We are unable to restrict them. This is because the query is on Infoset.
    When i use the same navigational attr in a query based on a infocube, it is displaying as Navigational Attr.
    We are in BI 7 but using BEx 3.X.
    How to resolve this ?
    Regards,
    Nishuv.

    Hi,
    Master Data Read
    A simple master data read should be done using generic BI functionality in the update rules. Choose the
    option u201CMaster Data Attribute ofu201D in the update rule details for the selected characteristic and select an
    attribute by using the F4 help. With this setting, the value of the characteristic to be updated is read from the
    master data table of the specified characteristic.
    Characteristic Material is provided by the InfoSource.
    Characteristic Material Group is not provided by the InfoSource.
    Characteristic Material Group is an attribute of characteristic Material
    Therefore you can fill Material Group from the master data table of Material: Select the method Master Data
    Attribute from and Material as source.
    The generic master data read only works for characteristics that are available in the communication
    structure.
    For a more complex master data read or if the characteristic is not available in the communication structure,
    you have to implement the master data read yourself in a routine for the specific characteristic. If so, the
    function module RSAU_READ_MASTER_DATA should be used to read the master data.
    In Infoset u can use max 2 cubes......and Infoobjects 'N' number u can use.......
    Thanks/Tarak

  • How use "All Values" in the pages of pivot tables

    Hi everyone,
    I’m using Oracle Bi Answers and I have the following problem:
    I’m doing reports based in a datamart with 2 fact table each with about 28 Million records per month and with a medium of 14 dimensions.
    The users want to have the choice to select 5 parameters for example (region, district, type of product, month of analysis, subtype of product) where they can select an individual option as well as select an “all values” option. They want this for all the parameters.
    We are having problems doing this without having the report to timeout.
    Approaches used
    We are trying to do this by using pivot tables and combo boxes in the reports (one for each parameter). The combos are in the pages area.
    We are trying to do a calculated item with Sum(*) to have a “ALL Values” in the combo box but this makes the report extremely slow.
    We also tried to do Sum in the pages section of the pivot table but it only displays the “All pages value” of the first combo box.
    So actually I don’t know what to try. Can you help me with the best way to do this?
    Thanks
    Edited by: user8727081 on Sep 28, 2009 2:45 AM

    Hi,
    I had the same problem, and I solved it using the dashboard prompts.
    But sometimes users are not happy. I explaine why.
    Suppose a dimension Nation:
    Italy, Germany, UK, France, USA
    1) I create a report with sales quantity.
    2) Report has a filter --> "nation" = is prompted
    3) I create a dashboard prompt "Nations" based on dimension Nation with All Values
    4) I publish the report in a dashboard with the dashboard prompt "Nations"
    When user choose the nation from the prompt, all nations are displayed, also if I have NO sales for some of these.
    My goal: only nations with sales must be shown
    Thanks
    Enrico

  • Changing the Characteristic Values on the Query

    Hello Masters of the BW Domain
    Is there a way to display the values of a characteristic in a report based on a condition?  I have a characteristic called Rebates with only 2 valid values (Y and N).  Instead of showing it as Y and N, I want them displayed as "With Rebate" for Y and "No Rebate" for N.  Is it possible to do this without changing the underlying data in the cube and doing the translation at the query level?  Would it require a user exit to accomplish this?  All the user exits that I've run into only dealt with dates and not with transforming text values.

    As Paolo suggested you can add text for the info object. Else if you are using BW Web Reports you can use the Table API(similar to user exit) to do the conversion.
    case i_iobjm .
      when 'rebates'.
        if i_value = 'y'
          c_cell_content = 'With rebate'.
        elseif i_value = 'N'
          c_cell_content = 'With rebate'.
        endif.
    endcase
    *Please check for the syntax.
    If you are using BEx, VB macros will be an option.
    The best approach will be to store text for the info object.
    Thanks.

Maybe you are looking for