Declare and initialize a varray of collection Object and pass it as OUT Par

Hi ,
How to declare and initialize a varray of collection Object and pass it as OUT Parameter to a procedure.
Following is the Object and VARRAY Type 's I have created and trying to pass the EmployeeList varray type variable as an OUT parameter to my stored procedure, but it is not working. I tried different possibilities of declaring and initializing the varray type variable but it did not work. Any help would be appreciated.
CREATE TYPE Employee IS Object
          employeeId     Number,
          employeeName VARCHAR2(31),
          employeeType     VARCHAR2(20),
CREATE TYPE EmployeeList IS VARRAY(100) OF Employee;
/* Procedure execution block */
declare
employees EmployeeList;
begin
EXECUTE displayEmployeeDetails(100, employees);
end;
Thanks in advance,
Raghu.

but it is not workingWhat's the definition of not working?
Error messages are always helpful.
SQL> CREATE OR REPLACE TYPE Employee IS Object
  2  (
  3  employeeId Number,
  4  employeeName VARCHAR2(31),
  5  employeeType VARCHAR2(30)
  6  );
  7  /
Type created.
SQL>
SQL> CREATE OR REPLACE TYPE EmployeeList IS VARRAY(100) OF Employee;
  2  /
Type created.
SQL> CREATE OR REPLACE PROCEDURE getEmployeeDetails (
  2    o_employees OUT employeelist
  3  )
  4  AS
  5  BEGIN
  6   o_employees := employeelist();
  7   o_employees.EXTEND;
  8   o_employees(1) := employee(1,'Penry','Mild Mannered Janitor');
  9  END;
10  /
Procedure created.
SQL> set serveroutput on
SQL> declare
  2   employees employeelist;
  3  begin
  4   getemployeedetails(employees);
  5   for i in 1 .. employees.count
  6   loop
  7    dbms_output.put_line(employees(i).employeeid||' '||
  8                         employees(i).employeename||' '||
  9                         employees(i).employeetype);
10   end loop;
11  end;
12  /
1 Penry Mild Mannered Janitor
PL/SQL procedure successfully completed.
SQL>

