# Business Logic — JFUAddKktSvcKeiCC.editErrInfoEKK0341D01002() [741 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JFUAddKktSvcKeiCC` |
| Layer | CC / Common Component (cross-cutting service-layer utility) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JFUAddKktSvcKeiCC.editErrInfoEKK0341D01002()

This method is the central error-information aggregation and routing handler for the **Equipment Provisioning Service Contract Registration** screen (EKK0341). It receives error results from the CBS (Central Business System) return, determines which error status message should be presented to the user, and extracts every non-null error field from the CBS response template into a working HashMap for downstream screen display. Specifically, it first resolves the effective error status by comparing the CBS-provided status against a screen-level priority (bpStatus); if the CBS status is higher-priority (numerically greater), it writes the corresponding status code and localized error message back into the param control map. It then iterates through **50+ individual error fields** covering service codes, customer and delivery addresses (both delivery and installation destinations), device identifiers, contractual identifiers, financial codes (course, plan, deposit, penalty), and optional service metadata -- copying each non-null field from the CBS `CAANMsg` template into the `EKK0341D010Tel` HashMap only if the target key does not already exist (preserving earlier-set values). This method implements a **delegation and builder pattern**: it delegates message-catalog lookup to `JCMAPLConstMgr`, reads structured error data from the CBS message template, and builds the error payload HashMap incrementally through individual field-level condition checks.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editErrInfoEKK0341D01002 params"])

    START --> GET_STATUS["Get template STATUS"]
    GET_STATUS --> CHECK_RETURN["returnCode != 0?"]

    CHECK_RETURN --> |"yes"| SET_STATUS_9000["Set templateStatus = 9000"]
    CHECK_RETURN --> |"no"| SKIP_9000["Keep templateStatus unchanged"]
    SET_STATUS_9000 --> CHECK_MSG
    SKIP_9000 --> CHECK_MSG

    CHECK_MSG["Check message catalog for RETURN_MESSAGE status"]
    CHECK_MSG --> |"msg is null"| SET_STATUS_0["Set templateStatus = 0"]
    CHECK_MSG --> |"msg exists"| KEEP_STATUS["Keep templateStatus"]
    SET_STATUS_0 --> GET_BP_STATUS
    KEEP_STATUS --> GET_BP_STATUS

    GET_BP_STATUS["Get bpStatus from param control map"]
    GET_BP_STATUS --> CHECK_BP_NULL["bpStatus null?"]
    CHECK_BP_NULL --> |"yes"| SET_BP_NEG1["Set bpStatus = -1"]
    CHECK_BP_NULL --> |"no"| PARSE_BP_STATUS["Parse bpStatus from RETURN_CODE"]
    SET_BP_NEG1 --> CHECK_STATUS_GT
    PARSE_BP_STATUS --> CHECK_STATUS_GT

    CHECK_STATUS_GT["templateStatus > bpStatus?"]
    CHECK_STATUS_GT --> |"yes"| SET_ERROR_INFO["Set RETURN_CODE and RETURN_MESSAGE"]
    CHECK_STATUS_GT --> |"no"| SKIP_ERROR_INFO["Skip error info"]
    SET_ERROR_INFO --> GET_INMAP
    SKIP_ERROR_INFO --> GET_INMAP

    GET_INMAP["Get inMap from param.getData EKK0341D010Tel"]
    GET_INMAP --> EXTRACT_ERRORS["Extract 50+ error fields into inMap"]
    EXTRACT_ERRORS --> FINAL_RETURN["Return param"]
    FINAL_RETURN --> END(["end"])
