Help with Data Block Based on Procedure--getting compilation error

I am trying to create a datablock based on a procedure , but im getting errors in compilation:
Errors are :
1) identifier 'HSM_WSH_DEL_UTIL.DEL_TBL' must be declared
2)PL/SQL ERROR 320 at line 7, column 27
the declaration of the type of this expression is incomplete or malformed
ANy Help would be appreciated !
Heres my pkg spec and body for the data block:
CREATE OR REPLACE PACKAGE hsm_wsh_del_util IS
TYPE del_record is record
(delivery_id number);
TYPE del_tbl is table of del_record INDEX BY BINARY_INTEGER;
procedure do_query(p_del IN OUT del_tbl);
END hsm_wsh_del_util ;
CREATE OR REPLACE PACKAGE BODY hsm_wsh_del_util IS
procedure do_query(p_del IN OUT del_tbl)
IS
idx number :=1;
CURSOR DELIVERY IS
SELECT DELIVERY_ID
FROM abc_deliveries;
begin
FOR CUR IN DELIVERY LOOP
p_del(idx).delivery_id :=cur.delivery_id;
idx:= idx+1;
END LOOP;
end do_query;
END hsm_wsh_del_util;
Edited by: 981170 on Mar 13, 2013 1:08 PM

Hi,
Yes I did use the wizard,
I agve it the package.proc name for query.
it pulled up the field delivery ID,
Hit finish, because I do not need update/delete/inserts.
the query data source columns and arguments was defaulted correctly.
THe QUERY-PROCEDURE was built by default.
It is giving me an error though: wrong number or types of arguments in call to POPULATE_BLOCK..
DECLARE
bk_data HSM_WSH_DEL_UTIL.DEL_TBL;
BEGIN
hsm_wsh_del_util.do_query(bk_data);
PLSQL_TABLE.POPULATE_BLOCK(bk_data, 'NEW_DELIVERIES');
END;

