# Business Logic - JKKMltiseInfoAddCfmCC.editEKK0011D020ErrorInfo() [364 LOC]

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

## 1. Role

### JKKMltiseInfoAddCfmCC.editEKK0011D020ErrorInfo()

This method serves as the error-mapping bridge between the CBS (Common Business System) response layer and the screen presentation layer for the Service Contract Line Details List Inquiry S-IF (screen EKK0011D020). After the CBS execution layer runs the inquiry processing and populates a CAANMsg[] template array with result codes and error messages, this method extracts all error information from the template(s) and writes them into a HashMap stored within the IRequestParameterReadWrite parameter object, making the errors available for display on the inquiry result screen.

The method follows a transformation/delegation pattern: it receives pre-populated message templates from the CBS layer and transforms their structured error fields into a flat key-value structure the UI layer can consume. It handles two tiers of error data: (1) header-level errors (top-level template fields for the entire inquiry result), and (2) detail-level errors (per-line-item errors for each row in the returned list, stored under the key "EKK0011D020CBSMsg1List" as an ArrayList<HashMap>).

Its role in the larger system is that of a shared error-mapping utility called by the result-presentation method editEKK0011D020ResultRP() after the CBS call completes. The method is idempotent with respect to individual fields (it checks containsKey to avoid overwriting existing values) but operates on the full request parameter object, modifying it in place. No database or SC (Service Component) calls are made by this method - it is a pure data transformation method that bridges CBS responses to screen display data.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editEKK0011D020ErrorInfo(params, templates, returnCode, fixedText)"])
    STEP1["Extract template = templates[0]"]
    STEP2["setControlMap(param, templates, returnCode, EKK0011D020CBSMsg.STATUS)"]
    STEP3["Retrieve inHash from param.getData(fixedText)"]
    COND_NULL{"inHash == null?"}
    STEP4["Initialize inHash = new HashMap()"]
    STEP5["param.setData(fixedText, inHash)"]

    STEP6["Map SYSID_ERR -> sysid_err"]
    STEP7["Map MSKM_SBT_CD_ERR -> mskm_sbt_cd_err"]
    STEP8["Map MSKMSHO_ARIV_YMD_ERR -> mskmsho_ariv_ymd_err"]
    STEP9["Map MSKM_UK_DTM_ERR -> unyo_ymd_err"]
    STEP10["Map MSKM_UK_TNT_USER_ID_ERR -> mskm_uk_tnt_user_id_err"]
    STEP11["Map MSKM_YMD_ERR -> unyo_ymd_err"]
    STEP12["Map TTL_BUSINESS_CENTER_UK_NO_ERR -> ttl_business_center_uk_no_err"]
    STEP13["Map TTL_BUSINESS_MSKM_OPT_CD_ERR -> ttl_business_mskm_opt_cd_err"]
    STEP14["Map MSKM_RRKS_TELNO_ERR -> mskm_rrks_telno_err"]
    STEP15["Map MSKM_JSSIS_SBT_CD_ERR -> mskm_jssis_sbt_cd_err"]
    STEP16["Map CUST_YOBO_JIKO_ERR -> cust_yobo_jiko_err"]
    STEP17["Map TEL_RRK_KIBOD_SBT_CD_ERR -> tel_rrk_kibod_sbt_cd_err"]
    STEP18["Map TEL_RRK_KIBO_TIME_CD_ERR -> tel_rrk_kibo_time_cd_err"]
    STEP19["Map TAKCHO_KIBOD_SBT_CD_ERR -> takcho_kibod_sbt_cd_err"]
    STEP20["Map TAKCHO_KIBO_TIME_CD_ERR -> takcho_kibo_time_cd_err"]
    STEP21["Map KARI_MSKM_FLG_ERR -> kari_mskm_flg_err"]
    STEP22["Map REFERER_ERR -> referer_err"]
    STEP23["Map KEPCO_CUSTINFO_JUJU_DOI_UM_ERR -> kepco_custinfo_juju_doi_um_err"]
    STEP24["Map SHOSA_BF_RRK_JIKO_YH_ERR -> shosa_bf_rrk_jiko_yh_err"]
    STEP25["Map SHOSA_BF_RRK_JIKO_ERR -> shosa_bf_rrk_jiko_err"]
    STEP26["Map USE_SVC_KEIZK_SBT_CD_ERR -> use_svc_keizk_sbt_cd_err"]
    STEP27["Map CONSMBSN_MSKM_STAT_SKBT_CD_ERR -> consmbsn_mskm_stat_skbt_cd_err"]

    STEP28["Retrieve inList from inHash.get(EKK0011D020CBSMsg1List)"]
    COND_LIST{"inList == null?"}
    STEP29["Initialize inList = new ArrayList()"]
    STEP30["inHash.put(EKK0011D020CBSMsg1List, inList)"]
    STEP31["Extract templateArray = template.getCAANMsgList(EKK0011D020CBSMSG1LIST)"]
    COND_ARRAY{"templateArray != null?"}

    LOOP_START["for i = 0 to templateArray.length-1"]
    COND_SIZE{"i >= inList.size()?"}
    STEP32["inList.add(new HashMap())"]
    STEP33["Retrieve childMap = inList.get(i)"]
    STEP34["childTemplate = templateArray[i]"]
    STEP35["Map 27 child-level error fields per row"]

    COND_LIST_ERR{"template.isNull(EKK0011D020CBSMSG1LIST_ERR)?"}
    STEP36["inHash.put(EKK0011D020CBSMsg1List_err, template.getString(EKK0011D020CBSMSG1LIST_ERR)]"]

    RETURN["Return param"]

    START --> STEP1 --> STEP2 --> STEP3 --> COND_NULL
    COND_NULL -- Yes --> STEP4 --> STEP5 --> STEP6
    COND_NULL -- No --> STEP6
    STEP6 --> STEP7 --> STEP8 --> STEP9 --> STEP10 --> STEP11 --> STEP12 --> STEP13 --> STEP14 --> STEP15 --> STEP16 --> STEP17 --> STEP18 --> STEP19 --> STEP20 --> STEP21 --> STEP22 --> STEP23 --> STEP24 --> STEP25 --> STEP26 --> STEP27
    STEP27 --> STEP28 --> COND_LIST
    COND_LIST -- Yes --> STEP29 --> STEP30
    COND_LIST -- No --> STEP31
    STEP31 --> COND_ARRAY
    COND_ARRAY -- No --> COND_LIST_ERR
    COND_ARRAY -- Yes --> LOOP_START --> COND_SIZE
    COND_SIZE -- Yes --> STEP32 --> STEP33
    COND_SIZE -- No --> STEP33
    STEP33 --> STEP34 --> STEP35 --> LOOP_START
    LOOP_START -- Done --> COND_LIST_ERR
    COND_LIST_ERR -- Yes --> STEP36 --> RETURN
    COND_LIST_ERR -- No --> RETURN
