# Business Logic — JKKAdchgHakkoSODCC.editErrorInfo_EKK1551D010CBS() [223 LOC]

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

## 1. Role

### JKKAdchgHakkoSODCC.editErrorInfo_EKK1551D010CBS()

This method processes the **error information returned from the Order Information Creation Work Registration Service Interface (EKK1551D010CBS)**. Its primary business purpose is to extract structured error messages from the CBS response template and store them in the application's work map for later presentation to the user on the screen.

The method handles two distinct layers of error capture. First, it evaluates the overall CBS return status code (`STATUS` field from the template) against a known error message constant table managed by `JCMAPLConstMgr`. If the system-level return code differs from the CBS status code, the method gives priority to the more specific CBS status code (capping it at 9000). It then stores the corresponding human-readable Japanese error message in the control map under `RETURN_CODE` and `RETURN_MESSAGE`, but only if the CBS status code indicates a worse condition than the existing business process status.

Second, and most extensively, the method performs field-level error extraction across **22 individual order information fields**. Each field has a dedicated error key in the CBS response template (e.g., `ODR_HAKKO_JOKEN_NO_ERR`). For each field, the method checks whether the CBS returned an error value, and if so, stores the error string into a per-work HashMap under a predictable key (e.g., `"odr_hakko_joken_no_err"`). The HashMap is retrieved from or initialized in the work map (`HAKKOSODCCWORKMAP`), serving as a cumulative error buffer that may be extended by subsequent processing.

This method implements a **delegation pattern** — it does not perform the actual CBS call itself, but transforms the raw CBS response envelope into a structured, application-friendly error format. It acts as a shared utility called by the main order creation CBS dispatch methods in multiple custom components (`JKKAdchgHakkoSODCC`, `JKKHakkoSODCC`, `JKKKikiDslAddCC`, `JKKAdchgCancelHakkoSODCC`), ensuring consistent error handling across all order creation, modification, and cancellation screens.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editErrorInfo_EKK1551D010CBS"])

    START --> S1["S1: template = templates[0]"]
    S1 --> S2["S2: templateStatus = template.getInt(STATUS)"]
    S2 --> S3{returnCode != 0?}
    S3 -->|Yes| S4["S4: templateStatus = 9000"]
    S3 -->|No| S5["S5: templateStatus unchanged"]
    S4 --> S6["S6: formatStatus = String.format('%04d', templateStatus)"]
    S5 --> S6
    S6 --> S7{JCMAPLConstMgr.getString('RETURN_MESSAGE_' + formatStatus) == null?}
    S7 -->|null| S8["S8: templateStatus = 0 (invalid/unrecognized status)"]
    S7 -->|not null| S9["S9: templateStatus is valid"]
    S8 --> S10["S10: bpStatus = param.getControlMapData(RETURN_CODE)"]
    S9 --> S10
    S10 --> S11{obj == null?}
    S11 -->|Yes| S12["bpStatus = -1"]
    S11 -->|No| S13["bpStatus = Integer.parseInt((String) obj)"]
    S12 --> S14{templateStatus > bpStatus?}
    S13 --> S14
    S14 -->|Yes| S15["S15: param.setControlMapData(RETURN_CODE, formatStatus)"]
    S15 --> S16["S16: param.setControlMapData(RETURN_MESSAGE, message)"]
    S14 -->|No| S17["S17: Skip - bpStatus already higher or equal"]
    S16 --> S18["S18: inMap = param.getData(HAKKOSODCCWORKMAP)"]
    S17 --> S18
    S18 --> S19{inMap == null?}
    S19 -->|Yes| S20["inMap = new HashMap()"]
    S20 --> S21["param.setData(HAKKOSODCCWORKMAP, inMap)"]
    S19 -->|No| S21
    S21 --> E["E: Extract 22 error fields from template into inMap"]
    E --> END(["Return param"])
