1 Reply Latest reply on Nov 8, 2017 7:48 PM by Gary Graham-Oracle

    Debug Procedure with Record Type as a Parameter

    Cerito

      I'm asking if you know how to pass a pl/sql record to a procedure.  And also how to get this parameter in SQL Developer's debugger as at the end of this post. The debugger informs Modify the code to initialize the variable  I have no idea how to get this done since it's a first for me.

      In a packages spec a PL/SQL record type is defined as

          TYPE s_DateSpan is RECORD

          (number_key      NUMBER(12),  -- Key value

           eff_frm_dt      DATE,

           eff_to_dt       DATE);

      In the package body a procedure  uses the record type as a parameter as:

      PROCEDURE Check_Rate_Detail(RateId IN NUMBER,

                                  ProductId IN NUMBER,

                                  RAHInfo   IN s_DateSpan,

                                 ZeroRateIndicator IN VARCHAR2,

                                 Tier IN NUMBER,

                                 EffDate IN DATE,

                                 p_mode IN VARCHAR2) IS

      When I use Sql Developers debugger I get:

      DECLARE
      RATEID
      NUMBER;
      PRODUCTID
      NUMBER;
      RAHINFO MKT
      .PKGCLVALID.S_DATESPAN;
      ZERORATEINDICATOR
      VARCHAR2(200);
      TIER
      NUMBER;
      EFFDATE
      DATE;
      P_MODE
      VARCHAR2(200);

      BEGIN
      RATEID
      := NULL;
      PRODUCTID
      := NULL;

      -- Modify the code to initialize the variable

      -- RAHINFO := NULL;
      ZERORATEINDICATOR := NULL;
      TIER
      := NULL;
      EFFDATE
      := NULL;
      P_MODE
      := NULL;


      MKT
      .PKGCLVALID.CHECK_RATE_DETAIL(

          RATEID => RATEID,

          PRODUCTID => PRODUCTID,

          RAHINFO => RAHINFO,

          ZERORATEINDICATOR => ZERORATEINDICATOR,

          TIER => TIER,

          EFFDATE => EFFDATE,

          P_MODE => P_MODE

      );

      END;