# Business Logic — JFUTelOptSvcMskmCmpCC.setSbopSvcKeiMskmData() [146 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JFUTelOptSvcMskmCmpCC` |
| Layer | CC/Common Component — shared business component used across telco order submission screens |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JFUTelOptSvcMskmCmpCC.setSbopSvcKeiMskmData()

This method registers sub-option service contract data during the eo光電話 (eo Fiber Phone) option package order submission process. It iterates over a list of service contract detail maps (`dataList`), filters each entry to process only sub-option subscription items (where `mskm_div` equals `"1"` and `svc_div` equals `"2"`), and then executes the appropriate service IF (SC) registration calls based on the current service contract status. Specifically, it always registers the base sub-option service contract (EKK0431D011), then conditionally executes a copy registration (EKK0431C010) when the service status is "Copy" (`"020"`), a copy completion call (EKK0431C030) when the status is "Complete" (`"030"`) or "Provision in progress" (`"100"`), and a service activation call (EKK0431C041) when the status is "Provision in progress" (`"100"`). The method acts as a routing/dispatch component, transforming raw input data into properly structured SC input parameters and collecting updated timestamps and contract numbers back into the caller's SOD (Service Order Data) mapping structure. It serves as a shared utility called by the telco option packaging registration CBS (JFUSetOptPackMskmCC.setSaveData and JFUTelOptSvcMskmCmpCC.setSaveData) as part of a multi-step order submission pipeline that also handles main option contracts, cancellations, and SOD mapping.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setSbopSvcKeiMskmData params"])
    START --> LOG_START["outDebugLog Start"]
    LOG_START --> GET_DATA["inMap = param.getData fixedText"]
    GET_DATA --> INIT["geneAddDtm = null"]
    INIT --> LOOP_START["For each dtlMap in dataList"]
    LOOP_START --> COND1["mskm_div != 1 or svc_div != 2"]
    COND1 -->|true| CONTINUE["continue skip"]
    COND1 -->|false| CHECK_OP_SVC["op_svc_kei_no is null"]
    CHECK_OP_SVC -->|true| GET_UPDATE_MAP["updateSODMap = getUpdateSODMap inMap"]
    GET_UPDATE_MAP --> GET_OP_MAP["updateSODopMap = updateSODMap get OP_SVC_CD"]
    GET_OP_MAP --> CHECK_OP_MAP["updateSODopMap not null and chaf_opsvkei_no not null"]
    CHECK_OP_MAP -->|true| PUT_OP_SVC["dtlMap put op_svc_kei_no chaf_opsvkei_no"]
    PUT_OP_SVC --> INIT_EKK0431D011["initData EKK0431D011"]
    CHECK_OP_MAP -->|false| INIT_EKK0431D011
    CHECK_OP_SVC -->|false| INIT_EKK0431D011
    INIT_EKK0431D011 --> MAP_EKK0431D011["setInMapEKK0431D011"]
    MAP_EKK0431D011 --> EXEC_EKK0431D011["executeSC EKK0431D011"]
    EXEC_EKK0431D011 --> GET_UPD_DTM["lastUpdDtm = getTemplateValue UPD_DTM"]
    GET_UPD_DTM --> GET_GENE_DTM["geneAddDtm = getTemplateValue GENE_ADD_DTM"]
    GET_GENE_DTM --> PUT_SBOP_SVC["dtlMap put sbop_svc_kei_no getTemplateValue"]
    PUT_SBOP_SVC --> GET_SVC_STAT["svcKeiUcwkStat = inMap.get EKK0161_SVC_KEI_UCWK_STAT"]
    GET_SVC_STAT --> COND_COPY["svcKeiUcwkStat = 020"]
    COND_COPY -->|yes| COPY_BRANCH["Copy branch EKK0431C010"]
    COPY_BRANCH --> INIT_C010["initData EKK0431C010"]
    INIT_C010 --> MAP_C010["setInMapEKK0431C010"]
    MAP_C010 --> EXEC_C010["executeSC EKK0431C010"]
    EXEC_C010 --> UPD_DTM_C010["lastUpdDtm = getTemplateValue UPD_DTM"]
    UPD_DTM_C010 --> GENE_DTM_C010["geneAddDtm = getTemplateValue GENE_ADD_DTM"]
    COND_COPY -->|no| COND_COMPLETE["svcKeiUcwkStat = 030 or 100"]
    COND_COMPLETE -->|yes| COMPLETE_BRANCH["Completion branch EKK0431C030"]
    COMPLETE_BRANCH --> INIT_C030["initData EKK0431C030"]
    INIT_C030 --> MAP_C030["setInMapEKK0431C030"]
    MAP_C030 --> EXEC_C030["executeSC EKK0431C030"]
    EXEC_C030 --> UPD_DTM_C030["lastUpdDtm = getTemplateValue UPD_DTM"]
    UPD_DTM_C030 --> GENE_DTM_C030["geneAddDtm = getTemplateValue GENE_ADD_DTM"]
    COND_COMPLETE -->|no| COND_ACTIVE["svcKeiUcwkStat = 100"]
    COND_ACTIVE -->|yes| ACTIVE_BRANCH["Active branch EKK0431C041"]
    ACTIVE_BRANCH --> INIT_C041["initData EKK0431C041"]
    INIT_C041 --> MAP_C041["setInMapEKK0431C041"]
    MAP_C041 --> EXEC_C041["executeSC EKK0431C041"]
    EXEC_C041 --> UPD_DTM_C041["lastUpdDtm = getTemplateValue UPD_DTM"]
    UPD_DTM_C041 --> GENE_DTM_C041["geneAddDtm = getTemplateValue GENE_ADD_DTM"]
    GENE_DTM_C041 --> CHECK_TEMP_ADDDTM["tempAddDtm is null"]
    CHECK_TEMP_ADDDTM -->|false| SET_GENE_ADD["geneAddDtm = tempAddDtm"]
    CHECK_TEMP_ADDDTM -->|true| SET_GENE_ADD
    SET_GENE_ADD --> UPDATE_SOD_MAP2["updateSODsbopMap = new HashMap"]
    UPDATE_SOD_MAP2 --> PUT_SBOP_SVC_KEI_NO["updateSODsbopMap put chaf_sbopsvkei_no"]
    PUT_SBOP_SVC_KEI_NO --> PUT_GENE_ADD_DTM["updateSODsbopMap put chaf_sbopsvkei_gene_add_dtm"]
    PUT_GENE_ADD_DTM --> FINAL_UPDATE_MAP["updateSODMap put sbop_svc_cd updateSODsbopMap"]
    FINAL_UPDATE_MAP --> LOOP_END["next dataList item"]
    LOOP_END --> COND_SKIP["more items"]
    COND_SKIP -->|yes| COND1
    COND_SKIP -->|no| LOG_END["outDebugLog End"]
    LOG_END --> RETURN["return lastUpdDtm"]
    RETURN --> END(["End"])
