Logic in query

Invoice posting date range must use the following logic for determining the From - To range:
       To date will be today's minus 1 day to determine last full posting date.
       From date will be - determine current month/year based on 'to date' and subtract 13 months then selection first day of that         month/year.
Example: date that report is run on  = 11/17/11
               To date : 11/17/11 minus 1 day = 11/16/11
               From date : Based on To-date, determine MM/YYYY = 11/2011, minus13 months = 10/2010, 10/01/2010
               Therefore - Invoice posting date range = 10/01/2010 to 11/16/2011.
Please fgive the ideas for this.
Edited by: Jayantksinha on Feb 9, 2012 9:32 AM

Hi
You can create an exit variable in BEX and then write logic in I_STEP.
If you want the date range to be populated as per the system's date then write your code in I_STEP = '1'. If you want the date range to be populated as per the date entered by user in selection screen then write your code in I_STEP = '2'.
Assuming that your scenario is the first one, you below logic. This might have minor errors as I haven't checked the code for syntax errors.
IF I_STEP = 1.
CASE I_VNAME.
WHEN 'ZINV_RNG'.  "Exit Variable created in BEX
DATA: v_date_high LIKE SY-DATUM.
DATA: v_date_low LIKE SY-DATUM.
v_date_high = SY-DATUM - 1.
IF v_date_high+4(2) NE '01'.
year = sy-datum+0(4) - 1.
month = sy-datum+4(2) - 1.
day = sy-datum+6(2) - 1.
CONCATENATE year month day INTO v_date_low.
ELSEIF v_date_high+4(2) EQ '01'.
year = sy-datum+0(4) - 2.
month = '12'.
day = sy-datum+6(2) - 1.
CONCATENATE year month day INTO v_date_low.
ENDIF.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT  = 'EQ'.
L_S_RANGE-LOW = v_date_low.
L_S_RANGE-HIGH = v_date_high.
APPEND L_S_RANGE TO E_T_RANGE.
ENDCASE.
ENDIF.
Hope this helps.
Regards
Murthy Gunuputi

