# Business Logic — JKKTvSvcKeiCancelCC.svcCancel() [357 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKTvSvcKeiCancelCC` |
| Layer | CC / Common Component (shared cancel logic coordinator called from screen CBS) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKTvSvcKeiCancelCC.svcCancel()

This method performs the complete **Service Contract Cancellation** (サービス契約キャンセル) flow for a TV service contract. It is the core business logic coordinator that cascades cancellation requests across multiple layers of the service contract hierarchy: the top-level service contract, its detail lines, associated option service contracts, equipment-provided service contracts (for equipment rental services), and service contract line details. It also handles the cancellation of the underlying pending applications (申込) and, in specific statuses, cancels associated work orders (工事案件).

The method implements a **cascade/crawl design pattern**: it queries child entities in a hierarchical tree (service contract -> detail lines -> equipment-provided contracts), applies status-based filtering to skip already-cancelled or disconnected lines, and invokes the appropriate CBS-level cancellation for each valid child before proceeding deeper. All cancellations use a common reason code ("01" -- general cancellation) and a shared move category (ido_div).

Its **role in the larger system** is as a shared CBS-level handler. It is called from the `cancel()` method of the same class, which is the entry point invoked by the screen CBS (e.g., `KKSV0004` for TV service contract cancellation screens). The method returns the final updated timestamp (lastUpdDtm) which is used by the caller for optimistic concurrency control across the overall cancellation flow.

The method handles four distinct processing branches based on the service contract status (`curSvcKeiStat`): **status "020" (Confirmed/照映済)** — where it additionally checks for pending applications and may cancel the entire application or individual details; **status "010" (Received/受付済)** — where it cancels pending application details but does not check the application level; equipment-provided service contract cancellation for V-ONU equipment in the service line detail path; and **work order cancellation (EKU0091C010)** when the contract is confirmed with an active work order.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["svcCancel params"])
    START --> EXTRACT_DATA_MAP["Extract ccMsg from param.getData"]
    EXTRACT_DATA_MAP --> EXTRACT_FIELDS["Extract funcCode, ido_div, mskm_lastUpdDtm from ccMsg"]
    EXTRACT_FIELDS --> CALL_SVC_CANCEL_MAIN["CALL: EKK0081C160<br/>Service Contract Cancellation"]
    CALL_SVC_CANCEL_MAIN --> FETCH_LAST_UPDT["Get lastUpdDtm from response"]
    FETCH_LAST_UPDT --> CALL_SVC_KEI_LIST["CALL: EKK0161B004<br/>Service Contract Details List"]
    CALL_SVC_KEI_LIST --> LOOP_SVC_LINES["Loop each Service Contract Detail Line"]
    LOOP_SVC_LINES --> CHECK_SVC_STAT{"svc_kei_ucwk_stat = 910<br/>or 920?"}
    CHECK_SVC_STAT -->|"Yes"| SKIP_DETAIL["Skip - already disconnected or canceled"]
    SKIP_DETAIL --> NEXT_DETAIL["Next detail line"]
    CHECK_SVC_STAT -->|"No"| CALL_SVC_KEI_CANCEL["CALL: EKK0161C160<br/>Service Contract Detail Cancellation"]
    CALL_SVC_KEI_CANCEL --> FETCH_UPD_DTM1["Update lastUpdDtm from response"]
    FETCH_UPD_DTM1 --> CALL_KKTK_LIST["CALL: EKK0341B501<br/>Equipment-provided Service Contract List"]
    CALL_KKTK_LIST --> LOOP_KKTK["Loop each Equipment-provided Service Contract"]
    LOOP_KKTK --> CHECK_KKTK_STAT{"kktk_svc_kei_stat<br/>= 910 or 920?"}
    CHECK_KKTK_STAT -->|"Yes"| SKIP_KKTK["Skip - already disconnected<br/>or canceled"]
    SKIP_KKTK --> NEXT_KKTK["Next equipment contract"]
    CHECK_KKTK_STAT -->|"No"| CALL_KKTK_CANCEL["CALL: EKK0341C330<br/>Equipment-provided<br/>Service Contract Cancellation"]
    CALL_KKTK_CANCEL --> FETCH_UPD_DTM2["Update lastUpdDtm from response"]
    FETCH_UPD_DTM2 --> POPULATE_UCWK_MAP["Populate svcUcwkMap<br/>(service code -> equipment<br/>seizure no)"]
    POPULATE_UCWK_MAP --> NEXT_KKTK
    NEXT_DETAIL --> CALL_OP_LIST["CALL: EKK0351B002<br/>Option Service Contract List"]
    CALL_OP_LIST --> LOOP_OP_SVC["Loop each Option Service Contract"]
    LOOP_OP_SVC --> CHECK_OP_STAT{"op_svc_kei_stat<br/>= 910 or 920?"}
    CHECK_OP_STAT -->|"Yes"| SKIP_OP["Skip - already disconnected<br/>or canceled"]
    SKIP_OP --> NEXT_OP["Next option contract"]
    CHECK_OP_STAT -->|"No"| CALL_OP_CANCEL["CALL: EKK0351C220<br/>Option Service Contract Cancellation"]
    CALL_OP_CANCEL --> FETCH_UPD_DTM3["Update lastUpdDtm from response"]
    FETCH_UPD_DTM3 --> NEXT_OP
    NEXT_OP --> CALL_KAI_LIST["CALL: EKK0241B001<br/>Service Contract Line Details List"]
    CALL_KAI_LIST --> LOOP_KAI_U["Loop each Service Contract Line Detail"]
    LOOP_KAI_U --> CALL_KIKI_SEARCH["CALL: EKK0341B504<br/>Equipment-provided Contract List<br/>by line detail"]
    CALL_KIKI_SEARCH --> LOOP_KIKI["Loop each equipment"]
    LOOP_KIKI --> CHECK_SVC_CD{"kktk_svc_cd = C013<br/>(V-ONU)?"}
    CHECK_SVC_CD -->|"No"| SKIP_SVC_CD["Skip - not V-ONU equipment"]
    SKIP_SVC_CD --> NEXT_KIKI["Next equipment"]
    CHECK_SVC_CD -->|"Yes"| CHECK_KIKI_STAT{"kktk_svc_kei_stat<br/>= 910 or 920?"}
    CHECK_KIKI_STAT -->|"Yes"| SKIP_KIKI_STAT["Skip - already disconnected<br/>or canceled"]
    SKIP_KIKI_STAT --> NEXT_KIKI
    CHECK_KIKI_STAT -->|"No"| CALL_KIKI_CANCEL["CALL: EKK0341C330<br/>Equipment-provided<br/>Service Contract Cancellation"]
    CALL_KIKI_CANCEL --> FETCH_UPD_DTM4["Update lastUpdDtm from response"]
    FETCH_UPD_DTM4 --> NEXT_KIKI
    NEXT_KIKI --> CALL_OTHER_SVC["CALL: EKK0081B035<br/>Same Location Service Contract List"]
    CALL_OTHER_SVC --> CHECK_ALIVE_SVC{"Other services active?"}
    CHECK_ALIVE_SVC -->|"Yes"| SKIP_LINE["Skip - line still in use<br/>cannot cancel"]
    SKIP_LINE --> NEXT_KAI_U["Next line detail"]
    CHECK_ALIVE_SVC -->|"No"| CHECK_LINE_STAT{"svc_kei_kaisen_ucwk_stat<br/>= 010?"}
    CHECK_LINE_STAT -->|"Yes"| CALL_LINE_CANCEL["CALL: EKK0251C070<br/>Service Contract Line<br/>Detail Cancellation"]
    CHECK_LINE_STAT -->|"No"| NOTE_LINE["No cancellation<br/>line not yet received"]
    CALL_LINE_CANCEL --> FETCH_UPD_DTM5["Update lastUpdDtm from response"]
    NOTE_LINE --> NEXT_KAI_U
    NEXT_KAI_U --> CHECK_CUR_STAT{"curSvcKeiStat<br/>= 010?"}
    CHECK_CUR_STAT -->|"No"| CHECK_WORK_ORDER["Check work order cancellation"]
    CHECK_CUR_STAT -->|"Yes"| CHECK_APPLICATION["Check pending application details"]
    CHECK_APPLICATION --> CALL_APP_LIST["CALL: EKK0011B020<br/>Pending Application<br/>Contract Details List"]
    CALL_APP_LIST --> LOOP_APP["Loop each application detail"]
    LOOP_APP --> SKIP_CURRENT["Skip current detail<br/>(mskmDtlNo match)"]
    SKIP_CURRENT --> CHECK_APP_CANCEL_STAT{"mskmDtlStat<br/>= 920?"}
    CHECK_APP_CANCEL_STAT -->|"Yes"| APP_SKIP["Skip - already canceled"]
    APP_SKIP --> APP_NEXT["Next application detail"]
    CHECK_APP_CANCEL_STAT -->|"No"| SET_IS_ALIVE["Set isAlive = true<br/>still has live details"]
    SET_IS_ALIVE --> APP_NEXT
    APP_NEXT --> CHECK_ALIVE{"isAlive<br/>= true?"}
    CHECK_ALIVE -->|"Yes"| CALL_APP_DETAIL_CANCEL["CALL: EKK0021C070<br/>Application Detail<br/>Cancellation"]
    CHECK_ALIVE -->|"No"| CALL_APP_CANCEL_MAIN["CALL: EKK0011C060<br/>Application Cancellation<br/>(entire application)"]
    CALL_APP_DETAIL_CANCEL --> CHECK_WORK_ORDER
    CALL_APP_CANCEL_MAIN --> CHECK_WORK_ORDER
    CHECK_WORK_ORDER --> CHECK_WO_CONDITION{"curSvcKeiStat = 020<br/>AND kojiak_no set<br/>AND kojiak_stat = 130?"}
    CHECK_WO_CONDITION -->|"Yes"| CALL_WORK_ORDER_CANCEL["CALL: EKU0091C010<br/>Work Order Cancellation"]
    CHECK_WO_CONDITION -->|"No"| SKIP_WO["Skip work order"]
    CALL_WORK_ORDER_CANCEL --> END_RETURN(["Return lastUpdDtm"])
    SKIP_WO --> END_RETURN