```

**Block-level business flow:**

1. **Initialization**: Start debug logging, retrieve the input data map from the request parameter, and initialize `geneAddDtm` to null.
2. **Iteration loop**: For each detail map in `dataList`, skip entries that are not sub-option subscription records (`mskm_div != "1"` or `svc_div != "2"`).
3. **Optional contract number resolution**: If the option service contract number (`op_svc_kei_no`) is not yet set, fetch the update SOD map and try to populate `op_svc_kei_no` from the existing contract number (`chaf_opsvkei_no`).
4. **Base sub-option contract registration (always executed)**: Initialize input data, map fields, execute the SC, then extract the updated timestamp, generation timestamp, and the newly assigned sub-option service contract number.
5. **Service status-driven conditional processing**: Read the service contract internal status (`EKK0161_SVC_KEI_UCWK_STAT`) and branch:
   - **Status "020" (Copy/照会)**: Execute the copy registration SC.
   - **Status "030" (Complete/締結済み) or "100" (Provision in progress/提供中)**: Execute the copy completion SC.
   - **Status "100" (Provision in progress/提供中)**: Execute the service activation SC, with additional logic to overwrite `geneAddDtm` if a non-null temporary generation timestamp is returned.
6. **SOD map update**: Create/update the post-update SOD sub-option map with the contract number and generation timestamp, store it in the main SOD map keyed by sub-option service code.
7. **Return**: End debug logging and return the latest `lastUpdDtm`.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session handle for the current user session; passed to SC execution to maintain session context and security credentials during service IF calls. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object that carries input data, template keys, and column lists for SC execution. Contains the unified data map (`inMap`) and is mutated by `initData` to prepare SC input parameters. |
| 3 | `fixedText` | `String` | Service message identifier (fixed text key) used to look up display messages, template IDs, and localized labels. Served as a data bucket key in `param.getData()` and `param.initData()`. |
| 4 | `dataList` | `ArrayList<HashMap>` | List of service contract detail maps to process. Each `HashMap` represents one line item of sub-option service contract data and contains fields such as `mskm_div`, `svc_div`, `op_svc_kei_no`, `sbop_svc_cd`, and `sbop_svc_kei_no`. Only entries where `mskm_div="1"` (subscription) and `svc_div="2"` (sub-option) are processed. |
| 5 | `lastUpdDtm` | `String` | Last update timestamp carried over from previous processing steps in the registration pipeline. Updated after each SC call and returned at the end for further processing by the caller. |

**Instance fields / external state referenced:**
- `JFUStrConst.CD00037_020` — Status code `"020"` for Copy (照会)
- `JFUStrConst.CD00037_030` — Status code `"030"` for Complete (締結済み)
- `JFUStrConst.CD00037_100` — Status code `"100"` for Provision in progress (提供中)
- `EKK0161_SVC_KEI_UCWK_STAT` — Key to read service contract internal work status from `inMap`
- `OP_SVC_CD` — Key to read option service code from `dtlMap` for SOD map lookup

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JFUTelOptSvcMskmCmpCC.outDebugLog` | — | — | Debug log output (Start/End markers) |
| R | `JFUTelOptSvcMskmCmpCC.getUpdateSODMap` | — | inMap (SOD) | Retrieves the post-update SOD (Service Order Data) map from the input data for contract number resolution. |
| - | `JFUBPCommon.isNull` | JFUBPCommon | — | Null-check utility for `HashMap` values (used for `op_svc_kei_no` and `chaf_opsvkei_no` checks). |
| - | `JFUBPCommon.initData` | JFUBPCommon | — | Initializes the request parameter with SC-specific template IDs and column lists. Called for each SC (EKK0431D011, EKK0431C010, EKK0431C030, EKK0431C041). |
| - | `JFUTelOptSvcMskmCmpCC.setInMapEKK0431D011` | — | — | Maps fields from `dtlMap` and `lastUpdDtm` into the request parameter for the sub-option service contract registration SC. |
| C | `JFUBPCommon.executeSC` (EKK0431D011) | EKK0431D011 | KK_T_SBOP_SVC_KEI (sub-option service contract table) | Registers the base sub-option service contract (sub-option service contract <phone> registration). Always executed for each qualifying detail item. |
| R | `JFUBPCommon.getTemplateValue` | — | SC template result | Extracts the updated timestamp, generation timestamp, and contract number from the SC execution result template. Called multiple times per SC. |
| R | `JFUBPCommon.getMaxTempTempleteKey` | — | SC template result | Retrieves the maximum temporary template key for accessing SC result values. Called in conjunction with `getTemplateValue`. |
| - | `JFUTelOptSvcMskmCmpCC.setInMapEKK0431C010` | — | — | Maps fields for the sub-option service contract copy SC (sub-option service contract <phone> copy). |
| C | `JFUBPCommon.executeSC` (EKK0431C010) | EKK0431C010 | KK_T_SBOP_SVC_KEI (sub-option service contract table) | Registers the copy of sub-option service contract when service status is "Copy" (`"020"`). |
| - | `JFUTelOptSvcMskmCmpCC.setInMapEKK0431C030` | — | — | Maps fields for the sub-option service contract copy completion SC (sub-option service contract <phone> copy completion). |
| C | `JFUBPCommon.executeSC` (EKK0431C030) | EKK0431C030 | KK_T_SBOP_SVC_KEI (sub-option service contract table) | Registers the copy completion when service status is "Complete" (`"030"`) or "Provision in progress" (`"100"`). |
| - | `JFUTelOptSvcMskmCmpCC.setInMapEKK0431C041` | — | — | Maps fields for the sub-option service contract activation SC (sub-option service contract <phone> usage start). |
| C | `JFUBPCommon.executeSC` (EKK0431C041) | EKK0431C041 | KK_T_SBOP_SVC_KEI (sub-option service contract table) | Registers the service activation (usage start) when service status is "Provision in progress" (`"100"`). |

