# Business Logic — JFUAddSvcKeiTelCC.editErrInfoEKK0111D010() [284 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JFUAddSvcKeiTelCC` |
| Layer | CC/Common Component |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JFUAddSvcKeiTelCC.editErrInfoEKK0111D010()

This method performs error information mapping for the **Service Contract (eo Fiber Optic Phone) Registration** process. It is the central error-handling bridge between the CBS (Common Business Service) layer and the BP (Business Process) layer in the K-Opticom customer core system. When a CBS invocation for service contract registration (`EKK0111D010`) encounters validation or processing errors, the CBS returns error flags and messages via a `CAANMsg` template. This method extracts every non-null error field from the template and maps them into a structured error map (`EKK0111D010`) in the request parameter, so the screen layer can display localized error messages to the user.

The method implements a **fan-out mapping pattern** — it iterates over 25 individual error fields (SYSID, Service Code, Billing Group Code, Penalty Code, etc.) and conditionally copies each one into the error map only if the template carries a non-null value and the key does not already exist (idempotent merge). It also manages a status precedence mechanism: if the caller returns a non-zero return code, the template status is forced to `9000`; if the formatted status maps to no known return message, it resets to `0`; and if the template's status supersedes the BP-level status, the template's status and message overwrite the control map.

Its role in the larger system is that of a **shared utility method** — it is called by `editErrorInfo()` and `editRetEKK0111D010()` within the same class, and the equivalent method exists across related classes (`JKKAddSvcKeiTelCC`, `JKKAdchgAddSvcKeiTelCC`) to maintain consistent error mapping behavior across new contract, change, and cancellation scenarios for the eo Fiber Optic Phone service type.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editErrInfoEKK0111D010"])
    START --> STATUS_GET["Get template status: template.getInt(STATUS)"]
    STATUS_GET --> CHECK_RETURN_CODE{returnCode != 0?}
    CHECK_RETURN_CODE -->|true| SET_DEFAULT["Set templateStatus = 9000"]
    CHECK_RETURN_CODE -->|false| CHECK_MESSAGE
    SET_DEFAULT --> CHECK_MESSAGE{Is RETURN_MESSAGE_ + format(templateStatus) in constants?}
    CHECK_MESSAGE -->|null| RESET_STATUS["Set templateStatus = 0"]
    CHECK_MESSAGE -->|exists| GET_BP_STATUS
    RESET_STATUS --> GET_BP_STATUS["Get bpStatus from controlMap RETURN_CODE (default -1)"]
    GET_BP_STATUS --> COMPARE_STATUS{templateStatus > bpStatus?}
    COMPARE_STATUS -->|true| FORMAT_SET["Format status as %04d, lookup message, set RETURN_CODE + RETURN_MESSAGE in controlMap"]
    COMPARE_STATUS -->|false| INIT_WORK_MAP
    FORMAT_SET --> INIT_WORK_MAP["Initialize workMap if null"]
    INIT_WORK_MAP --> INIT_IN_MAP["Initialize inMap for EKK0111D010 if null"]
    INIT_IN_MAP --> MAP_FIELDS["Map all 25 error fields: if template field is not null AND map key absent, copy field value to error map"]
    MAP_FIELDS --> RETURN_END["Return param"]
    RETURN_END --> END_NODE(["end"])