```

### Processing Steps Summary

1. **Extract template** - Retrieve the first element from the CAANMsg[] templates array.
2. **Set control map** - Call setControlMap() to configure error display controls (status codes, field-level error flags) on the screen form.
3. **Retrieve/Initialize inHash** - Get the HashMap from param using the fixedText key. If null, create a new HashMap and store it back in param.
4. **Header-level error mapping** - Iterate through 22 header-level error fields. For each field, if the template contains a non-null error value, store it in the HashMap under a flat key (e.g., sysid_err). The containsKey check prevents overwriting.
5. **Detail-level list initialization** - Retrieve the ArrayList for child items from inHash. If null, create a new ArrayList and store it.
6. **Extract detail template array** - Get the CAANMsg[] array from the template for child-level messages via getCAANMsgList(EKK0011D020CBSMSG1LIST).
7. **Detail-level error mapping loop** - For each child template in the array, ensure a HashMap exists at index i in inList, then map 27 per-line error fields to the child HashMap.
8. **List-level error mapping** - Check if the template has a list-level error (EKK0011D020CBSMSG1LIST_ERR) and store it in inHash.
9. **Return** - Return the modified param object with all error data mapped.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | IRequestParameterReadWrite | The business data request/response parameter object. Carries the work context through the processing chain. Contains the result data stored under the key specified by `fixedText`. Modified in place to include error-mapped HashMaps. |
| 2 | `templates` | CAANMsg[] | Array of CAANMsg message objects containing CBS response data. The first element (templates[0]) is the primary response template containing header-level error fields. It also contains a nested CAANMsg[] list under the key EKK0011D020CBSMSG1LIST for per-line-item detail errors. |
| 3 | `returnCode` | int | Return code from the CBS call. Passed through to setControlMap() to configure the screen status/error display based on the CBS result. |
| 4 | `fixedText` | String | The key used to store/retrieve the error HashMap within param. Acts as the namespace for error data within the parameter object. |

### Instance Fields / External State

| Name | Type | Description |
|------|------|-------------|
| `setControlMap` (called method) | Method on this class | Sets error control configuration (status codes, field error flags) on the screen form. Uses the STATUS constant to identify the error group. |

## 4. CRUD Operations / Called Services

This method performs no direct CRUD operations on databases or service components. It is a pure data transformation layer that:
- **Reads** error fields from the CAANMsg templates (via template.isNull() and template.getString())
- **Writes** error data into the HashMap within the param object (via inHash.put() and inList.add())
- **Calls** setControlMap() to configure screen-level error display controls

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `setControlMap` | JKKMltiseInfoAddCfmCC | - | Sets error control configuration (status codes, field error flags) on the screen form for the EKK0011D020 error group. No DB access - purely UI presentation setup. |
| R | `template.isNull` | N/A (CAANMsg method) | N/A | Checks whether a CBS error field is null/empty. Non-null means an error exists for that field. |
| R | `template.getString` | N/A (CAANMsg method) | N/A | Reads the error message string from a CBS template field. |
| R | `param.getData` | N/A | N/A | Reads the existing HashMap from the param object using the fixedText key. |
| W | `param.setData` | N/A | N/A | Writes the HashMap (initialized or modified) back into the param object. |
| W | `inHash.put` | N/A | N/A | Stores error key-value pairs into the header-level error HashMap. |
| C | `inList.add` | N/A | N/A | Adds new HashMap entries for child-level error rows. |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 method.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | JKKMltiseInfoAddCfmCC | editEKK0011D020ResultRP() -> editEKK0011D020ErrorInfo() | terminal: template.isNull [-], template.getString [R], param.getData [R], param.setData [W], inHash.put [W], inList.add [C] |

### Call Direction Summary

```
editEKK0011D020ResultRP()
  -> editEKK0011D020ErrorInfo(param, templates, returnCode, fixedText)
        -> setControlMap(param, templates, returnCode, EKK0011D020CBSMsg.STATUS)
        -> (reads from templates, writes to param inHash/inList)
