How to create a package with procedures?

By referring through net I have written the following PCK file. I have installed my Oracle 11g database in VirtualBox(Win XP). I can able to select the tables using query from the host(Windows 7)
CREATE OR REPLACE PACKAGE APEX_SYS_PCK
  AS
    TYPE refcursortype IS REF cursor
PROCEDURE GET_USER_DETAILS(
  D1 OUT refcursortype,
  P_USER IN VARCHAR2,
  P_PASS IN VARCHAR2);
END APEX_SYS_PCK;
CREATE OR REPLACE PACKAGE BODY APEX_SYS_PCK
AS
PROCEDURE GET_USER_DETAILS(
  D1 OUT refcursortype,
  P_USER IN VARCHAR2,
  P_PASS IN VARCHAR2)
IS BEGIN
  OPEN D1 FOR SELECT * FROM APEX.PERSONS;
END GET_USER_DETAILS;
END APEX_SYS_PCK;
When I try to run the script I am getting the following error. How to solve this problem? If there is any error in this package please do correct it!!!
Project: sqldev.temp:/IdeConnections%23vAPEX.jpr
F:\PACKAGES\APEX_SYS_PCK.sql
Error: PL/SQL: Compilation unit analysis terminated
Error(1,14): PLS-00905: object APEX.APEX_SYS_PCK is invalid
Error(1,14): PLS-00304: cannot compile body of 'APEX_SYS_PCK' without its specification

STATUS in USER_OBJECTS
"OBJECT_NAME"
"SUBOBJECT_NAME"
"OBJECT_ID"
"DATA_OBJECT_ID"
"OBJECT_TYPE"
"CREATED"
"LAST_DDL_TIME"
"TIMESTAMP"
"STATUS"
"TEMPORARY"
"GENERATED"
"SECONDARY"
"NAMESPACE"
"EDITION_NAME"
"CUSTOMERS"
70645
70645
"TABLE"
03-AUG-13
03-AUG-13
"2013-08-03:17:59:09"
"VALID"
"N"
"N"
"N"
1
"CUSTOMERS_PK"
70646
70646
"INDEX"
03-AUG-13
03-AUG-13
"2013-08-03:17:59:09"
"VALID"
"N"
"N"
"N"
4
"DEPARTMENTS_PK"
70656
70656
"INDEX"
03-AUG-13
03-AUG-13
"2013-08-03:18:32:32"
"VALID"
"N"
"N"
"N"
4
"EMPLOYEES"
70657
70657
"TABLE"
03-AUG-13
03-AUG-13
"2013-08-03:18:32:57"
"VALID"
"N"
"N"
"N"
1
"DEPARTMENTS"
70655
70655
"TABLE"
03-AUG-13
03-AUG-13
"2013-08-03:18:32:32"
"VALID"
"N"
"N"
"N"
1
"EMPLOYEES_PK"
70658
70658
"INDEX"
03-AUG-13
03-AUG-13
"2013-08-03:18:32:57"
"VALID"
"N"
"N"
"N"
4
"SUPPLIERS"
70659
70659
"TABLE"
03-AUG-13
03-AUG-13
"2013-08-03:20:25:41"
"VALID"
"N"
"N"
"N"
1
"SUPPLIERS_PK"
70660
70660
"INDEX"
03-AUG-13
03-AUG-13
"2013-08-03:20:25:41"
"VALID"
"N"
"N"
"N"
4
"PRODUCTS"
70661
70661
"TABLE"
03-AUG-13
03-AUG-13
"2013-08-03:20:28:32"
"VALID"
"N"
"N"
"N"
1
"PRODUCTS_PK"
70662
70662
"INDEX"
03-AUG-13
03-AUG-13
"2013-08-03:20:28:32"
"VALID"
"N"
"N"
"N"
4
"PERSONS_PK"
70687
70687
"INDEX"
10-AUG-13
10-AUG-13
"2013-08-10:22:37:34"
"VALID"
"N"
"N"
"N"
4
"PERSONS"
70686
70686
"TABLE"
10-AUG-13
10-AUG-13
"2013-08-10:22:37:34"
"VALID"
"N"
"N"
"N"
1
"APEX_SYS_PCK"
70776
0
"PACKAGE"
13-AUG-13
15-AUG-13
"2013-08-15:19:56:47"
"INVALID"
"N"
"N"
"N"
1
"GET_LOGIN_CREDENTIALS"
70775
0
"PROCEDURE"
13-AUG-13
13-AUG-13
"2013-08-13:22:26:49"
"INVALID"
"N"
"N"
"N"
1
"APEX_SYS_PCK"
70792
0
"PACKAGE BODY"
15-AUG-13
15-AUG-13
"2013-08-15:19:56:47"
"INVALID"
"N"
"N"
"N"
2
"EMP_MAINT"
70802
0
"PACKAGE"
15-AUG-13
15-AUG-13
"2013-08-15:19:54:39"
"INVALID"
"N"
"N"
"N"
1