```

**CRITICAL — Constant Resolution:**

| Constant | Resolved Value | Business Meaning |
|----------|---------------|-----------------|
| `JKKStrConst.CD00056_STAT_DSLZUMI` | "910" | Disconnection completed (解消済) |
| `JKKStrConst.CD00056_STAT_CANCELZUMI` | "920" | Cancellation completed (キャンセル済) |
| `JKKStrConst.CD00132_VONU` | "C013" | V-ONU equipment type (V-ONU) |
| `JKKStrConst.CD00054_010` | "010" | Received/completed (受注済) — line detail status |
| `MSKM_DTL_STAT_CANCEL` | "920" | Application detail cancellation status (キャンセル) |
| `SVC_CANCEL_RSN_CD` | "01" | Cancellation reason code: general cancellation |
| `MSKM_CANCEL_RSN_CD` | "30" | Application cancellation reason code |
| `CONSMBSN_MSKM_STAT_SKBT_CD` | "04" | Subscription contract status type code |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database/session handle for executing CBS (service component) calls. Carries transaction context and database connection state. |
| 2 | `scCall` | `ServiceComponentRequestInvoker` | Service Component invocation router. Used by `callSC()` to dispatch CBS requests (EKK0081C160, EKK0161B004, etc.) to the appropriate backend CBS handler. |
| 3 | `param` | `IRequestParameterReadWrite` | Request parameter object carrying the data map (`ccMsg`) containing all business data extracted from the screen/form input, including `func_code`, `ido_div`, `svc_kei_no`, `mskm_lastUpdDtm`, `sysid`, `kojiak_no`, and `kojiak_stat`. |
| 4 | `dataMapKey` | `String` | Key within the request parameter to locate the data map (`ccMsg`). Equivalent to `fixedText` — ties this call to a specific data context/screen. |
| 5 | `mskmNo` | `String` | Application number (申込番号) — the top-level application/subscription ID. Used when checking pending application details at the bottom of the method (for status "010"). |
| 6 | `mskmDtlNo` | `String` | Application detail number (申込明細番号) — identifies which specific line-item within the application is being cancelled. Skipped in application-level status checks to avoid cancelling itself. |
| 7 | `lastUpdDtm` | `String` | Last update timestamp (最終更新年月日時分秒) — carries forward optimistic concurrency control across the cascade of CBS calls. Each cancellation updates it. Starts from the caller; is updated by each CBS response. |
| 8 | `curSvcKeiStat` | `String` | Current service contract status (サービス契約ステータス). Drives the processing branch: "010" = Received (受付済), "020" = Confirmed (照映済). Also affects whether pending applications and work orders are cancelled. |

**Instance fields read:** None directly in `svcCancel`. Template IDs (`TEMPLATE_ID_*`) are class-level static constants resolved at compile time.

## 4. CRUD Operations / Called Services

### Pre-computed evidence from code analysis graph:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `callSC(handle, scCall, param, dataMapKey, ekk0081c160IN)` | EKK0081C160CBS | KK_T_SVC_KEI (Service Contract) | **Create** — Service Contract Cancellation (サービス契約キャンセル). Cancels the top-level service contract record. Reason code "01", move category from `ido_div`. |
| R | `callSC(handle, scCall, param, dataMapKey, ekk0161b004IN).getCAANMsgList(...)` | EKK0161B004CBS | KK_T_SVC_KEI_UCWK (Service Contract Detail) | **Read** — Service Contract Details List (サービス契約内訳一覧照会). Retrieves all detail lines of the service contract for cascading cancellation. |
| U | `callSC(handle, scCall, param, dataMapKey, ekk0161c160IN)` | EKK0161C160CBS | KK_T_SVC_KEI_UCWK (Service Contract Detail) | **Create** — Service Contract Detail Cancellation (サービス契約内訳キャンセル). Cancels each valid detail line that is not already disconnected or cancelled. |
| R | `callSC(handle, scCall, param, dataMapKey, ekk0341b501IN).getCAANMsgList(...)` | EKK0341B501CBS | KK_T_KKTK_SVC_KEI (Equipment-provided Service Contract) | **Read** — Equipment-provided Service Contract List by detail line (機器提供サービス契約一覧照会). Retrieves equipment contracts associated with each service detail line. |
| U | `callSC(handle, scCall, param, dataMapKey, ekk0341c330IN)` | EKK0341C330CBS | KK_T_KKTK_SVC_KEI (Equipment-provided Service Contract) | **Create** — Equipment-provided Service Contract Cancellation (機器提供サービス契約キャンセル). Cancels each valid equipment-provided contract (skips already disconnected/cancelled). Called in two loops: from the detail line path and from the line detail V-ONU path. |
| R | `callSC(handle, scCall, param, dataMapKey, ekk0351b002IN).getCAANMsgList(...)` | EKK0351B002CBS | KK_T_OP_SVC_KEI (Option Service Contract) | **Read** — Option Service Contract List (オプションサービス契約一覧照会). Retrieves all option/ancillary service contracts for the main service contract. |
| U | `callSC(handle, scCall, param, dataMapKey, ekk0351c220IN)` | EKK0351C220CBS | KK_T_OP_SVC_KEI (Option Service Contract) | **Create** — Option Service Contract Cancellation (オプションサービス契約キャンセル). Cancels each valid option service contract (skips already disconnected/cancelled). |
| R | `callSC(handle, scCall, param, dataMapKey, ekk0241b001IN).getCAANMsgList(...)` | EKK0241B001CBS | KK_T_SVC_KEI_KAISEN_UCWK (Service Contract Line Detail) | **Read** — Service Contract Line Details List (サービス契約回線内訳一覧照会). Retrieves line details (回線内訳) associated with the service contract. |
| R | `callSC(handle, scCall, param, dataMapKey, ekk0341b504IN).getCAANMsgList(...)` | EKK0341B504CBS | KK_T_KKTK_SVC_KEI (Equipment-provided Service Contract) | **Read** — Equipment-provided Service Contract List by line detail (機器提供サービス契約一覧照会). Retrieves equipment contracts tied to a specific service contract line detail. |
| R | `callSC(handle, scCall, param, dataMapKey, ekk0081b035IN).getCAANMsgList(...)` | EKK0081B035CBS | KK_T_SVC_KEI / KK_T_OP_SVC_KEI (Other Service Contracts) | **Read** — Same Location Service Contract List (同一利用場所サービス契約一覧照会). Checks whether other services share the same location/line — if so, the line cannot be cancelled. |
| U | `callSC(handle, scCall, param, dataMapKey, ekk0251c070IN)` | EKK0251C070CBS | KK_T_SVC_KEI_KAISEN_UCWK (Service Contract Line Detail) | **Create** — Service Contract Line Detail Cancellation (サービス契約回線内訳キャンセル). Cancels the line detail if its status is "010" (Received). If status is "100" (In use), nothing is done — the line remains active. |
| R | `callSC(handle, scCall, param, dataMapKey, eKK0011B020IN).getCAANMsgList(...)` | EKK0011B020CBS | KK_T_MSKM / KK_T_MSKM_DTL (Application / Application Detail) | **Read** — Pending Application Contract Details List (申込サービス契約内訳一覧照会). For "010" (Received) status, checks whether there are other non-cancelled application details. |
| U | `callSC(handle, scCall, param, dataMapKey, eKK0011C060IN)` | EKK0011C060CBS | KK_T_MSKM (Application) | **Create** — Application Cancellation (申込キャンセル). Cancels the entire application when no live detail lines remain (all are cancelled or non-existent). Reason code "30". |
| U | `callSC(handle, scCall, param, dataMapKey, eKK0021C070IN)` | EKK0021C070CBS | KK_T_MSKM_DTL (Application Detail) | **Create** — Application Detail Cancellation (申込明細キャンセル). Cancels individual application detail when other live details exist under the same application. Reason code "30". |
| U | `callSC(handle, scCall, param, dataMapKey, eKU0091C010IN)` | EKU0091C010CBS | KK_T_KOJIAK (Work Order) | **Create** — Work Order Cancellation (工事案件取消). Cancels the work order when the service contract is confirmed with an active work order (status "130"). Sets cancellation flags and timestamps. |
| R | `JPCBPCommon.getOpeDate(null)` | JPCBPCommon | - | **Read** — Gets current operational date for work order cancellation. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `cancel()` in JKKTvSvcKeiCancelCC | `cancel()` -> `svcCancel(handle, scCall, param, dataMapKey, mskmNo, mskmDtlNo, lastUpdDtm, curSvcKeiStat)` | `EKK0081C160 [U] KK_T_SVC_KEI`, `EKK0161C160 [U] KK_T_SVC_KEI_UCWK`, `EKK0341C330 [U] KK_T_KKTK_SVC_KEI`, `EKK0351C220 [U] KK_T_OP_SVC_KEI`, `EKK0251C070 [U] KK_T_SVC_KEI_KAISEN_UCWK`, `EKK0011C060 [U] KK_T_MSKM`, `EKK0021C070 [U] KK_T_MSKM_DTL`, `EKU0091C010 [U] KK_T_KOJIAK` |

**Details:** The `cancel()` method in the same class (`JKKTvSvcKeiCancelCC`) is the direct caller. It performs preparatory steps (retrieving service contract info via EKK0081A010, fetching application numbers via `execMskm()`, determining mskmNo/mskmDtlNo based on status), then delegates to `svcCancel()`. After `svcCancel()` returns, `cancel()` continues with `execWrisvcAutoAply()`, `registProgressInfo()`, and optional customer withdrawal processing. The terminal operations from `svcCancel` include 11 unique CBS codes: EKK0081C160, EKK0161B004, EKK0161C160, EKK0341B501, EKK0341C330, EKK0351B002, EKK0351C220, EKK0241B001, EKK0341B504, EKK0081B035, EKK0251C070, EKK0011B020, EKK0011C060, EKK0021C070, and EKU0091C010.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] `ccMsg` extraction (L396)

> Extracts the data map from the request parameter and pulls out key fields.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ccMsg = (HashMap) param.getData(dataMapKey)` |
| 2 | SET | `funcCode = (String) ccMsg.get("func_code")` |
| 3 | SET | `ido_div = (String) ccMsg.get("ido_div")` |
| 4 | SET | `mskm_lastUpdDtm = (String) ccMsg.get("mskm_lastUpdDtm")` |

