Latest Value to Show in Query

I'm trying to create a query where the latest value shows up on my query.
For example, my data looks like the following:
Week      Hours
05/2007   1360.0
06/2007   1360.0
07/2007   1440.0
08/2007   1440.0
09/2007   1400.0
If I have a variable on the week and choose a range from 01/2007 through 11/2007, I want the ending hours to show up as 1400.0.  Currently, they show up as 0 since I don't have any data for week 11/2007.  Any ideas on how I might be able to achieve this?
Any help is greatly appreciated.

Hi,
As per my understanding I believe that you need the latest data in the Date range inputted.
You can calculate the value using Formula variable. Populate the Forumula variable in the User exit based on the Date range value.
Thanks & Regards,
Namrata

Similar Messages

  • Discoverer Report showing Null VS Show SQL query showing results !!!

    I created a simple Cross Tab Discoverer report from a custom SQL which has a calculation for balances. The output is giving all null values even though there are balances. The output doesn't seem right. So I copied the query from Tools-->Show SQL and ran the query in the TOAD where I'm showing balances for the report. I don't understand why it is not showing in the discoverer. Please help.
    Thanks
    Edited by: PA1B on Jan 27, 2010 11:40 AM

    Sorry for late reply.
    Below is the Show SQL query. I don't think the query is application dependent. C_1 is my calculation.
    SELECT o279709.SEGMENT3 as E279727,
    o279709.SEGMENT4 as E279728,
    CASE WHEN o279709.CURRENCY_CODE = 'USD' AND o279709.TRANSLATED_FLAG <> 'Y' THEN SUM(o279709.ENDING_BAL) ELSE 0 END as C_1,
    GROUPING_ID(o279709.CURRENCY_CODE,o279709.SEGMENT3,o279709.SEGMENT4,o279709.TRANSLATED_FLAG) as GID
    FROM ( --Foriegn Entity USD Balances
    SELECT                B.SEGMENT1,
                                       B.SEGMENT2,     
                                       B.SEGMENT3,
                                  (select distinct substr(cat.COMPILED_VALUE_ATTRIBUTES,5,1) from apps.fnd_flex_values cat
                   where FLEX_VALUE_SET_ID = (select bat.FLEX_VALUE_SET_ID from apps.fnd_id_flex_structures_vl aat, apps.fnd_id_flex_segments_vl bat
                                                                                                                       where bat.id_flex_code = 'GL#' and
                                                                                                                            bat.id_flex_code = aat.id_flex_code and
                                                                                                                            aat.APPLICATION_ID = bat.APPLICATION_ID and
                                                                                                                            aat.APPLICATION_ID = 101 and
                                                                                                                            bat.SEGMENT_NAME = 'Prime Account' and
                                                                                                                            aat.id_flex_num = bat.id_flex_num
                                                                                                                            and bat.id_flex_num in (select distinct chart_of_accounts_id from apps.gl_code_combinations gat
                                                                                                                                                                              where gat.code_combination_id = A.code_combination_id))
                                       and cat.flex_value = b.segment3) ACCT_TYPE ,
                                       B.SEGMENT4,
                                       B.SEGMENT5,
                                       B.SEGMENT6,
                                       B.SEGMENT7,
                                       B.SEGMENT8,
                                       B.SEGMENT9,
                                       B.SEGMENT10,
                                       B.SEGMENT11,
                                       B.SEGMENT12,
                                       B.SEGMENT13,
                                       C.NAME,
    A.SET_OF_BOOKS_ID,
                                       A.CURRENCY_CODE,A.TRANSLATED_FLAG,
                                  SUM(NVL(A.BEGIN_BALANCE_DR,0) - NVL(A.BEGIN_BALANCE_CR,0)) BEG_BAL,
                                  SUM(NVL(A.PERIOD_NET_DR,0)) DEBITS,
    SUM( NVL(A.PERIOD_NET_CR,0)) CREDITS ,
    A.PERIOD_NAME,
                                  SUM(NVL(A.BEGIN_BALANCE_DR,0) - NVL(A.BEGIN_BALANCE_CR,0))+ SUM(NVL(A.PERIOD_NET_DR,0) - NVL(A.PERIOD_NET_CR,0)) ENDING_BAL
    FROM                     APPS.GL_BALANCES A ,
                                       APPS.GL_CODE_COMBINATIONS B,
                                       APPS.GL_SETS_OF_BOOKS     C
    WHERE                     A.CODE_COMBINATION_ID = B.CODE_COMBINATION_ID
    --AND                           A.PERIOD_NAME = 'SEP-09'
    AND                          C.SET_OF_BOOKS_ID = A.SET_OF_BOOKS_ID
    --AND                           A.TRANSLATED_FLAG <> 'Y'
    --AND                           B.SEGMENT1 = '83101'
    --AND                           B.SEGMENT3 = '14602'
    --AND                           A.SET_OF_BOOKS_ID = 77
    --AND                           A.CURRENCY_CODE = 'USD'
    GROUP BY           A.CODE_COMBINATION_ID,
                                  B.SEGMENT1,
                                       B.SEGMENT2,     
                                       B.SEGMENT3,
                                       B.SEGMENT4,
                                       B.SEGMENT5,
                                       B.SEGMENT6,
                                       B.SEGMENT7,
                                       B.SEGMENT8,
                                       B.SEGMENT9,
                                       B.SEGMENT10,
                                       B.SEGMENT11,
                                       B.SEGMENT12,
                                       B.SEGMENT13,          
                                       A.CURRENCY_CODE,
                                       A.TRANSLATED_FLAG,
                                       C.NAME,A.PERIOD_NAME,
    A.SET_OF_BOOKS_ID
    ) o279709
    WHERE (o279709.PERIOD_NAME = 'DEC-09')
    AND (o279709.SET_OF_BOOKS_ID <> 72)
    AND (o279709.SEGMENT12 = '000')
    AND (o279709.SEGMENT3 IN ('10101','10301','10502','12001'))
    AND (o279709.SEGMENT1 IN ('82901','82902','82903','83001','83003','83201'))
    GROUP BY GROUPING SETS(( o279709.CURRENCY_CODE,o279709.SEGMENT3,o279709.SEGMENT4,o279709.TRANSLATED_FLAG ),( o279709.SEGMENT3,o279709.SEGMENT4 ),( o279709.SEGMENT3 ))
    HAVING (GROUP_ID()=0)
    ORDER BY GID DESC;
    Thanks,
    PA1
    Edited by: PA1B on Jan 29, 2010 12:50 PM

  • Values Bifurcation in BEx Query Designer

    Dear BI Gurus,
    In a column we are getting both positive value and -ve value. We want to bifurcate the values and show only +ve value in one column and show -ve value in another column. Is it possible through Bex query designer?
    Please through some light on this issue.
    With Regards,
    Balachander.S

    Hi bala,
    This can be achieved by creating two calculated Key figures, Just use else if condition in the formula and use if KF1=KF>0 then KF else 0, here all the positive values will be displayed similarly use if KF2=KF<0 then KF Else 0 it will display all the negative values. But here all the values will be displayed. Just hide the Key figure and display only calculated keyfigures. Else you can use exceptions to differentiate the positive and negative values.
    Hope this helps.....
    Rgs,
    I.R.K

  • Passing multiple values to a BI query

    Hi experts,
    This question has probably been asked a few times, but I have an issue with passing multiple values to a BI query.  Here's the scenario....
    1)  I have created a BI query.  When I test the query in VC I can enter values 1000:1100 in the Infoobject Business Area and I see that the values are passed through OK
    2)  Then I created a form where Business Area is an Input Field
    3)  I linked the form to the BI query and assigned value @Business_area
    3)  A table is linked to the BI query to view my result ( I have set a distinct before my table to view the data by fiscal year period)
    4) When running the VC model, the table show values for 1000 and 1100, but when I enter 1000:1100 and Submit it does not show both the business areas
    There must be something I am missing and I thought it was that in my submit string (between the input form and the BI query) that I should fill in some values (instad of @Business_area). I tried to fill in 1000:1100, but then I get an error saying Invalid time 1000:1100.
    I would really appreciate any help on this issue :-).
    Regards,
    Thomas

    Hi Thomas,
    I wish to enter default values for dates onto the VC form. Ie I have a VC report to display a customer's shipped data. Ship date is a selection field/ input field on the form for the report/ output table.
    At present if a user clicks submit they get all their shipped records from the beginning of time till today. How can I restrict the dates at VC level to past  3months? So if the users don't specify a ship date, they get the past 3 months data, and afterwards they can change it an retrieve all the data or past 2 years as they wish.
    Thanks,
    Jasmine

  • How can i see the values of a prepared query

    Somebody knows about a tool that show me the values of a prepared query.
    I tried with the view V$SQL and with the TKPROF, but both show me the same query text and i need to know the parameter's values. Example of a prepared query - I don't know if it is the correct name of that kind of query.
    UPDATE "CL0E01" SET "BLOQUEO"=:1
    WHERE
    "CLAVE"=:2 AND "NUM_REGS"=:3 AND "ULT_CLV"=:4 AND "BLOQUEO"=:5
    Is it a tool that show me the value??
    Thanks for the help.
    Roberto Moreno

    I tried with the view V$SQL_BIND_CAPTURE but i get this error. "ORA-00932: inconsistent datatypes: expected CHAR got -". I executed in the Application Express.
    What could be wrong??
    I put my STATISTICS_LEVEL to ALL but nothing happen. I recieved the same result.
    I executed the view V$STATISTICS_LEVEL, for the Bind Data Capture I have enabled the session and system status, the activation level is TYPICAL.
    Thanks for your help TongucY

  • Error when executing a scenario based on Variable type Latest Value

    Hi,
    I have created two ODI varaible -
    1) filename of type as "Historize"
    2) id of type as "Historize"
    I have 2 Models -
    1) One is based on FIle Technology with resource name as #CUSTOMER.filename (dynamic filename) (TARGET)
    2) second is based on Oracle technology which contains two relational tables (SOURCE)
    I have an interface in which one-to-one mapping is done from source to target.
    At the junction of two source tables..i have put a query as "CUSTOMER_PAYMENT.CUSTID=CUSTOMER_DETAILS.CUSTID and CUSTOMER_DETAILS.CUSTID !=(#id)"
    Package:
    drag and drop two ODI variables , interface
    Connect two ODI variable to interface and define the variable type as "Declare Variable" in the package.
    Define filename as the firststep.
    filename(firststep)-----------------------------
    INTERFACE
    id---------------------------------------------------
    It is working fine with java callout and command prompt. It is not working when i invoke it on desginer.
    It gives me error:
    java.sql.SQLException: ORA-00936: missing expression
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:503)
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:965)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1051)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3026)
         at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Similary when i define the variable type as "Latest Value/Niot Persistent"...giving me same error as above...but working finw with java and command prompt.
    Thanks
    Edited by: user12420305 on Aug 31, 2010 10:42 PM

    Hi,
    My Package contains:
    First step : customerid and custFileName
    Second step : interface
    Type of both the variables in package is "Declare"
    customerid : type Alphanumeric - Historize
    custFileName : type Alphanumeric - Historize
    generate a scenario of the package and execute it.
    custFileName : abc.txt customerid : 2
    The file is created but it is giving me error for customer id.
    Operator Description:
    select     
         CUSTOMER_DETAILS.CUSTID CUSTOMER_ID,
         CUSTOMER_DETAILS.LAST_NAME || CUSTOMER_DETAILS.FIRST_NAME CUSTOMERNAME,
         CUSTOMER_DETAILS.ADDRESS ADDRESS,
         CUSTOMER_PAYMENT.PAYMENTID PAYMENT_ID,
         CUSTOMER_PAYMENT.AMOUNT AMOUNT
    from     ODITEST1.CUSTOMER_DETAILS CUSTOMER_DETAILS, ODITEST1.CUSTOMER_PAYMENT CUSTOMER_PAYMENT
    where      (1=1)
    And (CUSTOMER_PAYMENT.CUSTID=CUSTOMER_DETAILS.CUSTID and CUSTOMER_DETAILS.CUSTID !=(#CUSTOMER.customerid))
    Operator Execution:
    936 : 42000 : java.sql.SQLException: ORA-00936: missing expression
    java.sql.SQLException: ORA-00936: missing expression
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:503)
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:965)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1051)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3026)
         at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    When i try to execute the scenario from command promt/java callout ..it is working fine.
    Thanks.

  • Latest Value in Report

    Hi,
    I am creating a report with Client have some numbers for year and month basis. I am showing this in a Cross tab. User want to see the latest value also in a seperate  Column as latest and it should be the last month shown in cross tab.
    Attached is something I am looking for .
    I am using BO 3.1
    I am not able to find any way how to do that. If someone can help me.
    Thanks.

    you can use Last function in a footer column.
    syntax: =Last([Measure Object])

  • How to access filled in values of an af:query component

    Hi,
    I have a viewobject with a viewcriteria defined on it. The results are showed in a result table. When a user selects a row from the result table a new page is showed with detail data. In that page i would like to show the user the filled in attributes with their values to remember the user to which search criteria the results correspond. How can i access the attributes with their values of a af:query component?
    Kind Regards,
    Andre

    Hi Andre,
    maybe you can try Frank's approach: http://www.oracle.com/technology/products/jdev/tips/fnimphius/AdfCodingQuickies.html
    I just tested for RichInputText:
        public String cb1_click() {
            parseQuery(query1);
            return null;
        private void parseQuery(UIComponent component){
          List<UIComponent> list = component.getChildren();       
            for (UIComponent com : list){          
             if (!(com instanceof RichInputText)){
               parseQuery(com);
             else{
                if (((RichInputText)com).getValue() != null) System.out.println( ((RichInputText)com).getId() + " : " + ((RichInputText)com).getValue() );
        }but the problem is with getLabel() - it will return null
    regards,
    Branislav

  • Need SQL to update Column based on latest value

    EFF_DTE     EXCH_FROM_CTRY_CD     EXCH_TO_CTRY_CD     SECTY_LST_PRCE     SECTY_MTH_AVG_PRCE      New Col In View
    1/1/2013     USD     MXN     12.988     12.988     12.88672
    1/2/2013     USD     MXN     12.988     12.988     12.88672
    1/3/2013     USD     MXN     12.9658     12.9806     12.88672
    1/4/2013     USD     MXN     12.7488     12.92265     12.88672
    1/5/2013     USD     MXN     12.743     12.88672     12.88672
    I have above table and I need to populate New Col using view. New Column value should be Latest date SECTY_MTH_AVG_PRCE . For example If today date is 1/5/2013 date New Col should populate value 12.88672 for all the records for that month only. So every day when new MTH AVG Rate come then it should populate latest value of Secty_MTH_AVG_PRCE to New Col.
    The New Col should populate with latest Avg_Prc only for that month. If New Month Start then new col should now update all records value but It should update only for June month Only.
    Please help me to make a view query. and let me know if any query?
    Thanks in advance.

    Hi,
    This sounds like a job for the analytic FIRST_VALUE function:
    MERGE INTO  table_x     dst
    USING  (
               SELECT  eff_dte
            ,        FIRST_VALUE (secty_mth_avg_price)
                        OVER (
                                  PARTITION BY  exch_from_ctry_cd, exch_to_ctry_cd  -- Maybe
                        ORDER BY      eff_dte  DESC
                              )     AS new_col
            FROM    table_x
            WHERE   eff_dte     >=           TRUNC (SYSDATE, 'MONTH')
            AND        eff_dte     < ADD_MONTHS (TRUNC (SYSDATE, 'MONTH'), 1)
           )          src
    ON     (    dst.eff_dte               = src.eff_dte
           AND  dst.exch_from_ctry_cd     = src.exch_from_ctry_cd     -- Maybe
           AND  dst.exch_to_ctry_cd          = src.exch_to_ctry_cd     -- Maybe
    WHEN MATCHED THEN UPDATE
    SET    dst.new_col     = src.new_col
    ;I'm just guessing at lots of things, because the question is so unclear.
    Is there a view involved in this problem, as well as the table? What role, if any, do exch_from_ctry_cd and exch_to_ctry_cd play in this problem. When you say "June", do you mean "February"?
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data. Make sure that no column is the same for all rows in the sample data. (E.g., have a least 2 distinct values for exch_to_ctry_cd.)
    If you're asking about a DML statement, such as UPDATE, the sample data will be the contents of the table(s) before the DML, and the results will be state of the changed table(s) when everything is finished.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}

  • Runtime filter values not showing

    Hi all,
        I am on BW 3.5.  I have a query that has a pop-up filter (i.e. a user-entry fillter that appears when the query runs) for 0MATERIAL__DIVISION.  When the user uses the drop down on the filter pop-up for Division, no values appear. When the query actually appears, these divisions show up just fine.  So my problem is not with the query, but in getting the values to appear in the drop down of the run-time filter pop-up.  Why would that be?
       Thanks.
    Dave

    Hi,
           IN BI 7.0 at the side near the technical properties you have option facilities to display the filter values...
    Go for F4 help on that variable at the side you will have an option to display filter values which shows history values
    single values there you will have options to show all data in master data only posted for navigation
    u can use master data option and get all values in master data.
    Hope this helps for you.
    Thanks,
    Arun

  • Is it possible to display default values in input ready query.

    Hi Guys,
    Is it possible to display default values in input ready query.

    HI,
    Select the particular Variable.....in the right hand side u will find the default values tab....in that u can give the values...and save...if u run the query then it will show the default values for that Variable.selection....
    Thanks/Tarak

  • How to display first row value returened from a query as checked as default in a report

    How to display first row value returned from a query as checked as default in a report
    Example
    Parameter 1
    Paramerter2
    ABD
    x(checked)
    Test
    DEF
    JMG
    Mudassar

    Hi Mudassar,
    The issue is caused by the order in which the parameters appear in the report data tab can be difference between our report execution and it failing. In other words, “Parameter2” is execution before parameter “A” due to this issue. We can adjust the parameter’s
    order to solve the issue.
    If “Parameter2” is parameter “A”, we cannot use that expression. Because fields cannot be used in report parameter expression, if we want to display the first value returned from a query as default value, we have to fill the “Specify values” text box with
    the specific value in Default Values dialog box.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Can't select any value in radio to query report.

    Dear Support,
    About BI-BASE-B version is 1000.7.40.2.20.20130621014800 in portal,when we select value in radio to query report which lend to white screen,so i think that may be issue.But if i set manual value to query report,it is fine.So Connection is  available for system NBPCLNT800  in portal.
    error msg:
    #2.#2014 03 30 20:16:38:377#+0800#Error#/Applications/BI#
    #BW-BEX-ET-WJR#sap.com/com.sap.ip.bi.base#C000C0A8183501B60000000300007621#118639550000000004#sap.com/com.sap.ip.bi.web.portal.integration#com.sap.ip.bi.base.portal.connection.Localization#SYSADM#26##100FCD4DB80411E39272000007124BBE#113b773bb80511e3c097000007124bbe#113b773bb80511e3c097000007124bbe#0#Thread[HTTP Worker [@847096065],5,Dedicated_Application_Thread]#Plain##
    BI exception with class "ConnectionException" and message "Connection is not available for system NBPCLNT800". See default trace for log ID "null".#
    Thanks

    Hello Tom,
    could you please close this thread properly, so that others can find the solution, too? Please have a look at the blog How to close a discussion and why if you're unsure on how to do that. Thank you!
    Regards,
    Steffi.

  • Oracle Inventory: Inventory Value as on date Query

    Hi guys,
    We need to write a query to get inventory value based on a particular date, say '31-dec-2011' for certain auditing purposes. We can use historical transaction summary report for this purpose, however this report produces more than 800 pages for a single requirement.
    We were able to retrive the current inventory value using the following query
    SELECT SUM(moq.transaction_quantity*moq.item_cost) inv_cost
    FROM mtl_onhand_qty_cost_v moq
    WHERE organization_id = :p_org_id;
    Unfortunately none of our exercises from last couple of days fetch values anywhere near to the historical transaction summary report as on date inventory value for the above said cut off date.
    We tried the following query against mtl_material_transactions table
    Select sum(transaction_quanity*new_cost) inv_cost from mtl_material_transactions
    where organization_id = :p_org_id and
    trunc(transaction_date) > to_date(:p_date)+1 -- transaction value after '31-dec-2010' for example
    and then deducting value from second query from first query value...
    Please help
    Regards,
    raj

    Hi Sandeep
    I was able to run the API mentioned with before report trigger successfully, however cannot retrive any lines from cst_inv_qty_temp, cst_inv_cost_temp tables. I had gone through the API body and "assumes" this particular API repopulates the data each time when the report is submitted, identified by the unique session id.
    Would you comment?
    SET SERVEROUTPUT ON;
    Declare
    L_FCN_CURRENCY VARCHAR2(15);
    L_REPORT_NAME VARCHAR2(80);
    sql_stmt_num varchar2(5);
    l_exp_sub NUMBER;
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(8000);
    l_return_status VARCHAR2(1);
    l_as_of_date VARCHAR2(30);
    l_cost number;
    wms_org_count NUMBER;
    pjm_org_count NUMBER;
    l_calculate_intransit NUMBER;
    l_cst_inv_val EXCEPTION;
    Begin
    BEGIN
    MO_GLOBAL.SET_POLICY_CONTEXT ('S', 111);
    END;
    CST_Inventory_PUB.Calculate_InventoryValue(
    p_api_version => 1.0,
    p_init_msg_list => CST_Utility_PUB.get_true,
    p_organization_id => 111,---:P_ORG_ID,
    p_onhand_value => 1,
    p_intransit_value => 1,
    p_receiving_value => 0,
    p_valuation_date =>to_date('2011/01/01 00:00:00','YYYY/MM/DD HH24:MI:SS'), -- to_date(:P_AS_OF_DATE,'YYYY/MM/DD HH24:MI:SS'),
    p_cost_type_id => NULL, --2, --:P_COST_TYPE_ID,
    p_item_from => NULL, --:P_ITEM_FROM,
    p_item_to => NULL, --:P_ITEM_TO,
    p_category_set_id => NULL, --:P_CATEGORY_SET,
    p_category_from => NULL, --:P_CAT_FROM,
    p_category_to => NULL, --:P_CAT_TO,
    p_cost_group_from => NULL,
    p_cost_group_to => NULL,
    p_subinventory_from => 'BBM-01', --:P_SUBINV_FROM,
    p_subinventory_to => 'BBM-01', NULL, :P_SUBINV_TO,
    p_qty_by_revision => 2, 'no'--:P_ITEM_REVISION,
    p_zero_cost_only => 2, 'no'--:P_ZERO_COST,
    p_zero_qty => 2, 'no' --:P_ZERO_QTY,
    p_expense_item => 2, 'no' -- :P_EXP_ITEM,
    p_expense_sub => 2, --'No', -- l_exp_sub,
    p_unvalued_txns => 2, --:P_UNCOSTED_TXN,
    p_receipt => 1,
    p_shipment => 1,
    x_return_status => l_return_status,
    x_msg_count => l_msg_count,
    x_msg_data => l_msg_data
    IF l_return_status <> CST_Utility_PUB.get_ret_sts_success
    THEN
    RAISE l_cst_inv_val;
    END IF;
    FND_MSG_PUB.count_and_get(
    p_encoded => CST_Utility_PUB.get_false,
    p_count => l_msg_count,
    p_data => l_msg_data
    IF(l_msg_count > 0)
    THEN
    FOR i in 1 ..l_msg_count
    LOOP
    l_msg_data := FND_MSG_PUB.get(i, CST_Utility_PUB.get_false);
    DBMS_OUTPUT.PUT_LINE(i ||'-'||l_msg_data);
    END LOOP;
    END IF;
    End;

  • How can I reduce the selection for the characteristics value in a BW query

    Good morning,
    I need to find out how I can reduce the selection for the characteristics values in a BW query.
    In a BW query I have a characteristic "Due month".
    The characteristic values shown in the query are from 01.2001->03.2007. I would like to reduce it to the last 2 years,in the query view,  without deleting the data for the other years in the cube.
    Do you know how this can be done?
    Thank you in advance for your feedback.
    Kind regards,
    Linda Verding
    Staff Consultant - CSC

    hi,
    First thing you have to do is check the report how the data is being restricted only to those months.
    1) one it can be variable in which the code is written for that to populate for last few years.
    or else it must have been hardcoded for these months.
    Go into your report and underneath the characteristicsCALMONTH there must be an variable or hardcoding.
    You need to change this here in the report.
    You dont have to delete anything there.
    Regards, Siva

Maybe you are looking for

  • Picasa corrupts IPTC, Photoshop Program Error when saving

    I am having a problem editing some JPGs in Photoshop.  Some JPGs will open fine, but I can't save them.  I get the error that Photoshop can not continue because of a program error (very generic error if ever there was one).  After several hours resea

  • Problem with win2000sp3 and Java web start

    I have JRE and Java web start (1.2.0_01, build b01) which come downloading file j2re-1_4_1_01-windows-i586-i.exe from sun. I have win2000pro running on my PC. I had updated win2000 to service pack 2 and everything was fine. Now i decided to update to

  • Nokia x6 -- unable to browse this forum on defaul...

    I am able to browse many other websites with the default browser in my X6, include full screen ones, not just mobile sites. But I am NOT able to come to this forum. Everytime the X6 download about 50% (~500kb) of stuff, it just quit. I am using my WL

  • Sound not in sync

    We are capturing video into Final Cut Express HD (upgraded from FC Express). It is capturing the video and sound but the sound is not in sync. This is the note that pops up in our program. The audio sample rate of one or more of your capture media fi

  • Generate Excel spreadsheet

    How can I generate a tabular report in a excel spreadsheet. Can we make the comma separated output file automatically convert into an excel spreadsheet while excuting a report I am using Reports 6i Thank you Philip Juch