```

**Constant Resolution:**

| Constant | Actual Value | Business Meaning |
|----------|-------------|------------------|
| `HAKKOSODCCWORKMAP` | `"HakkoSODCCWORK"` | Key for the order creation work registration HashMap in the parameter data store |
| `JCMAPLConstMgr` | N/A | Global constant manager for retrieving message strings by key |
| `RETURN_MESSAGE_XXXX` | N/A | Pattern for message lookup keys (e.g., `RETURN_MESSAGE_9000`) |
| `SCControlMapKeys.RETURN_CODE` | N/A | Control map key for storing business process return code |
| `SCControlMapKeys.RETURN_MESSAGE` | N/A | Control map key for storing the human-readable return message |
| `SCControlMapKeys.ERROR_INFO` | N/A | Control map key for error info list (used by caller) |

**Error Field Extraction (22 fields processed identically):**

Each of the 22 error fields follows the same pattern: check if the template value is non-null, then if the key has not already been placed in the work map, extract the error string value. The fields are:

| # | CBS Template Key | Work Map Key | Japanese Label |
|---|-----------------|--------------|----------------|
| 1 | `ODR_HAKKO_JOKEN_NO_ERR` | `odr_hakko_joken_no_err` | Order issuance condition number error |
| 2 | `ODR_NAIYO_CD_ERR` | `odr_naiyo_cd_err` | Order content code error |
| 3 | `SVC_KEI_NO_ERR` | `svc_kei_no_err` | Service contract number error |
| 4 | `SVKEI_GADTM_ERR` | `svkei_gadtm_err` | Service contract era registration datetime error |
| 5 | `SVC_KEI_UCWK_NO_ERR` | `svc_kei_ucwk_no_err` | Service contract detail number error |
| 6 | `SVKEIUW_GADTM_ERR` | `svkeiuw_gadtm_err` | Service contract detail era registration datetime error |
| 7 | `KKTK_SVC_KEI_NO_ERR` | `kktk_svc_kei_no_err` | Equipment-provided service contract number error |
| 8 | `KKTSVKEI_GADTM_ERR` | `kktsvkei_gadtm_err` | Equipment-provided service contract era registration datetime error |
| 9 | `OP_SVC_KEI_NO_ERR` | `op_svc_kei_no_err` | Option service contract number error |
| 10 | `OPSVKEI_GADTM_ERR` | `opsvkei_gadtm_err` | Option service contract era registration datetime error |
| 11 | `SBOP_SVC_KEI_NO_ERR` | `sbop_svc_kei_no_err` | Sub-option service contract number error |
| 12 | `SBOPSVKEI_GADTM_ERR` | `sbopsvkei_gadtm_err` | Sub-option service contract era registration datetime error |
| 13 | `SEIOPSVC_KEI_NO_ERR` | `seiopsvc_kei_no_err` | Billing option service contract number error |
| 14 | `SEIOPSVKEI_GADTM_ERR` | `seiopsvkei_gadtm_err` | Billing option service contract era registration datetime error |
| 15 | `HUKA_INF_KEI_NO_ERR` | `huka_inf_kei_no_err` | Additional information contract number error |
| 16 | `HUKA_INF_KEI_GADTM_ERR` | `huka_inf_kei_gadtm_err` | Additional information contract era registration datetime error |
| 17 | `CHBF_SVKEI_GADTM_ERR` | `chbf_svkei_gadtm_err` | Pre-change service contract era registration datetime error |
| 18 | `CHBF_SVKEIUW_GADTM_ERR` | `chbf_svkeiuw_gadtm_err` | Pre-change service contract detail era registration datetime error |
| 19 | `CHBF_KKTSVKEI_GADTM_ERR` | `chbf_kktsvkei_gadtm_err` | Pre-change equipment-provided service contract era registration datetime error |
| 20 | `CHBF_OPSVKEI_GADTM_ERR` | `chbf_opsvkei_gadtm_err` | Pre-change option service contract era registration datetime error |
| 21 | `CHBF_SBOPSVKEI_GADTM_ERR` | `chbf_sbopsvkei_gadtm_err` | Pre-change sub-option service contract era registration datetime error |
| 22 | `CHBF_SEIOPSVKEI_GADTM_ERR` | `chbf_seiopsvkei_gadtm_err` | Pre-change billing option service contract era registration datetime error |

**Processing flow summary:**

1. **Status code normalization** (lines 15026-15036): The CBS response status code is validated against the known message constant table. If the CBS status code is not a recognized key in the message dictionary, it is reset to 0.
2. **Business process status comparison** (lines 15038-15050): The method retrieves the existing business process return code from the control map. If the CBS status code indicates a worse condition (higher numeric value), it overwrites the return code and message with the CBS-provided values.
3. **Work map initialization** (lines 15053-15060): A HashMap is retrieved from the work map (or created fresh) to serve as the error accumulator for this work session.
4. **Field-level error extraction** (lines 15063-15245): 22 error fields are extracted from the CBS template into the work map using a consistent check-then-extract pattern. Each field uses `template.isNull()` to check for error presence, then `inMap.containsKey()` to avoid overwriting existing values, then `template.getString()` to capture the error string.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The business data read/write interface carrying the current request context. It holds the work map (under `HAKKOSODCCWORKMAP`), control map data (including the existing `RETURN_CODE`), and is used to store error information back into the application state for screen display. |
| 2 | `templates` | `CAANMsg[]` | An array of CBS response message templates from the EKK1551D010CBS service interface call. `templates[0]` contains the CBS return status, the human-readable return message key, and up to 22 individual field-level error values. The template schema is defined in `EKK1551D010CBSMsg`. |
| 3 | `returnCode` | `int` | The system-level return code from the CBS invocation. If non-zero, it overrides the CBS status code in the template to 9000, indicating a system-level failure (as opposed to a business-level failure signaled by the CBS status). |

**Instance fields / external state read:**

| Source | Description |
|--------|-------------|
| `JCMAPLConstMgr` | Global constant manager used to look up return message strings by key (`RETURN_MESSAGE_XXXX`). Reads from a centralized message dictionary. |
| `JKKHakkoSODConstCC.HAKKOSODCCWORKMAP` | Constant value `"HakkoSODCCWORK"` used as the key to retrieve/create the per-work error accumulation HashMap. |
| `SCControlMapKeys` | Constants used as keys in the control map: `RETURN_CODE`, `RETURN_MESSAGE`. These are the storage locations for the business process status and its human-readable message. |
| `EKK1551D010CBSMsg` | CBS message schema class providing static field names for all template columns including the 22 error fields. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JCMAPLConstMgr.getString` | - | - | Reads a message string from the centralized message dictionary using the key `"RETURN_MESSAGE_" + formatStatus` |
| - | `template.getInt` | - | - | Reads the STATUS field from the CBS response template |
| - | `template.isNull` | - | - | Checks whether each of the 22 error fields contains a null/non-error value in the CBS response template |
| R | `template.getString` | - | - | Reads the error string value from the CBS template for each of the 22 non-null error fields |
| R | `param.getControlMapData` | - | - | Reads the existing RETURN_CODE from the control map for comparison |
| R | `param.getData` | - | - | Reads the work map HashMap from the parameter data store |
| U | `param.setControlMapData` | - | - | Updates RETURN_CODE and RETURN_MESSAGE in the control map when CBS status is worse |
| U | `param.setData` | - | - | Stores the newly-created work map HashMap into the parameter data store (only if null) |
| - | `inMap.put` | - | - | Stores each of the 22 error field strings into the work map HashMap (only if key not already present) |
| - | `String.format` | - | - | Formats the templateStatus integer into a zero-padded 4-digit string for message lookup |
| - | `Integer.parseInt` | - | - | Parses the existing RETURN_CODE string back to integer for numeric comparison |

This method performs **no direct database CRUD operations**. It is a pure in-memory transformation layer between the CBS response envelope and the application's work/map data structures. All reads are from the template (`getString`, `isNull`, `getInt`), and all writes are to the `param` object's data and control maps.

## 5. Dependency Trace

### Direct callers (4 methods across 4 classes):

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) |
|---|----------------------|--------------------------------------|
| 1 | Method: `JKKAdchgHakkoSODCC.executeOdrHakkoJokenAdd` (L14993) | `executeOdrHakkoJokenAdd` -> `editErrorInfo_EKK1551D010CBS(param, templates, (Integer)return_code)` |
| 2 | Method: `JKKHakkoSODCC.executeOdrHakkoJokenAdd` (L21650) | `executeOdrHakkoJokenAdd` -> `editErrorInfo_EKK1551D010CBS(param, templates, (Integer)return_code)` |
| 3 | Method: `JKKKikiDslAddCC.executeOdrHakkoJokenAdd` (L1748) | `executeOdrHakkoJokenAdd` -> `editErrorInfo_EKK1551D010CBS(param, templates, (Integer)return_code)` |
| 4 | Method: `JKKAdchgCancelHakkoSODCC.executeOdrHakkoJokenAdd` (L12534) | `executeOdrHakkoJokenAdd` -> `editErrorInfo_EKK1551D010CBS(param, templates, (Integer)return_code)` |

**Call chain context:** All four callers are the `executeOdrHakkoJokenAdd` method (order information creation work registration with order issuance condition) within their respective custom component classes. The call occurs after the CBS is invoked and before error list consolidation.

### Terminal operations from this method:

| # | Operation | Type | Source |
|---|-----------|------|--------|
| 1 | `template.getInt(STATUS)` | Read | CBS response template |
| 2 | `JCMAPLConstMgr.getString(RETURN_MESSAGE_XXXX)` | Read | Message dictionary |
| 3 | `param.getControlMapData(RETURN_CODE)` | Read | Control map |
| 4 | `param.getData(HAKKOSODCCWORKMAP)` | Read | Parameter data |
| 5-26 | `template.isNull(COLUMN_ERR)` x 22 fields | Read | CBS response template (one per error field) |
| 27-48 | `template.getString(...)` x 22 fields | Read | CBS response template (error field values) |
| 49 | `param.setControlMapData(RETURN_CODE)` | Write | Control map |
| 50 | `param.setControlMapData(RETURN_MESSAGE)` | Write | Control map |
| 51 | `param.setData(HAKKOSODCCWORKMAP, inMap)` | Write | Parameter data (only if new) |
| 52-73 | `inMap.put("...", value)` x up to 22 | Write | Work map HashMap |

**Note:** No external screens, batches, or database entities are directly accessed by this method. The CBS call (`EKK1551D010CBS`) is performed by the **caller**, not by this method. This method only consumes the CBS response.

## 6. Per-Branch Detail Blocks

### Block 1 — STATUS code extraction and normalization (L15026-L15036)

> Retrieves the CBS response status code and validates it against the known message constant table.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template = templates[0]` // Extract first template from array [L15026] |
| 2 | SET | `templateStatus = template.getInt(EKK1551D010CBSMsg.STATUS)` // Read CBS status [L15027] |
| 3 | IF | `returnCode != 0` -> System-level failure detected [L15028] |

### Block 1.1 — System-level failure override (L15029)

> When the system-level return code is non-zero, the CBS status is overridden to 9000.

| # | Type | Code |
|---|------|------|
| 1 | SET | `templateStatus = 9000` // Override to system failure code [-> 9000] [L15029] |

### Block 1.2 — Invalid status code reset (L15033-L15035)

> If the formatted status code does not correspond to any known message key in `JCMAPLConstMgr`, reset to 0.

| # | Type | Code |
|---|------|------|
| 1 | SET | `formatStatus = String.format("%04d", templateStatus)` // Format as "0001", "9000", etc. [L15033] |
| 2 | CALL | `JCMAPLConstMgr.getString("RETURN_MESSAGE_" + formatStatus)` // Look up message by key [L15034] |
| 3 | IF | `JCMAPLConstMgr.getString(...) == null` -> Status code not in message dictionary [L15034] |

### Block 1.2.1 — Invalid status (L15035)

| # | Type | Code |
|---|------|------|
| 1 | SET | `templateStatus = 0` // Reset to zero -- unknown/invalid status [L15035] |

### Block 2 — Business process status comparison (L15038-L15050)

> Compares the CBS status code against the existing business process return code. If the CBS code is worse, update the control map with the CBS status and its human-readable message.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bpStatus = 0` // Initialize BP status [L15038] |
| 2 | SET | `obj = param.getControlMapData(SCControlMapKeys.RETURN_CODE)` // Read existing return code [L15039] |
| 3 | IF | `obj == null` -> No existing return code set [L15040] |

### Block 2.1 — No existing return code (L15041-L15042)

| # | Type | Code |
|---|------|------|
| 1 | SET | `bpStatus = -1` // Default to -1 when no existing value [L15041] |

### Block 2.2 — Parse existing return code (L15044-L15045)

| # | Type | Code |
|---|------|------|
| 1 | SET | `bpStatus = Integer.parseInt((String) param.getControlMapData(SCControlMapKeys.RETURN_CODE))` // Parse existing [L15045] |

### Block 2.3 — Status comparison decision (L15048-L15050)

> **Conditional branch**: If the CBS status code (after normalization) is greater than the business process's existing status, the CBS status takes precedence and overwrites the control map.

| # | Type | Code |
|---|------|------|
| 1 | IF | `templateStatus > bpStatus` -> CBS status is worse than BP status [L15048] |

### Block 2.3.1 — CBS status takes precedence (L15050-L15054)

> Update the control map with the CBS status code and its human-readable message.

| # | Type | Code |
|---|------|------|
| 1 | SET | `formatStatus = String.format("%04d", templateStatus)` // Format for message lookup [L15051] |
| 2 | SET | `message = JCMAPLConstMgr.getString("RETURN_MESSAGE_" + formatStatus)` // Retrieve human-readable message [L15052] |
| 3 | EXEC | `param.setControlMapData(SCControlMapKeys.RETURN_CODE, formatStatus)` // Overwrite return code [L15053] |
| 4 | EXEC | `param.setControlMapData(SCControlMapKeys.RETURN_MESSAGE, message)` // Overwrite return message [L15054] |

### Block 3 — Work map initialization (L15057-L15063)

> Retrieves the work map HashMap from the parameter data, or creates a new one if it does not exist. This HashMap accumulates field-level error information.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap = (HashMap) param.getData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP)` // Get work map [-> "HakkoSODCCWORK"] [L15059] |
| 2 | IF | `inMap == null` -> Work map not yet created [L15060] |

### Block 3.1 — Create new work map (L15061-L15063)

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap = new HashMap()` // Create fresh error accumulator [L15062] |
| 2 | EXEC | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` // Store in parameter [-> "HakkoSODCCWORK"] [L15063] |

### Block 4 — Field-level error extraction (L15066-L15245)

> For each of the 22 error fields returned by the CBS, check if an error value is present and store it in the work map. Each block follows an identical pattern: `if (!template.isNull(COLUMN_ERR)) { if (!inMap.containsKey("key")) { inMap.put("key", template.getString(COLUMN_ERR)); } }`.

**Block 4.1** — `ODR_HAKKO_JOKEN_NO_ERR` (Order issuance condition number error) (L15066-L15071)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.ODR_HAKKO_JOKEN_NO_ERR)` [L15066] |
| 2 | IF | `!inMap.containsKey("odr_hakko_joken_no_err")` [L15067] |
| 3 | EXEC | `inMap.put("odr_hakko_joken_no_err", template.getString(EKK1551D010CBSMsg.ODR_HAKKO_JOKEN_NO_ERR))` [L15069] |

**Block 4.2** — `ODR_NAIYO_CD_ERR` (Order content code error) (L15073-L15078)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.ODR_NAIYO_CD_ERR)` [L15073] |
| 2 | IF | `!inMap.containsKey("odr_naiyo_cd_err")` [L15074] |
| 3 | EXEC | `inMap.put("odr_naiyo_cd_err", template.getString(EKK1551D010CBSMsg.ODR_NAIYO_CD_ERR))` [L15076] |

**Block 4.3** — `SVC_KEI_NO_ERR` (Service contract number error) (L15080-L15085)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.SVC_KEI_NO_ERR)` [L15080] |
| 2 | IF | `!inMap.containsKey("svc_kei_no_err")` [L15081] |
| 3 | EXEC | `inMap.put("svc_kei_no_err", template.getString(EKK1551D010CBSMsg.SVC_KEI_NO_ERR))` [L15083] |

**Block 4.4** — `SVKEI_GADTM_ERR` (Service contract era registration datetime error) (L15087-L15092)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.SVKEI_GADTM_ERR)` [L15087] |
| 2 | IF | `!inMap.containsKey("svkei_gadtm_err")` [L15088] |
| 3 | EXEC | `inMap.put("svkei_gadtm_err", template.getString(EKK1551D010CBSMsg.SVKEI_GADTM_ERR))` [L15090] |

**Block 4.5** — `SVC_KEI_UCWK_NO_ERR` (Service contract detail number error) (L15094-L15099)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.SVC_KEI_UCWK_NO_ERR)` [L15094] |
| 2 | IF | `!inMap.containsKey("svc_kei_ucwk_no_err")` [L15095] |
| 3 | EXEC | `inMap.put("svc_kei_ucwk_no_err", template.getString(EKK1551D010CBSMsg.SVC_KEI_UCWK_NO_ERR))` [L15097] |

**Block 4.6** — `SVKEIUW_GADTM_ERR` (Service contract detail era registration datetime error) (L15099-L15104)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.SVKEIUW_GADTM_ERR)` [L15099] |
| 2 | IF | `!inMap.containsKey("svkeiuw_gadtm_err")` [L15100] |
| 3 | EXEC | `inMap.put("svkeiuw_gadtm_err", template.getString(EKK1551D010CBSMsg.SVKEIUW_GADTM_ERR))` [L15102] |

**Block 4.7** — `KKTK_SVC_KEI_NO_ERR` (Equipment-provided service contract number error) (L15106-L15111)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.KKTK_SVC_KEI_NO_ERR)` [L15106] |
| 2 | IF | `!inMap.containsKey("kktk_svc_kei_no_err")` [L15107] |
| 3 | EXEC | `inMap.put("kktk_svc_kei_no_err", template.getString(EKK1551D010CBSMsg.KKTK_SVC_KEI_NO_ERR))` [L15109] |

**Block 4.8** — `KKTSVKEI_GADTM_ERR` (Equipment-provided service contract era registration datetime error) (L15113-L15118)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.KKTSVKEI_GADTM_ERR)` [L15113] |
| 2 | IF | `!inMap.containsKey("kktsvkei_gadtm_err")` [L15114] |
| 3 | EXEC | `inMap.put("kktsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.KKTSVKEI_GADTM_ERR))` [L15116] |

**Block 4.9** — `OP_SVC_KEI_NO_ERR` (Option service contract number error) (L15120-L15125)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.OP_SVC_KEI_NO_ERR)` [L15120] |
| 2 | IF | `!inMap.containsKey("op_svc_kei_no_err")` [L15121] |
| 3 | EXEC | `inMap.put("op_svc_kei_no_err", template.getString(EKK1551D010CBSMsg.OP_SVC_KEI_NO_ERR))` [L15123] |

**Block 4.10** — `OPSVKEI_GADTM_ERR` (Option service contract era registration datetime error) (L15127-L15132)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.OPSVKEI_GADTM_ERR)` [L15127] |
| 2 | IF | `!inMap.containsKey("opsvkei_gadtm_err")` [L15128] |
| 3 | EXEC | `inMap.put("opsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.OPSVKEI_GADTM_ERR))` [L15130] |

**Block 4.11** — `SBOP_SVC_KEI_NO_ERR` (Sub-option service contract number error) (L15134-L15139)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.SBOP_SVC_KEI_NO_ERR)` [L15134] |
| 2 | IF | `!inMap.containsKey("sbop_svc_kei_no_err")` [L15135] |
| 3 | EXEC | `inMap.put("sbop_svc_kei_no_err", template.getString(EKK1551D010CBSMsg.SBOP_SVC_KEI_NO_ERR))` [L15137] |

**Block 4.12** — `SBOPSVKEI_GADTM_ERR` (Sub-option service contract era registration datetime error) (L15141-L15146)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.SBOPSVKEI_GADTM_ERR)` [L15141] |
| 2 | IF | `!inMap.containsKey("sbopsvkei_gadtm_err")` [L15142] |
| 3 | EXEC | `inMap.put("sbopsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.SBOPSVKEI_GADTM_ERR))` [L15144] |

**Block 4.13** — `SEIOPSVC_KEI_NO_ERR` (Billing option service contract number error) (L15148-L15153)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.SEIOPSVC_KEI_NO_ERR)` [L15148] |
| 2 | IF | `!inMap.containsKey("seiopsvc_kei_no_err")` [L15149] |
| 3 | EXEC | `inMap.put("seiopsvc_kei_no_err", template.getString(EKK1551D010CBSMsg.SEIOPSVC_KEI_NO_ERR))` [L15151] |

**Block 4.14** — `SEIOPSVKEI_GADTM_ERR` (Billing option service contract era registration datetime error) (L15155-L15160)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.SEIOPSVKEI_GADTM_ERR)` [L15155] |
| 2 | IF | `!inMap.containsKey("seiopsvkei_gadtm_err")` [L15156] |
| 3 | EXEC | `inMap.put("seiopsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.SEIOPSVKEI_GADTM_ERR))` [L15158] |

**Block 4.15** — `HUKA_INF_KEI_NO_ERR` (Additional information contract number error) (L15162-L15167)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.HUKA_INF_KEI_NO_ERR)` [L15162] |
| 2 | IF | `!inMap.containsKey("huka_inf_kei_no_err")` [L15163] |
| 3 | EXEC | `inMap.put("huka_inf_kei_no_err", template.getString(EKK1551D010CBSMsg.HUKA_INF_KEI_NO_ERR))` [L15165] |

**Block 4.16** — `HUKA_INF_KEI_GADTM_ERR` (Additional information contract era registration datetime error) (L15169-L15174)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.HUKA_INF_KEI_GADTM_ERR)` [L15169] |
| 2 | IF | `!inMap.containsKey("huka_inf_kei_gadtm_err")` [L15170] |
| 3 | EXEC | `inMap.put("huka_inf_kei_gadtm_err", template.getString(EKK1551D010CBSMsg.HUKA_INF_KEI_GADTM_ERR))` [L15172] |

**Block 4.17** — `CHBF_SVKEI_GADTM_ERR` (Pre-change service contract era registration datetime error) (L15176-L15181)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.CHBF_SVKEI_GADTM_ERR)` [L15176] |
| 2 | IF | `!inMap.containsKey("chbf_svkei_gadtm_err")` [L15177] |
| 3 | EXEC | `inMap.put("chbf_svkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_SVKEI_GADTM_ERR))` [L15179] |

**Block 4.18** — `CHBF_SVKEIUW_GADTM_ERR` (Pre-change service contract detail era registration datetime error) (L15183-L15188)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.CHBF_SVKEIUW_GADTM_ERR)` [L15183] |
| 2 | IF | `!inMap.containsKey("chbf_svkeiuw_gadtm_err")` [L15184] |
| 3 | EXEC | `inMap.put("chbf_svkeiuw_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_SVKEIUW_GADTM_ERR))` [L15186] |

**Block 4.19** — `CHBF_KKTSVKEI_GADTM_ERR` (Pre-change equipment-provided service contract era registration datetime error) (L15190-L15195)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.CHBF_KKTSVKEI_GADTM_ERR)` [L15190] |
| 2 | IF | `!inMap.containsKey("chbf_kktsvkei_gadtm_err")` [L15191] |
| 3 | EXEC | `inMap.put("chbf_kktsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_KKTSVKEI_GADTM_ERR))` [L15193] |

**Block 4.20** — `CHBF_OPSVKEI_GADTM_ERR` (Pre-change option service contract era registration datetime error) (L15197-L15202)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.CHBF_OPSVKEI_GADTM_ERR)` [L15197] |
| 2 | IF | `!inMap.containsKey("chbf_opsvkei_gadtm_err")` [L15198] |
| 3 | EXEC | `inMap.put("chbf_opsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_OPSVKEI_GADTM_ERR))` [L15200] |

**Block 4.21** — `CHBF_SBOPSVKEI_GADTM_ERR` (Pre-change sub-option service contract era registration datetime error) (L15204-L15209)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.CHBF_SBOPSVKEI_GADTM_ERR)` [L15204] |
| 2 | IF | `!inMap.containsKey("chbf_sbopsvkei_gadtm_err")` [L15205] |
| 3 | EXEC | `inMap.put("chbf_sbopsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_SBOPSVKEI_GADTM_ERR))` [L15207] |

**Block 4.22** — `CHBF_SEIOPSVKEI_GADTM_ERR` (Pre-change billing option service contract era registration datetime error) (L15211-L15216)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!template.isNull(EKK1551D010CBSMsg.CHBF_SEIOPSVKEI_GADTM_ERR)` [L15211] |
| 2 | IF | `!inMap.containsKey("chbf_seiopsvkei_gadtm_err")` [L15212] |
| 3 | EXEC | `inMap.put("chbf_seiopsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_SEIOPSVKEI_GADTM_ERR))` [L15214] |

### Block 5 — Return (L15245)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return param;` // Return updated parameter with error info in work map and control map [L15245] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `editErrorInfo_EKK1551D010CBS` | Method | Error info retrieval method for order information creation work registration |
| `EKK1551D010CBS` | CBS Code | Order Information Creation Work Registration CBS -- the backend service that creates orders via work-based registration |
| `SOD` | Acronym | Service Order Data -- the order fulfillment data model for telecom services |
| `CAANMsg` | Class | Fujitsu's generic message envelope class used for CBS request/response data transfer |
| `IRequestParameterReadWrite` | Interface | Business data read/write interface -- carries request parameters, data maps, and control maps between components |
| `HAKKOSODCCWORKMAP` | Constant | Key `"HakkoSODCCWORK"` for the order creation work registration HashMap in the parameter data store |
| `STATUS` | Template field | CBS response status code -- indicates overall success or failure of the service interface call |
| `returnCode` | Parameter | System-level return code from CBS invocation -- non-zero indicates system failure |
| `bpStatus` | Local variable | Business process status -- the existing return code stored in the control map |
| `inMap` | Local variable | Work map HashMap that accumulates field-level error strings keyed by field name |
| `ODR_HAKKO_JOKEN_NO` | Field | Order issuance condition number -- the condition number that triggered order issuance |
| `ODR_NAIYO_CD` | Field | Order content code -- classifies the type of order (e.g., FTTH registration, mail change, port-in) |
| `SVC_KEI_NO` | Field | Service contract number -- the unique identifier for a service contract line item |
| `SVKEI_GADTM` | Field | Service contract era registration datetime -- timestamp when the service contract era was registered |
| `SVC_KEI_UCWK_NO` | Field | Service contract detail number -- the internal detail/line number within a service contract |
| `SVKEIUW_GADTM` | Field | Service contract detail era registration datetime -- timestamp when the service contract detail era was registered |
| `KKTK_SVC_KEI_NO` | Field | Equipment-provided service contract number -- service contract number for equipment-provided services (e.g., leased modem/router) |
| `KKTSVKEI_GADTM` | Field | Equipment-provided service contract era registration datetime |
| `OP_SVC_KEI_NO` | Field | Option service contract number -- service contract number for optional/add-on services |
| `OPSVKEI_GADTM` | Field | Option service contract era registration datetime |
| `SBOP_SVC_KEI_NO` | Field | Sub-option service contract number -- service contract number for sub-option services (services nested under an option) |
| `SBOPSVKEI_GADTM` | Field | Sub-option service contract era registration datetime |
| `SEIOPSVC_KEI_NO` | Field | Billing option service contract number -- service contract number for billing-related optional services |
| `SEIOPSVKEI_GADTM` | Field | Billing option service contract era registration datetime |
| `HUKA_INF_KEI_NO` | Field | Additional information contract number -- service contract number for additional information services |
| `HUKA_INF_KEI_GADTM` | Field | Additional information contract era registration datetime |
| `CHBF_` | Prefix | Pre-change -- indicates the field value before a modification/change was applied (used in change/upgrade scenarios) |
| `GADTM` | Field suffix | Group/era Registration Date and Time -- the datetime when a service contract era was registered in the system |
| `JCMAPLConstMgr` | Class | Global constant manager -- centralized message dictionary for retrieving localized error/success messages by key |
| `RETURN_MESSAGE_XXXX` | Message key | Pattern for JCMAPL constant lookup keys -- `"RETURN_MESSAGE_"` + zero-padded 4-digit status code |
| `SCControlMapKeys` | Class | Constants for control map keys (e.g., `RETURN_CODE`, `RETURN_MESSAGE`, `ERROR_INFO`) used to pass status between components |
| `template.isNull(field)` | Method | Check whether a template field contains a non-null value -- used here to detect field-level CBS errors |
| `TemplateErrorUtil.getErrorInfo` | Method | Utility method called by the caller (not by this method) that converts the work map errors into a structured error list for screen display |
| `CCException` | Class | Custom component exception thrown by the caller when errors are detected after this method returns |
| `SCCallException` | Class | Service component call exception containing the return code and CBS status for error propagation |
| FTTH | Business term | Fiber To The Home -- fiber-optic broadband internet service (one of the order content types) |
| Port-in | Business term | Number port-in -- transferring an existing phone number to a new provider (one of the order content types) |