```

**Processing Steps:**

1. **Status Retrieval & Override** — Reads the CBS template's `STATUS` field. If `returnCode` is non-zero (indicating the BP caller encountered an error before reaching the CBS), the template status is forced to `9000` (a generic system error indicator).
2. **Message Validation** — Checks whether the formatted status code (e.g., `"9000"`) maps to a known return message in the constants manager (`JCMAPLConstMgr`). If no mapping exists, the status is reset to `0` (meaning no error).
3. **BP Status Comparison** — Reads the BP-level status from `param.controlMap` under the key `RETURN_CODE`. If the key is absent, `bpStatus` defaults to `-1` (lowest priority). If the template status is higher than the BP status, the template's status and message take precedence.
4. **Work Area Initialization** — Ensures both the `mappingWorkArea` and the data area for `EKK0111D010` exist in the request parameter.
5. **Error Field Mapping** — Iterates over 25 CBS error fields. For each field, if the template reports a non-null error value AND the error map does not already contain the key, the template's error string is copied into the error map. This idempotent merge prevents later CBS calls from overwriting earlier error information.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The request parameter object carrying all business data between layers. It contains the data area (`EKK0111D010`) where mapped errors are stored, the control map for status messages (`RETURN_CODE`, `RETURN_MESSAGE`, `ERROR_INFO`), and the mapping work area for intermediate processing. |
| 2 | `template` | `CAANMsg` | The CBS response message object (`EKK0111D010CBSMsg` schema) containing error flags populated by the CBS layer. Each error field (e.g., `SYSID_ERR`, `SVC_CD_ERR`, `PRC_GRP_CD_ERR`) is non-null if the CBS detected a validation error for that specific data element. The `STATUS` field indicates the overall processing result code. |
| 3 | `returnCode` | `int` | The BP-level return code passed from the caller. A value of `0` means the BP layer encountered no errors before invoking the CBS. A non-zero value indicates the BP layer detected an error itself, which forces the template status to `9000` (system error), ensuring the BP error takes precedence over any CBS result. |
| 4 | `fixedText` | `String` | A fixed text identifier (e.g., `"EKK0111D010"`) used as a key prefix for error message resolution. In the broader caller context, this identifies which service registration flow the error mapping belongs to, enabling message template lookups scoped to the specific screen/batch flow. |

**External state read:**
- `JCMAPLConstMgr` — Constant manager used to look up return messages by key (`RETURN_MESSAGE_XXXX`).

## 4. CRUD Operations / Called Services

No direct database or entity reads/writes occur in this method. All operations are **data mapping** and **message lookup** operations. The called methods are utility calls for status validation and constant lookups.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `template.getInt(EKK0111D010CBSMsg.STATUS)` | EKK0111D010 | - | Reads the STATUS field from the CBS response template message |
| - | `template.isNull(String)` × 25 | EKK0111D010 | - | Checks each of the 25 error indicator fields for null in the CBS response |
| - | `template.getString(String)` × 25 | EKK0111D010 | - | Reads error string values from CBS template fields when non-null |
| - | `JCMAPLConstMgr.getString(String)` | JCMAPL | - | Looks up return message constants by key (e.g., `RETURN_MESSAGE_9000`) |
| - | `param.getControlMapData(String)` | - | - | Reads BP-level return code from the control map |
| - | `param.setControlMapData(String, String)` × 2 | - | - | Writes RETURN_CODE and RETURN_MESSAGE to the control map |
| - | `param.getMappingWorkArea()` | - | - | Retrieves or creates the intermediate work area map |
| - | `param.setMappingWorkArea(Map)` | - | - | Stores the intermediate work area map |
| - | `param.getData(String)` | - | - | Retrieves the EKK0111D010 data area map |
| - | `param.setData(String, Object)` | - | - | Stores the EKK0111D010 error map in the data area |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Class: `JFUAddSvcKeiTelCC.editErrorInfo()` | `editErrorInfo()` -> `editErrInfoEKK0111D010(param, template, returnCode, fixedText)` | template.getInt(STATUS) [-], template.isNull() [R] x25, template.getString() [R] x25 |
| 2 | Class: `JFUAddSvcKeiTelCC.editRetEKK0111D010()` | `editRetEKK0111D010()` -> `editErrInfoEKK0111D010(param, templates[idx], returnCode, "EKK0111D010")` | template.getInt(STATUS) [-], template.isNull() [R] x25, template.getString() [R] x25 |

## 6. Per-Branch Detail Blocks

**Block 1** — IF `(returnCode != 0)` (L1910)

> If the BP layer returned a non-zero error code, override the template status to indicate a system-level error (9000).

| # | Type | Code |
|---|------|------|
| 1 | SET | `templateStatus = 9000` // Override template status to system error code |

**Block 2** — IF `(JCMAPLConstMgr.getString(...) == null)` (L1914)

> Verify the formatted status code has a corresponding return message in constants. If not, reset status to 0 (no error). `[-> RETURN_MESSAGE_STRING="RETURN_MESSAGE_"]`

| # | Type | Code |
|---|------|------|
| 1 | SET | `formatStatus = String.format("%1$04d", templateStatus)` // Zero-padded 4-digit format |
| 2 | SET | `message = JCMAPLConstMgr.getString("RETURN_MESSAGE_" + formatStatus)` |
| 3 | SET | `templateStatus = 0` // Reset to no-error if message key is unknown |

**Block 3** — IF/ELSE `(obj == null)` for bpStatus (L1918-1925)

> Determine the BP-level status from the control map. Default to -1 if the key is absent (ensuring template status always wins when bpStatus is -1).

| # | Type | Code |
|---|------|------|
| 1 | SET | `obj = param.getControlMapData(SCControlMapKeys.RETURN_CODE)` |
| 2 | SET | `bpStatus = -1` // Default: no BP status, template always wins |
| 3 | SET | `bpStatus = Integer.parseInt((String) param.getControlMapData(SCControlMapKeys.RETURN_CODE))` // Parse BP-level status |

**Block 4** — IF `(templateStatus > bpStatus)` (L1927)

> If the CBS template's status is more severe than the BP's own status, propagate the template's status code and message into the control map so the screen displays the CBS error rather than a generic BP error. `[-> SCControlMapKeys.RETURN_CODE, SCControlMapKeys.RETURN_MESSAGE]`

| # | Type | Code |
|---|------|------|
| 1 | SET | `formatStatus = String.format("%1$04d", templateStatus)` |
| 2 | SET | `message = JCMAPLConstMgr.getString("RETURN_MESSAGE_" + formatStatus)` |
| 3 | EXEC | `param.setControlMapData(SCControlMapKeys.RETURN_CODE, formatStatus)` |
| 4 | EXEC | `param.setControlMapData(SCControlMapKeys.RETURN_MESSAGE, message)` |

**Block 5** — IF `(workMap == null)` (L1937-1940)

> Initialize the mapping work area map if it has not been created yet.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workMap = (Map) param.getMappingWorkArea()` |
| 2 | SET | `workMap = new HashMap()` // Create new work area |
| 3 | EXEC | `param.setMappingWorkArea(workMap)` |

