Posts

Showing posts from October, 2011

WORKING WITH REF CURSOR

I create and populate the following table: CREATE TABLE plch_tab (item VARCHAR2 (10)) / BEGIN INSERT INTO plch_tab VALUES ('Keyboard'); INSERT INTO plch_tab VALUES ('Mouse'); COMMIT; END; / I then create this function to fetch a row from a cursor variable and return the item: CREATE OR REPLACE FUNCTION plch_getitem ( plch_cur IN SYS_REFCURSOR) RETURN plch_tab.item%TYPE IS lvretval plch_tab.item%TYPE; BEGIN FETCH plch_cur INTO lvretval; RETURN lvretval; END plch_getitem; / Now I need to write a block that will fetch the rows from the table and display both the count of rows fetched and the name of that last item fetched. Here is an almost complete version of this block: DECLARE lvitem plch_tab.item%TYPE; test_cur SYS_REFCURSOR; BEGIN OPEN test_cur FOR SELECT * FROM plch_tab ORDER BY item; /*FETCH*/ DBMS_OUTPUT.put_line ('Count = ' || test_cur%ROWCOUNT); DBMS_OUTPUT.put_line ('

How to Apply Timers In Forms

Checked relevance 06-Feb-2008 Purpose ======= The objective of this note is to explain how to apply and handle timers in Forms.  This note covers time-initiated processing; that is, processing that occurs after a certain amount of time has elapsed.  The mechanism you use to do this is called a "Timer" and it is created, modified, and deleted at run-time. This document consists of the following sections: 1. What is a Timer? 2. What are the Built-in Functions for Timers? 3. When Can You Use Timers? 4. How to Create a Timer 5. How to Modify a Timer 6. How to Delete a Timer 7. How to Handle Timer Expiration    -- What is the Relationship Between Timer Expiration and Timer Queue? 8. An Example for Showing "About" Information Using a Timer in the Form 9. Known Bugs With the Use of Timer in Forms 1) What is a Timer? =================== Typically, Forms process events that are (originally) initiated by the user.  You can use timers when yo

IMP Profiles in Oracle Quotes & i Store

Profile Option Name  Value  IBE:Category Set  Valid Value from LOV  IBE:Item Master Organization  Valid Value from LOV  MO:Operating unit  Valid Value from LOV  IBE:Price Event For Shopping Cart  Batch Processing  IBE:Create Order In Entered State if It has errors while Booking  Yes  IBE:Shopping Event Before Shopping Cart  Enter Order Line  IBE:Default Payment Term  Valid Value from LOV  JTF_PROFILE_DEFAULT_APPLICATION  671  JTF_PROFILE_DEFAULT_CSS  jtfucss.css  JTF_PROFILE_DEFAULT_CURRENCY  USD  JTF_PROFILE_DEFAULT_RESPONSIBILITY  21819 (iStore Admin at Application Level)  ASO:Automatic Numbering  Yes  ASO:Credit Card Authorzation  Yes (if CC Allowed)  ASO:Default Quote Status  Store Draft  ASO:Default Order State  Booked  ASO:Default Order Type  Mixed  ASO:Default Sales Rep  No sales credit  ASO:Enable TCA Changes  Yes  ASO:OM Defaulting  Yes or No (based on OM Defaulting Rules)  HZ:Generate Party Number  Yes (ApplicationLevel)  HZ:Generate Party Site Num

Script For Order Management (API)

create or replace package comms_om_new is -- Purpose : Deal with order management process PROCEDURE main( itemtype in varchar2, itemkey in varchar2, actid in number, funcmode in varchar2, resultout in out varchar2); PROCEDURE book(x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT VARCHAR2); PROCEDURE auto_full(errbuf OUT VARCHAR2, retcode OUT VARCHAR2, p_line_id IN NUMBER, p_user_id IN NUMBER ); PROCEDURE pick_release(x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT VARCHAR2); PROCEDURE ship_confirm(x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT

Scripts For Oracle Quote and Order Relation

--quote,order relationship SELECT a. quote_header_id , a. quote_number , a. order_id , b . order_number , b . header_id , c . line_id , e. quote_line_id , e. line_number , f . shipment_id FROM aso_quote_headers_all a, oe_order_headers_all b , oe_order_lines_all c , aso_quote_lines_all e, aso_shipments f WHERE a. order_id = b . header_id AND a. order_id = c . header_id AND b . header_id = c . header_id AND a. quote_header_id = e. quote_header_id AND a. quote_header_id = f . quote_header_id AND e. quote_line_id = f . quote_line_id AND f . order_line_id = c . line_id -- and a.quote_number = &QuoteNo; --if no shipment details --(if no Shipment details): /* Formatted on 2011/10/10 20:00 (Formatter Plus v4.8.8) */ SELECT a. quote_header_id , a. quote_number , a. order_id , b . order_number , b . header_id , c . line_id , e. quote_line_id , e. line_number FROM aso_quote_headers_all a, oe_order_headers_all b , oe_order_lines_all c , aso_quote_lines_al