Complex QUERY with Variables

I created a complex query to extract data from Journal entry and from Journal voucher. I post here a simplified version where I have deleted UDO references.
I buit it in the Query analizer and it runs ok.
I copied in SAP and it runs ok too.
Now, I need to ask for the start date and end date, as in the first lines of script. But SAP raise an error message I dont understand. I tried to use '[%0]' and '[%1]' insthead of '2008/01/01' and '2008/02/29' 
DECLARE @D1 DATETIME
DECLARE @D2 DATETIME
SET @D1='2008/01/01'
SET @D2='2008/02/29'
SELECT * FROM
SELECT  
     A.ACCOUNT AS 'CO.GE ITALIA',
     OACT.ACCTNAME AS 'NOME CO.GE ITALIA',
     SUM(CASE WHEN (A.ACCOUNT>='500000' AND A.ACCOUNT<'600000' AND DEBIT<>0) THEN -DEBIT WHEN (A.ACCOUNT>='600000' AND A.ACCOUNT<'700000')THEN 0 ELSE CREDIT END -
          CASE WHEN (A.ACCOUNT>='500000' AND A.ACCOUNT<'600000') THEN 0 WHEN (A.ACCOUNT>='600000' AND A.ACCOUNT<'700000' AND CREDIT<>0)THEN -CREDIT ELSE DEBIT END) AS 'TOTALE'
FROM (
SELECT BTF1.* FROM BTF1
UNION ALL
SELECT JDT1.* FROM JDT1
) AS A
LEFT JOIN OACT ON (OACT.ACCTCODE=A.ACCOUNT)
LEFT JOIN OBTF ON (OBTF.BATCHNUM=A.BATCHNUM AND OBTF.TRANSID=A.TRANSID)
WHERE A.REFDATE>=@D1 AND A.REFDATE<=@D2 AND (OBTF.BTFSTATUS<>'C' OR OBTF.BTFSTATUS IS NULL) AND (OACT.U_CUENTA<>'' AND OACT.U_CUENTA IS NOT NULL) AND (OACT.U_CUENTA<>'432000000')
GROUP BY A.ACCOUNT, OACT.ACCTNAME
UNION ALL
SELECT  
     A.SHORTNAME AS 'CO.GE ITALIA',
     OCRD.CARDNAME AS 'NOME CO.GE ITALIA',
     SUM(CASE WHEN (A.ACCOUNT>='500000' AND A.ACCOUNT<'600000' AND DEBIT<>0) THEN -DEBIT WHEN (A.ACCOUNT>='600000' AND A.ACCOUNT<'700000')THEN 0 ELSE CREDIT END -
          CASE WHEN (A.ACCOUNT>='500000' AND A.ACCOUNT<'600000') THEN 0 WHEN (A.ACCOUNT>='600000' AND A.ACCOUNT<'700000' AND CREDIT<>0)THEN -CREDIT ELSE DEBIT END) AS 'TOTALE'
FROM (
SELECT BTF1.* FROM BTF1
UNION ALL
SELECT JDT1.* FROM JDT1
) AS A
LEFT JOIN OACT ON (OACT.ACCTCODE=A.ACCOUNT)
LEFT JOIN OBTF ON (OBTF.BATCHNUM=A.BATCHNUM AND OBTF.TRANSID=A.TRANSID)
LEFT JOIN OCRD ON (OCRD.CARDCODE=A.SHORTNAME)
WHERE A.REFDATE>=@D1 AND A.REFDATE<=@D2 AND (OBTF.BTFSTATUS<>'C' OR OBTF.BTFSTATUS IS NULL) AND (OACT.U_CUENTA<>'' AND OACT.U_CUENTA IS NOT NULL) AND (OACT.U_CUENTA='432000000')
GROUP BY A.SHORTNAME, OCRD.CARDNAME
) AS B

Thank you to everybody for your answers.
I need to know more about this way to declare a variable in SAP.
This is my question:
If I need to filter by date a result from a Union All select, is sufficent to declare the Date Variable for one of the two tables in the Union All?
Following a simple code to explain my dubt:
DECLARE @D1 DATETIME
DECLARE @D2 DATETIME
SET @D1='2008/01/01'
SET @D2='2008/02/29'
SELECT A.ACCOUNT, A.DEBIT, A.CREDIT FROM
SELECT * FROM JDT1
UNION ALL
SELECT * FROM BTF1
) AS A
WHERE A.REFDATE>=@D1 AND A.REFDATE<=@D2
Do you think the WHERE statment will continue to run as well for the Union All in the script main too?
This is the modified initial code:
/*SELECT * FROM JDT1 T0*/
DECLARE @D1 DATETIME
DECLARE @D2 DATETIME
/* WHERE */
SET @D1=/* T0.REFDATE */ '[%0]'
SET @D2=/* T0.REFDATE */ '[%1]'
Thanks in advance,
Jonny Cortonicchi

