19.6 Configuring Issuing State & Country
This section describes how to configure Issuing State & Country.
To add the Issuing State drop-down to Customer Identification Document grid, you must configure the KDD_STATES and KDD_STATES_TL tables.
To populate the country ID:
Populate the KDD_COUNTRYtable using the below query. This query will select the
data from STG_COUNTRY_MASTER and insert into KDD_COUNTRY
table:
INSERT INTO
kdd_country(country_id, country_cd,
country_nm, country_desc)WITH country_data
AS(SELECT DISTINCT
v_iso_country_cd, v_country_name, v_country_desc FROM
stg_country_masterWHERE TO_DATE(fic_mis_date,
'DD-Mon-YY') = TO_DATE(?, 'DD-Mon-YY'))SELECT
cm_geography_seq.nextval, v_iso_country_cd, v_country_name,
v_country_descFROM country_data WHERE NOT
EXISTS (SELECT 1FROM kdd_country
kcWHERE kc.country_cd =
country_data.v_iso_country_cd);
To add the Issuing State drop-down to Customer Identification Document grid, you must configure the KDD_STATES and KDD_STATES_TL tables.
To insert KDD_STATES/KDD_STATES_TL, use the following sample
statements:
INSERT INTO
KDD_STATES(STATE_ID, STATE_CD,
STATE_NM, STATE_DESC, COUNTRY_CD)VALUES(1, 'KB', 'Kabul',
'Kabul', 'AF');INSERT INTO
KDD_STATES(STATE_ID, STATE_CD,
STATE_NM, STATE_DESC, COUNTRY_CD)VALUES(2, 'BA',
'Badakhshan', 'Badakhshan', 'AF');INSERT INTO
KDD_STATES(STATE_ID, STATE_CD,
STATE_NM, STATE_DESC, COUNTRY_CD)VALUES(3, 'BD', 'Badghis',
'Badghis', 'AF');INSERT INTO
KDD_STATES(STATE_ID, STATE_CD,
STATE_NM, STATE_DESC, COUNTRY_CD)VALUES(4, 'HE', 'Herat',
'Herat', 'AF');
INSERT INTO
KDD_STATES_TL(V_LOCALE_CD, STATE_ID,
STATE_CD, STATE_NM, STATE_DESC, V_CREATED_BY, D_CREATED_DT,
V_SOURCE_LOCALE)VALUES('en_US', 1, 'KB',
'Kabul', 'Kabul', NULL, NULL, 'en_US');INSERT INTO
KDD_STATES_TL(V_LOCALE_CD, STATE_ID,
STATE_CD, STATE_NM, STATE_DESC, V_CREATED_BY, D_CREATED_DT,
V_SOURCE_LOCALE)VALUES('en_US', 2, 'BA',
'Badakhshan', 'Badakhshan', NULL, NULL, 'en_US');INSERT INTO
KDD_STATES_TL(V_LOCALE_CD, STATE_ID,
STATE_CD, STATE_NM, STATE_DESC, V_CREATED_BY, D_CREATED_DT,
V_SOURCE_LOCALE)VALUES('en_US', 3, 'BD',
'Badghis', 'Badghis', NULL, NULL, 'en_US');INSERT INTO
KDD_STATES_TL(V_LOCALE_CD, STATE_ID,
STATE_CD, STATE_NM, STATE_DESC, V_CREATED_BY, D_CREATED_DT,
V_SOURCE_LOCALE)
VALUES('en_US', 4, 'HE', 'Herat', 'Herat', NULL, NULL,
'en_US');
Note:
States in the KDD_STATES table must have a country value that corresponds to an entry in the kdd_country field. If mapping is not done properly then it will not appear in the UI. It will display an empty dropdown in the States field.