**SC Code breakdown:**
- **EKK0431D011** — Sub-option service contract <phone> registration (サブオプションサービス契約<電話>登録) — Base contract creation.
- **EKK0431C010** — Sub-option service contract <phone> copy (サブオプションサービス契約<電話>照会) — Copy registration.
- **EKK0431C030** — Sub-option service contract <phone> copy completion (サブオプションサービス契約<電話>照会締結) — Copy completion.
- **EKK0431C041** — Sub-option service contract <phone> usage start (サブオプションサービス契約<電話>使用開始) — Service activation.

All SC calls follow the standard framework pattern: `initData` -> `setInMap*` (field mapping) -> `executeSC` (service IF execution) -> `getTemplateValue` (result extraction).

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 methods.
Terminal operations from this method: `outDebugLog` [-], `getUpdateSODMap` [R], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-], `getTemplateValue` [R], `getTemplateValue` [R], `getTemplateValue` [R], `getTemplateValue` [R], `getTemplateValue` [R], `getMaxTempTempleteKey` [R], `getMaxTempTempleteKey` [R], `getMaxTempTempleteKey` [R], `getMaxTempTempleteKey` [R], `getMaxTempTempleteKey` [R], `getTemplateValue` [R], `getTemplateValue` [R], `getTemplateValue` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: JFUSetOptPackMskmCC.setSaveData | `setSaveData` -> `setSbopSvcKeiMskmData(handle, param, fixedText, opSvcMskmList, lastUpdDtm)` | `executeSC(EKK0431D011) [C] KK_T_SBOP_SVC_KEI`, `executeSC(EKK0431C010) [C] KK_T_SBOP_SVC_KEI`, `executeSC(EKK0431C030) [C] KK_T_SBOP_SVC_KEI`, `executeSC(EKK0431C041) [C] KK_T_SBOP_SVC_KEI` |
| 2 | CBS: JFUTelOptSvcMskmCmpCC.setSaveData | `setSaveData` -> `setSbopSvcKeiMskmData(handle, param, fixedText, opSvcMskmList, lastUpdDtm)` | `executeSC(EKK0431D011) [C] KK_T_SBOP_SVC_KEI`, `executeSC(EKK0431C010) [C] KK_T_SBOP_SVC_KEI`, `executeSC(EKK0431C030) [C] KK_T_SBOP_SVC_KEI`, `executeSC(EKK0431C041) [C] KK_T_SBOP_SVC_KEI` |