```

This method is called by editEKK0011D020ResultRP() within the same class. It is a helper/utility method that processes CBS response data into a format suitable for screen presentation. No further terminal operations (DB, SC, CBS) are reached from this method.

## 6. Per-Branch Detail Blocks

### Block 1 - [SET/EXEC] Method entry and initial setup (L2817-L2826)

| # | Type | Code |
|---|------|------|
| 1 | SET | `CAANMsg template = templates[0]` |
| 2 | EXEC | `setControlMap(param, templates, returnCode, EKK0011D020CBSMsg.STATUS)` // Error-common setup [EKK0011D020CBSMsg.STATUS identifies the error group for this screen] |
| 3 | SET | `HashMap inHash = null` |

### Block 1.1 - [IF] inHash null check (L2828-L2832)

| # | Type | Code |
|---|------|------|
| 1 | SET | `inHash = (HashMap)param.getData(fixedText)` |
| 2 | IF | `inHash == null` (L2830) |
| 3 | SET | `inHash = new HashMap()` |
| 4 | EXEC | `param.setData(fixedText, inHash)` |

### Block 2 - [IF] SYSID_ERR mapping (L2837-L2841)

Maps the SYSID (System ID) error from the CBS template to the inHash.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.SYSID_ERR)` // SYSID = System ID |
| 2 | IF | `!inHash.containsKey("sysid_err")` |
| 3 | SET | `inHash.put("sysid_err", template.getString(EKK0011D020CBSMsg.SYSID_ERR))` |

### Block 3 - [IF] MSKM_SBT_CD_ERR mapping (L2843-L2847)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.MSKM_SBT_CD_ERR)` // Submission type code error |
| 2 | IF | `!inHash.containsKey("mskm_sbt_cd_err")` |
| 3 | SET | `inHash.put("mskm_sbt_cd_err", template.getString(EKK0011D020CBSMsg.MSKM_SBT_CD_ERR))` |

### Block 4 - [IF] MSKMSHO_ARIV_YMD_ERR mapping (L2849-L2853)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.MSKMSHO_ARIV_YMD_ERR)` // Submission arrival date error |
| 2 | IF | `!inHash.containsKey("mskmsho_ariv_ymd_err")` |
| 3 | SET | `inHash.put("mskmsho_ariv_ymd_err", template.getString(EKK0011D020CBSMsg.MSKMSHO_ARIV_YMD_ERR))` |

### Block 5 - [IF] MSKM_UK_DTM_ERR mapping (L2855-L2859)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.MSKM_UK_DTM_ERR)` // Submission receipt datetime error |
| 2 | IF | `!inHash.containsKey("unyo_ymd_err")` |
| 3 | SET | `inHash.put("unyo_ymd_err", template.getString(EKK0011D020CBSMsg.MSKM_UK_DTM_ERR))` |

### Block 6 - [IF] MSKM_UK_TNT_USER_ID_ERR mapping (L2861-L2865)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.MSKM_UK_TNT_USER_ID_ERR)` // Submission responsible user ID error |
| 2 | IF | `!inHash.containsKey("mskm_uk_tnt_user_id_err")` |
| 3 | SET | `inHash.put("mskm_uk_tnt_user_id_err", template.getString(EKK0011D020CBSMsg.MSKM_UK_TNT_USER_ID_ERR))` |

### Block 7 - [IF] MSKM_YMD_ERR mapping (L2867-L2871)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.MSKM_YMD_ERR)` // Submission date error |
| 2 | IF | `!inHash.containsKey("unyo_ymd_err")` |
| 3 | SET | `inHash.put("unyo_ymd_err", template.getString(EKK0011D020CBSMsg.MSKM_YMD_ERR))` |

### Block 8 - [IF] TTL_BUSINESS_CENTER_UK_NO_ERR mapping (L2873-L2877)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.TTL_BUSINESS_CENTER_UK_NO_ERR)` // Overall business center receipt number error |
| 2 | IF | `!inHash.containsKey("ttl_business_center_uk_no_err")` |
| 3 | SET | `inHash.put("ttl_business_center_uk_no_err", template.getString(EKK0011D020CBSMsg.TTL_BUSINESS_CENTER_UK_NO_ERR))` |

### Block 9 - [IF] TTL_BUSINESS_MSKM_OPT_CD_ERR mapping (L2879-L2883)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.TTL_BUSINESS_MSKM_OPT_CD_ERR)` // Overall business submission contract code error |
| 2 | IF | `!inHash.containsKey("ttl_business_mskm_opt_cd_err")` |
| 3 | SET | `inHash.put("ttl_business_mskm_opt_cd_err", template.getString(EKK0011D020CBSMsg.TTL_BUSINESS_MSKM_OPT_CD_ERR))` |

### Block 10 - [IF] MSKM_RRKS_TELNO_ERR mapping (L2885-L2889)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.MSKM_RRKS_TELNO_ERR)` // Submission contact phone number error |
| 2 | IF | `!inHash.containsKey("mskm_rrks_telno_err")` |
| 3 | SET | `inHash.put("mskm_rrks_telno_err", template.getString(EKK0011D020CBSMsg.MSKM_RRKS_TELNO_ERR))` |

### Block 11 - [IF] MSKM_JSSIS_SBT_CD_ERR mapping (L2891-L2895)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.MSKM_JSSIS_SBT_CD_ERR)` // Submission executor type code error |
| 2 | IF | `!inHash.containsKey("mskm_jssis_sbt_cd_err")` |
| 3 | SET | `inHash.put("mskm_jssis_sbt_cd_err", template.getString(EKK0011D020CBSMsg.MSKM_JSSIS_SBT_CD_ERR))` |

### Block 12 - [IF] CUST_YOBO_JIKO_ERR mapping (L2897-L2901)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.CUST_YOBO_JIKO_ERR)` // Customer preference item error |
| 2 | IF | `!inHash.containsKey("cust_yobo_jiko_err")` |
| 3 | SET | `inHash.put("cust_yobo_jiko_err", template.getString(EKK0011D020CBSMsg.CUST_YOBO_JIKO_ERR))` |

### Block 13 - [IF] TEL_RRK_KIBOD_SBT_CD_ERR mapping (L2903-L2907)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.TEL_RRK_KIBOD_SBT_CD_ERR)` // Phone contact desired day type code error |
| 2 | IF | `!inHash.containsKey("tel_rrk_kibod_sbt_cd_err")` |
| 3 | SET | `inHash.put("tel_rrk_kibod_sbt_cd_err", template.getString(EKK0011D020CBSMsg.TEL_RRK_KIBOD_SBT_CD_ERR))` |

### Block 14 - [IF] TEL_RRK_KIBO_TIME_CD_ERR mapping (L2909-L2913)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.TEL_RRK_KIBO_TIME_CD_ERR)` // Phone contact desired time slot code error |
| 2 | IF | `!inHash.containsKey("tel_rrk_kibo_time_cd_err")` |
| 3 | SET | `inHash.put("tel_rrk_kibo_time_cd_err", template.getString(EKK0011D020CBSMsg.TEL_RRK_KIBO_TIME_CD_ERR))` |

### Block 15 - [IF] TAKCHO_KIBOD_SBT_CD_ERR mapping (L2915-L2919)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.TAKCHO_KIBOD_SBT_CD_ERR)` // Home survey desired day type code error |
| 2 | IF | `!inHash.containsKey("takcho_kibod_sbt_cd_err")` |
| 3 | SET | `inHash.put("takcho_kibod_sbt_cd_err", template.getString(EKK0011D020CBSMsg.TAKCHO_KIBOD_SBT_CD_ERR))` |

### Block 16 - [IF] TAKCHO_KIBO_TIME_CD_ERR mapping (L2921-L2925)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.TAKCHO_KIBO_TIME_CD_ERR)` // Home survey desired time slot code error |
| 2 | IF | `!inHash.containsKey("takcho_kibo_time_cd_err")` |
| 3 | SET | `inHash.put("takcho_kibo_time_cd_err", template.getString(EKK0011D020CBSMsg.TAKCHO_KIBO_TIME_CD_ERR))` |

### Block 17 - [IF] KARI_MSKM_FLG_ERR mapping (L2927-L2931)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.KARI_MSKM_FLG_ERR)` // Temporary submission flag error |
| 2 | IF | `!inHash.containsKey("kari_mskm_flg_err")` |
| 3 | SET | `inHash.put("kari_mskm_flg_err", template.getString(EKK0011D020CBSMsg.KARI_MSKM_FLG_ERR))` |

### Block 18 - [IF] REFERER_ERR mapping (L2933-L2937)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.REFERER_ERR)` // Referer error |
| 2 | IF | `!inHash.containsKey("referer_err")` |
| 3 | SET | `inHash.put("referer_err", template.getString(EKK0011D020CBSMsg.REFERER_ERR))` |

### Block 19 - [IF] KEPCO_CUSTINFO_JUJU_DOI_UM_ERR mapping (L2939-L2943)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.KEPCO_CUSTINFO_JUJU_DOI_UM_ERR)` // Kansai Electric customer information consent yes/no error |
| 2 | IF | `!inHash.containsKey("kepco_custinfo_juju_doi_um_err")` |
| 3 | SET | `inHash.put("kepco_custinfo_juju_doi_um_err", template.getString(EKK0011D020CBSMsg.KEPCO_CUSTINFO_JUJU_DOI_UM_ERR))` |

### Block 20 - [IF] SHOSA_BF_RRK_JIKO_YH_ERR mapping (L2945-L2949)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.SHOSA_BF_RRK_JIKO_YH_ERR)` // Pre-inquiry contact item required/optional error |
| 2 | IF | `!inHash.containsKey("shosa_bf_rrk_jiko_yh_err")` |
| 3 | SET | `inHash.put("shosa_bf_rrk_jiko_yh_err", template.getString(EKK0011D020CBSMsg.SHOSA_BF_RRK_JIKO_YH_ERR))` |

### Block 21 - [IF] SHOSA_BF_RRK_JIKO_ERR mapping (L2951-L2955)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.SHOSA_BF_RRK_JIKO_ERR)` // Pre-inquiry contact item error |
| 2 | IF | `!inHash.containsKey("shosa_bf_rrk_jiko_err")` |
| 3 | SET | `inHash.put("shosa_bf_rrk_jiko_err", template.getString(EKK0011D020CBSMsg.SHOSA_BF_RRK_JIKO_ERR))` |

### Block 22 - [IF] USE_SVC_KEIZK_SBT_CD_ERR mapping (L2957-L2961)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.USE_SVC_KEIZK_SBT_CD_ERR)` // Service continuation type code error |
| 2 | IF | `!inHash.containsKey("use_svc_keizk_sbt_cd_err")` |
| 3 | SET | `inHash.put("use_svc_keizk_sbt_cd_err", template.getString(EKK0011D020CBSMsg.USE_SVC_KEIZK_SBT_CD_ERR))` |

### Block 23 - [IF] CONSMBSN_MSKM_STAT_SKBT_CD_ERR mapping (L2963-L2967)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.CONSMBSN_MSKM_STAT_SKBT_CD_ERR)` // Consumer business submission status code error |
| 2 | IF | `!inHash.containsKey("consmbsn_mskm_stat_skbt_cd_err")` |
| 3 | SET | `inHash.put("consmbsn_mskm_stat_skbt_cd_err", template.getString(EKK0011D020CBSMsg.CONSMBSN_MSKM_STAT_SKBT_CD_ERR))` |

### Block 24 - [IF] Detail-level list null check (L2969-L2971)

| # | Type | Code |
|---|------|------|
| 1 | SET | `ArrayList inList = (ArrayList)inHash.get("EKK0011D020CBSMsg1List")` |
| 2 | IF | `inList == null` |
| 3 | SET | `inList = new ArrayList()` |
| 4 | SET | `inHash.put("EKK0011D020CBSMsg1List", inList)` |

### Block 25 - [IF] templateArray extraction and loop guard (L2973-L2977)

| # | Type | Code |
|---|------|------|
| 1 | SET | `CAANMsg[] templateArray = template.getCAANMsgList(EKK0011D020CBSMsg.EKK0011D020CBSMSG1LIST)` |
| 2 | IF | `templateArray != null` |

### Block 25.1 - [FOR] Detail-level error mapping loop (L2975)

Iterates over each child template and maps its error fields.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int i = 0` (loop counter) |
| 2 | SET | `i < templateArray.length` (loop condition) |
| 3 | INC | `i++` |

#### Block 25.1.1 - [IF] Child map initialization (L2976)

| # | Type | Code |
|---|------|------|
| 1 | IF | `i >= inList.size()` |
| 2 | SET | `inList.add(new HashMap())` |

#### Block 25.1.2 - [SET] Child map extraction (L2979-L2980)

| # | Type | Code |
|---|------|------|
| 1 | SET | `HashMap childMap = (HashMap)inList.get(i)` |
| 2 | SET | `CAANMsg childTemplate = templateArray[i]` |

#### Block 25.1.3 - [IF] Child-level error mappings (L2983-L3170)

Maps 27 per-line-item error fields from each child template. Each follows the same pattern: null check -> containsKey guard -> put.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.MSKMSHO_NO_ERR)` -> put("mskmsho_no_err", ...) [Submission number error] |
| 2 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.WEB_UK_NO_ERR)` -> put("web_uk_no_err", ...) [WEB receipt number error] |
| 3 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.MSKM_FORM_CD_ERR)` -> put("mskm_form_cd_err", ...) [Submission form code error] |
| 4 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.MSKM_DTL_SBT_CD_ERR)` -> put("mskm_dtl_sbt_cd_err", ...) [Submission detail type code error] |
| 5 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.RRKS_KTAI_TELNO_ERR)` -> put("rrks_ktai_telno_err", ...) [Contact mobile phone number error] |
| 6 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.RRKS_OFFC_NM_ERR)` -> put("rrks_offc_nm_err", ...) [Contact business name error] |
| 7 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.DT_RRKS_TELNO_ERR)` -> put("dt_rrks_telno_err", ...) [Daytime contact phone number error] |
| 8 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.NEW_MSKM_SBT_CD_ERR)` -> put("new_mskm_sbt_cd_err", ...) [New submission type code error] |
| 9 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.MSKM_OPTNTY_CD_ERR)` -> put("mskm_optnty_cd_err", ...) [Submission contract code error] |
| 10 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.TAKCHO_KIBO_APO_KIGEN_YMD_ERR)` -> put("takcho_kibo_apo_kigen_ymd_err", ...) [Home survey desired application deadline YMD error] |
| 11 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.KOJI_APO_RRKS_SHITEI_CD_ERR)` -> put("koji_apo_rrks_shitei_cd_err", ...) [Work application contact designation code error] |
| 12 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.KOJI_APO_RRKS_TELNO_ERR)` -> put("koji_apo_rrks_telno_err", ...) [Work application contact phone number error] |
| 13 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.RRK_JIKO_ADD_DTM_ERR)` -> put("rrk_jiko_add_dtm_err", ...) [Contact item registration datetime error] |
| 14 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.MSKM_RRKS_MLAD_ERR)` -> put("mskm_rrks_mlad_err", ...) [Submission contact email address error] |
| 15 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.KOJI_PRG_TCHI_MLAD_ERR)` -> put("koji_prg_tchi_mlad_err", ...) [Work progress notification email address error] |
| 16 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.RRK_JIKO_ERR)` -> put("rrk_jiko_err", ...) [Contact item error] |
| 17 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.KJSC_TCH_KTAI_MLAD_ERR)` -> put("kjsc_tch_ktai_mlad_err", ...) [Work progress notification mobile email error] |
| 18 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.ML_SEND_JGI_FLG_ERR)` -> put("ml_send_jgi_flg_err", ...) [Email sending exclusion flag error] |
| 19 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.ML_SEND_JGI_RSN_MEMO_ERR)` -> put("ml_send_jgi_rsn_memo_err", ...) [Email sending exclusion reason memo error] |
| 20 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.BMP_MSKM_RRKS_TLN_ERR)` -> put("bmp_mskm_rrks_tln_err", ...) [Bank submission contact phone number error] |
| 21 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.OP_SVC_HKTGI_UM_ERR)` -> put("op_svc_hktgi_um_err", ...) [Option service continuation yes/no error] |
| 22 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.DSL_ATICLE_SOHU_KIBO_UM_ERR)` -> put("dsl_aticle_sohu_kibo_um_err", ...) [Contract document delivery desired yes/no error] |
| 23 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.RRK_WAY_HOKI_ERR)` -> put("rrk_way_hoki_err", ...) [Contact method supplementary error] |
| 24 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.NEWCONST_BUKKEN_CD_ERR)` -> put("newconst_bukken_cd_err", ...) [New building code error] |
| 25 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.HUKKAT_ANKEN_FLG_ERR)` -> put("hukkat_anken_flg_err", ...) [Reactivation case flag error] |
| 26 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.SAME_EQUIP_RE_MSKM_CD_ERR)` -> put("same_equip_re_mskm_cd_err", ...) [Same equipment re-submission code error] |
| 27 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.HNIN_CFM_ATICLE_SBT_CD_ERR)` -> put("hnin_cfm_aticle_sbt_cd_err", ...) [Identity confirmation document type code error] |
| 28 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.MSKMSHO_SBT_CD_ERR)` -> put("mskmsho_sbt_cd_err", ...) [Submission document type code error] |
| 29 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.MAP_TEMP_UM_ERR)` -> put("map_temp_um_err", ...) [Map attachment yes/no error] |
| 30 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.KCN_STB_MSKM_CNT_ERR)` -> put("kcn_stb_mskm_cnt_err", ...) [KCNSTB submission count error] |
| 31 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.KCN_STB_KIND_CD_ERR)` -> put("kcn_stb_kind_cd_err", ...) [KCNSTB type code error] |