Similar Messages

  • How do I backup and recover all of user's objects and Application?

    I know that I can export the application ,CSS and images by HTMLDB.But there is not user's data. I can also export user's full schema by sqlplus. Can I recover all of user's objects like this:
    1,import the user's schema.
    2,create a new workspace and reuse the user'schema .
    3,import the application ,CSS,images.
    Then,Is all OK?
    Thank for any help and option.

    Lastgod,
    Yes, you can do what you described. You definitely must use Oracle export/import (or something) to backup and restore the data in the application schema. On the HTML DB side, depending on your purpose, you might find it simpler to export the workspace using the HTML DB site administration pages. Then you would import and install the workspace (using HTML DB admin pages), which will let you confirm the workspace schema, instead of your step 2. After that your step 3 can be performed. When you export a workspace you get the user accounts and group definitions also, so you don't have to recreate accounts when you import/install the workspace in the same or another HTML DB instance.
    Scott

  • What is matchcode objects and how can we create tthem

    hai to all.
         what is matchcode objects .
         and how can we create matchcode objects
         and how will it works

    Hi
    In which version of SAP are you working?
    Matchcodes are replaced by SEARCH HELPs in latest versions
    see the doc
    1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
    2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
    3)An elementary search help defines the standard flow of an input help.
    4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
    5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
    6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
    CREATION:
    Go to SE11 Tcode
    select search help
    give the 'z' search help name and create
    select the selection method ur table name eg : 'mara'
    dialog module 'display value immediately'.
    add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
    where left position when displaying and spos = search position
    and then save and activate ..
    See the links:
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
    https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485
    https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619
    pls go through this for search help creation
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    Search Help Exits:
    Re: dynamic values for search help
    Re: Dynamic search  help
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee52446011d189700000e8322d00/content.htm
    http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_exit.htm
    https://forums.sdn.sap.com/click.jspa?searchID=4390517&messageID=1712818
    Collective search help Combine several elementary search helps. A collective search help thus can offer several alternative search paths.
    A Collective search help provides alternative search
    Paths by combining elementary search helps.
    Only one search help can be attached to a field, table or data element. Several search paths are therefore attached with a collective search help.
    A collective search help also has interface parameters like
    an elementary search help.
    Like an elementary search help, a collective search help has an interface of IMPORT and EXPORT parameters with which the search help exchanges data. Using this interface, the collective search help can be attached to fields, tables and data elements exactly like an elementary search help.
    Parameter assignment needs to be done for each of the
    Included search helps.
    When you define a collective search help, there are no components for describing the dialog behavior and data selection; instead the included search helps are listed here. You must assign the parameters of the collective search help to the interface parameters of the included search help for each inclusion.
    User may choose the tab and thus the elementary
    search maethod.
    When we execute the search help SCUSTOM, we are confronted with a dialog which gives us an option of either restricting
    By 1)Search for customer according to booking
    2)Search for customer according to name.
    These are effectively the elementary search helps (SCUSTOM_BOOK and SCUSTOM_NAME) which have been included in the collective search help SCUSTOM.
    HOT KEY
    The hot key is used to select the elementary search help from the collective search help and to enter the restrictions in the dialog box for restricting values directly from the entry field. If the user often searches for values using the same search help, this procedure can save time.
    Steps to create a Collective Search Help
    1)Enter the search help name and click on create.
    2)Choose Collective search help radio button option as the search help type.
    3)Enter the search help parameters.
    4)Instead of the selection method, we enter the included
    search helps for the collective search help.
    5)We need to assign parameters for each of the included
    search helps.
    6)Complete the parameter assignment by clicking on the push button
    7)Collective search help offers the user to obtain F4 help
    using any of the included search helps.

  • Unable to map Collection Objects in BPM11g

    Hi,
    I am polling DB for triggering an instance in the process it is creating a Feildcollection object under
    Business Catalog -> types -> FeildCollection.
    when i am trying to map the object i need to map to another collection object itself.
    In the process I am not able to map the elements of it.
    Any help is greatly appreciated!!

    I think you have understood my question partially,
    When i go for transformation option, I am not given the option of other objects other than a collection again.
    Like for example In my project if I have three objects one made of DB adapter another of File adapter and the last one pointing to the .xsd(BasicObject) to which these two collections are pointing to.
    Script activity -> Implementation -> Use Transformation... Edit -> In the transformation output tab If i go for create option. In the Sources drop down I am given with only two options one with File Adapter collection object and another with DB adapter collection object. If i map it to a collection object again i will not be take out individual elements. According to me i need to map it to the root "Basic Object" only then i get the access to individual elements.
    My problem is even if i go for transformation option I am not able to map to individual elements from collection object.
    Regards

  • Doc plz on abap object and Module pool prog

    Hi all,
    Please any send the details and use full documents on ABAP objects and Module Programming.
    Its very orgent for me
    THanks and Regards
    vamsin
    [email protected]

    Hi ALL,
    Thank you for your replies, I guess I dint convey my question properly,
    I have called a Selection-Screen in Module Pool .
    These were the steps which i followed to archive this.
    1. Created a subscreen area in your screen layout (Main Screen- Module Pool).
    2.  In the Top Include of  Module pool program declared a Selection-Screen as a subscreen.
         TOP-INCLUDE.
    SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
        SELECTION-SCREEN BEGIN OF BLOCK d3 WITH FRAME TITLE text-003.
          PARAMETERS : grdate RADIOBUTTON GROUP r2  DEFAULT 'X' USER-COMMAND FR1.  " GRN date
          PARAMETERS : crdate RADIOBUTTON GROUP r2 .       " Current Date
        SELECTION-SCREEN END OF BLOCK d3.
       SELECTION-SCREEN END OF SCREEN 400.
    3.  In the PBO and PAI of the Main Screen called Subscreen.
          PBO
    CALL SUBSCREEN SUB_SCREEN_STAPLES INCLUDING 'zprogram' '0400'.
         PAI
    CALL SUBSCREEN SUB_SCREEN_STAPLES..
    I have to do certain operations when the user selects the radio button on subscreen (which is actually a Selection-Screen).
    I have tried to assign the function code  to radio button and as this screen is a Selection-Screen I cannot use PAI and PBO.
    Used the below code in TOP-INCLUDE.
    TOP-Include
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP r2.
      CASE ok_rb.
        WHEN 'FR1' .
          IF crdate = 'X'.
            pdate = sy-datum.
          ELSE.
            pdate = sy-datum + 1.
          ENDIF.
      ENDCASE.
    But after executing this logic the flow is going to PAI which is validating the mandatory fields of Module-Pool Screen (which is not part of sub screen), hence not solving my purpose.
    Is there any way by which I can Only trigger the AT-Selection screen for the selection screen.
    or Any other approach which will solve my purpose.
    Thanks a lot for Suggestions and Inputs.

  • Collecting objects

    Hi.
    What may be reason that emulated datasources ( hierarchy datasources ) and relevant objects  are not collected in RSOR transaction?
    For example, there is infoobject A which has master data, texts  and hierarhies.
    When I collect objects for it using grouping mode in data flow before,
    datasources, transformations, DTPs and other objects relevant for master data and texts are collected
    but nothing for hierarhies.

    Hierarchies are not suppported in a 7.0 dataflow - if you migrated the datasources to their 7.0 version - you would have to migrate them back to 3.x if the master data datasources have hierarchies since hierarchies can be loaded only using the 3.x flow and a 7.0 version for the same does not exist as of now...

  • Regarding mandatory fields, Context Objects and Fault Message Types

    Hi All,
    1) I am creating a structure with fields "Name", "Street" and "City". While creation i want to make "Name" fields as mandatory. Is it possible. If so how to achieve this.
    2) What is the purpose of Context Object and in which situation we will use this.
    3) What is the purpose of Fault Message Types and in which situation we will use this.
    4) I am doing file to file scenario, at sender side i have set the adapter as file and transport protocol as "FTP" . It is asking for "Server", "PORT" and "Login Details". What is this FTP, for this do i need to take any login details. I am totally not aware of FTP, could please explain more about this.
    Kindly look into the above points and respond point by point.
    Thanks in advance.
    Regards,
    Prem.S

    Hi prem,
    <b>1) I am creating a structure with fields "Name", "Street" and "City". While creation i want to make "Name" fields as mandatory. Is it possible. If so how to achieve this.</b>
    give occurence 1..unbounded. for the field name.
    <b>2) What is the purpose of Context Object and in which situation we will use this.</b>
    If u have multiple receiver system then to determine the reciever u can use context object.....
    the alternative of context objetc is X-Path...
    Check out these
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/content.htm
    /people/prasadbabu.nemalikanti3/blog/2006/09/20/receiver-determination-based-on-the-payload-of-input-dataextended-xpathcontext-object
    Here is a scenario where context objects were used for BPM
    Technical Context Object in ccBPM
    Get the details here:
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/frameset.htm
    Technical Context Objects :
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/frameset.htm
    A list of the Technical Context Objects names can be found here:
    http://help.sap.com/saphelp_nw04/helpdata/en/6e/ff0bf75772457b863ef5d99bc92404/content.htm
    Difference between context object and x-path:
    diff between context object and x path
    <b>3) What is the purpose of Fault Message Types and in which situation we will use this</b>
    whenever u want to catch some exception u can use fault message types.Just for a example u r sending some data to SAP system.But due to some reason the R/3 system is down.so in this case if u have implemented fault message ..u can get a error message specifying r/3 is down....
    Fault message implementation.
    /people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1
    How to Guide
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40574601-ec97-2910-3cba-a0fdc10f4dce
    <b>4) I am doing file to file scenario, at sender side i have set the adapter as file and transport protocol as "FTP" . It is asking for "Server", "PORT" and "Login Details". What is this FTP, for this do i need to take any login details. I am totally not aware of FTP, could please explain more about this.</b>
    there are two transport protocol for File adapter
    1)FTP(File transfer protocol)
    to know abt FTP check here
    http://help.sap.com/saphelp_nw04/helpdata/en/43/0e16bfd7b021aee10000000a1553f6/content.htm
    2)NFS(Network File System)
    in server :Enter the host name or IP address of the FTP server.
    in PORT:Specify the port number of the FTP server.
                 The default is the standard port for the FTP server (21)
    check here
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Regards
    BILL
    <b>***reward with points if ity helps u!!</b>

  • How to create a user using XML and specifying addional attributes that are objects

    I'm trying to create a user using XML and specifying some attributes that are objects and not sure how to do it. How would I set the DirectoryUserAcl to Public?
    Here's the xml file:
    <?xml version = '1.0' standalone = 'yes'?>
    <SimpleUser>
    <UserName>mike2</UserName>
    <Password>abc123</Password>
    <AdminEnabled>false</AdminEnabled>
    <HomeFolderRoot>/home</HomeFolderRoot>
    <HasContentQuota>false</HasContentQuota>
    <DirectoryUserAcl> ??? </DirectoryUserAcl>
    <DefaultAclBundleAcl> ??? </DefaultAclBundleAcl>
    <HomeFolderPolicyBundleAcl> ??? </HomeFolderPolicyBundleAcl>
    </SimpleUser>

    I figured out the answer:
    <?xml version = '1.0' standalone = 'yes'?>
    <SimpleUser>
    <UserName>mike2</UserName>
    <Password>abc123</Password>
    <AdminEnabled>false</AdminEnabled>
    <HomeFolderRoot>/home</HomeFolderRoot>
    <HasContentQuota>false</HasContentQuota>
    <DirectoryUserAcl classname="SystemAccessControlList" refType="name">Public</DirectoryUserAcl>
    </SimpleUser>
    null

  • Can we add an info object and its nav. attr in an aggregate together?

    Hello
    I am getting an error when I try to add 0MATERIAL and 0MATERIAL_OPROD_HIER in an aggregate at the same time. In the cube, both 0MATERIAL and its attr 0MATERIAL_0PROD_HIER sit in the same dimension. Therefore, when I try to create an aggregate and drag these chars in, they try to come into the same dimension here also.
    1st scenario:
    1. I  add 0MATERIAL in the aggregate.
    2. I try to add 0MATERIAL_0PROD_HIER in the aggreate, I get an error message ' Aggregation levels cannot be defined for 0MATERIAL_0PROD_HIER.
    3. And it does not let me add this nav attr at all.
    2nd scenario:
    1. I first add 0MATERIAL_0PROD_HIER in the aggregate.
    2. I try to add 0MATERIAL now.. I get the same error as above for 0MATERIAL this time.
    3. But it lets me add 0MATERIAL inside.
    4. Now, when I go its context menu (right click) and select aggregation as 'All Char Values' for 0MATERIAL, then the error goes away.
    5. But after I activate and fill the aggregate, I have a look it again.. and now I only see 0MATERIAL and its nav attr which I added first has disappeared.
    Why do the above 2 happen? And if I have an info object and its nav attr in ROWS in a query, and if I am not able to add both of them to the aggregate.. how can I improve the performance of the query?
    Please advise.

    Hi Srinivas
    In your scenario, it is sufficient if you just add 0Material when you are creating the aggregate. Need not add the nvaigational attribute in the aggregate definition. The procedure you followed the first time is right i.e. Drag and drop 0material first.
    The system does not allow you to add the nav attribute because it is not required. I say this because a navigational attribute added to your infoprovider is like (in terms of SQL) joining your infoprovider with your material master table. Navigational attribute's value is not physically stored in your cube. It is brought in during execution time in both list cube as well as in your query output.
    Similarly when you execute your query with 0material as your aggregate, even if you add a filter or variable restriction on 0Material_prodHier your query WILL use the aggregate since 0material is referenced.
    You can even check this in RSRT. Give your query name, and generate report first. Then click on Execute + Debug, Choose Display SQL/BIA Query and enter your selection and choose enter. You will see the SQL of your query and in the SQL select statement you will see that your aggregate table is chosen instead of your infocube. This aggregate table only will be read during your query execution in Bex as well.
    I hope this helps.
    Thanks.

  • Oracle OBJECTs and BC4J Domains

    In his HOW TO: on multiple data formats Steve Muench said that it was possible to use BC4J domains to implement "Oracle structs" (sic).
    I have a object with three attributes that I would like to show and validate in a JSP. Can anybody point me at documentation that tells me how to do this?
    Thanks, APC
    null

    Just use the Domain wizard to create a domain for your Oracle8i user-defined object type, and then you can create entity objects and/or view objects with your new domain type as the attribute.
    The domain will have getter and setter methods to get/set the object type's values.

  • Current objectives and next yearu2019s objectives in one appraisal document

    I keep coming across the requirement for an employee to be able to record comments and scores for his/her current objectives and at the same time to document his/her objectives for the next year in the same appraisal document. The SAP standard process being to record last yearu2019s objectives and next years objectives in two separate documents.
    Has anyone else come across this requirement and if so how did you meet it?
    Is there a BAdI which will pull the u2018Performance Objectives for the next 12 monthsu2019 from the 2010 appraisal document into the 2011 appraisal document?
    Any suggestions would be much appreciated.

    Hi,
    Please check the following discussion:
    Re: Performance Appraisal-Copy the "Completed" Appraisal for next year
    Credits: SDN members
    Hope this helps.
    Donnie

  • Inactive Objects and Open Repairs found

    Hi All,
    I am applying Support Packs to my Solution Manager 7.1 system. I am in the Preprocessing step (SUM) and it has halted with: Inactive Objects and Open Repairs found.
    There is a transport that needs to be released, but when I try to release it, it states:
    Object INTF IWCI_POWL_TABLE_COMP is inactive
    Object INTF IWCI_WDC_MAI_REP_DATA_PROVIDER is inactive
    When I go to SE80, the objects have a status of:
    Implemented / Inactive
    When I activate them, I get a successful activation message, but they don't activate.
    Not sure what to do. Any input would be appreciated.
    Thanks,
    Diana

    Hi RB,
    Yes, I've done the steps in note 1882203. It says it activated, but it doesn't. Here is the log from SUM:
    4 ETG039 -------------------------------------------------------------------------
    4 ETG036 Module name....: "INACTIVE_SAP_OBJECT_CHECK"
    4 ETG041 End time ......: "20.09.2014" "15:13:58"
    4 ETG039 -------------------------------------------------------------------------
    4 EPU202X====MARK ANALYZED SECTION==== END OF REPACHK_CLONE =========== BEGIN OF REPACHK_CLONE =============
    4 ETG039 -------------------------------------------------------------------------
    4 ETG036 Module name....: "INACTIVE_SAP_OBJECT_CHECK"
    4 ETG040 Start time.....: "21.09.2014" "07:37:24"
    4 ETG039 -------------------------------------------------------------------------
    4 ETG010 "2 inactive objects found" " " " " " "
    4 ETG010 "2 inactive SAP objects" "colliding with import queue found." " " " "
    4 ETG010 "Please contact the development team" "to either activate or discard the inactive object." " " " "
    2EETG010 "The following objects are inactive" "in the system:" " " " "
    2EETG010 "R3TR" "INTF" "IWCI_POWL_TABLE_COMP" " "
    2EETG010 "R3TR" "INTF" "IWCI_WDC_MAI_REP_DATA_PROVIDER" " "
    4 ETG039 -------------------------------------------------------------------------
    4 ETG036 Module name....: "INACTIVE_SAP_OBJECT_CHECK"
    4 ETG041 End time ......: "21.09.2014" "07:37:44"
    4 ETG039 -------------------------------------------------------------------------
    4 EPU202XEND OF SECTION BEING ANALYZED END OF REPACHK_CLONE ================================================

  • Which ids and passwords does HP Connected collect?

    HP Connected terms and conditions indicates they will collect ids and passwords from the attached computers.  Which ones are they talking about?  All of them?!!!

    Hi skyscooter,
    Welcome back to the HP Support forums.  I understand that you have been upgraded to HP Connected from HP's ePrintCenter. 
    I've included the What is HP Connected? document for your reference.  I've also included the Migrating from HP ePrintCenter to HP Connected FAQs document.  When your ePrintCenter was upgraded your printer should have migrated over.  You need to click on the 'Devices' tab in your HP Connected account and you should see your printer listed. I’ve also included the Learn About Devices in HP Connected which shows you which settings are available.
    You should still be able to see your eFax settings from the front panel of the printer.  I've included the Getting Started with eFax document for your reference.
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • Declaring and using a "collections" object?

    Hi,
    -I want to declare a Collections object like so...
    ArrayList arr = new ArrayList;
    Collections colls = new Collections;
    -so i can use the shuffle() command on an ArrayList
    e.g. colls.shuffle(arr);
    -The problem is i get a compiler error like this:
    "Collections() has private access in Java.utils.Collections"
    -How do i get around this???

    So all i have to do is:
    Collections colls;
    ArrayList arr = new ArrayList;
    colls.shuffle(arr);
    Is this correct?
    Thanks,
    PJ

  • The method creates a new object and initializes it...

    Hello there,
    I just started learn the Java, and can't understand the method declaration in "Parameter Types" example at "[Passing Information to a Method or a Constructor|http://download.oracle.com/javase/tutorial/java/javaOO/arguments.html] " tutorial section.
    public Polygon polygonFrom(Point[] corners) {
    // method body goes here
    Can you explain me please the example above, what does "Polygon polygonFrom" means?
    And can it be " the method creates a new Polygon object and initializes it", isn't it Constructor's and the new operator job?
    Thanks a lot!

    869857 wrote:
    public Polygon polygonFrom(Point[] corners) {
    // method body goes here
    }Can you explain me please the example above, what does "Polygon polygonFrom" means?
    Polygon is the return type of the method polygonForm
    And can it be " the method creates a new Polygon object and initializes it", isn't it Constructor's and the new operator job?We can't say that it is a constructor and new operator job. Because, As the return type is Polygon, the method should return an object of Polygon or null. For that purpose only the method needs to create a new Polygon object and initialize with some values.

Maybe you are looking for