Limit the result in the query's varible selection.

I have many reports involed the requirment that in the query's varible selection we only want the users could see the calmonth demanded by me such as 200903,200902,200901,200812 and 200811 before the current system date (not include the future calmonth),and after we make these confirguration it should not influent the accumulative indicators which add the values include such calmonth as 200810,200809 and 200808. Actually in these info providers and master datas they exit past and future calmonth we dont want see in the query's varible selection. For the requirement we have consulted many SAP channels but they could give us any avarable advice,how could i do?

Arun Varadarajan,
Thanks for ur reply. the a is sugguestive and operative.But for b I have my problem:
a. After I create a variable for calmonth,its named var_calmonth which is customer exit and variable is ready for input,how is the variable representing? interval,single value or multiple single value? If it is single value,u could not APPEND l_s_range TO e_t_range in customer exit.If interval or multiple single value the upper is worked but u could not get the correct input GUI.The list is my coustmor exit code for the variable which is interval or multiple single value:
  WHEN 'VAR_calmonth' .
    IF i_step = 1.
      TYPES : BEGIN OF ls_calmonth ,
              zcalmonth TYPE /bi0/oicalmonth,
              END OF ls_calmonth.
      DATA : lt_calmonth TYPE TABLE OF ls_calmonth.
      DATA : wa_calmonth TYPE ls_calmonth .
      DATA: l_calmonth(6)    TYPE n.
      l_calmonth = sy-datum(6).
      SELECT CALMONTH FROM /BI0/SCALMONTH
      INTO TABLE lt_calmonth
      WHERE calmonth BETWEEN '200001' AND l_calmonth.
      SORT lt_calmonth BY zcalmonth DESCENDING.
      LOOP AT lt_calmonth INTO wa_calmonth .
        l_s_range-low = wa_calmonth-zcalmonth.
        l_s_range-sign = 'I'.
        l_s_range-opt = 'EQ'.
        APPEND l_s_range TO e_t_range.
      ENDLOOP.
    ENDIF.
b. Even if we have solved the upper problem the next is the values of the variable got through customer exit is also limited the query result.I mean it effects not only variable selection.
Any way, thanks again.
zport.