**Block 6** — IF `(inMap == null)` (L1944-1947)

> Initialize the EKK0111D010 data area (error map) if it does not exist yet.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap = (HashMap) param.getData("EKK0111D010")` |
| 2 | SET | `inMap = new HashMap()` // Create new error map |
| 3 | EXEC | `param.setData("EKK0111D010", inMap)` |

**Block 7** — IF chain: Error field mappings (L1950-L2185)

> Each of the 25 independent error field mappings follows the same pattern: check if the template field is non-null (indicating the CBS detected an error), and if the error map does not already contain the key, copy the template's error string value into the map. This is a sequential fan-out — each branch is independent and all execute in order.

**Block 7.1** — IF `(template.isNull(EKK0111D010CBSMsg.SYSID_ERR))` (L1950)

> SYSID Error — System identifier validation failure. `// サービス契約＜eo光電話＞登録マップ.SYSID のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("sysid_err")` |
| 2 | SET | `inMap.put("sysid_err", template.getString(EKK0111D010CBSMsg.SYSID_ERR))` |

**Block 7.2** — IF `(template.isNull(EKK0111D010CBSMsg.SVC_CD_ERR))` (L1956)

> Service Code Error — Service contract code validation failure. `// サービス契約＜eo光電話＞登録マップ.サービスコード のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("svc_cd_err")` |
| 2 | SET | `inMap.put("svc_cd_err", template.getString(EKK0111D010CBSMsg.SVC_CD_ERR))` |

**Block 7.3** — IF `(template.isNull(EKK0111D010CBSMsg.MSKM_DTL_NO_ERR))` (L1962)

> Application Detail Number Error — Submission detail number validation failure. `// サービス契約＜eo光電話＞登録マップ.申請明細番号 のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("mskm_dtl_no_err")` |
| 2 | SET | `inMap.put("mskm_dtl_no_err", template.getString(EKK0111D010CBSMsg.MSKM_DTL_NO_ERR))` |

**Block 7.4** — IF `(template.isNull(EKK0111D010CBSMsg.MENKAIHAT_ANKEN_NO_ERR))` (L1968)

