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>


Luis,

  1. You need a package with 4 Procedures
  2. Procedures can have some in Parameter
  3. Procedures must have one pl/sql-table (in out) parameter
  4. 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.
  5. 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.
  6. Then you give the wizzard the name of pack.query, pack.ins, pack.upd, pack.del, pack.lok
  7. The wizzard get's the parameter-list's of your procedures from database and fills the columns-lists automaticaly.
  8. 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

Original text of this message