**Block 2** — [CALL] EKK0081C160 Service Contract Cancellation (L401–L417)

> Cancels the top-level service contract. This is the first cancellation in the cascade. Sets cancellation reason to "01" (general cancellation).

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0081c160IN = new CAANMsg(EKK0081C160CBSMsg.class.getName())` |
| 2 | EXEC | `ekk0081c160IN.set(TEMPLATEID, "EKK0081C160")` |
| 3 | EXEC | `ekk0081c160IN.set(FUNC_CODE, funcCode)` |
| 4 | EXEC | `ekk0081c160IN.set(SVC_KEI_NO, ccMsg.get("svc_kei_no"))` |
| 5 | EXEC | `ekk0081c160IN.set(MSKM_DTL_NO, mskmDtlNo)` |
| 6 | EXEC | `ekk0081c160IN.set(SVC_CANCEL_RSN_CD, "01")` // general cancellation |
| 7 | EXEC | `ekk0081c160IN.set(IDO_DIV, ido_div)` |
| 8 | EXEC | `ekk0081c160IN.set(UPD_DTM_BF, lastUpdDtm)` |
| 9 | CALL | `ekk0081c160OUT = callSC(handle, scCall, param, dataMapKey, ekk0081c160IN)` |
| 10 | SET | `lastUpdDtm = ekk0081c160OUT.getString(UPD_DTM)` // optimistic lock |

**Block 3** — [CALL] EKK0161B004 Service Contract Details List (L420–L425)

> Retrieves all detail lines (内訳) of the service contract for cascading cancellation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0161b004IN = new CAANMsg(EKK0161B004CBSMsg.class.getName())` |
| 2 | EXEC | `ekk0161b004IN.set(TEMPLATEID, "EKK0161B004")` |
| 3 | EXEC | `ekk0161b004IN.set(FUNC_CODE, "1")` |
| 4 | EXEC | `ekk0161b004IN.set(KEY_SVC_KEI_NO, ccMsg.get("svc_kei_no"))` |
| 5 | CALL | `ekk0161b004OUT = callSC(...).getCAANMsgList(EKK0161B004CBSMSG1LIST)` |
| 6 | SET | `svcUcwkMap = new HashMap<String, HashMap<String, String>>()` // for tracking equipment mappings |