```

**Step-by-step processing description:**

1. **Retrieve template STATUS (Line 4871):** The method reads the `STATUS` field from the CBS response template (`EKK0341D010CBSMsg.STATUS`) as an integer. This integer encodes the CBS-side error severity.

2. **Override returnCode logic (Line 4873-4875):** If the caller passed a non-zero `returnCode`, it forces `templateStatus` to `9000`. The constant `RETURN_MESSAGE_FORMAT` resolves to `"%1$04d"` and `RETURN_MESSAGE_STRING` resolves to `"RETURN_MESSAGE_"` (from `JCMAPLConstMgr`), used later for message catalog lookup.

3. **Validate status against message catalog (Line 4876-4879):** Constructs a key `RETURN_MESSAGE_` + formatted status string (e.g., `RETURN_MESSAGE_9000`) and checks if a corresponding localized message exists via `JCMAPLConstMgr.getString()`. If no message exists for the status, resets `templateStatus` to `0` (meaning "no error" or "success"), effectively filtering out unknown or unconfigured status codes.

4. **Retrieve screen-level bpStatus (Line 4882-4889):** Gets the `RETURN_CODE` from the param control map. If null, initializes `bpStatus` to `-1`. Otherwise, parses the string value as an integer. This represents the highest error priority already recorded on the screen (the "current worst status").

5. **Priority comparison (Line 4891-4895):** If `templateStatus > bpStatus`, the CBS error is more severe than anything previously recorded. In that case, writes the status code string (zero-padded 4-digit) and the localized error message back into the param control map under `RETURN_CODE` and `RETURN_MESSAGE` keys. This ensures the user always sees the most severe error.

6. **Retrieve inMap (Line 4897):** Retrieves the HashMap stored under the key `"EKK0341D010Tel"` from param. This HashMap is the working area where all error field values are collected.

7. **Extract error fields (Lines 4900-5599):** For each of the 50+ error fields, the method follows a consistent pattern:
   - Check if the field is non-null in the CBS template (`!template.isNull(EKK0341D010CBSMsg.XXX_ERR)`)
   - If non-null and the inMap does not already contain the key, copy the string value from the template to the inMap
   - This is an idempotent operation: fields already present in inMap are not overwritten, allowing earlier processing to take priority

8. **Return (Line 5606):** Returns the modified `param` object with updated control map data and enriched error HashMap.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The request parameter container carrying screen-level data including control map entries (return code, error info, status), and the working HashMap for the EKK0341 screen (`EKK0341D010Tel`). It flows from the caller screen through the BP layer and carries back the error status and field-level error data for UI rendering. |
| 2 | `template` | `CAANMsg` | The CBS response message object containing structured error data fields. Each field (e.g., `KKTK_SVC_CD_ERR`, `SVC_KEI_NO_ERR`) holds an error value returned by the central business system after processing the equipment provisioning service contract registration request. Fields are accessed via `isNull()` and `getString()` checks. |
| 3 | `returnCode` | `int` | A numeric flag indicating the overall result code from the CBS call. Value `0` means no error from the caller's perspective; any non-zero value forces the template status to `9000`, indicating a critical/fatal error that must be surfaced to the user regardless of the CBS-side status value. |
| 4 | `fixedText` | `String` | Reserved parameter for fixed error text substitution. It is accepted as a parameter but is **not used** within this method body (likely a vestigial parameter for future extensibility or inherited from a template method pattern). |

### External State Read

| Source | Access Pattern | Description |
|--------|----------------|-------------|
| `JCMAPLConstMgr` | `getString()` | Static message catalog manager used to look up localized error messages by key. The keys follow the pattern `RETURN_MESSAGE_` + formatted status code (e.g., `RETURN_MESSAGE_0001`). |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JACBatCommon.isNull` | JACBatCommon | - | Calls `isNull` in `JACBatCommon` |
| - | `JACbatRknBusinessUtil.isNull` | JACbatRknBusiness | - | Calls `isNull` in `JACbatRknBusinessUtil` |
| - | `JCHbatSeikyKaknoBusinessUtil.isNull` | JCHbatSeikyKaknoBusiness | - | Calls `isNull` in `JCHbatSeikyKaknoBusinessUtil` |
| - | `JBSbatACInsentetivePrcInfoSaksei.isNull` | JBSbatACInsentetivePrcInfoSaksei | - | Calls `isNull` in `JBSbatACInsentetivePrcInfoSaksei` |
| - | `JBSbatAKCHSeikyYsoInfMake.isNull` | JBSbatAKCHSeikyYsoInfMake | - | Calls `isNull` in `JBSbatAKCHSeikyYsoInfMake` |
| R | `JBSbatDKNyukaFinAdd.getData` | JBSbatDKNyukaFinAdd | - | Calls `getData` in `JBSbatDKNyukaFinAdd` |
| R | `JBSbatFUCaseFileRnkData.getString` | JBSbatFUCaseFileRnkData | - | Calls `getString` in `JBSbatFUCaseFileRnkData` |
| R | `JBSbatFUMoveNaviData.getString` | JBSbatFUMoveNaviData | - | Calls `getString` in `JBSbatFUMoveNaviData` |
| R | `JBSbatZMAdDataSet.getString` | JBSbatZMAdDataSet | - | Calls `getString` in `JBSbatZMAdDataSet` |
| R | `JFUeoTelOpTransferCC.getData` | JFUeoTelOpTransferCC | - | Calls `getData` in `JFUeoTelOpTransferCC` |
| R | `JFUTransferCC.getData` | JFUTransferCC | - | Calls `getData` in `JFUTransferCC` |
| R | `JFUTransferListToListCC.getData` | JFUTransferListToListCC | - | Calls `getData` in `JFUTransferListToListCC` |
| R | `JESC0101B010TPMA.getString` | JESC0101B010TPMA | - | Calls `getString` in `JESC0101B010TPMA` |
| R | `JESC0101B020TPMA.getString` | JESC0101B020TPMA | - | Calls `getString` in `JESC0101B020TPMA` |
| R | `KKW12701SFLogic.getData` | KKW12701SFLogic | - | Calls `getData` in `KKW12701SFLogic` |

