# Business Logic — JFUTelOptSvcMskmCmpCC.convOpSvcList() [315 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JFUTelOptSvcMskmCmpCC` |
| Layer | CC / Common Component (Business logic coordinator within the EJB tier) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JFUTelOptSvcMskmCmpCC.convOpSvcList()

The `convOpSvcList` method performs **option service list configuration processing** for the K-Opticom customer backbone system, specifically handling the registration and cancellation of telephone option and sub-option services during a telephone option pack application flow. It serves as the central data-conversion and validation coordinator within the `JFUTelOptSvcMskmCmpCC` component — a common component product for telephone option pack registration/cancellation (CMP).

The method performs a **four-stage workflow**:

1. **Parent contract status acquisition** — It queries the service contract internal agreement status (`EKK0161A010`) to retrieve the current contract state (`svc_kei_ucwk_stat`), the generation addition datetime for SOD data, and the service charge start date. These values are essential for downstream service contract operations.

2. **Current service contract inquiry** — It queries the existing telephone option service contracts via `EKK0081B508` to build a snapshot of currently active option and sub-option services, which is used for conflict detection and contract number lookups.

3. **Option/sub-option contract data transformation** — It iterates through the incoming `dataList` of service detail entries, setting standardized fields (service contract number, SYSID, service charge generation datetime, etc.) and resolving pricing codes (price code and price plan code) using static mapping tables. For sub-option services, it maps the sub-option service code to its parent option service code using `OP_SVC_CD_MAPPING_MAP`.

4. **Conflict and consistency validation** — For registration entries (`app_div = "1"`), it checks whether the requested option/sub-option service codes already exist in the active contract list, throwing an error if a duplicate in-progress contract is detected. For cancellation entries (`app_div = "2"`), it resolves the before-change service contract numbers and validates that a valid pre-existing contract is referenced. It also detects migration reservation conflicts for cancellations.

5. **Pack inclusion logic (Check mode)** — When running in check mode (`func_cd = "2"`), the method optionally constructs option and pack inclusion sets, updating them based on registration/cancellation entries, and validates that requested pack services do not have migration reservations. It also ensures that if no option contracts remain after processing, at least one valid pack service is available.

