@proto

The proto script will generate prototype code for any procedure. The script is included in the sql4oracle.zip.

Example:

TRAIN> @proto HZ_CUSTOMER_PROFILE_V2PUB    
tmp\proto_20100328201822.tmp
@proto2 HZ_CUSTOMER_PROFILE_V2PUB

tmp\proto2_20100328201822.tmp
@proto3 HZ_CUSTOMER_PROFILE_V2PUB NEXT_REVIEW_DATE_COMPUTE 0
@proto3 HZ_CUSTOMER_PROFILE_V2PUB CREATE_CUST_PROFILE_AMT 0
@proto3 HZ_CUSTOMER_PROFILE_V2PUB GET_CUST_PROFILE_AMT_REC 0
@proto3 HZ_CUSTOMER_PROFILE_V2PUB CREATE_CUSTOMER_PROFILE 0
@proto3 HZ_CUSTOMER_PROFILE_V2PUB LAST_REVIEW_DATE_DEFAULT 0
@proto3 HZ_CUSTOMER_PROFILE_V2PUB GET_CUSTOMER_PROFILE_REC 0
@proto3 HZ_CUSTOMER_PROFILE_V2PUB UPDATE_CUSTOMER_PROFILE 0
@proto3 HZ_CUSTOMER_PROFILE_V2PUB UPDATE_CUST_PROFILE_AMT 0

This will 8 prototype scripts – where the HZ_CUSTOMER_PROFILE_V2PUB.UPDATE_CUST_PROFILE_AMT.sql will look like this:

-- *****************************************************************************
-- Oracle PROC script
-- *****************************************************************************
-- copyright 2008 - www.thomaslundqvist.dk
-- *****************************************************************************
-- package       HZ_CUSTOMER_PROFILE_V2PUB
-- procedure     UPDATE_CUST_PROFILE_AMT
-- overload      0
-- extract date  28-mar-2010 20:18
-- *****************************************************************************
declare
P_INIT_MSG_LIST                         VARCHAR2(2000);
P_CUST_PROFILE_AMT_REC                  APPS.HZ_CUSTOMER_PROFILE_V2PUB.CUST_PROFILE_AMT_REC_TYPE;
P_OBJECT_VERSION_NUMBER                 NUMBER;
X_RETURN_STATUS                         VARCHAR2(2000);
X_MSG_COUNT                             NUMBER;
X_MSG_DATA                              VARCHAR2(2000);
BEGIN
--
-- P_INIT_MSG_LIST := '';
-- P_CUST_PROFILE_AMT_REC.CUST_ACCT_PROFILE_AMT_ID := 0;
-- P_CUST_PROFILE_AMT_REC.CUST_ACCOUNT_PROFILE_ID := 0;
-- P_CUST_PROFILE_AMT_REC.CURRENCY_CODE := '';
-- P_CUST_PROFILE_AMT_REC.TRX_CREDIT_LIMIT := 0;
-- P_CUST_PROFILE_AMT_REC.OVERALL_CREDIT_LIMIT := 0;
-- P_CUST_PROFILE_AMT_REC.MIN_DUNNING_AMOUNT := 0;
-- P_CUST_PROFILE_AMT_REC.MIN_DUNNING_INVOICE_AMOUNT := 0;
-- P_CUST_PROFILE_AMT_REC.MAX_INTEREST_CHARGE := 0;
-- P_CUST_PROFILE_AMT_REC.MIN_STATEMENT_AMOUNT := 0;
-- P_CUST_PROFILE_AMT_REC.AUTO_REC_MIN_RECEIPT_AMOUNT := 0;
-- P_CUST_PROFILE_AMT_REC.INTEREST_RATE := 0;
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE_CATEGORY := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE1 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE2 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE3 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE4 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE5 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE6 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE7 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE8 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE9 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE10 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE11 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE12 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE13 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE14 := '';
-- P_CUST_PROFILE_AMT_REC.ATTRIBUTE15 := '';
-- P_CUST_PROFILE_AMT_REC.MIN_FC_BALANCE_AMOUNT := 0;
-- P_CUST_PROFILE_AMT_REC.MIN_FC_INVOICE_AMOUNT := 0;
-- P_CUST_PROFILE_AMT_REC.CUST_ACCOUNT_ID := 0;
-- P_CUST_PROFILE_AMT_REC.SITE_USE_ID := 0;
-- P_CUST_PROFILE_AMT_REC.EXPIRATION_DATE := sysdate;
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE_CATEGORY := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE1 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE2 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE3 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE4 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE5 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE6 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE7 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE8 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE9 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE10 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE11 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE12 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE13 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE14 := '';
-- P_CUST_PROFILE_AMT_REC.JGZZ_ATTRIBUTE15 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE1 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE2 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE3 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE4 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE5 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE6 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE7 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE8 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE9 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE10 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE11 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE12 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE13 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE14 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE15 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE16 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE17 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE18 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE19 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE20 := '';
-- P_CUST_PROFILE_AMT_REC.GLOBAL_ATTRIBUTE_CATEGORY := '';
-- P_CUST_PROFILE_AMT_REC.CREATED_BY_MODULE := '';
-- P_CUST_PROFILE_AMT_REC.APPLICATION_ID := 0;
-- P_OBJECT_VERSION_NUMBER := 0;
--
HZ_CUSTOMER_PROFILE_V2PUB.UPDATE_CUST_PROFILE_AMT
(P_INIT_MSG_LIST                          => P_INIT_MSG_LIST
,P_CUST_PROFILE_AMT_REC                   => P_CUST_PROFILE_AMT_REC
,P_OBJECT_VERSION_NUMBER                  => P_OBJECT_VERSION_NUMBER
,X_RETURN_STATUS                          => X_RETURN_STATUS
,X_MSG_COUNT                              => X_MSG_COUNT
,X_MSG_DATA                               => X_MSG_DATA
);
--
for i in 1..x_msg_count loop
x_msg_data := x_msg_data || FND_MSG_PUB.Get(p_encoded => FND_API.G_TRUE );
END loop;
--
x_status := x_status || x_return_status;
x_msg_data1 := substr(x_msg_data,1,125);
--
if x_return_status = 'S' then
commit;
else
rollback;
end if;
--
end;
/

Leave a Reply