Dynamic LOV with where conditions

Hi all! I have a question regarding Dynamic LOVs. I have a List of values that can be used from three pages, the query is something like this:
SELECT a.CODE CODE_DISPLAY,
a.CODE CODE_RETURN
FROM OREF_COUNTRIES a,
OREF_REGIONS b
WHERE a.REG_ID = b.ID AND
b.CODE = :P336_LOV_REGION;
The thing is I don't want to hardcode the name of the item ":P336_LOV_REGION" because this is the name of 1 item of one page, and I'd like to use this LOV from another two pages, so the name of the item won't be ":P336_LOV_REGION". How can I create a reusable dynamic LOV with a where condition depending on one item of the page?
Thanks!!

hi! anyone has any information about this?
Daniela.

Similar Messages

  • Dynamic LOV with dates and selected default value

    Hello,
    I have a dynamic lov with dates. Query looks like this:
    select distinct concat(to_char(b.send_day_time,'YYYY.MM.DD HH24'),':00') display_value, to_char(b.send_day_time,'YYYY.MM.DD HH24') return_value
    from ...
    No I want to select a specific date as the default value. I put the following code for the default value:
    declare
    begin
    return to_char ('2008.02.19 10:00');
    end;
    But it doesn't work.The date (string) exists in the lov but it is not selected.
    Can someone tell me where the problem is?
    Thx in advance.
    Greetings,
    hamburger

    Hi hamburger,
    As return value you specified to_char(b.send_day_time,'YYYY.MM.DD HH24'),
    so your default value should be like to_char('2008.02.19 10'). Also pay attention to select the "Default Value Type".
    Hope this helps.
    chrissy

  • Export/Import with where condition

    DearAll,
    I am facing a problem in the delete of a huge table that take 3 hours
    DELETE FROM HST HST
    WHERE JV_TYPE <> 999
    and ( HST.VALUE_DATE <= TO_DATE ('31/12/2010','DD/MM/YYYY')
    AND HST.TRANS_DATE <= TO_DATE ('31/12/2010','DD/MM/YYYY'))
    what i am trying to do is to export the HST table and import it into another table
    but what i need to do is to have a dump with where condition including only the needed records in the table not deleted in the DML above as well as the indexes, triggers.
    Thanks

    If I try the following:
    CONN / AS SYSDBA
    CREATE OR REPLACE DIRECTORY dpump_dir1 AS '/folder/';
    GRANT READ, WRITE ON DIRECTORY dpump_dir1 TO bokprod;
    expdp bokprod/bokprod@uat TABLES=HST PARFILE=hst_query.par
    In the parfile:
    QUERY=hst:"WHERE JV_TYPE <>999 and ( HST.VALUE_DATE > TO_DATE ('31/12/2010','DD/MM/YYYY') AND HST.TRANS_DATE > TO_DATE ('31/12/2010','DD/MM/YYYY'))"
    DUMPFILE=exp.dmp
    DIRECTORY=dpump_dir1
    LOGFILE=exp.log
    impdp bokprod/bokprod@uat DIRECTORY=dpump_dir1 DUMPFILE=exp.dmp
    TABLES=bokprod.hst REMAP_TABLE=bokprod.hst:hst_imported
    My question is:
    1- the parameter file, if i put it in the dpump_dir1 directory, is it read by the expdp command?
    2- the hst_imported table created by the remap_table command , is it created with the indexes and triggers already existant on hst table?
    Appreciate yoyr help Dears

  • Dynamic component in WHERE-condition for LOOP AT ?

    i want to make
    loop at itab where  (dynamic field) > 0
    how i can make it...
    Edited by: Thomas Zloch on Mar 2, 2010 2:47 PM

    I thought it's funny.
    And the problem can maybe be solved by using a completely dynamic where-condition, not just a dynamic component.
    http://help.sap.com/abapdocu_70/en/ABAPLOOP_AT_ITAB_COND.htm#!ABAP_ADDITION_4@4@
    Thomas
    P.S. meaningless subject enhanced, and please take the time to say hi and please when asking for help. Thanks.

  • Error in Dynamic LOV with Bind Variable

    Hi
    I created 2 Dynamic LOV's in which Second one is with a Bind Variable.Then I creted a Form and Attached the LOV's to the form fields.But I am getting the below mentioned error when i choose a value in the First LOV and the Second LOV is not Populated. I tried the same thing with the scott.dept and scott.emp table which is working fine.but when i try the same on my tables it is throwing me error.
    Can Anyone Suggest me what is the problem of these LOVs
    FYI
    1)I am writing SELECT on Views in the LOVs and the views are created on tables of a different of database.
    2)Below Mentioned LINK_TIT is my DB Link.
    Error Message:
    An unexpected error occurred: ORA-01722: invalid number
    ORA-02063: preceding line from LINK_TIT (WWV-16016)
    Error displaying form : ORA-01722: invalid number
    ORA-02063: preceding line from LINK_TIT (WWV-16408)
    Error displaying block : ORA-01722: invalid number
    ORA-02063: preceding line from LINK_TIT (WWV-16406)
    Error displaying item : ORA-01722: invalid number
    ORA-02063: preceding line from LINK_TIT (WWV-16404)
    Error ORA-01722: invalid number
    ORA-02063: preceding line from LINK_TIT, displaying DUMMY_FRM_BLEND.DEFAULT.SKU5ID.01, combobox (WWV-16405)
    The preference path does not exist: ORACLE.WEBVIEW.PARAMETERS.16172911255 (WWC-51000)

    Hi Everyone,
    This was a known Issue in Oracle 9i AS Portal.I referred to the
    metalink note ID 174116.1 which talks about the BUG No:1584284.and it gives some workaround to come across the BUG.
    I got my dependent LOV work after changing the NUMBER datatype in the Procedure to VARCHAR2.(Then in the PL i converted the character to number by the SQL function.)
    Regds
    Rajesh Kanna.V

  • Creating LOV with Where clause

    I'm trying to create a list of values from a select statementsomething like this
    select customer_name, customer_number from customer
    where Region = 'WEST';
    I'm able to create a list of values of all the customers and numbers, but I could not
    create a lov for a specific subset of that data, such as in the where clause.
    Is it possible to create a LOV with a where clause?

    Use bind variables to accept the region parameter. Also, it is good practice to accept a null parameter value. If your parameter is null, display the entire list of values. Your query would look something like this:
    select customer_name, customer_number from customer
    where Region = :region_name or
    :region_name is null;
    Regards,
    Jay Mason

  • Select-options with where condition

    Hello ABAPers,
    I want to create a select-options like s_operid for vbpa-kunnr but with a condition specified is VBPA-KUNNR where VBPA-PARVW = 'WE'.
    Thanks in advance. Pls reply asap. Points will definitely be rewarded.
    Ritu

    hi,
    use this
    PARAMETERS : TAB_ID TYPE ZALOAD_PROD_COMB-TAB_ID OBLIGATORY.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR TAB_ID.
    DATA : BEGIN OF INT_TAB_ID OCCURS 0,
                TAB_ID TYPE ZALOAD_PROD_COMB-TAB_ID,
             END OF INT_TAB_ID.
      DATA : LOC_MAX TYPE ZALOAD_PROD_COMB-TAB_ID.
      CLEAR INT_TAB_ID.
      REFRESH INT_TAB_ID.
      SELECT MAX( TAB_ID) INTO (LOC_MAX) FROM ZALOAD_PROD_COMB.
      COUNT = LOC_MAX + 1.
      DO 10 TIMES.
        MOVE COUNT TO INT_TAB_ID-TAB_ID.
        APPEND INT_TAB_ID.
        COUNT = COUNT + 1.
      ENDDO.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
         RETFIELD            = 'TAB_ID'                        u201C Internal table field name
         DYNPPROG         = 'PROG_NAME                  u201C Program name
         DYNPNR              = SY-DYNNR
         DYNPROFIELD   =  'TAB_ID'                        u201C Field where u need F4 help
         VALUE_ORG       = 'S'
       WINDOW_TITLE  = u2018Any descriptionu2019
        TABLES
          VALUE_TAB      = INT_TAB_ID.                   u201C Internal table name
    Mark the post answered once ur problem is solved ....

  • Export data with where condition

    Hello,
    I am doing an export using exp utility in oracle.
    exp fas/fas@fdbl file=aud log=aud.log parfile=exp
    Contents of parfile - exp
    compress=n
    indexes=n
    constraints=n
    grants=n
    triggers=n
    statistics=none
    consistent=y
    query=\"where org_grp_i=33 \"
    I am getting error when i include query = \"where org_grp_i=33 \". Without giving this condition the export is doing fine, its successful. how do i give this where condition in the parfile since i want to export lots of tables with this same condition. org_grp_i is common in all the tables.
    Thanks

    1. create directory ----
    sql> conn / as sysdba
    sql>create directory "data" as 'c:\';
    2. grant read, write privs. to exp or imp users.
    sql>grant read , write on directory data to scott;
    sql>grant read , write on directory data to tester;
    3.conn imp or exp user
    sql>conn scott/tiger
    SQL> host expdp scott/tiger directory=data dumpfile=eg.dmp tables=avgsal
    Export: Release 10.1.0.2.0 - Production on Wednesday, 25 October, 2006 19:14
    Copyright (c) 2003, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Starting "SCOTT"."SYS_EXPORT_TABLE_01":  scott/******** directory=data dumpfile=
    eg.dmp tables=avgsal
    Estimate in progress using BLOCKS method...
    Processing object type TABLE_EXPORT/TABLE/TBL_TABLE_DATA/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 64 KB
    Processing object type TABLE_EXPORT/TABLE/TABLE
    Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    . . exported "SCOTT"."AVGSAL"                            5.312 KB       5 rows
    Master table "SCOTT"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
    Dump file set for SCOTT.SYS_EXPORT_TABLE_01 is:
      C:\EG.DMP
    Job "SCOTT"."SYS_EXPORT_TABLE_01" successfully completed at 19:15
    SQL> drop table avgsal purge;
    Table dropped.
    SQL> host impdp tester/tester directory=data dumpfile=eg.dmp
    Import: Release 10.1.0.2.0 - Production on Wednesday, 25 October, 2006 19:16
    Copyright (c) 2003, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Master table "TESTER"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
    Starting "TESTER"."SYS_IMPORT_FULL_01":  tester/******** directory=data dumpfile
    =eg.dmp
    Processing object type TABLE_EXPORT/TABLE/TABLE
    Processing object type TABLE_EXPORT/TABLE/TBL_TABLE_DATA/TABLE/TABLE_DATA
    . . imported "SCOTT"."AVGSAL"                            5.312 KB       5 rows
    Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    Job "TESTER"."SYS_IMPORT_FULL_01" successfully completed at 19:16
    SQL>
    note : cmd>impdp help=y
    cmd> expdp help=y
    see doc. for more info
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14215/toc.htm
    Message was edited by:
    user52

  • Outbound merge not working with where conditions in 10g

    Hi,
    These are my database details both remote and local database
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for HPUX: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - ProductionI am doing a merge into a remote database from a local table using below query...
    MERGE into sap_mmd_po_all@cosmic_dev.somedomainname trg using (select * from sap_mmd_cmas_po where upload_flag in ('I','U')) src
      on (trg.PO_NO=src.PO_NO and trg.LINE_DISTRIB_SEQ=src.LINE_DISTRIB_SEQ)
      WHEN MATCHED THEN
        update set
          trg.PO_STATUS_FLG=src.PO_STATUS_FLG,
          trg.SHIP_TO_FACILITY_CD=src.SHIP_TO_FACILITY_CD,
          trg.DELV_TO_PHONE_NO=src.DELV_TO_PHONE_NO,
          trg.DELV_TO_NM=src.DELV_TO_NM,
          trg.DELV_TO_ADDRESS_1=src.DELV_TO_ADDRESS_1,
          trg.PO_ITEM_NO=src.PO_ITEM_NO,
          trg.ITEM_DESCRP=src.ITEM_DESCRP,
          trg.PARTY_NM=src.PARTY_NM,
          trg.VENDOR_ITEM_ID=src.VENDOR_ITEM_ID,
          trg.PO_LN_CRTE_DT=src.PO_LN_CRTE_DT,
          trg.BILL_UOM_CD=src.BILL_UOM_CD,
          trg.COMMODITY_CD=src.COMMODITY_CD,
          trg.COMMODITY_NM=src.COMMODITY_NM,
          trg.BSNSS_UNIT_NO=src.BSNSS_UNIT_NO,
          trg.PO_LN_ORD_QTY=src.PO_LN_ORD_QTY,
          trg.DISTRIB_AMT=src.DISTRIB_AMT,
          trg.PO_LN_DEL_IND=src.PO_LN_DEL_IND,
          trg.PO_DEL_IND=src.PO_DEL_IND,
          trg.PO_TYPE=src.PO_TYPE,
          trg.DOC_DATE=src.DOC_DATE,
          trg.CRTE_DT_TM=src.CRTE_DT_TM,
          trg.UPD_DT_TM=systimestamp,
          trg.SOURCE_SYSTEM=src.SOURCE_SYSTEM,
          trg.PO_LN_LST_CHNGE_DT=src.PO_LN_LST_CHNGE_DT,
          trg.TXJCD=src.TXJCD,
          trg.PLANT=src.PLANT
          where (src.upload_flag='U')--if i remove this then it is working
      WHEN NOT MATCHED THEN
        insert( trg.PO_NO,
                trg.LINE_DISTRIB_SEQ,
                trg.PO_STATUS_FLG,
                trg.SHIP_TO_FACILITY_CD,
                trg.DELV_TO_PHONE_NO,
                trg.DELV_TO_NM,
                trg.DELV_TO_ADDRESS_1,
                trg.PO_ITEM_NO,
                trg.ITEM_DESCRP,
                trg.PARTY_NM,
                trg.VENDOR_ITEM_ID,
                trg.PO_LN_CRTE_DT,
                trg.BILL_UOM_CD,
                trg.COMMODITY_CD,
                trg.COMMODITY_NM,
                trg.BSNSS_UNIT_NO,
                trg.PO_LN_ORD_QTY,
                trg.DISTRIB_AMT,
                trg.PO_LN_DEL_IND,
                trg.PO_DEL_IND,
                trg.PO_TYPE,
                trg.DOC_DATE,
                trg.CRTE_DT_TM,
                trg.UPD_DT_TM,
                trg.SOURCE_SYSTEM,
                trg.PO_LN_LST_CHNGE_DT,
                trg.TXJCD,
                trg.PLANT)
        values( src.PO_NO,
                src.LINE_DISTRIB_SEQ,
                src.PO_STATUS_FLG,
                src.SHIP_TO_FACILITY_CD,
                src.DELV_TO_PHONE_NO,
                src.DELV_TO_NM,
                src.DELV_TO_ADDRESS_1,
                src.PO_ITEM_NO,
                src.ITEM_DESCRP,
                src.PARTY_NM,
                src.VENDOR_ITEM_ID,
                src.PO_LN_CRTE_DT,
                src.BILL_UOM_CD,
                src.COMMODITY_CD,
                src.COMMODITY_NM,
                src.BSNSS_UNIT_NO,
                src.PO_LN_ORD_QTY,
                src.DISTRIB_AMT,
                src.PO_LN_DEL_IND,
                src.PO_DEL_IND,
                src.PO_TYPE,
                src.DOC_DATE,
                systimestamp,
                src.UPD_DT_TM,
                src.SOURCE_SYSTEM,
                src.PO_LN_LST_CHNGE_DT,
                src.TXJCD,
                src.PLANT)
                where src.upload_flag='I'--if i remove this then it is working
                ;And it is throwing an error like...
    SQL Error: ORA-00904: "A3"."UPLOAD_FLAG": invalid identifierBut when I replace the remote table name with local table name then query is functioning fine...
    table structure in local database..
    CREATE TABLE SAP_MMD_CMAS_PO
       (     "PO_NO" VARCHAR2(10 BYTE) NOT NULL ENABLE,
         "LINE_DISTRIB_SEQ" NUMBER NOT NULL ENABLE,
         "PO_STATUS_FLG" VARCHAR2(40 BYTE),
         "SHIP_TO_FACILITY_CD" VARCHAR2(100 BYTE),
         "DELV_TO_PHONE_NO" VARCHAR2(50 BYTE),
         "DELV_TO_NM" VARCHAR2(100 BYTE),
         "DELV_TO_ADDRESS_1" VARCHAR2(1000 BYTE),
         "PO_ITEM_NO" VARCHAR2(100 BYTE),
         "ITEM_DESCRP" VARCHAR2(200 BYTE),
         "PARTY_NM" VARCHAR2(1000 BYTE),
         "VENDOR_ITEM_ID" VARCHAR2(100 BYTE),
         "PO_LN_CRTE_DT" TIMESTAMP (6),
         "BILL_UOM_CD" VARCHAR2(50 BYTE),
         "COMMODITY_CD" VARCHAR2(50 BYTE),
         "COMMODITY_NM" VARCHAR2(50 BYTE),
         "BSNSS_UNIT_NO" VARCHAR2(50 BYTE),
         "PO_LN_ORD_QTY" NUMBER,
         "DISTRIB_AMT" NUMBER,
         "PO_LN_DEL_IND" VARCHAR2(10 BYTE),
         "PO_DEL_IND" VARCHAR2(10 BYTE),
         "PO_TYPE" VARCHAR2(10 BYTE),
         "DOC_DATE" TIMESTAMP (6),
         "CRTE_DT_TM" TIMESTAMP (6),
         "UPD_DT_TM" TIMESTAMP (6),
         "SOURCE_SYSTEM" VARCHAR2(100 BYTE),
         "PO_LN_LST_CHNGE_DT" TIMESTAMP (6),
         "TXJCD" VARCHAR2(50 BYTE),
         "PLANT" VARCHAR2(10 BYTE),
         "UPLOAD_FLAG" VARCHAR2(1 BYTE),
          PRIMARY KEY ("PO_NO", "LINE_DISTRIB_SEQ")
    --table structure in remote database table
    CREATE TABLE SAP_MMD_PO_ALL
       (     "PO_NO" VARCHAR2(10 BYTE) NOT NULL ENABLE,
         "LINE_DISTRIB_SEQ" NUMBER NOT NULL ENABLE,
         "PO_STATUS_FLG" VARCHAR2(40 BYTE),
         "SHIP_TO_FACILITY_CD" VARCHAR2(100 BYTE),
         "DELV_TO_PHONE_NO" VARCHAR2(50 BYTE),
         "DELV_TO_NM" VARCHAR2(100 BYTE),
         "DELV_TO_ADDRESS_1" VARCHAR2(1000 BYTE),
         "PO_ITEM_NO" VARCHAR2(100 BYTE),
         "ITEM_DESCRP" VARCHAR2(200 BYTE),
         "PARTY_NM" VARCHAR2(1000 BYTE),
         "VENDOR_ITEM_ID" VARCHAR2(100 BYTE),
         "PO_LN_CRTE_DT" TIMESTAMP (6),
         "BILL_UOM_CD" VARCHAR2(50 BYTE),
         "COMMODITY_CD" VARCHAR2(50 BYTE),
         "COMMODITY_NM" VARCHAR2(50 BYTE),
         "BSNSS_UNIT_NO" VARCHAR2(50 BYTE),
         "PO_LN_ORD_QTY" NUMBER,
         "DISTRIB_AMT" NUMBER,
         "PO_LN_DEL_IND" VARCHAR2(10 BYTE),
         "PO_DEL_IND" VARCHAR2(10 BYTE),
         "PO_TYPE" VARCHAR2(10 BYTE),
         "DOC_DATE" TIMESTAMP (6),
         "CRTE_DT_TM" TIMESTAMP (6),
         "UPD_DT_TM" TIMESTAMP (6),
         "SOURCE_SYSTEM" VARCHAR2(100 BYTE),
         "PO_LN_LST_CHNGE_DT" TIMESTAMP (6),
         "TXJCD" VARCHAR2(50 BYTE),
         "PLANT" VARCHAR2(10 BYTE),
         "DELETE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N',
          PRIMARY KEY ("PO_NO", "LINE_DISTRIB_SEQ")
      )It seems to me like a bug, but not quite sure...
    your suggestions are appreciated.
    Thanks,
    Ravi Kumar
    Edited by: ravikumar.sv on Dec 14, 2009 1:31 PM
    Commented the where conditions in merge query

    Hi,
    Yes, i hit the same error....
    SQL> ed
    Wrote file afiedt.buf
      1  merge into hr.test1@test_dblink using test2 on (test1.id = test2.id)
      2  when matched then update set test1.col1=test2.col2 where test2.id=2
      3* when not matched then insert (id, col1) values(test2.id,test2.col2)
    SQL> /
    merge into hr.test1@test_dblink using test2 on (test1.id = test2.id)
    ERROR at line 1:
    ORA-00904: "A3"."ID": invalid identifier
    ORA-02063: preceding line from TEST_DBLINKBUT here is a work around...to add the where condition while joining(ON) itself.
    SQL> ed
    Wrote file afiedt.buf
      1  merge into hr.test1@test_dblink using test2 on (test1.id = test2.id and tes
    t2.id=2)
      2  when matched then update set test1.col1=test2.col2
      3* when not matched then insert (id, col1) values(test2.id,test2.col2)
    SQL> /
    2 rows merged.
    SQL>For you the condition would be...
    on (trg.PO_NO=src.PO_NO and trg.LINE_DISTRIB_SEQ=src.LINE_DISTRIB_SEQ AND src.upload_flag='U')cheers,
    Edited by: Avinash Tripathi on Dec 14, 2009 2:53 PM

  • Loop at table with unspecified type but with where-condition

    Hi,
    Doing a loop over an internal table with unspecified type and in addition using a condtion may be done as follows: Thereby the
    condition would be "... WHERE parentid EQ i_nodeid" if the type of <it_htab> would be static. However dynamic specification of a component through bracketed character-type data objects is not possible.
    FIELD-SYMBOLS: <it_htab> TYPE STANDARD TABLE,
                                    <wa_htab> TYPE ANY,
                                    <parentid> TYPE rsparent.
      ASSIGN me->ref_htab->* TO <it_htab>.
      LOOP AT <it_htab> ASSIGNING <wa_htab>.
        ASSIGN COMPONENT 'PARENTID' OF STRUCTURE <wa_htab> TO <parentid>.
        CHECK <parentid> EQ i_nodeid.
      ENDLOOP.
    Since you have to loop over the whole table and to check within the loop whether the condition is fullfilled, this is rather bad for performance.
    Questions: Are there any tricks to do this better?
    Best Regards and Thank you,
    Ingo

    >
    Lalit Mohan Gupta wrote:
    > you can put the condition in the where clause....
    only if you have the upcoming 7.0 EhP2 (Kernel 7.02 or 7.20) the following dynamic where works:
    DATA cond_syntax TYPE string.
    cond_syntax = `parentid = i_nodeid`.
    LOOP AT <it_htab> ASSIGNING <wa_htab>
                           WHERE (cond_syntax).
    in older releases you would have to use program generation to achieve a dynamic where... .
    Kind regards,
    Hermann

  • Dynamic LOV with two static entries

    I need an additional static entry in a List of Values field.
    As my first static entry I use the Null condition.
    Or maybe somebody has a different idea how to accomplish the following:
    I want to be able to select all the entries of a table with a certain foreign key, all entries with the "value" NULL or just all entries.
    thanks

    I ran into more problems but i resolved them :D
    Since I want that at the first load 'all values' is selected... I needed to set :P1_SELECT to -1 when its NULL but that got me some trouble with select 'NULL Values'... thus I changed the NULL value of :P1_SELECT to -2.
    This solution has also the other convenience that at top of the select box is 'all values', second entry is 'null values' and all the following are build up dynamicly
    select d, r from (
    select ename d, empno r from emp -- your foreign key condition
    union
    select 'NULL Values' d, -2 r from dual -- NULL values
    union
    select 'All values' d, -1 r from dual -- All data condition. Use a return value that is not in the empno domain
    default: -1
    In your report, create a where condtion like
    WHERE (empno = :P1_SELECT AND :P1_SELECT IS NOT NULL) -- foreign key
    OR (:P1_SELECT = -2 AND empno IS NULL) -- Null values
    OR (:P1_SELECT = -1) -- All values

  • Dynamic Linq with Where and ObjectParameter doesn't work

    Hello !
     I have this code :
    Imports System.Linq.Dynamic
    Dim mylist As IQueryable(Of Myobject)
    Dim ob1 As New List(Of ObjectParameter)
    Dim dynstr as string=string.empty
    dynstr += "it.id= @id"
    ob1.Add(New ObjectParameter("id", 26))
    mylist=context.MyObjects.Where(dynstr,ob1.ToArray()).Tolist
    I'm expecting that MyList contain only 1 object with id=26 , but MyList contains all the objects inside MyObjects. So it seems that the Where clause has no effect.
    And it's strange because if i change the dynstr to simply dynstr+="it.id=26" , everything works ok . It seems that the objectparameter list "doesn't communicate" with dynstr.?????????
    What's wrong ? Thank you !

    apology for not understanding your question correctly.
    " It seems that the objectparameter list "doesn't communicate" with dynstr.?????????"
    probably you have to change
    mylist=context.MyObjects.Where(dynstr,ob1.ToArray()).Tolist
    to below perhaps? since obj1 is already a collection.  i have not tried it though.
    mylist=context.MyObjects.Where(dynstr,ob1).Tolist
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Dynamic LOV with inactive row

    Hi everyone,
    I need your help on this one as I can't seems to find an intelligent solution.
    I have a select list LOV based on a table that show only active values of that table when you create an object. That works well. But now I need to display an object for modification years after (The same page display as creation). The value entered at that time is not active anymore and is not showing up in the select list. Because of that you cannot see the old value in the select list
    CREATE TABLE TYPE
         IDE           NUMBER (9) NOT NULL ,
         NAME      VARCHAR2 (50) ,
         ACTIVE     NUMBER (1)
    LOV
    select NAME display_value, IDE return_value
    from type
    WHERE active = 1
    order by 1
    My best guess is to add a given value to the LOV using application/page variable like this but I find this very ugly.
    select NAME display_value, IDE return_value
    from type
    WHERE active = 1
    OR ide = :P10_ide
    order by 1
    Do you see any other solution ?
    I would really like a better one as I need to do this 20+ times on many pages .... going to be a mess ...

    Checkout this post on my blog:
    http://simonhunt.blogspot.com/2009/02/how-to-cope-with-list-of-values-lovs.html
    It's similar to your solution and I agree that it's ugly, but I've not seen a better solution. I would be interested to know if anyone has any better ideas.
    I hope it helps
    Shunt

  • How to create feilds in Webi reports with where condition

    I need to create a feild display name by keeping the constraint condition
    o     Display value – dbo.Personnel.Fullname   METRICPERSONNEL
    o     Joining tables – dbo.MetricRequestTeam.MetricRequestKey, dbo.MetricRequest.MetricRequestKey
    o     Constraint – dbo.MetricRequestTeam.MetricRoleTypeKey = ‘2’
    How we can do this in webi level.
    Thanks

    Hi Sasi,
    I am taking assumption that you have already merged both the table at report level on common column.
    So for Analyst column in report you want to display :
    IF  dbo.MetricRequestTeam.MetricRoleTypeKey = ‘2’ THEN "Lead"
    Else IF dbo.MetricRequestTeam.MetricRoleTypeKey = ‘4’  THEN "Analyst"
    Am i Right??
    For this just create a variable  ( I think here it will be a Dimension) with following formula:
    =If([Column_Name] =2) then "Lead"
    Else (IF([Column_Name] =4 then "Analyst" else "None")))
    Drag this variable to analyst column it will give you desired values.
    Points to remember:
    If the data type of column "dbo.MetricRequestTeam.MetricRoleTypeKey" is string then put "2" or "4" in formula else it will give you #syntax error.
    Alternatively you can also give following formula:
    =If([Column_Name] InList ("2") ; "Lead";
    (IF([Column_Name] InList("4") ; "Analyst" ; "None")))
    Hope it helps!
    PS: you have already marked a reply as correct answer
    Thanks,
    Shardendu

  • Select with where condition comparing different domains

    SELECT *
               FROM table
               FOR ALL ENTRIES IN it_temp
               WHERE col1 =  it_temp-col_id.
    col1 is of type char20
    it_temp-col_id is of type char10.
    "col1" and "it_temp-col_id" must have the same type and the same length.
    do someone know a workaround?
    thanks!!

    types : begin of ity_temp_1,
                   col_temp type table-col1, " this is type 20.
                endof ity_temp_1.
    data: lt_temp_1 type standard table of ity_temp_1,
             ls_temp_1 type ity_temp_1.
    loop at it_temp into is_temp.
        clear ls_temp_1.
        ls_temp_1-col_temp =    is_temp-col1. " passing col1(type 10 to col_temp of type 20.)
        append ls_temp_1 into lt_temp_1.
        clear : is_temp.
    endloop.
    "now lt_temp_1 holds matching domain.
    SELECT *
    FROM table
    FOR ALL ENTRIES IN lt_temp_1 " comparing with passed values with same domain
    WHERE col1 = lt_temp_1-col_temp.

Maybe you are looking for

  • LV 8.21: strange behavior with DAQ tasks, parallel running VI's and shift registers

    Hello, I have made a VI using DAQmx vi's. The VI uses shift registers to store DAQ tasks and other (internal) information. I have implemented  several modes of operation (enum control with a case structure) like 'init', 'read AD', 'config AD' etc. If

  • Need some serious help. first mac ever. PLEASE

    hello i recently bought a used mac (powerbook g4 1.5ghz 512mb i think its 15 titanium? silver color? anywayz it came with microsoft office and my friend told me it was expensive software and if i reformat this mac i would lose it. so i searched mac w

  • NOt able to start the listener..

    After Indtalling oracle 11g .. i am not able to start the listener dbstart $ORACLE_HOME lsnrctl start ORACLE_SID=orcl export ORACLE_SID lsnrctl start [oracle@test1 bin]$ lsnrctl start LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 27-DEC-2012

  • Performance Management Appraisal Reporting

    Hi Experts, I have a business requirement to report on Final Performance Ratings via Org. Units.  Standard SAP Reporting for Performance Management appears to be very limited with phap_search_pa... I want to be able to report on Org. Units and their

  • IPad mail folders for smtp

    I use yahoo smtp. Broadband email service here in Canada by the cable provider monopoly....... Oh I digress Anyway, is there a way to create folders In iPad mail for smtp mail type providers? It doesn't appear that yahoo mail or Rogers webmail allow