Doubt in procedure

i created a procedure but i am getting an error while i am executing it..
wrong number or types of arguments in call to 'new_book'
pl/sql statement ignored this is what it is displaying while i am executing the procedure..
plz help regarding this..
thanks in advance..

SQL> create or replace procedure new_book(atitle in
varchar2,
2 apublisher in varchar2, acategoryname in
varchar2)
3 as
4 begin
5 insert into
bookshelf(title,publisher,categoryname,rating)
6 values(atitle,apublisher,acategoryname,null);
7 delete from book_order
8 where title=atitle;
9 end;
10 /
begin
2 new_book;
3 end;
4 /
w_book;
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00306: wrong number or types of arguments in call
to 'NEW_BOOK'
ORA-06550: line 2, column 1:
PL/SQL: Statement ignoredYou must send 3 actual parameters to your procedure:
atitle, apublisher and acategoryname
Something like this
begin
  new_book ('World According to Garp', 'Irving', 'Fiction');
  end;Regards
Dmytro

Similar Messages

  • General doubt  in procedure

    Good Morning all;
    i am learning procedures  from  PL/SQL.
    i don't understand what i red marked following below.
    >>  This code collected  from web >>
    CREATE OR REPLACE PROCEDURE employer_details
    IS
    CURSOR emp_cur IS
    SELECT first_name, last_name, salary FROM emp_tbl;
    emp_rec  emp_cur%rowtype;
    BEGIN
    FOR emp_rec  in  sales_cur
    LOOP
    dbms_output.put_line(emp_cur.first_name || ' ' ||emp_cur.last_name || ' ' ||emp_cur.salary);
    END LOOP;
    END;
    REF_LINK : http://plsql-tutorial.com/plsql-procedures.htm
    My questions  are :
    sales_cur   indicates  what  ?
    when using for loop  can we use variable_name to start loop ?
    I want to say i am trying to execute  above code for my personal database  according to my emp table.
    if i dont under above doubt i cannot finish my self - practice.
    SQL> desc emp;
    Name                                      Null?    Type
    EID                                                      NUMBER
    ENAME                                              VARCHAR2(15)
    EQUAL                                              VARCHAR2(10)
    ESALARY                                           VARCHAR2(15)
    ECITY                                                 VARCHAR2(15)
    EPERK                                                NUMBER
    ECONTACT_NO                                NUMBER
    Thanks  in  advance !

    Reading is one thing. Trying another. Just try to run the code in the DB. (Perhaps you may try apex.oracle.com)
    You will find out that this will not compile for several reasons.
    One is
    emp_cur.first_name: This should refer the current row of the cursor loop, thats emp_rec, so it should be emp_rec.first_name.
    Second is
    sales_cur is not declared, instead it's called emp_cur.
    Below you will find the code altered so that it will work in my schema
    CREATE OR REPLACE PROCEDURE employer_details
    IS
    CURSOR emp_cur IS
    SELECT ename FROM emp;
    emp_rec  emp_cur%rowtype;
    BEGIN
    FOR emp_rec  in  emp_cur LOOP
    dbms_output.put_line(emp_rec.ename );
    END LOOP;
    END;
    you will execute it this way
    begin
    employer_details;
    end;
    Output in my case is
    KING
    blake
    clark
    jones
    scott
    ford

  • RAPOST2000 error as Cost Centre blocked

    Hi
    Would like to check with you on the monthly depreciation posting as if one of the cost centre of assets was blocked:
    1) 4.6C RABUCH00 run in background and failed as certain cost centre was blocked. The job re-run and the system will prompt user to enter the correct cost centre WITHOUT changing the cost centre in the respective asset master.
    2) ECC5/6 RAPOST2000/AFAB run in background but flag out error as the cost centre was blocked.
    For that scenario, does that mean we need to change the cost centre in the respective asset master IF we do not want to unblock the primary posting of the cost centre?
    Pls advise and thank you so much.

    Hi Claudia,
    this issue arises very often with the new depreciation run. But the main question should not be "how can I change the cost center within the posting so that the depreciaiton run does not fail". Because if you changed the cost center in the past processing the Batch Session, you definitely created an inconsistency. The cost center stored in FI-AA tables has not been the cost center being used in the FI and CO documents.
    If you do not need that consistency, it is in the users responsibility. But personally I doubt this procedure.
    So personally I agree on Pauls statement, it is - from my personal opinion - more reasonable to spend some time assuring data consistency, then to skip system checks accepting side effects and inconsistencies.
    Regards,
    Markus

  • Elimination of Interunit Profit/Loss   SEM-BW 6.0

    Hello people, I am trying to use this functionality, with the option Method 2: Calculation with Quantities but I have doubts about procedure, so I would like to check steps :
    1. Activate in data basis / data stream the following items :
    Inventory Data
    Supplier Data
    Supplier Share
    2. Load additional financial data
    HOW  / WHERE  to get this information to load in the data streams?
    a)     HOW : Using for example flexible upload Reported Financial Data
    b)     HOW : Other alternative
    c)     WHERE : from Material Managements tables ?
    3. Customizing steps
    Could you give me some tips / information ?
    Thanks a lot
    Ismael Lozano

    Hi Ismael Lozano and welcome to SDN,
    I'd like to attract your attention to the RULES that rule those forums:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement
    You broke some of the rules -- nobody will answer the whole bunch VERY BROAD questions in one thread.
    Anyway, I'll try to answer to some of your questions or point out to the proper way.
    1. Right. And activate the appropriate flag in the Consolidation area.
    2.
    WHERE FROM - it's the problem of your functional people or your system. Usually it's not a commonly accessed information.
    HOW to load this info? - the Additional financial information is loaded to ODS/DSO objects. The loading might be done through the manual data entry (number of entries is small) or through flexible upload/ABAP routines.
    3. Read this forum and the SAP help:
    http://help.sap.com/saphelp_sem60ep1/helpdata/en/62/f7e73ac6e7ec28e10000000a114084/frameset.htm

  • Solaris 8 - Ultra5 - EIDE 20GB Disk

    Group,
    Persuant to my post of 3/12 regarding a recent disk upgrade in an Ultra 5, from stock ATA100 EIDE to Western Digital WD200 20GB ATA100 EIDE, I've installed the recommende Solaris 8 upgrade.
    I've performed a touch /reconfigure
    and boot -r
    However the system still only recognizes 8GB of the 20.
    DiskSuite is installed and I've located the Solaris Management Console 2.0 with the disk tools.
    However, I have not found a way to make the full 20GB available.
    Does anyone have any additional insights?
    Regards,
    Mark

    Issue resolved at last.
    I invoked a format-partition-purge and interrupted it midstream with the dd if=/dev/zero.... etc
    Following that I manually restarted the Solaris 8 installer.
    (I had booted from the cd and dropped to a shell window to perform the above)
    Solaris 8 finally recongized the drive as a 20GB instead of an 8. I doubt my procedure was proper, but it worked.
    Thanks for you inputs.
    MG

  • SQL 2008 R2 SP1 Cluster SAN Migration

    Dears,
    I am doubting about procedure and steps that must be followed while doing SAN Migration for my cluster 2008 R2 SP1 SQL.
    For me, I already did cluster Quorum SAN Migration, but I am doubting about all remaining steps such:
    Some one told me about disk signatures, what should I do for this?
    What are steps for MSDTC migration?
    How to Migrate SQL Instance?
    What about Master and other system databases?
    What about Apps Database, logs, and temps?
    What about below commands: FOR WHAT IT IS NEEDED?
    ALTER DATABASE
    msdb
    MODIFY FILE ( NAME = MSDBData,
    FILENAME = '
    H:\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\
    MSDBData.mdf' )
    ALTER DATABASE
    msdb
    MODIFY FILE ( NAME = MSDBLog,
    FILENAME = '
    H:\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\
    MSDBLog.ldf' )
    SELECT name, physical_name AS CurrentLocation, state_desc
    FROM sys.master_files WHERE database_id = DB_ID(N'msdb');
    ALTER DATABASE
    model
    MODIFY FILE ( NAME = modeldev,
    FILENAME = '
    H:\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\
    model.mdf' )
    ALTER DATABASE
    model
    MODIFY FILE ( NAME =
    modellog,
    FILENAME = '
    H:\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\
    modellog.ldf' )
    Please help on this coz I am afraid about my information!

    Some one told me about disk signatures, what should I do for this?
    If you can present in disks from both SANs at the same time then this shouldn't be an issue. At a high-level you can add the new disks in and remove the old ones from the cluster when you're finished with them. The disks are just seen as new disks...not swapped
    ones.
    What are steps for MSDTC migration?
    - Personally I've simply deleted and re-created the MSDTC, there might be a nicer way to do this, but re-creating it works. 
    How to Migrate SQL Instance?
    - You mean elements that are on a SAN attached drive that aren't part of the cluster? You can stop the instance and copy the files (use
    xcopy to preserve permissions), Then swap the drive letters around & restart the instance. 
    What about Master and other system databases?
    For system databases I would
    - bring the new disk into the cluster, give it a temporary drive letter, make sure sql server has a dependency on it (look at how the current drives are setup)
    - stop the services
    - copy the folders/files to the new drive using xcopy preserving permissions
    - give the current drive an unused drive letter (via cluster manager)
    change the new drive letter to match the original drive (via cluster manager)
    - remove the old drive (remove dependencies before doing this)
    - bring the server online
    What about Apps Database, logs, and temps?
    -You can do this 'online' while the sql server is running, just bring the new disk into the cluster and following the Microsoft recommended approach outlined
    here
    What about below commands: FOR WHAT IT IS NEEDED?
    - that's for msdb and model, you'll have already handled those databases with the other system dbs.

  • Converting forms6i to 10g forms

    PROCEDURE set_alert_property(p_alert_property in varchar2) IS
    -- Code modified by the Forms Migration Assistant
    -- 20-Oct-2010 02:42 PM
    Purpose:
    Display SIL standard Information alert, based on a string passed in.
    l_alert_id alert := find_alert('WARNING');
    l_alert_button number;
    BEGIN
    SET_ALERT_PROPERTY(l_alert_id, ALERT_MESSAGE_TEXT, p_alert_property);
    l_alert_button := show_alert(l_alert_id);
    END;
    Compilation errors on SET_ALERT_PROPERTY:
    PL/SQL ERROR 306 at line 13, column 3
    wrong number or types of arguments in call to 'SET_ALERT_PROPERTY'
    PL/SQL ERROR 0 at line 13, column 3
    Statement ignored
    Failed to generate library.
    how do i correct this compilation errors

    You should never use Oracle keywords or built-ins for naming your custom procedures, functions, items etc. It'll always end-up in confusion.
    Your title says you're migrating from Forms6 to 10g but I doubt this procedure will work even in Forms6. You may be able to compile the procedure in Forms6 but you can not call it. As an example:
    PROCEDURE set_alert_property IS
    BEGIN
      MESSAGE('Set alert property procedure');
    END;And I have a call behind a button which fails.
    set_alert_property;
    Compilation errors on SET_ALERT_PROPERTY:
    PL/SQL ERROR 306 at line 13, column 3So, as Jowahl said, change the procedure name to something other than SET_ALERT_PROPERTY and it should work!

  • Next Level of SAP Certification

    Hi friends,
    I have done my certification in MM as well as in IS u2013OIL which is of Associate level. Now, I wish to go for next level (SAP Certified Professional ).
    Please let me know how  much value carries this certification other than associate level certification. I have some doubts like procedure for appearing for certification, class room training etc.
    Please guide me.
    Thanking you.
    With Best Regards,
    Rajesh

    http://www.sap.com/services/education/certification/levels/index.epx
    Regards,
    Ravi

  • Doubts in Functions and Procedures

    Hi Everybody,
    Can anybody tell the exact differences between function and the Procedure?
    My doubts are
    1. if procedure can return, and not necessary that it has to return a value,(that means if we want to return and doesnt also we can write procedure) then why do we need function?
    2. I tried to call a function which updates one table in the code,, i got an error saying that the function should not use DML.
    3. I want to know the combination that
    a. can procedure call a function and viceversa?
    b. can function (which uses DML statements)be called from sql statement ?
    and if any other combinations are there let me know with reasons.
    Thanks in advance,
    Vinay

    To elaborate on the already correct answers...
    user12281717 wrote:
    Can anybody tell the exact differences between function and the Procedure?
    My doubts are
    1. if procedure can return, and not necessary that it has to return a value,(that means if we want to return and doesnt also we can write procedure) then why do we need function?Procedures and Functions are self contained blocks of executable code. When that code completes it has to "return" to whatever called it, so both Procedures and Functions do return, however a procedure has an implicit return when it reaches the end of the code (or you can specify the keyword RETURN without any value if you like), whereas a function must contain a RETURN keyword before reaching the END keyword and a value of the correct datatype must be returned by that RETURN keyword.
    Functions must return a value, whereas Procedures do not return any value.
    If values need to be passed back from a procedure then OUT or IN OUT parameters are used, however if values are to be passed back then often it is something that should be considered for being a function rather than a procedure.
    Functions may also contain OUT or IN OUT parameters, but these types of parameters limit the function to use within PL/SQL code only and prevent them from being used in SQL, as the SQL engine will have no variable to pass back the OUT value into. Generally it is considered bad practice to use OUT or IN OUT parameters in functions.
    The underlying internal differences of Functions and Procedures comes down to how values are passed in and returned via the internal stack or via memory references where the parameter is specified as an OUT / IN OUT with NOCOPY. If you're not familiar with writing machine code / assembly language or low level C code, then this concept will probably be alien to you and it will take more than a simple post to explain it.
    2. I tried to call a function which updates one table in the code,, i got an error saying that the function should not use DML.Functions can contain DML, but those functions can only be used from a PL/SQL call to it, not from within a call from an SQL DML itself. i.e. a DML cannot contain further DML.

  • Create procedure to clear in doubt transcations.

    Hi All,
    I am trying to write a procedure and shedule it to run every 10 minutes to clear out in doubt transcations. following is the anonymous block, but not able to convert this into procedure, this has been taken from sir tom kyte site.
    declare
       cursor_name     pls_integer default dbms_sql.open_cursor;
       ignore          pls_integer;
       procedure execute_immediate( p_sql in varchar2 )
       is
       BEGIN
          dbms_sql.parse(cursor_name, p_sql, dbms_sql.native);
          ignore := dbms_sql.execute(cursor_name);
          dbms_sql.close_cursor(cursor_name);
       END;
    begin
       for x in ( select local_tran_id from from dba_2pc_pending where state like 'prepa%'; )
       loop
          dbms_output.put_line( 'My variable is ' || x.local_tran_id );
          -- execute_immediate( 'rollback force ''' || x.local_tran_id || '''' );
          dbms_transaction.purge_lost_db_entry(x.local_tran_id);
       end loop;
    end;
    /

    1  CREATE OR REPLACE PROCEDURE FOOBAR
      2  AS
      3     cursor_name     pls_integer default dbms_sql.open_cursor;
      4     ignore          pls_integer;
      5     procedure execute_immediate( p_sql in varchar2 )
      6     is
      7     BEGIN
      8        dbms_sql.parse(cursor_name, p_sql, dbms_sql.native);
      9        ignore := dbms_sql.execute(cursor_name);
    10        dbms_sql.close_cursor(cursor_name);
    11     END;
    12  begin
    13     for x in ( select local_tran_id from sys.dba_2pc_pending where state like 'prepa%' )
    14     loop
    15        dbms_output.put_line( 'My variable is ' || x.local_tran_id );
    16        -- execute_immediate( 'rollback force ''' || x.local_tran_id || '''' );
    17        dbms_transaction.purge_lost_db_entry(x.local_tran_id);
    18     end loop;
    19* end;
    11:15:06 SQL> /
    Procedure created.
    11:15:09 SQL>

  • Planning in planning run procedure doubt

    Hi All,
    I am new to APO i have a doubt for planning in planning run procedure.
    I was going through the SCM250  PP/DS and i found this in the book for planning in planning run procedure
    "You use this setting, for example, if you do not want to trigger production from the
    ATP check in the CTP scenario for this product"
    I lost in this.
    Can  some one please elaborate the meaning for above it would be highly appreciable?
    Thanks
    Shaiil

    Shaiil,
    In APO PP, there is bit of Master Data called "Planning Procedure".  Planning Procedure can influence when planning is done.  You can trigger a heuristic to be executed automatically, based on defined events.  One of the events that can trigger an automatic heuristic is an ATP check  Planning Procedures can be assigned to a Product in the Product Master.
    Planning Procedure
    http://help.sap.com/saphelp_scm70/helpdata/EN/64/dca63be2bc331be10000000a114084/frameset.htm
    In APO, there is a specialized type of availability check (ATP) which is called Capable To Promise (CTP).  In CTP, it is common to assign a Planning Procedure that immediately covers dependent requirements.  This means that upon ATP, the system will generally automatically create a planned order, schedule it, and generate dependent demand.
    Capable To Promise
    http://help.sap.com/saphelp_scm70/helpdata/EN/4c/56297de7c33a0de10000000a42189c/frameset.htm
    These types of automatic planning are totally separate from a planning run.  It is possible to run a product line with only automatic planning, only planning run planning, or various combinations of both types of planning.
    If you wish to learn about APO, you should first search through online help before posting a question.
    Best Regards,
    DB49

  • MM pricing procedure doubt!!!

    Hello All
    1) Would like to know where we connect PO doc type to the MM pricing procedure? or it is not at all connected?
    2) Suppose i am creating a standard PO, so how system actually knows which pricing procedure to pick up out of so many maintained in SPRO?
    3) What is the meaning of Step and Cntr in MM pricing procedure?
    Thanks
    Anjan

    Hi,
    All I can do is to confirm that there is NO LINK between document type and pricing procedure.
    The procedure is determined by the Vendor and the P org (via groups).
    The exception is the transport orders these have their own condition schemas (that is why there is a control field on the PO document types, so that you can indicate the document taypes that are for STOs)
    the step and counter fields are simply methods of pointing the calculation to the correct conditions types etc.. the step is a sequence numbering when multiple condition types are to be processed in the same step.
    Steve B

  • Doubt: Problem in enqueing using DBMS_AQ.enqueue procedure

    Hello All,
    I have one issue with Oracle AQ. One of our implementation requires us to extract data from the tables and enqueue the extracted data into an Oracle AQ.
    I will try to explain my problem as briefly as possible:
    1. We have created a queue of type CLOB using the following procedure
    begin
    dbms_aqadm.create_queue_table('BOD36_3PLB2B_TABLE', 'IKN_CLOB'); -- IKN_CLOB—This is CLOB custom type that we have created to have CLOB data.
    dbms_aqadm.create_queue('BOD36_3PLB2B_Q', 'BOD36_3PLB2B_TABLE');
    dbms_aqadm.start_queue('BOD36_3PLB2B_Q');
    end;
    The queue creation was successful.
    2. Then we have developed a package to extract data from the database into a VARRAY and then using the varray as the payload.
    3. In the package we are calling the following code to enqueue data into the database with the VARRAY as the payload
    dbms_aq.enqueue(queue_name => ikn_qname,
    enqueue_options => lt_enqueue_options,
    message_properties => lt_message_properties,
    payload => p_SHOWPL_ARR_OUT, ---> p_SHOWPL_ARR_OUT it is the varray to which we are putting the data to enqueue
    msgid => messageid);
    4. When I compile the package, I get the error: PLS-00306: wrong number or types of arguments in call to 'ENQUEUE'.
    If you have faced similar issues and have any pointers to the above, then please help!! I am not sure where i have gone wrong.
    Please help !!!!!
    Thanks in advance and thanks for your patience.
    Regards,
    Dibya

    The package has another function enqueue_array. Maybe that will help you. Check it out from the Oracle docs.
    Ben

  • Import meterial pricing procedure steps, accruvals doubt in freight conditi

    pls guide me , what steps are  involved to import meterial in pricing procedure?
    accrols and account keys maintain for freight conditon types , both we have to maintain or only one? if maintain in automatic account determination maintain same G/L ACCOUNT number will maintained or different no's will be maintained?

    Hi Sai
    Your import pricing procedure shall contain the following:
    1) Delivery costs for Custom clearance
      - Custom duty
      - CVD
      - Ecess on CVD
      - SEcess
      - Ecess on customs
      - Addl custom duty
    2) Delivery cost for agent charges
    3) Local freight charges
    All the above condition types are delivery costs only.
    For every condition type, you will maintain the vendor, so that the respective condition delivery costs can be processed based on the document.
    As soon as the material received at port, you will do MIRO for all the duties
    By the the material reached banglore, you will do goods receipt.
    The local freight can be processed based on the requirement (either before GR or after).
    warm regards
    sairam akundi

  • Simple doubt in partner determination procedure

    Hi gurus,
    I have a problem with a partner determination procedure. I need that a marketing campaing has a partner determination procedure in which Responsible Person will be mandatory with two assignments.
    In my partner determination procedure I select 2 as minumun value but the marketing campaing allows only one Responsible Person assigment.
    It's possible to make a partner function mandatory with a minimun number of partners?
    Thanks in advance.
    Javier Merino

    hi guys
    i have a query regarding access sequence in partner determination in SAP CRM.problem is that when i am trying to create a partner determination procedure using access sequence
    Business Partner Relationship->Activity Partner->User
    having three partner functions :
    Sales Prospect
    Contact Person
    Person Responsible
    there is deadloack arising in contact person and person responsible i.e. partner function is not being determined using the above access sequence
    i have maintained same relationship categories.please tell me whether deadlock is a problem or not because my main concern is when i am trying to run Lead using above mentioned partner determination procedure i am not able to run the LEAD.for instance ideally what should be happening is :
    there are three blank boxes
    one of contact person ,another of person responsible and finally of sales prospect.now since i have defined the BP relationship,so using above determination procedure what shoulod be happening is that if
    m writing any BP no. in sales prospect then conatct person should be dispalyed automatically because of the relationship i have maintained in BP.
    but its not happening ,i have to fill each entriers manually
    please guide me to some solution
    hoping of an immediate help to a silly problem which i guess m able to define appropriately
    thanks & regards
    ashish

Maybe you are looking for

  • HELP! Creating symbolic link to home folder for installer DMG

    Guys, I'm in a bit of a bind. I need to create a symbolic link for an installer DMG to distribute a communal Bookmarks.plist to all the computers in my department. Unfortunately 'ln -s ~/Library/Safari /Volumes/Bookmarks/.' doesn't do the trick! Whil

  • Sending response back to client

    The result of a request is in the format of inputStream before sending back to client... I used to use getPrinter() method to write my output back to the client... so how can I write the output from the inputStream back to the client without reading

  • Windows BSOD - IRQL_NOT_LESS_OR_EQUAL and UNEXPECTED_KERNEL_MODE_TRAP

    Having a bunch of issues with my pc.. i ve built this a while ago (1.5 years ago-ish).  Recently one of my ssd failed (i had win installed on it). I couldn't install windows successfully on my second ssd because the installation process kept failing.

  • Relinking from jpg to tif

    First of all, thanks for all the great tips with earlier re-linking problem. The tip to use "copy links from..." worked perfectly for switching from my RGB tifs to my CMYK tifs. Now I have a different type of relinking problem. My present InDesign (C

  • Mac cannot connect to iCloud because of a problem with my iCloud account

    I keep getting the following message when opening my email....mac cannot connect to iCloud because of a problem with my iCloud account.