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

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

## 1. Role

### JKKAdchgCancelHakkoSODCC.editErrorInfo_EKK1551D010CBS()

This method is a **post-service interface error information extractor** for the Order Information Creation Work Registration subsystem. It receives the CBS (Circuit Business Service) response from a service call and populates the `IRequestParameterReadWrite` parameter object with structured error information, return codes, and human-readable messages.

The method performs two distinct business operations. First, it **determines the effective error status** by comparing the CBS template status against the BP (Business Program) status stored in the control map, and if the template status is worse, it sets the control map return code and error message by looking up the message text from `JCMAPLConstMgr`. Second, it **extracts per-field error values** from the CBS response message template -- up to 24 distinct error fields spanning order-level, service-level, optional service, billing optional service, subcontract optional service, additional information, and "before change" (pre-modification) data -- and writes non-null error values into a per-session work HashMap (`HakkoSODCCWORK`).

The method follows a **delegation and accumulation pattern**: it reads error values from the CBS response template and accumulates them into an internal work map keyed by field name. The design ensures that at most one error value per field is stored (duplicate checks using `containsKey`). Its role in the larger system is to **bridge the CBS response layer back to the screen/business layer**, translating CBS error signals into a format the calling business programs can consume and display to the operator.

It is called by the `editResultRP_EKK1551D010CBS` wrapper method after a service component invocation completes, and the resulting work data is later used by error reporting utilities (e.g., `TemplateErrorUtil.getErrorInfo`) to present error summaries on the order cancellation screens.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editErrorInfo_EKK1551D010CBS"]) --> EXTRACT_STATUS["Extract template status from templates[0]"]
    EXTRACT_STATUS --> CHECK_RETURN_CODE{returnCode != 0}
    CHECK_RETURN_CODE -->|Yes| SET_STATUS_9000["Set templateStatus = 9000"]
    CHECK_RETURN_CODE -->|No| VALIDATE_STATUS["Validate status message"]
    SET_STATUS_9000 --> VALIDATE_STATUS
    VALIDATE_STATUS --> CHECK_MSG{Status message constant exists?}
    CHECK_MSG -->|No| RESET_STATUS["Set templateStatus = 0"]
    CHECK_MSG -->|Yes| GET_BP_STATUS["Get BP status from control map"]
    RESET_STATUS --> GET_BP_STATUS
    GET_BP_STATUS --> CHECK_BP_STATUS_NULL{BP status value null?}
    CHECK_BP_STATUS_NULL -->|Yes| SET_BP_STATUS_NEG1["Set bpStatus = -1"]
    CHECK_BP_STATUS_NULL -->|No| PARSE_BP_STATUS["Parse bpStatus from String"]
    SET_BP_STATUS_NEG1 --> COMPARE_STATUS{templateStatus > bpStatus}
    PARSE_BP_STATUS --> COMPARE_STATUS
    COMPARE_STATUS -->|Yes| FORMAT_STATUS["Format status as 4-digit zero-padded"]
    COMPARE_STATUS -->|No| INIT_IN_MAP["Initialize inMap work data"]
    FORMAT_STATUS --> GET_ERROR_MSG["Get error message from constants by key"]
    GET_ERROR_MSG --> SET_RETURN_CODE["Set RETURN_CODE and RETURN_MESSAGE in control map"]
    SET_RETURN_CODE --> INIT_IN_MAP
    INIT_IN_MAP --> CHECK_IN_MAP{inMap null?}
    CHECK_IN_MAP -->|Yes| CREATE_INMAP["Create new HashMap, set in param"]
    CHECK_IN_MAP -->|No| PROCESS_ERROR_FIELDS["Process error fields"]
    CREATE_INMAP --> PROCESS_ERROR_FIELDS
    PROCESS_ERROR_FIELDS --> END(["Return param"])