Similar Messages

  • How do you use BOBJ SDK to retrieve the results of a query in XML

    I am trying to programatically get the results of a query given the query id
    My old code used BusinessObjects Enterprise Web Services API to  Retrieve a document's contents
    DocumentInformation biDocInfo;
    RetrieveData retBOData = RetrieveData.Factory.newInstance();
    Action[] actions = new Action[1];
    retBOData.setRetrieveView(xmlView);
    biDocInfo = rEngine.getDocumentInformation(queryId, null, actions, null, retBOData);
    (XMLView) biDocInfo.getView();
    Is there an equivalent way to retrieve the results of the query using SAP BusinessObjects BI 3.x Developer SDK Library ?
    Thanks for any information

    Hello.
    Are you wanting to use the BusinessObjects Enterprise SDK along with the Report Engine SDK as opposed to using the Web Services SDK that you were using previously?
    Also, what part of a webi document are you trying to get the XML format of?
    - Whole document
    - Single report within a document
    - Report page of a report
    - Report part within a report
    - All data providers
    - Single data provider
    If you are trying to use Business Objects Enterprise along with the Report Engine SDK, there are numerous samples for the various parts of the webi document that I mentioned above available at the following link:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/JavaReportEngineSDKSamples
    I hope that this information helps.
    Regards.
    - Robert

  • How to execute a procedure depending on the result of a query?

    Hello, I'm new in ODI.
    I want to execute a procedure depending on the result of a query Oracle table.
    We have a Oracle Table whit a column that contains two possibles values.
    I want read the table, row by row, and depending on this value, execute a Procedure or execute another.
    How can i do?

    what you need to do is
    1. create a variable which "new_var2" which has the count of the number of rows you want to process. must be data type numeric.
    2. copy "new_var2" to the package screen.
    3. duplicate the "new_var2" on the package screen and evaluate the variable and test for "> 0" zero, call it "new_var2_E"
    3. create a new odi variable "new_var1" with a refresh of "select field1 fom (select field1,rownum as rownumber from tablex) where rownumber = #new_var2" in the relevant schema and technology.
    4. copy "new_var1" into your package (some where in the flow)
    5. right click the "new_var1" variable in you package screen and you should get the option duplicate step (click on that)
    6. select the the duplicate "new_var1" on the package screen and correct the the name to something meaning full to you "new_var1_E", also change the "type" to "evaluate variable" then you should see a "value" box. enter one of the values you want to test in the box (remember do not put in quotes ' )
    7. now back on the package screen join the "new_var1" to the "new_var1_E" with an OK line
    8 you now join "new_var2" to "new_var2_E" with OK
    9 you join "new_var2_E" to "new_var1"
    10. you then join the "new_var1_E" with an OK or a KO line to the relevant procedure.
    12. you need to duplicate "new_var2" in the package screen one more time this time and call it "new_var2_D" set the type to evaluate and then select the increment of -1
    13. the relevant procedure to "new_var2_D" with an OK
    14. join the "new_var2_D" to the "new_var2_E" with an OK
    15. this should close off the loop now the exit point is "new_var2_E" with a KO line to the next part of your process....
    Basically you should end up with a loop on new_var2 decementing, and it is used to get a specific next record row from your table.
    Hope this helps, sorry it is a little long winded..
    Edited by: DavidGD on Feb 8, 2009 3:29 PM

  • Access the results of the following query in Java? SELECT sum(COL_X) FROM TABLE_A

    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery(
    "SELECT sum(COL_X) FROM TABLE_A");
    int = rset.getInt("sum(NUM_CUSTOMER)");This is obviously wrong. Could someone please help me a little on the syntax? I just want to be able to get the sum of the numeric values in a column without having to loop through a ResultSet and manually adding up the total. My question is how can I access the results of this query by assigning the sum to a java variable?

    Hi,
    Probably the easiest way is to use an alias for the sum column, i.e.:
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery(
    "SELECT SUM(COL_X) MY_SUM FROM TABLE_A"
    int i = rset.getInt("MY_SUM");null

  • Crystal Report is very slow to fetch the results of a Query used in Command

    Hello All,
    We have a query which is used in command object in Business Objects Crystal reports XI. This report is executed against IBM DB2 database. It is taking 40 min to getback the results. Here is the Query. Please suggest how can i improve the performance of this query in report as another reporting tool is taking 2-3 min time to fetch the results with the same query.
    SELECT
    A1.CARR_NUM ,  A1.CST_CTR_NUM ,A1.CLM_CLOSE_STS_CD ,   A1.CLM_RJCT_STS_CD ,A1.CLM_VOID_STS_CD ,  A1.PMT_MTCH_DT , A1.ASC_TRANS_TYP_CD ,  A1.DRUG_DESC ,               
    A1.BATCH_NUM ,   T5.TPA_RJCT_CD ,  A1.DIV_NUM , A1.INVC_NUM ,  A1.SERVICE_DT ,  A1.ACTL_REFILL_NUM ,  A1.CLM_DSPSN_CD ,  A1.INVC_RSBMT_CD , A1.TP_TOTAL_DUE_AMT ,  
    A1.INTL_BILG_MTHD_CD , A1.CARR_EOB_1_CD ,  T5.CARR_EOB_CD_DESC ,  A1.NTNL_DRUG_CD ,  A1.PTNT_FRST_NM ,  A1.PTNT_MDDL_INTL ,  A1.PTNT_LST_NM ,  A1.PTNT_BIRTH_DT ,
    A1.CRDHLDR_ID_NUM   
    FROM
    (SELECT DISTINCT
        T1.CARR_NUM ,  T1.CST_CTR_NUM ,  T1.CLM_CLOSE_STS_CD ,  T1.CLM_RJCT_STS_CD ,   T1.CLM_VOID_STS_CD ,  T3.PMT_MTCH_DT ,   
        T3.ASC_TRANS_TYP_CD ,  T2.DRUG_DESC ,  T4.BATCH_NUM , T1.DIV_NUM ,  T1.INVC_NUM ,  T1 . SERVICE_DT ,  T1.ACTL_REFILL_NUM ,                                         
        T1.CLM_DSPSN_CD ,  T1.INVC_RSBMT_CD ,T1.TP_TOTAL_DUE_AMT ,  T1.INTL_BILG_MTHD_CD ,T3.CARR_EOB_1_CD ,T1.NTNL_DRUG_CD ,  T2.PTNT_FRST_NM ,         T2.PTNT_MDDL_INTL , T2.PTNT_LST_NM ,  T2.PTNT_BIRTH_DT ,  T2.CRDHLDR_ID_NUM 
       FROM  
                    PDRD2LO.VINVC_CLM T1                             
                   , PDRD2LO.VPMNT_DTL T3                             
                   , PDRD2LO.VINVC_CLM_2 T2                           
                   , PDRD2LO.VINVC_ITM_PHARM  T4                     
                        WHERE  
      T1.CLM_CLOSE_STS_CD ='OP'                     
                  AND  T1.CLM_RJCT_STS_CD ='RJ'                       
                  AND  T1.CLM_VOID_STS_CD ='NV'                       
                  AND  T3.ASC_TRANS_TYP_CD ='40'                      
                  AND  T1.CARR_NUM = T3.CARR_NUM                      
               AND   T1.CST_CTR_NUM = T3.CST_CTR_NUM                  
               AND   T1.DIV_NUM = T3.DIV_NUM                          
               AND   T1.INVC_NUM = T3.INVC_NUM                        
               AND   T1.SERVICE_DT = T3.SERVICE_DT                    
               AND   T1.CLM_CTRL_NUM = T3.CLM_CTRL_NUM                
               AND   T1.ACTL_REFILL_NUM = T3.ACTL_REFILL_NUM          
               AND   T1.INVC_ITM_NUM = T3.INVC_ITM_NUM                
               AND   T1.REFILL_TRANS_NUM = T3.REFILL_TRANS_NUM        
               AND   T1.CARR_NUM = T2.CARR_NUM                        
               AND   T1.CST_CTR_NUM = T2.CST_CTR_NUM                  
               AND   T1.DIV_NUM = T2.DIV_NUM                          
               AND   T1.INVC_NUM = T2.INVC_NUM                        
               AND   T1.SERVICE_DT = T2.SERVICE_DT                  
               AND   T1.ACTL_REFILL_NUM = T2.ACTL_REFILL_NUM        
               AND   T1.CLM_CTRL_NUM = T2.CLM_CTRL_NUM              
               AND   T1.INVC_ITM_NUM = T2.INVC_ITM_NUM              
               AND   T1.REFILL_TRANS_NUM = T2.REFILL_TRANS_NUM      
               AND   T1.INVC_CTRL_NUM = T4.INVC_CTRL_NUM) A1        
    LEFT OUTER JOIN  PDRD2LO.VCARR_EOB T5                
                ON    A1.CARR_EOB_1_CD = T5.CARR_EOB_CD             
                AND   A1.CARR_NUM = T5.CARR_NUM                     
                AND   A1.DIV_NUM = T5.DIV_NUM        
    Thanks!

    Hi Zilla Eh ,
    Thanks for the reply.
    The another reporting tool name is impromptu and it takes 2-3 min , where in Crystal report is taking around 40 min. Please let me know if you any other questions.
    Regards
    Ravi

  • Using the results of one Query in a workbook as a filter in another query

    Hello!
    I'd like to have one workbook which my users can execute and the result from one Query (e,g, Customer Account Number) will then be used as a filter in a second query (which would be from a different cube).
    Can this be done?
    Cheers.

    Hi,
    As far as I understand your requirement, you want to pass the result of one query to another query as a filter.
    Well you can do this, by Using Replacement Path Variable.
    For e.g. you want to pass Values of Custmomer Account Number to another query. In the second query, create one variable on Customer Account Number with type Replacment Path. Here it will ask you to enter the name of the query from which you would like to take the values of Customer Account Number.
    When you will run the second query , it will execute the first query from which you want to read the customer accoutn number in the back-end. And it willl display the output the second query as per the valeus of customer account number.
    This will help.
    - Jaimin

  • Can the Results of a Query be a Data Source?

    I'm sure this has been covered somewhere but I couldn't find what I was after sssoooooooooo...
    I have a small interrface that loads data from a file into a table, I have a query which changes the data into a different format and structure prior to loading it into another table.
    Currently, I am using 2 stored procs to do the format change and load to the new table...
    Basically, is there any way of setting up a query as a data source and map the results of the query into a target??
    As always - your feedback and input is greatly appreciated
    Thanks,
    Gee

    The idea here is to not drag and drop a datastore as a target, but to create this datastore directly in the interface. You can then use this interface as source of another interface.
    here is the doc... Let me know if you need more help.
    Target Datastore
    An interface can have only one target datastore. There are two possibilities for this datastore:
    A permanent datastore, corresponding to a datastore that already exists in a model.
    A temporary datastore, that does not yet exist in a model, and which will thus be created dynamically by the interface, in either the work or data schema of the logical schema of the Staging Area specified on the Definition tab of the interface.
    The target datastore, with the mapping for each column, is displayed on the right of the Diagram tab.
    To edit the properties of the target datastore, click on the datastore title. The properties panel will appear at the bottom of the window.

  • I need return the result of a query on a stored procedure

    I need return the result of a query on a stored procedure, I mean when I execute a stored procedure it returns a result set as a select query.
    Best regards...

    If you want some pl/sql code that can be used in a query as it were a table you may be interested in table functions:
    SQL> create or replace type
      2  t_emp is object (
      3  name            varchar2(30),
      4  hire_date date,
      5  salary       number);
      6  /
    Tipo creato.
    SQL> create or replace type
      2  t_emptab is table of t_emp;
      3  /
    Tipo creato.
    SQL> create or replace function tab_fun(p_dept in number)
      2  return t_emptab is
      3  e t_emptab;
      4  begin
      5    select t_emp(ename,hiredate,sal)
      6      bulk collect into e
      7      from emp
      8     where deptno=p_dept;
      9
    10    return dip;
    11  end;
    12  /
    Funzione creata.
    SQL> select *
      2  from table(tab_fun(20));
    NAME                           HIRE_DATE  SALARY
    SMITH                          17-DIC-80        800
    JONES                          02-APR-81       2975
    SCOTT                          09-DIC-82       3000
    ADAMS                          12-GEN-83       1100
    FORD                           03-DIC-81       3000A procedure cannot be used in a select statement.
    Max
    http://oracleitalia.wordpress.com

  • Extracting the result of a query into a internal table

    Hi,
    Does anyone knows or have an idea how to extract the result of a query into a internal table, is there a function module or BAPI?
    Thanks in advance,
    CK

    So then normally I would use a statment like:
    IFunctionTemplate ftemplate = repository.getFunctionTemplate("<b>BAPI_SALESORDER_GETLIST</b>");
    to call a particluar function, but I tried using
    IFunctionTemplate ftemplate = repository.getFunctionTemplate("<b>BAPI_MDDATAPROVIDERBW_GETCATALOGS</b>");
    and it did not seem to work. I also tried -
    IFunctionTemplate ftemplate = repository.getFunctionTemplate("<b>MDDataProviderBW.GetCatalogs</b>");
    How do I format the function?
    Thanks
    Paul

  • Getting the actual size of the result of a query

    Hi,
    I would like to ask if someone knows on how to get an estimate size of the result of a query on a table. To make it more specific, here is an example.
    Let us say I have this table called EMP and it has a column called DATE. I have issued a query like this:
    select * from EMP where DATE < to_date('01-AUG-08');
    I want to get the actual size of the result of the query in bytes or MB. How would i achieve this without creating another table and transferring the data on it.

    You can use SQL*Plus Autotrace to have the data size sent between client and database session:
    SQL> set autotrace traceonly statistics;
    SQL> select * from employees where hire_date < to_date('01/08/08');
    107 rows selected.
    Statistics
            430  recursive calls
              0  db block gets
            123  consistent gets
             11  physical reads
              0  redo size
           9405  bytes sent via SQL*Net to client
            457  bytes received via SQL*Net from client
              9  SQL*Net roundtrips to/from client
              3  sorts (memory)
              0  sorts (disk)
            107  rows processed
    SQL>Edited by: P. Forstmann on 25 janv. 2011 18:55

  • How to show only the result of a query

    Hi experts,
    i need to show only the result of a query (hiding all the rows)
    according to mathematical functions like sum, average, count ets. i need the result to be shown widhwise the query (Horizontal)
    thanks a lot
    Nir

    Hi
    I did get exactly.....but if i m right then you can do this by selecting the keyfigure goto the calculation tab select calculate result as sum or whatever you want to use.
    Regards
    Lalit k Tyagi

  • Display the result of a query in descending order.

    Hello Experts,
    How can I display the result of a query in descending order?
    Thanks much in anticipation.
    Regards.

    Hi Kumar,
    If you want to display char in descending order, in the query designer set the sorting setting as desceing for that particular characteristics, or if you want to see the KF in descending order, create a condition on that KF and set as TOP N and set N as 999999, that would display your KF in descending order.
    - Danny.

  • SSIS question - Email the results of the table in pipe delimited format to the users

    I am new to SSIS and I have a requirement.  I have a sales table that has transactions for all months.  I am trying to automate the process which involves following steps:
    I need to query the table based on previous month.
    Email the results of the table in pipe delimited format to the users.
    What I am currently doing:
    I created a temp table and load the query results in it every month by truncating the previous month’s data.  Saved the query results in excel format. Open the excel and save it in csv format. Use SSIS package to convert csv to txt format and email
    them manually with the txt file name as “Salesresults_<previousmonth>.
    I just want to automate this process but the main challenge comes up with email with txt attached. Please help me out.

    First create a SSIS variable(@[User::Path]) that store folder path as "C:\Test".
    Select the "Expression" tab in Send Mail Task Editor and select the appropriate property(FileAttachments) and assign the below expression.
    @[User::Path] + "\\Salesresults_" + (DT_WSTR, 10) MONTH( GETDATE() ) + (DT_WSTR, 10) YEAR( GETDATE() ) + ".txt"
    Regards, RSingh

  • I have problem with my wifi in 4 S, i cant connect to any wifi itried resetting network setting and reset all setting but the result was the same, its only keeps searching for wifi and cant find any, itried to use OTHER but also didnt work.please help me

    i have problem with my wifi in 4 S, i cant connect to any wifi itried resetting network setting and reset all setting but the result was the same, its only keeps searching for wifi and cant find any, itried to use OTHER but also didnt work.please help me???

    If Join was on then your home wi-fi must be set to Non-Broadcast.  If you did not set this up (maybe your provider did) then you will need to find the Network Name they used, and any password they used.  The SSID is Security Set ID and to see more try http://en.wikipedia.org/wiki/SSID .  Basically it is the name used to identify your router/network.  A lot of times the installer will leave it set as LinkSys, or Broadcom or whatever the manufacturer set it as for default.  Your best bet is to get whoever installed it to walk you through how they set it up, giving you id's and passwords so you can get in.  HOWEVER, if you are not comfortable with this (if you set security wrong, etc.) you would be well ahead of the game to hire a local computer tech (networking) to get this working for you.  You can also contact the vendor of your router and get help (if it is still in warranty), or at least get copies of the manuals as pdf files.  Sorry I can't give you more help, I hope this gives you an idea where to go from here to find more.

  • Store the result of the column in variable in answer

    Hi All,
    Is there a way to store the value of the result of the column of the report and use that value in calculation in another report. I need to get the grandtotal value which changed according to the prompt and want to use that grand total value to calculate new column in another report. Can we use presentation variable? I want to store the total value 30 and then calculate the region percentage. I am not able to store the total value and create the new column calculation using the total value.
    Region 1 10 *0.33*
    Region 2 20 *0.67*
    Total 30
    Thanks,
    Virat
    Edited by: 872073 on Jan 9, 2013 6:30 AM

    You can use this Report as a Subreport in the Final Report,and apply a filter the column=subreport.columnvalue.

Maybe you are looking for

  • How do I put in a watermark onto my original work?

    how do I put in a watermark onto my original work?

  • CS3 & 10.5.2 unjustified "not enough memory (ram)" error

    This problem occurs when I use particular functions, usually colour related ones (eg. the colour sampler, using the colour palette and 'select by colour'). It also occurs at random. It seems to get more frequent as I use photoshop for longer. The err

  • The Update doesn't work

    Hey everyone, it says there is a update for my Mac Os X 10.6.8 called 'Java for Mac OS X 10.6 Update 12' I did run the normal sofware update on my computer and I downloaded it directly from the apple support. But nothing works. It always stops and sa

  • Start Up Screen / Automatic Camera

    Hi When I press the on button to wake my LUMIA 520 up, the start up screen is brielfy visible before the camera then automatically start itself up, and I dont even get chance the slide/swipe the screen up?! I have had the phone for a while and its on

  • Multiple tabs open

    When I hit an email link firefox opened multiple mail to tabs on the browser.