**Block 4** — [FOR] Loop each Service Contract Detail Line (L427–L482)

> Iterates over all service contract detail lines returned from EKK0161B004.

**Block 4.1** — [IF] Skip already-cancelled detail lines [CD00056_STAT_DSLZUMI="910", CD00056_STAT_CANCELZUMI="920"] (L430–L435)

> Skips detail lines that are already disconnected or cancelled.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_kei_ucwk_stat = curSvcKeiUcwkInfo.getString(SVC_KEI_UCWK_STAT)` |
| 2 | IF | `svc_kei_ucwk_stat = "910" (解消済)` OR `"920" (キャンセル済)` |
| 3 | EXEC | `continue` // skip this detail line |

**Block 4.2** — [CALL] EKK0161C160 Service Contract Detail Cancellation (L440–L450)

> Cancels the current service contract detail line (内訳).

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0161c160IN = new CAANMsg(EKK0161C160CBSMsg.class.getName())` |
| 2 | EXEC | `ekk0161c160IN.set(TEMPLATEID, "EKK0161C160")` |
| 3 | EXEC | `ekk0161c160IN.set(FUNC_CODE, funcCode)` |
| 4 | EXEC | `ekk0161c160IN.set(SVC_KEI_UCWK_NO, curSvcKeiUcwkInfo.getString(SVC_KEI_UCWK_NO))` |
| 5 | EXEC | `ekk0161c160IN.set(MSKM_DTL_NO, mskmDtlNo)` |
| 6 | EXEC | `ekk0161c160IN.set(SVC_CANCEL_RSN_CD, "01")` |
| 7 | EXEC | `ekk0161c160IN.set(IDO_DIV, ido_div)` |
| 8 | EXEC | `ekk0161c160IN.set(UPD_DTM_BF, lastUpdDtm)` |
| 9 | CALL | `ekk0161c160OUT = callSC(...)` |
| 10 | SET | `lastUpdDtm = ekk0161c160OUT.getString(UPD_DTM)` |

**Block 4.3** — [CALL] EKK0341B501 Equipment-provided Service Contract List (L453–L458)

> Retrieves equipment-provided service contracts tied to the current detail line.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0341b501IN = new CAANMsg(EKK0341B501CBSMsg.class.getName())` |
| 2 | EXEC | `ekk0341b501IN.set(TEMPLATEID, "EKK0341B501")` |
| 3 | EXEC | `ekk0341b501IN.set(FUNC_CODE, "1")` |
| 4 | EXEC | `ekk0341b501IN.set(KEY_SVC_KEI_UCWK_NO, curSvcKeiUcwkInfo.getString(SVC_KEI_UCWK_NO))` |
| 5 | CALL | `ekk0341b501OUT = callSC(...).getCAANMsgList(EKK0341B501CBSMSG1LIST)` |

**Block 4.4** — [FOR] Loop each Equipment-provided Service Contract (L460–L480)

> Iterates over equipment contracts associated with the detail line.

**Block 4.4.1** — [IF] Skip already-cancelled equipment contracts [CD00056_STAT_DSLZUMI="910", CD00056_STAT_CANCELZUMI="920"] (L464–L469)

> Skips equipment contracts already disconnected or cancelled.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kktk_svc_kei_stat = curKktkSvcKeiInfo.getString(KKTK_SVC_KEI_STAT)` |
| 2 | IF | `kktk_svc_kei_stat = "910" (解消済)` OR `"920" (キャンセル済)` |
| 3 | EXEC | `continue` |

**Block 4.4.2** — [CALL] EKK0341C330 Equipment Contract Cancellation (L474–L484)

> Cancels the equipment-provided service contract.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0341c330IN = new CAANMsg(EKK0341C330CBSMsg.class.getName())` |
| 2 | EXEC | `ekk0341c330IN.set(TEMPLATEID, "EKK0341C330")` |
| 3 | EXEC | `ekk0341c330IN.set(FUNC_CODE, funcCode)` |
| 4 | EXEC | `ekk0341c330IN.set(KKTK_SVC_KEI_NO, curKktkSvcKeiInfo.getString(KKTK_SVC_KEI_NO))` |
| 5 | EXEC | `ekk0341c330IN.set(MSKM_DTL_NO, mskmDtlNo)` |
| 6 | EXEC | `ekk0341c330IN.set(SVC_CANCEL_RSN_CD, "01")` |
| 7 | EXEC | `ekk0341c330IN.set(IDO_DIV, ido_div)` |
| 8 | EXEC | `ekk0341c330IN.set(UPD_DTM_BF, lastUpdDtm)` |
| 9 | CALL | `ekk0341c330OUT = callSC(...)` |
| 10 | SET | `lastUpdDtm = ekk0341c330OUT.getString(UPD_DTM)` |

**Block 4.4.3** — [IF] Map equipment info into svcUcwkMap (L486–L490)

> Builds a mapping of service code -> equipment seizure number for tracking.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!svcUcwkMap.containsKey(SVC_KEI_UCWK_NO)` |
| 2 | SET | `svcUcwkMap.put(SVC_KEI_UCWK_NO, new HashMap<String, String>())` |
| 3 | SET | `ucwkInfo = svcUcwkMap.get(SVC_KEI_UCWK_NO)` |
| 4 | EXEC | `ucwkInfo.put(KKTK_SVC_CD, curKktkSvcKeiInfo.getString(KIKI_SEIZO_NO))` // service code -> equipment seizure no |

**Block 5** — [CALL] EKK0351B002 Option Service Contract List (L495–L501)

> Retrieves option/ancillary service contracts for the main service contract.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0351b002IN = new CAANMsg(EKK0351B002CBSMsg.class.getName())` |
| 2 | EXEC | `ekk0351b002IN.set(TEMPLATEID, "EKK0351B002")` |
| 3 | EXEC | `ekk0351b002IN.set(FUNC_CODE, "1")` |
| 4 | EXEC | `ekk0351b002IN.set(KEY_SVC_KEI_NO, ccMsg.get("svc_kei_no"))` |
| 5 | CALL | `ekk0351b002OUT = callSC(...).getCAANMsgList(EKK0351B002CBSMSG1LIST)` |

**Block 6** — [FOR] Loop each Option Service Contract (L503–L535)

> Iterates over option service contracts.

**Block 6.1** — [IF] Skip already-cancelled option contracts [CD00056_STAT_DSLZUMI="910", CD00056_STAT_CANCELZUMI="920"] (L506–L511)

| # | Type | Code |
|---|------|------|
| 1 | SET | `op_svc_kei_stat = curOpSvcKeiInfo.getString(OP_SVC_KEI_STAT)` |
| 2 | IF | `op_svc_kei_stat = "910" (解消済)` OR `"920" (キャンセル済)` |
| 3 | EXEC | `continue` |

**Block 6.2** — [CALL] EKK0351C220 Option Service Contract Cancellation (L516–L527)

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0351c220IN = new CAANMsg(EKK0351C220CBSMsg.class.getName())` |
| 2 | EXEC | `ekk0351c220IN.set(TEMPLATEID, "EKK0351C220")` |
| 3 | EXEC | `ekk0351c220IN.set(FUNC_CODE, funcCode)` |
| 4 | EXEC | `ekk0351c220IN.set(OP_SVC_KEI_NO, curOpSvcKeiInfo.getString(OP_SVC_KEI_NO))` |
| 5 | EXEC | `ekk0351c220IN.set(MSKM_DTL_NO, mskmDtlNo)` |
| 6 | EXEC | `ekk0351c220IN.set(SVC_CANCEL_RSN_CD, "01")` |
| 7 | EXEC | `ekk0351c220IN.set(IDO_DIV, ido_div)` |
| 8 | EXEC | `ekk0351c220IN.set(UPD_DTM_BF, lastUpdDtm)` |
| 9 | CALL | `ekk0351c220OUT = callSC(...)` |
| 10 | SET | `lastUpdDtm = ekk0351c220OUT.getString(UPD_DTM)` |

**Block 7** — [CALL] EKK0241B001 Service Contract Line Details List (L540–L546)

> Retrieves service contract line details (回線内訳) for the service contract.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0241b001IN = new CAANMsg(EKK0241B001CBSMsg.class.getName())` |
| 2 | EXEC | `ekk0241b001IN.set(TEMPLATEID, "EKK0241B001")` |
| 3 | EXEC | `ekk0241b001IN.set(FUNC_CODE, "1")` |
| 4 | EXEC | `ekk0241b001IN.set(KEY_SVC_KEI_NO, ccMsg.get("svc_kei_no"))` |
| 5 | CALL | `ekk0241b001OUT = callSC(...).getCAANMsgList(EKK0241B001CBSMSG1LIST)` |

**Block 8** — [FOR] Loop each Service Contract Line Detail (L548–L638)

> Iterates over line details. Inside this loop, there is a nested equipment search loop and a same-location check.

**Block 8.1** — [CALL] EKK0341B504 Equipment List by Line Detail (L552–L562)

> Retrieves equipment-provided contracts associated with a specific line detail.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0341b504IN = new CAANMsg(EKK0341B504CBSMsg.class.getName())` |
| 2 | EXEC | `ekk0341b504IN.set(TEMPLATEID, "EKK0341B504")` |
| 3 | EXEC | `ekk0341b504IN.set(FUNC_CODE, funcCode)` |
| 4 | EXEC | `ekk0341b504IN.set(KEY_SVC_KEI_KAISEN_UCWK_NO, curKaiUcwkInfo.getString(SVC_KEI_KAISEN_UCWK_NO))` |
| 5 | CALL | `ekk0341b504OUTList = callSC(...).getCAANMsgList(EKK0341B504CBSMSG1LIST)` |

**Block 8.2** — [FOR] Loop each equipment (L564–L630)

**Block 8.2.1** — [IF] Filter: Only V-ONU equipment [CD00132_VONU="C013"] (L568–L572)

> Since v7.00.00, only V-ONU equipment (V-ONU) is targeted for equipment-provided contract cancellation. All other equipment types are skipped.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kktk_svc_cd = curKaisenKiki.getString(KKTK_SVC_CD)` |
| 2 | IF | `kktk_svc_cd != "C013" (V-ONU)` |
| 3 | EXEC | `continue` |

**Block 8.2.2** — [IF] Skip already-cancelled equipment [CD00056_STAT_DSLZUMI="910", CD00056_STAT_CANCELZUMI="920"] (L577–L582)

| # | Type | Code |
|---|------|------|
| 1 | SET | `kktk_svc_kei_stat = curKaisenKiki.getString(KKTK_SVC_KEI_STAT)` |
| 2 | IF | `kktk_svc_kei_stat = "910" (解消済)` OR `"920" (キャンセル済)` |
| 3 | EXEC | `continue` |

**Block 8.2.3** — [CALL] EKK0341C330 Equipment Contract Cancellation (V-ONU path) (L587–L597)

> Cancels the V-ONU equipment contract.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0341c330IN = new CAANMsg(EKK0341C330CBSMsg.class.getName())` |
| 2 | EXEC | `ekk0341c330IN.set(TEMPLATEID, "EKK0341C330")` |
| 3 | EXEC | `ekk0341c330IN.set(FUNC_CODE, funcCode)` |
| 4 | EXEC | `ekk0341c330IN.set(KKTK_SVC_KEI_NO, curKaisenKiki.getString(KKTK_SVC_KEI_NO))` |
| 5 | EXEC | `ekk0341c330IN.set(MSKM_DTL_NO, mskmDtlNo)` |
| 6 | EXEC | `ekk0341c330IN.set(SVC_CANCEL_RSN_CD, "01")` |
| 7 | EXEC | `ekk0341c330IN.set(IDO_DIV, ido_div)` |
| 8 | EXEC | `ekk0341c330IN.set(UPD_DTM_BF, lastUpdDtm)` |
| 9 | CALL | `ekk0341c330OUT = callSC(...)` |
| 10 | SET | `lastUpdDtm = ekk0341c330OUT.getString(UPD_DTM)` |

**Block 8.3** — [CALL] EKK0081B035 Same Location Service Contract List (L635–L642)

> Since v5.00.00, replaces the old EKK0081B011 call. Checks if other services (network, phone) share the same location/line. If so, the line detail cannot be cancelled.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0081b035IN = new CAANMsg(EKK0081B035CBSMsg.class.getName())` |
| 2 | EXEC | `ekk0081b035IN.set(TEMPLATEID, "EKK0081B035")` |
| 3 | EXEC | `ekk0081b035IN.set(FUNC_CODE, "1")` |
| 4 | EXEC | `ekk0081b035IN.set(KEY_SYSID, ccMsg.get("sysid"))` |
| 5 | EXEC | `ekk0081b035IN.set(KEY_SVC_KEI_KAISEN_UCWK_NO, curKaiUcwkInfo.getString(SVC_KEI_KAISEN_UCWK_NO))` |
| 6 | CALL | `ekk0081b035OUTList = callSC(...).getCAANMsgList(EKK0081B035CBSMSG1LIST)` |
| 7 | IF | `ekk0081b035OUTList.length > 0` // other services exist at same location |
| 8 | EXEC | `continue` // line cannot be cancelled |

**Block 8.4** — [IF] Check line detail status for cancellation [CD00054_010="010"] (L646–L668)

> Since OM-2014-0001878: Only cancels line detail if its status is "010" (Received/受注済). If status is "100" (In use/使用中), nothing is done — the line remains active and the cancellation is effectively a no-op (same as network/phone cancellation behavior).

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_kei_kaisen_ucwk_stat = curKaiUcwkInfo.getString(SVC_KEI_KAISEN_UCWK_STAT)` |
| 2 | IF | `svc_kei_kaisen_ucwk_stat = "010" (受注済)` [CD00054_010] |
| 3 | SET | `ekk0251c070IN = new CAANMsg(EKK0251C070CBSMsg.class.getName())` |
| 4 | EXEC | `ekk0251c070IN.set(TEMPLATEID, "EKK0251C070")` |
| 5 | EXEC | `ekk0251c070IN.set(FUNC_CODE, funcCode)` |
| 6 | EXEC | `ekk0251c070IN.set(SVC_KEI_KAISEN_UCWK_NO, curKaiUcwkInfo.getString(SVC_KEI_KAISEN_UCWK_NO))` |
| 7 | EXEC | `ekk0251c070IN.set(MSKM_DTL_NO, mskmDtlNo)` |
| 8 | EXEC | `ekk0251c070IN.set(SVC_CANCEL_RSN_CD, "01")` |
| 9 | EXEC | `ekk0251c070IN.set(UPD_DTM_BF, lastUpdDtm)` |
| 10 | CALL | `ekk0251c070OUT = callSC(...)` |
| 11 | SET | `lastUpdDtm = ekk0251c070OUT.getString(UPD_DTM)` |

**Block 9** — [IF] Status-based application cancellation branch [curSvcKeiStat = "010" (受付済)] (L644–L697)

> v4.01.00 addition: When the service contract status is "010" (Received/受付済), this block checks pending application details and cancels them accordingly.

**Block 9.1** — [SET] Initialize alive check flag (L647–L649)

| # | Type | Code |
|---|------|------|
| 1 | SET | `isAlive = false` |

**Block 9.2** — [CALL] EKK0011B020 Application Contract Details List (L652–L661)

> Queries all pending application contract details to check for remaining live details.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0011B020IN = new CAANMsg(EKK0011B020CBSMsg.class.getName())` |
| 2 | EXEC | `eKK0011B020IN.set(TEMPLATEID, "EKK0011B020")` |
| 3 | EXEC | `eKK0011B020IN.set(FUNC_CODE, "1")` |
| 4 | EXEC | `eKK0011B020IN.set(KEY_MSKM_NO, mskmNo)` |
| 5 | EXEC | `eKK0011B020IN.set(KEY_RSV_APLY_YMD, JPCBPCommon.getOpeDate(null))` |
| 6 | CALL | `eKK0011B020OUTList = callSC(...).getCAANMsgList(EKK0011B020CBSMSG1LIST)` |

**Block 9.3** — [FOR] Loop each application detail (L663–L680)

**Block 9.3.1** — [IF] Skip current detail being cancelled (L665–L669)

> The detail that triggered this cancellation is excluded from the "alive" check (a contract cannot cancel itself from the alive perspective).

| # | Type | Code |
|---|------|------|
| 1 | SET | `mskm_dtl_no = statusInfo.getString(MSKM_DTL_NO)` |
| 2 | IF | `mskmDtlNo.equals(mskm_dtl_no)` |
| 3 | EXEC | `continue` |

**Block 9.3.2** — [IF] Check if detail has a valid service contract and is not cancelled (L671–L677)

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_kei_no = statusInfo.getString(SVC_KEI_NO)` |
| 2 | SET | `mskm_dtl_stat = statusInfo.getString(MSKM_DTL_STAT)` |
| 3 | IF | `svc_kei_no != null && !"".equals(svc_kei_no)` |
| 4 | IF | `mskm_dtl_stat != "920" (キャンセル済)` [MSKM_DTL_STAT_CANCEL] |
| 5 | SET | `isAlive = true` // at least one non-cancelled detail exists |

**Block 9.4** — [IF] Branch: isAlive determines cancellation granularity (L682–L695)

> If no live application details remain (`isAlive = false`), cancel the **entire application** (EKK0011C060). If other live details exist, cancel only the **individual detail** (EKK0021C070).

**Block 9.4.1** — [IF] `!isAlive` — Cancel entire application (L683–L693)

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0011C060IN = new CAANMsg(EKK0011C060CBSMsg.class.getName())` |
| 2 | EXEC | `eKK0011C060IN.set(TEMPLATEID, "EKK0011C060")` |
| 3 | EXEC | `eKK0011C060IN.set(FUNC_CODE, funcCode)` |
| 4 | EXEC | `eKK0011C060IN.set(MSKM_NO, mskmNo)` |
| 5 | EXEC | `eKK0011C060IN.set(MSKM_CANCEL_RSN_CD, "30")` // application cancellation reason |
| 6 | EXEC | `eKK0011C060IN.set(CONSMBSN_MSKM_STAT_SKBT_CD, "04")` |
| 7 | EXEC | `eKK0011C060IN.set(KK0011_UPD_DTM_BF, mskm_lastUpdDtm)` |
| 8 | SET | `templateArray = new CAANMsg[1]` |
| 9 | EXEC | `templateArray[0].set(MSKM_DTL_NO, mskmDtlNo)` |
| 10 | EXEC | `templateArray[0].set(MSKM_DTL_CANCEL_RSN_CD, "30")` |
| 11 | EXEC | `eKK0011C060IN.set(EKK0011C060CBSMSG1LIST, templateArray)` |
| 12 | CALL | `callSC(..., eKK0011C060IN)` |

**Block 9.4.2** — [ELSE] `isAlive` — Cancel individual application detail (L694–L699)

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0021C070IN = new CAANMsg(EKK0021C070CBSMsg.class.getName())` |
| 2 | EXEC | `eKK0021C070IN.set(TEMPLATEID, "EKK0021C070")` |
| 3 | EXEC | `eKK0021C070IN.set(FUNC_CODE, funcCode)` |
| 4 | EXEC | `eKK0021C070IN.set(MSKM_DTL_NO, mskmDtlNo)` |
| 5 | EXEC | `eKK0021C070IN.set(MSKM_DTL_CANCEL_RSN_CD, "30")` |
| 6 | EXEC | `eKK0021C070IN.set(UPD_DTM_BF, mskm_lastUpdDtm)` |
| 7 | CALL | `callSC(..., eKK0021C070IN)` |

**Block 10** — [IF] Work order cancellation branch [curSvcKeiStat="020" (照映済), kojiak_stat="130"] (L702–L722)

> OM-2018-0000597 addition: When the service contract is confirmed (照映済) with an associated work order (工事案件) in active status (130), cancels the work order.

| # | Type | Code |
|---|------|------|
| 1 | IF | `curSvcKeiStat = "020" (照映済)` AND `ccMsg.get("kojiak_no")` is set AND `ccMsg.get("kojiak_stat") = "130"` |
| 2 | SET | `eKU0091C010IN = new CAANMsg(EKU0091C010CBSMsg.class.getName())` |
| 3 | EXEC | `eKU0091C010IN.set(TEMPLATEID, "EKU0091C010")` |
| 4 | EXEC | `eKU0091C010IN.set(FUNC_CODE, funcCode)` |
| 5 | EXEC | `eKU0091C010IN.set(SVC_KEI_NO, ccMsg.get("svc_kei_no"))` |
| 6 | EXEC | `eKU0091C010IN.set(SVC_KEI_KAISEN_UCWK_NO, ccMsg.get("svc_kei_kaisen_ucwk_no"))` |
| 7 | EXEC | `eKU0091C010IN.set(MSKM_DTL_NO, mskmDtlNo)` |
| 8 | EXEC | `eKU0091C010IN.set(KOJIAK_NO, ccMsg.get("kojiak_no"))` |
| 9 | EXEC | `eKU0091C010IN.set(KOJI_UK_CD, "002")` // cancellation type code |
| 10 | EXEC | `eKU0091C010IN.set(KOJI_UK_DTAIL_CD, "C0")` // cancellation detail code |
| 11 | EXEC | `eKU0091C010IN.set(KOJI_UK_OPTNTY_IDO_DTM, JPCBPCommon.getOpeDateTimeStamp(null))` // undo timestamp |
| 12 | EXEC | `eKU0091C010IN.set(KOJIAK_CANCEL_YMD, JPCBPCommon.getOpeDate(null))` // cancellation date |
| 13 | CALL | `callSC(..., eKU0091C010IN)` |