> Opening Development Case Number Error — Service opening/case number validation failure. `// サービス契約＜eo光電話＞登録マップ.面開発案件番号 のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("menkaihat_anken_no_err")` |
| 2 | SET | `inMap.put("menkaihat_anken_no_err", template.getString(EKK0111D010CBSMsg.MENKAIHAT_ANKEN_NO_ERR))` |

**Block 7.5** — IF `(template.isNull(EKK0111D010CBSMsg.PRC_GRP_CD_ERR))` (L1974)

> Billing Group Code Error — Price/billing group code validation failure. `// サービス契約＜eo光電話＞登録マップ.料金グループコード のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("prc_grp_cd_err")` |
| 2 | SET | `inMap.put("prc_grp_cd_err", template.getString(EKK0111D010CBSMsg.PRC_GRP_CD_ERR))` |

**Block 7.6** — IF `(template.isNull(EKK0111D010CBSMsg.PCRS_CD_ERR))` (L1980)

> Billing Course Code Error — Pricing course code validation failure. `// サービス契約＜eo光電話＞登録マップ.料金コースコード のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("pcrs_cd_err")` |
| 2 | SET | `inMap.put("pcrs_cd_err", template.getString(EKK0111D010CBSMsg.PCRS_CD_ERR))` |

**Block 7.7** — IF `(template.isNull(EKK0111D010CBSMsg.PPLAN_CD_ERR))` (L1986)

> Billing Plan Code Error — Billing plan code validation failure. `// サービス契約＜eo光電話＞登録マップ.料金プランコード のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("pplan_cd_err")` |
| 2 | SET | `inMap.put("pplan_cd_err", template.getString(EKK0111D010CBSMsg.PPLAN_CD_ERR))` |

**Block 7.8** — IF `(template.isNull(EKK0111D010CBSMsg.TK_HOSHIKI_KEI_NO_ERR))` (L1992)

> Provision Method Contract Number Error — Service delivery method contract number validation failure. `// サービス契約＜eo光電話＞登録マップ.提供方式契約番号 のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("tk_hoshiki_kei_no_err")` |
| 2 | SET | `inMap.put("tk_hoshiki_kei_no_err", template.getString(EKK0111D010CBSMsg.TK_HOSHIKI_KEI_NO_ERR))` |

**Block 7.9** — IF `(template.isNull(EKK0111D010CBSMsg.SVC_USE_STA_KIBO_YMD_ERR))` (L1998)

> Service Usage Start Desired Date Error — Service start date validation failure. `// サービス契約＜eo光電話＞登録マップ.サービス利用開始希望年月日のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("svc_use_sta_kibo_ymd_err")` |
| 2 | SET | `inMap.put("svc_use_sta_kibo_ymd_err", template.getString(EKK0111D010CBSMsg.SVC_USE_STA_KIBO_YMD_ERR))` |

**Block 7.10** — IF `(template.isNull(EKK0111D010CBSMsg.RSV_TSTA_KIBO_YMD_ERR))` (L2004)

> Reservation Application Start Desired Date Error — Reserved rate application start date validation failure. `// サービス契約＜eo光電話＞登録マップ.予約適用開始希望年月日のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("rsv_tsta_kibo_ymd_err")` |
| 2 | SET | `inMap.put("rsv_tsta_kibo_ymd_err", template.getString(EKK0111D010CBSMsg.RSV_TSTA_KIBO_YMD_ERR))` |

**Block 7.11** — IF `(template.isNull(EKK0111D010CBSMsg.ID_SOKHOSHO_OUTPUT_YH_ERR))` (L2010)

> ID Notification Output Yes/No Error — Instant notification output preference validation failure. `// サービス契約＜eo光電話＞登録マップ.ID速報書出力要否 のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("id_sokhosho_output_yh_err")` |
| 2 | SET | `inMap.put("id_sokhosho_output_yh_err", template.getString(EKK0111D010CBSMsg.ID_SOKHOSHO_OUTPUT_YH_ERR))` |

**Block 7.12** — IF `(template.isNull(EKK0111D010CBSMsg.PAYWAY_KEIZOKU_FLG_ERR))` (L2016)

> Payment Method Continuation Flag Error — Recurring payment method continuation preference validation failure. `// サービス契約＜eo光電話＞登録マップ.支払方法継続フラグ のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("payway_keizoku_flg_err")` |
| 2 | SET | `inMap.put("payway_keizoku_flg_err", template.getString(EKK0111D010CBSMsg.PAYWAY_KEIZOKU_FLG_ERR))` |

**Block 7.13** — IF `(template.isNull(EKK0111D010CBSMsg.FTRIAL_KANYU_YMD_ERR))` (L2022)

> Trial Addition Date Error — Trial period start date validation failure. `// サービス契約＜eo光電話＞登録マップ.試追加年月日のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("ftrial_kanyu_ymd_err")` |
| 2 | SET | `inMap.put("ftrial_kanyu_ymd_err", template.getString(EKK0111D010CBSMsg.FTRIAL_KANYU_YMD_ERR))` |

**Block 7.14** — IF `(template.isNull(EKK0111D010CBSMsg.HONKANYU_YMD_ERR))` (L2028)

> Full Addition Date Error — Full registration start date validation failure. `// サービス契約＜eo光電話＞登録マップ.本追加年月日のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("honkanyu_ymd_err")` |
| 2 | SET | `inMap.put("honkanyu_ymd_err", template.getString(EKK0111D010CBSMsg.HONKANYU_YMD_ERR))` |

**Block 7.15** — IF `(template.isNull(EKK0111D010CBSMsg.HONKANYU_IKO_KIGEN_YMD_ERR))` (L2034)

> Full Addition Transfer Deadline Error — Full registration migration deadline date validation failure. `// サービス契約＜eo光電話＞登録マップ.本追加移行期限年月日のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("honkanyu_iko_kigen_ymd_err")` |
| 2 | SET | `inMap.put("honkanyu_iko_kigen_ymd_err", template.getString(EKK0111D010CBSMsg.HONKANYU_IKO_KIGEN_YMD_ERR))` |

**Block 7.16** — IF `(template.isNull(EKK0111D010CBSMsg.LETTER_HASSO_SHIWAKE_DIV_ERR))` (L2040)

> Letter Dispatch Division Error — Mail distribution division code validation failure. `// サービス契約＜eo光電話＞登録マップ.レター発送仕区分のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("letter_hasso_shiwake_div_err")` |
| 2 | SET | `inMap.put("letter_hasso_shiwake_div_err", template.getString(EKK0111D010CBSMsg.LETTER_HASSO_SHIWAKE_DIV_ERR))` |

**Block 7.17** — IF `(template.isNull(EKK0111D010CBSMsg.THNX_LETTER_SHS_CD_ERR))` (L2046)

> Thank-you Letter Delivery Address Code Error — Customer thank-you letter mailing address code validation failure. `// サービス契約＜eo光電話＞登録マップ.サンキューレター送付先コードのエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("thnx_letter_shs_cd_err")` |
| 2 | SET | `inMap.put("thnx_letter_shs_cd_err", template.getString(EKK0111D010CBSMsg.THNX_LETTER_SHS_CD_ERR))` |

**Block 7.18** — IF `(template.isNull(EKK0111D010CBSMsg.WEB_OP_ADD_FAIL_FLG_ERR))` (L2052)

> Web Option Addition Failure Flag Error — Web optional service addition capability validation failure. `// サービス契約＜eo光電話＞登録マップ.WEBオプション追加不可フラグのエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("web_op_add_fail_flg_err")` |
| 2 | SET | `inMap.put("web_op_add_fail_flg_err", template.getString(EKK0111D010CBSMsg.WEB_OP_ADD_FAIL_FLG_ERR))` |

**Block 7.19** — IF `(template.isNull(EKK0111D010CBSMsg.CHGE_MT_HOJINSVKEI_UK_NO_ERR))` (L2058)

> Changed Legal Entity Service Contract Receipt Number Error — Prior legal entity service contract receipt number validation failure (change scenario). `// サービス契約＜eo光電話＞登録マップ.変更元法人サービス契約受付番号のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("chge_mt_hojinsvkei_uk_no_err")` |
| 2 | SET | `inMap.put("chge_mt_hojinsvkei_uk_no_err", template.getString(EKK0111D010CBSMsg.CHGE_MT_HOJINSVKEI_UK_NO_ERR))` |

**Block 7.20** — IF `(template.isNull(EKK0111D010CBSMsg.CHGE_MT_HOJINSVKEI_UK_NOPT_ERR))` (L2064)

> Changed Legal Entity Service Contract Receipt Number Suffix Error — Prior legal entity service contract receipt number suffix validation failure. `// サービス契約＜eo光電話＞登録マップ.変更元法人サービス契約受付番号子のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("chge_mt_hojinsvkei_uk_nopt_err")` |
| 2 | SET | `inMap.put("chge_mt_hojinsvkei_uk_nopt_err", template.getString(EKK0111D010CBSMsg.CHGE_MT_HOJINSVKEI_UK_NOPT_ERR))` |

**Block 7.21** — IF `(template.isNull(EKK0111D010CBSMsg.PNLTY_HASSEI_CD_ERR))` (L2070)

> Penalty Occurrence Code Error — Contract penalty/breach of contract code validation failure. `// サービス契約＜eo光電話＞登録マップ.違約金発生コードのエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("pnlty_hassei_cd_err")` |
| 2 | SET | `inMap.put("pnlty_hassei_cd_err", template.getString(EKK0111D010CBSMsg.PNLTY_HASSEI_CD_ERR))` |

**Block 7.22** — IF `(template.isNull(EKK0111D010CBSMsg.IDO_DIV_ERR))` (L2076)

> Migration Division Error — Service portability/migration division code validation failure. `// サービス契約＜eo光電話＞登録マップ.異動区分のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("ido_div_err")` |
| 2 | SET | `inMap.put("ido_div_err", template.getString(EKK0111D010CBSMsg.IDO_DIV_ERR))` |

**Block 7.23** — IF `(template.isNull(EKK0111D010CBSMsg.INTR_CD_ERR))` (L2082)

> Referral Code Error — Referral/partner code validation failure. `// サービス契約＜eo光電話＞登録マップ.紹介コードのエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("intr_cd_err")` |
| 2 | SET | `inMap.put("intr_cd_err", template.getString(EKK0111D010CBSMsg.INTR_CD_ERR))` |

**Block 7.24** — IF `(template.isNull(EKK0111D010CBSMsg.WORK_RRK_BIKO_ERR))` (L2088)

> Business Link Remarks Error — Inter-system coordination remarks validation failure. `// サービス契約＜eo光電話＞登録マップ.備考のエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("work_rrk_biko_err")` |
| 2 | SET | `inMap.put("work_rrk_biko_err", template.getString(EKK0111D010CBSMsg.WORK_RRK_BIKO_ERR))` |

**Block 7.25** — IF `(template.isNull(EKK0111D010CBSMsg.AUTO_SHOSA_TRAN_STAT_CD_ERR))` (L2094)

> Auto Investigation Processing Status Code Error — Automatic investigation processing status validation failure. `// サービス契約＜eo光電話＞登録マップ.自動照会処理状態コードのエラー情報返却`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("auto_shosa_tran_stat_cd_err")` |
| 2 | SET | `inMap.put("auto_shosa_tran_stat_cd_err", template.getString(EKK0111D010CBSMsg.AUTO_SHOSA_TRAN_STAT_CD_ERR))` |

**Block 7.26** — IF `(template.isNull(EKK0111D010CBSMsg.PRC_KMK_CD_ERR))` (L2100)

> Billing Item Code Error — Billing line item code validation failure. `// 料金項目コード`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("prc_kmk_cd_err")` |
| 2 | SET | `inMap.put("prc_kmk_cd_err", template.getString(EKK0111D010CBSMsg.PRC_KMK_CD_ERR))` |

**Block 7.27** — IF `(template.isNull(EKK0111D010CBSMsg.RULE0059_AUTO_APLY_ERR))` (L2106)

> Rule0059 Auto-Application Flag Error — Business procedure auto-application flag validation failure. `[-> IT Materials Correspondence 2011/12/20 h.iwamoto START]` / `// 事務手続料自動適用要否`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("rule0059_auto_aply_err")` |
| 2 | SET | `inMap.put("rule0059_auto_aply_err", template.getString(EKK0111D010CBSMsg.RULE0059_AUTO_APLY_ERR))` |

**Block 7.28** — IF `(template.isNull(EKK0111D010CBSMsg.RULE0079_AUTO_APLY_ERR))` (L2114)

> Rule0079 Auto-Application Flag Error — Construction fee auto-application flag validation failure. `[-> IT Materials Correspondence 2011/12/20 h.iwamoto END]` / `// 工事費自動適用要否`