Similar Messages

  • How to create a table with events in smartforms?

    How to create a table with events view in smartforms?
    It doesn't like general table with header, main area and footer.
    for example:
    in smartforms: LE_SHP_DELNOTE
    table name is TABLEITEM(Delivery items table)

    Vel wrote:
    I am creating XML file using DBMS_XMLGEN package. This XML file will contain data from two different database tables. So I am creating temporary table in the PL/SQL procedure to have the data from these different tables in a single temporary table.
    Please find the below Dynamic SQL statements that i'm using for create the temp table and inserting the data into it.
    Before insert the V_NAME filed, i will be appending a VARCHAR field to the original data.
    EXECUTE IMMEDIATE 'CREATE TABLE TEMP_TABLE (UNIQUE_KEY NUMBER , FILE_NAME VARCHAR2(1000), LAST_DATE DATE)';
    EXECUTE IMMEDIATE 'INSERT INTO TEMP_TABLE values (SEQUENCE.nextval,:1,:2)' USING V_NAME,vLastDate;What exactly i need is to eliminate the INSERT portion of it,Since i have to insert more 90,000 rows into it. Is there way to have the temp table created with data in it along with the sequence value as well.
    I'm using Oracle 10.2.0.4 version.
    Edited by: 903948 on Dec 22, 2011 10:58 PMWhat you need to do to eliminate the INSERT statement is to -- as already suggested by others - eliminate the temporary table. You don't need it. It is just necessary overhead. Please explain why you (apparently) believe that the suggestion of a view will not meet your requirements.

  • I need your expert opinion on how to create a map with multiple conditions.

    Hello.
    I need your expert opinion on how to create a map with multiple conditions.
    I have a procedure (which i cannot import or re-create in OWB due to the bug), so i am trying to create a map instead :-(
    How can i create a cursors within the map?
    My function creates table and cursor.
    Then it will have to check for duplicates in the tables (the one created and another table) - the criteria for finding duplicates is a number of fields.I then need to place few different conditions (if some attributes are not available) and it has to load cursor based on this conditions. The next step is to fetch the data into the cursor based on what attributes are missing.
    The next thing it will do is insert the data into table (if record doesn't exist), output the error in separate table is record is corrupted, or update the record with changed information.
    In short i need to re-create match / merge but with conditions, iterations etc 'built into' it.
    I can read up on available functions - it's just what would be the best options? and what would be the best approach to do so?
    In my function i use %rowtype - but cannot use it in owb - so what would be the alternative? i don't really want to create a lot of variables and then have a nightmare of maintaing it. are there any tips regarding this?
    having looked through Oracle dedupe - it's not really what i need because it is just DISTINCT.
    I would appreciate any help / advise on this.
    Thank you very much

    thanks a lot for your reply - i will look into this option :-)
    it is a bit more complicated now as i have to re-create the match / merge and then somehow 'tweak' it to achieve the result i need.
    At the moment i am looking to breakdown the package into smaller chunks 'functions' and try creating the map that way.
    Anyway, thank you very much for your suggestion.

  • How to create a function with ref_cursor as parameter in OWB 10.1

    Hi,
    Can any one help me how to create a function with ref_cursor as parameter in OWB 10.1.?
    Its urgent. Please help me.
    Thanks,
    Siv

    Hi David,
    Thanks for your reply.
    Before going for this function, I need to create a package in transformation node in owb module.
    My package is as follows,
    Create or replace package 123
    type xxx is RECORD ( parameters);
    type yyy is RECORD (parameters);
    type aaa is table of yyy;
    type bbb is REF CURSOR return xxx;
    type ccc is record (parameters);
    type ddd is ref cursor return eee;
    END;
    How can I create the above kind of package manually in OWB 10.1 (Should not to import the package)
    Please help me its urgent.
    Thanks,
    Siv

  • How to create a package and add a file?

    Hi all,
    I am new to Java and very much much confussed with how to create a package and then include some files any help will be very thankfull.
    Thanks for your help
    kka.

    Steps for creating a package in java are as follows:
    Choose a base directory for your classes. For example, you might choose c:\java\packages. Type the following command:
    set CLASSPATH=%CLASSPATH%;c:\java\packages
    Create subdirectories for each chapter or section, if you don't already have them.
    For each of the classes in the subdirectories, add the following line to the very top of each file:
    package directory-name;
    where directory-name is the name of the subdirectory the class file is located in.
    In other directories you may have class files that need to access one of the classes in another directory (package). To do this, write one of the following at the top of the class that needs the other class:
    import subdir.*;
    or
    import subdir.classname;
    Use the class by name in the new class file.
    Note that you can create sub-packages by creating subdirectories of the original subdirectories, and inserting package statements at the top of the java files in those directories.
    Hope this helps!

  • How to call a package with ADO?

    I have designed a package which include a procedure. And I have a program coded in ASP.
    How to call this package with ADO. Please give a sample.

    Hi,
    I persume that you are facing this problem when u try to code in VB. If that is the case here comes the code.........
    OraDatabase.Parameters.Add "A_NBR_NEWSID", A_NBR_NEWSID, ORAPARM_INPUT, 2
    OraDatabase.Parameters.Add "A_NBR_TOPICID", A_NBR_TOPICID, ORAPARM_INPUT, 2
    OraDatabase.Parameters.Add "A_NBR_USERID", A_NBR_USERID, ORAPARM_INPUT, 2
    OraDatabase.Parameters.Add "result", 0, ORAPARM_OUTPUT
    OraDatabase.Parameters("result").serverType = 2
    OraDatabase.ExecuteSQL ("declare result Number; Begin :result := PKG_CONTENT_MANAGEMENT.FUN_GET_NEWS_PERM_BY_USERID(:A_NBR_NEWSID, :A_NBR_TOPICID, :A_NBR_USERID); end;")
    OraDatabase.Parameters.Remove "A_NBR_NEWSID"
    OraDatabase.Parameters.Remove "A_NBR_TOPICID"
    OraDatabase.Parameters.Remove "A_NBR_USERID"
    FUN_GET_NEWS_PERM_BY_USERID = OraDatabase.Parameters("result").Value
    OraDatabase.Parameters.Remove "result"
    Hope this clear your doubt..
    Raj

  • How to create table view with reference table

    Hi experts,
    How to create table view with reference table in SE11, plz gve me stp by stp procedure.
    pints grnded for hlp.

    Hi
    Go to Tcode se11 choose view and enter the name and create a popup opens up choose database view option
    enter the description
    On the left hand side choose the table name.
    Click on view fields tab and choose your table fields.Here you can choose which fields you want in your view.
    Save and then activate.
    Hope this helps.
    Regards,
    Harish

  • How to create a node with attributes at runtime in webdynpro for ABAP?

    Hi Experts,
             How to create a node with attributes at runtime in webdynpro for ABAP? What classes or interfaces I should use? Please provide some sample code.
    I have checked IF_WD_CONTEXT_NODE_INFO and there is ADD_NEW_CHILD_NODE method. But this is not creating any node. I this this creates only a "node info" object.
    I even check IF_WD_CONTEXT_NODE but i could not find any method that creates a node with attribute.
    Please help!
    Thanks
    Gopal

    Hi
       I am getting the following error while creating a dynamic context node with 2 attributes. Please help me resolve this problem.
    Note
    The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
    The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
    My code is like the following:
    TYPES: BEGIN OF t_type,
                CARRID TYPE sflight-carrid,
                CONNID TYPE sflight-connid,
             END OF t_type.
      Data:  i_struc type table of t_type,
      dyn_node   type ref to if_wd_context_node,
      rootnode_info   type ref to if_wd_context_node_info,
      i_node_att type wdr_context_attr_info_map,
      wa_node_att type line of wdr_context_attr_info_map.
          wa_node_att-name = 'CARRID'.
          wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
          insert wa_node_att into table i_node_att.
          wa_node_att-name = 'CONNID'.
          wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
          insert wa_node_att into table i_node_att.
    clear i_struc. refresh i_struc.
      select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    rootnode_info = wd_context->get_node_info( ).
    rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
                                       attributes = i_node_att
                                       is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
    dyn_node->bind_table( i_struc ).
    l_ref_interfacecontroller->set_data( dyn_node ).
    I am trying to create a new node. That is
    CONTEXT
    - DYNFLIGHT
    CARRID
    CONNID
    As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
    Also I cannot define the structure in the ABAP dictionary because it changes based on condition
    Message was edited by: gopalkrishna baliga

  • How to create excise invoice with reference thorugh credit memo

    Hi All,
    Please provide any solution for the following qurey:
    How to create excise invoice with reference thorugh credit memo

    Hi murali,
    i am unable to understand your requirement i think there is no like this scenario requirement for any client
    if any requirement is there kindly explain detail
    cheers

  • How to create a complaint with pre-decessor document Inovice?

    Hello experts,
    I need create a complaint with reference to a pre-decessor document type Invoice (apart from other types such as sales order and service order). Can someone enlighten me
    1) how to create an invoice in IC Web Client and backend?
    2) how to create a complaint with reference to this created invoice in IC Web client and backend?
    Thanks a lot!!!

    Hi Easwar
    Thanks  a lot for answering the question.
    Yes I do have CRM Billing documents. But the problem is
    a) either the billing document doesn't have Transfer to Accounting status Transferred or
    b) a transferred billing document, but all items have error "Unable to offset billing item 90003458 0000000060" etc.
    Do you know
    1) how I can make a billing document have "Transferred" status? Pressing "Transfer to Accounting" button in the billing document overview page will only set the status to "Being transferred". And it's always being tranfered.
    2) What does the error "Unable to offset billing item ... "mean? How to get rid of them?
    Thanks a lot!

  • How to create shipment document with out inbound delivery document

    Dear Friends
    How to create shipment document with out outbound/inbound delivery document.
    In my client scenario, there is no inbound delivery for normal purchases.
    Just there are raising the PO to vendor, then they are doing MIGO for goods receipt.
    Can we do shipment creation with reference to PO?
    If it is possible, how it will be?
    Please let it solve
    With regards
    Lakshmikanth

    Dear Sameer,
    Please go to transaction VT01N here you enter Transportation planning point and shipment type then press enter.
    Now system will take you to the shipment document creation screen here you click on Select deliveries or press F6 now system will take you to the select outbound deliveries screen in this screen you enter selection data then execute, now deliveries will get assigned to that shipment.
    After assigning the deliveries enter the remaining data then complete the shipment finally save the shipment document.
    For more information please go through this SAP help link
    Note:- Shipment process need to be carry out for the deliveries before PGI.
    http://help.sap.com/saphelp_47x200/helpdata/en/f5/04898047bd11d2bf750000e8a7386f/frameset.htm
    I hope this will help you,
    Regards,
    Murali.

  • How to create a table with varied number of columns?

    I am trying to create a balance table. The colunms should include years between the start year and end year the user will input at run time. The rows will be the customers with outstanding balance in those years.
    If the user input years 2000 and 2002, the table should have columns 2000, 2001, 2002. But if the user input 2000 and 2001, the table will only have columns 2000 and 2001.
    Can I do it? How? Thanka a lot.

    Why did you create a new thread for this?
    How to create a table with varied number of columns?

  • How to create a table with datatype blob and insert a pdf file (ravi)

    how to create a table with datatype blob and insert a pdf file,
    give me the explain asap
    1.create the table?
    2.insert the pdffiles into tables?
    3.how to view the files?
    Thanks & Regards
    ravikumar.k
    Edited by: 895044 on Dec 5, 2011 2:55 AM

    895044 wrote:
    how to create a table with datatype blob and insert a pdf file,
    give me the explain asapPerhaps you should read...
    {message:id=9360002}
    especially point 2.
    We're not just sitting here waiting to answer your question as quickly as possible for you.

  • How to create a package in ECC 6.0.

    Hi,
    Can you tell me how to create a package in ECC 6.0 system?
    Thanks in advance,
    Regards,
    Arnab.

    Hi,
    Thank you for your replies.
    Can you tell me the difference and uses of the two types of package I can create from SE21.
    i.e. : Package and package interface. any sap link would also be helpful. I need to know where i can use what and what would be helpful for my case.
    Regards,
    Arnab.

  • How to Create Business Partner with  fix number in t-code :BP

    Dear SIr,
    Normally I will set number range for auto  to create Business Partner. In case , If we would like to crea How to Create Business Partner with  fix number in t-code :BP , howe to do?
    Please kindly advise.
    THnak you and best regards,
    Vimol

    Dear Shobhit,
    How to put the thread as you mentioned.
    Best regards,

Maybe you are looking for

  • HP Compaq dc7800 bios limit on hard drive size

    I have a dc7800 which has the latest bios update v1.32, and I have been using it with a 750gb boot drive and a 1.5tb second drive for some time. I recently bought a 3tb drive to replace the 1.5tb drive. When I connected it to the onboard SATA connect

  • Check if a component exists in document thanks to its ID

    Hi ! I m using a flex app which communicates with AS/400 server thanks to HTTP Service. I'm checking forms with an RPG program which sends me an xml result with the name of incorrect fields. I give you an exemple myResultXML:XML = result returned by

  • HT201407 i can't activate my iphone 3gs

    i cant activate my iphone 3gs .

  • Alert system for chain process

    Hello, I want to configure the alert system for when an error occurs in processing chains. I followed the steps in the forum THROUGH ALRTCATDEF transaction, but I can not do the following, which is what I really need; That the key responsibility for

  • Pr CC sequences not compatible with Encore CS6

    Dear Adobe, Could you please consider doing one of the following: 1. Make a CC version of Encore or 2. Release an update that will make Pr CC sequences compatible with Encore CS6 ... I really miss being able to drag Premiere Pro sequences directly in