**Call chain context:**
Both callers are registration CBS (Business Component Service) methods in the eo光電話 (eo Fiber Phone) option package order submission domain. They are called from screen controllers (e.g., KKSVC* type screens) as part of the order registration flow. The `setSaveData` method in both caller classes executes a sequence of registration steps: `setMskmDtlData` (order detail registration) -> `setOpSvcKeiMskmData` (option service contract registration) -> `setOpSvcKeiDeleData` (option service contract cancellation) -> `setSbopSvcKeiMskmData` (sub-option service contract registration) -> `setSbopSvcKeiDeleData` (sub-option service contract cancellation) -> `setSODMapping` (SOD mapping creation) -> `setTelSelOptPackMapping` (telco select option package mapping).

## 6. Per-Branch Detail Blocks

**Block 1** — DEBUG `[Start logging]` (L1944)

> Logs the method entry point for debugging.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `outDebugLog("----- setSbopSvcKeiMskmData Start -----")` |

**Block 2** — DATA RETRIEVAL (L1947)

> Retrieves the unified data map from the request parameter using `fixedText` as the data bucket key.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap = param.getData(fixedText)` |
| 2 | SET | `geneAddDtm = null` | Initialization variable for generation timestamp accumulated across iterations. |

**Block 3** — FOR LOOP (L1949)

> Iterates over `dataList`, processing each sub-option service contract detail map.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `for (HashMap dtlMap : dataList)` | Iterates over all detail maps in the input list. |

**Block 3.1** — IF (filter) `[mskm_div != "1" or svc_div != "2"]` (L1955)

> Skips entries that are not sub-option subscription records. Only items where `mskm_div="1"` (subscription: 申込) and `svc_div="2"` (sub-option: サブオプション) are processed.
>
> From the Japanese comment: "申込、サブオプション以外の場合Skip" (Skip if not subscription and sub-option).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `if (!"1".equals(dtlMap.get("mskm_div")) || !"2".equals(dtlMap.get("svc_div")))` |
| 2 | EXEC | `continue;` | Skip this iteration. |

**Block 3.2** — IF (optional contract number resolution) (L1960)

> If the option service contract number (`op_svc_kei_no`) is not yet set, resolve it from the existing SOD map. The Japanese comment states: "オプションサービスコードが未設定の場合オプションサービス契約番号を設定" (Set the option service contract number if the option service code is not set).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `if (JFUBPCommon.isNull(dtlMap.get("op_svc_kei_no")))` |
| 2 | SET | `updateSODMap = getUpdateSODMap(inMap)` | Get post-update SOD map. |
| 3 | SET | `updateSODopMap = updateSODMap.get(dtlMap.get(OP_SVC_CD))` | Get option-specific SOD sub-map keyed by option service code. |
| 4 | EXEC | `if (!JFUBPCommon.isNull(updateSODopMap) && !JFUBPCommon.isNull(updateSODopMap.get("chaf_opsvkei_no")))` |
| 5 | SET | `dtlMap.put("op_svc_kei_no", updateSODopMap.get("chaf_opsvkei_no"))` | Populate option service contract number from the existing contract. |

**Block 3.3** — BASE SUB-OPTION CONTRACT REGISTRATION (always executed) (L1973)

> The core registration block. Initializes data, maps fields to the SC input, executes the service contract for sub-option service contract <phone> registration, then extracts returned timestamps and the assigned sub-option service contract number.
>
> From the Japanese comment: "EKK0431D011_サブオプションサービス契約<電話>登録" (EKK0431D011 — Sub-option Service Contract <Phone> Registration).

| # | Type | Code |
|---|------|------|
| 1 | SET | `JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0431D011)` | Initialize user data with template and column list. |
| 2 | EXEC | `setInMapEKK0431D011(param, fixedText, dtlMap, lastUpdDtm)` | Map fields from dtlMap to SC input. |
| 3 | CALL | `JFUBPCommon.executeSC(handle, param, fixedText, TEMP_ID_EKK0431D011, TEMP_ID_DTL_EKK0431D011, IN_COL_LIST_EKK0431D011, ERR_COL_EKK0431D011)` | Execute SC for base sub-option contract registration. |
| 4 | SET | `lastUpdDtm = JFUBPCommon.getTemplateValue(inMap, JFUBPCommon.getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0431D011), EKK0431D011CBSMsg.UPD_DTM)` | Extract updated timestamp from SC result. |
| 5 | SET | `geneAddDtm = JFUBPCommon.getTemplateValue(inMap, JFUBPCommon.getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0431D011), EKK0431D011CBSMsg.KK0401_GENE_ADD_DTM)` | Extract generation timestamp from SC result. |
| 6 | SET | `dtlMap.put("sbop_svc_kei_no", JFUBPCommon.getTemplateValue(inMap, JFUBPCommon.getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0431D011), EKK0431D011CBSMsg.SBOP_SVC_KEI_NO))` | Store the newly assigned sub-option service contract number. |

**Block 3.4** — READ SERVICE STATUS (L1987)

> Reads the service contract internal work status from `inMap` for conditional branching.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiUcwkStat = (String) inMap.get(EKK0161_SVC_KEI_UCWK_STAT)` |