Similar Messages

  • Data block based on procedure

    While working on a form with a data block based on a procedure, I keep getting error
    FRM-40364 The data type of item '%' does not match the corresponding column in the stored procedure.
    I have compared the items many times and found no mismatch. When the items are resorted (in both the data block and the procedure) and everything is recompiled, the
    "not matching" item referenced sometimes changes, though the types have not been changed. Has anyone solved a similar situation?

    Hi,
    Yes I did use the wizard,
    I agve it the package.proc name for query.
    it pulled up the field delivery ID,
    Hit finish, because I do not need update/delete/inserts.
    the query data source columns and arguments was defaulted correctly.
    THe QUERY-PROCEDURE was built by default.
    It is giving me an error though: wrong number or types of arguments in call to POPULATE_BLOCK..
    DECLARE
    bk_data HSM_WSH_DEL_UTIL.DEL_TBL;
    BEGIN
    hsm_wsh_del_util.do_query(bk_data);
    PLSQL_TABLE.POPULATE_BLOCK(bk_data, 'NEW_DELIVERIES');
    END;

  • Help with date calculation based on office hours

    Hi,
    could you guys point me which way should I think of in PL/SQL, or maybe SQL to calculate a date using not 24 hours day, but office hours.
    Let me give you an example
    Office hours are between 9am till 5pm
    I receive a case - registration time - 14.03.2013 4pm, and I'm supposed to calculate the Due date, let's say Registration time + 10hours.
    Normaly I would do "registration time" + 10hours, but I can't. I cannot use 24 hours window for the calculation, but 9am - 5pm window.
    So the "Due timestamp" would be = "16.3.2013 10am". Which is : 1 hour from 14.03. + 8hours from 15.3. + 1 hour from 16.3.
    Thanks for any ideas.

    Hi,
    A user-defined function would be very handy for that. Foir example
    add_office_hours ( in_start_date DATE
                     , in_num_hours  NUMBER
    RETURN DATE
    DETERMINISTIC ...First, copy in_start_date to a local variable, start_date, and check if start_date is within office hours. If not, change it to the beginning of the next business day.
    Add in_num_hours to start_date. Is the result before 5pm on the same day?
    If so, the function is finished. Return that date.
    If not, find how much past 5pm the result is, and recurse (that is, have the function call itself with a new, later in_start_date and a new, smaller in_num_hours). If you prefer, you can use a loop instead of recursion.
    How do you treat weekend and holidays?
    Would you want to call the function with a negative number of hours?
    If you'd like help. post your best attempt.
    Post CREATE TABLE and INSERT statements for a table that you use for testing. The table should have start_date, num_hours and correct_result_date columns.
    Always say which version of Oracle you're using (e.g. 11.2.0.3.0).
    See the forum FAQ {message:id=9360002}

  • Data block based on stored procedure with  input arguments

    Hi,
    I am able to create a data block based on stored procedure.
    but I want that procedure to take input arguments as well and I am facing the issue while setting the value for that input arguments from another block item.
    Please somebody help, How to set the value for input argument from another control block- item?.(Note :Data block is based on the stored procedure)
    Thanks in Advance,
    Anandan Muthukannan

    I did exactly the same way you mentioned.
    But while building the form, The call to the procedure in 'QUERY-PROCEDURE' trigger has been modified like this way
    procedure_name(qp_data,':BLOCK.ITEM');
    so in procedure i am getting the value as ':BLOCK.ITEM' not the expected value.

  • Forms9i, data block based on stored procedures, refresh on update ?

    Hi,
    I am using
    Forms [32 Bit] Version 9.0.2.9.0 (Production)
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
         With the Partitioning, OLAP and Oracle Data Mining options
         JServer Release 9.2.0.5.0 - Production
    Oracle Toolkit Version 9.0.4.0.23 (Production)
    PL/SQL Version 9.0.1.3.1 (Production)
    Oracle Procedure Builder V9.0.2.0.7 Build #1022 - Production
    PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
    Oracle Query Builder 9.0.2.0.0 - Production
    Oracle Virtual Graphics System Version 9.0.1.5.0 (Production)
    Oracle Tools GUI Utilities Version 9.0.4.0.9 (Production)
    Oracle Multimedia Version 9.0.4.0.9 (Production)
    Oracle Tools Integration Version 9.0.2.0.0 (Production)
    Oracle Tools Common Area Version 9.0.1.0.0
    Oracle CORE     9.0.1.2.0     ProductionI have a module based on stored procedures. I have defined query, lock and update procedure. All of them are working as they should, I mean that when looking at the input and output from these procedures I don't see anything blatantly wrong.
    Now, when I update a table field in the form and call the update stored procedure, this procedure takes the updated values in considerations, updates some more fields, and remove some records.
    It is working as it should, except for two details :
    1- I don't see the values updated by the procedure in the Form;
    2- even though some records were removed from the table by the procedure, I still see all my records.
    Is there a way to display the returned table?
    And, is there any documentation about data block based on stored procedures, what are the required signatures and limitations of those stored procedures, what a lock procedure is supposed to do (mine does 'null;' ...), how to map a collection type defined in Oracle to a Form data block ? Any link will be appreciated, I have found half a dozen page vaguely detailing this on Google, but nothing that can compare to a usual Oracle manual. Maybe I have missed something.
    Thank you for your help.
    adsm

    Yes, I was hoping to use these procedures to map the collection type returned to the database to the block data. I guess I was wrong. Except for the initial query and reading some other information from the database, I don't have to use these procedures as I do not write anything to it.
    Thank you for your help, I will go on from there.
    So, it means that I will have to iterate through my collection inside Forms and manipulate my data row by row. Or, is there a way to pass an Oracle collection type between the database and the Forms client and have it displayed without having to iterate through the rows and mapping each field?
    adsm

  • Data Blocks Based on Stored Procedures

    Is it possible to to create a data block based on a stored procedure, and create a dynamic list as a drop down box?
    I have a form that runs successfully that has a data block based on a stored procedure. I add my trigger to create and populate the record group. Then in the Property Palette, when I change ITEM TYPE from TEXT ITEM to LIST ITEM, I receive the following runtime error:
    FRM-40350: Query caused no records to be retrived.
    Note: the tlist/list item runs successfully on a data block based on a table.

    1) go to the block property to remove the same item column, then re-add the item; Since the property may remember the old text type;
    make sure the record value for the list tiem from stored procedure is among the list elements!
    Last sort is to do:
    2) you may re-create your gui based on the table by setting the list type this time, then set the block property to be based on the stored procedure.

  • Need to create a block based on procedure

    We can create a block based on procedure...but whats the need to do so...please can anybody explain.

    There are several recent posts on the topic with a lot of good help & documentation.
    The Metalink note: 66887.1
    Re: Form on a procedure
    If you can't access Metalink, search here on that note. Someone posted the full text a couple days ago.
    This is also very good reference:
    Block based on procedure
    Essentially, you have a procedure, returning a table-of-records type variable, called by the block "Query Data Source..." properties.
    Name = procedure name
    Arguments = procedure parameters (IN parameter(s) Value is :block.item)
    Source Columns = the record type columns for your table-of-records
    Datatypes & sizes must match all around.
    Start very simple & get it to work first, then expand.
    You must follow the documentation very carefully. If it doesn't work at first, go through everything to verify. Also, read the Tip & Issues at the end of the Metalink note.
    Have fun. It works awsome once you get the hang of it.

  • Record Who information for a block based on procedure

    Hi All,
    I have a block whose query data source type property is set to procedure and query data source name is a procedure. When I hit Ctrl F11 on this block it shows me all the records. When I see the record who information , I see all the record who information except the Table Name. I understand that the table name is not coming as the query data source name is a procedure for this block. Is there a way to dynamically set this query data source name to a table or a view while still retaining the procedure based functionality. I tried set_block_property for this property but form won't allow.
    Thanks

    There are several recent posts on the topic with a lot of good help & documentation.
    The Metalink note: 66887.1
    Re: Form on a procedure
    If you can't access Metalink, search here on that note. Someone posted the full text a couple days ago.
    This is also very good reference:
    Block based on procedure
    Essentially, you have a procedure, returning a table-of-records type variable, called by the block "Query Data Source..." properties.
    Name = procedure name
    Arguments = procedure parameters (IN parameter(s) Value is :block.item)
    Source Columns = the record type columns for your table-of-records
    Datatypes & sizes must match all around.
    Start very simple & get it to work first, then expand.
    You must follow the documentation very carefully. If it doesn't work at first, go through everything to verify. Also, read the Tip & Issues at the end of the Metalink note.
    Have fun. It works awsome once you get the hang of it.

  • Updatable View as data block source - can't get to work

    I have created a simple form with one data block based on an updatable view, but it doesn't work properly after the form executes a query.
    I can use DML on this view using SQL*Plus and it works as it should.
    DML works in the form too, but only until I execute a query, after that I get the "FRM-40602: cannot insert into or update a view" error each time I try an insert, update, or delete.
    This is repeated for each runtime of the form. I have set the "query only" property to yes for the non-DMLable item from the view so that isn't part of the problem. This is an example out of "Developer Advance Forms and Reports (page 112) - Oracle Press" so it should work. There is nothing else (code, triggers, etc...) in this module besides the one data block.
    Any ideas would be appreciated.
    Thanks. Bill Brosnan.

    I have had the same issue and had to go through Oracle Support to get it working.
    First of all make sure that you have a recent patch installed (patch 9 as being the latest one available).
    Second, set in the data block the property key mode to updatable and the property primary key to yes for one item of the data block. (this is bug 1561423)
    Make sure that you only modify those columns that are updateable.
    Quite a large number of bugs have been reported on the concept of updatable views and the installation of a recent patch will most definitely get you working again.
    This functionality does work !
    Goodluck,

  • Block based on procedure - trapping errors

    Hi,
    I have created a form with a block based on a procedure but when there is an error in the procedure it is not being trapped. I have raise_application_error in the execption but the form does not pick this up
    Can anyone help me on this. I am using Forms 5
    thanks, Monica

    It would be very difficutlt to send all the necessary pieces but there is a very good discussion of it in the "Advanced Forms and Reports" book from Oracle Press(Chapter 4).

  • I'm trying to backup a my harddrive with disk utility but I'm getting an error  Unable to create Backup.dmg" (input/output error). Is there any other way to save my data? I believe my hard drive is failing or corrupt file. I can't boot up. Grey screen

    I'm trying to backup a my hard drive with disk utility but I'm getting an error  Unable to create Backup.dmg" (input/output error). Is there any other way to save my data? I believe my hard drive is failing or corrupt file. I can't boot up. Grey screen and spinning wheel. I've tried everything https://discussions.apple.com/message/20580424#20580424
    any help will be greatly appreciated.

    Check here. Also have you done a TimeMachine back up?
    http://support.apple.com/kb/TS2570

  • Need Help with Dates

    I am printing a calendar and certain events will be helds on certain dates.
    One can edit the event if it has not passed the date. Events in the past can be viewed but not edited.
    When I query the database the date must be formatted dd-MMM-yy
    I am able to get today's date by doing this:
    java.util.Date today = new java.util.Date();
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    String today_str = sdf.format(today);
    My code for printing the calendar: I left out some of the table formatting in the JSP page.
    GregorianCalendar d = new GregorianCalendar();
    int today = d.get(Calendar.DAY_OF_MONTH);
    int month = d.get(Calendar.MONTH);
    d.set(Calendar.DAY_OF_MONTH,1);
    int weekday = d.get(Calendar.DAY_OF_WEEK);
    for(int i = Calendar.SUNDAY; i < weekday; i++)
    out.print("<td> </td>");
    do {
    int day = d.get(Calendar.DAY_OF_MONTH);
    out.print("<td>" + day + "</td>");
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    if(weekday == Calendar.SATURDAY)
    out.println("</tr><tr valign=top>");
    d.add(Calendar.DAY_OF_MONTH,1);
    weekday = d.get(Calendar.DAY_OF_WEEK);
    } while(d.get(Calendar.MONTH) == month);
    if(weekday != Calendar.SUNDAY)
    System.out.println();
    The part I need help on is this:
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    I'm looping through each day of the month to print the days. I have the month, day, year as integers. How can I create a date object out of that and compare it to today's date to test if it's before or after today???
    All the function in the Date class that I think would do this have been deprecated.

    Need Help with Dates
    Here is some information about dates:
    There are many edible palm fruits, and one of the most widespread and favored of these is the data (Phoenix dactylifera). Dates were cultivated in ancient land from Mesopotamia to prehistoric Egypt, possibly as early as 6000 B.C. Then--as now--dates were a staple for the natives of those dry regions. Much later, Arabs spread dates around northern Africa, and dates were introduced into California by the Spaniards in 1765, around Mission San Ignacio.
    The date prefers dry, hot climates, because date fruits are injured at temperatures of 20 degrees F, and the damp climate of the California coast was not favorable for fruit production. In the mid-1800s, the date industry developed in California's hot interior valleys and in Arizona. Now the date industry in the United States is localized mostly in the Coachella Valley, where the sandy soils permit the plants to be deeply irrigated. Today the new varieties, mostly introduced in this century, produce about 40 million pounds of dates per annum, or over 60% of the dates consumed in this country. The rest are imported mainly from Persia. According to one survey, about one million people are engaged entirely in date palm cultivation worldwide.
    Hope that helps.

  • Need help with Flash CS4 buttons/can't get buttons to control anything

    Hello,
    I need help with Flash CS4. I am making a banner with an animation (Image change into movie clip "3D Spiral") and added buttons but I cannot get the buttons to control the animation. Please help I am frustrated! If someone could help I would be most appreciated.

    Thank you.
    Regards,
    Michael J. Sheehan  allelois
    Date: Mon, 17 Aug 2009 18:48:09 -0600
    From: [email protected]
    To: [email protected]
    Subject: Need help with Flash CS4 buttons/can't get buttons to control anything
    Hi there
    I'm not sure how you wound up where you did. But you wound up in the Adobe Captivate forums. Please stand by as I move your thread to the Flash forums.
    Cheers... Rick
    >

  • Help with date validation on input boxes.

    I need some help with date validation on input boxes.
    What I�m trying to create is a form where a user inputs dates and then the rest of the form calculates the other dates for them.
    i.e. � A user inputs 2 dates (A & B) and then a 3rd date which is 11 weeks before date B is calculated automatically.
    Is this possible and if so how do I do it ???
    Thanks

    Hi,
    to get third date try this:
    java.util.Date bDate = ...;
    Calendar yourCalendar = new GregorianCalendar();
    yourCalendar.setTime(bDate);
    yourCalendar.roll(Calendar.WEEK_OF_YEAR, -11);
    java.util.Date cDate = yourCalendar.getTime();Regards
    Ldinka

  • I have an older iMAC that once burned CD's with no issues. Now I get an error message saying "The attempt to burn a disc failed. The device is not accessible, probably because it was removed". I have never had it touched so the device was not removed.Help

    I have an olde iMac that once I have an older iMAC that once burned CD's with no issues. Now I get an error message saying "The attempt to burn a disc failed. The device is not accessible, probably because it was removed". I have never had it touched so the device was not removed. Please advise as to what could be the problem. How to fix. Thanks

    Try resetting the SMC and PRAM first, if that doesn't help try a cleaning disc.....and then buy an inexpensive external burner. Slimline super drive failures are all too common.
    To reset the SMC
    Shut down the computer.
    Unplug the computer's power cord.
    Wait fifteen seconds.
    Attach the computer's power cord.
    Wait five seconds, then press the power button to turn on the computer.
    Resetting NVRAM / PRAM
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

Maybe you are looking for

  • E-Recruiting and IE8

    <p>We are currently on E-Recruiting 6 with Enhancement Pack 3 SP level 5 with Netweaver 2004s (7.0) (support pack stack 20). </p> <p>PROBLEM <br> We did some testing with Internet Explorer 8 and the Candidate Web Dynpro seemed to work fine.  However,

  • How to use the ADS8320eb serial analog to digital converter

    Has anybody a example of a circuit using this component?

  • Zero quantity not allowed

    Hi Experts, One of our clients experiences this error, "zero qty not allowedu201D, even after encoding the item quantity during PO creation. This message always happens when a new item was entered and it will take a few trials before the system accep

  • How to merge image1.jpg(5x5) + image2.jpeg(5x5) into mergedImage.jpg(10x5)?

    Hi, I want to merge 2 images into a bigger one.The two subimages have the same width and height, and the merged image has the two images joined next to each other. I've tried various stuff with Raster and Bufferedimage, but it wont work. Suggestions,

  • Change the tab color

    Hi, i'm unable to change the tab color of panelTabbed item, i've tried the following in a css sheet: af|panelTabbed::tab:selected { font-style:italic; background-image: url("../Images/section_label_body.jpg"); border-bottom-color: red; border-color: