---
title: Business Logic — KKW05601SFLogic.invokeServiceKKSV0170()
type: method
---

# Business Logic — KKW05601SFLogic.invokeServiceKKSV0170() [99 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW05601SF.KKW05601SFLogic` |
| Layer | Web Logic (Web application business logic layer) |
| Module | `KKW05601SF` (Package: `eo.web.webview.KKW05601SF`) |

## 1. Role

### KKW05601SFLogic.invokeServiceKKSV0170()

This method executes the service-layer processing for the **"Toki Registration Initial Display"** screen (KKSV0170), which is the initialization screen for displaying customer information related to "Toki" (転換 — a telecom service plan conversion/switching process, typically when a customer converts their existing service contract to a new plan). The method performs a comprehensive data gather operation: it sets up 20 distinct service component (SC) data-fetching tasks, executes them all in a single batch service invocation, and then extracts the resulting data from the output map into a structured return mapper object. It follows a **builder + batch dispatch** design pattern — constructing input parameters and service component registrations on the "set-up" phase, delegating the actual data retrieval to the framework's `invokeService` method, and then performing "mapping" to transform the flat output map back into typed DataBeans. The method acts as the **central initialization orchestrator** for the KKSV0170 screen, assembling all customer, service contract, phone number, code management, business parameter, error contract, address change, work order, phone status, and phone agreement data needed to render the initial page state for Toki (plan conversion) registration. It is invoked by two action methods: `actionTokiAddInit()` (add registration init) and `actionTokiCfmInit()` (confirmation init), making it the shared initialization entry point for both add and confirm flows.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["invokeServiceKKSV0170(paramBean)"])

    START --> INIT["Initialize: paramMap, inputMap, outputMap, mapper"]

    INIT --> TELE["Set telegram info: UC ID=UCID_KKSV0170, OP ID=OPID_KKSV0170OP"]

    TELE --> SET01["setKKSV017001SC - Customer agreement inquiry (FUNC_CODE_2)"]
    SET01 --> SET02["setKKSV017002SC - Service contract agreement inquiry (FUNC_CODE_2)"]
    SET02 --> SET03["setKKSV017003SC - Service contract details agreement inquiry (FUNC_CODE_2)"]
    SET03 --> SET04["setKKSV017004SC - Service contract details: eo光和 telephone inquiry (FUNC_CODE_2)"]
    SET04 --> SET05["setKKSV017005SC - Phone reservation listing (FUNC_CODE_1)"]
    SET05 --> SET06["setKKSV017006SC - Code management listing (transfer Toki registration code) (FUNC_CODE_3)"]
    SET06 --> SET07["setKKSV017007SC - Code management listing (transfer Toki type code) (FUNC_CODE_3)"]
    SET07 --> SET08["setKKSV017008SC - Code management listing (existence code) (FUNC_CODE_3)"]
    SET08 --> SET09["setKKSV017009SC - Business parameter management: Toki execution period (FUNC_CODE_1)"]
    SET09 --> SET10["setKKSV017010SC - Business parameter management: Toki content (suspension plan) (FUNC_CODE_1)"]
    SET10 --> SET11["setKKSV017011SC - Business parameter management: Toki content (transfer number plan) (FUNC_CODE_1)"]
    SET11 --> SET12["setKKSV017012SC - Business parameter management: Toki content (suspension plan & contact) (FUNC_CODE_1)"]
    SET12 --> SET13["setKKSV017013SC - Error contract listing (FUNC_CODE_1)"]
    SET13 --> SET14["setKKSV017014SC - Service contract details<eo光和 telephone> listing (FUNC_CODE_1)"]
    SET14 --> SET15["setKKSV017015SC - Error contract listing (service contract details number) (FUNC_CODE_1)"]
    SET15 --> SET16["setKKSV017016SC - Phone number listing: SWID (FUNC_CODE_4)"]
    SET16 --> SET17["setKKSV017017SC - Address change details listing (change ID) (FUNC_CODE_2)"]
    SET17 --> SET18["setKKSV017018SC - Address change agreement inquiry (FUNC_CODE_1)"]
    SET18 --> SET19["setKKSV017019SC - Address change details listing (FUNC_CODE_1)"]
    SET19 --> SET20["setKKSV017020SC - Service contract_work plan listing (FUNC_CODE_1)"]
    SET20 --> SET21["setKKSV017021SC - Work plan agreement inquiry (FUNC_CODE_1)"]
    SET21 --> SETTEL["setTELNOSTATJUDGECC - Phone number status judgment CC (FUNC_CODE_1)"]
    SETTEL --> SET22["setKKSV017022SC - Phone number agreement inquiry (FUNC_CODE_1)"]
    SET22 --> SETWORK["setWORK - Work data setup (FUNC_CODE_1)"]

    SETWORK --> INVOKE["invokeService(paramMap, inputMap, outputMap)"]

    INVOKE --> GET01["getKKSV017001SC - Extract customer agreement (from outputMap)"]
    GET01 --> GET02["getKKSV017002SC - Extract service contract agreement (from outputMap)"]
    GET02 --> GET03["getKKSV017003SC - Extract service contract details agreement (from outputMap)"]
    GET03 --> GET04["getKKSV017004SC - Extract service contract details: eo光和 telephone agreement (from outputMap)"]
    GET04 --> GET05["getKKSV017005SC - Extract phone reservation listing (from outputMap)"]
    GET05 --> GET06["getKKSV017006SC - Extract code management: transfer Toki registration code (from outputMap)"]
    GET06 --> GET07["getKKSV017007SC - Extract code management: transfer Toki type code (from outputMap)"]
    GET07 --> GET08["getKKSV017008SC - Extract code management: existence code (from outputMap)"]
    GET08 --> GET09["getKKSV017009SC - Extract business parameter: Toki execution period (from outputMap)"]
    GET09 --> GET10["getKKSV017010SC - Extract business parameter: Toki content - suspension plan (from outputMap)"]
    GET10 --> GET11["getKKSV017011SC - Extract business parameter: Toki content - transfer number plan (from outputMap)"]
    GET11 --> GET12["getKKSV017012SC - Extract business parameter: Toki content - suspension plan & contact (from outputMap)"]
    GET12 --> GET13["getKKSV017013SC - Extract error contract listing (from outputMap)"]
    GET13 --> GET14["getKKSV017014SC - Extract service contract details<eo光和 telephone> listing (from outputMap)"]
    GET14 --> GET15["getKKSV017015SC - Extract error contract listing - service contract details number (from outputMap)"]
    GET15 --> GET16["getKKSV017016SC - Extract phone number listing: SWID (from outputMap)"]
    GET16 --> GET18["getKKSV017018SC - Extract address change agreement (from outputMap)"]
    GET18 --> GET21["getKKSV017021SC - Extract work plan agreement (from outputMap)"]
    GET21 --> GETTEL["getTELNOSTATJUDGECC - Extract phone number status judgment (from outputMap)"]
    GETTEL --> GET22["getKKSV017022SC - Extract phone number agreement (from outputMap)"]

    GET22 --> CHECKERR{"inputMap contains KKSV017022SC?"}

    CHECKERR -- Yes --> GETERR["getSearchErrFlg(\"KKSV017022SC\", outputMap) -> TELNO_SEARCH_ERRFLG"]
    CHECKERR -- No --> RETURN["Return mapper"]

    GETERR --> RETURN
    RETURN --> END(["End"])
```

### Processing Flow Summary

1. **Setup (Lines 1652–1657)**: Initialize four HashMaps (`paramMap`, `inputMap`, `outputMap`) and the `KKSV0170_KKSV0170OPDBMapper` object for data mapping between DataBeans and the service layer.

2. **Telegram Info (Lines 1659–1660)**: Set the use case ID (`UCID_KKSV0170`) and operation ID (`OPID_KKSV0170OP`) in the parameter map for system tracking and audit purposes.

3. **Service Component Set-up Phase (Lines 1662–1697)**: Sequentially register 22 service component fetch tasks via `setKKSV0170##SC` and related methods on the mapper. Each task specifies:
   - The input `paramBean` (request data)
   - The `inputMap` (search conditions)
   - A `FUNC_CODE` (function code: 1, 2, 3, or 4) that controls access/visibility
   - A Japanese comment describing what data to fetch

4. **Service Execution (Line 1699)**: Delegate all registered service component operations to `invokeService(paramMap, inputMap, outputMap)`, which executes the batch of SC calls and populates `outputMap` with results.

5. **Result Extraction Phase (Lines 1704–1735)**: Sequentially extract results from `outputMap` back into the DataBeans using matching `getKKSV0170##SC` methods. Note: SC codes 17, 19, and 20 are set up but not extracted (their data may be accessed directly from inputMap or used internally).

6. **Error Flag Check (Lines 1737–1742)**: If `KKSV017022SC` exists in `inputMap`, call `JZMWebCommon.getSearchErrFlg()` to retrieve the search error flag and store it in `TELNO_SEARCH_ERRFLG` instance field.

7. **Return (Line 1744)**: Return the populated `KKSV0170_KKSV0170OPDBMapper` object.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `paramBean` | `X31SDataBeanAccess[]` | Array of DataBean access objects containing input data for the KKSV0170 Toki (plan conversion) registration screen. `paramBean[0]` specifically holds the primary registration context. This array carries customer identifiers, search criteria, and any data already collected that is needed to pre-populate the initial display. It is used as the source for extracting values and as the target for populating results. |

**Instance fields / external state read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `TELNO_SEARCH_ERRFLG` | `String` (inferred) | Phone number search error flag — set when phone number agreement inquiry (KKSV017022SC) returns with an error condition; used to display search error messages on the screen |

## 4. CRUD Operations / Called Services

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

All 22 SC calls in the set-up phase (setKKSV0170##SC / setTELNOSTATJUDGECC / setWORK) register service component tasks to be executed by `invokeService`. The 17 SC calls in the extraction phase (getKKSV0170##SC / getTELNOSTATJUDGECC) read results from the output map into DataBeans. Both `setKKSV0170##SC` and `getKKSV0170##SC` are part of the same underlying SC call — `set` registers the input parameters, and `get` retrieves the output data.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `setKKSV017001SC` / `getKKSV017001SC` | KKSV017001SC | (customer agreement data) | Customer agreement inquiry — retrieves customer's service agreement status |
| R | `setKKSV017002SC` / `getKKSV017002SC` | KKSV017002SC | (service contract data) | Service contract agreement inquiry — retrieves active service contract details |
| R | `setKKSV017003SC` / `getKKSV017003SC` | KKSV017003SC | (service contract details) | Service contract details agreement inquiry — retrieves detailed contract terms |
| R | `setKKSV017004SC` / `getKKSV017004SC` | KKSV017004SC | (eo光和 telephone contract) | Service contract details for eo光和 telephone inquiry — retrieves fiber optic service contract details |
| R | `setKKSV017005SC` / `getKKSV017005SC` | KKSV017005SC | (phone reservation data) | Phone reservation listing — retrieves all phone number reservations |
| R | `setKKSV017006SC` / `getKKSV017006SC` | KKSV017006SC | (transfer Toki registration code table) | Code management listing — transfer Toki registration code lookup |
| R | `setKKSV017007SC` / `getKKSV017007SC` | KKSV017007SC | (transfer Toki type code table) | Code management listing — transfer Toki type code lookup |
| R | `setKKSV017008SC` / `getKKSV017008SC` | KKSV017008SC | (existence code table) | Code management listing — existence code lookup |
| R | `setKKSV017009SC` / `getKKSV017009SC` | KKSV017009SC | (business parameter table) | Business parameter management — Toki execution period parameter |
| R | `setKKSV017010SC` / `getKKSV017010SC` | KKSV017010SC | (business parameter table) | Business parameter management — Toki content: suspension plan parameter |
| R | `setKKSV017011SC` / `getKKSV017011SC` | KKSV017011SC | (business parameter table) | Business parameter management — Toki content: transfer number plan parameter |
| R | `setKKSV017012SC` / `getKKSV017012SC` | KKSV017012SC | (business parameter table) | Business parameter management — Toki content: suspension plan & contact parameter |
| R | `setKKSV017013SC` / `getKKSV017013SC` | KKSV017013SC | (error contract data) | Error contract listing — retrieves contracts with error/abnormal status (added via IT1-2012-0000780) |
| R | `setKKSV017014SC` / `getKKSV017014SC` | KKSV017014SC | (service contract details data) | Service contract details <eo光和 telephone> listing (service contract number) — added via ANK-1293-00-00 |
| R | `setKKSV017015SC` / `getKKSV017015SC` | KKSV017015SC | (error contract data) | Error contract listing (service contract details number) — added via ANK-1293-00-00 |
| R | `setKKSV017016SC` / `getKKSV017016SC` | KKSV017016SC | (phone number data) | Phone number listing: SWID — function code changed from 3 to 4 via 2013.07.14 modification |
| R | `setKKSV017017SC` / `getKKSV017017SC` | KKSV017017SC | (address change details data) | Address change details listing (change ID) — added via OM-2016-0000157 |
| R | `setKKSV017018SC` / `getKKSV017018SC` | KKSV017018SC | (address change agreement data) | Address change agreement inquiry — added via OM-2016-0000157 |
| R | `setKKSV017019SC` / `getKKSV017019SC` | KKSV017019SC | (address change details data) | Address change details listing — added via OM-2016-0000157 |
| R | `setKKSV017020SC` / `getKKSV017020SC` | KKSV017020SC | (service contract work plan data) | Service contract_work plan listing — added via OM-2016-0000157 |
| R | `setKKSV017021SC` / `getKKSV017021SC` | KKSV017021SC | (work plan agreement data) | Work plan agreement inquiry — added via OM-2016-0000157 |
| R | `setTELNOSTATJUDGECC` / `getTELNOSTATJUDGECC` | TELNOSTATJUDGECC | (phone number status data) | Phone number status judgment CC — added via ANK-4494-00-00 |
| R | `setKKSV017022SC` / `getKKSV017022SC` | KKSV017022SC | (phone number agreement data) | Phone number agreement inquiry — STEP2 addition via ANK-4494-00-00 |
| - | `setWORK` | WORK | (work data) | Work data setup — generic work data handling |
| R | `JZMWebCommon.getSearchErrFlg` | JZMWebCommon | - | Retrieves search error flag for KKSV017022SC results |
| - | `JCCBatCommon.invokeService` | JCCBatCommon | - | Batch service invocation executor — executes all registered SC operations |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0170 | `KKW05601SFLogic.actionTokiAddInit()` → `invokeServiceKKSV0170(paramBean)` | `getKKSV017001SC` [R], `getKKSV017002SC` [R], `getKKSV017003SC` [R], `getKKSV017004SC` [R], `getKKSV017005SC` [R], `getKKSV017006SC` [R], `getKKSV017007SC` [R], `getKKSV017008SC` [R], `getKKSV017009SC` [R], `getKKSV017010SC` [R], `getKKSV017011SC` [R], `getKKSV017012SC` [R], `getKKSV017013SC` [R], `getKKSV017014SC` [R], `getKKSV017015SC` [R], `getKKSV017016SC` [R], `getKKSV017018SC` [R], `getKKSV017021SC` [R], `getTELNOSTATJUDGECC` [R], `getKKSV017022SC` [R], `getSearchErrFlg` [R] |
| 2 | Screen:KKSV0170 | `KKW05601SFLogic.actionTokiCfmInit()` → `invokeServiceKKSV0170(paramBean)` | `getKKSV017001SC` [R], `getKKSV017002SC` [R], `getKKSV017003SC` [R], `getKKSV017004SC` [R], `getKKSV017005SC` [R], `getKKSV017006SC` [R], `getKKSV017007SC` [R], `getKKSV017008SC` [R], `getKKSV017009SC` [R], `getKKSV017010SC` [R], `getKKSV017011SC` [R], `getKKSV017012SC` [R], `getKKSV017013SC` [R], `getKKSV017014SC` [R], `getKKSV017015SC` [R], `getKKSV017016SC` [R], `getKKSV017018SC` [R], `getKKSV017021SC` [R], `getTELNOSTATJUDGECC` [R], `getKKSV017022SC` [R], `getSearchErrFlg` [R] |

## 6. Per-Branch Detail Blocks

### Block 1 — SETUP (Lines 1652–1660)

Initialize parameter maps and set system tracking IDs.

| # | Type | Code |
|---|------|------|
| 1 | SET | `HashMap<String, Object> paramMap = new HashMap<String, Object>();` // Parameter setup map [-> paramMap] |
| 2 | SET | `HashMap<String, Object> inputMap = new HashMap<String, Object>();` // Search conditions map [-> inputMap] |
| 3 | SET | `HashMap<String, Object> outputMap = new HashMap<String, Object>();` // Result storage map [-> outputMap] |
| 4 | SET | `KKSV0170_KKSV0170OPDBMapper mapper = new KKSV0170_KKSV0170OPDBMapper();` // DataBean-BP mapper [-> mapper] |
| 5 | SET | `paramMap.put(X31CWebConst.TELEGRAM_INFO_USECASE_ID, JKKCommonConst.UCID_KKSV0170);` // Set use case ID [-> UCID_KKSV0170] |
| 6 | SET | `paramMap.put(X31CWebConst.TELEGRAM_INFO_OPERATION_ID, JKKCommonConst.OPID_KKSV0170OP);` // Set operation ID [-> OPID_KKSV0170OP] |

### Block 2 — SERVICE COMPONENT SET-UP PHASE (Lines 1662–1697)

Register 22 service component data-fetching tasks. Each `setKKSV0170##SC` call registers a service component operation with specific function code for access control.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.setKKSV017001SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_2);` // Customer agreement inquiry [-> FUNC_CODE_2="2"] |
| 2 | CALL | `mapper.setKKSV017002SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_2);` // Service contract agreement inquiry [-> FUNC_CODE_2="2"] |
| 3 | CALL | `mapper.setKKSV017003SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_2);` // Service contract details agreement inquiry [-> FUNC_CODE_2="2"] |
| 4 | CALL | `mapper.setKKSV017004SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_2);` // Service contract details: eo光和 telephone inquiry [-> FUNC_CODE_2="2"] |
| 5 | CALL | `mapper.setKKSV017005SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Phone reservation listing [-> FUNC_CODE_1="1"] |
| 6 | CALL | `mapper.setKKSV017006SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_3);` // Code management: transfer Toki registration code [-> FUNC_CODE_3="3"] |
| 7 | CALL | `mapper.setKKSV017007SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_3);` // Code management: transfer Toki type code [-> FUNC_CODE_3="3"] |
| 8 | CALL | `mapper.setKKSV017008SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_3);` // Code management: existence code [-> FUNC_CODE_3="3"] |
| 9 | CALL | `mapper.setKKSV017009SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Business parameter: Toki execution period [-> FUNC_CODE_1="1"] |
| 10 | CALL | `mapper.setKKSV017010SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Business parameter: Toki content (suspension plan) [-> FUNC_CODE_1="1"] |
| 11 | CALL | `mapper.setKKSV017011SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Business parameter: Toki content (transfer number plan) [-> FUNC_CODE_1="1"] |
| 12 | CALL | `mapper.setKKSV017012SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Business parameter: Toki content (suspension plan & contact) [-> FUNC_CODE_1="1"] |
| 13 | CALL | `mapper.setKKSV017013SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Error contract listing [-> FUNC_CODE_1="1"] (IT1-2012-0000780 ADD) |
| 14 | CALL | `mapper.setKKSV017014SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Service contract details<eo光和 telephone> listing (service contract number) [-> FUNC_CODE_1="1"] (ANK-1293-00-00 ADD) |
| 15 | CALL | `mapper.setKKSV017015SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Error contract listing (service contract details number) [-> FUNC_CODE_1="1"] (ANK-1293-00-00 ADD) |
| 16 | CALL | `mapper.setKKSV017016SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_4);` // Phone number listing: SWID [-> FUNC_CODE_4="4"] (modified from FUNC_CODE_3 via 2013.07.14) |
| 17 | CALL | `mapper.setKKSV017017SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_2);` // Address change details listing (change ID) [-> FUNC_CODE_2="2"] (OM-2016-0000157 ADD) |
| 18 | CALL | `mapper.setKKSV017018SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Address change agreement inquiry [-> FUNC_CODE_1="1"] (OM-2016-0000157 ADD) |
| 19 | CALL | `mapper.setKKSV017019SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Address change details listing [-> FUNC_CODE_1="1"] (OM-2016-0000157 ADD) |
| 20 | CALL | `mapper.setKKSV017020SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Service contract_work plan listing [-> FUNC_CODE_1="1"] (OM-2016-0000157 ADD) |
| 21 | CALL | `mapper.setKKSV017021SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Work plan agreement inquiry [-> FUNC_CODE_1="1"] (OM-2016-0000157 ADD) |
| 22 | CALL | `mapper.setTELNOSTATJUDGECC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Phone number status judgment CC [-> FUNC_CODE_1="1"] (ANK-4494-00-00 ADD) |
| 23 | CALL | `mapper.setKKSV017022SC(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Phone number agreement inquiry [-> FUNC_CODE_1="1"] (ANK-4494-00-00 STEP2 ADD) |
| 24 | CALL | `mapper.setWORK(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1);` // Work data setup [-> FUNC_CODE_1="1"] |

### Block 3 — SERVICE EXECUTION (Line 1699)

Delegate all registered service component operations to the batch service framework.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `invokeService(paramMap, inputMap, outputMap);` // Execute batch service operations, populates outputMap with results |

### Block 4 — RESULT EXTRACTION PHASE (Lines 1704–1735)

Extract results from `outputMap` back into DataBeans through matching `getKKSV0170##SC` methods. Note: SC codes 17, 19, and 20 are set up but not extracted — their data may be used internally.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.getKKSV017001SC(paramBean, outputMap);` // Extract customer agreement [from outputMap] |
| 2 | CALL | `mapper.getKKSV017002SC(paramBean, outputMap);` // Extract service contract agreement [from outputMap] |
| 3 | CALL | `mapper.getKKSV017003SC(paramBean, outputMap);` // Extract service contract details agreement [from outputMap] |
| 4 | CALL | `mapper.getKKSV017004SC(paramBean, outputMap);` // Extract service contract details: eo光和 telephone agreement [from outputMap] |
| 5 | CALL | `mapper.getKKSV017005SC(paramBean, outputMap);` // Extract phone reservation listing [from outputMap] |
| 6 | CALL | `mapper.getKKSV017006SC(paramBean, outputMap);` // Extract code management: transfer Toki registration code [from outputMap] |
| 7 | CALL | `mapper.getKKSV017007SC(paramBean, outputMap);` // Extract code management: transfer Toki type code [from outputMap] |
| 8 | CALL | `mapper.getKKSV017008SC(paramBean, outputMap);` // Extract code management: existence code [from outputMap] |
| 9 | CALL | `mapper.getKKSV017009SC(paramBean, outputMap);` // Extract business parameter: Toki execution period [from outputMap] |
| 10 | CALL | `mapper.getKKSV017010SC(paramBean, outputMap);` // Extract business parameter: Toki content (suspension plan) [from outputMap] |
| 11 | CALL | `mapper.getKKSV017011SC(paramBean, outputMap);` // Extract business parameter: Toki content (transfer number plan) [from outputMap] |
| 12 | CALL | `mapper.getKKSV017012SC(paramBean, outputMap);` // Extract business parameter: Toki content (suspension plan & contact) [from outputMap] |
| 13 | CALL | `mapper.getKKSV017013SC(paramBean, outputMap);` // Extract error contract listing [from outputMap] |
| 14 | CALL | `mapper.getKKSV017014SC(paramBean, outputMap);` // Extract service contract details<eo光和 telephone> listing [from outputMap] |
| 15 | CALL | `mapper.getKKSV017015SC(paramBean, outputMap);` // Extract error contract listing (service contract details number) [from outputMap] |
| 16 | CALL | `mapper.getKKSV017016SC(paramBean, outputMap);` // Extract phone number listing: SWID [from outputMap] |
| 17 | CALL | `mapper.getKKSV017018SC(paramBean, outputMap);` // Extract address change agreement [from outputMap] (OM-2016-0000157) |
| 18 | CALL | `mapper.getKKSV017021SC(paramBean, outputMap);` // Extract work plan agreement [from outputMap] (OM-2016-0000157) |
| 19 | CALL | `mapper.getTELNOSTATJUDGECC(paramBean, outputMap);` // Extract phone number status judgment [from outputMap] (ANK-4494-00-00) |
| 20 | CALL | `mapper.getKKSV017022SC(paramBean, outputMap);` // Extract phone number agreement [from outputMap] (ANK-4494-00-00 STEP2) |

