How to model query for -- existing and unchanged values

Hello BW Experts,
I have material and material group as navigational time-dependent attributes. I have a requirement to show the existing and unchanged values for the material and material group in the time frame 2003 to 2006 . how to create a query for this.
Suggestions appreciated.
Thanks,
BWer

HI ,
I think u need to add two more date fields as the attributes  to the master data and then use them and give restriction in the query with the Keydate to see data which has unchanged from One range to another . As key Date applies to only the system defined to and from dates present in the Master Data .
In query give Keydate as 31.dec.2006 and then give restriction for user defined dates sa follows :
User From : 01.01.1000 - 31.12.2002.
User To : 01.01.2007 -- 31.12.9999 .
Regards,
Vijay.
Message was edited by: vijay Kumar
Message was edited by: vijay Kumar
Message was edited by: vijay Kumar

Similar Messages

  • Querying for existing set of values

    HI,
    I have the following scenario. I have one table which has the measure_id,measure_value and date.
    For every date, I will be populating the measure_value for every measure_id. 
    If the source, doesnt have the value for a day,for a measure_id, I should update it with 0.
    If the source gets fresh data for a date, then the related value should get updated(sum of values for that day) or inserted.(incremental)
    DATE MeasureID MeasureValue
    02/01  1 10
    02/01  2 20
    02/01  3 30
    02/02  1 10
    02/02  2 0(no data in source)
    02/02  3 30
    Can you please give me the best query for this scenario. Any help is appreciated.
    Porus

    you can try using Merge command.
    I have used some sample data in Source and Destination tables.Also i used a measures table with three measure.
    Declare @Source Table(Dt Date, MeasureID int, MeasureValue int);
    Declare @Destination Table(Dt Date, MeasureID int, MeasureValue int);
    Declare @Measure Table (MeasureID int);
    Insert into @Measure select 1 union all select 2 union all select 3
    Insert into @Source
    select '20140201',1,10
    union all
    select '20140201',2,10
    union all
    select '20140201',3,10
    union all
    select '20140202',1,10
    union all
    select '20140202',3,30
    Insert into @Destination
    select '20140201',1,0
    select * from @Source
    select * from @Destination
    ;With AllMeasures
    as
    select * from
    (SELECT distinct Dt from @Source) A
    cross join @Measure
    MERGE @Destination AS target
    USING
    select A.Dt,A.MeasureID,isnull(S.MeasureValue,0) from AllMeasures A
    left join @Source S on A.Dt=S.Dt and A.MeasureID=S.MeasureID
    ) AS source (Dt, MeasureID,MeasureValue)
    ON (target.Dt = source.Dt and target.MeasureID = source.MeasureID)
    WHEN MATCHED THEN
    UPDATE SET MeasureValue = source.MeasureValue
    WHEN NOT MATCHED THEN
    INSERT (Dt, MeasureID,MeasureValue)
    VALUES (source.Dt,source.MeasureID,source.MeasureValue);
    select * from @Destination
    Vinay Valeti| If you think my suggestion is useful, please rate it as helpful. If it has helped you to resolve the problem, please Mark it as Answer

  • How to write query for this in TopLink ?

    I am doing a simple search in jsp where the search will the based on the choices chosen by user.
    I had given 3 check boxes for those choices.
    The problem is, query will be based on the choice or choices chosed by the user.
    How to write query for this in TopLink ?
    Thanks in Advance..
    Jayaganesh

    Try below solution, it is NOT best solution but might work:
    Declare @Questions TABLE (QuestionID INT, QuestionText Varchar(100))
    INSERT INTO @Questions
    VALUES (1, 'Comment'), (2, 'Score')
    DECLARE @Answers TABLE (authkey INT, QuestionID INT, questiontext VARCHAR(100), answertext VARCHAR(100))
    INSERT INTO @Answers
    VALUES (101, 1, 'comment', 'hi!!'), (101, 2, 'score', '4'), (102, 1, 'comment', 'excellent'), (102, 2, 'score', '5'), (103, 2, 'score', '6'), (104, 2, 'score', '8')
    SELECT
    A.AuthKey
    ,Q.QuestionID
    ,Q.QuestionText
    ,A.AnswerText
    FROM
    @Questions Q
    INNER JOIN @Answers A ON Q.QuestionID = A.QuestionID
    UNION
    SELECT
    A.AuthKey
    ,Q.QuestionID
    ,Q.QuestionText
    ,Null
    FROM
    @Questions Q
    CROSS JOIN @Answers A
    WHERE
    NOT EXISTS (SELECT 1 FROM @Answers SubQry WHERE SubQry.AuthKey = A.AuthKey AND SubQry.QuestionID = Q.QuestionID)
    Output
    AuthKey | QuestionID
    | QuestionText
    | AnswerText
    101 | 1 | Comment | hi!!
    101 | 2 | Score | 4
    102 | 1 | Comment | excellent
    102 | 2 | Score | 5
    103 | 1 | Comment | NULL
    103 | 2 | Score | 6
    104 | 1 | Comment | NULL
    104 | 2 | Score | 8
    Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered.

  • How to get LASTDAY for each and every month between given dates..

    Hi Friend,
    I have a doubt,How to get LASTDAY for each and every month between given dates..
    for ex:
    My Input will be look like this
    from date = 12-01-2011
    To date = 14-04-2011
    And i need an output like
    31-01-2011
    28-02-2011
    31-03-2011
    is there any way to achieve through sql query in oracle
    Advance thanks for all helping friends

    Here's a 8i solution :
    select add_months(
             trunc(
               to_date('12-01-2011','DD-MM-YYYY')
             ,'MM'
           , rownum ) - 1 as results
    from all_objects
    where rownum <= ( months_between( trunc(to_date('14-04-2011','DD-MM-YYYY'), 'MM'),
                                      trunc(to_date('12-01-2011','DD-MM-YYYY'), 'MM') ) );
    The above two query is worked in oracle 11GActually the first query I posted is not correct.
    It should work better with
    months_between(
       trunc(to_date(:dt_end,'DD-MM-YYYY'),'MM'),
       trunc(to_date(:dt_start,'DD-MM-YYYY'),'MM')
    )Edited by: odie_63 on 12 janv. 2011 13:53
    Edited by: odie_63 on 12 janv. 2011 14:11

  • How many types of Queues exists and how to identify them.

    Hello
    can anyone say How many types of Queues exists and how to identify them.
    What does R3R* and CSA* stands for.
    Regards,
    divya

    Hi Divya,
        The queues R3* and CSA* that you have specified are qRFC queues. qRFC queues are data queues which transport data to and fro different systems.
    There are also the tRFC queues which are triggered whenever you make RFC calls to connect to another system.
    Queues with prefix R3AD* - for delta download from R3->CRM
    Queues with prefix R3AU* - for data upload from CRM->R3
    Queues with prefix R3AR* - used to transfer data during request load from R3->CRM
    Queues with prefix R3AI* - for initial load from R3->CRM
    Queues with prefix CSA* - these are validation object specific queues used for processing/persisting data in CRM tables in a serialized manner. E.g. CSABUPA* for business partner,CSA_ORDER* for sales order etc.
    You can administer and monitor the queues in trax. SMQR,SMQS.
    Hope this helps you! Pls. do not forget to reward me some points.
    Regards,
    Sudipta.

  • How many types of tables exists and what are they in data dictionary?

    hi,
    How many types of tables exists and what are they in data dictionary?
    regards.

    Hello Liu,
    Please search in forum before posting any question .
    anyhow check the below link :
    http://web.mit.edu/sapr3/dev/sap_table_types.htm
    Thanks
    Seshu

  • How to install Workshop for WebLogic and WebLogic Portal?

    Hi All,
    I am new to Weblogic Portal. I would like to start learning Oracle Weblogic Portals..
    Can anyone please guide me, how to install Workshop for WebLogic and WebLogic Portal?
    As per the ""Tutorials – Getting Started with WebLogic Portal"" (http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/tutorials/setup_dev_env.html)
    we need to install the Workshop for WebLogic and WebLogic Portal.
    Please suggest me where should i get the required environments/IDE?
    Thanks,
    Harish.

    Hi Harish
    1. If this is your first time with Weblogic Portal, I would recommend to download the latest Weblogic Portal Software Rel 10.3.2 from this bottom link. Check Accept Radio button, for windows download windows installer. Its about 1 GB file. This software includes Eclipse IDE, Weblogic Server and Weblogic Portal.
    http://www.oracle.com/technology/software/products/wlp/index.html
    2. During the installation process, make sure at one point you select Custom mode (NOT default Typical mode). In next following screens you will see all bundles checked EXCEPT for Samples. So make sure you check Samples Check box both under Weblogic Server and Weblogic Portal. Then proceed. This will install full Weblogic Workshop (Eclipse IDE), Weblogic Server and Weblogic Portal. This is the good installation package. Also it will install samples for Portal and Server. If you select all default typical mode, it will NOT install samples. You can install samples later on also, but its good at installation time itself you select custom and check Samples also.
    3. WLP 10.3.2 uses Eclipse IDE. If you are familiar with Eclipse IDE this should be helpful. Otherwise also, its ok.
    4. For learning WLP, in Eclipse IDE, you need to create Portal EAR Project, then Portal Web Project. Inside portal web project create simple jsp hello world portlets and a simple portal.
    5. For Deploying and Testing Portal application you need to create Portal Domain using config wizard. You can see this from Start -> Programs -> Oracle Weblogic Portal shortcut -> Weblogic Server -> Tools -> Configuration Wizard.
    6. You can start Workshop IDE from Start -> Program Files -> Oracle Weblogic Portal ...-> Eclipse For Weblogic 10.3.2
    Here are the links for quick start guide for portal development. Please do refer them.
    http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/tutorials/index.html
    http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/quickstart/newproject.html
    HTH
    Ravi Jegga

  • I have become a full-time student. How do I adjust for Illustrator and how do I purchase InDesign?

    I have become a full-time student. How do I adjust for Illustrator and how do I purchase InDesign?

    Don't buy of eBay better to go direct to adobe try
    https://www.adobe.com/education/student-eligibility-guide.edu.html
    Regards
    Vividi

  • How to measure query run time and mnitor performance

    Hai All,
                   A simple question. How to measure query run time and mnitor performance? I want to see the parameters like how long it took to execute, how much space it took etc.
    Thank you.

    hi,
    some ways
    1. use transaction st03, expert mode.
    2. tables rsddstat*
    3. install bw statistics (technical content)
    there are docs on this, also bi knowledge performance center.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3f66ba90-0201-0010-ac8d-b61d8fd9abe9
    BW Performance Tuning Knowledge Center - SAP Developer Network (SDN)
    Business Intelligence Performance Tuning [original link is broken]
    also take a look
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918a17e663cc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/31b6b490-0201-0010-e4b6-a1523327025e
    Prakash's weblog on this topic..
    /people/prakash.darji/blog/2006/01/27/query-creation-checklist
    /people/prakash.darji/blog/2006/01/26/query-optimization
    oss note
    557870 'FAQ BW Query Performance'
    and 567746 'Composite note BW 3.x performance Query and Web'.

  • How to write code  for totals and subtotals in alv programing?

    how to write code  for totals and subtotals in alv programing?

    hi,
    1. <u><b>TOTAL.</b></u>
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_basic.htm
    2. <u><b>How do I add subtotals</b></u>
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    Regards
    Anver

  • Hi. I tried switching my Apple ID email address to my new email address and I don't know how to switch it for iCloud and iTunes. Please help!! It seems like Apple thinks I have two separate accounts, when I just tried to simply change it!

    Hi. I tried switching my Apple ID email address to my new email address and I don't know how to switch it for iCloud and iTunes. Please help!! It seems like Apple thinks I have two separate accounts, when I just tried to simply change it!

    Settings > Store > Sign Out.
    Sign in with the correct ID.

  • Wat should be data type for  negative and decimal values (eg: -1.2222)

    What should be data type for  negative and decimal values (eg: -1.2222)

    Hi
    U can use the data type DEC while creating the DOMAIN and in the domain u  have sign check box at the left corner of the screen, click that check box , u can assign negative values for the field which refers this domain.
    REWARD IF HELPFULL
    Anees.

  • Query for PO and GPRO

    Hi guys. I am relatively new to SAP Business with less than one month experience handling this software. I was given a task by my superior last week, whereby I was asked to create a query that will enable both PO and GRPO "combine" together, thus enabling my colleagues to skip the tradition manual way of doing things.
    I have tried a first code which I manage to combine both PO and GRPO. However, there is this problem whereby should I link it via the coding I have done, both specific PO and GRPO must exist on the database for it to be listed out on the query (Should PO is present but GRPO is not, then it do not appear on the query). Below is the code that I have done:
    SELECT T0.[DocNum] as 'PO No.', T0.[DocDate], T0.[DocStatus], T0.[CardName] as 'Supplier', T1.[ItemCode], T1.[Quantity], T1.[Price], T1.[LineTotal] as 'Total Amount', T1.[U_Ship_ETA] as ' Expected Arrival Date',T2.[WhsCode], T2.[OrderedQty], T2.[DelivrdQty], T3.[DocNum] as 'GRPO No.' FROM OPOR T0  INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN PDN1 T2 ON T1.DocEntry = T2.BaseEntry AND T1.LineNum = T2.BaseLine INNER JOIN OPDN T3 ON  T2.DocEntry = T3.DocEntry WHERE T1.[U_Ship_ETA] >= [%0] AND T2.[WhsCode] = 'PE-PG'
    The entire purpose of this assignment is to create a query that will facilitate the work of my colleague in HQ and warehouse. This specific person in HQ should be able to key in the PO then followed by another person on warehouse aware of the supply arrival date (expected) and to fill up the GRPO. The coding above, require both PO and GRPO to be present at the same time, which resulting in my colleague at warehouse unaware of the expected arrival date from PO.
    Edited by: AlexAkane on Oct 27, 2009 10:17 AM

    Second question:
    Due to this, I have recreated two different query. One query on PO and another on GRPO. Below are the coding for both,
    GRPO Tracking
    SELECT T0.[DocNum] as 'GRPO', T0.[DocStatus], T0.[DocDate], T0.[CardName] as 'Supplier',T1.[ItemCode], T1.[OrderedQty] as 'Ordered Quantity', T1.[DelivrdQty] as 'Delivered Quantity' , T1.[OpenQty] 'Remaining Open Quantity',T1.[WhsCode], T1.[U_Job_No] FROM OPDN T0  INNER JOIN PDN1 T1 ON T0.DocEntry = T1.DocEntry WHERE T1.[WhsCode] =[%0] ORDER BY T0.[CardName]
    PO Tracking
    SELECT T0.[DocNum] as 'PO Number', T0.[DocDate], T0.[DocStatus], T0.[CardName] as 'Supplier', T1.[ItemCode], T1.[Quantity] as 'Ordered  Quantity', T1.[Price] as 'Price Per Unit', T1.[LineTotal] as 'Total Amount' , T1.[WhsCode], T1.[U_Ship_ETA] as 'Expected Arrival Date' FROM OPOR T0  INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T1.[WhsCode] =[%0]
    I would like to know, is it possible to join into a single table?  Example- A and B . Join become AB.
    Sorry for this long post. I just don't know how to put in simpler words :). And I would appreciate any help or advice.
    Thank You !
    Regards,
    Alex
    Edited by: AlexAkane on Oct 27, 2009 10:16 AM

  • How to configure ODI for server and client correct?

    Hi forum,
    this is my first post and i hope you guys can help me out ...
    i
    am new to ODI and WLS and in my case ODI need to run on a server where a couple of clients can connect to, work on the same project with their own workspaces and accounts.
    The database will be located on the same server.
    As far as i understood, i need to install the the ODI Java EE type (not the standalone type) with a WLS ?!
    iI already nstalled
    JDK 6u41 (x64),
    ODI 11g (11.1.1.6, generic),
    Oracle DB 11g R2 enterprise and
    WebLogic 11g (10.3.6, generic)
    on the Server and now i am trying to connect to the ODI repositories from a client with an ODI standalone installation.
    I am now trying to insert a Data Source into the physical agemt (not even sure if i need to do this in my case).
    Following these instructions (http://docs.oracle.com/cd/E17904_01/integrate.1111/e12643/setup_topology.htm#CHDHJBAD) i get an ODI-26029 error.
    Below are some configuration information of the software i installed.
    h3. ODI
    Installation:
    Installationtype: full
    Oracle home directory: Oracle_ODI1
    Agent name: odi_agent
    Agent port: 1987
    Repositories/connection:
    Master repository user = odim
    Work repository user = odiw
    Work repository name = WORKREP1
    JDBC connection string = jdbc:oracle:thin:@localhost:1521:orcl
    *odim and odiw have been created manually with grant options on connect and resource
    Physical agent (with no datasource defined):
    Name = OracleDIAgent
    Host = localhost
    Webapplicationcontext = oraclediagent
    Port = 8001
    Protocol = http
    Physical data server:
    Name = oracle_db_11gr2
    User = odiw
    JDBC connection string = jdbc:oracle:thin:@localhost:1521:orcl
    Physical schema:
    Schema (schema) = ODIW
    Schema (work schema) = ODIW
    Context = aMIS_dev
    Logical schema = oracle_db_11gr2
    Logiacal schema
    Context = aMIS_dev
    Physical schema = oracle_db_11gr2.ODIW
    Context:
    Name = aMIS_dev
    Logical agent = OracleDIAgent
    Physical agent = OracleDIAgent
    Logical schema = oracle_db_11gr2
    Physical schema = oracle_db_11gr2.ODIW
    Logical schema:
    Name = oracle_db_11gr2
    Context = aMIS_dev
    Physical schema = oracle_db_11gr2.ODIW
    Logical agent
    Name = OracleDIAgent
    Context = aMIS_dev
    Physical Agent = OracleDIAgent
    h3. Oracle DB 11g R2
    Installation
    Global database name = orcl.otera.local
    SID = orcl
    h3. WebLogic 11g:
    +1. generate new basic WebLogic Server domain+
    Domainname = ODI-DOMAIN
    Admin name = weblogic
    Admin server name = AdminServer
    Listening port = 7001
    Managed server name = odi_server1
    Managed server port = 8001
    +2. extend an existing WebLogic domain+
    Choose extension source: ODI - Agent, ODI - Agent Libraries, Oracle JRF
    Window: Configure JDBC compontent schema:
    Driver = Oracle's Driver (Thin) for Instance connection; Versions: 9.0.1 and higher
    Schema owner = odim
    DBMS/Service = orcl
    Hostname = localhost
    Port = 1521
    Client name = LocalODIMachine
    Listening address of the accountmanager = localhost
    Listening port of the accountmanager = 5556
    Really hope you guys can help me quick.
    Thanks in advance

    Hi DecaXD,
    thank you for quick response :)
    on the client site i tried to establish the connection to the work repository with the following connection information:
    Login information*:
    Oracle Data Integrator Connection
    Login name = odi_server
    User = SUPERVISOR
    Database connection (Master Repository):
    User = odim
    URL = jdbc:oracle:thin:@<server ip>:1521:orcl
    A work repository could be found, but the connection failed! (?!)
    " ODI-26130: Connection to the repository failed.
    oracle.odi.core.config.NotWorkRepositorySchemaException: ODI-10147: Repository type mismatches.     
    Could not get JDBC Connection; nested exception is java.sql.SQLException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: Invalid SQL-Query for validating the connection (+translated from german into english+) "
    my ODI configuration on the server site (loged in as: odiw):
    topology tab*:
    Physical architecture:
    Technology:
    Definition:
    Dataserver name = oracle_db_11gr2
    User = odiw
    JDBC-URL = jdbc:oracle:thin:@10.168.178.131:1521:orcl
    Datasource:
    Agent = OracleDIAgent
    JNDI-Name = [DataSourceName]
    Agents:
    Definition:
    Name = OracleDIAgent
    Host = <IP of the server>
    Port = 8001
    Webapplicationcontext = oraclediagent
    Datasources:
    Dataserver = oracle_db_11gr2
    JNDI-Name = [DataSourceName]
    Logical architecture:
    Technology:
    Defintion:
    Name = oracle_db_11gr2
    Context = aMIS_dev
    Physical schema = oracle_db_11gr2.ODIW
    Agent:
    Name = OracleDIAgent
    Context = aMIS_dev
    Physical agent = OracleDIAgent
    when i test the connection of the data server (topology>physical architecture>technology>oracle>oracle_db_11gr2) with the OracleDIAgent i receive the
    " ODI-26039: Connection failed.
    oracle.odi.runtime.agent.invocation.InvocationException: javax.naming.NameNotFoundException: Unable to resolve '[DataSourceName]'. Resolved ''; remaining name '[DataSourceName]' "
    since testing the connection on the server site failed in first place, i couldn't test the connection on the client site.

  • How to disable Query for single controls in a Form Applet?

    Hi All,
    this should be so simple, but seems like I don't get it at the moment.
    I have a Form Applet in HI Mode and want to disable the possibility to Query on certain fields. these are Calculated fields and querying will most likely crash the application due to heavy performance impact. They should be for displaying only. How to do that? I have searched for Applet Control User Properties and such stuff but couldn't find one.
    Thx

    Hi Siebelade thanks for your reply,
    in the meantime I managed to do it using a BusComp Field User Property called "DisableSearch". If you set this to "TRUE" for the desired fields, the user will receive an error message when trying to query for these fields.
    Benny

Maybe you are looking for