Dates to compare in query from ODS

Hello,
I am just starting to use Bex Query Designer and don't know how to compare 2 dates.
Example is ODS from PM-ORDERS area.
For one order I have to compare 2 dates and count the total of orders if date 1 < date 2. These 2 dates are in the record PM-ORDERS.
I tried with variables and replacement path as date 1 less than variable but replacement path only propose equal not less than option. Is there an other way to do this instead of exit user ?
Thanks in advance.
Valerie.

Hello again,
you can't compare values of 2 characteristics in BEx. You can compare only key-figures. Selections won't help in this case.
You can create 2 key-figures of type DATS and add them to ODS, modify update rules and reload data. Then you will have each date stored twice - one as characteristic second one as key figure. Now you can create formula COUNT(K_DATE1 - K_DATE2) which is what you need. Count gives you 1 if the day difference is greater that 0.
Or you can create 1 additional characteristic of type CHAR(1) that will indicate the condition. Add it to ODS, and create formula in update rule.  IF (C_DATE1 > C_DATE2, 'X', ' ') Then you're able to create selection on record count with 'X'.

Similar Messages

  • Delta data changes are not reflecting from ODS to another infocube

    ODS1 --->Infocube1  - Field1,field2,field3
    ODS2 -
    > Infocube 2  -
    Field 2-1,2-2,2-3,field2-4
    Both datasource information are totally different.
    Delta changes are captured in the field3 in ODS1 and Infocube 1 also.
    Field3 and Field 2-3 is the same field .Infocube 2 - I have included infoobject and populating the value from ODS1-Field3.
    The question is
    Whenever I capture the changes from ODS1-field3 -the similar changes also needs to be updated here in infocube2 -field2- 3.
    Start routine : I have created code like ,
    SELECT field1 field2 field3
      INTO CORRESPONDING FIELDS OF TABLE IT_field
      FROM /BIC/aods1.
    Update rule routine : Select the field2-3 in the characteristic- routine
      READ TABLE IT_field INTO LS_field
      WITH TABLE KEY
      field1 = COMM_STRUCTURE-field2-1
    Field 2 = COMM_STRUCTURE-field2-2.
    Result = LS_field -field2-3.
    If I load the full load to infocube 2  -no problem.
    Is their any other way Can I capture the transactional data changes in infocube 2.
    Advance thanks

    Thanks for quick update. You are right.
    There is no problem from  ODS1 --->Infocube1 - Delta is working properly.
    My question is ,
    ODS1 has a field 3. Whenever new changes happen for this field3 - I have to capture the simialr changes in the Infocube 2 and the fieldis 2-3.
    field3 and field 2-3 is the same field infoobject .
    Whenever the changes occurs inthe tranasation - ODS1-field 3 will capture the changes. How can I capture the similar changes in Infocube 2 and the field 2-3.

  • Characterestics is not getting displayed from ODS in Multiprovider

    I have Join ODS and remote cube in Multiprovider.And data is not getting displayed from ODS fields neither char not KF getting displyed in Multiprovider.I have checked the identification in Char that Char is presend in both the Cube and ODS,But that Char has data in ODS and not in Cube so I checked Char from ODS in Identification.I am still not getting data from ODS.
    Can anyone help me in it?

    How many requests do u have in the ODS?
    If u have only 1 then just right click on DSO and say delete data it will be faster than deleting by request wise....
    What is the message u r getting when u r trying to delete the request?
    Khaja

  • Init delta from ods to two cube seperately

    Hello,
    Can we run init seperately two times for the two different cubes from a ODS which is used as an staging ODS?
    ODS1-> for cube1 initialise delta with data transfer
    ODS1-> for Cube2 initialise delta without data transfer
    is it possible to do like this?
    Thanks in advance!
    Points will be assigned!
    Regards
    Ram

    Hi Rakesh,
    I think it should not have been possible to do initializing with data transfer and without data transfer for the same data target.
    I mean init with data transfer to cube 1 and init without data transfer to cube 2 from ODS.
    Not to the same Cube. Will it be possible like this?
    Regagrds
    Ram
    Points will be assigned

  • Query regarding the data type for fetcing records from multiple ODS tables

    hey guys;
    i have a query regarding the data type for fetcing records from multiple ODS tables.
    if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
    can any one help with some suggestion.

    Hi Mudit,
    One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
    AS is used to rename the column name when data is being selected from your DB.
    So, the query  Select ename as empname from emptable will return the data with column name as empname.
    Regards,
    Bhavesh

  • Index used or not for selecting data from ODS in a start routine

    Dear friends,
    In the start routine of the update rules to a cube, I am reading some data of an ODS in to an internal table .
    The ODS is indexed. But, I am not sure if the index is at all used in the Select statement (that gets the data from ODS to the internal table in the start routine) while loading data to the cube.
    Any help is highly appreciated.
    regards,
    atlaj

    Hi Atlaj
    You can findout this is display execution plan for SQL statement in DB02.
    Goto DB02. and under diagnostic, you find explain. Select that and enter your query. Make sure that everything here is in capital format. Below is a sample query which I have entered.
    SELECT "CRM_SALORG" "SALESORG" FROM "/BI0/QORGUNIT"
    WHERE "SALESORG" = ? AND "OBJVERS" = ? AND "DATETO" >= ?
    AND "DATEFROM" <= ?
    The select parameters should be inside qoutes and in caps and even the from table. Once you enter your query in this format, click on explain. It will show the index scan if the index is present. the output for my query will be something like
    0 SELECT STATEMENT ( Estimated Costs =  1,348E+01 [timerons] )
            1 (COOR) RETURN
                2 (    0) TQ
                    3 (    0) FETCH /BI0/QORGUNIT
                        4 (    0) IXSCAN /BI0/QORGUNIT~Z1
    Where my last statement (line 4) is showing index scan and the name of index read is Z1.
    Hope this helps.
    Please let me know if you have any problems entering the query in the specified format and u get any error.
    Regards
    Sriram

  • How to compare two rows from two table with different data

    how to compare two rows from two table with different data
    e.g.
    Table 1
    ID   DESC
    1     aaa
    2     bbb
    3     ccc
    Table 2
    ID   DESC
    1     aaa
    2     xxx
    3     ccc
    Result
    2

    Create
    table tab1(ID
    int ,DE char(10))
    Create
    table tab2(ID
    int ,DE char(10))
    Insert
    into tab1 Values
    (1,'aaa')
    Insert
    into tab1  Values
    (2,'bbb')
    Insert
    into tab1 Values(3,'ccc')
    Insert
    into tab1 Values(4,'dfe')
    Insert
    into tab2 Values
    (1,'aaa')
    Insert
    into tab2  Values
    (2,'xx')
    Insert
    into tab2 Values(3,'ccc')
    Insert
    into tab2 Values(6,'wdr')
    SELECT 
    tab1.ID,tab2.ID
    As T2 from tab1
    FULL
    join tab2 on tab1.ID
    = tab2.ID  
    WHERE
    BINARY_CHECKSUM(tab1.ID,tab1.DE)
    <> BINARY_CHECKSUM(tab2.ID,tab2.DE)
    OR tab1.ID
    IS NULL
    OR 
    tab2.ID IS
    NULL
    ID column considered as a primary Key
    Apart from different record,Above query populate missing record in both tables.
    Result Set
    ID ID 
    2  2
    4 NULL
    NULL 6
    ganeshk

  • Init Data Upload from ODS to Info cube

    Hi,
    When i am trying to upload the date from ODS to info cube using initial upload option in info package, i am not able to see the selection option fields.
    Whereas using the same ODS & info cube, if i am trying to change the option to full upload in info package, i am getting all the selection fields.
    what could be the reason for the same.
    please help
    Rajiv

    Somnath,
    Let me explain u the complete scenario
    1) we have an existing ODS which populates an info cube on daily basis (delta upload)
    2) we have created a new info cube, which fetch the data from the same ODS. that means 2 info cubes which are getting populated from one ODS.
    3) now when we have tried to initialize the new info cube from the existing ODS, it asked us to delete the initialize upload options "scheduler - initialize option for the system". & we have done the same. but by doing this, ODS has removed the option of delta upload from old info cube upload info package &&  new info cube initial upload is not dislaying any of selection fields..
    4) now, i have a query
    - how can i activate delta on old info cube (without losing any data)
    - how to upload data in new info cube with selection fields and start delta
    Regards
    Rajiv

  • How to ensure data from ods to cube are correct or not

    hi all,
    i am just trying to get data from ods to cube. how to make ensure that the records that i fetched from ods to the respective cube are correct and number of records are the same.
    thanxs in advance
    regds
    hari

    Dear Hari,
    There are two ways of confirming correct loads:
    1. Level by Level Analysis
    2. Comparision with Virtual InfoProvider
    First method is by analysing data at each level. First at Database Table (if loading from R/3) or Excel (if loading from flatfile), then at extraction level (See data at RSA 3, not possible with flatfile). After this load data to BW through PSA and check the content of PSA. After that load it to Infoprovider and varify there.
    Second method is to create a Virtual Infocube on the datasource (extract exact data through FM). And create a multiprovider by combining this Virtual cube and original Cube. Then create a Query with calculated key figures as difference of each key figures from two cubes. This way you can say that which value is not matching.
    I suggest you the first method, but the standard way would be second one at highly critical loads where you cannot match huge ammount of data.
    Hope it helps...
    Regards,

  • Not able to delete the data from ODS

    Hi All,
    I have ODS which is having some requests . All the requests are being loaded with full update only. When I am trying to delete the requests from ODS,  out of 4 requests 2 requests have been deleted but rest of them are not at all deleting .
    As I am working in Quality system, So I don't have the access to delete request from Table level like RSODSACTREQ, RSICCONT etc...
    Can you give any clue to delete the remaining 2 requests.
    Thanks,

    Hi kavitha,
    Does the Request has data mart status.IF yes try to delete the request from the respective DSO's.
    and try to delete the request.
    are you deleting the Whole data from DSO ? - right click on the DSO and select deleted data from the context menu.
    Regards
    Prashanth K

  • Update data from ODS to ODS with infopackage selection

    Hi,
    I am trying to update data from one ODS to another ODS with selection criteria in InfoPackage which is created manually.For Full load I can give selection criteria in InfoPackage. When I initialize data Selection is greyed out even selections for Full load exists. Please advise me how to give selections for delta loads from ODS to ODS loads.
    Thanks in advance.
    Ram

    Once you started an ODS as destination in FULL mode from a DS you cannot get back.
    So if you want to update from ODS to ODS using Change Log but considering only some data records you could create an Update Routine with a Start Routine that DELETES undesired records (e.g. DELETE DATA_PACKAGE WHERE ...) and then start an Init-Delta Loading.
    Hope it helps
    GFV

  • Data loading from ODS to CUBE

    Hi All,
    I have loaded data from ODS to CUBE. now i have requirement to add some fields in the standard cube. so, for testing purpose i have created copy of the original and created transformation . now when i try to load data from ODS it shows me no more data available . while data is already there in ODS.
    now what should i do ? i don't want to delete data from original cube. is there any other way to load data through transformation ?
    Regards,
    Komik Shah

    Hi,
    Check the DTP of old cube n see whether its Delta. If yes then check whether any one of the foll is check:
    1) get delta only once
    2) get data by request.
    If 1 is checked then delta wont come for the second cube as it says to get delta once and delta is already in one of the cube.
    Generally both should be unchecked but can vary as per requirements.
    Now for your new DTP, i dont think it will aloow you to change to FULL.
    If its allowing you to select FULL, then select it and select from acive table.
    try to load and see.
    regds,
    Shashank

  • Unable to Delete Data from ODS ---Tricky

    Hi Frds/ BW Guru's,
    I am trying to delete the request from ODS , I could see the job being scheduled for deletion, but finally the request is not deleted. What can be the reason for this and how can I go about from here, we have to do it in production.please respond soon .
    Thanks,
    Krish

    Generally, I wouldn't think the deletion would be impacted by tablespace issues except for two scenarios -
    With Selective Deletion, the BW deteremines how many rows you will be deleting and if it determines that it will be more than 10% of the rows in the tables, the BW decides that it is faster to copy the table, excluding the rows to be deleted, and then drops the old table and renames the copy to the original table names.  In this case, there must be enough freespace in the tablespace to accomodate the temporary copy as well as the original table.  I don't believe applies to deletion of a Request, only a Selective Deletion.
    Request deletion requires temporary space in the Rollback tablespace.  The database must maintain an image of the table before the deletion until the change is committed, so that in the event the deletion process fails or is cancelled, the deletes that were being done can be rolled back to restore the table to its previous state.  Again, unless this Request held a very large amount of data, the amount of rollback space availalbe should not be an issue.
    I would guess Authorizations is a good canidate for the cause.  There was a fairly recent Note 810201 that allows for the creation of a new RSADMIN parameter that is designed to permit deletion of a Request, but NOT a Delete All Data.
    Pizzaman

  • GETTING DATA FROM ODS BY USING A FUNCTION MODULE..

    Hi Frnzs,
    Here is my issue..Plz go thru it..
    I  have a function module (YFSF_ICR_GET_EXCHG_RATE_ODS).
    the function performs the current logic without any changes,
    that is reading SPOT rates for actuals (the planning cycle is empty) or S rates
    for forecasts based on the planning cycle. Nothing needs to be changed here
    concultion : Based on flag I_ICR ni , we have to read new exchange rates ( From ODS)
    the fucntion module code is here
    FUNCTION yfsf_icr_get_exchg_rate_ods.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(I_PLANCYC) TYPE  /BIC/OIYPLANCYC OPTIONAL
    *"     REFERENCE(I_SALESORG) TYPE  /BI0/OISALESORG OPTIONAL
    *"     REFERENCE(I_IC) TYPE  /BIC/OIYINVCURR
    *"     REFERENCE(I_RC) TYPE  /BIC/OIYREPCURR
    *"     REFERENCE(I_FISCPER) TYPE  /BI0/OIFISCPER
    *"  EXPORTING
    *"     REFERENCE(E_EXG) TYPE  /BI0/OIEXCHG_RATE
    *"  EXCEPTIONS
    *"      NO_RATE_FOUND
      DATA: l_s_exg TYPE /bic/ayfsfexg00,
            l_t_exg TYPE /bic/ayfsfexg00 OCCURS 0,
            l_year TYPE /bi0/oifiscyear.
      IF i_plancyc IS INITIAL.
    Actuals
        FREE l_t_exg.
        SELECT *
          INTO CORRESPONDING FIELDS OF TABLE l_t_exg
          FROM /bic/ayfsfexg00
          WHERE fiscper <= i_fiscper
            AND fiscvarnt = 'JJ'
            AND /bic/yrepcurr = i_rc
            AND /bic/yinvcurr = i_ic
            AND /bic/yplancyc = ''
            AND /bic/yexchtype = 'SPOT'
         ORDER BY fiscper DESCENDING.
        IF sy-subrc <> 0.
          RAISE no_rate_found.
        ELSE.
          READ TABLE l_t_exg INTO l_s_exg INDEX 1.
          e_exg = l_s_exg-exchg_rate.
        ENDIF.
      ELSE.
    Forecasts
        l_year = i_fiscper+0(4).
        SELECT SINGLE *
          INTO l_s_exg
          FROM /bic/ayfsfexg00
          WHERE fiscvarnt = 'JJ'
            AND fiscyear = l_year
            AND salesorg = i_salesorg
            AND /bic/yrepcurr = i_rc
            AND /bic/yinvcurr = i_ic
           AND /bic/yplancyc = i_plancyc
            AND /bic/yplancyc = ''
            AND /bic/yexchtype = 'S'
            AND exchg_rate GE '0.0000001'.
        IF sy-subrc <> 0.
          RAISE no_rate_found.
        ELSE.
          e_exg = l_s_exg-exchg_rate.
        ENDIF.
      ENDIF.
    ENDFUNCTION.
    ok
    now my requirement is that I need to enhance the Function module for reading exchange rates.
    for this i got the following information:
    - It requires an additional flag I_ICR for instance that can be empty or 'X'
    for instance
       - If the flag is empty, the function performs the current logic without any changes,
    that is reading SPOT rates for actuals (the planning cycle is empty) or S rates
    for forecasts based on the planning cycle. Nothing needs to be changed here
       - If the flag is 'X', the function reads a new exchange rate type, let's call
    it "ICR". As stated in the requirements and functional specs, these exchange rates
    are the Reuter rates valid for a complete year. These are fixed rates so no planning
    cycle. The users will enter records in the format (year, reporting currency, invoicing
    currency, exchange rate). If the input flag I_ICR is X, the function determines
    the year based on the input period, then, based on the year it selects on the same
    table as for the other exchange rates with a restriction on exchange rate type "ICR",
    year, from and to currency and return the exchange rate
    Update rules. There are two:
       - To the consolidation ODS. No changes are required there; the function has to
    read either S or SPOT rates (I_ICR flag is empty)
       - From the consolidation ODS to the cube. As stated in my previous email, the
    from currency is the one available in the data package. The to currency is determined by reading the sales organization master data (reporting currency attribute) based on the inter-company sales organization (also available in the incoming record). It then calls the function module above with the parameter I_ICR set to 'X' so it reads the Reuter rates.
    I guess i need to create another function module and can be used.
    Observation
    ODS table fields.
    - FISCPER
    - FISCVARNT JJ
    - FISCYEAR 2006
    - /BIC/YREPCURR EUR
    - /BIC/YINVCURR JPY
    - SALESORG 0010
    - /BIC/YMRC 3090
    - /BIC/YPLANCYC
    - /BIC/YEXCHTYPE S
    - - RECORDMODE
    Thanx in advance..

    Haii
    I have given below the basic functionality..u can go throught the api and start working..
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import java.io.File;
    import org.w3c.dom.Document;
    public class OrderProcessor {
       public static void main (String args[]) {
          File docFile = new File("orders.xml");
          Document doc = null;     
          try {
             DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
             DocumentBuilder db = dbf.newDocumentBuilder();
             doc = db.parse(docFile);
           Element root = doc.getDocumentElement();
          System.out.println("The root element is " + root.getNodeName());
         NodeList children = root.getChildNodes();
       System.out.println("There are "+children.getLength()
                                      +" nodes in this document.");
          } catch (Exception e) {
             System.out.print("Problem parsing the file.");
    }regards
    Shanu

  • How to extract data from ODS to non-SAP system

    Hi,
    Can anybody tell me, step by step, how to extract data from ODS to a non-SAP system?
    Is it possible to do it without programming effort? And is there volume limits for this kind of extraction?
    The non-SAP system is an unix system.
    Thanks in advance
    Ella

    Ella,
    You can look at it from the concept of a BADI / Infospoke
    Extract the data from the ODS to a Flat file / RDBMS using an infospoke. I am not sure as to how the infospoke loads data into the RDBMS ( did it very long ago ) but then you can push it into an RDBMS and I am sure it will be system neutral.
    Hope this helps...
    Arun
    Assign points if it helps

Maybe you are looking for

  • Windows 7 and Windows 8 Driver Availability Chart for Creative's products

    Hello Everyone, There is a Knowledge base article that contains the Windows 7 and 8 Driver Availability Chart for Creative's products. Thank you. Mod Notes: Updated the link and include Windows 8.

  • Is there a way to show/hide a group of objects that will work in html5?

    I consider myself to have a fairly decent understanding of captivate and its functions but this recent issue has stumped me. I have a button with javascript attached to it that runs a typical if loop: (pseudo code to follow) if(variable = 1){ show "g

  • Trigger a Message based on a value from another Interface.?

    Hello All, I have a peculiar requirement kindly advise me if it is possible with PI 7.3 I have data coming from a system and it has to be sent to 4 different systems. Tricky part is message has to be sent to the sent 2nd system only if it is successf

  • How to Access MXML components  from ActionScript class

    Hi , I am having a Application Conataner , in which i am having a Form Container with some Label in it . This is some thing similar to this as shown : <Mx:Application> <Mx:Form> <Mx:Label text="Hello world"/> </Mx:Form> </Mx:Application> Can any body

  • Search index - and high availability

    Running Search on WFE(A) and APP(B) server - with this topology. The company relies heavily on the Search Index - so a reset of the index isn't always an option, and the re-build takes a lot of time, so in order to avoid a index reset.  Is it possibl