**Block 3.5** — IF-ELSE chain `[service status conditional processing]` (L1990–L2080)

> Branches based on the service contract status. Multiple independent SCs may be called (they are `if` statements, not `else if`, so status "100" triggers both Block 3.5.2 and Block 3.5.3).

**Block 3.5.1** — IF (status "020" = Copy/照会) (L1990)

> When the service contract status is "Copy" (照会), executes the copy registration SC.
>
> From the Japanese comment: "照会の場合（親契約が照会の場合のみ実行する）" (In case of copy — only executed when the parent contract is in copy status).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `if (JFUStrConst.CD00037_020.equals(svcKeiUcwkStat))` | Status `"020"` |
| 2 | SET | `JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0431C010)` | Initialize for copy SC. |
| 3 | EXEC | `setInMapEKK0431C010(param, fixedText, dtlMap, lastUpdDtm)` | Map fields for copy registration. |
| 4 | CALL | `JFUBPCommon.executeSC(handle, param, fixedText, TEMP_ID_EKK0431C010, TEMP_ID_DTL_EKK0431C010, IN_COL_LIST_EKK0431C010, ERR_COL_EKK0431C010)` | Execute SC for copy registration. |
| 5 | SET | `lastUpdDtm = getTemplateValue(..., EKK0431C010CBSMsg.UPD_DTM)` | Extract update timestamp. |
| 6 | SET | `geneAddDtm = getTemplateValue(..., EKK0431C010CBSMsg.KK0401_GENE_ADD_DTM)` | Extract generation timestamp. |