```

**Processing flow:**

1. **Extract CBS status** from the first element of the `templates` array (`templates[0]`) using the `STATUS` key.
2. **Override status if returnCode is non-zero**: When `returnCode != 0`, the template status is forced to `9000` (indicating a return-code-level failure).
3. **Validate status message**: Check if a corresponding message constant exists via `JCMAPLConstMgr`. If no message is found for the status code, reset `templateStatus` to `0` (safe/unknown).
4. **Read BP status**: Fetch the existing BP return code from the control map. If absent, default to `-1` (indicating no prior error status was set).
5. **Compare and propagate**: If the template status is numerically higher (worse) than the BP status, format the status as a 4-digit zero-padded string, look up the error message, and write both `RETURN_CODE` and `RETURN_MESSAGE` into the control map.
6. **Initialize work map**: Ensure the `HAKKOSODCCWORKMAP` HashMap exists in the parameter data. Create it if absent.
7. **Extract per-field errors**: For each of the 24 error fields defined in the CBS message (order release condition number, order content code, service contract number, service contract registration date/time, service detail number, service detail registration date/time, equipment provider service contract number, equipment provider service contract registration date/time, optional service contract number, optional service contract registration date/time, subcontract optional service contract number, subcontract optional service contract registration date/time, billing optional service contract number, billing optional service contract registration date/time, additional information contract number, additional information contract registration date/time, pre-change (pre-modification) service contract registration date/time, pre-change service detail registration date/time, pre-change equipment provider service contract registration date/time, pre-change optional service contract registration date/time, pre-change subcontract optional contract registration date/time, pre-change billing optional contract registration date/time), check if the CBS template has a non-null value and, if so, store it into the work map keyed by a lowercase field name -- but only if that key is not already present (idempotent accumulation).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | Business data read/write interface -- holds the work context including control map (return code, error info) and data map (HakkoSODCCWORK). Serves as both input (existing session state) and output (populated error state). |
| 2 | `templates` | `CAANMsg[]` | CBS response message array. The first element (`templates[0]`) contains the CBS result including status, error fields, and work number data from the service component. |
| 3 | `returnCode` | `int` | Return code from the service component invocation. When non-zero, indicates a service-level failure and triggers a status override to `9000`. |

**Instance fields / external state:**

| Field | Source | Business Description |
|-------|--------|---------------------|
| `JKKHakkoSODConstCC.HAKKOSODCCWORKMAP` | Constant file | Work map key ("HakkoSODCCWORK") -- stores per-session error field values accumulated from the CBS response. |
| `EKK1551D010CBSMsg.STATUS` | CBS message class | Field key "status" -- integer status code from the CBS response (0 = success, higher = error severity). |
| `SCControlMapKeys.RETURN_CODE` | Control map keys | Control map key for return code -- stores the effective error status as a 4-digit zero-padded string. |
| `SCControlMapKeys.RETURN_MESSAGE` | Control map keys | Control map key for return message -- stores the human-readable error message looked up from constant manager. |
| `JCMAPLConstMgr` | Constant manager | Global message constant lookup -- maps `RETURN_MESSAGE_XXXX` keys to human-readable error text. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `template.getInt(EKK1551D010CBSMsg.STATUS)` | EKK1551D010CBS | - | Reads status code from CBS response message |
| R | `JCMAPLConstMgr.getString("RETURN_MESSAGE_" + formatStatus)` | JCMAPLConstMgr | - | Reads error message text from constant manager by formatted status key |
| R | `param.getControlMapData(SCControlMapKeys.RETURN_CODE)` | - | - | Reads prior BP return code from control map |
| U | `param.setControlMapData(SCControlMapKeys.RETURN_CODE, formatStatus)` | - | - | Writes effective error status code to control map |
| U | `param.setControlMapData(SCControlMapKeys.RETURN_MESSAGE, message)` | - | - | Writes error message text to control map |
| R | `param.getData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP)` | - | - | Reads work data HashMap from parameter data |
| U | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` | - | - | Writes (creates) work data HashMap in parameter data |
| U | `inMap.put("odr_hakko_joken_no_err", value)` | - | - | Stores order release condition number error in work map |
| U | `inMap.put("odr_naiyo_cd_err", value)` | - | - | Stores order content code error in work map |
| U | `inMap.put("svc_kei_no_err", value)` | - | - | Stores service contract number error in work map |
| U | `inMap.put("svkei_gadtm_err", value)` | - | - | Stores service contract registration date/time error in work map |
| U | `inMap.put("svc_kei_ucwk_no_err", value)` | - | - | Stores service detail number error in work map |
| U | `inMap.put("svkeiuw_gadtm_err", value)` | - | - | Stores service detail registration date/time error in work map |
| U | `inMap.put("kktk_svc_kei_no_err", value)` | - | - | Stores equipment provider service contract number error in work map |
| U | `inMap.put("kktsvkei_gadtm_err", value)` | - | - | Stores equipment provider service contract registration date/time error in work map |
| U | `inMap.put("op_svc_kei_no_err", value)` | - | - | Stores optional service contract number error in work map |
| U | `inMap.put("opsvkei_gadtm_err", value)` | - | - | Stores optional service contract registration date/time error in work map |
| U | `inMap.put("sbop_svc_kei_no_err", value)` | - | - | Stores subcontract optional service contract number error in work map |
| U | `inMap.put("sbopsvkei_gadtm_err", value)` | - | - | Stores subcontract optional service contract registration date/time error in work map |
| U | `inMap.put("seiopsvc_kei_no_err", value)` | - | - | Stores billing optional service contract number error in work map |
| U | `inMap.put("seiopsvkei_gadtm_err", value)` | - | - | Stores billing optional service contract registration date/time error in work map |
| U | `inMap.put("huka_inf_kei_no_err", value)` | - | - | Stores additional information contract number error in work map |
| U | `inMap.put("huka_inf_kei_gadtm_err", value)` | - | - | Stores additional information contract registration date/time error in work map |
| U | `inMap.put("chbf_svkei_gadtm_err", value)` | - | - | Stores pre-change service contract registration date/time error in work map |
| U | `inMap.put("chbf_svkeiuw_gadtm_err", value)` | - | - | Stores pre-change service detail registration date/time error in work map |
| U | `inMap.put("chbf_kktsvkei_gadtm_err", value)` | - | - | Stores pre-change equipment provider service contract registration date/time error in work map |
| U | `inMap.put("chbf_opsvkei_gadtm_err", value)` | - | - | Stores pre-change optional service contract registration date/time error in work map |
| U | `inMap.put("chbf_sbopsvkei_gadtm_err", value)` | - | - | Stores pre-change subcontract optional contract registration date/time error in work map |
| U | `inMap.put("chbf_seiopsvkei_gadtm_err", value)` | - | - | Stores pre-change billing optional contract registration date/time error in work map |
| R | `template.isNull(EKK1551D010CBSMsg.*)` | EKK1551D010CBS | - | Checks each CBS response error field for null (non-null means error present) |
| R | `template.getString(EKK1551D010CBSMsg.*)` | EKK1551D010CBS | - | Reads the actual error field value from CBS response |