### Block 5 — ERROR FLAG CHECK (Lines 1737–1742)

Conditional extraction of search error flag for KKSV017022SC results.

> If KKSV017022SC data was present in the input map (indicating the phone number agreement inquiry was performed), retrieve the search error flag from the output map and store it in the instance field.

**Block 5.1** — IF `(inputMap.containsKey("KKSV017022SC"))` (L1738)

> The phone number agreement inquiry (KKSV017022SC) returned data, so check for search errors.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `TELNO_SEARCH_ERRFLG = JZMWebCommon.getSearchErrFlg("KKSV017022SC", outputMap);` // Get search error flag for KKSV017022SC [-> "KKSV017022SC"] |

**Block 5.2** — ELSE (implicit, L1737–1742)

> KKSV017022SC was not in inputMap; skip error flag retrieval.

### Block 6 — RETURN (Line 1744)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return mapper;` // Return populated KKSV0170_KKSV0170OPDBMapper to caller |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `UCID_KKSV0170` | Constant | Use Case ID for KKSV0170 — system tracking identifier for this use case |
| `OPID_KKSV0170OP` | Constant | Operation ID for KKSV0170 operation — system tracking identifier for this operation |
| `FUNC_CODE_1` | Constant | Function code "1" — standard access level for data retrieval |
| `FUNC_CODE_2` | Constant | Function code "2" — access level requiring agreement/authorization context |
| `FUNC_CODE_3` | Constant | Function code "3" — access level for code management data |
| `FUNC_CODE_4` | Constant | Function code "4" — access level for phone number listing with SWID (changed from 3 in 2013.07.14) |
| Toki (転換) | Business term | Service plan conversion — the process of converting a customer's existing telecom service to a new plan; core business context of this screen |
| KKSV0170 | Screen code | Toki Registration Initial Display screen — the screen number for the plan conversion registration initialization |
| Customer agreement | Domain concept | The customer's service agreement record — includes agreement status, start date, and related party information |
| Service contract | Domain concept | The binding service contract between the customer and the telecom provider — includes contract number, terms, and plan details |
| Service contract details | Domain concept | Granular details within a service contract — specific service items, features, and configurations |
| eo光和 telephone | Business term | eo光和 (eo Hikari) — NTT's fiber optic broadband service; "telephone" variant refers to bundled phone service |
| Phone reservation | Domain concept | Reserved/allocated phone number for a service — the phone number held for a specific customer or service |
| Code management | Domain concept | Reference code lookup — manages lists of valid codes for transfer Toki registration, transfer Toki type, and existence status |
| Transfer Toki registration code | Domain concept | Code identifying a transfer-to-conversion registration type — classifies the type of Toki (plan conversion) being performed |
| Transfer Toki type code | Domain concept | Code for the type of transfer conversion — further classifies how the conversion is executed |
| Existence code | Domain concept | Code indicating whether a record/entity exists — used for existence validation |
| Business parameter | Domain concept | System configuration parameters — business rules and thresholds stored in parameter tables, such as Toki execution periods |
| Toki execution period | Domain concept | The scheduled period during which Toki (plan conversion) operations can be executed |
| Toki content (suspension plan) | Domain concept | The suspension plan details — what service suspension arrangement applies during plan conversion |
| Toki content (transfer number plan) | Domain concept | The transfer number arrangement — how phone numbers are handled during plan conversion |
| Toki content (suspension plan & contact) | Domain concept | Combined suspension and contact information — suspension plan along with customer contact details for coordination |
| Error contract | Domain concept | Contract with abnormal/error status — contracts flagged for error conditions requiring attention |
| SWID | Acronym | Service Wide ID — identifier for service-wide phone number configuration |
| Address change | Domain concept | Customer address modification — process of updating the customer's registered address |
| Address change details | Domain concept | Granular information about an address change — including the old address, new address, and change ID |
| Address change agreement | Domain concept | The agreement record for an address change — confirmation that the address change was approved |
| Work plan | Domain concept | Work order/plan for service execution — scheduling and managing installation/maintenance work |
| Phone number status judgment | Domain concept | CC (Common Component) for determining the current status of a phone number — whether it is available, reserved, in use, or invalid |
| Phone number agreement | Domain concept | Agreement record for phone number assignment — confirms the phone number allocated to a service/customer |
| Search error flag | Domain concept | Indicator flag set when a database search operation encounters an error — stored in `TELNO_SEARCH_ERRFLG` |
| `TELNO_SEARCH_ERRFLG` | Field | Phone number search error flag instance variable — stores the result of search error detection for phone number operations |
| DataBean-BP mapper | Technical term | `KKSV0170_KKSV0170OPDBMapper` — the mapper object that coordinates DataBean creation and population with BP (Bean Process) mapped data from service components |
| invokeService (framework) | Framework method | Framework service invocation method that executes all registered SC operations in a single batch call |
| setKKSV0170##SC | Framework method | Service component registration method — registers input parameters for a service component operation (## = 01 through 22) |
| getKKSV0170##SC | Framework method | Service component result extraction method — reads output data from outputMap and populates DataBeans (## = 01 through 22, excluding 17, 19, 20) |
| setWORK | Framework method | Generic work data setup method — handles auxiliary work data for the service operation |
| ANK-1293-00-00 | Change ticket | Feature enhancement ticket that added service contract details listing and error contract listing (service contract details number) |
| IT1-2012-0000780 | Change ticket | Feature addition ticket that added error contract data retrieval |
| IT1-2013-0001383 | Change ticket | Modification ticket that changed phone number listing function code from 3 to 4 |
| OM-2016-0000157 | Change ticket | Feature addition ticket that added address change and work plan data retrieval |
| ANK-4494-00-00 | Change ticket | Feature addition ticket (STEP2) that added phone number status judgment and phone number agreement inquiry |
| JKKCommonConst | Class | Common constants class — defines function codes, use case IDs, and operation IDs used across KK modules |
| X31SDataBeanAccess | Class | Framework DataBean access class — provides structured access to request/response data beans |
| X31CWebConst | Class | Framework web constants class — defines web-level constant keys such as TELEGRAM_INFO_USECASE_ID and TELEGRAM_INFO_OPERATION_ID |
| JZMWebCommon | Class | Web common utility class — provides shared web-layer utility methods including getSearchErrFlg |
| JCCBatCommon | Class | Batch common class — contains the invokeService framework method that executes service component batches |