| # | Type | Code |
|---|------|------|
| 1 | IF | `!inMap.containsKey("rule0079_auto_aply_err")` |
| 2 | SET | `inMap.put("rule0079_auto_aply_err", template.getString(EKK0111D010CBSMsg.RULE0079_AUTO_APLY_ERR))` |

**Block 8** — RETURN (L2122)

> Return the enriched request parameter with all mapped error information.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return param;` // Return with all error data mapped |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `STATUS` | CBS Field | Processing status code from the CBS response. Non-zero values indicate errors; `9000` is a system-level error override. |
| `SYSID` | Field | System identifier — the customer's system account ID for the eo fiber optic phone service. |
| `SYSID_ERR` | Field | SYSID error indicator — non-null if the SYSID validation failed during CBS processing. |
| `svc_cd` | Field | Service code — classifies the type of service contract (eo fiber optic phone). |
| `svc_cd_err` | Field | Service code error indicator — non-null if the service code validation failed. |
| `mskm_dtl_no` | Field | Application detail number — unique sequence number for a service contract line item within a submission. |
| `mskm_dtl_no_err` | Field | Application detail number error — non-null if the detail number validation failed. |
| `menkaihat_anken_no` | Field | Opening/case development number — internal case tracking number for service activation projects. |
| `menkaihat_anken_no_err` | Field | Opening/case number error — non-null if the case number validation failed. |
| `prc_grp_cd` | Field | Billing group code — groups charges into billing categories (e.g., monthly fee, usage charge). |
| `prc_grp_cd_err` | Field | Billing group code error — non-null if the billing group code validation failed. |
| `pcrs_cd` | Field | Billing course code — identifies the billing plan/course (e.g., flat rate, tiered pricing). |
| `pcrs_cd_err` | Field | Billing course code error — non-null if the billing course code validation failed. |
| `pplan_cd` | Field | Billing plan code — specific pricing plan identifier for the service contract. |
| `pplan_cd_err` | Field | Billing plan code error — non-null if the billing plan code validation failed. |
| `tk_hoshiki_kei_no` | Field | Provision method contract number — contract number for the service delivery/provision method. |
| `tk_hoshiki_kei_no_err` | Field | Provision method contract number error — non-null if the contract number validation failed. |
| `svc_use_sta_kibo_ymd` | Field | Service usage start desired date (YYYYMMDD) — customer's requested service activation date. |
| `svc_use_sta_kibo_ymd_err` | Field | Service start date error — non-null if the desired start date validation failed. |
| `rsv_tsta_kibo_ymd` | Field | Reservation application start desired date (YYYYMMDD) — customer's requested date for reservation rate application. |
| `rsv_tsta_kibo_ymd_err` | Field | Reservation start date error — non-null if the reservation date validation failed. |
| `id_sokhosho_output_yh` | Field | ID notification output yes/no flag — whether the customer wants instant ID notification (YES/NO). |
| `id_sokhosho_output_yh_err` | Field | ID notification output flag error — non-null if the flag validation failed. |
| `payway_keizoku_flg` | Field | Payment method continuation flag — whether to continue the existing payment method for renewal. |
| `payway_keizoku_flg_err` | Field | Payment method continuation flag error — non-null if the flag validation failed. |
| `ftrial_kanyu_ymd` | Field | Trial addition date (YYYYMMDD) — date when trial/service addition begins. |
| `ftrial_kanyu_ymd_err` | Field | Trial addition date error — non-null if the trial date validation failed. |
| `honkanyu_ymd` | Field | Full addition date (YYYYMMDD) — date when the service becomes a full (non-trial) subscription. |
| `honkanyu_ymd_err` | Field | Full addition date error — non-null if the full addition date validation failed. |
| `honkanyu_iko_kigen_ymd` | Field | Full addition transfer deadline date (YYYYMMDD) — deadline for transferring to full contract status. |
| `honkanyu_iko_kigen_ymd_err` | Field | Full addition transfer deadline error — non-null if the deadline date validation failed. |
| `letter_hasso_shiwake_div` | Field | Letter dispatch division code — classification for how mail/letters are sent to the customer. |
| `letter_hasso_shiwake_div_err` | Field | Letter dispatch division error — non-null if the letter division code validation failed. |
| `thnx_letter_shs_cd` | Field | Thank-you letter delivery address code — where to send the customer thank-you letter. |
| `thnx_letter_shs_cd_err` | Field | Thank-you letter delivery code error — non-null if the address code validation failed. |
| `web_op_add_fail_flg` | Field | Web option addition failure flag — indicates whether the customer cannot add web options. |
| `web_op_add_fail_flg_err` | Field | Web option addition failure flag error — non-null if the flag validation failed. |
| `chge_mt_hojinsvkei_uk_no` | Field | Changed legal entity service contract receipt number — the prior entity's contract number in a legal entity change scenario. |
| `chge_mt_hojinsvkei_uk_no_err` | Field | Changed legal entity contract number error — non-null if the prior entity number validation failed. |
| `chge_mt_hojinsvkei_uk_nopt` | Field | Changed legal entity service contract receipt number suffix — suffix for the prior entity's contract number. |
| `chge_mt_hojinsvkei_uk_nopt_err` | Field | Changed legal entity contract number suffix error — non-null if the suffix validation failed. |
| `pnlty_hassei_cd` | Field | Penalty occurrence code — indicates whether a contract penalty/breach fee applies. |
| `pnlty_hassei_cd_err` | Field | Penalty occurrence code error — non-null if the penalty code validation failed. |
| `ido_div` | Field | Migration division code — classifies the type of service portability/migration. |
| `ido_div_err` | Field | Migration division code error — non-null if the migration code validation failed. |
| `intr_cd` | Field | Referral code — partner/referral source identification code. |
| `intr_cd_err` | Field | Referral code error — non-null if the referral code validation failed. |
| `work_rrk_biko` | Field | Business linkage remarks — inter-system coordination notes/comments. |
| `work_rrk_biko_err` | Field | Business linkage remarks error — non-null if the remarks validation failed. |
| `auto_shosa_tran_stat_cd` | Field | Auto investigation processing status code — status of automatic investigation processing. |
| `auto_shosa_tran_stat_cd_err` | Field | Auto investigation status code error — non-null if the status code validation failed. |
| `prc_kmk_cd` | Field | Billing item code — code identifying a specific billing line item within the contract. |
| `prc_kmk_cd_err` | Field | Billing item code error — non-null if the billing item code validation failed. |
| `rule0059_auto_aply` | Field | Rule 0059 auto-application flag — whether business procedure charges are automatically applied. [IT Materials Correspondence 2011/12/20] |
| `rule0059_auto_aply_err` | Field | Rule 0059 auto-application error — non-null if the auto-application flag validation failed. |
| `rule0079_auto_aply` | Field | Rule 0079 auto-application flag — whether construction fees are automatically applied. [IT Materials Correspondence 2011/12/20] |
| `rule0079_auto_aply_err` | Field | Rule 0079 auto-application error — non-null if the construction fee auto-application flag validation failed. |
| EKK0111D010 | CBS Code | Service Contract (eo Fiber Optic Phone) Registration — the CBS service component for registering new eo fiber optic phone service contracts. |
| eo光電話 | Business term | eo Fiber Optic Phone — K-Opticom's bundled fiber-optic telephone service offering. |
| JCMAPLConstMgr | Technical | Constant manager class used for runtime lookup of message templates and configuration values from the constant database. |
| RETURN_MESSAGE_XXXX | Constant Pattern | Template message key pattern in the constant manager. Format: `"RETURN_MESSAGE_" + zero-padded 4-digit status code`. |
| CAANMsg | Technical | Fujitsu's message/container class for passing structured data between CBS layers. |
| IRequestParameterReadWrite | Interface | Request parameter interface providing data access across the BP/Controller layer boundary. |
| SCControlMapKeys | Constant Class | Key constants for the control map (e.g., `RETURN_CODE`, `RETURN_MESSAGE`, `ERROR_INFO`). |
| mappingWorkArea | Field | Intermediate work area map within the request parameter used for cross-component data sharing during business processing. |
| Template Error | Business concept | Error indicator values returned by the CBS layer when validation or processing fails on individual data fields. |
