Error 136 Functions that can be compossed must declare a return type

Hello,
I have downloaded the EF Final Release driver and Im working with Oracle 11g express.
I have the following Procedure:
PROCEDURE ProductosPedido(
Datos Out SYS_RefCursor) IS
BEGIN
OPEN Datos FOR
SELECT Nombre,
TO_NUMBER(Precio * (SELECT SUM(unidades)
FROM DETALLES_PEDIDO
WHERE PRODUCTO = PRODUCTO.ID)) Importe
FROM PRODUCTO;
END;
And the following config section:
<oracle.dataaccess.client>
<settings>
<add name="System.Productospedido.RefCursor.Datos" value="implicitRefCursor bindinfo='mode=Output'"/>
<add name="System.Productospedido.RefCursorMetaData.Datos.Column.0" value="implicitRefCursor metadata='ColumnName=Nombre;BaseColumnName=Nombre;BaseSchemaName=System;BaseTableName=Producto;NativeDataType=nvarchar2;ProviderType=NVarchar2;DataType=System.String;ColumnSize=50;AllowDBNull=true;IsKey=false'" />
<add name="System.Productospedido.RefCursorMetaData.Datos.Column.1" value="implicitRefCursor metadata='ColumnName=Importe;NativeDataType=number;ProviderType=Decimal;DataType=System.Decimal;AllowDBNull=false;IsKey=false;ColumnSize=8'" />
</settings>
</oracle.dataaccess.client>
I have imported succesfully in my EF Model, but when I try to consume the Procedure it gives me Error 136 Functions that can be compossed must declare a return type
Any solutions?
Thanks and best regards!

A stored procedure does not have a ReturnType, therefore IsComposable="false" and it cannot be used in LINQ queries.
This limitation is imposed by EF and not by ODP.
You may want to create a stored function which has a ReturnType ref cursor, and include this stored function into your model. Then, under the same namespace, you create a class with a "stub" method/function and use EdmFunction() to map this stub to the stored function. For example,
class myFuncClass
[EdmFunction("Model.Store", "MY_STORED_FUNC_1")]
public static <your_complex_type_or_DbDataRecord> MyFunc_1(int? column1, ...)
throw new NotSupportedException("Direct calls are not supported");
You should be able to call myFuncClass.MyFunc_1(x) in your LINQ query. Your stored function MY_STORED_FUNC_1 will be called in the generated query.