**Block 3.5.2** — IF-ELSE (status "030" = Complete/締結済み OR "100" = Provision in progress/提供中) (L2008)

> When the service contract status is "Complete" (締結済み) or "Provision in progress" (提供中), executes the copy completion SC.
>
> From the Japanese comment: "締結済み、提供中の場合" (In case of completed or in progress).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `if (JFUStrConst.CD00037_030.equals(svcKeiUcwkStat) \|\| JFUStrConst.CD00037_100.equals(svcKeiUcwkStat))` | Status `"030"` or `"100"` |
| 2 | SET | `JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0431C030)` | Initialize for completion SC. |
| 3 | EXEC | `setInMapEKK0431C030(param, fixedText, dtlMap, lastUpdDtm)` | Map fields for copy completion. |
| 4 | CALL | `JFUBPCommon.executeSC(handle, param, fixedText, TEMP_ID_EKK0431C030, TEMP_ID_DTL_EKK0431C030, IN_COL_LIST_EKK0431C030, ERR_COL_EKK0431C030)` | Execute SC for copy completion. |
| 5 | SET | `lastUpdDtm = getTemplateValue(..., EKK0431C030CBSMsg.UPD_DTM)` | Extract update timestamp. |
| 6 | SET | `geneAddDtm = getTemplateValue(..., EKK0431C030CBSMsg.KK0401_GENE_ADD_DTM)` | Extract generation timestamp. |

**Block 3.5.3** — IF (status "100" = Provision in progress/提供中) (L2026)

