DECLARE p_api_version number; P_init_msg_list VARCHAR2 (200); P_commit VARCHAR2 (200); P_validation_level number; X_return_status VARCHAR2 (200); X_msg_count number; X_msg_data VARCHAR2 (200); P_CASH_RECEIPT_ID number; P_pay_from_customer number; P_comments VARCHAR2 (200); P_PAYMENT_TRXN_EXTENSION_ID number; X_status VARCHAR2 (200); P_CUSTOMER_BANK_ACCOUNT_ID number; P_count number; BEGIN--Fnd_global.apps_initialize (1110, 50683, 222); --P_api_version: = 1.0; P_init_msg_list: = Fnd_api.g_true; P_commit: = Fnd_api.g_false; P_validation_level: = Fnd_api.g_valid_level_full; p_cash_receipt_id: = 78043; --parameter can only specify customer account, no business field p_pay_from_customer: = 1885; --hz_cust_accounts.cust_account_id p_comments: = ' TEST receipt_api '; Ar_receipt_update_api_pub.update_receipT_unid_to_unapp (p_api_version = P_api_version, p _init_msg_list = P_init_msg_list, P_commit = P_commit, P_validation_level = P_va Lidation_level, x_return_status = X_return_status, X_msg_count = X_msg_count, X_msg_data = X_msg_data, p_cash_receipt_id = p_cash_receipt_id, P_pay_from_customer = P_pay_from_customer, P_comm Ents =&Gt p_comments, p_payment_trxn_extension_id = P_payment_trxn_exten sion_id, x_status = X_status, p_customer_bank_account_id = p_customer_bank_account_id); Dbms_output.put_line (' x_return_status = ' | | x_return_status); Dbms_output.put_line (' X_msg_count = ' | | x_msg_count); Dbms_output.put_line (' X_msg_data = ' | | x_msg_data); Dbms_output.put_line (' x_status = ' | | x_status); IF X_msg_count = 1 Then dbms_output.put_line (' L_msg_data ' | | x_msg_data); elsif x_msg_count > 1 then LOOP p_count: = P_count + 1; X_msg_data: = Fnd_msg_pub.get (Fnd_msg_pub.g_next, Fnd_api.g_false); IF X_msg_data is a NULL then EXIT; END IF; Dbms_output.put_line (' Message ' | | | p_count | | ' ---' || X_msg_data); END LOOP; END IF; END;
Use the API to convert AR receivables into the non-write-off status