Similar Messages

  • I need a BAPI or function that can create a PO without the purchase req.

    I need a BAPI or function that can create a PO without the reference to a purchase requisition. We are creating "direct POs" (with no reference to PR) manually. And we have a large amount of documents to create. I can't figure out if BAPI_PO_CREATE and BAPI_PO_CREATE1 can help us by doing this, because I've understood this BAPIs creates POs only with the reference to a purchase requisition.
    Thanks in advance!!
    Sebastian

    Sorry I'm late guys, I couldn't replay your posts because I was busy.
    Charlie,
    ...just because we have the data already in the SAP system.
    My client doesn't want purchase requisitions to be created from the PM orders. Instead he asked us to create the purchase workflow by generating direct purchase orders from the PM orders, basically taking the information from the purchase agreement within the order's tasks. Maybe you don't understand a bit what I'm saying, but let me get this straight: we can't use LSMW because data doesn't come from a legacy.
    Ian,
    ...after all, and like you've said, we're gonna use BAPI_PO_CREATE1 for creating the POs. Today I finally realized that, purchase requisitions aren't mandatory for the bapi to perform the process. If something goes wrong, I'll let you know.
    Thanks anyway for your attention.
    Sebastian

  • SSAS- DAX expression : Is there any DAX function that can return multiple values ?

    Hi,
    Iam in search of a DAX function that can return multiple values as result. please find below scenario where i want to implement the same.
    I have three  Tables: Table A (typeid, Cost, Qty ) ,Table B (typeid, Cost, Qty ) , Table C ( typeid,Typename ) .
    Table A                                       Table B                               
    Table C
    type id  cost  Qty             type id   Cost    Qty                 
    typeid  typename
    1           100    100                3         300     
    300                  1           aa
    2           200    200                4          400    
    400                  2           bb
                                                                                             3           cc
                                                                                             4          
    dd 
    i have to club cost and Qty of two tables(four measures)  as two measures in the  UI report. There are more columns in these tables that restrict the  UNION of the tables.(for the sake
    of understanding , i have not mentioned the othr columns). In the UI report(Execl 2013-power pivot) iam plotting these measures against the
    Table C.Typeid. Hence the measures drill down against each 
    Table C. Typeid as shown below:
    Typeid  Table A.cost  Table A.Qty  TableB.cost  TableB.Qty                              
    1              100             100
    2              200             200
    3                                                    
    300             300      
    4                                                    
    400             400
    My requirement is to club these measures so that the report will be as below
    Type id  cost   Qty
    1          100    100
    2          200    200
    3         300     300
    4         400      400
    Since i cannot club these in model,as a work around, i created a calculated measure in excel(Analyze tab->Calculations->olap tools->calculated measure) with the condition as below:
    new cost = IIF (ISEMPTY(TableA.cost)="TRUE",TableB.cost,TableA.cost)
    new Qty = IIF(ISEMPTY(TableA.Qty)="TRUE",TableB.Qty,TableA.Qty) and dragged these new measures into the report. It was working fine as expected.
    But  this functionality of Creating calculatedmeasure in excel report is possible only in 2013 excel version.
    Now the requirement is to get the same result in 2010 excel. Can you please help me in implementing the same in 2010 excel? or any other alternative method to bring the columns in model itself. I tried to create a measure in table A with DAX expression as
    : new cost :=CALCULATE(SUM(Table B.cost),ISBLANK(TableA.cost)) -> but this will return only 1 result .i need Sum(Table A.cost) also if it is not blank.
    Thanks in advance

    You can use SUMX ( 'Table A', 'Table A'[Cost] + 'Table B'[cost] )
    However, if you install the latest version of Power Pivot in Excel 2010, it supports the ISEMPTY function, too.
    http://support.microsoft.com/kb/2954099/en-us
    Marco Russo http://www.sqlbi.com http://www.powerpivotworkshop.com http://sqlblog.com/blogs/marco_russo

  • Error with function that returns a rowtype...

    i have a function that returns a rowtype. below is a simplified version:
    create or replace function "GETC"
    return mytable%rowtype
    is
    rec mytable%rowtype;
    begin
    rec.rowid := 1;
    return rec;
    end;
    eventually i'll want to call this from java. but for now i'd settle for calling it from the XE web front end (and sqlplus).
    SQLPLUS: i try to call it from sqlplus by first declaring a variable where i can store the return:
    var a mytable%rowtype;
    it instantly stops me saying that i can only declare a var of a particular type. so what do i do?
    XE interface: i tried various ways to call getc(), but they were all unsuccessful. what should i be doing?
    thanks so much for your time.
    marko

    Given a function like this:
    CREATE OR REPLACE FUNCTION get_employee
         ( p_empno emp.empno%TYPE )
         RETURN emp%ROWTYPE
    AS
         v_result emp%ROWTYPE;
    BEGIN
         SELECT * INTO v_result
         FROM   emp
         WHERE  empno = p_empno;
         RETURN v_result;
    END get_employee;You can call it within PL/SQL like this:
    DECLARE
         rec emp%ROWTYPE;
    BEGIN
         rec := get_employee(7902);
         DBMS_OUTPUT.PUT_LINE(rec.ename);
    END;However,
    1. Unless there is a column named "ROWID" in the table (unlikely since it would conflict with the actual rowid and is therefore not allowed), the type will not have an attribute named "rowid".
    2. "1" would not be a valid rowid anyway.
    3. %ROWTYPE defines a PL/SQL type, which will not be recognised in other environments such as SQL and Java.

  • Is there function that can transform a image file into a matrix?

    Hi,
    Is there function in java that can transform a image file into a matrix? What kind of library should be used?
    thx

    It would be ****** nice if we could provide an example but we got more important things to do than stand around and wipe your bottom. Get off that fat thing and find out yourself.
    Took me under a minute to find this link, is it really that hard for you kind of people to search? you know what the word means or looks like?
    http://forum.java.sun.com/thread.jsp?forum=20&thread=363117

  • [Solved] How/Can ADF bind to PL/SQL return type that is an assoc array?

    Using JDeveloper (sometimes 10.1.2, and sometimes 10.1.3.2) with 10gR2 for backend data/procedures/packages/etc and eventually deploying to Oracle Application Server.
    I searched the forum, but didn't find an example that was quite what I need.
    I have a PL/SQL function that returns an associative array that is a table of subtypes. In PL/SQL, the result can be looped through and acts pretty much like a table. Can this be used as a data source for ADF?
    If yes...
    So I want a table that uses this return value as the source. I want to have edit and delete columns that will call PL/SQL procedures that perform the work. Are there any examples of this, or has anyone tried to do this?
    Thanks, Ken

    Frank,
    Thank you for the insight. Since I haven't done this before, do you know of any particular OBEs, webcasts, etc. that either show this type of example, or something similar to use as a template?
    In particular, an example that shows the interaction of a POJO with ADF.
    Thanks, Ken

  • Any function that can get me occurance of a particular char in a string?

    Hi All,
    I want to calulate occurance of a semi colon in the following string , so i can achieve this using connect by but I am looking to use a function(preferably an oracle built in function)
    string : ';1;2;3;4;5;6;7;8;9;'
    Regards
    Rahul

    Yet another »classic« approach:
    SQL> with t as ( select ';1;2;3;4;5;6;7;8;9;' str from dual)
    -- actual query:
    select str
    ,      nvl(length(translate(str, ';'||str, ';')),0) number_of_occurances
    from   t
    STR                 NUMBER_OF_OCCURANCES
    ;1;2;3;4;5;6;7;8;9;                   10
    1 row selected.Edited by: MichaelS on Nov 18, 2010 3:13 PM
    added NVL.

  • Search function that can work in AIR

    I have a AIR App.
    It's just a html site.
    I would like to have search capability to search file names if not content...

    There is a thread on the topic on the Photoshop forum: http://forums.adobe.com/message/4124703#4124703
    Strange, it works in CS4
    But you guys are able to go to http://help.adobe.com/en_US/photoshop/cs/using/index.html right?
    It might be useful to know that you can set Community Help Sites as a search engine in your browser (it should offer you to register itself as a search engine, while Safari users have to add Glims to add additional search engines.) http://blogs.adobe.com/communityhelp/2009/01/opensearch_plugins_available_f.html

  • Sql table function that compares two tables column structure and returns each difference as a record in the returned table

    hi,
    Does anyone have or can show me the principle of a such kind of function ?

    see
    http://geekswithblogs.net/leonardm/archive/2010/01/14/table-schema-comparison-in-sql-server.aspx
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Is there a way to create a function that concatenates

    Hello,
    I constantly find myself needing to create a forumla tha concatenates employee's ID, last name, and first name.  Is there a way to create a function in Crystal that will allow me to create a function that already has this concatenation in place?  I am using Crystal XiR2.
    Thanks,
    Z

    Hi Zack,
    Custom function is a function that can be used in any report and it doesn't depend on database. We have to provide the values in order to claculate what we want and basing on the values provided it calculates accordingly. We cannot use global variables in custom functions and also evaluation time functions (like whileprintingrecords,whilereadingrecords). So I think it is not possible to get the strings concatenated without passing the values.
    Alternatively you can go for a query using Add Command like this
    select IDFirstNameLastName as value from table
    Regards,
    Raghavendra

  • Using a dll function that does not have any inputs from a VI

    Hello all, I'm very new to Labview, I have wraped a dll library using the LVlib wizard and now I am trying to use it in a project.  I have a function that does not take any inputs or return any thing except that a struct is populated with some status information as part of the call.  I am able to draw a StartInterface VI because my void startInterface(const char* configFile, struct status_struct* status) takes the location of a configutation file as an input. But I can not figure out how to connect my Call Library Node to my a function vi that does not have any inputs ( void shutdownInterface(struct status_struct* status)). 
    Note that the status struct is deffined to be only and out put at the creation of the LVLIB.
    Thanks, Mike

    Thanks for the responses guys:
       I think I am aware of the conotations of inputs and outputs when I created the lvlib I specified the argument  struct status_struct* status as only an output instead of the default of input and output.
    I do not think that I am doing anything as complex as function callbacks. My immediate goal is to have an executable (I have application builder) with two buttons and two three text fields one text field for the input of the config file, two text-fields for a cstring that is contained in the status struct; one button to start the interface and one button to stop the interface. 
    This is in all likely hood a case of my self being too dense and missing something fundimental ;-)  I just can't figure out how to wire the shut down method after I've configured the call library node. See the attached pictures:
    Attachments:
    Start.jpg ‏7 KB
    shurtdown.png ‏9 KB

  • PS-script that can list all clients in a specific collection and if possible, point out direct members...

    CM2012Sp1Cu1 
    Need a powershell-function that can list all the clients in a specific collection, and then somehow define which of them are direct members. The most important thing for me is to list all the members but it would also be great if I could know which ones are
    direct / query members. 
    Very grateful for all the help I can get!
    TWP

    Here is a very simple example via PowerShell and WMI. It requires your collection id, site code and site server as input. It writes as output the collectionmember plus query, or direct.
    $CollectionId = ""
    $SiteCode = ""
    $SiteServer = ""
    $CollectionMembers = Get-WmiObject -Class SMS_FullCollectionMembership -Namespace root/SMS/site_$($SiteCode) -ComputerName $SiteServer -Filter "CollectionId='$CollectionId'"
    foreach ($Member in $CollectionMembers) {
    if ($Collection.IsDirect -eq "True"){
    $MembershipType = "Direct"
    } else {
    $MembershipType = "Query"
    Write-Host $Member.Name $MembershipType
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • Function that check if date and time between to dates and time

    hi
    is there any function that can check if date and time are between to dates and time ?
    thanks
    Ami

    You can check using IF condition.
    DATA : d1 TYPE datum, d2 TYPE datum, d3 TYPE datum.
    IF d1 BETWEEN d2 AND d3.
      d1 = d1 + 1.
    ENDIF.
    where d1, d2 and d3 are dates.
    Similarly you can check for Time and Timestamp.
    regards,
    Jinson

  • Error - You Can only resubmit requisitions of status returned rejected

    HI All ,
    When I am trying to change the requisitions , I am getting this error message .
    You Can only resubmit requisitions of status returned rejected
    For newly created requisitions(which are having staus APPROVED ), and PO (Which are having status APPROVED) . I can able to change the requisitions .
    But when I am tryingto change the old requisitions means which are created an year ago that time I am gettign this error .
    Can u please help me what would be the reason and how to change the requisitiosn.
    Thanks
    sai

    964036 wrote:
    HI All ,
    When I am trying to change the requisitions , I am getting this error message .
    You Can only resubmit requisitions of status returned rejected
    For newly created requisitions(which are having staus APPROVED ), and PO (Which are having status APPROVED) . I can able to change the requisitions .
    But when I am tryingto change the old requisitions means which are created an year ago that time I am gettign this error .
    Can u please help me what would be the reason and how to change the requisitiosn.
    Thanks
    saiPlease see these docs.
    Unable To Change Or Complete Other Users Requisitions In ''My Group's Requisitions'' [ID 308882.1]
    Not Able To Change A Requisition Selected From Search Results [ID 332438.1]
    iProcurement FAQ: IPREQV Requisition Status [ID 135035.1]
    iProcurement FAQ for 11i: iProcurement Approvals and Workflow [ID 135613.1]
    Thanks,
    Hussein

  • Function overloading on return types

    consider following two overloaded functions
    public int functionA(int a,int b);
    public char functionA(int a,int b)and if i call them like this
    int returnInt = functionA(a,b)
    char returnChar = functionA(a,b)in this scenario which function to call can be decided depending on the
    return type then why java don have overloading on the basis of return type ?

    Try it.

Maybe you are looking for

  • Increasing the size of an application

    On my MacBook Air, I find the default font size to be too small in many applications for my imperfect eyesight. Some applications support 'zoom' (eg, Safari), other applications support font-size changes (eg, Mail), and of course I can simply reduce

  • On startup itunes library empty!! - help

    A friend called me just now he's a new Mac user on an inherited ibook G3, 10.3.9. He started up his ibook today and the itunes library is empty. Understandibly he is freaking out and learnig the lesson of reasons to have a good backup strategy. Howev

  • Problem declaring and using a REF CURSOR

    I'm having a real problem using a REF CURSOR type Here's the DECLARE and the start of the BEGIN I've so far developed. DECLARE TYPE r1 IS RECORD ( szvcapc_pidm szvcapc.szvcapc_pidm%TYPE, szvcapc_term_code szvcapc.szvcapc_term_code%TYPE, szvcapc_reque

  • Fault in string comparisons?

    Hallo. I have the following problem. An XML file, encoded in ISO8859-2, should be presented in a table in a browser's window. The file is "one level deep", something like: <type>animal</type> <name>cat</name> <type>insect</type> <name>ant</name> ...a

  • Error while installing oracle on Linux

    Hi everyone i am trying to install SAP 4.6C on SUSE Linux.I have completed till CI n when it stops us to install Oracle, during the installation of Oracle it dtops at 18% saying " copying naeet.o" n link pending.Can anyone suggest me the solution. It