46: | Database errors : -1 to -30000 |
47: | User defined :common to the package: -30001 to -30009 |
48: | user defined: Procedure specific : -30010 to -30019 |
49: +========================================================================*/
50: PROCEDURE copy_list ( p_old_pricelist_id IN OP_PRCE_MST.PRICELIST_ID%TYPE ,
51: p_pricelist_code IN OP_PRCE_MST.PRICELIST_CODE%TYPE,
52: p_pricelist_desc1 IN OP_PRCE_MST.PRICELIST_DESC1%TYPE,
53: p_pricesort_name IN OP_PRCE_MST.PRICESORT_NAME%TYPE,
54: p_currency_code IN OP_PRCE_MST.CURRENCY_CODE%TYPE ,
47: | User defined :common to the package: -30001 to -30009 |
48: | user defined: Procedure specific : -30010 to -30019 |
49: +========================================================================*/
50: PROCEDURE copy_list ( p_old_pricelist_id IN OP_PRCE_MST.PRICELIST_ID%TYPE ,
51: p_pricelist_code IN OP_PRCE_MST.PRICELIST_CODE%TYPE,
52: p_pricelist_desc1 IN OP_PRCE_MST.PRICELIST_DESC1%TYPE,
53: p_pricesort_name IN OP_PRCE_MST.PRICESORT_NAME%TYPE,
54: p_currency_code IN OP_PRCE_MST.CURRENCY_CODE%TYPE ,
55: p_comments IN OP_PRCE_MST.COMMENTS%TYPE ,
48: | user defined: Procedure specific : -30010 to -30019 |
49: +========================================================================*/
50: PROCEDURE copy_list ( p_old_pricelist_id IN OP_PRCE_MST.PRICELIST_ID%TYPE ,
51: p_pricelist_code IN OP_PRCE_MST.PRICELIST_CODE%TYPE,
52: p_pricelist_desc1 IN OP_PRCE_MST.PRICELIST_DESC1%TYPE,
53: p_pricesort_name IN OP_PRCE_MST.PRICESORT_NAME%TYPE,
54: p_currency_code IN OP_PRCE_MST.CURRENCY_CODE%TYPE ,
55: p_comments IN OP_PRCE_MST.COMMENTS%TYPE ,
56: p_price_change_type IN NUMBER ,
49: +========================================================================*/
50: PROCEDURE copy_list ( p_old_pricelist_id IN OP_PRCE_MST.PRICELIST_ID%TYPE ,
51: p_pricelist_code IN OP_PRCE_MST.PRICELIST_CODE%TYPE,
52: p_pricelist_desc1 IN OP_PRCE_MST.PRICELIST_DESC1%TYPE,
53: p_pricesort_name IN OP_PRCE_MST.PRICESORT_NAME%TYPE,
54: p_currency_code IN OP_PRCE_MST.CURRENCY_CODE%TYPE ,
55: p_comments IN OP_PRCE_MST.COMMENTS%TYPE ,
56: p_price_change_type IN NUMBER ,
57: p_price_change IN NUMBER ,
50: PROCEDURE copy_list ( p_old_pricelist_id IN OP_PRCE_MST.PRICELIST_ID%TYPE ,
51: p_pricelist_code IN OP_PRCE_MST.PRICELIST_CODE%TYPE,
52: p_pricelist_desc1 IN OP_PRCE_MST.PRICELIST_DESC1%TYPE,
53: p_pricesort_name IN OP_PRCE_MST.PRICESORT_NAME%TYPE,
54: p_currency_code IN OP_PRCE_MST.CURRENCY_CODE%TYPE ,
55: p_comments IN OP_PRCE_MST.COMMENTS%TYPE ,
56: p_price_change_type IN NUMBER ,
57: p_price_change IN NUMBER ,
58: p_decimal IN NUMBER ,
51: p_pricelist_code IN OP_PRCE_MST.PRICELIST_CODE%TYPE,
52: p_pricelist_desc1 IN OP_PRCE_MST.PRICELIST_DESC1%TYPE,
53: p_pricesort_name IN OP_PRCE_MST.PRICESORT_NAME%TYPE,
54: p_currency_code IN OP_PRCE_MST.CURRENCY_CODE%TYPE ,
55: p_comments IN OP_PRCE_MST.COMMENTS%TYPE ,
56: p_price_change_type IN NUMBER ,
57: p_price_change IN NUMBER ,
58: p_decimal IN NUMBER ,
59: p_copy_text IN VARCHAR2 ,
56: p_price_change_type IN NUMBER ,
57: p_price_change IN NUMBER ,
58: p_decimal IN NUMBER ,
59: p_copy_text IN VARCHAR2 ,
60: p_user_id IN OP_PRCE_MST.CREATED_BY%TYPE ,
61: p_err_num OUT NOCOPY NUMBER ,
62: p_err_msg OUT NOCOPY VARCHAR2
63: ) IS
64:
64:
65: /*Cursors */
66: CURSOR Cur_prce_mst IS
67: SELECT *
68: FROM op_prce_mst
69: WHERE pricelist_id = p_old_pricelist_id;
70:
71: CURSOR Cur_prce_itm IS
72: SELECT *
81: /* Composites */
82: V_prce_mst Cur_prce_mst%ROWTYPE ;
83:
84: /* Scalars */
85: X_pricelist_id OP_PRCE_MST.PRICELIST_ID%TYPE;
86: X_price_id OP_PRCE_ITM.PRICE_ID%TYPE ;
87: X_breaktype_id OP_PRCE_BRK.BREAKTYPE_ID%TYPE;
88: X_prce_mst_text_code OP_PRCE_MST.TEXT_CODE%TYPE ;
89: X_prce_itm_text_code OP_PRCE_ITM.TEXT_CODE%TYPE ;
84: /* Scalars */
85: X_pricelist_id OP_PRCE_MST.PRICELIST_ID%TYPE;
86: X_price_id OP_PRCE_ITM.PRICE_ID%TYPE ;
87: X_breaktype_id OP_PRCE_BRK.BREAKTYPE_ID%TYPE;
88: X_prce_mst_text_code OP_PRCE_MST.TEXT_CODE%TYPE ;
89: X_prce_itm_text_code OP_PRCE_ITM.TEXT_CODE%TYPE ;
90: X_breakpoint_price OP_PRCE_BRK.BREAKPOINT_PRICE%TYPE;
91: X_base_price OP_PRCE_ITM.BASE_PRICE%TYPE;
92: BEGIN
131: X_prce_mst_text_code := NULL;
132: END IF;
133:
134:
135: /* Now write the OP_PRCE_MST record to the table. */
136: /* When creating a new record, use the original reocrd's currency code */
137: /* if the currency code passed is null. */
138: INSERT INTO OP_PRCE_MST
139: ( pricelist_id ,
134:
135: /* Now write the OP_PRCE_MST record to the table. */
136: /* When creating a new record, use the original reocrd's currency code */
137: /* if the currency code passed is null. */
138: INSERT INTO OP_PRCE_MST
139: ( pricelist_id ,
140: pricelist_desc1 ,
141: pricesort_name ,
142: comments ,