Query to select UDF

Dear all expert,
I make an UDF type title in PO. The field is alphanumeric which is Y (yes) and N (no). I would like to make query to select this UDF. Please help.
Thanks

If you just want to include the UDF in a query, you just select it like any other field, they being with 'U_' followd by whatever you called it when you created it.  You can use View --> System Information on UDF's as with any other field.

Similar Messages

  • List of query result in UDF

    Dear all expert,
    I make an UDF and put query to that UDF.  I want to make list of value of that query result is always appear when user click that UDF.
    It's working fine if, the result of query is 2 rows (the list of value is pop up) but if the result only 1 row, the list of value is not show up.
    The purpose to make this UDF and query is to give information to user. So, I need, the list is to show up

    try this
    SELECT T2.DocTotal as 'SPK Value', T0.DocNum 'Payment No', T0.DocDate 'Payment Date', T1.U_Progress, Sum(T1.U_Prog_Val) 'Progress Value', Sum(T1.U_Ret_Val) 'Retensi Value', T0.DpmAmnt 'Down Payment', T0.DocTotal 'Paid', T0.Comments
    FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OPOR T2 ON T2.DocNum = T1.BaseRef
    WHERE T0.U_SPK = $[$U_SPK.number] and T0.CEECFlag = 'n'
    GROUP BY T2.DocTotal, T0.DocNum, T0.DocDate, T0.Comments, T0.DpmAmnt, T0.DocTotal, T1.U_Progress
    Union All
    SELECT 0,0, 0, '0', 0, 0, 0, 0, '0'
    Edited by: Suraj V on Jul 24, 2009 1:16 PM

  • Error while executing a sql query for select

    HI All,
    ORA-01652: unable to extend temp segment by 128 in tablespace PSTEMP i'm getting this error while i'm executing the sql query for selecting the data.

    I am having 44GB of temp space, while executing the below query my temp space is getting full, Expert please let us know how the issue can be resolved..
    1. I dont want to increase the temp space
    2. I need to tune the query, please provide your recomendations.
    insert /*+APPEND*/ into CST_DSA.HIERARCHY_MISMATCHES
    (REPORT_NUM,REPORT_TYPE,REPORT_DESC,GAP,CARRIED_ITEMS,CARRIED_ITEM_TYPE,NO_OF_ROUTE_OF_CARRIED_ITEM,CARRIED_ITEM_ROUTE_NO,CARRIER_ITEMS,CARRIER_ITEM_TYPE,CARRIED_ITEM_PROTECTION_TYPE,SOURCE_SYSTEM)
    select
    REPORTNUMBER,REPORTTYPE,REPORTDESCRIPTION ,NULL,
    carried_items,carried_item_type,no_of_route_of_carried_item,carried_item_route_no,carrier_items,
    carrier_item_type,carried_item_protection_type,'PACS'
    from
    (select distinct
    c.REPORTNUMBER,c.REPORTTYPE,c.REPORTDESCRIPTION ,NULL,
    a.carried_items,a.carried_item_type,a.no_of_route_of_carried_item,a.carried_item_route_no,a.carrier_items,
    a.carrier_item_type,a.carried_item_protection_type,'PACS'
    from CST_ASIR.HIERARCHY_asir a,CST_DSA.M_PB_CIRCUIT_ROUTING b ,CST_DSA.REPORT_METADATA c
    where a.carrier_item_type in('Connection') and a.carried_item_type in('Service')
    AND a.carrier_items=b.mux
    and c.REPORTNUMBER=(case
    when a.carrier_item_type in ('ServicePackage','Service','Connection') then 10
    else 20
    end)
    and a.carrier_items not in (select carried_items from CST_ASIR.HIERARCHY_asir where carried_item_type in('Connection') ))A
    where not exists
    (select *
    from CST_DSA.HIERARCHY_MISMATCHES B where
    A.REPORTNUMBER=B.REPORT_NUM and
    A.REPORTTYPE=B.REPORT_TYPE and
    A.REPORTDESCRIPTION=B.REPORT_DESC and
    A.CARRIED_ITEMS=B.CARRIED_ITEMS and
    A.CARRIED_ITEM_TYPE=B.CARRIED_ITEM_TYPE and
    A.NO_OF_ROUTE_OF_CARRIED_ITEM=B.NO_OF_ROUTE_OF_CARRIED_ITEM and
    A.CARRIED_ITEM_ROUTE_NO=B.CARRIED_ITEM_ROUTE_NO and
    A.CARRIER_ITEMS=B.CARRIER_ITEMS and
    A.CARRIER_ITEM_TYPE=B.CARRIER_ITEM_TYPE and
    A.CARRIED_ITEM_PROTECTION_TYPE=B.CARRIED_ITEM_PROTECTION_TYPE
    AND B.SOURCE_SYSTEM='PACS'
    Explain Plan
    ==========
    Plan
    INSERT STATEMENT ALL_ROWSCost: 129 Bytes: 1,103 Cardinality: 1                                                        
         20 LOAD AS SELECT CST_DSA.HIERARCHY_MISMATCHES                                                   
              19 PX COORDINATOR                                              
                   18 PX SEND QC (RANDOM) PARALLEL_TO_SERIAL SYS.:TQ10002 :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1                                         
                        17 NESTED LOOPS PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1                                    
                             15 HASH JOIN RIGHT ANTI NA PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,098 Cardinality: 1                               
                                  4 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 63 Bytes: 359,283 Cardinality: 15,621                          
                                       3 PX SEND BROADCAST PARALLEL_TO_PARALLEL SYS.:TQ10001 :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621                     
                                            2 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621                
                                                 1 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621           
                                  14 NESTED LOOPS ANTI PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 40,256,600 Cardinality: 37,448                          
                                       11 HASH JOIN PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 6,366,160 Cardinality: 37,448                     
                                            8 BUFFER SORT PARALLEL_COMBINED_WITH_CHILD :Q1002               
                                                 7 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 1 Bytes: 214 Cardinality: 2           
                                                      6 PX SEND BROADCAST PARALLEL_FROM_SERIAL SYS.:TQ10000 Cost: 1 Bytes: 214 Cardinality: 2      
                                                           5 INDEX FULL SCAN INDEX CST_DSA.IDX$$_06EF0005 Cost: 1 Bytes: 214 Cardinality: 2
                                            10 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448                
                                                 9 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448           
                                       13 TABLE ACCESS BY INDEX ROWID TABLE PARALLEL_COMBINED_WITH_PARENT CST_DSA.HIERARCHY_MISMATCHES :Q1002Cost: 0 Bytes: 905 Cardinality: 1                     
                                            12 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT SYS.HIERARCHY_MISMATCHES_IDX3 :Q1002Cost: 0 Cardinality: 1                
                             16 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT CST_DSA.IDX$$_06EF0001 :Q1002Cost: 1 Bytes: 5 Cardinality: 1

  • In oracle rac, If user query a select query and in processing data is fetched but in the duration of fetching the particular node is evicted then how failover to another node internally?

    In oracle rac, If user query a select query and in processing data is fetched but in the duration of fetching the particular node is evicted then how failover to another node internally?

    The query is re-issued as a flashback query and the client process can continue to fetch from the cursor. This is described in the Net Services Administrators Guide, the section on Transparent Application Failover.

  • How to get all rows that are returned in inner sub query of select statemen

    If a sub query in select statement returns more than one row than how to get all those returned rows in the final
    output of the query .It will be all right if all column's value repeat and that multiple output of inner query comes
    in another column .
    How to get that ?

    As Frank said, you likely want a join, and likely an outer join to replicate the select in the projection. Something like:
    SELECT id,stat, section, USER_ID concerned_person
    FROM table_all,
      left join table2
        on room_id = sectoion and
           sur_role = 'r001'
    WHERE section IN (SELECT code
                      FROM t_area
                      WHERE dept= 'p002')An alternative, depending on where and how you are using the statement would be something like:
    SQL> WITH t AS (
      2    select 1 id from dual union all
      3    select 2 id from dual),
      4  t1 as (
      5    select 1 id, 'One' descr from dual union all
      6    select 1, 'Un' from dual union all
      7    select 1, 'Une' from dual)
      8  SELECT t.id, CURSOR(SELECT t1.id, t1.descr from t1
      9                      WHERE t1.id = t.id)
    10  FROM t;
                      ID CURSOR(SELECTT1.ID,T
                       1 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
                      ID DESCR
                       1 One
                       1 Un
                       1 Une
                       2 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
    no rows selectedJohn

  • Need of SQL query in selecting distinct values from two tables

    hi,
    I need a query for selecting distinct values from two tables with one condition.
    for eg:
    there are two tables a & b.
    in table a there are values like age,sex,name,empno and in table b valuses are such as age,salary,DOJ,empno.
    here what i need is with the help of empno as unique field,i need to select distinct values from two tables (ie) except age.
    can anybody please help me.
    Thanks in advance,
    Ratheesh

    Not sure what you mean either, but perhaps this will start a dialog:
    SELECT DISTINCT a.empno,
                    a.name,
                    a.sex,
                    b.salary,
                    b.doj
    FROM    a,
            b
    WHERE   a.empno = b.empno;Greg

  • The parameter name [...] in the query's selection criteria does not match..

    Hi all,
    I'm trying to pratice EJB 3 (which I learnt at school), with JSF and JPA, but i'm really stuck with that error :
    Exception [TOPLINK-6094] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.QueryException
    Exception Description: The parameter name [departmentID] in the query's selection criteria does not match any parameter name defined in the query.
    Query: ReadAllQuery(oracle.datamodel.Employees)
    I will try to explain clearly what i'm trying to do :
    In fact, i'm following that tutorial :
    http://www.oracle.com/technology/obe/obe1013jdev/10131/ejb_and_jpa/master-detail_pagewith_ejb.htm
    But, as i didn't have any oracle database, but had a mysql one on my machine, i decided to use that DB instead of the the oracle DB... So i created a set of example data (to replace the oracle example set) ...so i created the tables EMPLOYEE, and DEPARTMENT... with the correct relations (FK) and PK)
    All was ok, i choose my "mysql-connector" (jdbc) instead of the oracle jdbc connector... so i could follow the tutorial.
    My problem appears at the step 12 (of "Creating a Master-Detail JavaServer Faces Page"), when i run the file deptEmployees.jspx.
    The information of the first departement displays correctly :
    departmentID 1
    departmentName ... etc
    but it can't display the employees belonging to that department !
    the error is :
    JBO-29000: Exception Description: The parameter name [departmentID] in the query's selection criteria does not match any parameter name defined in the query. Query: ReadAllQuery(oracle.datamodel.Employees)
    I think i understand what is the problem... I think that the query in charge of gathering the data of a specific departement need a parameter, but couldn't find it. But i don't know why :-/ I have tried many things and read the topics talking about that error... but it didn't solved the problem. I don't know anymore where to investigate.
    I have created a Zip file of my work (it's an EJB/JSF Application.. with jdev 10.1.3.3.0)
    (available here : http://dl.free.fr/mQ5esdQuS/EJB_appli.zip)
    I would be glad if someone could take few minutes to help me.
    Thank you in advance,
    Thomas B (student)

    Hello,
    This is a common mistake. Java string comparisons in TopLink are case sensitive by default, and since column names are uppercase when defaulted, TopLink cannot find the "departmentID" column name. In this case, Departments ID column defaults to "DEPARTMENTID" as required by the JPA specification.
    Either change Departments id annotation to     @Id
        @Column(name="departmentID", nullable = false)
        private Integer departmentID;or change Employees' ManytoOne annotation to:
        @ManyToOne
        @JoinColumn(name = "departmentID", referencedColumnName = "DEPARTMENTID")
        private Departments departments;Best Regards,
    Chris

  • Impact of selecting "Removing Query from Selection List" in 2 channels.

    HI All ,
    I have customized a query in one channel (My Agreements and Contract Documents query in Master Agreements List channel) and have removed the standard query from the channel by checking the  "Remove Query from Selection List" and introduced my custom query in that query group .
    But  it resulted in break in chain for  "Master Agreements" link in "Contracts To Do List" channel as the link was pointing to standard  "My Agreements and Contract Documents" query and is displaying "The query can not be executed. Contact your system administrator" when ever I click on that.
    Any pointers on how to overcome above scenario wud be gr8!
    Regards,
    Uday

    Hi Uday,
    In order for To Do List channel to work, the query definition should be in the Master Agreement List query group. Do you still want the standard query in the To Do List? If so, you would have to leave it on the Query Group as To Do list is pointing to it. May be change the display name of the query so you can differentiate between the 2 queries. The other option is change the To Do channel to point to the custom query.
    Regards,
    Vikram

  • Limiting Query View selections for Web reports

    In web reports, users currently have Query View Selection but they want to be  able to just see views that they have created and not all others. 
    How can this be done?
    Does creating views in web and in BEX pull different auth objects or is it same? - Which objects are check in WEB views? Bex views use s_rs_comp with the QVW componenet.. but the trace does not show any log like this.

    Hi,
    User specific protection of queries are controlled by authorization object S_RS_COMP1.
    Authorization RSZOWNER = "$USER" allows the user access to activities in all the components he is an owner of.
    Check out this link, the analyst 3 scenario is what you are looking for:
    http://help.sap.com/saphelp_nw04/helpdata/EN/41/05453caff4f703e10000000a114084/content.htm
    Regards,
    Zaheer

  • CAML query to select data in specfic range

    CAML query to select data in specfic range.
    I have a list-A and it has a column 'Col1' which has thousands records, I want to fetch data in a specific range as:
    select Col1,Col2 from list-A where Col1 > 100 and Col1 < 600

    Hi,
    The following code with the CAML query for your reference:
    using (SPSite site = new SPSite("http://spsite/"))
    using (SPWeb web = site.OpenWeb())
    string sQuery = @"<where><and><gt><fieldref name='Col1' /><value type='number'>100</value></gt><lt><fieldref name='Col1' /><value type='number'> 600 </value></lt></and></where>";
    string sViewFields = @"<fieldref name='Col1' /><fieldref name='Col2' />";
    string sViewAttrs = @"Scope='Recursive'";
    var oQuery = new SPQuery();
    oQuery.Query = sQuery;
    oQuery.ViewFields = sViewFields;
    oQuery.ViewAttributes = sViewAttrs;
    SPList oList = web.Lists["ListName"];
    SPListItemCollection collListItems = oList.GetItems(oQuery);
    foreach (SPListItem oListItem in collListItems)
    More information about the CAML:
    http://msdn.microsoft.com/en-us/library/office/ms467521(v=office.15).aspx
    http://msdn.microsoft.com/en-us/library/office/ms462365(v=office.15).aspx
    Here is a tool will help you to build and test SharePoint CAML Queries:
    https://spcamlqueryhelper.codeplex.com/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Query View Selection - Filter by owner

    Hi
    I'm using BW 3.5 and have the Query View Selection Web Item in my template.
    I want to show in this web item only views from the user created them - the current user should only see the views he created and not all.
    How is this possible?
    Thx
    Roger

    Hi Roger,
    You can acheive it in authorization object S_RS_COMP1.
    Activity: *
    Name (ID) of a reporting compo: *
    Type of a reporting component: Query View
    Owner (Person Responsible) for: $USER$
    He will be having access of his view only.
    Regards,
    Kams

  • Query for selecting the 4 highest marks of the student

    query for selecting the 4 highest marks of the student

    Guys dont start an argument,
    tey this one; please
    Hi,
    Try this
    Top 4
    Select ename,
    sale
    From dept d,
    emp e1
    Where d.deptno = e1.deptno
    And &p > (Select Count(e2.sal)
    From emp e2
    Where e2.sal > e1.sal
    And e2.deptno = e1.deptno
    Order By 1,2
    Bottom 4
    Select ename,
    sale
    From dept d,
    emp e1
    Where d.deptno = e1.deptno
    And &p > (Select Count(e2.sal)
    From emp e2
    Where e2.sal < e1.sal
    And e2.deptno = e1.deptno
    Order By 1, 2
    &P you use any value say 3,4,5,6
    This is top N analysis
    Regards
    Umesh

  • Query for selecting first  3 characters of name of any person

    query for selecting first 3 characters of name of any person

    10:52:44 SQL> SELECT SUBSTR(ename, 1, 3) first_three FROM emp;
    FIRST_THREE
    SMI
    ALL
    WAR
    JON
    MAR
    BLA
    CLA
    SCO
    KIN
    TUR
    ADA
    FIRST_THREE
    JAM
    FOR
    MIL
    Ton
    15 rows selected.
    Elapsed: 00:00:00.00

  • Query view selection

    Hello,
    I am working with Bex 3.5 WAD. How do i make use of the web item "query view selection". It is not working properly for me. Is there any document that i can follow to create a web template using the above web item. Please advise.

    hello Gillian,
    I looked at that link before. I am able to use query view selection bex in my web template and the query drop down box is being populated by all the query views created for the query and i have given a table (table_1) as the affected web item. When i publish my template i can see the query view drop down box with the list of query views and the table. When i select one view the table is showing the results for that view, but when second view onwards the data doesn't change? what am i doing wrong. below is my html code.
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="ITEMVIEWDROPDOWN_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_VIEW_DROP_DOWN"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="WIDTH" value="20"/>
             <param name="VIEW_DD_TARGET_ITEM" value="DP1_table"/>
             <param name="VIEW_DD_RRI" value="X"/>
             <param name="VIEW_DD_USE_ALL_QUERY_VIEWS" value="X"/>
             <param name="VIEW_DD_DESCRIPTION_I" value="B"/>
             ITEM:            ITEMVIEWDROPDOWN_1
    </object>
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="DP1_table"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             ITEM:            DP1_table
    </object>

  • A test query for selecting by ticketid

    This is a test query to select tickets by ticketid , starting with the most recent, as to get the top5 most recent tickets. There will be still mistakes in it. please don't tell me those about stupid mistakes,and spaces, at first and obvious syntax mistakes. Otherwise I don't learn it. My question has to do with the loop. Do you think it is useful to use a loop for this, or should it stay as it is, or should it be something else.
    DECLARE
    Define, and open a cursor;
    min_ticket NUMBER; -- minimum ticketid
    laatste_ticket NUMBER; -- latest ticketid
    tussen_ticket NUMBER; -- in between ticket
    Query_to_use VARCHAR2(4000);
    BEGIN
    Select max(ticketid) into laatste_ticketid from ticket;
    Select count(*) into teller from ticket where (ticketid<laatste_ticketid ) AND (ticketid>(laatste_ticketid-6));
    Select ticketid, categoriecd, titel into cursor from ticket where (ticketid<laatste_ticketid ) AND (ticketid>(laatste_ticketid-6));
    Select min(ticketid) into min_ticketid from ticket;
    If teller= < 5
         If teller = 5
              Query_to_use := Query_to_use || ';';
              Return Query_to_use;
         else
              --Loop through records from laatste_ticketid to min_ticketid
                   Select gebruikerid into te_testen_veld from ticket where ticketid = tussen_ticketid ;
                   If te_testen_veld is NULL THEN
                        tussen_ticketid := tussen_ticketid - 1;
                        te_testen_veld := NULL;
                   Else
    Query_to_use := query_to_use || ' UNION select ticketid, categoriecd, titel from ticket '||
                   ' where ticketid = tussen_ticketid ';
                   te_testen_veld := NULL;
                   Teller := teller + 1;
                        If (teller < 5)
                             tussen_ticketid := tussen_ticketid - 1;
                        Else if (teller = 5)
                             teller := 6;
                        End if;
                   End if;
              --End Loop;
         End if;
    End if;
    Query_to_use := Query_to_use || ';';
    Return Query_to_use;
    END;

    You can get all this using one SQL statement, without resorting to explicit cursors. Have a look at http://asktom.oracle.com and search for Top-N Query.
    Depending on what you are doing, you may want to use a cursor for loop.
    I assume this is for some sort of electronic queueing system. if you gave us more detail as to what you are trying to do, you may get better advice.

Maybe you are looking for

  • IPhone 6 - Voice of Senders Name Alert

    I just switched back to iPhone after deciding the Note 3 was not my thing. Anyway Android had a feature that instead of a message alert tone, you could also use a feature that would say the senders name if it was in your contacts. The same is true fo

  • My computer is no longer recongizing my ipod

    my ipod shows up with the usb port pluggin ginto itunes on the screen when i plug it into itunes it says the ipod needs to be restored but it is unable to restore the ipod bc it cannot find it. how do i get the computer to recongize my ipod

  • How do I contact a Mozilla suport representative on the website?

    I know that there used to be a feature on the website where we could ask a question and then wait for someone to answer us (NOT the forums) if we needed a quicker response. Where did it go? I hope someone knows what I'm talking about. Thanks.

  • Query in select statment

    Hi ,     what is the difference between,select single and select upto one row . In a select statment . Thanks , shankar.

  • CCMS Alert Management

    Hi guys, I'm using a central CCMS system (based on Solution Manager - WAS 7.0) to monitor a lot of productive instance. I've also implemented note 746193 to trigger "green" alert when an odd situation recovers. However I'd like to find a way to reset