INTRODUCTION
This blog explains how we validate Third Party Registration in oracle apps
–******************************************************
— Checking Third Party Registration(GST)
–******************************************************
BEGIN
SELECT DISTINCT TRIM (TO_CHAR (b.registration_number)) gst_num
INTO lv_gst_num
FROM jai_party_regs a, jai_party_reg_lines b
WHERE 1 = 1
AND a.party_reg_id = b.party_reg_id
AND a.party_type_code = ‘THIRD_PARTY_SITE’
AND b.regime_id = 10000
AND b.registration_type_code = ‘GST’
AND a.party_id = lv_customer_id
AND a.party_site_id = lv_site_use_id;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
lv_status_flag := ‘E’;
lv_err_msg :=
lv_err_msg
|| ‘-‘
|| ‘Invalid GST Customer : ‘
|| lc_dsin_data.depot_name
|| SQLCODE
|| ‘-‘
|| SQLERRM;
apps.fnd_file.put_line (apps.fnd_file.LOG,
‘-‘ || lv_err_msg);
WHEN OTHERS
THEN
lv_status_flag := ‘E’;
lv_err_msg :=
lv_err_msg
|| ‘-‘
|| ‘Customer Is Not Registered :’
|| lc_dsin_data.depot_name
|| SQLCODE
|| ‘-‘
|| SQLERRM;
apps.fnd_file.put_line (apps.fnd_file.LOG,
‘-‘ || lv_err_msg);
END;