### Method-specific calls within editErrInfoEKK0341D01002:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `template.getInt(EKK0341D010CBSMsg.STATUS)` | EKK0341D010CBS | - | Reads the CBS return status code from the template message. This encodes the severity of the CBS-side result. |
| R | `JCMAPLConstMgr.getString(key)` | JCMAPLConstMgr | - | Looks up a localized error message from the message catalog by key. Used to resolve `RETURN_MESSAGE_{status}` to a user-facing string. |
| R | `param.getControlMapData(key)` | - | - | Reads the screen-level return code and error info from the control map. Reads the existing error priority. |
| W | `param.setControlMapData(key, value)` | - | - | Writes the resolved return code status and localized error message back to the control map for UI display. |
| R | `param.getData("EKK0341D010Tel")` | - | - | Retrieves the working HashMap (Tel area) for the EKK0341 screen from the parameter container. |
| W | `template.isNull(field)` | EKK0341D010CBS | - | Checks whether each error field is populated in the CBS response template. Used as a guard before reading. |
| R | `template.getString(field)` | EKK0341D010CBS | - | Reads the error field value from the CBS response. Called only after `isNull()` check confirms non-null. |
| R/W | `inMap.containsKey(key)` | - | - | Checks whether the error key has already been set in the working HashMap. Used for idempotency. |
| W | `inMap.put(key, value)` | - | - | Writes the error field value into the working HashMap for downstream screen processing. Called once per non-null field. |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 2 methods.
Terminal operations from this method: `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Method: `JFUAddKktSvcKeiCC.editOutEKK0341D01002()` | `editOutEKK0341D01002` -> `editErrInfoEKK0341D01002(param, template, returnCode, fixedText)` | `isNull` [-], `getString` [R], `setControlMapData` [W] |
| 2 | Method: `JFUAddSvcKeiNetOpCC.callServiceContractNetOp` | `callServiceContractNetOp` -> `editErrInfoEKK0341D01002(param, template, returnCode, fixedText)` | `isNull` [-], `getString` [R], `setControlMapData` [W] |

**Caller descriptions:**
- **`JFUAddKktSvcKeiCC.editOutEKK0341D01002()`** (Line 4842): This is the primary caller. It handles the "output" (submit/display) processing for the Equipment Provisioning Service Contract Registration screen (EKK0341). After performing CBS calls, it passes the template and returnCode to `editErrInfoEKK0341D01002` to populate error information before rendering the response screen.
- **`JFUAddSvcKeiNetOpCC.callServiceContractNetOp()`** (Line 5490): This is a secondary caller in the Optional Service Contract Net Operation module. It follows the same pattern -- after CBS calls, delegates error information population to this shared method.

## 6. Per-Branch Detail Blocks

### Block 1 -- IF (Status Override by returnCode) `(returnCode != 0)` (L4873)

> If the caller passed a non-zero returnCode, force the error status to 9000 (critical error). This is the first branch point that determines the starting error severity.

| # | Type | Code |
|---|------|------|
| 1 | SET | `templateStatus = 9000` // Critical error override when caller indicates failure |

**Block 1 is always evaluated; the else-path (returnCode == 0) is implicit:**

| # | Type | Code |
|---|------|------|
| 1 | KEEP | `templateStatus` remains as read from template (original CBS status) |

### Block 2 -- IF (Message Catalog Validation) `(JCMAPLConstMgr.getString(RETURN_MESSAGE_STRING + formatStatus) == null)` (L4876)

> Validates whether a localized message exists for the current templateStatus. If no message exists, resets status to 0 (success/no-error), filtering out unconfigured or garbage status codes.

Constant values:
- `RETURN_MESSAGE_STRING` = `"RETURN_MESSAGE_"` (from `JCMAPLConstMgr` pattern)
- `RETURN_MESSAGE_FORMAT` = `"%1$04d"` (zero-padded 4-digit integer format)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `String.format(RETURN_MESSAGE_FORMAT, templateStatus)` // e.g., "9000" |
| 2 | CALL | `JCMAPLConstMgr.getString("RETURN_MESSAGE_" + "9000")` // Catalog lookup |
| 3 | SET | `templateStatus = 0` // Reset to no-error if catalog returns null |

**Block 2 else-path (message found, keep status):**

| # | Type | Code |
|---|------|------|
| 1 | KEEP | `templateStatus` unchanged |

### Block 3 -- IF (bpStatus Null Check) `(obj == null)` (L4884)

> Checks whether the screen-level return code has already been set in the control map. If null, initializes priority to -1 so the CBS status will always take precedence.

| # | Type | Code |
|---|------|------|
| 1 | SET | `obj = param.getControlMapData(SCControlMapKeys.RETURN_CODE)` // Read existing screen return code |
| 2 | SET | `bpStatus = -1` // No prior error recorded |

**Block 3.1 -- ELSE (bpStatus non-null) (L4887)**

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

### Block 4 -- IF (Priority Comparison) `(templateStatus > bpStatus)` (L4891)

> The core priority decision: if the CBS error status is more severe than what the screen already recorded, update the control map with the new error status code and localized message.

**Block 4 then (CBS error is more severe) (L4891)**

| # | Type | Code |
|---|------|------|
| 1 | SET | `formatStatus = String.format(RETURN_MESSAGE_FORMAT, templateStatus)` // e.g., "0001" |
| 2 | CALL | `JCMAPLConstMgr.getString(RETURN_MESSAGE_STRING + formatStatus)` // Resolve localized message |
| 3 | SET | `message = result of catalog lookup` // Localized error text for user |
| 4 | EXEC | `param.setControlMapData(SCControlMapKeys.RETURN_CODE, formatStatus)` // Write status code |
| 5 | EXEC | `param.setControlMapData(SCControlMapKeys.RETURN_MESSAGE, message)` // Write message |

**Block 4 else-path (CBS error not more severe) (L4891)**

| # | Type | Code |
|---|------|------|
| 1 | SKIP | No action -- existing screen error status is retained |

### Block 5 -- Retrieval (inMap) (L4897)

> Gets the working HashMap for the EKK0341 screen error field collection area.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap = (HashMap) param.getData("EKK0341D010Tel")` // Working area for error fields |

