Re: Blocks based on stored procedures in Forms 5.0
From: Peter Bloch <pbloch_at_webshuttle.ch>
Date: Tue, 19 Jan 1999 00:41:35 +0100
Message-ID: <36A3C6AF.D6EAFFFB_at_webshuttle.ch>
Date: Tue, 19 Jan 1999 00:41:35 +0100
Message-ID: <36A3C6AF.D6EAFFFB_at_webshuttle.ch>
Luis,
- You need a package with 4 Procedures
- Procedures can have some in Parameter
- Procedures must have one pl/sql-table (in out) parameter
- In the procedure query you must fill the table. The in parameter's, you can fill with some values from your forms-5 :block.item.
- When you have your package (at least the specification) it is best to create a new block with the block-wizzard. On the first tab (starting the wizzard) you must select the radio group: based-on-procedure. Don't try to modify an existing block, that is rather hard for beginning.
- Then you give the wizzard the name of pack.query, pack.ins, pack.upd, pack.del, pack.lok
- The wizzard get's the parameter-list's of your procedures from database and fills the columns-lists automaticaly.
- In your form you must write a procedure: go_block, execute_query... forms will then call your stored procedure automaticaly, your procedure fills the table and you will see the result in your block...
I personally tried it with queries. For Ins, Upd, Del, Lok i used dummy-procedures, but i will work on that soon.
Good Luck
Peter Bloch, Switzerland (Europe)
----------------------------example--------------------------------- CREATE OR REPLACE PACKAGE pack_procedures_for_forms is
- ----------
- typ
- ----------
type t_lieferant_rec is record
( ind number, -- Stammdaten part_id partner.id%type, part_lieferantnr partner.lieferantnr%type, part_firmenname partner.firmenname%type, part_waeh_id partner.waeh_id%type, plzo_plz plzort.plz%type, plzo_ort plzort.ort%type, waeh_isowaehrcode waehrung.isowaehrcode%type, mengeb number, -- Berechnete Werte dsp_anz_pos_total number, netto_chf number, netto_fw number, brutto_fw number, rabatt_fw number );
type t_lieferant_tab is table of t_lieferant_rec index by binary_integer;
procedure query
( i_beda_id in bedarf.id%type, i_bedp_ttyp_bdst_id in bedarfpos.ttyp_bdst_id%type, lieferant_tab in out t_lieferant_tab ); procedure ins ( id in number, t in out t_lieferant_tab ); procedure upd ( id in number, t in out t_lieferant_tab );
procedure del ( t in out t_lieferant_tab );
procedure lok ( id in number,
t in out t_lieferant_tab ); --------------------------------------------------------------------Received on Tue Jan 19 1999 - 00:41:35 CET