**Classification notes:**

- All operations are **R** (Read) from the CBS response template and **U** (Update/Set) to the work map and control map. No database or SC code is invoked -- this method operates entirely in-memory using the response data structure.
- The CBS message class `EKK1551D010CBS` represents the response from an order information creation work registration service component.

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 35 methods.
Terminal operations from this method: `isNull` [R], `getString` [R] (x22), `isNull` [R] (x10)

### Direct callers:

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CC:JKKAdchgCancelHakkoSODCC | `editResultRP_EKK1551D010CBS` -> `editErrorInfo_EKK1551D010CBS` | `isNull` [R] EKK1551D010CBS, `getString` [R] EKK1551D010CBS (x22 fields) |
| 2 | CC:JKKAdchgHakkoSODCC | `editResultRP_EKK1551D010CBS` -> `editErrorInfo_EKK1551D010CBS` | `isNull` [R] EKK1551D010CBS, `getString` [R] EKK1551D010CBS (x22 fields) |
| 3 | CC:JKKHakkoSODCC | `editResultRP_EKK1551D010CBS` -> `editErrorInfo_EKK1551D010CBS` | `isNull` [R] EKK1551D010CBS, `getString` [R] EKK1551D010CBS (x22 fields) |
| 4 | CC:JKKKikiDslAddCC | `editResultRP_EKK1551D010CBS` -> `editErrorInfo_EKK1551D010CBS` | `isNull` [R] EKK1551D010CBS, `getString` [R] EKK1551D010CBS (x22 fields) |

### Call chain details:

All callers follow the same pattern:
1. A **wrapper method** `editResultRP_EKK1551D010CBS` (in the same class) is called after a CBS service component invocation completes.
2. The wrapper extracts the CBS response template array and return code from the `msgList` Map.
3. The wrapper calls `editErrorInfo_EKK1551D010CBS(param, templates, (Integer)return_code)`.
4. The method processes error fields and returns the populated `param`.
5. The wrapper then retrieves the `ERROR_INFO` control map key and calls `TemplateErrorUtil.getErrorInfo()` to build the error display data.
6. If errors are present, the wrapper throws a `CCException` wrapping an `SCCallException` with the status code.

The `editErrorInfo_EKK1551D010CBS` method itself has no terminal database or SC operations -- all its `getString` and `isNull` calls are against the `EKK1551D010CBSMsg` CBS response message structure, which was already populated by a prior service component invocation.

## 6. Per-Branch Detail Blocks

### Block 1 -- IF (status override on returnCode) (L12568)

Extract the CBS template status and potentially override it based on the return code.

| # | Type | Code |
|---|------|------|
| 1 | EXTRACT | `CAANMsg template = templates[0]` | Get first element of CBS response template array |
| 2 | R | `int templateStatus = template.getInt(EKK1551D010CBSMsg.STATUS)` | Read status code from CBS response |
| 3 | IF | `if (returnCode != 0)` `[returnCode != 0 triggers status override to 9000]` (L12570) | |

#### Block 1.1 -- IF (returnCode != 0) (L12570)

When the return code is non-zero, force the status to 9000 to indicate service-level failure.

| # | Type | Code |
|---|------|------|
| 1 | SET | `templateStatus = 9000` `[FORCE: non-zero return code maps to status 9000]` |

### Block 2 -- IF (status message validation) (L12575)

Validate that a message constant exists for the current status. If not, reset status to 0.

| # | Type | Code |
|---|------|------|
| 1 | R | `JCMAPLConstMgr.getString("RETURN_MESSAGE_" + String.format("%1$04d", templateStatus))` | Lookup message by formatted status key |
| 2 | IF | `if (JCMAPLConstMgr.getString(...) == null)` `[no message constant for status]` (L12575) | |

#### Block 2.1 -- IF (message not found) (L12576)

If no message exists for this status code, reset templateStatus to 0 (safe default).

| # | Type | Code |
|---|------|------|
| 1 | SET | `templateStatus = 0` `[RESET: unknown status mapped to 0]` |

### Block 3 -- IF/ELSE (BP status extraction) (L12580)

Read the existing BP return code from the control map to compare against the template status.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int bpStatus = 0` | Initialize BP status variable |
| 2 | R | `Object obj = param.getControlMapData(SCControlMapKeys.RETURN_CODE)` | Get prior return code from control map |
| 3 | IF | `if (obj == null)` `[no prior return code in control map]` (L12582) | |

#### Block 3.1 -- IF (BP status null) (L12583)

No prior BP status was set; default to -1 so that any real status (>=0) will be considered worse.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bpStatus = -1` `[DEFAULT: no prior error status]` |

#### Block 3.2 -- ELSE (BP status present) (L12585)

Parse the existing BP return code from the control map string value.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bpStatus = Integer.parseInt((String)param.getControlMapData(SCControlMapKeys.RETURN_CODE))` | Parse string to int |

### Block 4 -- IF (status comparison and error propagation) (L12592)

If the CBS template status is numerically higher (more severe) than the BP status, propagate the CBS error status and message to the control map.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (templateStatus > bpStatus)` `[CBS error is worse than BP error]` (L12592) | |

#### Block 4.1 -- IF (true) -- error propagation (L12594)

Set the CBS error status and human-readable message into the control map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String formatStatus = String.format("%1$04d", templateStatus)` `[FORMAT: 4-digit zero-padded]` |
| 2 | R | `String message = JCMAPLConstMgr.getString("RETURN_MESSAGE_" + formatStatus)` | Lookup message by formatted status |
| 3 | SET | `param.setControlMapData(SCControlMapKeys.RETURN_CODE, formatStatus)` | Write return code to control map |
| 4 | SET | `param.setControlMapData(SCControlMapKeys.RETURN_MESSAGE, message)` | Write error message to control map |

#### Block 4.2 -- IF (false) -- no propagation

Nothing changes. The BP status remains in the control map as it is considered worse or equal to the CBS status.

### Block 5 -- IF/ELSE (work map initialization) (L12601)

Ensure the HakkoSODCCWORK HashMap exists in the parameter data for accumulating error field values.

| # | Type | Code |
|---|------|------|
| 1 | SET | `HashMap inMap = null` | Declare work map variable |
| 2 | R | `inMap = (HashMap)param.getData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP)` `[HAKKOSODCCWORKMAP = "HakkoSODCCWORK"]` | Get work map from parameter |
| 3 | IF | `if (inMap == null)` `[work map not yet created]` (L12603) | |

#### Block 5.1 -- IF (work map null) (L12604)

Create a new HashMap and store it in the parameter data under the work map key.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap = new HashMap()` | Create new work map |
| 2 | SET | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` | Register work map in param |

### Block 6 -- IF chain (per-field error extraction) (L12610-L12787)

A sequence of 22 independent `if` blocks, each extracting one error field from the CBS response template into the work map. Each block follows the same pattern: check if the CBS field is non-null, then check if the work map key is not already present, and finally store the value. This is **idempotent** -- duplicate keys are skipped.

#### Block 6.1 -- IF (order release condition number error) (L12610)

Comment: オーダ情報作成ワーク登録.オーダ発行条件番号 => オーダ発行条件番号のエラー情報返却 (Order Creation Work Registration -- Return error info for order release condition number)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.ODR_HAKKO_JOKEN_NO_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("odr_hakko_joken_no_err")` | Check key not already present |
| 3 | SET | `inMap.put("odr_hakko_joken_no_err", template.getString(EKK1551D010CBSMsg.ODR_HAKKO_JOKEN_NO_ERR))` | Store error value |

#### Block 6.2 -- IF (order content code error) (L12618)

Comment: オーダ情報作成ワーク登録.オーダ内容コード => オーダ内容コードのエラー情報返却 (Return error info for order content code)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.ODR_NAIYO_CD_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("odr_naiyo_cd_err")` | Check key not already present |
| 3 | SET | `inMap.put("odr_naiyo_cd_err", template.getString(EKK1551D010CBSMsg.ODR_NAIYO_CD_ERR))` | Store error value |

#### Block 6.3 -- IF (service contract number error) (L12626)

Comment: オーダ情報作成ワーク登録.サービス契約番号 => サービス契約番号のエラー情報返却 (Return error info for service contract number)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.SVC_KEI_NO_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("svc_kei_no_err")` | Check key not already present |
| 3 | SET | `inMap.put("svc_kei_no_err", template.getString(EKK1551D010CBSMsg.SVC_KEI_NO_ERR))` | Store error value |

#### Block 6.4 -- IF (service contract registration date/time error) (L12634)

Comment: オーダ情報作成ワーク登録.サービス契約世代登録年月日時刻 => サービス契約世代登録年月日時刻のエラー情報返却 (Return error info for service contract generation registration datetime)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.SVKEI_GADTM_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("svkei_gadtm_err")` | Check key not already present |
| 3 | SET | `inMap.put("svkei_gadtm_err", template.getString(EKK1551D010CBSMsg.SVKEI_GADTM_ERR))` | Store error value |

#### Block 6.5 -- IF (service detail number error) (L12642)

Comment: オーダ情報作成ワーク登録.サービス契約内訳番号 => サービス契約内訳番号のエラー情報返却 (Return error info for service detail number)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.SVC_KEI_UCWK_NO_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("svc_kei_ucwk_no_err")` | Check key not already present |
| 3 | SET | `inMap.put("svc_kei_ucwk_no_err", template.getString(EKK1551D010CBSMsg.SVC_KEI_UCWK_NO_ERR))` | Store error value |

#### Block 6.6 -- IF (service detail registration date/time error) (L12650)

Comment: オーダ情報作成ワーク登録.サービス契約内訳世代登録年月日時刻 => サービス契約内訳世代登録年月日時刻のエラー情報返却 (Return error info for service detail generation registration datetime)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.SVKEIUW_GADTM_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("svkeiuw_gadtm_err")` | Check key not already present |
| 3 | SET | `inMap.put("svkeiuw_gadtm_err", template.getString(EKK1551D010CBSMsg.SVKEIUW_GADTM_ERR))` | Store error value |

#### Block 6.7 -- IF (equipment provider service contract number error) (L12658)

Comment: オーダ情報作成ワーク登録.機器提供サービス契約番号 => 機器提供サービス契約番号のエラー情報返却 (Return error info for equipment provider service contract number)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.KKTK_SVC_KEI_NO_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("kktk_svc_kei_no_err")` | Check key not already present |
| 3 | SET | `inMap.put("kktk_svc_kei_no_err", template.getString(EKK1551D010CBSMsg.KKTK_SVC_KEI_NO_ERR))` | Store error value |

#### Block 6.8 -- IF (equipment provider service contract registration date/time error) (L12666)

Comment: オーダ情報作成ワーク登録.機器提供サービス契約世代登録年月日時刻 => 機器提供サービス契約世代登録年月日時刻のエラー情報返却 (Return error info for equipment provider service contract generation registration datetime)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.KKTSVKEI_GADTM_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("kktsvkei_gadtm_err")` | Check key not already present |
| 3 | SET | `inMap.put("kktsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.KKTSVKEI_GADTM_ERR))` | Store error value |

#### Block 6.9 -- IF (optional service contract number error) (L12674)

Comment: オーダ情報作成ワーク登録.オプションサービス契約番号 => オプションサービス契約番号のエラー情報返却 (Return error info for optional service contract number)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.OP_SVC_KEI_NO_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("op_svc_kei_no_err")` | Check key not already present |
| 3 | SET | `inMap.put("op_svc_kei_no_err", template.getString(EKK1551D010CBSMsg.OP_SVC_KEI_NO_ERR))` | Store error value |

#### Block 6.10 -- IF (optional service contract registration date/time error) (L12682)

Comment: オーダ情報作成ワーク登録.オプションサービス契約世代登録年月日時刻 => オプションサービス契約世代登録年月日時刻のエラー情報返却 (Return error info for optional service contract generation registration datetime)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.OPSVKEI_GADTM_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("opsvkei_gadtm_err")` | Check key not already present |
| 3 | SET | `inMap.put("opsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.OPSVKEI_GADTM_ERR))` | Store error value |

#### Block 6.11 -- IF (subcontract optional service contract number error) (L12690)

Comment: オーダ情報作成ワーク登録.サブオプションサービス契約番号 => サブオプションサービス契約番号のエラー情報返却 (Return error info for subcontract optional service contract number)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.SBOP_SVC_KEI_NO_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("sbop_svc_kei_no_err")` | Check key not already present |
| 3 | SET | `inMap.put("sbop_svc_kei_no_err", template.getString(EKK1551D010CBSMsg.SBOP_SVC_KEI_NO_ERR))` | Store error value |

#### Block 6.12 -- IF (subcontract optional service contract registration date/time error) (L12698)

Comment: オーダ情報作成ワーク登録.サブオプションサービス契約世代登録年月日時刻 => サブオプションサービス契約世代登録年月日時刻のエラー情報返却 (Return error info for subcontract optional service contract generation registration datetime)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.SBOPSVKEI_GADTM_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("sbopsvkei_gadtm_err")` | Check key not already present |
| 3 | SET | `inMap.put("sbopsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.SBOPSVKEI_GADTM_ERR))` | Store error value |

#### Block 6.13 -- IF (billing optional service contract number error) (L12706)

Comment: オーダ情報作成ワーク登録.請求オプションサービス契約番号 => 請求オプションサービス契約番号のエラー情報返却 (Return error info for billing optional service contract number)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.SEIOPSVC_KEI_NO_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("seiopsvc_kei_no_err")` | Check key not already present |
| 3 | SET | `inMap.put("seiopsvc_kei_no_err", template.getString(EKK1551D010CBSMsg.SEIOPSVC_KEI_NO_ERR))` | Store error value |

#### Block 6.14 -- IF (billing optional service contract registration date/time error) (L12714)

Comment: オーダ情報作成ワーク登録.請求オプションサービス契約世代登録年月日時刻 => 請求オプションサービス契約世代登録年月日時刻のエラー情報返却 (Return error info for billing optional service contract generation registration datetime)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.SEIOPSVKEI_GADTM_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("seiopsvkei_gadtm_err")` | Check key not already present |
| 3 | SET | `inMap.put("seiopsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.SEIOPSVKEI_GADTM_ERR))` | Store error value |

#### Block 6.15 -- IF (additional information contract number error) (L12722)

Comment: オーダ情報作成ワーク登録.追加情報契約番号 => 追加情報契約番号のエラー情報返却 (Return error info for additional information contract number)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.HUKA_INF_KEI_NO_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("huka_inf_kei_no_err")` | Check key not already present |
| 3 | SET | `inMap.put("huka_inf_kei_no_err", template.getString(EKK1551D010CBSMsg.HUKA_INF_KEI_NO_ERR))` | Store error value |

#### Block 6.16 -- IF (additional information contract registration date/time error) (L12730)

Comment: オーダ情報作成ワーク登録.追加情報契約世代登録年月日時刻 => 追加情報契約世代登録年月日時刻のエラー情報返却 (Return error info for additional information contract generation registration datetime)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.HUKA_INF_KEI_GADTM_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("huka_inf_kei_gadtm_err")` | Check key not already present |
| 3 | SET | `inMap.put("huka_inf_kei_gadtm_err", template.getString(EKK1551D010CBSMsg.HUKA_INF_KEI_GADTM_ERR))` | Store error value |

#### Block 6.17 -- IF (pre-change service contract registration date/time error) (L12738)

Comment: オーダ情報作成ワーク登録.変更前サービス契約世代登録年月日時刻 => 変更前サービス契約世代登録年月日時刻のエラー情報返却 (Return error info for pre-change service contract generation registration datetime)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.CHBF_SVKEI_GADTM_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("chbf_svkei_gadtm_err")` | Check key not already present |
| 3 | SET | `inMap.put("chbf_svkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_SVKEI_GADTM_ERR))` | Store error value |

#### Block 6.18 -- IF (pre-change service detail registration date/time error) (L12746)

Comment: オーダ情報作成ワーク登録.変更前サービス契約内訳世代登録年月日時刻 => 変更前サービス契約内訳世代登録年月日時刻のエラー情報返却 (Return error info for pre-change service detail generation registration datetime)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.CHBF_SVKEIUW_GADTM_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("chbf_svkeiuw_gadtm_err")` | Check key not already present |
| 3 | SET | `inMap.put("chbf_svkeiuw_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_SVKEIUW_GADTM_ERR))` | Store error value |

#### Block 6.19 -- IF (pre-change equipment provider service contract registration date/time error) (L12754)

Comment: オーダ情報作成ワーク登録.変更前機器提供サービス契約世代登録年月日時刻 => 変更前機器提供サービス契約世代登録年月日時刻のエラー情報返却 (Return error info for pre-change equipment provider service contract generation registration datetime)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.CHBF_KKTSVKEI_GADTM_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("chbf_kktsvkei_gadtm_err")` | Check key not already present |
| 3 | SET | `inMap.put("chbf_kktsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_KKTSVKEI_GADTM_ERR))` | Store error value |

#### Block 6.20 -- IF (pre-change optional service contract registration date/time error) (L12762)

Comment: オーダ情報作成ワーク登録.変更前オプションサービス契約世代登録年月日時刻 => 変更前オプションサービス契約世代登録年月日時刻のエラー情報返却 (Return error info for pre-change optional service contract generation registration datetime)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.CHBF_OPSVKEI_GADTM_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("chbf_opsvkei_gadtm_err")` | Check key not already present |
| 3 | SET | `inMap.put("chbf_opsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_OPSVKEI_GADTM_ERR))` | Store error value |

#### Block 6.21 -- IF (pre-change subcontract optional contract registration date/time error) (L12770)

Comment: オーダ情報作成ワーク登録.変更前サブオプション契約世代登録年月日時刻 => 変更前サブオプション契約世代登録年月日時刻のエラー情報返却 (Return error info for pre-change subcontract optional contract generation registration datetime)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.CHBF_SBOPSVKEI_GADTM_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("chbf_sbopsvkei_gadtm_err")` | Check key not already present |
| 3 | SET | `inMap.put("chbf_sbopsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_SBOPSVKEI_GADTM_ERR))` | Store error value |

#### Block 6.22 -- IF (pre-change billing optional contract registration date/time error) (L12778)

Comment: オーダ情報作成ワーク登録.変更前請求オプション契約世代登録年月日時刻 => 変更前請求オプション契約世代登録年月日時刻のエラー情報返却 (Return error info for pre-change billing optional contract generation registration datetime)

| # | Type | Code |
|---|------|------|
| 1 | R | `!template.isNull(EKK1551D010CBSMsg.CHBF_SEIOPSVKEI_GADTM_ERR)` | Check CBS field non-null |
| 2 | IF | `!inMap.containsKey("chbf_seiopsvkei_gadtm_err")` | Check key not already present |
| 3 | SET | `inMap.put("chbf_seiopsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_SEIOPSVKEI_GADTM_ERR))` | Store error value |

### Block 7 -- RETURN (L12787)

Return the populated parameter object to the caller.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return param` | Return param with control map and work map populated |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `editErrorInfo_EKK1551D010CBS` | Method | Error info extraction for order information creation work registration CBS response |
| `EKK1551D010CBS` | CBS Code | Order Information Creation Work Registration Circuit Business Service -- CBS that creates/registers order data in the SOD system |
| SOD | Acronym | Service Order Data -- telecom order fulfillment entity representing service orders |
| `HAKKOSODCCWORKMAP` | Constant | Key "HakkoSODCCWORK" -- per-session HashMap storing accumulated error field values from CBS responses |
| `STATUS` | CBS Field | CBS response status code (integer) -- 0 = success, higher values indicate increasing error severity |
| `returnCode` | Parameter | Service component return code -- non-zero indicates service-level failure |
| `templateStatus` | Variable | Effective error status from CBS template, possibly overridden by returnCode |
| `bpStatus` | Variable | Prior Business Program error status stored in the control map |
| `ODR_HAKKO_JOKEN_NO_ERR` | CBS Field | Order release condition number error -- error in the conditions for releasing an order |
| `ODR_NAIYO_CD_ERR` | CBS Field | Order content code error -- classifies the type of order (FTTH registration, Mail change, etc.) |
| `SVC_KEI_NO_ERR` | CBS Field | Service contract number error -- the primary service contract line item identifier |
| `SVKEI_GADTM_ERR` | CBS Field | Service contract generation registration datetime error -- timestamp of when the service contract was registered |
| `SVC_KEI_UCWK_NO_ERR` | CBS Field | Service detail number error -- identifier for a service contract detail/line item |
| `SVKEIUW_GADTM_ERR` | CBS Field | Service detail generation registration datetime error -- timestamp of when the service detail was registered |
| `KKTK_SVC_KEI_NO_ERR` | CBS Field | Equipment provider service contract number error -- contract number for equipment provider services |
| `KKTSVKEI_GADTM_ERR` | CBS Field | Equipment provider service contract generation registration datetime error -- timestamp for equipment provider contract |
| `OP_SVC_KEI_NO_ERR` | CBS Field | Optional service contract number error -- contract number for optional add-on services |
| `OPSVKEI_GADTM_ERR` | CBS Field | Optional service contract generation registration datetime error -- timestamp for optional service contract |
| `SBOP_SVC_KEI_NO_ERR` | CBS Field | Subcontract optional service contract number error -- contract number for subcontracted optional services |
| `SBOPSVKEI_GADTM_ERR` | CBS Field | Subcontract optional service contract generation registration datetime error -- timestamp for subcontract optional contract |
| `SEIOPSVC_KEI_NO_ERR` | CBS Field | Billing optional service contract number error -- contract number for billing-related optional services |
| `SEIOPSVKEI_GADTM_ERR` | CBS Field | Billing optional service contract generation registration datetime error -- timestamp for billing optional contract |
| `HUKA_INF_KEI_NO_ERR` | CBS Field | Additional information contract number error -- contract number for supplementary information services |
| `HUKA_INF_KEI_GADTM_ERR` | CBS Field | Additional information contract generation registration datetime error -- timestamp for additional info contract |
| `CHBF_SVKEI_GADTM_ERR` | CBS Field | Pre-change service contract generation registration datetime error -- timestamp of service contract before modification |
| `CHBF_SVKEIUW_GADTM_ERR` | CBS Field | Pre-change service detail generation registration datetime error -- timestamp of service detail before modification |
| `CHBF_KKTSVKEI_GADTM_ERR` | CBS Field | Pre-change equipment provider service contract generation registration datetime error -- timestamp before modification |
| `CHBF_OPSVKEI_GADTM_ERR` | CBS Field | Pre-change optional service contract generation registration datetime error -- timestamp before modification |
| `CHBF_SBOPSVKEI_GADTM_ERR` | CBS Field | Pre-change subcontract optional contract generation registration datetime error -- timestamp before modification |
| `CHBF_SEIOPSVKEI_GADTM_ERR` | CBS Field | Pre-change billing optional contract generation registration datetime error -- timestamp before modification |
| `RETURN_MESSAGE_XXXX` | Constant | Error message text key in JCMAPLConstMgr -- formatted as "RETURN_MESSAGE_" + 4-digit zero-padded status |
| FTTH | Business term | Fiber To The Home -- fiber-optic broadband internet service (a common order content type in this system) |
| CAANMsg | Type | Fujitsu message class -- structured message container for CBS request/response data with typed getters/setters |
| IRequestParameterReadWrite | Type | Business data read/write interface -- carries work context, control map data, and data map between screen and CBS layers |
| JCMAPLConstMgr | Class | Global constant message manager -- provides localized text lookup via string keys (e.g., RETURN_MESSAGE_XXXX) |
| SCControlMapKeys | Class | Control map key constants -- defines keys like RETURN_CODE and RETURN_MESSAGE for the control map |
| CCException | Exception | Common Component exception -- wrapper thrown by business programs when errors occur |
| SCCallException | Exception | Service Component Call exception -- contains the CBS return code and status for error propagation |
| TemplateErrorUtil | Class | Error template utility -- builds error display info lists from control map error data for screen presentation |
| HakkoSODCCWORK | Data key | Work HashMap key -- stores per-field error values accumulated from CBS responses for order creation work |
| 変更前 (Henkou-mae) | Japanese term | Pre-change / before modification -- refers to service contract data prior to a change/cancellation operation |
| オーダ (Oda) | Japanese term | Order -- customer service order in the telecom fulfillment domain |
| 発行 (Hakko) | Japanese term | Issuance/Release -- creation and dispatch of an order |
| キャンセル (Kyanseru) | Japanese term | Cancellation -- termination of an existing order or service contract |
| 住所変更 (Juusho Henkou) | Japanese term | Address change -- the business process that triggers SOD cancellation when a customer moves |
