Packaging custom Objects TYPE

Hello everybody,
i wonder if it is possible to "package" objects into package definition as follow:
CREATE OR REPLACE PACKAGE OBJECTS_TEST IS
TYPE MYTYPE IS OBJECT(T0 VARCHAR2(200),T1 VARCHAR2(200));
when i try to execute this I always receive the following error:
ERROR line 3, col 22, ending_line 3, ending_col 22, Found '(', Expecting: ;
So far, seems that the definition of the object must go internally to the PACKAGE BODY, therefore into a FUNCTION/PROCEDURE.
I would like to define a package that works as a global handler for all my objects used in my schema, what I'm supposed to do ?
Any help will be very appreciated,
Thank you,
Luigi

Thank you everybody for your support, and as requested I'll try to be more precise.
I'm developing functions and procedure to manipulate data that will then be used by a Business Object universe.
As for now, I've opted to develop some custom transformation procedure in PL/SQL to handle special cases where strings contains value pairs like :
1~FirstText~2~SecondText
From this point onward, I need to create a view that needs to be like this:
VALUE | TEXT
1 | FirstText
2 | SecondText
So far, I've build a PL/SQL procedure that parse the string and returns a TABLE OF OBJECTS to be further used in a VIEW with more or less 100 records.
Those objects where initially declared externally to my package in this way:
CREATE OR REPLACE TYPE RadioQuestionParam IS OBJECT (
                                            Q_ID     VARCHAR2 (50 CHAR),
                                            Q_F_ID  VARCHAR2 (50 CHAR),
                                            Q_VALUE VARCHAR2 (4000 CHAR),
                                            Q_TEXT  VARCHAR2 (4000 CHAR)
CREATE OR REPLACE TYPE RadioQuestionParamTable IS TABLE OF RadioQuestionParam;
/and the procedure that will use them is...
create or replace package objects_test
FUNCTION PARAMS2ROWS2     (P_Q_ID      IN  VARCHAR2,
                             P_Q_F_ID    IN  VARCHAR2,
                            P_Q_PARAM   IN  VARCHAR2)
                            RETURN RadioQuestionParamTable ; 
end objects_test;
/so then I can use:
select * from table(objects_test.params2rows2('q_id','q_f_id','1~TEST1~2~TEST2'));to produce the desired output.
As I would like to organize everything in one single package I was wondering if there's a way of using OBJECTS INSIDE A PACKAGE....
As for now I've modified my code to use michaels2 suggestion but with no luck as when I execute the
select * from table(objects_test.params2rows2('q_id','q_f_id','1~TEST1~2~TEST2')); I'm receiving a ORA-00902: invalid datatype;
Thank you for your precious help,
Luigi

Similar Messages

  • Generic Object Services for Custom Object Type

    I would like some advice please. I am not an ABAP Developer but I would like to enable the generic object services for transaction PP01 for a custom object type.
    I have searched for information, which suggests that the object needs to be published using the function module SWU_OBJECT_PUBLISH so that it is available in the Business Object Repository. If this is correct, please could someone tell me (in simple terms) how I can do this (with the assistance of an ABAP developer)?
    My colleague did some debugging which seemed to suggest that in order for the generic object services to be available, the field OBJTYP needs to be populated in table T778O. Is this correct? If so, how should this be done?
    Your advice would be greatly appreciated.
    Regards
    Corinne

    Hi,
    i'm also looking for the solution you have asked for.
    if you know how to do it please reply me with the solution.
    Thanks,
    suresh

  • Comparisons of Packages vs Object Types

    Hi all,
    I wonder if anyone can point me towards any articles or documentation that compares/contrasts the advantages and disadvantages of Packages against Object Types?
    For example, I like the ability to have private variables and procedures within Packages but don't know how I achieve the same thing with Object Types so a comparison of the two styles would be very useful.
    Thanks all,
    Leo

    Hmmm. As far as I can tell, these are 2 different animals. The way I look at it
    - A package is a grouping of one or more variables, procedures and functions. It is a PL/SQL construct.
    - An object type is a type definition that may be used to declare SQL and PL/SQL constructs.
    I would refer you to the docs at http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14260/toc.htm (under the 10gR2 doc set at http://tahiti.oracle.com, "Application Development" tab) for a good source of information related to your question.

  • Is it Possible to create custom Object type in configuration Tab

    Hi ,
    We have object type for table in Development Tab in SOLAR02 , is it possible to create a custom object type to represent the table object type in Configuration Tab.
    Please let me know the steps , if it is possible.
    Best Regards,
    Saravana

    Hi
    You answer for you problem exists and its a common problem but you need to go for this development as mentioned below
    /people/andreas.diebold/blog/2007/02/13/extend-sap-solution-manager-to-manage-new-object-types
    We did long time back
    Hope ur problm and doubt is resolved now
    Regards
    Prakhar

  • Updating a custom object type

    Please, does anybody know how to update an custom object type which is created as table.
    I did the following:
    CREATE TYPE tmp as object..
    CREATE TYPE tmp_table as TABLE of tmp;
    Is it possible to update tmp_table and if so how?
    Thanks.

    Example:
    create type address_ty as object
    (Street varchar2(50)
    ,city varchar2(25)
    ,zip number)
    create type person_ty as object
    (name varchar2(50)
    ,address address_ty)
    create table customer
    (customer_id number
    ,person person_ty)
    insert into customer (1, person_ty ('Name', address_ty ('Street Name', 'City Name', 1111)));
    insert into customer (2, person_ty ('Name 2', address_ty ('Street Name 2', 'City Name 2', 1111)));
    commit;
    update customer
    set person = person_ty ('Name 2', address_ty ('New Street Name 2', 'City Name 2', 1111))
    where customer_id = 2;
    Please, does anybody know how to update an custom object type which is created as table.
    I did the following:
    CREATE TYPE tmp as object..
    CREATE TYPE tmp_table as TABLE of tmp;
    Is it possible to update tmp_table and if so how?
    Thanks.

  • New custom object type - SWO1

    Hi All,
    I need to create a custom object type using SWO1.
    The object type needs to be linked to a report program with selection screen(or its tcode). 
    The selection screen carries just 1field. The output is a new screen.
    Would appreciate if any1 can tell me the step-by-step process to accomplish my objective.
    -Ram.

    Enter a name.
    Hit create. Populate the manadatory pop ups don't populate super type.
    Blow out the key field. Create a key field.
    Blow out the methods - add a method. Add the code for the method - select the method and hit the program button add code as below:
    BEGIN_METHOD RUNDUPREPORT CHANGING CONTAINER.
       SET PARAMETER ID 'VPA' FIELD OBJECT-KEY-PARTNEREMPLOYEEID.
    export object-key-partneremployeeid to memory id '99'.
       CALL TRANSACTION 'ZEML' AND SKIP FIRST SCREEN.
    *object-key-partneremployeeid.
    END_METHOD.
    Create your event.
    My method calls an abap I wrote that is bound to a transaction.
    You will need to set the release status for all of the elements of your object and the object itself.
    The question I have is why. Are you calling the object in a workflow? If so you will need to use the fm as below:
    DATA: OBJTYPE LIKE SWETYPECOU-OBJTYPE VALUE 'ZRM_WWCONT',
        EVENT LIKE SWETYPECOU-EVENT VALUE 'DuplicateEmail',
         OBJKEY LIKE SWEINSTCOU-OBJKEY,
            EVENTID LIKE SWEDUMEVID-EVTID.
        DATA: BEGIN OF EVENT_CONTAINER OCCURS 0.
                INCLUDE STRUCTURE SWCONT.
        DATA: END OF EVENT_CONTAINER.
        OBJKEY = KNVK-PARNR.
        CALL FUNCTION 'SWE_EVENT_CREATE'
             EXPORTING
                  OBJTYPE              = OBJTYPE
                  OBJKEY               = OBJKEY
                  EVENT                = EVENT
            START_WITH_DELAY     = ' '
            START_RECFB_SYNCHRON = ' '
            IMPORTING
                 EVENT_ID             = EVENTID
             TABLES
                  EVENT_CONTAINER      = EVENT_CONTAINER
             EXCEPTIONS
                  OBJTYPE_NOT_FOUND    = 1
                  OTHERS               = 2.
        COMMIT WORK.
    Good Luck.

  • Delegation of Custom Object Types

    Dear Gurus,
    What is the need for DELEGATING a custom object type that we create using SWO1.
    Thanks,
    VV

    HI Balajisap ,
    'the event 'releasestepcreated' has to be triggered for object types BUS2105 and the custom created for BUS2105 in SWEL right?. But i am getting only BUS2105 not the custom one'..
    The system will always show the standard BO not the custom one. Afetr dlegating you custom BO to the standard one, use your standard BO to trigger your worflow. The standard BO will contain the cistom properties after delegation.
    Regards
    Anik

  • "Property value is not valid" when PropertyGridView tries to convert a string to a custom object type.

    Hi,
    I have a problem with an PropertyGrid enum property that uses a type converter.
    In general it works, but when I double clicking or using the scoll wheel,  an error message appears:
    "Property value is not valid"
    Details: "Object of type 'System.String' cannot be converted to type 'myCompany.myProject.CC_myCustomProperty."
    I noticed that the CommitValue method (in PropertyGridView.cs) tries to convert a string value to a CC_myCustomProperty object.
    Here is the code that causes the error (see line 33):
    (Using the .net symbols from the PropertyGridView.cs file)
    1
            internal bool CommitValue(GridEntry ipeCur, object value) {   
    2
    3
                Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose,  "PropertyGridView:CommitValue(" + (value==null ? "null" :value.ToString()) + ")");   
    4
    5
                int propCount = ipeCur.ChildCount;  
    6
                bool capture = Edit.HookMouseDown;  
    7
                object originalValue = null;   
    8
    9
                try {   
    10
                    originalValue = ipeCur.PropertyValue;   
    11
    12
                catch {   
    13
                    // if the getter is failing, we still want to let  
    14
                    // the set happen.  
    15
    16
    17
                try {  
    18
                    try {   
    19
                        SetFlag(FlagInPropertySet, true);   
    20
    21
                        //if this propentry is enumerable, then once a value is selected from the editor,   
    22
                        //we'll want to close the drop down (like true/false).  Otherwise, if we're  
    23
                        //working with Anchor for ex., then we should be able to select different values  
    24
                        //from the editor, without having it close every time.  
    25
                        if (ipeCur != null &&   
    26
                            ipeCur.Enumerable) {  
    27
                               CloseDropDown();   
    28
    29
    30
                        try {   
    31
                            Edit.DisableMouseHook = true;  
    32
    /*** This Step fails because the commit method is trying to convert a string to myCustom objet ***/ 
    33
                            ipeCur.PropertyValue = value;   
    34
    35
                        finally {   
    36
                            Edit.DisableMouseHook = false;  
    37
                            Edit.HookMouseDown = capture;   
    38
    39
    40
                    catch (Exception ex) {   
    41
                        SetCommitError(ERROR_THROWN);  
    42
                        ShowInvalidMessage(ipeCur.PropertyLabel, value, ex);  
    43
                        return false;  
    44
    I'm stuck.
    I was wondering is there a way to work around this? Maybe extend the string converter class to accept this?
    Thanks in advance,
    Eric

     
    Hi,
    Thank you for your post!  I would suggest posting your question in one of the MS Forums,
     MSDN Forums » Windows Forms » Windows Forms General
     located here:http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=8&SiteID=1.
    Have a great day!

  • Simple Question- WS & Custom object types

    Hi all,
    I'm sure I found some posts on this topic before but cannot seem to find them at the minute.
    I know in Web Services it is possoble to pass user defined objects, as long as they implement Serializable. But is it that simple? do you not have to define mappings and the like in the configuration files?
    Any pointers to suitable material would be appreciated. Many thanks
    Kevin

    Hi Kevin,
    I too have noticed that there are many posts on TypeMapping of complex types (I think it is mostly because people are not - yet - well acquainted with Web Services). Look at the "advanced"-JAXRPC examples in the Web Services tutorial and see that you do not need to map much. In the case of DII it is limited to the input-parameters and the result-type.

  • Accessing fields of a custom object type

    Hello,
    this is for Oracle 11.2.0.4.0
    I am trying to create and return an object inside a function and then access attributes of that object.
    It works in that I get the expexted result in my query, but the object is created once again for each attribute that I am accessing:
    CREATE OR REPLACE TYPE zzz_tp_type_test AS OBJECT (
      col_a VARCHAR2(100 CHAR),
      col_b VARCHAR2(100 CHAR),
      col_c VARCHAR2(100 CHAR)
    CREATE OR REPLACE FUNCTION zzz_f_type_test RETURN zzz_tp_type_test
    IS
      ret zzz_tp_type_test := zzz_tp_type_test('aa', 'bb', 'cc');
    BEGIN
      dbms_output.put_line('Running once...');
      RETURN ret;
    END;
    SET serveroutput ON;
    SELECT (A).col_a, (A).col_b, (A).col_c FROM (
        SELECT zzz_f_type_test A FROM dual
    The result of the SELECT query is
    (A).COL_A
    (A).COL_B
    (A).COL_C
    aa
    bb
    cc
    Running once...
    Running once...
    Running once...
    I am not sure why this is happening, or how to prevent this. I would expect to call the function only once, and then access that one created instance for each attribute.
    I am thinking it might have to do with the parentheses around "A", but that was the only way to get the query to execute - without them I got a syntax error.
    What do I need to change for the DB to execute the function only once?
    Thank you...

    That's a good solution using a table type and table function.  It can be simplified a bit, as shown below.
    SCOTT@orcl> -- test environment:
    SCOTT@orcl> select banner from v$version
      2  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0    Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    5 rows selected.
    SCOTT@orcl> -- original type and function:
    SCOTT@orcl> CREATE OR REPLACE TYPE zzz_tp_type_test AS OBJECT (
      2        col_a VARCHAR2(100 CHAR),
      3        col_b VARCHAR2(100 CHAR),
      4        col_c VARCHAR2(100 CHAR)
      5      );
      6  /
    Type created.
    SCOTT@orcl> CREATE OR REPLACE FUNCTION zzz_f_type_test
      2    RETURN zzz_tp_type_test
      3  IS
      4    ret zzz_tp_type_test := zzz_tp_type_test('aa', 'bb', 'cc');
      5  BEGIN
      6    dbms_output.put_line('Running once...');
      7    RETURN ret;
      8  END;
      9  /
    Function created.
    SCOTT@orcl> SET SERVEROUTPUT ON
    SCOTT@orcl> -- additional type from Gerard:
    SCOTT@orcl> create or replace type zzz_nt_type_test is table of zzz_tp_type_test;
      2  /
    Type created.
    SCOTT@orcl> -- simplification of Gerard's query:
    SCOTT@orcl> select i.col_a, i.col_b, i.col_c
      2  from  table (zzz_nt_type_test (zzz_f_type_test())) i
      3  /
    COL_A
    COL_B
    COL_C
    aa
    bb
    cc
    1 row selected.
    Running once...
    SCOTT@orcl> exec dbms_output.put_line('end');
    end
    PL/SQL procedure successfully completed.
    SCOTT@orcl>

  • Issue with RCDC for Custom "Department" object type

    Hey Guys,
    Maybe somebody can point out where the issue is with the RCDC. I have a custom object type called Department in FIM portal and wanted to create a simple interface for it so users can add and edit department fields.
    The only two fields that should show on the RCDC is department and divisions(this is the name of the custom field) all the fields work but I keep getting the following error "There's an error in the Department display configuration.Please contact your
    system administrator"
    Below is the RCDC:
    <?xml version="1.0" encoding="utf-8"?>
    <!--Copyright (c) Microsoft Corporation. All rights reserved.-->
    <my:ObjectControlConfiguration xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xmlns:my="http://schemas.microsoft.com/2006/11/ResourceManagement" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <my:ObjectDataSource my:Name="object" my:TypeName="PrimaryResourceObjectDataSource"/>
    <my:ObjectDataSource my:Name="delta" my:TypeName="PrimaryResourceDeltaDataSource"/>
    <my:ObjectDataSource my:Name="rights" my:TypeName="PrimaryResourceRightsDataSource"/>
    <my:ObjectDataSource my:Name="schema" my:TypeName="SchemaDataSource"/>
    <my:XmlDataSource my:Name="summaryTransformXsl" <my:Parameters="Microsoft.IdentityManagement.WebUI.Controls.Resources.DefaultSummary.xsl"/>
    <my:Panel my:Name="page" my:Caption="Default Configuration" my:AutoValidate="true">
    <my:Grouping my:Name="_caption" my:Caption="Caption" my:IsHeader="true">
    <my:Control my:Name="_caption" my:TypeName="UocCaptionControl" my:Caption="Create Department" my:Description="" my:ExpandArea="true">
    <my:Properties>
    <my:Property my:Name="MaxHeight" my:Value="32"/>
    <my:Property my:Name="MaxWidth" my:Value="32"/>
    </my:Properties>
    </my:Control>
    </my:Grouping>
    <my:Grouping my:Name="DepartmentInformation" my:Caption="Department Information">
    <my:Control my:Name="Department" my:TypeName="UocLabel" my:Caption="{Binding Source=schema, Path=Department.DisplayName}" my:Description="" my:RightsLevel="{Binding Source=rights, Path=Department}">
    <my:Properties>
    <my:Property my:Name="Required" my:Value="True"/>
    <my:Property my:Name="Text" my:Value="{Binding Source=object, Path=Department, Mode=TwoWay}"/>
    </my:Properties>
    </my:Control>
    <my:Control my:Name="Divisions" my:TypeName="UocDropDownList" my:Caption="{Binding Source=schema, Path=Divisions.DisplayName}" my:Description="{Binding Source=schema, Path=Divisions.Description}">
    <my:Options>
    <my:Option my:Value="" my:Caption="" my:Hint="Please Select a Division"/>
    <my:Option my:Value="Division of Academic Affairs" my:Caption="Division of Academic Affairs"/>
    <my:Option my:Value="Division of Administration" my:Caption="Division of Administration"/>
    <my:Option my:Value="Division of Adult &amp; Continuing Education" my:Caption="Division of Adult &amp; Continuing Education"/>
    <my:Option my:Value="Division of Information Technology" my:Caption="Division of Information Technology"/>
    <my:Option my:Value="Division of Institutional Advancement" my:Caption="Division of Institutional Advancement"/>
    <my:Option my:Value="Division of President's Office" my:Caption="Division of President's Office"/>
    <my:Option my:Value="Division of Student Affairs" my:Caption="Division of Student Affairs"/>
    </my:Options>
    <my:Properties>
    <my:Property my:Name="Required" my:Value="{Binding Source=schema, Path=Divisions.Required}"/>
    <my:Property my:Name="ValuePath" my:Value="Value"/>
    <my:Property my:Name="CaptionPath" my:Value="Caption"/>
    <my:Property my:Name="HintPath" my:Value="Hint"/>
    <my:Property my:Name="ItemSource" my:Value="Custom"/>
    <my:Property my:Name="SelectedValue" my:Value="{Binding Source=object, Path=Divisions, Mode=TwoWay}"/>
    </my:Properties>
    </my:Control>
    </my:Grouping>
    <my:Grouping my:Name="summary" my:Caption="Summary" my:IsSummary="true">
    <my:Control my:Name="summaryControl" my:TypeName="UocHtmlSummary" my:ExpandArea="true">
    <my:Properties>
    <my:Property my:Name="ModificationsXml" my:Value="{Binding Source=delta, Path=DeltaXml}"/>
    <my:Property my:Name="TransformXsl" my:Value="{Binding Source=summaryTransformXsl, Path=/}"/>
    <my:Property my:Name="Hint" my:Value="{Binding Source=schema, Path=%AttributeName%.Hint}"/>
    </my:Properties>
    </my:Control>
    </my:Grouping>
    </my:Panel>
    </my:ObjectControlConfiguration>
    Any advice is appreciated.

    I don't know RCDCs well enough to debug it from the xml. One approach when I don't know something too well is to brute it. Copy one of the default RCDCs and make sure it's working then add the required attributes one by one checking that it works each
    time. Once it's working with the added attributes remove all the ones you don't need. If that breaks it, go back to where it was working and remove them one by one.

  • Using Multiple Object Types in a FIM Managed Criteria Distribution Group

    Is it possible to use multiple object types in a criteria based distribution group. So when building your criteria filter, "Select (object type) that match (all/any) of the following condiftions". Currently you can only choose 1 object type and
    I want to be able to choose object type "user" and a custom object type I create for my contacts 

    You can create main condition as "any" and later add two sub-conditions - one that object in set "All People" and other sub-condition that object in set "All Contacts" or "All Groups".
    If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer.

  • Problem With Cutom Configuration with Object Type

    Dear Guru's
    I am working WebUI, I am facing a problem with Custom Configuration.
    1. The initial requirement to control the visibility for a dropdown event in ERP Quotation.
    2. To this i copied the default configuration to custom configuration with custom Object type and Subtype.
           CONFIG KEY: ZPJQTN
           OBJECT TYPE: ZOTYP_CONFIG
           OBJECT SUB TYPE:  ZSTYPE_CONFIG1
    3. I have created customm fields in enhancement.
    4. Now i chosen my new configuration (ZPJQTN,ZOTYP_CONFIG,ZSTYP_CONFIG1), when i click Show available fields, the custom fields are not showing. Instead the created fields are available at other configuration.
    5. I am able to control the visibility for the standard available fields.But i am not getting the custom created fields
    (Note:  I have created the Object type and Object sub type as follows: SPRO->CRM->UI Framework->Define Object Types
    Object type: ZOTYP_CONFIG Callback class: ZCL_CONFIG_CALLBACK
    Redifned the method: IF_BSP_DLC_OBJ_TYPE_CALLBACK~GET_OBJECT_SUB_TYPES
    Coded as below:
      data: lv_subtype type bsp_dlc_object_sub_type.
      lv_subtype = 'ZSTYP_CONFIG1'.
      append lv_subtype to result.
      lv_subtype = 'ZSTYP_CONFIG2'.
      APPEND lv_subtype to result.
    Now Please suggest me how to achieve this.
    Also please let me know, whether i am following the correct procedure for controlling the visibility.
    Thanks in Advance,
    S.Meganadhan.

    Hi Harshit,
    I added custom fields using AET only.
    I am able to see the field got added in the structure. I am able to access GET and SET methods of the field.
    But the problem is, it is not getting saved. Am i missed any configuration step?
    Please suggest me.
    Thanks in advance,
    Regards,
    S.Meganadhan.

  • Oracle Object Type Constructor Called Multiple Times

    I have an object type with a custom constructor. In SQL, when I reference the attributes the constructor is called multiple times in Oracle 11.2.0.4.
    Why is the constructor called multiple times?
    How do I stop it?
    My current work around is to reference the attributes and use the /*+ materialize */ hint.
    Problem Setup
        create or replace type Foo as object
          Bar1 NUMBER,
          Bar2 NUMBER,
          Bar3 NUMBER,
          CONSTRUCTOR FUNCTION Foo(p_Bar1 NUMBER, p_Bar2 NUMBER, p_Bar3 NUMBER)
            RETURN SELF AS RESULT
            DETERMINISTIC
        create or replace type body Foo is
          -- Member procedures and functions
          CONSTRUCTOR FUNCTION Foo(p_Bar1 NUMBER, p_Bar2 NUMBER, p_Bar3 NUMBER)
            RETURN SELF AS RESULT
            DETERMINISTIC
          AS
          BEGIN
            SELF.Bar1 := p_Bar1;
            SELF.Bar2 := p_Bar2;
            SELF.Bar3 := p_Bar3;
            dbms_output.put_line('Foo Constructor Called');
            RETURN;
          END;
        end;
    Problem
        -- Constructor is called 6 times!
        -- Once for each column and once for each predicate in the where clause.
        SELECT x.f.bar1 AS bar1, x.f.bar2 AS bar2, x.f.bar3 AS bar3, f
        FROM (
          SELECT foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3) f
          FROM dual d
        ) x
        WHERE x.f.bar1 = x.f.bar1 AND x.f.bar2 = x.f.bar2
    Output
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Workaround
        -- Work Around
        -- Constructor is called 3 times
        -- Once for each column in the inline view.
        -- Note, I removed column f (the object type) because it's not compatible with the materialize hint.
        WITH y AS (
          SELECT /*+ materialize */ x.f.bar1 AS bar1, x.f.bar2 AS bar2, x.f.bar3 AS bar3
          FROM (
            SELECT foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3) f
            FROM dual d
          ) x
        SELECT y.bar1, y.bar2, y.bar3
        FROM y
        WHERE y.bar1 = y.bar1 AND y.bar2 = y.bar2

    Another work-around is described in this thread... Accessing fields of a custom object type... which makes use of a collection type combined with the TABLE operator, like so...
    create or replace type FooTable as table of Foo;
    SELECT x.bar1 AS bar1, x.bar2 AS bar2, x.bar3 AS bar3, value(x) f
        FROM table(FooTable(
          foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3)
        )) x
        WHERE x.bar1 = x.bar1 AND x.bar2 = x.bar2
    BAR1 BAR2 BAR2 F
    1    2    3    (1, 2, 3)
    Foo Constructor Called
    Hope that helps...
    Gerard

  • Object type  not visible in transaction bapi

    hi all.
    I'm very new to Bapi,and recently I created a custom object type 'ZTEST' which was inherit from oject 'BUS1001'(material),then I add some custom method(BAPI) to 'ZTEST'.After I released all the object type 'ZTEST', I go to BAPI Explorer(t-code : BAPI), there I found my object 'ZTEST' exist in Alphabetical list but not in hierarchical list.
    How can I add my object type to the hierarchical list?
    thanks in advance

    Hi Bhokal,
              I suggest you put the question under ABAP General or similar category as this is not directly related to CRM 7.0 - in order to get faster response to the question.
      I hope it helps.
    Thanks,
    Rohit

Maybe you are looking for

  • Reader & PDF's in Safari

    On a Mac suddenly Reader 10.14 won't display PDFs in Safari & Firefox. In both I get a black page instead of a pdf. Even when I attempt to view this question I get a black screen.

  • Powercord not working. is this covered in the warranty??

    just a few minutes ago the light on my power cord stopped lighting up. if i wiggle the cord around in one place the light goes on for a second. so in other words, i need a new one. is this covered in the warranty that comes with the mac when i bought

  • Home-Sharing using BT HomeHub

    I am really struggling to establish a Home-share connection between two MacBook's. I can't connect to my Apple TV either. I'v tried all the online trouble shooting guides from Apple, but nothing works. When I open a home-share and click 'done' the ic

  • How can I convert to excel?

    How can I convert to excel?

  • How many Airport Extreme's and Airport Express can extend line for distance

    I am trying to link multiple AEBS/AE's together to cover a fairly long distance between two houses....Is this possible? I already have the 2 AEBS's linked together between two houses going across a street. However, the link is not that strong and I a