> When the service contract status is "Provision in progress" (提供中), executes the service activation (usage start) SC. Also includes special logic to overwrite `geneAddDtm` if a non-null temporary generation timestamp is returned.
>
> From the Japanese comment: "提供中の場合" (In case of in progress).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `if (JFUStrConst.CD00037_100.equals(svcKeiUcwkStat))` | Status `"100"` |
| 2 | SET | `JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0431C041)` | Initialize for activation SC. |
| 3 | EXEC | `setInMapEKK0431C041(param, fixedText, dtlMap, lastUpdDtm)` | Map fields for usage start. |
| 4 | CALL | `JFUBPCommon.executeSC(handle, param, fixedText, TEMP_ID_EKK0431C041, TEMP_ID_DTL_EKK0431C041, IN_COL_LIST_EKK0431C041, ERR_COL_EKK0431C041)` | Execute SC for service activation. |
| 5 | SET | `lastUpdDtm = getTemplateValue(..., EKK0431C041CBSMsg.UPD_DTM)` | Extract update timestamp. |
| 6 | SET | `tempAddDtm = getTemplateValue(..., EKK0431C041CBSMsg.KK0401_GENE_ADD_DTM)` | Extract temporary generation timestamp. |
| 7 | EXEC | `if (!JFUBPCommon.isNull(tempAddDtm))` |
| 8 | SET | `geneAddDtm = tempAddDtm` | Overwrite `geneAddDtm` with the activation-specific generation timestamp (only if non-null). |

**Block 4** — SOD MAP UPDATE (L2041)

> After all conditional SC calls, creates/updates the post-update SOD sub-option map with the contract number and generation timestamp.
>
> From the Japanese comment: "更新後SODマップの設定" (Setting of post-update SOD map) and "更新後SODサブオプションマップ" (Post-update SOD sub-option map).

| # | Type | Code |
|---|------|------|
| 1 | SET | `updateSODsbopMap = new HashMap()` | Create new sub-option map. |
| 2 | EXEC | `updateSODsbopMap.put("chaf_sbopsvkei_no", (String) dtlMap.get("sbop_svc_kei_no"))` | Store the assigned sub-option service contract number. |
| 3 | EXEC | `updateSODsbopMap.put("chaf_sbopsvkei_gene_add_dtm", geneAddDtm)` | Store the generation timestamp (from the last SC execution). |
| 4 | SET | `updateSODMap = getUpdateSODMap(inMap)` | Re-fetch SOD map (may have changed from Block 3.2). |
| 5 | EXEC | `updateSODMap.put(dtlMap.get("sbop_svc_cd"), updateSODsbopMap)` | Store the sub-option map keyed by sub-option service code. |

**Block 5** — DEBUG + RETURN (L2081–L2084)