Similar Messages

  • Need complex query  with joins and AGGREGATE  functions.

    Hello Everyone ;
    Good Morning to all ;
    I have 3 tables with 2 lakhs record. I need to check query performance.. How CBO rewrites my query in materialized view ?
    I want to make complex join with AGGREGATE FUNCTION.
    my table details
    SQL> select from tab;*
    TNAME TABTYPE CLUSTERID
    DEPT TABLE
    PAYROLL TABLE
    EMP TABLE
    SQL> desc emp
    Name
    EID
    ENAME
    EDOB
    EGENDER
    EQUAL
    EGRADUATION
    EDESIGNATION
    ELEVEL
    EDOMAIN_ID
    EMOB_NO
    SQL> desc dept
    Name
    EID
    DNAME
    DMANAGER
    DCONTACT_NO
    DPROJ_NAME
    SQL> desc payroll
    Name
    EID
    PF_NO
    SAL_ACC_NO
    SALARY
    BONUS
    I want to make  complex query  with joins and AGGREGATE  functions.
    Dept names are : IT , ITES , Accounts , Mgmt , Hr
    GRADUATIONS are : Engineering , Arts , Accounts , business_applications
    I want to select records who are working in IT and ITES and graduation should be "Engineering"
    salary > 20000 and < = 22800 and bonus > 1000 and <= 1999 with count for males and females Separately ;
    Please help me to make a such complex query with joins ..
    Thanks in advance ..
    Edited by: 969352 on May 25, 2013 11:34 AM

    969352 wrote:
    why do you avoid providing requested & NEEDED details?I do NOT understand what do you expect ?
    My Goal is :
    1. When executing my own query i need to check expalin plan.please proceed to do so
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_9010.htm#SQLRF01601
    2. IF i enable query rewrite option .. i want to check explain plan ( how optimizer rewrites my query ) ? please proceed to do so
    http://docs.oracle.com/cd/E11882_01/server.112/e16638/ex_plan.htm#PFGRF009
    3. My only aim is QUERY PERFORMANCE with QUERY REWRITE clause in materialized view.It is an admirable goal.
    Best Wishes on your quest for performance improvements.

  • Query with variable defined date no idea how

    Hello to all,
    i have a problem with a query, in this query i need a variable date that can be entered in the SQL statement.
    If the CREATE TABLE and INTO Values are needed, they can be found here:
    Re: Need Help with complex query for productio database
    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                  from  table_2 t
    select  t1.*,
            nvl(
                max(
                    case t2.wo_step
                      when 'U' then t2.step_date
                    end
               sysdate
              ) - t1.create_date age_1,
            nvl(
                max(
                    case t2.wo_step
                      when 'R' then t2.step_date
                    end
               sysdate
              ) - t1.create_date age_2,
            sum(
                case
                  when t2.wo_step in ('B','5') then t2.next_step_date - t2.step_date
                end
               ) step_b_5,
            sum(
                case t2.wo_step
                  when 'C' then t2.next_step_date - t2.step_date
                end
               ) step_c,
            sum(
                case t2.wo_step
                  when 'K' then t2.next_step_date - t2.step_date
                end
               ) step_k,
            sum(
                case t2.wo_step
                  when 'E' then t2.next_step_date - t2.step_date
                end
               ) step_e,
            sum(
                case t2.wo_step
                  when 'F' then t2.next_step_date - t2.step_date
                end
               ) step_f,
            sum(
                case t2.wo_step
                  when 'S' then t2.next_step_date - t2.step_date
                end
               ) step_s,
            sum(
                case t2.wo_step
                  when 'R' then t2.next_step_date - t2.step_date
                end
               ) step_r
    ,          CASE
                   WHEN      t1.priority = '02'
                   AND          nvl(
                               max(
                                   case t2.wo_step
                                     when 'U' then t2.step_date
                                   end
                                        sysdate
                             ) - t1.create_date >= 5
                   THEN     'FALSE'
                   WHEN      t1.priority = '05'
                   AND          nvl(
                               max(
                                   case t2.wo_step
                                     when 'U' then t2.step_date
                                   end
                                        sysdate
                             ) - t1.create_date >= 8
                   THEN     'FALSE'
                   WHEN      t1.priority = '12'
                   AND          nvl(
                               max(
                                   case t2.wo_step
                                     when 'U' then t2.step_date
                                   end
                                        sysdate
                             ) - t1.create_date >= 30
                   THEN     'FALSE'
                   ELSE     'TRUE'
              END AS "IN MPD"                                  
      from  table_1 t1,
            t2
      where t2.order_nr = t1.order_nr
      group by t1.order_nr,
               t1.priority,
               t1.create_date,
               t1.act_step,
               t1.step_date,
               t1.employee,
               t1.descriptionIn this query i want to replace sysdate with a variable date that i want to define one time, maybe in the first line of the SQL query or one of the Top lines.
    The reason for this is, i want my results to an specific date, well i can change da system time but i want to solve that in the query.
    Or if there is a way to get promted for this variable each time when the qury runs, that would also be fine.
    I tried already DEFINE BEGIN END, but i get only a bunch of errors. I thins i do a basic mistake.
    Thank You all.

    Hi,
    To create and set a bind variable in SQL*Plus, you can do this:
    VARIABLE  base_date_text   VARCHAR2 (20)
    EXEC     :base_date_text := '01-Mar-2013 00:00:00';:base_date_text can now be used anywhere in your query where a string is allowed. Unfortunately, you can't have DATE bind variables, so that means it's only useful in calls to TO_DATE.
    You could calll TO_DATE everywhere you are now calling SYSDATE, or you could do something like this:
    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                        TO_DATE (:base_date_text, 'DD-Mon-YYYY HH24:MI:SS')   AS base_date
                  from  table_2 t
               )  ...This adds a column to t2 called base_date, which is a real DATE. Anywhere in the main query, you can reference t2.base_date instead of SYSDATE.
    If you want to be prompted to enter the value at run-time, then you can use SQL*Plus substitution variables, like this
    ACCEPT  base_date_text  "Please enter the date to use (DD-Mon-YYYY HH24:MI:SS format): "
    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                        TO_DATE ('&base_date_text', 'DD-Mon-YYYY HH24:MI:SS')   AS base_date
                  from  table_2 t
               )  ...Again, t2.base_date (a DATE) is now available anywhere in the main query.

  • Report Designer - Query with variable

    Hi!
    When testing the report designer, we have found an issue - it’s not possible to embedding queries with variables.
    We have found note https://websmp107.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=012006153200000232982006
    that suggest a solution to the issue.
    My question is simply, does anyone know if this is a temporary fix, or is this a constraint that is not planned to be fixed by SAP? The note is a bit ambiguous.
    BR
    bjørn

    Hello,
    Queries with variables are still in restrictions for Report Designer.
    You can use this work-arond creating Query View and fill up the variables. This allows you to define a Report in RD. Then, use Web Appication Designer to include your Report into Web Application and replace the Query View with your initial Query.
    For the integration do following:
    1. Create new Web Template in WAD
    2. Drag-and-drop Web Item "Report"
    3. Go to Property Window in WAD and search for "REPORT" (description Report Design) parameter in Web Items Parameters
    4. Use the button on the right side of the parameter to open Report Designer and choose your Report in it.
    5. You should see that new Data Provider was created in WAD -> Open it and set it to your initial Query.
    5. Save you Web Template and execute in the browser.
    Regards, Karol
    Development BI

  • Copy function based on the query with variables

    Hello
    Let me share the scenario I need to implement. I have a planning query with layout like shop / material / sales volume. The variables are shop number and calendar month. User opens the planning query, selects shop number and month, then sees the list of materials and puts the planned sales volume, then saves as a temporary version. Saving as a temporary version is realized by standard u201Csaveu201D function. The matter is that the user needs to have a possibility to copy this version to official one. I created the button and linked it with the copy function. The problem is that when a user clicks this button, the function asks him/her to provide variables again. I would like to have the button which copies the data with the same selection criteria as the query already has.
    Any idea?
    Arelis.

    Hi,
    I think when you add the button you specify the planning sequence name and that takes the filter of the modeler .Now when you try to call the planning sequence the filter variables are also added to the button as VAR_NAME, VAR_VALUE which prompts you for the variable again.Delete VAR_NAME,VAR_VALUE at the back of the button  manually and then save your work book.Then it will not ask for variable entry and the values that you have specified in the query filter will pass on to modeler filters.As variables are global.
    Similarly if you are using planning function then at the back of the button remove the VAR_NAME,VAR_VALUE.
    Hope this may help.
    Regards,
    Indu

  • Understanding complex query with selections(customer exit variables)

    Hi experts,
    I am trying to understand one query having  a combination of selections and BEx variables in it.
    In Characteristic Restrictions panel of Query Designer:
    we have some CHARs restricted by means of authorisation variables
    In Default Values panel:
    some other CHARs without any filters
    In free CHARS panel
    some characteristics
    In Rows panel:
    some more chars that were placed in Default values panel
    In Columns panel:
    Formula YTD on selection YTD
    Formula Monthly on selection Monthly
    Selection on YTD characteristic(hidden)
    Selection on Monthly characteristic(hidden)
    Selection XX(in definition,I saw selection on YTD Keyfigure and a characteristic variable VAR1(i-step=1) filled with customer exit..this variable picks up right version of Master Data...our system has many versions of master data,one for each year)
    Selection YY(in definition,I saw selection on Monthly key figure and the same characteristic variable VAR1 we used in Selection XX)
    When I execute this..I see one variable popup which asks for values for year and version of master data...I enter master data version for that year and the year....I see the result...
    Now I tried to experiment to learn...I deleted Selection XX and Selection YY and tried to execute....a variable popup asking for year...I enter year and tried to execute..it throws message---'Value for variable VAR2 cannot be determined'......
    I couldnot understand this error because VAR2 is a customer exit characteristic variable defined in CMOD...ITS NEVER USED IN THIS QUERY...but defined in CMOD to pick up correct version of Master data..its defined in such a way that it picks value depending upon VAR1 varaible....both variables function is same...its just that  VAR1 works on i_step=1 and VAR2 works on i_step=2 plus dependent on VAR1....
    Can anyone understand why I am seeing error about VAR2 when its never used in Query....??
    Thanks for your inputs....

    Hi Vikram,
    I am unable to find VAR2 anywhere in query designer....Can it be like that its hidden?
    Thanks and Rgds,
    SChand

  • SQL Query with variable range

    Hi
      I want to give range to a user to enter in a variable through sql query . If there are 200 records , if user wants to display from 5-45 , 75-110 , 130-145. how it can be done through SQl Query
    Thanks
    Edited by: Matt on Aug 31, 2010 6:23 PM - modified title - please use a meaningful title in future

    Dear Saini,
    This query will allow you to choose the values only when you know them.
    SELECT T0.[DocEntry], T0.[ItemCode] FROM INV1 T0 WHERE T0.[LineNum] >[%0]   and T0.[LineNum] <[%1]
    If you run it in the query Generator in SAP Business One a little window will pop up and will ask you to choose the 2 variables.
    You can choose different variables every time you run it. At least you won't have to save many queries with different values.
    If you want 2 different groups, e.g. from 10 to 20 and from 30 to 40, then you can add another part in the where clause:
    SELECT T0.[LineNum], T0.[ItemCode], T0.[DocEntry] FROM INV1 T0 WHERE T0.[LineNum]  >= [%0] and  T0.[LineNum]  <= [%2] and T0.[LineNum]  >= [%4] or  T0.[LineNum]  <= [%6]
    Please, let me know if this query helps.
    Regards,
    Marcella Rivi
    SAP Business One Forums Team

  • Error while executing Query with Variable.

    Hi All,
    I have written a query to fetch values from some user tables and sap tables. The query is as below.
    select a.docentry,a.u_scname,e.block,e.[City],
    e.[Country], e.[State1],
    e.[StreetNo], e.[ZipCode],
    e.[Building], e.[Cellular],a.[U_WONo], a.[U_DocDate],
    a.[UserSign], b.[LineId], b.[U_Des],
    b.[u_SDes], b.[U_UoM],
    b.[U_Qty], b.[U_Rte],
    b.[U_Tamt], a.[U_PrjName], a.[u_WO_PB],
    a.[U_WO_UL], a.[U_WO_FC],
    a.[U_WO_PYT], a.[U_WO_COP],
    a.[U_WO_TRMT], a.[U_WO_DocSub],
    a.[U_WO_ADV], a.[U_WO_OCondition],
    a.[U_WO_PRPBY], a.[U_WO_RCMBY],e.[CntctPrsn],
    (T4.[WhsName]+ '-' + T4.[Street] +'-' + T4.[Block])  as 'Work Address ',
    T4.[Building], T4.[City],
    T4.[ZipCode], T4.[U_PMCNT],  T4.[WhsName], e.Taxid0
    from [@e360_owor] as a join [@e360_wor1] as b
    on a.docentry = b.docentry
    left outer join
    ( select c.cardname,d.TaxId0,d.Taxid1, c.block, c.[City],
    c.[Country], c.[State1],
    c.[StreetNo], c.[ZipCode],
    c.[Building], c.[Cellular], c.[CntctPrsn]  from ocrd
    as c  join crd7 as d  on  c.cardcode = d.cardcode 
      where d.TaxId0 is not <b>null</b> ) as e
    on
    a.U_SCName = e.CardName 
    left outer join OWHS T4 on T4.[WhsName] = a.[U_Prj]
    where
    a.U_WONo = '[%0]'
    In this code, when the variable is assigned to field U_WONo, then I get an error
    Must Specify A Table To Select From. Statement 'Service Contractors' (OCTR) (s)  could nto be prepared.
    But when the values for variables are hard coded, the query executes.
    I have been working on it from long time, but same error exists. Could anybody help resolve the same...
    I am using SAP B1 2007 B, patch level 15.
    Thanks in advance,
    Regards
    Rohan

    The error messages may be misleading. With complicated queries with parameter request I frequently saw references to service contract (or something other).
    Sometimes SBO does not manage correctly variables in complicated queries and there is a note about the workaround to solve the problem:[Note730960|https://websmp130.sap-ag.de/sap/bc/bsp/spn/sapnotes/index2.htm?numm=730960]

  • Refresh Query with variable is not working

    I have issue with my query.
    0customer -Property (key and text) and Selection parameter
    When I place 0customer in the filter area and save the query execute the query and refresh the query I am able to change the customer number parameter values.
    Variable has option  Can be changed during query execution. Filter value is also not displaying in the report
    When I move 0customer in the  Row area and save the query -first time it is displaying the selection parameter values and when you hit refresh it will refresh the same query .but it is not populating the selection parameter .
    advance thx

    You can display values& texts for variables using menu button where you can display the text elements.
    Regards
    Pradip

  • Query with variable

    hello world,
    i have a problem, i have implemented a query that is using in different schema. These schemas have same structure, therefore to extract information i must use the same query but I must specify the different schemas to select the table. The question is: " how can i use a variable in the query? "
    Example: "Select * from aa.zz ", "Select * from bb.zz"
    I want to use the same query but to replace the name schema with a variable
    Example: "Select * from aa.zz ", "Select * from bb.zz" =>>> "Select * from x.zz " where "x" is the variable name.
    I am using this query to build a report by oracle BI publisher.
    Thanks very much.
    Regards
    Vincenzo

    You should post your question on [Sql/PLSql |http://forums.oracle.com/forums/forum.jspa?forumID=75] topic
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com

  • Explain plan for query with variables

    Trying to Explain plan for some sql in sql*plus. The query has a variable in it. How do I do this ?
    I did look into explain plan and dbms_xplan but could not find anything with variables

    use sqlplus bind variables:
    SQL> --define variable
    SQL> var x varchar2
    SQL> -- notice the colon prefixing the variable
    SQL> explain plan for select * from customer where cid = :x;
    Explained.
    SQL> select * from table( dbms_xplan.display );
    PLAN_TABLE_OUTPUT
    Plan hash value: 1709312366
    | Id  | Operation                   | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |          |     1 |    67 |     2   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| CUSTOMER |     1 |    67 |     2   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | CID      |     1 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("CID"=:X)
    14 rows selected.the variable does not need to be set to explain the query, since explain does not actually execute.
    Edited by: shoblock on Nov 6, 2008 4:51 PM

  • BI query with variables

    Hey Experts
    I have a BI query that I want to use in a Visual Composer Application.
    I have three fields Calendar Year, Amount and calculated Amount.
    Calculated amount is based on the field amount and on a variable.
    In my query the calculated amount it's defined as a formula. In Bex Analyzer my query works.
    If I don't fill in the variable, the calculated amount is empty (can not be calculated).
    I add my query as a dataservice and connect a table as output with the three fields.
    First I just added a start component to the input of the dataservice.
    Result: Only the fields amount and year are filled.
    I think it's normal because without the variable the calculation is not possible.
    Second, I added an input form to the variable port of the dataservice. In the input form I have an input field for the variable and a submit button.
    Result: Again calculated amount is not filled in.
    After a closer look. I see that in the variable port of the dataservice, my variable is declared as text. Could that be the problem. In my BI query however the variable is declared as number.
    I even tried with a start proces connected to the variable port, and added a constant to the variable. Ofcourse between quotes because the dataservice thinks the variabel is text.
    Does someone know what the problem is?
    The ultimate goal is to use a slider for the variable.
    Thanks
    Steven

    Solved,
    I used a function to convert number to text.

  • Formatted search query with variable

    Hi
    I am trying to create a formatted search on a purchase order document.The scenario is as follows:
    The issue is that the client will on certain stock records incur a tooling cost when raising a PO. This is a once off cost when they order a particular item. For example the tooling cost on a stock item is u20AC5.50. The cost price on the item is u20AC100. If they order for example 5 of these the total cost is u20AC505.50 i.e. u20AC100*5+tooling cost of u20AC5.50.
    What we are attempting to do is pull through the tooling cost and add this on to the line total using a formatted search.
    -UDF created on item record table. This is set type 'Unit and totals' and structure is 'Price'. This is called ToolingCost
    -UDF created on marketing doc rows for ToolingCost. Again this is set to the same type and structure as the UDF on the item record.
    -We have created a UDF on marketing row for total cost and set a formatted search against this with query attached that is attempting to calculate the total cost. We cannot get this to work and the problem would appear to be that the price field is a variable and this is causing an issue on the query. Can we include a variable field in our query and if so what should the syntax be?
    Our query at the moment is 'SELECT 100*($[POR1.QTY.NUMBER])+($[POR1.U_TOOLINGCOSTS.NUMBER])
    Note 100 in query syntax above to be replaced by price on POR1 table.
    Can anyone provide assistence please.
    Derek Smith

    Hi Derek........
    Try this.....
    declare @var1_Qty as varchar(255)
    declare @var2_Pr as varchar(255)
    declare @var3 as float
    declare @var4 as float
    set @var1_Qty=$[$38.11.0]
    set @var2_Pr=$[$38.14.0]
    Set @var3=$[POR1.U_TOOLINGCOSTS.0]
    set @var4=cast(substring(replace(@var2_Pr,',',''),0,len(replace(@var2_Pr,',',''))-3) as float)
    select (@var1 * @var4)+@var3
    Hope this will help you.......
    Regards,
    Rahul

  • Re: Crystal Report and SAP BW Query with Variable

    Crystal Report 2008 V1 SP3 and SAP Integration Kits 3.1 SP3 installed on my client machine.
    I can open SAP BW Query in Crystal Report. However, in the Field Explorer >Database Fields, I dont see to be able to expan the Query and see it Key Figure/Characteristic.
    I noticed this happen only if we have Variable defined in the Charactics.
    If the characteristic has no variable, then I can expand the Query under Database Fields.
    Do you have this problem?

    Yes, once I have imported the new SAP Integration Kits XI 3.1 SP3 transports into BW system, I can now expand the it.
    I can now see the Variable in Crystal Report.
    Thanks!

  • Can we run a query with variable screen at start up in Bex Analyzer

    Hello all,
    I have a query which asks for fiscal year and posting period at the start of query run. But when I run the query in analyzer, it gives me this error all the time.
    "Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
    System error in Program CL_RSR_REQUEST and form TEXT_ELEMENTS_GET: VARIABLE"
    Can someone help,
    Thanks in advance.

    Hello,
    Please check if OSS note 858458 is applicable in your case.
    Regards,
    Praveen

Maybe you are looking for

  • Table View in View-based Application

    Hi. I want to use an UITableView in a View-based Application. All examples I found are for Navigation-based Applications. I Found only one example for View-based Applications, but it create all components himself without the Interface-Builder. I sear

  • Can i have sync and async listeners for the same queue ?

    Hello, I am a novice in JMS. Wondering experts over here could throw in some light ! Can I set both synchronous and asynchronous listeners for a perticular queue. eg: pseudo code. status; // default to start run() setListener(Q1); // listener sets st

  • Translation process

    hello, This is my first post in this forum and i am new to htmldb. i want to translate my application into italian but the problem i am facing is how to translate the xliff file when i am trying to open the xliff file generated by Oracle html db in x

  • Converting parts of PDF to excel

    How to focus on part of a PDF ? I have plain text, with in -line tables. I want to concentrate on teh tables only. How to tell PDF converter only to treat teh highlighted part of the PDF ?

  • BPC 10.1 - no sum on time dimension

    Hi, we've a BPC 10.1 sandbox and we're facing several problems #3 no sum on time Dimension If you check the attached file you will see that there is no summing up on the time Dimension. I've checked that on BPC 7.5 and 10.0 and it should work on 10.1