### Block 6 -- Sequential Field Extraction

> The method contains 50+ sequential if-blocks, each following an identical pattern. Each block checks if a field is non-null in the CBS template and copies it to the inMap if not already present.

The following table summarizes all extracted error fields, their Japanese comments, and business meanings:

| Field Key | Template Constant | Japanese Comment | Business Meaning |
|-----------|-------------------|-----------------|------------------|
| `kktk_svc_cd_err` | `KKTK_SVC_CD_ERR` | 機器提供サービスコード (Equipment Provisioning Service Code) | Service type code identifying the type of equipment-provided service (e.g., FTTH, CATV, etc.) |
| `pcrs_cd_err` | `PCRS_CD_ERR` | 料金コースコード (Fee Course Code) | Billing course code specifying the pricing plan for the service |
| `pplan_cd_err` | `PPLAN_CD_ERR` | 料金プランコード (Fee Plan Code) | Specific billing plan code within a course |
| `kktk_sbt_cd_err` | `KKTK_SBT_CD_ERR` | 機器提供種別コード (Equipment Provision Type Code) | Classification of the provisioning type (new, change, etc.) |
| `hdd_capa_cd_err` | `HDD_CAPA_CD_ERR` | HDD容量コード (HDD Capacity Code) | Hard disk drive capacity classification code |
| `svc_use_sta_kibo_ymd_err` | `SVC_USE_STA_KIBO_YMD_ERR` | サービス利用開始希望年月日 (Service Usage Start Desired Date) | Customer's desired service activation date |
| `rsv_tsta_kibo_ymd_err` | `RSV_TSTA_KIBO_YMD_ERR` | 予約適用開始希望年月日 (Reservation Application Start Desired Date) | Desired date for applying a reservation/deferred activation |
| `kibo_maker_cd_err` | `KIBO_MAKER_CD_ERR` | 希望メーカーコード (Desired Manufacturer Code) | Customer's preferred equipment manufacturer |
| `hambai_sbt_cd_err` | `HAMBAI_SBT_CD_ERR` | 販売種別コード (Sales Type Code) | Sales channel/type classification |
| `tsushin_kiki_set_cd_err` | `TSUSHIN_KIKI_SET_CD_ERR` | 通信機器セットコード (Communication Equipment Set Code) | Bundle/package of communication equipment |
| `taknkiki_sbt_cd_err` | `TAKNKIKI_SBT_CD_ERR` | 自宅機器種別コード (Home Equipment Type Code) | Type of home-end equipment (e.g., ONT, router) |
| `taknkiki_model_cd_err` | `TAKNKIKI_MODEL_CD_ERR` | 自宅機器型式コード (Home Equipment Model Code) | Specific model code of home equipment |
| `taknkiki_sethin_model_cd_err` | `TAKNKIKI_SETHIN_MODEL_CD_ERR` | 自宅機器セット品種コード (Home Equipment Set Product Code) | Model code for bundled home equipment sets |
| `huzokuhin_sbt_cd_err` | `FUZOKUHIN_SBT_CD_ERR` | 付属品种別コード (Accessory Type Code) | Type of accessory included with equipment |
| `kiki_stc_saki_place_no_err` | `KIKI_STC_SAKI_PLACE_NO_ERR` | 機器設置先場所番号 (Equipment Installation Place Number) | Location number at the installation site |
| `svc_kei_no_err` | `SVC_KEI_NO_ERR` | サービス契約番号 (Service Contract Number) | Unique service contract identifier |
| `svc_kei_ucwk_no_err` | `SVC_KEI_UCWK_NO_ERR` | サービス契約内容番号 (Service Contract Detail Number) | Detailed line-item number within a service contract |
| `svc_kei_kaisen_ucwk_no_err` | `SVC_KEI_KAISEN_UCWK_NO_ERR` | サービス契約回線内容番号 (Service Contract Line Detail Number) | Line-level detail number for service contract |
| `op_svc_kei_no_err` | `OP_SVC_KEI_NO_ERR` | オプションサービス契約番号 (Optional Service Contract Number) | Identifier for optional service add-on contracts |
| `sysid_err` | `SYSID_ERR` | SYSID | System ID of the equipment |
| `mskm_dtl_no_err` | `MSKM_DTL_NO_ERR` | 申込明細番号 (Application Detail Number) | Detail number from the service application form |
| `link_stb_flg_err` | `LINK_STB_FLG_ERR` | リンクSTBフラグ (Link STB Flag) | Flag indicating whether a set-top box is linked |
| `kiki_soryo_um_err` | `KIKI_SORYO_UM_ERR` | 機器送料有無 (Equipment Delivery Charge Existence) | Whether delivery charges apply |
| `kiki_soryo_saksei_ymd_err` | `KIKI_SORYO_SAKSEI_YMD_ERR` | 機器送料金作成年月日 (Equipment Delivery Charge Creation Date) | Date the delivery charge was created |
| `kiki_sohus_nm_err` | `KIKI_SOHUS_NM_ERR` | 機器送付先名 (Equipment Delivery Destination Name) | Name of the person receiving the equipment |
| `kiki_sohus_kana_err` | `KIKI_SOHUS_KANA_ERR` | 機器送付先カナ名 (Equipment Delivery Destination Kana Name) | Kana (phonetic) name of the delivery recipient |
| `kiki_sohus_ad_cd_err` | `KIKI_SOHUS_AD_CD_ERR` | 機器送付先住所コード (Equipment Delivery Destination Address Code) | Address code for equipment delivery |
| `kiki_sohus_pcd_err` | `KIKI_SOHUS_PCD_ERR` | 機器送付先電話番号 (Equipment Delivery Destination Postal Code) | Postal code of the delivery address |
| `kiki_sohus_state_nm_err` | `KIKI_SOHUS_STATE_NM_ERR` | 機器送付先都道府県名 (Equipment Delivery Destination Prefecture Name) | Prefecture of the delivery address |
| `kiki_sohus_city_nm_err` | `KIKI_SOHUS_CITY_NM_ERR` | 機器送付先市区町村名 (Equipment Delivery Destination City/Town/Village Name) | City/town/village of the delivery address |
| `kiki_sohus_oaztsu_nm_err` | `KIKI_SOHUS_OAZTSU_NM_ERR` | 機器送付先大字通名称 (Equipment Delivery Destination District-Street Name) | District and street name for delivery address |
| `kiki_sohus_azcho_nm_err` | `KIKI_SOHUS_AZCHO_NM_ERR` | 機器送付先字丁目名 (Equipment Delivery Destination Block-Cho Name) | Block and cho-level address component |
| `kiki_sohus_bnchigo_err` | `KIKI_SOHUS_BNCHIGO_ERR` | 機器送付先番地号 (Equipment Delivery Destination Lot Number) | Lot/banchi number in the delivery address |
| `kiki_sohus_adrttm_err` | `KIKI_SOHUS_ADRTTM_ERR` | 機器送付先住所補記・建物名 (Equipment Delivery Destination Address Supplementary/Building Name) | Building name in the delivery address |
| `kiki_sohus_adrrm_err` | `KIKI_SOHUS_ADRRM_ERR` | 機器送付先住所補記・部屋番号 (Equipment Delivery Destination Room Number) | Room number in the delivery address |
| `kiki_sohus_telno_err` | `KIKI_SOHUS_TELNO_ERR` | 機器送付先電話番号 (Equipment Delivery Destination Phone Number) | Phone number of the delivery recipient |
| `mansion_bukken_no_err` | `MANSION_BUKKEN_NO_ERR` | マンション物件番号 (Mansion Property Number) | Property identifier for apartment/mansion deliveries |
| `kiki_sohus_ksh_ad_sai_flg_err` | `KIKI_SOHUS_KSH_AD_SAI_FLG_ERR` | 機器送付先_契約者住所差異フラグ (Delivery Destination Contract Holder Address Mismatch Flag) | Flag indicating delivery address differs from contract holder address |
| `kiki_shs_kbt_shitei_flg_err` | `KIKI_SHS_KBT_SHITEI_FLG_ERR` | 機器送付先個別指定フラグ (Equipment Delivery Individual Designation Flag) | Flag for individually specified delivery instructions |
| `kiki_shs_hsk_cd_1_err` | `KIKI_SHS_HSK_CD_1_ERR` | 機器送付先補足コード1 (Equipment Delivery Supplementary Code 1) | Supplementary code 1 for delivery |
| `kiki_shs_hsk_cd_2_err` | `KIKI_SHS_HSK_CD_2_ERR` | 機器送付先補足コード2 (Equipment Delivery Supplementary Code 2) | Supplementary code 2 for delivery |
| `kiki_shs_hsk_memo_err` | `KIKI_SHS_HSK_MEMO_ERR` | 機器送付先補足メモ (Equipment Delivery Supplementary Memo) | Additional memo for delivery |
| `kiki_stc_saki_nm_err` | `KIKI_STC_SAKI_NM_ERR` | 機器設置先名 (Equipment Installation Destination Name) | Name at the installation site |
| `kiki_stc_saki_kana_err` | `KIKI_STC_SAKI_KANA_ERR` | 機器設置先カナ名 (Equipment Installation Destination Kana Name) | Kana name at the installation site |
| `kiki_stc_saki_ad_cd_err` | `KIKI_STC_SAKI_AD_CD_ERR` | 機器設置先住所コード (Equipment Installation Destination Address Code) | Address code for installation site |
| `kiki_stc_saki_pcd_err` | `KIKI_STC_SAKI_PCD_ERR` | 機器設置先電話番号 (Equipment Installation Destination Phone Number) | **Correction:** 機器設置先郵便番号 (Installation Destination Postal Code) | Postal code of installation site |
| `kiki_stc_saki_state_nm_err` | `KIKI_STC_SAKI_STATE_NM_ERR` | 機器設置先都道府県名 (Equipment Installation Destination Prefecture Name) | Prefecture of installation site |
| `kiki_stc_saki_city_nm_err` | `KIKI_STC_SAKI_CITY_NM_ERR` | 機器設置先市区町村名 (Equipment Installation Destination City/Town/Village Name) | City/town/village of installation site |
| `kiki_stc_saki_oaztsu_nm_err` | `KIKI_STC_SAKI_OAZTSU_NM_ERR` | 機器設置先大字通名称 (Equipment Installation Destination District-Street Name) | District and street name at installation |
| `kiki_stc_saki_azcho_nm_err` | `KIKI_STC_SAKI_AZCHO_NM_ERR` | 機器設置先字丁目名 (Equipment Installation Destination Block-Cho Name) | Block-cho component at installation |
| `kiki_stc_saki_bnchigo_err` | `KIKI_STC_SAKI_BNCHIGO_ERR` | 機器設置先番地号 (Equipment Installation Destination Lot Number) | Lot number at installation site |
| `kiki_stc_saki_adrttm_err` | `KIKI_STC_SAKI_ADRTTM_ERR` | 機器設置先住所補記・建物名 (Installation Destination Address Supplementary/Building Name) | Building name at installation site |
| `kiki_stc_saki_adrrm_err` | `KIKI_STC_SAKI_ADRRM_ERR` | 機器設置先住所補記・部屋番号 (Installation Destination Room Number) | Room number at installation site |
| `kiki_stc_sk_ksh_ad_sai_flg_err` | `KIKI_STC_SK_KSH_AD_SAI_FLG_ERR` | 機器設置先_契約者住所差異フラグ (Installation Destination Contract Holder Address Mismatch Flag) | Flag for mismatch between installation and contract address |
| `kiki_stc_sk_telno_err` | `KIKI_STC_SK_TELNO_ERR` | 機器設置先電話番号 (Equipment Installation Destination Phone Number) | Phone number at installation site |
| `kiki_sts_kkk_seiri_chu_flg_err` | `KIKI_STS_KKK_SEIRI_CHU_FLG_ERR` | 機器設置先区画整理中フラグ (Equipment Installation Parcel Reorganization Status Flag) | Flag for parcel reorganization status |
| `kiki_sts_hsk_cd_1_err` | `KIKI_STS_HSK_CD_1_ERR` | 機器設置先補足コード1 (Equipment Installation Supplementary Code 1) | Supplementary code 1 for installation |
| `kiki_sts_hsk_cd_2_err` | `KIKI_STS_HSK_CD_2_ERR` | 機器設置先補足コード2 (Equipment Installation Supplementary Code 2) | Supplementary code 2 for installation |
| `kiki_sts_hsk_memo_err` | `KIKI_STS_HSK_MEMO_ERR` | 機器設置先補足メモ (Equipment Installation Supplementary Memo) | Memo for installation |
| `ftrial_kanyu_ymd_err` | `FTRIAL_KANYU_YMD_ERR` | 試用加入年月日 (Trial Subscription Date) | Date of trial subscription start |
| `honkanyu_ymd_err` | `HONKANYU_YMD_ERR` | 本加入年月日 (Full Subscription Date) | Date of full subscription activation |
| `honkanyu_iko_kigen_ymd_err` | `HONKANYU_IKO_KIGEN_YMD_ERR` | 本加入移行期限年月日 (Full Subscription Transition Deadline Date) | Deadline for transitioning from trial to full subscription |
| `hosho_cd_err` | `HOSHO_CD_ERR` | 保証コード (Guarantee/Warranty Code) | Warranty/guarantee code for the equipment |
| `hosho_staymd_err` | `HOSHO_STAYMD_ERR` | 保証開始年月日 (Warranty Start Date) | Start date of the warranty period |
| `pnlty_hassei_cd_err` | `PNLTY_HASSEI_CD_ERR` | 違約金発生コード (Penalty Occurrence Code) | Code indicating contract penalty conditions |
| `ido_div_err` | `IDO_DIV_ERR` | 異動区分 (Movement Classification) | Classification of equipment/service movement (new, change, etc.) |
| `cas_card_use_kyodak_ymd_err` | `CAS_CARD_USE_KYODAK_YMD_ERR` | CASカード使用許諾年月日 (CAS Card Usage Consent Date) | Date of consent for CAS card usage |
| `seiky_kei_no_err` | `SEIKY_KEI_NO_ERR` | 請求契約番号 (Billing Contract Number) | Contract number for billing purposes |
| `kiki_itens_mv_jssis_skcd_err` | `KIKI_ITENS_MV_JSSIS_SKCD_ERR` | 機器移転先移動実施者識別コード (Equipment Transfer Destination Mover ID Code) | Identifier for the mover handling equipment transfer |
| `haiso_req_shitei_ymd_err` | `HAISO_REQ_SHITEI_YMD_ERR` | 配送指定年月日 (Delivery Designated Date) | Date specified for delivery |
| `upd_dtm_bf_err` | `UPD_DTM_BF_ERR` | 更新年月日時分秒(更新前) (Update Timestamp Before) | Timestamp before the update operation |
| `kiki_seizo_no_err` | `KIKI_SEIZO_NO_ERR` | 機器製造番号 (Equipment Serial Number) | Manufacturing serial number of the device |
| `haiso_way_cd_err` | `HAISO_WAY_CD_ERR` | 配送方法コード (Delivery Method Code) | Method of delivery (standard, express, etc.) |
| `kiki_huka_info_cd_err` | `KIKI_HUKA_INFO_CD_ERR` | 機器付加情報コード (Equipment Additional Info Code) | Additional information code for the equipment |
| `taknkiki_ido_cd_err` | `TAKNKIKI_IDO_CD_ERR` | 自宅機器異動コード (Home Equipment Movement Code) | Code for home equipment movement/type change |
| `haiso_div_err` | `HAISO_DIV_ERR` | 配送区分 (Delivery Classification) | Delivery type classification |
| `ad_mi_fix_flg_err` | `AD_MI_FIX_FLG_ERR` | 住所未確定フラグ (Address Unconfirmed Flag) | Flag indicating address is not yet confirmed |
| `kiki_shs_ad_man_input_flg_err` | `KIKI_SHS_AD_MAN_INPUT_FLG_ERR` | 機器送付先住所手入力フラグ (Equipment Delivery Address Manual Input Flag) | Flag indicating delivery address was manually entered |