The method implements the **delegation pattern** by calling specialized helper methods (`setInMapEKK0161A010`, `setInMapEKK0081B508`, `createTelPackOpConstInfo`, `updateTelPackSetList`, `createTelPackWribConstInfo`) and **route-dispatch logic** based on the `app_div` processing category and `func_cd` function code.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["convOpSvcList(params)"])

    START --> READ_INPUT["Read input data from param.getData(fixedText)"]

    READ_INPUT --> SYSID_SET["Set SYSID, svc_kei_no, svc_kei_kaisen_ucwk_no, telno, svc_kei_ucwk_no into inMap"]

    SYSID_SET --> INIT_EKK0161["Initialize EKK0161A010 data (service contract internal agreement inquiry)"]

    INIT_EKK0161 --> SET_MAP_0161["setInMapEKK0161A010 param mapping"]

    SET_MAP_0161 --> EXEC_0161["executeSC: EKK0161A010 (service contract internal agreement inquiry)"]

    EXEC_0161 --> GET_0161_DATA["Extract svc_kei_ucwk_stat, gene_add_dtm, svc_chrg_staymd from template"]

    GET_0161_DATA --> SET_0161_RESULT["Set EKK0161_SVC_KEI_UCWK_STAT and EKK0161_SVC_CHRG_STAYMD into inMap"]

    SET_0161_RESULT --> INIT_EKK0081["Initialize EKK0081B508 data (eo optical telephone service contract info inquiry)"]

    INIT_EKK0081 --> IGNORE_ERR["ignoreSearchError (no error on search)"]

    IGNORE_ERR --> SET_MAP_0081["setInMapEKK0081B508 param mapping"]

    SET_MAP_0081 --> EXEC_0081["executeSC: EKK0081B508 (telephone option service contract info inquiry)"]

    EXEC_0081 --> GET_OP_LIST["Get opList from template (current active option services)"]

    GET_OP_LIST --> CHECK_FUNC_CD{func_cd equals FUNC_CD_2 (Check mode)?}

    CHECK_FUNC_CD -->|Yes| CREATE_OPT_INFO["createTelPackOpConstInfo(opList) -> build telPackOptionSetList"]

    CHECK_FUNC_CD -->|No| MAIN_LOOP_START

    CREATE_OPT_INFO --> PROCESS_CANCEL_FIRST["Loop dataList: process cancellation entries (app_div = 2) first"]

    PROCESS_CANCEL_FIRST --> UPDATE_OPT_SET_CANCEL["updateTelPackSetList with OPPACK_SVC_CD_YUKO, setValid=false"]

    UPDATE_OPT_SET_CANCEL --> LOOP_CANCEL_NEXT{More cancellation entries?}

    LOOP_CANCEL_NEXT -->|Yes| PROCESS_CANCEL_FIRST

    LOOP_CANCEL_NEXT -->|No| PROCESS_REGISTER["Loop dataList: process registration entries (app_div = 1)"]

    PROCESS_REGISTER --> UPDATE_OPT_SET_REGISTER["updateTelPackSetList with OPPACK_SVC_CD_YUKO, setValid=true"]

    UPDATE_OPT_SET_REGISTER --> LOOP_REGISTER_NEXT{More registration entries?}

    LOOP_REGISTER_NEXT -->|Yes| PROCESS_REGISTER

    LOOP_REGISTER_NEXT -->|No| MAIN_LOOP_START

    MAIN_LOOP_START["Loop dataList: main processing"]

    MAIN_LOOP_START --> SET_MSKM_DIV["Set mskm_div, sysid, svc_kei_no, svc_kei_ucwk_no, seiky_kei_no, op_svc_kei_no, sbop_svc_kei_no, chaf_svc_kei_ucwk_gene_add_dtm into dtlMap"]

    SET_MSKM_DIV --> CHECK_OP_SVC_MAP{Does OP_SVC_CD_MAPPING_MAP NOT contain op_sbop_svc_cd?}

    CHECK_OP_SVC_MAP -->|No (sub-option service)| SET_SVC_DIV_2["Set svc_div=2 (sub-option)
op_svc_cd = mapped value from OP_SVC_CD_MAPPING_MAP
sbop_svc_cd = op_sbop_svc_cd
pcrs_cd = PCRS_CD_KK0351_MAPPING_MAP.get(sbop_svc_cd)
pplan_cd = PPLAN_CD_KK0351_MAPPING_MAP.get(sbop_svc_cd)"]

    SET_SVC_DIV_2 --> CHECK_APP_DIV_A

    CHECK_OP_SVC_MAP -->|Yes (option service)| SET_SVC_DIV_1["Set svc_div=1 (option)
op_svc_cd = op_sbop_svc_cd
pcrs_cd = PCRS_CD_KK0601_MAPPING_MAP.get(op_svc_cd)
pplan_cd = PPLAN_CD_KK0601_MAPPING_MAP.get(op_svc_cd)"]

    SET_SVC_DIV_1 --> CHECK_APP_DIV_A

    CHECK_APP_DIV_A{app_div = 1 (Registration)?}

    CHECK_APP_DIV_A -->|Yes| REG_CHECK_LOOP["Loop opList: conflict detection for registration"]

    CHECK_APP_DIV_A -->|No| CHECK_APP_DIV_B

    CHECK_APP_DIV_B{app_div = 2 (Cancellation)?}

    CHECK_APP_DIV_B -->|Yes| CANCEL_CHECK_LOOP["Loop opList: contract number lookup for cancellation"]

    CHECK_APP_DIV_B -->|No| CHECK_PACK_A

    REG_CHECK_LOOP --> CHECK_SVC_DIV_2_A{svc_div = 2 AND op_svc_cd match?}

    CHECK_SVC_DIV_2_A -->|Yes| SET_OP_CONTRACT_INFO["Set op_svc_kei_no, chaf_opsvkei_no, chaf_opsvkei_gene_add_dtm, chbf_opsvkei_no, chbf_opsvkei_gene_add_dtm from dataMap"]

    CHECK_SVC_DIV_2_A -->|No| CHECK_OP_SVC_MATCH_A

    SET_OP_CONTRACT_INFO --> CHECK_OP_SVC_MATCH_A{op_sbop_svc_cd equals opSvcCd?}

    CHECK_OP_SVC_MATCH_A -->|Yes| ERROR_DUPLICATE_OPT["setErrorField(op_svc_cd_err)
throw SCCallException: Already in-progress with same content"]

    CHECK_OP_SVC_MATCH_A -->|No| CHECK_SBOP_MATCH_A{op_sbop_svc_cd equals sbopSvcCd?}

    CHECK_SBOP_MATCH_A -->|Yes| ERROR_DUPLICATE_SBOP["setErrorField(op_svc_cd_err)
throw SCCallException: Already in-progress with same content"]

    CHECK_SBOP_MATCH_A -->|No| REG_LOOP_NEXT{More opList entries?}

    REG_LOOP_NEXT -->|Yes| REG_CHECK_LOOP

    REG_LOOP_NEXT -->|No| CHECK_PACK_A

    ERROR_DUPLICATE_OPT --> END_METHOD

    ERROR_DUPLICATE_SBOP --> END_METHOD

    CANCEL_CHECK_LOOP --> CHECK_SBOP_CONTRACT_MATCH{sbop_svc_kei_no equals data sbop_svc_kei_no?}

    CHECK_SBOP_CONTRACT_MATCH -->|Yes| SET_SBOP_CONTRACT_INFO["Set op_svc_kei_no, chaf_sbopsvkei_no, chaf_sbopsvkei_gene_add_dtm, chbf_sbopsvkei_no, chbf_sbopsvkei_gene_add_dtm from dataMap"]

    CHECK_SBOP_CONTRACT_MATCH -->|No| CHECK_OP_CONTRACT_MATCH{op_svc_kei_no equals data op_svc_kei_no?}

    SET_SBOP_CONTRACT_INFO --> CHECK_OP_CONTRACT_MATCH

    CHECK_OP_CONTRACT_MATCH -->|Yes| CHECK_IDO_RSV{kk0351_ido_rsv_dtl_cd is set?}

    CHECK_OP_CONTRACT_MATCH -->|No| CANCEL_LOOP_NEXT{More opList entries?}

    CHECK_IDO_RSV -->|Yes| ERROR_MIGRATION_RESV["setErrorField(ido_rsv_dtl_cd_err)
throw SCCallException: Migration reservation exists for option/sub-option"]

    CHECK_IDO_RSV -->|No| SET_OP_CONTRACT_INFO_CANCEL["Set chaf_opsvkei_no, chaf_opsvkei_gene_add_dtm, chbf_opsvkei_no, chbf_opsvkei_gene_add_dtm, n_050_op_telno, zm0111_upd_dtm_bf from dataMap"]

    ERROR_MIGRATION_RESV --> END_METHOD

    SET_OP_CONTRACT_INFO_CANCEL --> CANCEL_LOOP_NEXT

    CANCEL_LOOP_NEXT -->|Yes| CANCEL_CHECK_LOOP

    CANCEL_LOOP_NEXT -->|No| CHECK_CHBF_OPSVKEI{chbf_opsvkei_no is null?}

    CHECK_CHBF_OPSVKEI -->|Yes| ERROR_NO_CONTRACT["setErrorField(op_svc_kei_no_err)
throw SCCallException: Not in valid contract state"]

    CHECK_CHBF_OPSVKEI -->|No| CHECK_PACK_A

    ERROR_NO_CONTRACT --> END_METHOD

    CHECK_PACK_A{func_cd = FUNC_CD_2 AND pack_list not empty AND op_sbop_svc_cd in OPPACK_SVC_CD_YUKO?}

    CHECK_PACK_A -->|Yes| CHECK_PACK_EMPTY{packList.size() == 0?}

    CHECK_PACK_EMPTY -->|Yes| ADD_EMPTY_PACKET["packList.add(new HashMap)"]

    CHECK_PACK_EMPTY -->|No| MAIN_LOOP_END{More dataList entries?}

    ADD_EMPTY_PACKET --> MAIN_LOOP_END

    MAIN_LOOP_END -->|Yes| MAIN_LOOP_START

    MAIN_LOOP_END -->|No| CHECK_PACK_B

    CHECK_PACK_B{func_cd = FUNC_CD_2 AND packList.size() > 0?}

    CHECK_PACK_B -->|Yes| PACK_CHECK_LOOP["Loop opList: pack-inclusion validation"]

    PACK_CHECK_LOOP --> SKIP_NON_PACK{opSvcCd AND sbopSvcCd NOT in OPPACK_SVC_CD_YUKO?}

    SKIP_NON_PACK -->|Yes| PACK_LOOP_NEXT{More opList entries?}

    SKIP_NON_PACK -->|No| CHECK_PACK_IDO_RSV{kk0351_ido_rsv_dtl_cd OR kk0401_ido_rsv_dtl_cd set?}

    CHECK_PACK_IDO_RSV -->|Yes| ERROR_PACK_MIGRATION["setErrorField(ido_rsv_dtl_cd_err)
throw SCCallException: Migration reservation exists for pack service"]

    CHECK_PACK_IDO_RSV -->|No| PACK_LOOP_NEXT{More opList entries?}

    PACK_LOOP_NEXT -->|Yes| PACK_CHECK_LOOP

    PACK_LOOP_NEXT -->|No| CHECK_PACK_C

    ERROR_PACK_MIGRATION --> END_METHOD

    CHECK_PACK_C{func_cd = FUNC_CD_2 AND telPackOptionSetList.size() == 0?}

    CHECK_PACK_C -->|Yes| CREATE_WRIB_CONST["createTelPackWribConstInfo(handle, param, fixedText, svc_kei_ucwk_no)"]

    CREATE_WRIB_CONST --> PROCESS_PACK_CANCEL["Loop packList: process cancellation (app_div=2, pack_div in PACK_DIV_YUKO)"]

    PROCESS_PACK_CANCEL --> UPDATE_WRIB_SET_CANCEL["updateTelPackSetList with PACK_DIV_YUKO, setValid=false"]

    UPDATE_WRIB_SET_CANCEL --> PACK_CANCEL_NEXT{More packList entries?}

    PACK_CANCEL_NEXT -->|Yes| PROCESS_PACK_CANCEL

    PACK_CANCEL_NEXT -->|No| PROCESS_PACK_REGISTER["Loop packList: process registration (app_div=1, pack_div in PACK_DIV_YUKO)"]

    PROCESS_PACK_REGISTER --> UPDATE_WRIB_SET_REGISTER["updateTelPackSetList with PACK_DIV_YUKO, setValid=true"]

    UPDATE_WRIB_SET_REGISTER --> PACK_REGISTER_NEXT{More packList entries?}

    PACK_REGISTER_NEXT -->|Yes| PROCESS_PACK_REGISTER

    PACK_REGISTER_NEXT -->|No| CHECK_WRIB_SET{telPackWribSetList.size() > 0?}

    CHECK_WRIB_SET -->|Yes| ERROR_PACK_DIV["setErrorField(op_pack_list_err)
throw SCCallException: Pack division setting error (4009)"]

    CHECK_WRIB_SET -->|No| END_METHOD

    ERROR_PACK_DIV --> END_METHOD

    CHECK_PACK_C -->|No| END_METHOD
    CHECK_PACK_B -->|No| END_METHOD
    CHECK_FUNC_CD -->|No| MAIN_LOOP_START

    END_METHOD(["Return / Next"])
```

### Key Constant Resolution

| Constant | Resolved Value | Business Meaning |
|----------|---------------|-----------------|
| `JPCModelConstant.FUNC_CD_2` | `"2"` | Check mode — validation only, no registration |
| `APP_DIV` | `"app_div"` | Processing category field: "1"=Registration, "2"=Cancellation |
| `OP_SBOP_SVC_CD` | `"op_sbop_svc_cd"` | Option/Sub-option service code |
| `PACK_DIV_YUKO` | `["1", "2", "3"]` | Valid pack divisions (Pack 3, Pack 7, Anshin Phone Pack) |
| `OPPACK_SVC_CD_YUKO` | Service code list | Valid option pack services: B023, B024, B025, B026, B027, B135, D07, D08 |
| `OP_SVC_CD_MAPPING_MAP` | Map | Sub-option mapping: D07→B024 (call forwarding sub), D08→B025 (anonymous blocking sub) |
| `PCRS_CD_KK0601_MAPPING_MAP` | Map | Price code mapping for option services (69 types) |
| `PPLAN_CD_KK0601_MAPPING_MAP` | Map | Price plan mapping for option services (69 types) |
| `PCRS_CD_KK0351_MAPPING_MAP` | Map | Price code mapping for sub-option services (D07→D07, D08→D08) |
| `PPLAN_CD_KK0351_MAPPING_MAP` | Map | Price plan mapping for sub-option services (D07→PD0701, D08→PD0801) |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle for executing SC (Service Component) calls. Provides connection context to the K-Opticom backend. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter container carrying business data between screens, CCs, and SCs. Used to read input data, write template data, and set error control fields. |
| 3 | `fixedText` | `String` | Service message key used as a namespace prefix for request parameter grouping. All data for this method call is organized under this fixed key in the `param` object. |
| 4 | `dataList` | `ArrayList<HashMap>` | List of option service detail entries, each representing a registration (`app_div="1"`) or cancellation (`app_div="2"`) request for option/sub-option services. Each map contains the service code, processing category, and optionally existing contract numbers. |
| 5 | `packList` | `ArrayList<HashMap>` | List of option pack details specifying which telephone pack services are involved and their processing categories. Used only in check mode to validate pack-inclusion logic and division settings. |

**External state read:**

| Field | Description |
|-------|-------------|
| `OP_SVC_CD_MAPPING_MAP` | Static mapping from sub-option service codes to parent option service codes (D07→B024, D08→B025) |
| `PCRS_CD_KK0601_MAPPING_MAP` | Price code mapping for option services (CD00136_B023-B135 to CD00134_B27-BE6) |
| `PPLAN_CD_KK0601_MAPPING_MAP` | Price plan mapping for option services (CD00136_B023-B135 to CD00565_PB2701-PBE601) |
| `PCRS_CD_KK0351_MAPPING_MAP` | Price code mapping for sub-option services (CD00137_D07→D07, CD00137_D08→D08) |
| `PPLAN_CD_KK0351_MAPPING_MAP` | Price plan mapping for sub-option services (CD00137_D07→PD0701, CD00137_D08→PD0801) |
| `OPPACK_SVC_CD_YUKO` | List of valid option pack service codes for pack-inclusion checks |
| `PACK_DIV_YUKO` | List of valid pack divisions: "1", "2", "3" |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JFUBPCommon.initData` | - | - | Initializes request data template for EKK0161A010 and EKK0081B508 |
| R | `JFUBPCommon.ignoreSearchError` | - | - | Disables search error handling for EKK0081B508 (allow empty results) |
| R | `setInMapEKK0161A010` | - | - | Maps input parameters for EKK0161A010 service contract internal agreement inquiry |
| C | `JFUBPCommon.executeSC` | EKK0161A010 | KK_T_SVC_KEI_UCWK (implied) | Service contract internal agreement inquiry — retrieves svc_kei_ucwk_stat, gene_add_dtm, svc_chrg_staymd |
| R | `JFUBPCommon.getTemplateListValue` | EKK0161A010 | KK_T_SVC_KEI_UCWK (implied) | Extracts svc_kei_ucwk_stat, gene_add_dtm, svc_chrg_staymd from SC response |
| R | `setInMapEKK0081B508` | - | - | Maps input parameters for EKK0081B508 telephone option service contract info inquiry |
| R | `JFUBPCommon.executeSC` | EKK0081B508 | KK_T_OPSVKEI_ISP (implied) | Telephone option service contract info inquiry — retrieves current active option/sub-option services |
| R | `JFUBPCommon.getTemplateList` | EKK0081B508 | KK_T_OPSVKEI_ISP (implied) | Retrieves list of current option services with their codes and contract numbers |
| R | `JFUBPCommon.isNull` | - | - | Null-check utility for various field values across the method |
| R | `JFUBPCommon.getMaxTempTempleteKey` | - | - | Gets maximum template key for EKK0161A010 response data |
| R | `JFUBPCommon.getTemplateListValue` | - | - | Extracts template list values for service status and datetime fields |
| R | `JFUBPCommon.nvl` | - | - | Null-safe value extraction for op_svc_kei_no and sbop_svc_kei_no |
| C | `createTelPackOpConstInfo` | - | - | Creates option set constant info from current opList for check-mode packet processing |
| C | `updateTelPackSetList` | - | - | Updates the telPackOptionSetList or telPackWribSetList with valid/invalid flag for registration/cancellation |
| R | `createTelPackWribConstInfo` | - | - | Creates writable constant info for pack processing (calls executeOdrHakkoJokenAdd internally) |
| R | `setErrorField` | - | - | Sets error field key in control map for error detection by the caller |

**How SC Codes are identified:**
- `EKK0161A010` — Service contract internal agreement inquiry (from `TEMP_ID_EKK0161A010`). Queries service contract internal agreement data.
- `EKK0081B508` — eo Optical Telephone Service Contract Info Inquiry (from `TEMP_ID_EKK0081B508`). Queries current option service contracts including op_svc_cd, sbop_svc_cd, op_svc_kei_no, sbop_svc_kei_no, and migration reservation codes.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0043 | `KKSV0043OPOperation` → `JKKTelSelectOpPackOperateCC.execute(KKSV004304CC)` → `JFUTelOptSvcMskmCmpCC.setSaveData()` → `JFUTelOptSvcMskmCmpCC.convOpSvcList()` | `executeOdrHakkoJokenAdd [C] KK_T_ODR_HAKKO_JOKEN`, `updateTelPackSetList [U] in-memory set`, `createTelPackWribConstInfo [C] in-memory/set` |

**Note:** `convOpSvcList` is called as a subroutine from `setSaveData` within the same class `JFUTelOptSvcMskmCmpCC`. The `setSaveData` method is the primary entry point invoked from `JKKTelSelectOpPackOperateCC.execute()` (the main operation component coordinator for telephone option pack operations). The KKSV0043 screen operation configures this via the `target6` CCRequestBroker pointing to `JKKTelSelectOpPackOperateCC.execute`.

**Terminal operations from this method:** `setErrorField` (error field setter), `updateTelPackSetList` (U — updates in-memory HashSet of option pack services), `createTelPackWribConstInfo` (C — creates writable pack constants), `createTelPackOpConstInfo` (C — creates option constants from opList), `isNull` (R — null checks).

## 6. Per-Branch Detail Blocks

### Block 1 — User data acquisition (L3911–L3923)

Retrieves input data from the request parameter and populates the inMap with SYSID and service contract identifiers.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMap = param.getData(fixedText)` // Retrieve input HashMap from request parameter [-> `fixedText` is service message key] |
| 2 | SET | `inMap.put(IN_SYSID, inMap.get("sysid"))` // Set SYSID [-> `IN_SYSID = "in_sysid"`] |
| 3 | SET | `inMap.put(IN_SVC_KEI_NO, inMap.get("svc_kei_no"))` // Set service contract number [-> `IN_SVC_KEI_NO = "in_svc_kei_no"`] |
| 4 | SET | `inMap.put(IN_SVC_KEI_KAISEN_UCWK_NO, inMap.get("svc_kei_kaisen_ucwk_no"))` // Set service contract line item revision number [-> `IN_SVC_KEI_KAISEN_UCWK_NO = "in_svc_kei_kaisen_ucwk_no"`] |
| 5 | SET | `inMap.put(IN_TELNO, inMap.get("telno"))` // Set telephone number [-> `IN_TELNO = "in_telno"`] |
| 6 | SET | `svcKeiUcwkNo = (String)inMap.get("svc_kei_ucwk_no")` // Extract service contract internal agreement number |
| 7 | SET | `inMap.put(IN_SVC_KEI_UCWK_NO, svcKeiUcwkNo)` // Set service contract internal agreement number [-> `IN_SVC_KEI_UCWK_NO = "in_svc_kei_ucwk_no"`] |

### Block 2 — EKK0161A010: Service contract internal agreement inquiry (L3926–L3947)

Initializes, maps, and executes the service contract internal agreement inquiry SC to retrieve the current contract status, generation addition datetime, and service charge start date.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0161A010)` // Initialize data with column list for EKK0161A010 |
| 2 | CALL | `setInMapEKK0161A010(param, fixedText, inMap)` // Map inMap fields into param for SC execution |
| 3 | CALL | `JFUBPCommon.executeSC(handle, param, fixedText, TEMP_ID_EKK0161A010, TEMP_ID_DTL_EKK0161A010, IN_COL_LIST_EKK0161A010, ERR_COL_EKK0161A010)` // Execute SC: EKK0161A010 (Service contract internal agreement inquiry) |
| 4 | SET | `svcKeiUcwkStat = JFUBPCommon.getTemplateListValue(...)` // Extract service contract internal agreement status [-> `EKK0161A010CBSMsg1List.SVC_KEI_UCWK_STAT`] |
| 5 | SET | `geneAddDtm = JFUBPCommon.getTemplateListValue(...)` // Extract generation addition datetime [-> `EKK0161A010CBSMsg1List.GENE_ADD_DTM`] |
| 6 | SET | `svcChrgStaYmd = JFUBPCommon.getTemplateListValue(...)` // Extract service charge start date [-> `EKK0161A010CBSMsg1List.SVC_CHRG_STAYMD`] |
| 7 | SET | `inMap.put(EKK0161_SVC_KEI_UCWK_STAT, svcKeiUcwkStat)` // Store service contract status [-> `EKK0161_SVC_KEI_UCWK_STAT = "kk0161_svcKeiUcwkStat"`] |
| 8 | SET | `inMap.put(EKK0161_SVC_CHRG_STAYMD, svcChrgStaYmd)` // Store service charge start date [-> `EKK0161_SVC_CHRG_STAYMD = "kk0161_svcChrgStaymd"`] |

### Block 3 — EKK0081B508: Telephone option service contract info inquiry (L3950–L3963)

Initializes, maps, and executes the telephone option service contract inquiry SC to get a snapshot of currently active option/sub-option services.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0081B508)` // Initialize data with column list |
| 2 | CALL | `JFUBPCommon.ignoreSearchError(param, fixedText)` // Disable search error — allow empty results |
| 3 | CALL | `setInMapEKK0081B508(param, fixedText)` // Map input params for EKK0081B508 SC |
| 4 | CALL | `JFUBPCommon.executeSC(handle, param, fixedText, TEMP_ID_EKK0081B508, TEMP_ID_DTL_EKK0081B508, IN_COL_LIST_EKK0081B508, ERR_COL_EKK0081B508)` // Execute SC: EKK0081B508 |
| 5 | SET | `opList = JFUBPCommon.getTemplateList(...)` // Get list of current option services from template [-> `TEMP_TEMP_KEY_EKK0081B508`] |

### Block 4 — Check mode branch: Option set constant creation (L3965–L3972)

When in check mode (`func_cd = "2"`), creates the option set constant info from the current active option list.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JPCModelConstant.FUNC_CD_2.equals(inMap.get(IN_FUNC_CD))` — [-> `FUNC_CD_2 = "2"` (Check mode)] |
| 2 | SET | `telPackOptionSetList = createTelPackOpConstInfo(opList)` // Build option set from current active services |

### Block 5 — Check mode: Process cancellations first (L3975–L3987)

Iterates through `dataList` to process cancellation entries (`app_div = "2"`) first, updating the option set list.

**Block 5.1** — FOR_LOOP `(for HashMap dtlMap : dataList)`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!JFUBPCommon.isNull(dtlMap.get(OP_SBOP_SVC_CD))` — Has option/sub-option service code |
| 2 | IF | `"2".equals(dtlMap.get(APP_DIV))` — [-> `APP_DIV = "app_div"`, "2" = Cancellation] |
| 3 | SET | `telPackOptionSetList = updateTelPackSetList(telPackOptionSetList, OPPACK_SVC_CD_YUKO, (String)dtlMap.get(OP_SBOP_SVC_CD), false)` // Update set with valid=false (cancellation) |

### Block 6 — Check mode: Process registrations (L3990–L4003)

Iterates through `dataList` to process registration entries (`app_div = "1"`), updating the option set list.

**Block 6.1** — FOR_LOOP `(for HashMap dtlMap : dataList)`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!JFUBPCommon.isNull(dtlMap.get(OP_SBOP_SVC_CD))` — Has option/sub-option service code |
| 2 | IF | `"1".equals(dtlMap.get(APP_DIV))` — [-> `APP_DIV = "app_div"`, "1" = Registration] |
| 3 | SET | `telPackOptionSetList = updateTelPackSetList(telPackOptionSetList, OPPACK_SVC_CD_YUKO, (String)dtlMap.get(OP_SBOP_SVC_CD), true)` // Update set with valid=true (registration) |

### Block 7 — Main processing loop: Data population (L4006–L4038)

The main loop iterates through all entries in `dataList`, populating each with standardized fields and resolving pricing codes.

**Block 7.1** — FOR_LOOP `(for HashMap dtlMap : dataList)`

| # | Type | Code |
|---|------|------|
| 1 | SET | `dtlMap.put("mskm_div", dtlMap.get(APP_DIV))` // Copy processing category to mskm_div |
| 2 | SET | `dtlMap.put("sysid", inMap.get("sysid"))` // Inherit SYSID from inMap |
| 3 | SET | `dtlMap.put("svc_kei_no", inMap.get("svc_kei_no"))` // Inherit service contract number |
| 4 | SET | `dtlMap.put("svc_kei_ucwk_no", inMap.get("svc_kei_ucwk_no"))` // Inherit service contract internal agreement number |
| 5 | SET | `dtlMap.put("seiky_kei_no", inMap.get("seiky_kei_no"))` // Inherit billing contract number |
| 6 | SET | `dtlMap.put("op_svc_kei_no", JFUBPCommon.nvl((String)dtlMap.get("op_svc_kei_no"), JFUStrConst.EMPTY))` // Null-safe option contract number |
| 7 | SET | `dtlMap.put("sbop_svc_kei_no", JFUBPCommon.nvl((String)dtlMap.get("sbop_svc_kei_no"), JFUStrConst.EMPTY))` // Null-safe sub-option contract number |
| 8 | SET | `dtlMap.put("chaf_svc_kei_ucwk_gene_add_dtm", geneAddDtm)` // Set SOD generation addition datetime |

#### Block 7.1.1 — Option service branch (no sub-option mapping)

**Block 7.1.1** — IF `(NOT OP_SVC_CD_MAPPING_MAP.containsKey(dtlMap.get(OP_SBOP_SVC_CD)))` — [-> This is an option service, not a sub-option]

| # | Type | Code |
|---|------|------|
| 1 | SET | `dtlMap.put("svc_div", "1")` // svc_div = 1 indicates Option service |
| 2 | SET | `dtlMap.put("op_svc_cd", dtlMap.get(OP_SBOP_SVC_CD))` // Option service code = raw value |
| 3 | SET | `dtlMap.put("pcrs_cd", PCRS_CD_KK0601_MAPPING_MAP.get(dtlMap.get("op_svc_cd")))` // Map price code: B023→B27, B024→B28, B025→B29, B026→B30, B027→B31, B028→B32, B029→B33, B071→B75, B135→BE6 |
| 4 | SET | `dtlMap.put("pplan_cd", PPLAN_CD_KK0601_MAPPING_MAP.get(dtlMap.get("op_svc_cd")))` // Map price plan: B023→PB2701, B024→PB2801, B025→PB2901, B026→PB3001, B027→PB3101, B028→PB3201, B029→PB3301, B071→PB7501, B135→PBE601 |

#### Block 7.1.2 — Sub-option service branch (has sub-option mapping)

**Block 7.1.2** — ELSE (sub-option service) — [-> `OP_SVC_CD_MAPPING_MAP.containsKey(...)` is true]

| # | Type | Code |
|---|------|------|
| 1 | SET | `dtlMap.put("svc_div", "2")` // svc_div = 2 indicates Sub-option service |
| 2 | SET | `dtlMap.put("op_svc_cd", OP_SVC_CD_MAPPING_MAP.get(dtlMap.get(OP_SBOP_SVC_CD)))` // Map sub-option to parent option: D07→B024, D08→B025 |
| 3 | SET | `dtlMap.put("sbop_svc_cd", dtlMap.get(OP_SBOP_SVC_CD))` // Sub-option code = raw value |
| 4 | SET | `dtlMap.put("pcrs_cd", PCRS_CD_KK0351_MAPPING_MAP.get(dtlMap.get("sbop_svc_cd")))` // Map price code for sub-option: D07→D07, D08→D08 |
| 5 | SET | `dtlMap.put("pplan_cd", PPLAN_CD_KK0351_MAPPING_MAP.get(dtlMap.get("sbop_svc_cd")))` // Map price plan for sub-option: D07→PD0701, D08→PD0801 |

### Block 8 — Registration entries: Conflict detection (L4040–L4091)

For registration entries (`app_div = "1"`), iterates through the active option list to detect conflicts where the requested service already has an in-progress contract change.

**Block 8.1** — IF (`"1".equals(dtlMap.get(APP_DIV))`) — [-> Registration processing]

**Block 8.1.1** — FOR_LOOP `(for HashMap dataMap : opList)`

| # | Type | Code |
|---|------|------|
| 1 | SET | `opSvcCd = (String)dataMap.get(EKK0081B508CBSMsg1List.OP_SVC_CD)` // Get option service code from active list |
| 2 | SET | `sbopSvcCd = (String)dataMap.get(EKK0081B508CBSMsg1List.SBOP_SVC_CD)` // Get sub-option service code from active list |

#### Block 8.1.1.1 — Sub-option service: Set contract number match

**Block 8.1.1.1** — IF (`"2".equals(dtlMap.get("svc_div")) && dtlMap.get("op_svc_cd").equals(opSvcCd)`) — [-> svc_div=2 and option code matches active list]

| # | Type | Code |
|---|------|------|
| 1 | SET | `dtlMap.put("op_svc_kei_no", dataMap.get("op_svc_kei_no"))` // Copy contract number |
| 2 | SET | `dtlMap.put("chaf_opsvkei_no", dataMap.get("op_svc_kei_no"))` // Set post-change option contract number |
| 3 | SET | `dtlMap.put("chaf_opsvkei_gene_add_dtm", dataMap.get("kk0351_gene_add_dtm"))` // Set post-change generation datetime |
| 4 | SET | `dtlMap.put("chbf_opsvkei_no", dataMap.get("op_svc_kei_no"))` // Set pre-change option contract number |
| 5 | SET | `dtlMap.put("chbf_opsvkei_gene_add_dtm", dataMap.get("kk0351_gene_add_dtm"))` // Set pre-change generation datetime |

#### Block 8.1.1.2 — Conflict: Option service code already in-progress

**Block 8.1.1.2** — IF (`dtlMap.get(OP_SBOP_SVC_CD).equals(opSvcCd)`) — [-> Requested code matches an active option service]

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setErrorField(param, "op_svc_cd_err")` // Set error flag in control map |
| 2 | THROW | `throw new SCCallException("同一内容で既に契約変更手続き中", String.valueOf(0), JPCModelConstant.RELATION_ERR)` // Error: Already in-progress with same content |

#### Block 8.1.1.3 — Conflict: Sub-option service code already in-progress

**Block 8.1.1.3** — IF (`dtlMap.get(OP_SBOP_SVC_CD).equals(sbopSvcCd)`) — [-> Requested code matches an active sub-option service]

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setErrorField(param, "op_svc_cd_err")` // Set error flag in control map |
| 2 | THROW | `throw new SCCallException("同一内容で既に契約変更手続き中", String.valueOf(0), JPCModelConstant.RELATION_ERR)` // Error: Already in-progress with same content |

### Block 9 — Cancellation entries: Contract number resolution (L4094–L4156)

For cancellation entries (`app_div = "2"`), resolves the before-change service contract numbers from the active list and validates that valid pre-existing contracts are referenced.

**Block 9.1** — ELSE_IF (`"2".equals(dtlMap.get(APP_DIV))`) — [-> Cancellation processing]

**Block 9.1.1** — FOR_LOOP `(for HashMap dataMap : opList)`

#### Block 9.1.1.1 — Match by sub-option contract number

**Block 9.1.1.1** — IF (`dtlMap.get("sbop_svc_kei_no").equals(dataMap.get("sbop_svc_kei_no"))`) — [-> Sub-option contract number matches active entry]

| # | Type | Code |
|---|------|------|
| 1 | SET | `dtlMap.put("op_svc_kei_no", dataMap.get("op_svc_kei_no"))` // Copy option contract number |
| 2 | SET | `dtlMap.put("chaf_sbopsvkei_no", dataMap.get("sbop_svc_kei_no"))` // Set post-change sub-option contract number |
| 3 | SET | `dtlMap.put("chaf_sbopsvkei_gene_add_dtm", dataMap.get("kk0401_gene_add_dtm"))` // Set post-change generation datetime |
| 4 | SET | `dtlMap.put("chbf_sbopsvkei_no", dataMap.get("sbop_svc_kei_no"))` // Set pre-change sub-option contract number |
| 5 | SET | `dtlMap.put("chbf_sbopsvkei_gene_add_dtm", dataMap.get("kk0401_gene_add_dtm"))` // Set pre-change generation datetime |

#### Block 9.1.1.2 — Match by option contract number

**Block 9.1.1.2** — IF (`dtlMap.get("op_svc_kei_no").equals(dataMap.get("op_svc_kei_no"))`) — [-> Option contract number matches active entry]

| # | Type | Code |
|---|------|------|
| 1 | IF | `!JFUBPCommon.isNull(dataMap.get(EKK0081B508CBSMsg1List.KK0351_IDO_RSV_DTL_CD))` — Migration reservation detail code is set |
| 2 | IF (inner) — [-> Migration reservation exists] |
| 3 | EXEC | `setErrorField(param, "ido_rsv_dtl_cd_err")` // Set error flag |
| 4 | THROW | `throw new SCCallException("オプション・サブオプションサービスの異動予約が存在", String.valueOf(0), JPCModelConstant.RELATION_ERR)` // Error: Migration reservation exists |
| 5 | ELSE | |
| 6 | SET | `dtlMap.put("chaf_opsvkei_no", dataMap.get("op_svc_kei_no"))` // Post-change option contract number |
| 7 | SET | `dtlMap.put("chaf_opsvkei_gene_add_dtm", dataMap.get("kk0351_gene_add_dtm"))` // Post-change generation datetime |
| 8 | SET | `dtlMap.put("chbf_opsvkei_no", dataMap.get("op_svc_kei_no"))` // Pre-change option contract number |
| 9 | SET | `dtlMap.put("chbf_opsvkei_gene_add_dtm", dataMap.get("kk0351_gene_add_dtm"))` // Pre-change generation datetime |
| 10 | SET | `dtlMap.put("n_050_op_telno", dataMap.get("n_050_op_telno"))` // 050-number option telephone |
| 11 | SET | `dtlMap.put("zm0111_upd_dtm_bf", dataMap.get("zm0111_upd_dtm_bf"))` // Aging update datetime before |

#### Block 9.1.2 — No valid pre-change contract found

**Block 9.1.2** — IF (`JFUBPCommon.isNull(dtlMap.get("chbf_opsvkei_no"))`) — [-> Before-change contract number was never resolved]

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setErrorField(param, "op_svc_kei_no_err")` // Set error flag |
| 2 | THROW | `throw new SCCallException("実行可能な契約状態ではない", String.valueOf(0), JPCModelConstant.RELATION_ERR)` // Error: Not in a valid contract state |

### Block 10 — Check mode: Pack inclusion validation (L4159–L4171)

In check mode, when the entry's service code is in the option pack list, ensures the pack list has at least one entry.

**Block 10.1** — IF (`JPCModelConstant.FUNC_CD_2.equals(inMap.get(IN_FUNC_CD)) && OPPACK_SVC_CD_YUKO.contains(dtlMap.get(OP_SBOP_SVC_CD))`) — [-> Check mode with valid option pack service]

| # | Type | Code |
|---|------|------|
| 1 | IF | `packList.size() == 0` |
| 2 | EXEC | `packList.add(new HashMap())` // Add empty HashMap to ensure pack list has entries |

### Block 11 — Pack-inclusion validation loop (L4175–L4208)

When in check mode with pack entries, validates that pack services do not have migration reservations.

**Block 11.1** — IF (`JPCModelConstant.FUNC_CD_2.equals(inMap.get(IN_FUNC_CD)) && packList.size() > 0`) — [-> Check mode with pack list populated]

**Block 11.1.1** — FOR_LOOP `(for HashMap dataMap : opList)`

| # | Type | Code |
|---|------|------|
| 1 | SET | `opSvcCd = (String)dataMap.get(EKK0081B508CBSMsg1List.OP_SVC_CD)` |
| 2 | SET | `kk0351IdoRsvStatCd = (String)dataMap.get(EKK0081B508CBSMsg1List.KK0351_IDO_RSV_DTL_CD)` // Migration reservation detail code (option service contract) |
| 3 | SET | `sbopSvcCd = (String)dataMap.get(EKK0081B508CBSMsg1List.SBOP_SVC_CD)` |
| 4 | SET | `kk041IdoRsvStatCd = (String)dataMap.get(EKK0081B508CBSMsg1List.KK0401_IDO_RSV_DTL_CD)` // Migration reservation detail code (sub-option service contract) |
| 5 | IF | `!OPPACK_SVC_CD_YUKO.contains(opSvcCd) && !OPPACK_SVC_CD_YUKO.contains(sbopSvcCd)` — Service not in pack scope |
| 6 | EXEC | `continue` // Skip non-pack services |
| 7 | IF | `!JFUBPCommon.isNull(kk0351IdoRsvStatCd) || !JFUBPCommon.isNull(kk041IdoRsvStatCd)` — Migration reservation exists |
| 8 | EXEC | `setErrorField(param, "ido_rsv_dtl_cd_err")` // Set error flag |
| 9 | THROW | `throw new SCCallException("オプション・サブオプションサービスの異動予約が存在", String.valueOf(0), JPCModelConstant.RELATION_ERR)` // Error: Migration reservation exists |

### Block 12 — No option contract remaining: Pack division validation (L4210–L4247)

In check mode, when no option contracts remain after processing, validates that pack services have valid division settings. If writable set is not empty, it means some pack services require division settings that are missing — this is an error.

**Block 12.1** — IF (`JPCModelConstant.FUNC_CD_2.equals(inMap.get(IN_FUNC_CD)) && telPackOptionSetList.size() == 0`) — [-> Check mode with no remaining option contracts]

| # | Type | Code |
|---|------|------|
| 1 | SET | `telPackWribSetList = createTelPackWribConstInfo(handle, param, fixedText, svcKeiUcwkNo)` // Create writable set for pack services |

#### Block 12.1.1 — Process pack cancellations

**Block 12.1.1** — IF (`packList != null && packList.size() > 0`)

**Block 12.1.1.1** — FOR_LOOP `(int i = 0; i < packList.size(); i++)`

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataMap = (HashMap)packList.get(i)` |
| 2 | IF | `"2".equals(dataMap.get(APP_DIV)) && PACK_DIV_YUKO.contains(dataMap.get("pack_div"))` — [-> Cancellation + valid pack division] |
| 3 | SET | `telPackWribSetList = updateTelPackSetList(telPackWribSetList, PACK_DIV_YUKO, (String)dataMap.get("pack_div"), false)` // Set valid=false (cancellation) |

#### Block 12.1.2 — Process pack registrations

**Block 12.1.2** — FOR_LOOP `(int i = 0; i < packList.size(); i++)`

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataMap = (HashMap)packList.get(i)` |
| 2 | IF | `"1".equals(dataMap.get(APP_DIV)) && PACK_DIV_YUKO.contains(dataMap.get("pack_div"))` — [-> Registration + valid pack division] |
| 3 | SET | `telPackWribSetList = updateTelPackSetList(telPackWribSetList, PACK_DIV_YUKO, (String)dataMap.get("pack_div"), true)` // Set valid=true (registration) |

#### Block 12.1.3 — Error if writable set not empty

**Block 12.1.3** — IF (`telPackWribSetList.size() > 0`) — [-> Some pack services need division settings but none were provided]

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setErrorField(param, "op_pack_list_err")` // Set error flag |
| 2 | THROW | `throw new SCCallException("パック割区分会設定エラー", String.valueOf(0), JPCModelConstant.RELATION_ERR)` // Error: Pack division setting error (4009) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `app_div` | Field | Processing category — "1" = Registration (new service), "2" = Cancellation (service termination) |
| `chbf_opsvkei_no` | Field | Pre-change option service contract number — the contract number before the change |
| `chaf_opsvkei_no` | Field | Post-change option service contract number — the contract number after the change |
| `chbf_opsvkei_gene_add_dtm` | Field | Pre-change option service contract generation/addition datetime |
| `chaf_opsvkei_gene_add_dtm` | Field | Post-change option service contract generation/addition datetime |
| `chbf_sbopsvkei_no` | Field | Pre-change sub-option service contract number |
| `chaf_sbopsvkei_no` | Field | Post-change sub-option service contract number |
| `chbf_sbopsvkei_gene_add_dtm` | Field | Pre-change sub-option service contract generation/addition datetime |
| `chaf_sbopsvkei_gene_add_dtm` | Field | Post-change sub-option service contract generation/addition datetime |
| `chaf_svc_kei_ucwk_gene_add_dtm` | Field | Service contract line item generation/addition datetime (for SOD) |
| `gene_add_dtm` | Field | Generation addition datetime — timestamp when the service contract line item was generated |
| `ido_rsv_dtl_cd` | Field | Migration reservation detail code — indicates if a service has a pending migration reservation |
| `kk0351_ido_rsv_dtl_cd` | Field | Migration reservation code for option service contract (EKK0351 table) |
| `kk0401_ido_rsv_dtl_cd` | Field | Migration reservation code for sub-option service contract (EKK0401 table) |
| `mskm_div` | Field | Masking processing category — copy of `app_div` used internally |
| `op_svc_cd` | Field | Option service code — the resolved option service code (mapped from sub-option if applicable) |
| `op_svc_kei_no` | Field | Option service contract number — the unique identifier for an option service contract line |
| `op_sbop_svc_cd` | Field | Option/sub-option service code — incoming service code that may be either option or sub-option |
| `sbop_svc_cd` | Field | Sub-option service code — the sub-option service code (for svc_div=2 entries) |
| `sbop_svc_kei_no` | Field | Sub-option service contract number |
| `svc_kei_no` | Field | Service contract number — the main contract identifier |
| `svc_kei_ucwk_no` | Field | Service contract internal agreement number — line item number within a service contract |
| `svc_kei_ucwk_stat` | Field | Service contract internal agreement status — current state of the service contract line |
| `svc_chrg_staymd` | Field | Service charge start date — when billing begins for this service |
| `svc_div` | Field | Service division — "1" = Option service, "2" = Sub-option service |
| `kk0351_gene_add_dtm` | Field | Generation addition datetime from EKK0351 (option service contract table) |
| `kk0401_gene_add_dtm` | Field | Generation addition datetime from EKK0401 (sub-option service contract table) |
| `n_050_op_telno` | Field | 050-number option telephone number — VoIP telephone number associated with the option service |
| `zm0111_upd_dtm_bf` | Field | Aging update datetime before — aging (depreciation) update timestamp prior to change |
| `B023` | Code | Bundle Telephone / Multiple Call — basic bundled telephone service |
| `B024` | Code | Call Forwarding Selection — parent code for call forwarding option |
| `B025` | Code | Anonymous Call Rejection Display — parent code for anonymous blocking display option |
| `B026` | Code | Confused Call Rejection — confused/wrong number call rejection |
| `B027` | Code | Number Selection — directed number selection service |
| `B028` | Code | Call Detail Delivery — call detail statement delivery service |
| `B029` | Code | 050 Number Plan — 050-number VoIP plan service |
| `B071` | Code | International Call Suspension — international call usage suspension |
| `B135` | Code | Anshin Call Detection Service — call detection/notifications service |
| `D07` | Code | Call Forwarding Selection (Sub-option) — sub-option variant of call forwarding |
| `D08` | Code | Anonymous Call Rejection (Sub-option) — sub-option variant of anonymous blocking |
| `FUNC_CD_2` | Constant | Function code "2" — Check mode (validation only, no data mutation) |
| `PCRS_CD` | Field | Price Code — billing rate code that determines the price tier |
| `PPLAN_CD` | Field | Price Plan Code — the pricing plan identifier |
| `OPPACK_SVC_CD_YUKO` | Constant | List of valid option pack service codes for pack-inclusion checks |
| `PACK_DIV_YUKO` | Constant | Valid pack divisions: ["1", "2", "3"] — Pack 3, Pack 7, Anshin Phone Pack |
| `SC` | Acronym | Service Component — the backend service that executes database queries |
| `SOD` | Acronym | Service Order Data — external order data system interface for telecom order fulfillment |
| `EKK0161A010` | SC Code | Service contract internal agreement inquiry — retrieves contract status and billing start date |
| `EKK0081B508` | SC Code | eo Optical Telephone Service Contract Info Inquiry — retrieves current active option services |
| `JFUTelOptSvcMskmCmpCC` | Class | Telephone Option Service Registration/Cancellation (CMP) Common Component — the main business logic coordinator for option pack operations |
| `JKKTelSelectOpPackOperateCC` | Class | Telephone Selection Option Pack Operation Component — parent class providing pack operation execution |
| `KKSV0043` | Screen | Telephone Option Pack Selection/Registration Screen — the web screen that triggers the option pack flow |
| `setSaveData` | Method | Main entry point for telephone option pack registration/cancellation — orchestrates check mode and registration mode |
| `checkOpSvcKeiMskmData` | Method | Option service contract data registration check — validates registration entries against SOD |
| `checkOpSvcKeiDeleData` | Method | Option service contract data cancellation check — validates cancellation entries |
| `CC` | Acronym | Command Controller — the middle-tier business logic component |
| `SCCallException` | Class | Service Component Call Exception — thrown when SC calls fail or business validation fails |
| `RELATION_ERR` | Constant | Relation error code — indicates a business relationship constraint violation |
| `EKK0351` | Table | Option Service Contract table — stores option service contract data |
| `EKK0401` | Table | Sub-Option Service Contract table — stores sub-option service contract data |