### Block 26 - [IF] List-level error (L3173-L3177)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK0011D020CBSMsg.EKK0011D020CBSMSG1LIST_ERR)` // List-level error from CBS |
| 2 | IF | `!inHash.containsKey("EKK0011D020CBSMsg1List_err")` |
| 3 | SET | `inHash.put("EKK0011D020CBSMsg1List_err", template.getString(EKK0011D020CBSMsg.EKK0011D020CBSMSG1LIST_ERR))` |

### Block 27 - [RETURN] (L3176)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return param` // Return param with all error data mapped into inHash and inList |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| MSKM | Japanese acronym | 申請 (Shinsei) - Submission/Application - refers to service contract submission operations |
| MSKM_SBT_CD | Field | Submission type code - classifies the type of submission (new contract, change, cancellation, etc.) |
| MSKMSHO | Japanese acronym | 申請書着 (Shinseishaku) - Submission document arrival - relates to when the submission document was received |
| ARIV_YMD | Field | Arrival year/month/day - the date when the submission was received |
| UK_DTM | Field | Receipt datetime - timestamp when the submission was received by the system |
| TNT_USER_ID | Field | Responsible user ID - the user ID of the staff member handling this submission |
| UNYO_YMD | Field | Operation date - date of operation (from 運用年月日 unyou nengetsuhi) |
| TTL_BUSINESS | Japanese | 総合営業 (Sougo Eigyou) - Overall/General business - refers to the general sales division |
| CENTER_UK_NO | Field | Center receipt number - the receipt number assigned by the business center |
| MSKM_OPT_CD | Field | Submission contract code - the contract code associated with the submission |
| RRKS_TELNO | Field | Contact phone number - phone number for contacting the applicant |
| JSSIS_SBT_CD | Field | Submission executor type code - type of entity performing the submission |
| CUST_YOBO_JIKO | Japanese | お客様ご要件 (Okyakusama Go Youken) - Customer requirements/preferences |
| TEL_RRK_KIBOD_SBT_CD | Field | Phone contact desired day type code - preferred day type for phone contact |
| TEL_RRK_KIBO_TIME_CD | Field | Phone contact desired time slot code - preferred time slot for phone contact |
| TAKCHO | Japanese | 宅内 (Takunai) - Inside the home/home - relates to in-home services like surveys or installations |
| KARI_MSKM | Japanese | 仮申請 (KariShinsei) - Temporary/Provisional submission |
| REFERER | Field | Referer - the referring URL or source from which the submission originated |
| KEPCO | Business term | Kansai Electric Power Company - regional electric utility |
| CUSTINFO_JUJU_DOI_UM | Japanese | 顧客情報授受同意有無 (Kyaku Jouhou Jujutsu Doui Yuubu) - Customer information consent yes/no |
| SHOSA | Japanese | 調査 (Chousa) - Investigation/Survey - pre-service inquiry |
| BF_RRK_JIKO_YH | Japanese | 調査前連絡事項要件 (Chousamaen Rengaku Jikou Youken) - Pre-inquiry contact item requirements |
| BF_RRK_JIKO | Japanese | 調査前連絡事項 (Chousamaen Rengaku Jikou) - Pre-inquiry contact items |
| USE_SVC_KEIZK_SBT_CD | Japanese | 利用サービス継続種類 (Riyou Saabisu Keizoku Shurui) - Service continuation type code |
| CONSMBSN_MSKM_STAT_SKBT_CD | Japanese | コンシューマ営業用申請状態識別コード - Consumer business submission status code |
| MSKMSHO_NO | Field | Submission number - unique number for a submission document |
| WEB_UK_NO | Field | WEB receipt number - receipt number for web submissions |
| MSKM_FORM_CD | Field | Submission form code - type of form used for submission |
| MSKM_DTL_SBT_CD | Field | Submission detail type code - detailed classification of submission type |
| RRKS_KTAI_TELNO | Field | Contact mobile phone number - mobile phone for the contact person |
| RRKS_OFFC_NM | Field | Contact business name - business name of the contact person |
| DT_RRKS_TELNO | Field | Daytime contact phone number - phone number available during business hours |
| NEW_MSKM_SBT_CD | Field | New submission type code - code for new submissions |
| MSKM_OPTNTY_CD | Field | Submission contract code - contract code for the submission |
| TAKCHO_KIBO_APO_KIGEN_YMD | Field | Home survey desired application deadline YMD - deadline for the home survey application |
| KOJI_APO_RRKS_SHITEI_CD | Field | Work application contact designation code - code designating the contact for work |
| KOJI_APO_RRKS_TELNO | Field | Work application contact phone number - phone for work applications |
| RRK_JIKO_ADD_DTM | Field | Contact item registration datetime - timestamp when contact items were registered |
| MSKM_RRKS_MLAD | Field | Submission contact email address - email for contacting the applicant |
| KOJI_PRG_TCHI_MLAD | Field | Work progress notification email address - email for work progress notifications |
| RRK_JIKO | Japanese | 連絡事項 (Rengaku Jikou) - Contact items - items to communicate with the customer |
| KJSC_TCH_KTAI_MLAD | Japanese | 工事進捗通知携帯メール (Kouji Shinshoku Tsuchi Keitai Meeru) - Construction progress notification mobile email |
| ML_SEND_JGI_FLG | Japanese | メール送信除外フラグ - Email sending exclusion flag |
| ML_SEND_JGI_RSN_MEMO | Japanese | メール送信除外理由メモ - Memo explaining why email sending is excluded |
| BMP_MSKM_RRKS_TLN | Japanese | 番埔申請連絡先電話 - Submission contact phone number (bank-related) |
| OP_SVC_HKTGI_UM | Japanese | オプションサービス引継有無 - Option service continuation yes/no |
| DSL_ATICLE_SOHU_KIBO_UM | Japanese | 解約書類送付希望有無 - Contract document delivery desired yes/no |
| RRK_WAY_HOKI | Japanese | 連絡手段補足 - Contact method supplementary information |
| NEWCONST_BUKKEN_CD | Field | New building code - code for new building type |
| HUKKAT_ANKEN_FLG | Japanese | 復活案件フラグ - Reactivation case flag |
| SAME_EQUIP_RE_MSKM_CD | Japanese | 同一設備再申請コード - Same equipment re-submission code |
| HNIN_CFM_ATICLE_SBT_CD | Japanese | 本人確認書類種類コード - Identity confirmation document type code |
| MSKMSHO_SBT_CD | Field | Submission document type code - type of the submission document |
| MAP_TEMP_UM | Japanese | 地図添付有無 (Chizu Tenpu Umu) - Map attachment yes/no |
| KCN_STB_MSKM_CNT | Field | KCNSTB submission count - number of KCNSTB submissions |
| KCN_STB_KIND_CD | Field | KCNSTB type code - type code for KCN Set-Top Box |
| KCNSTB | Acronym | KCN Set-Top Box - a set-top box device for KCN services |
| SYSID | Acronym | System ID - unique system identifier for the order/submission |
| EKK0011D020 | Screen code | Service Contract Line Details List Inquiry screen |
| CAANMsg | Class | Message class used for CBS request/response data - holds field values and null status |
| IRequestParameterReadWrite | Interface | Business data read/write interface - carries parameters and results through the processing chain |
| setControlMap | Method | Sets error control configuration on the screen form |
| EKK0011D020CBSMsg | Class | CBS message constant class - defines field name constants for the EKK0011D020 CBS message |
| EKK0011D020CBSMsg1List | Class | CBS message constant class for child/line-item entries |
| CBS | Acronym | Common Business System - the backend business logic system |
| S-IF | Acronym | Service Interface - the interface layer between the screen and the CBS |