> Logs the method exit and returns the accumulated last update timestamp.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `outDebugLog("----- setSbopSvcKeiMskmData End -----")` |
| 2 | RETURN | `return lastUpdDtm` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `mskm_div` | Field | Masking division — classification flag for the type of masking operation. `"1"` = subscription (申込), other values are skipped. |
| `svc_div` | Field | Service division — classification flag for the service type. `"2"` = sub-option (サブオプション), other values are skipped. |
| `op_svc_kei_no` | Field | Option service contract number — the contract number of the parent option service. Populated from the SOD map if not already set. |
| `sbop_svc_kei_no` | Field | Sub-option service contract number — the newly assigned contract number for the sub-option service line item, returned by the SC. |
| `sbop_svc_cd` | Field | Sub-option service code — the code identifying the specific sub-option service type, used as a key in the SOD map. |
| `op_svc_cd` | Field | Option service code — the code identifying the option service type, used to look up the option-specific SOD sub-map. |
| `chaf_opsvkei_no` | Field | Charter (contract) option service contract number — the existing contract number of the parent option service, stored in the SOD map. |
| `chaf_sbopsvkei_no` | Field | Charter (contract) sub-option service contract number — the sub-option contract number stored in the post-update SOD map. |
| `chaf_sbopsvkei_gene_add_dtm` | Field | Charter sub-option service contract generation addition timestamp — the timestamp when the sub-option contract record was generated. |
| `svc_kei_ucwk_stat` | Field | Service contract internal work status — the current lifecycle status of the service contract, determining which conditional SCs to execute. |
| `lastUpdDtm` | Field | Last update date/time — the most recent update timestamp carried through the registration pipeline. |
| `geneAddDtm` | Field | Generation addition date/time — the timestamp for when the contract record was created/generated, accumulated across SC calls. |
| SOD | Acronym | Service Order Data — the internal data structure holding order/service contract state during the registration process. |
| SC | Acronym | Service Component — the service layer that handles a specific business operation (e.g., registration, copy, activation). |
| CBS | Acronym | Component Business Service — the enterprise service component that orchestrates SC calls as part of a screen-level business transaction. |
| KK0401_GENE_ADD_DTM | Constant | Generation addition timestamp field key constant — the template key for retrieving the contract generation timestamp from SC results. |
| UPD_DTM | Constant | Update date/time field key constant — the template key for retrieving the last update timestamp from SC results. |
| EKK0431D011 | SC Code | Sub-option service contract <phone> registration — base contract creation SC for sub-option services. |
| EKK0431C010 | SC Code | Sub-option service contract <phone> copy — copy registration SC for sub-option services. |
| EKK0431C030 | SC Code | Sub-option service contract <phone> copy completion — copy completion SC for sub-option services. |
| EKK0431C041 | SC Code | Sub-option service contract <phone> usage start — service activation SC for sub-option services. |
| CD00037_020 | Constant | Status value `"020"` — Copy/照会 (the parent contract is in copy status, awaiting completion). |
| CD00037_030 | Constant | Status value `"030"` — Complete/締結済み (the copy has been completed). |
| CD00037_100 | Constant | Status value `"100"` — Provision in progress/提供中 (the service is actively being provided to the customer). |
| EKK0161_SVC_KEI_UCWK_STAT | Constant | Field key for reading the service contract internal work status from the inMap data. |
| IN_COL_LIST_EKK0431D011 | Constant | Column list for SC input parameters — EKK0431D011 sub-option contract registration. |
| IN_COL_LIST_EKK0431C010 | Constant | Column list for SC input parameters — EKK0431C010 sub-option contract copy. |
| IN_COL_LIST_EKK0431C030 | Constant | Column list for SC input parameters — EKK0431C030 sub-option contract copy completion. |
| IN_COL_LIST_EKK0431C041 | Constant | Column list for SC input parameters — EKK0431C041 sub-option contract activation. |
| TEMP_ID_EKK0431D011 | Constant | Template ID for EKK0431D011 SC execution. |
| TEMP_ID_EKK0431C010 | Constant | Template ID for EKK0431C010 SC execution. |
| TEMP_ID_EKK0431C030 | Constant | Template ID for EKK0431C030 SC execution. |
| TEMP_ID_EKK0431C041 | Constant | Template ID for EKK0431C041 SC execution. |
| TEMP_TEMP_KEY_EKK0431D011 | Constant | Result template key prefix for extracting SC output values for EKK0431D011. |
| TEMP_TEMP_KEY_EKK0431C010 | Constant | Result template key prefix for extracting SC output values for EKK0431C010. |
| TEMP_TEMP_KEY_EKK0431C030 | Constant | Result template key prefix for extracting SC output values for EKK0431C030. |
| TEMP_TEMP_KEY_EKK0431C041 | Constant | Result template key prefix for extracting SC output values for EKK0431C041. |
| eo光電話 | Business term | eo Fiber Phone — NTT Communications' fiber-optic phone service brand. |
| サブオプション | Business term | Sub-option — an optional service attached to a parent option service contract. |
| 照会 | Business term | Copy/Inquiry — a preliminary copy of a contract before it is finalized; used in contract workflows where a draft or proposed copy is created before binding. |
| 締結済み | Business term | Completed — the copy/contract has been finalized and is no longer in draft. |
| 提供中 | Business term | Provision in progress — the service is actively being provided to the customer (service is live). |
| KK_T_SBOP_SVC_KEI | DB Table | Sub-option service contract table — the database table storing sub-option service contract records. |