**Block 11** — [RETURN] Return lastUpdDtm (L724)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `lastUpdDtm` // optimistic concurrency timestamp for caller |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svcCancel` | Method | Service Contract Cancellation — the top-level cancellation operation for a TV service contract |
| `svc_kei_no` | Field | Service Contract Number (サービス契約番号) — unique identifier for the service contract header |
| `svc_kei_ucwk_no` | Field | Service Contract Detail Work Number (サービス契約内訳作業番号) — unique ID for a service contract line item/detail |
| `svc_kei_ucwk_stat` | Field | Service Contract Detail Status — 910 = Disconnection completed, 920 = Cancellation completed |
| `svc_kei_stat` | Field | Service Contract Status — 010 = Received, 020 = Confirmed (照映済) |
| `svc_kei_kaisen_ucwk_no` | Field | Service Contract Line Detail Number (サービス契約回線内訳番号) — identifies a specific line detail (回線) within the service contract |
| `svc_kei_kaisen_ucwk_stat` | Field | Service Contract Line Detail Status — 010 = Received (受注済), 100 = In Use (使用中) |
| `svc_kei_kaisen_ucwk_stat` | Field | 010 = 受注済 (Received), 100 = 使用中 (In Use) |
| `kktk_svc_kei_no` | Field | Equipment-provided Service Contract Number (機器提供サービス契約番号) — ID for a contract involving customer-provided equipment |
| `kktk_svc_kei_stat` | Field | Equipment-provided Service Contract Status — 910 = Disconnection completed, 920 = Cancellation completed |
| `kktk_svc_cd` | Field | Equipment-provided Service Code (機器提供サービスコード) — classifies equipment type: C013 = V-ONU |
| `op_svc_kei_stat` | Field | Option Service Contract Status — 910 = Disconnection completed, 920 = Cancellation completed |
| `op_svc_kei_no` | Field | Option Service Contract Number (オプションサービス契約番号) — ID for an ancillary/option service |
| `mskm_no` | Field | Application Number (申込番号) — top-level subscription/application ID |
| `mskm_dtl_no` | Field | Application Detail Number (申込明細番号) — specific line item within the application |
| `mskm_dtl_stat` | Field | Application Detail Status — 920 = Cancellation completed (キャンセル済) |
| `ido_div` | Field | Move Category Division (異動区分) — classifies the type of movement/change (e.g., address change, registration) |
| `func_code` | Field | Function Code (機能コード) — identifies the functional context of the CBS call |
| `lastUpdDtm` | Field | Last Update Timestamp (最終更新年月日時分秒) — used for optimistic concurrency control across CBS calls |
| `kojiak_no` | Field | Work Order Number (工事案件番号) — ID for a construction/installation work order |
| `kojiak_stat` | Field | Work Order Status (工事案件ステータス) — 130 indicates an active/valid work order |
| `SVC_CANCEL_RSN_CD` | Field | Service Contract Cancellation Reason Code — "01" = general cancellation |
| `MSKM_CANCEL_RSN_CD` | Field | Application Cancellation Reason Code — "30" = application/application-detail cancellation |
| `KOJI_UK_CD` | Field | Work Order Cancellation Type Code — "002" indicates work order cancellation |
| `KOJI_UK_DTAIL_CD` | Field | Work Order Cancellation Detail Code — "C0" cancellation detail |
| KK_T_SVC_KEI | Table | Service Contract master table — stores service contract headers |
| KK_T_SVC_KEI_UCWK | Table | Service Contract Detail table — stores line-item details within a service contract |
| KK_T_KKTK_SVC_KEI | Table | Equipment-provided Service Contract table — stores contracts for equipment rental/leased devices |
| KK_T_OP_SVC_KEI | Table | Option Service Contract table — stores ancillary/option service contracts |
| KK_T_SVC_KEI_KAISEN_UCWK | Table | Service Contract Line Detail table — stores line (回線) details such as broadband/telephone lines |
| KK_T_MSKM | Table | Application (申込) master table — stores customer subscription applications |
| KK_T_MSKM_DTL | Table | Application Detail table — stores line-item details within an application |
| KK_T_KOJIAK | Table | Work Order (工事案件) table — stores construction/installation orders |
| EKK0081C160CBS | CBS | Service Contract Cancellation (サービス契約キャンセル) |
| EKK0161B004CBS | CBS | Service Contract Details List (サービス契約内訳一覧照会) |
| EKK0161C160CBS | CBS | Service Contract Detail Cancellation (サービス契約内訳キャンセル) |
| EKK0341B501CBS | CBS | Equipment-provided Service Contract List by detail (機器提供サービス契約一覧照会・サービス契約内訳番号) |
| EKK0341C330CBS | CBS | Equipment-provided Service Contract Cancellation (機器提供サービス契約キャンセル) |
| EKK0351B002CBS | CBS | Option Service Contract List (オプションサービス契約一覧照会・サービス契約番号) |
| EKK0351C220CBS | CBS | Option Service Contract Cancellation (オプションサービス契約キャンセル) |
| EKK0241B001CBS | CBS | Service Contract Line Details List (サービス契約回線内訳一覧照会) |
| EKK0341B504CBS | CBS | Equipment-provided Service Contract List by line (機器提供サービス契約一覧照会・サービス契約回線内訳) |
| EKK0081B035CBS | CBS | Same Location Service Contract List (同一利用場所サービス契約一覧照会) — checks shared-line dependencies |
| EKK0251C070CBS | CBS | Service Contract Line Detail Cancellation (サービス契約回線内訳キャンセル) |
| EKK0011B020CBS | CBS | Pending Application Contract Details List (申込サービス契約内訳一覧照会) |
| EKK0011C060CBS | CBS | Application Cancellation (申込キャンセル) — cancels entire application |
| EKK0021C070CBS | CBS | Application Detail Cancellation (申込明細キャンセル) — cancels individual detail |
| EKU0091C010CBS | CBS | Work Order Cancellation (工事案件取消) — cancels a work order |
| V-ONU | Business term | V-ONU (Virtual Optical Network Unit) — fiber-to-the-home optical network terminal equipment leased to the customer |
| 解消済 (DSLZUMI) | Status | Disconnection completed — the service line has been physically/logically disconnected |
| キャンセル済 (CANCELZUMI) | Status | Cancellation completed — the contract detail has been fully cancelled |
| 受注済 (010) | Status | Received/Order confirmed — the application/contract has been received but not yet processed |
| 照映済 (020) | Status | Confirmed/Reviewed — the application has been reviewed and confirmed |
| 使用中 (100) | Status | In Use — the line detail is actively in use and cannot be cancelled |
