2011-07-20 4 views
0

Je dois vérifier cette procédureComment exécuter cette procédure stockée

im donner suite à des valeurs comme paramètres

34220, 2815,'7/20/2011', 32760, 100, 'PMNT_CHECK', 1, null, "", false, null, null 

DECLARE 
    P_APP_ID NUMBER; 
    P_USER_ID NUMBER; 
    P_DATE DATE; 
    P_INV_IDS WB_PROD.WB_PCK_TYPES.T_IDS; 
    P_AMNTS WB_PROD.WB_PCK_TYPES.T_NUMBERS; 
    P_PMNT_METHOD VARCHAR2(15); 
    P_BANK_AC_FROM NUMBER; 
    P_CHECK_NUMBERS WB_PROD.WB_PCK_TYPES.T_NUMBERS; 
    P_MEMO VARCHAR2(1000); 
    P_PAY_MULTIPLE NUMBER; 
    P_CRD_IDS WB_PROD.WB_PCK_TYPES.T_IDS; 
    P_CRD_AMOUNTS WB_PROD.WB_PCK_TYPES.T_PRICES; 
    O_PY_ID NUMBER; 
BEGIN 
    P_APP_ID := 34220; 
    P_USER_ID := 2815; 
    P_DATE := '7/20/2011'; 
    -- Modify the code to initialize the variable 
    P_INV_IDS := 32760; 
    -- Modify the code to initialize the variable 
    P_AMNTS := 100; 
    P_PMNT_METHOD := 'PMNT_CHECK'; 
    P_BANK_AC_FROM := 1; 
    -- Modify the code to initialize the variable 
--P_CHECK_NUMBERS := NULL; 
    P_MEMO := ''; 
    P_PAY_MULTIPLE := false; 
    -- Modify the code to initialize the variable 
    -- P_CRD_IDS := NULL; 
    -- Modify the code to initialize the variable 
    -- P_CRD_AMOUNTS := NULL; 

    WB_PCK_BILL_PAYMENTS.PAY_BILLS(
    P_APP_ID => P_APP_ID, 
    P_USER_ID => P_USER_ID, 
    P_DATE => P_DATE, 
    P_INV_IDS => P_INV_IDS, 
    P_AMNTS => P_AMNTS, 
    P_PMNT_METHOD => P_PMNT_METHOD, 
    P_BANK_AC_FROM => P_BANK_AC_FROM, 
    P_CHECK_NUMBERS => P_CHECK_NUMBERS, 
    P_MEMO => P_MEMO, 
    P_PAY_MULTIPLE => P_PAY_MULTIPLE, 
    P_CRD_IDS => P_CRD_IDS, 
    P_CRD_AMOUNTS => P_CRD_AMOUNTS, 
    O_PY_ID => O_PY_ID 
); 
    DBMS_OUTPUT.PUT_LINE('O_PY_ID = ' || O_PY_ID); 
END; 

Im obtenir erreur sur cette ligne

P_INV_IDS := 32760; 

i vérifié type de

P_INV_IDS WB_PROD.WB_PCK_TYPES.T_IDS; 

qui est en instruction Declare, qui est comme ça

type t_ids is table of t_id 
    index by binary_integer; 

Je DONOT comprendre comment donner paramètre à ce type. S'il vous plaît laissez-moi savoir comment donner ce paramètre.

Merci

Répondre

2

Comment le TY_ t_id est-il défini? Cela dictera comment vous initialisez ce tableau. Si elle était un numéro, alors vous voulez initialiser votre valeur de cette façon:

P_INV_IDS(1) := 32760; 

Cependant, si t_id est défini comme, disons un enregistrement:

TYPE t_id IS RECORD (
    ID INTEGER; 
    DESCRIPTION VARCHAR2(32); 
); 

Ensuite, vous voudrez peut-être initialiser ainsi:

P_INV_IDS(1).id := 32760; 
P_INV_IDS(1).description := 'Description for 32760'; 
Questions connexes