Similar Messages

  • Extracting the Logical sql query for the specified report  in OBIEE 11g

    Hi ,
    I want to extract the logical SQL Query for the Particular report in OBIEE 11.1.1.5.
    Any pointers related to this will be very helpful.
    Thanks,
    Sonali

    for a try please add Logical sql view to ur report it will dispaly the Logical sql for that Report..
    Hope it will helps you.

  • Logical Database Query

    Hi,
    I need to include the following SELECTION CRITERIA, in addition to the standard PNP Selection Criteria.
    BUDGET TYPE, BUDGET PERIOD, BUDGET UNIT (ALL MANDATORY)
    The report must generate details of the employee's current pay and compa-ratio infomation and the previous pay and compa-ratio information for the selection criteria.
    eg:- Reading HRP1001 TABLE with following parameters:-
    otype = 'BU'
    objid = Specified by the user
    rsign = 'B'
    relat = 300
    I need to know which INFOTYPES does store the values for BUDGET TYPE, BUDGET PERIOD, BUDGET UNIT and how would I relate all to achieve my requirement.
    Suggestions Welcomed.
    Thanks & Regards,
    Rajesh Thakur

    HR Logical Database is PNP
    Main Functions of the logical database PNP:
    Standard Selection screen
    Data Retrieval
    Authorization check 
    To use logical database PNP in your program, specify in your program attributes.
    Standard Selection Screen
    Date selection
    Date selection delimits the time period for which data is evaluated. GET PERNR retrieves all records of the relevant infotypes from the database.  When you enter a date selection period, the PROVIDE loop retrieves the infotype records whose validity period overlaps with at least one day of this period.
    Person selection
    Person selection is the 'true' selection of choosing a group of employees for whom the report is to run.
    Sorting Data
    · The standard sort sequence lists personnel numbers in ascending order.
    · SORT function allows you to sort the report data otherwise. All the sorting fields are from infotype 0001.
    Report Class
    · You can suppress input fields which are not used on the selection screen by assigning a report class to your program.
    · If SAP standard delivered report classes do not satisfy your requirements, you can create your own report class through the IMG.
    regards
    vinod

  • Adding a dynamic selection to a logical database query

    Hello,
    I would like to add a dynamic selection to a SQ02 Infoset using logical database SDF. I need the report to show only documents created at certain dates. I've added a selection field "CR_DATE" for BKPF-CPUDT to the Infoset and added the following code:
    SELECT * FROM BKPF
    WHERE BKPF-CPUDT IN CR_DATE.
    ENDSELECT.
    However, the report displays documents created on all kinds of dates regardless of the ones I've specified at the selection screen.
    I can only use SQ02 and SQ01. I don't have access to most other transactions such as SE36 nor have the authorization to edit the existing report transaction such as FAGLL03.
    Please, help.

    Hi John,
    Only certain table fields are allowed in dynamic selection, please see this sap note for detail :
    Sap Note 310886 - Line items: Dynamic selections ignored
    Permitted tables:
    SKA1: all fields
    SKB1: all fields
    BSIS: all fields
    So BKPF-CPUDT field is not allowed for dynamic selection.
    Regards
    Javed

  • How to handle the prefix logic in query designer

    Dear all,
    Please suggest me to handle the prefix logic or any combination of values need to be find from string.
    like if i want to find data which contain "prime" word in the data or as prefix.
    like data "prime coil" so need to identify that data contain prime word.

    Hi Viral,
    Please use Virtual Characteristics to handle this requirements.
    Thanks,
    VSK

  • Simulate select distinct count sql logic in query or data model

    hello experts,
    given prerequisites: DSO with flat table without any key figures - just characteristics (about 10)
    the requirement is to produce the table with all possible combinations of those characteristics with counting the hits
    - this flat table should be then loaded to another system
    exmple
    char error| char division| char time|char id xxx xxx xxx xxx xxx
    some counter should be implemented and all combinations of 10 characteristics counted
    example
    char error| char division| char time|char id xxxxx  1
    char error| empty field| empty field| |char id   5
    etc
    the output should be flat table with counts on the right - some fields will be empty depending on combinations to be counted
    what is the best way - query with RCF or some SQL statements in Transformation? how to implement the output desired
    thanks in advance

    That sounds very odd.
    Can you turn on debug tracing by adding
    -Djbo.debugoutput=console
    to the Java options of your project (Project Properties, Profiles, Development, Runner)?
    Then test the query that is output in the log in SQL*Plus and see if you get the same results.
    -SteveA (JDev Team)

  • Reg-Logic for Query!

    Hi All,
    In my application, there is an requirement for generating Autogen Sequence in two ways.
    First Way: Using Autogen button.
    For Ex: If the old symbol: ABCDEF00, the next Autogen sequence should be i.e, new symbol: ABCDEG00 .
    Similarly if the symbol has old symbol:zzzzz00 new symbol should be AAAAA00.
    As of now my logic is working perfectly accordingly to the above scenario.
    Note: We will be changing only first 5 characters and last two digits I am appending as 00.
    Second Way: Manually there can enter the symbol.
    The problem I am facing in second method, since there can enter/ create a symbol using Alphanumeric.
    For Ex: old Symbol: ABCD100, the next will be ABCD200 and soon till ABCD900.. Once the symbol ends with 9 then next sequence is replacing with some special characters as ABCD:00
    Note: Symbol should not accept any special characters. If the symbol ABCD900 then next should be ABCD000. ‘9’ should be replaced with ‘0’ and soon. My logic will not work for alphanumeric.
    Can anyone help me out my logic should accept both characters as well as numeric’s.
    Following is the logic which currently i am using
    DECLARE
    v_symb_code VARCHAR2(7);
    new_sym_code VARCHAR2(7);
    v_count NUMBER;
    v_auto_count NUMBER;
    symb_code_new VARCHAR2(7);
    BEGIN
    SELECT COUNT(*) INTO v_auto_count FROM T_AUTOGEN_SYMBOL;
    IF v_auto_count=0 THEN
    SELECT symb_code INTO v_symb_code FROM t_symbol WHERE SYMB_MODIFIED_DATE=(SELECT MAX(SYMB_MODIFIED_DATE) FROM t_symbol) AND ROWNUM=1;
    ELSE
    SELECT ATGS_SYMB_CODE INTO v_symb_code FROM T_AUTOGEN_SYMBOL;
    END IF;
    LOOP
    SELECT
    -- 1st digit of new value
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1),'Z','A',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1),'A','B','B','C','C','D','D','E','E','F','F','G','G','H','H','I','I','J','J','K','K','L','L','M','M','N','N','O','O','P','P','Q','Q','R','R','S','S','T','T','U','U','V','V','W','W','X','X','Y','Y','Z',
    CHR(ASCII(SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1))+1))),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1)),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1)),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1)),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1))
    ||
    -- 2nd digit of new value
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1),'Z','A',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1),'A','B','B','C','C','D','D','E','E','F','F','G','G','H','H','I','I','J','J','K','K','L','L','M','M','N','N','O','O','P','P','Q','Q','R','R','S','S','T','T','U','U','V','V','W','W','X','X','Y','Y','Z',
    CHR(ASCII(SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1))+1))),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1)),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1)),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1))
    ||
    -- 3rd digit of new value
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1),'Z','A',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1),'A','B','B','C','C','D','D','E','E','F','F','G','G','H','H','I','I','J','J','K','K','L','L','M','M','N','N','O','O','P','P','Q','Q','R','R','S','S','T','T','U','U','V','V','W','W','X','X','Y','Y','Z',
    CHR(ASCII(SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1))+1))),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1)),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1))
    ||
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1),'Z','A',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1),'A','B','B','C','C','D','D','E','E','F','F','G','G','H','H','I','I','J','J','K','K','L','L','M','M','N','N','O','O','P','P','Q','Q','R','R','S','S','T','T','U','U','V','V','W','W','X','X','Y','Y','Z',
    CHR(ASCII(SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1))+1))),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1))
    ||
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1),'Z','A',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1),'A','B','B','C','C','D','D','E','E','F','F','G','G','H','H','I','I','J','J','K','K','L','L','M','M','N','N','O','O','P','P','Q','Q','R','R','S','S','T','T','U','U','V','V','W','W','X','X','Y','Y','Z',
    CHR(ASCII(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1))+1)))||'00' INTO new_sym_code
    FROM dual;
    symb_code_new := UPPER(new_sym_code);
    SELECT COUNT(*) INTO v_count FROM t_symbol WHERE symb_code=symb_code_new AND ROWNUM<2;
    /*IF v_count<1 THEN
    SELECT COUNT(*) INTO v_count FROM t_symbol_wip WHERE symb_code=symb_code_new AND ROWNUM<2;
    END IF;
    DELETE FROM T_AUTOGEN_SYMBOL;
    INSERT INTO T_AUTOGEN_SYMBOL(ATGS_SYMB_CODE,ATGS_MODIFIED_BY,ATGS_MODIFIED_DATE) VALUES(symb_code_new,v('APP_USER'),SYSDATE); */
    EXIT WHEN v_count <1;
    v_symb_code:=symb_code_new;
    DBMS_OUTPUT.PUT_LINE(v_symb_code);
    END LOOP;
    :P39_SYMBOL := symb_code_new;
    END;

    I'd use a slightly different approach with the same end result: use and store numbers instead of this "Autogen sequence". When you use a number, you can easily add 1 or subtract 1. You probably only need that string for display. So use a function like below:
    SQL> create function number2weirdstring (p_num in number) return varchar2
      2  as
      3    --
      4    -- The string looks like this AAAAA00.
      5    -- Define for each A what the acceptable characters can be
      6    -- For instance I'm defining them to accept [a-z] and [A-Z]
      7    -- And they are mapped to [0-25] and [26-51]. This leads to
      8    -- 52^5 possible combinations.
      9    --
    10    l_character1 varchar2(1);
    11    l_character2 varchar2(1);
    12    l_character3 varchar2(1);
    13    l_character4 varchar2(1);
    14    l_character5 varchar2(1);
    15  begin
    16    l_character5 := chr( case when mod(p_num,52)                    < 26 then 97 else 39 end + mod(p_num,52) );
    17    l_character4 := chr( case when mod(trunc(p_num/52),52)          < 26 then 97 else 39 end + mod(trunc(p_num/52),52) );
    18    l_character3 := chr( case when mod(trunc(p_num/52/52),52)       < 26 then 97 else 39 end + mod(trunc(p_num/52/52),52) );
    19    l_character2 := chr( case when mod(trunc(p_num/52/52/52),52)    < 26 then 97 else 39 end + mod(trunc(p_num/52/52/52),52) );
    20    l_character1 := chr( case when mod(trunc(p_num/52/52/52/52),52) < 26 then 97 else 39 end + mod(trunc(p_num/52/52/52/52),52) );
    21    return l_character1 || l_character2 || l_character3 || l_character4 || l_character5 || '00';
    22  end number2weirdstring;
    23  /
    Functie is aangemaakt.And to show how the function works:
    SQL> select number2weirdstring(0)
      2       , number2weirdstring(25)
      3       , number2weirdstring(26)
      4       , number2weirdstring(51)
      5       , number2weirdstring(52)
      6       , number2weirdstring(52*52-1)
      7       , number2weirdstring(52*52)
      8       , number2weirdstring(12893571)
      9    from dual
    10  /
    NUMBER2WEIRDSTRING(0)
    NUMBER2WEIRDSTRING(25)
    NUMBER2WEIRDSTRING(26)
    NUMBER2WEIRDSTRING(51)
    NUMBER2WEIRDSTRING(52)
    NUMBER2WEIRDSTRING(52*52-1)
    NUMBER2WEIRDSTRING(52*52)
    NUMBER2WEIRDSTRING(12893571)
    aaaaa00
    aaaaz00
    aaaaA00
    aaaaZ00
    aaaba00
    aaaZZ00
    aabaa00
    bNKrp00
    1 rij is geselecteerd.You only need to modify the function to accept the characters you want. But hopefully this example will get you started.
    Regards,
    Rob.

  • Currency translation on Query level (YTD exchange rate)

    Hi Experts,
    I want to implment the currency translation logic in query as below. Please advise what I should do.
    Case 1
    Variable entry screen
    Posting date (range): 01.09.2007 - 31.03.2008
    Query result
    Sales amount figures from 01.09.2007 - 31.12.2007 => use exchage rate at 31.12.2007
    Sales amount figures from 01.01.2008 - 31.03.2008 => use exchage rate at 31.03.2008
    Case 2
    Variable entry screen
    Posting date (range): 01.09.2006 - 30.06.2008
    Query result
    Sales amount figures from 01.01.2006 - 31.12.2006 => use exchage rate at 31.12.2006
    Sales amount figures from 01.01.2007 - 31.12.2007 => use exchage rate at 31.12.2007
    Sales amount figures from 01.01.2008 - 30.06.2008 => use exchage rate at 30.06.2008
    In query, key figure sales amount will be shown in ONE column. Please give a hint how to implement this issue.
    Thanks in advance.
    Cheers,
    Helen

    Hi Helen,
    I guess you are trying to user conversion based on data record. data record intunr dependent on variable entry.
    So for the definition of currency translation, use time reference as end of calender year/quarter and info object as posting date.
    This should work fine for the same key figure, based on posting date, as per the example provided by you.
    Hope I am clear enough.
    Naveen.A

  • SAP Query: Duplicte records after joining table CSKT

    Guru's,
    We have created a query in SQ02 for Z table which has fields with KOKRS and KOSTL as well.
    Ztable fields:
    PLAN_TYPE
    PLAN_PROCESS
    KOKRS
    KOSTL
    We want to display cost center description. SO joining this Z table with CSKT(KOKRS,KOSTL). We are getting duplicate records in output because CSKT has duplicate KOSTL.To solve this, we want fetch Latest KOSTL comparing DATBI  GE SY-DATUM.
    Can anybody help us how to code this logic in Query. I have gone thru most of the SDN threads but could not find the answer.
    Please help us.
    Thanks in Advace.
    Shreyansh

    Moderator message - Duplicate post locked

  • How to get the name of an executing ABAP query in run time

    Hi ABAP Gurus,
    I need to get the ABAP query name when it's running. For example we can get the current executing ABAP program name from SY-REPID.
    My tried logic - every query generates an ABAP program like AQZZUGQUERY. 'UG' stands for user-group name and the length specified for it is 12, if the length of the user-group name is less than 12, then the rest will be filled by '='. Next 'QUERY' stands for ABAP query name and the length specified for it is 14, if less, then the rest will be filled in with '=' in the right. I've tried to extract the query name by using cut and trip (offset) operations.
    But somehow this logic is not working - always it's picking up the function name as checked in debug mode.
    Guys - Can you please provide me the solution on this.
    Thanks & regards,
    Jayanta Bej.

    Guys,
    I've cracked the issue. Instead of retrieving the query name from sy-repid, I've retrieved it from sy-cprog and the problem is resolved.
    Thanks guys for your quick responses.
    Thanks and regards,
    Jayanta Bej.

  • Probelm in select query

    Hi Specialists,
    I have a requirement in my report where I need to fetch database entries for 2 different billing types using different logic but querying the same database table i.e vbrk. Has anyone handled this before.
    Specification:
    1)
    For Billing Type 'ZFTV' I need to get all VBELN entries from VBRK and populate into my internal table where billing date = selection screen i/p.
    Based on VBELN I need to fetch entries from VBRP where VBELN = VBRK-VBELN.
    2)
    For Billing Type 'ZFCG' I need to get all VBELN entries from VBRK and populate into my internal table where billing date = selection screen i/p.
    based on VBELN I need to fetch entries from VBRP where VBELN = VBRK-XBLNR.
    Assumptions : The same VBELN will not exist for both billing types & Billing Type is a select-options.
    Problem encountered so far: I am trying to use following code:
    SELECT  vbeln
                    posnr
                    netwr
                    mwsbp
                    j_1aregio
                    vgbel
              FROM  vbrp
              INTO TABLE gt_item
              FOR ALL ENTRIES IN gt_header2
              WHERE vbeln EQ gt_header2-vbeln.
          ELSEIF s_fkart-low EQ 'ZFCG' .
            SELECT  vbeln
                    posnr
                    netwr
                    mwsbp
                    j_1aregio
                    vgbel
              FROM  vbrp
              APPENDING TABLE gt_item
              FOR ALL ENTRIES IN gt_header2
              WHERE vbeln EQ gt_header2-xblnr.
    But it gives me error saying the While using FOR ALL Entries the fields VBELN & XBLNR must have same type & Length.
    Any help would be highly appreciated.
    Thanks,
    Abhinav.

    Hi,
    Beyond the "FOR ALL ENTRIES" issue, your logic looks strange to me...
    Based on the assuption:
    Assumptions : The same VBELN will not exist for both billing types & Billing Type is a select-options.
    I don't think it's a good idea to use the same table gt_header2 in both select...
    A better way to get what you want would be to use two different header tables (one for billing type ZFTV and another one for type ZFCG)... Also, are those the only billing types to consider? what should be the process for other values?
    Another thing, avoid using FOR ALL ENTRIES, use a JOIN statement instead...
    Kr,
    m.
    Edited by: Manu D'Haeyer on Sep 30, 2011 12:36 PM

  • OBIEE Issue - Physical Query not picking cascaded Conditions

    In one the OBIEE Reports, I have given a set of NOT LIKE conditions as below:
    Session Name is not LIKE (pattern match) '%AUDIT%'
    AND Session Name is not LIKE (pattern match) '%audit%'
    AND Session Name is not LIKE (pattern match) '%Audit%'
    But when we refresh the report, it filters only records which uses AUDIT keyword as part of Session Names. When I checked the session log (attached for reference), I found that though logical table query takes those three conditions, while firing against database Physical Query contains condition only for AUDIT wild card as filter. Whether there is any limitation applied on using NOT LIKE conditions or is it a bug or the way the conditions are sequenced is wrong (in OBIEE sense).

    Thanks buddy. Though this workaround will solve the issue, I am curious to know why OBIEE behaves such a way. Its peculier to see OBIEE admits all 3 conditions in logical query where the Physical query skips few of the conditions in session log itself.

  • Save query output in file

    Hi,
    I want to save the output of a query in a text file. I have the code to save text in a file using util_file package but i dont know how to use the same code for my query May be if i use cursors it will help but i m not getting the logic. my query is like
    SELECT ACCN_PERIOD_COD_VC,SUM (op_amt_faa_nb)
    FROM table1
    WHERE ACCN_PERIOD_COD_VC like '%-06'
         GROUP BY ACCN_PERIOD_COD_VC
    any suggestion.. thnks
    Ashish

    Hi,
    From SQL:
    SQL>SPOOL abc.txt
    SQL>SELECT ACCN_PERIOD_COD_VC,SUM (op_amt_faa_nb)
    FROM table1
    WHERE ACCN_PERIOD_COD_VC like '%-06'
    GROUP BY ACCN_PERIOD_COD_VC;
    SQL>SPOOL OFF;
    From PL/SQL: You will have to write cursor.
    Open the Cursor.
    LOOP
    Fetch the record
    Write into file using UTL_FILE
    END LOOP
    Close Cursor
    Regrads

  • Query transform with where condition not equal to

    All,
    I have a two tables in a Data services job where I am using a Query transform to load the data from these two tables into another table. In the where tab in query transform i had a conditon saying table1.column1 <>  table2.column1 and table1.column2 <> table2.column2.
    I need to see the record count of table1-table2 in my final thrid table, but I see more record count and also the not equal condition is failing. Its working for an equal condition but the not equal condition is failing.
    The equivalent SQL query for the above transform has to be:
    select * from table1 inner join table2 on table1.column1 = table2.column1 where table1.column1 <> table2.column1 and
    table1.column2 <> table2.column2.
    Any thoughs on how to fix my query transform.
    Thanks

    Hi
    As per your below statement
    "I need to see the record count of table1-table2 in my final thrid table, but I see more record count and also the not equal condition is failing. Its working for an equal condition but the not equal condition is failing."
    If you trying to get the records from table-1 which are not in table-2 (as you trying table1-table2)
    you can try logic in query transformation where clause
    not table1.field1 in (table2.field1)
    and
    not table1.field2 in (table2.field2)
    it gives you count from table1 only
    Regards
    Ahalya Gopinath

  • If statement in DI

    Hi all
    I'm wondering what the format of IF-ELSE block is in DI. I wan to check validation rules in my query in DI but my IF statement comes with an error. I searched a lot on the Internet but couldn't find the correct syntax. What I wrote is :
    If dateOfBirth < sysdate()
    datafobirth
    end
    Unfortunately there is no help for using functions in DI     It takes me a lot to figure out the correct syntax!!
    Any help is greatly appreciated.

    you can't put a block of logic in Query mapping, you mapping expression should evaluate to a value that will be assgined to the output column
    for Query mapping you will either use constants or expressions along with input columns, or use functions, you either put the logic in a custom function or use thefunctions provided by DI . the DI functions are documented with examples in the technical manual
    for you case you can use ifthenelse() function, or put the same logic in a custom function and call that here
    for example:- in a Query your mapping can be, if your source is a EMP table with DOJ as date column
    ifthenelse(EMP.DOJ < sysdate(), DOJ, NULL)
    or you can take DOJ as input to custom function and return the output based on your requirement

Maybe you are looking for

  • How do i fix a dead spot at the bottom of an ipod touch?

    I have a dead spot at the bottom of my screen. I can swipe, put my password in, and slide through the home pages. However, I am unable to select either of the original four menu options (Messages, Safari, Settings, or Music). I dont know what to do,

  • Switching From Windows XP to Mac

    Hello, I am currently using a iPod color formatted for Windows and using iTunes for Windows running on Windows XP. I am considering purchasing a new MacBook Pro and a new video iPod as I am tired of dealing with "Windows Rot". I have a questions: 1.

  • Adobe Digital Editions will not recognise my Elonex Ebook 621eb

    I have just received an Elonex Ebook 621eb and have gone through the process of downloading ADE and it has authorised my computer, however when I connect the Ebook via the usb to the computer nothing happens - it does not come up with the Adobe ID to

  • IDoc concept

    Hello All, Can any one explain IDoc concept and how it works Thanks n Regards Venu MG

  • JPanel repaint in an ActionListener and Frame title change

    I have been trying to repaint a JPanel from a method in a nested class. The JOption pane works that retrieves the string for the color and I believe the string is being converted to a color properly, however when the repaint takes place nothing happe