Each field follows this identical block structure:

```
Block N.M -- IF (!template.isNull(EKK0341D010CBSMsg.XXX_ERR)) (L{line})
  Block N.M.1 -- IF (!inMap.containsKey("xxx_err")) (L{line})
    W | inMap.put("xxx_err", template.getString(EKK0341D010CBSMsg.XXX_ERR)) // Copy CBS error value
```

This pattern repeats for all 50+ fields without variation, forming a systematic **field-level error extraction pipeline** where each field is independently validated and copied.

### Block 7 -- RETURN (L5606)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return param;` // Return the enriched parameter object with error data |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `kktk_svc_cd` | Field | Equipment Provisioning Service Code -- identifies the type of telecom service provided with equipment (FTTH, CATV, etc.) |
| `pcrs_cd` | Field | Fee Course Code -- billing course classification for the service |
| `pplan_cd` | Field | Fee Plan Code -- specific pricing plan within a course |
| `svc_kei_no` | Field | Service Contract Number -- unique identifier for a service contract |
| `svc_kei_ucwk_no` | Field | Service Contract Detail Number -- internal tracking ID for service contract line items |
| `svc_kei_kaisen_ucwk_no` | Field | Service Contract Line Detail Number -- line-level detail within a service contract |
| `op_svc_kei_no` | Field | Optional Service Contract Number -- identifier for optional service add-on |
| `kiki_sohus` | Field Prefix | Equipment Delivery -- refers to the delivery destination/address (送付先 = delivery destination) |
| `kiki_stc_saki` | Field Prefix | Equipment Installation -- refers to the installation destination/address (設置先 = installation destination) |
| `kiki_sts` | Field Prefix | Equipment Installation Status -- refers to installation site supplementary data |
| `kiki_shs` | Field Prefix | Equipment Delivery Supplementary -- supplementary codes for delivery destination |
| `taknkiki` | Field Prefix | Home Equipment -- end-user devices at the customer premises (自宅機器 = home equipment) |
| `HDD_CAPA` | Field | HDD Capacity Code -- hard disk drive capacity classification |
| `ftrial_kanyu` | Field | Trial Subscription -- temporary trial period before full subscription |
| `honkanyu` | Field | Full Subscription -- permanent active subscription (本加入 = full enrollment) |
| `hosho` | Field | Warranty/Guarantee -- equipment warranty/guarantee coverage |
| `pnlty_hassei` | Field | Penalty Occurrence -- contract penalty breach indicator |
| `ido_div` | Field | Movement Classification -- type of service/equipment change (new, port-in, change, etc.) |
| `cas_card` | Field | CAS Card -- customer authentication/identification smart card |
| `seiky_kei_no` | Field | Billing Contract Number -- contract identifier for billing/invoicing |
| `mskm_dtl_no` | Field | Application Detail Number -- detail number from the service application form |
| `link_stb` | Field | Linked Set-Top Box -- STB device linked to the service account |
| `huzokuhin` | Field | Accessory -- supplementary equipment/accessories bundled with main device |
| `SYSD` / `SYSID` | Field | System ID -- system-level equipment identifier |
| `EKK0341` | Screen Code | Equipment Provisioning Service Contract Registration screen -- the main registration screen for telecom service contracts with equipment |
| `CAANMsg` | Type | CBS Message Object -- the structured message container for CBS request/response data |
| `IRequestParameterReadWrite` | Type | Request Parameter Interface -- the parameter container for screen-to-screen data flow in the BP layer |
| `inMap` / `EKK0341D010Tel` | Variable | Working Error HashMap -- in-memory map storing all error field values for the EKK0341 screen |
| `templateStatus` | Variable | Effective CBS Error Status -- the resolved error status after returnCode override and catalog validation |
| `bpStatus` | Variable | BP-Level Error Priority -- the highest error status already recorded at the screen level |
| RETURN_MESSAGE_STRING | Constant | `"RETURN_MESSAGE_"` -- message catalog key prefix for localized error messages |
| RETURN_MESSAGE_FORMAT | Constant | `"%1$04d"` -- zero-padded 4-digit format string for status codes |
| 機器提供サービス | Business term | Equipment Provisioning Service -- telecom services where the provider supplies equipment (e.g., FTTH ONT) |
| 契約者住所差異 | Business term | Contract Holder Address Mismatch -- indicates delivery/installation address differs from the contract holder's registered address |
| 区画整理中 | Business term | Parcel Reorganization In Progress -- indicates the installation location is in an area undergoing land parcel reorganization |
| 試用加入 | Business term | Trial Subscription -- temporary service period before converting to full subscription |
| 本加入 | Business term | Full Subscription -- permanent active subscription following trial period |
| 違約金 | Business term | Contract Penalty -- financial penalty for contract breach or early termination |
| 異動 | Business term | Movement/Change -- classification of service equipment changes (port-in, change, new connection) |
| 移転 | Business term | Transfer/Relocation -- equipment transfer to a different location |
| 配送 | Business term | Delivery -- physical shipment of equipment to the customer |
| 保証 | Business term | Warranty/Guarantee -- equipment warranty coverage period and terms |
| 保証期間 | Business term | Warranty Period -- the duration of equipment warranty coverage |
| 家財 | Business term | Home Contents/Property -- in context, refers to home-end equipment and accessories |

---

*Document generated from source file: `source/koptBp/ejbModule/com/fujitsu/futurity/bp/custom/common/JFUAddKktSvcKeiCC.java`, lines 4868-5608 (741 LOC)*
