# Business Logic — JFUTelOptSvcMskmCmpCC.setSbopSvcKeiDeleData() [111 LOC]

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

## 1. Role

### JFUTelOptSvcMskmCmpCC.setSbopSvcKeiDeleData()

This method performs the business operation of **deleting (cancelling) sub-option service contracts** within the FPT (Fujitsu Packet Telephone) opt-in service pack system. It iterates over a list of service detail records (`dataList`) and, for each record whose `mskm_div` (masking division) and `svc_div` (service division) are both flagged as `"2"` (indicating a sub-option service subject to deletion), it orchestrates a multi-step cancellation workflow through a chain of four Service Component (SC) calls.

The method implements a **conditional routing/dispatch pattern**: for each eligible sub-option service record, it first consults the **Sub-option Service Contract Agreement Confirmation SC (EKK0401A010)** to determine the current service state. If the state is `"020"` (cancelled, per `CD00037_020`), it takes a **simplified cancellation path** invoking only the **Sub-option Service Contract Cancellation SC (EKK0401C150)**. If the state is active (not cancelled), it takes the **full cancellation path**, first performing a **surcharge determination check (jdgHiChrg)** and then executing the **Sub-option Service Contract Cancellation SC (EKK0401C171)** followed by the **Sub-option Service Contract Cancellation Confirmation SC (EKK0401C180)**. After either path, it updates the SOD (Service Order Data) mapping with the latest subscription number and generation timestamp.

Its role in the larger system is as a **shared utility method** called by the opt-in service pack masking/unmasking operation (`JFUSetOptPackMskmCC`), which orchestrates the full lifecycle of opt-in service pack registration and cancellation. This method specifically handles the deletion half of that lifecycle, ensuring sub-option service contract records are properly cancelled in the business system with appropriate surcharge handling.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setSbopSvcKeiDeleData"])
    outDebugStart["outDebugLog Start"]
    getInMap["inMap = param.getData(fixedText)"]
    initGeneAddDtm["geneAddDtm = null"]
    loopStart["FOR each dtlMap IN dataList"]
    filterCheck["mskm_div = '2' AND svc_div = '2'"]
    skip["Continue to next iteration"]
    initA010["JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0401A010)"]
    setInMapA010["setInMapEKK0401A010(param, fixedText, dtlMap)"]
    execA010["JFUBPCommon.executeSC - EKK0401A010
Sub-option Service Contract Agreement Confirmation"]
    getSvcStat["sbopSvcKeiStat = getTemplateValue for SBOP_SVC_KEI_STAT"]
    isCancelled["sbopSvcKeiStat = '020'"]
    cancelPath["EKK0401C150 - Sub-option Service Contract Cancellation"]
    cancelPathInit["JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0401C150)"]
    cancelPathSet["setInMapEKK0401C150(param, fixedText, dtlMap, lastUpdDtm)"]
    cancelPathExec["JFUBPCommon.executeSC - EKK0401C150"]
    cancelPathUpdate["lastUpdDtm = getTemplateValue UPD_DTM
geneAddDtm = getTemplateValue GENE_ADD_DTM"]
    normalPath["EKK0401C171 + EKK0401C180 - Full Cancellation Path"]
    jdgHiChrg["jdgHiChrg(handle, param, fixedText, dtlMap) -> hiChrgMap"]
    normalPathInit["JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0401C171)"]
    normalPathSet["setInMapEKK0401C171(param, fixedText, dtlMap, hiChrgMap, lastUpdDtm)"]
    normalPathExec["JFUBPCommon.executeSC - EKK0401C171"]
    normalPathUpdate["lastUpdDtm = getTemplateValue UPD_DTM"]
    ekk0401c180Init["JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0401C180)"]
    ekk0401c180Set["setInMapEKK0401C180(param, fixedText, dtlMap, hiChrgMap, lastUpdDtm)"]
    ekk0401c180Exec["JFUBPCommon.executeSC - EKK0401C180"]
    ekk0401c180Update["lastUpdDtm = getTemplateValue UPD_DTM
geneAddDtm = getTemplateValue GENE_ADD_DTM"]
    updateSOD["updateSODsbopMap = new HashMap()
updateSODsbopMap.put(sbop_svc_kei_no, chaf_sbopsvkei_gene_add_dtm)
updateSODMap = getUpdateSODMap(inMap)
updateSODMap.put(sbop_svc_cd, updateSODsbopMap)"]
    outDebugEnd["outDebugLog End"]
    RETURN["Return lastUpdDtm"]

    START --> outDebugStart --> getInMap --> initGeneAddDtm --> loopStart
    loopStart --> filterCheck
    filterCheck -- "false - not a sub-option deletion target" --> skip --> loopEnd["Back to loop"]
    filterCheck -- "true" --> initA010 --> setInMapA010 --> execA010 --> getSvcStat
    getSvcStat --> isCancelled
    isCancelled -- "true: '020' - already cancelled" --> cancelPathInit --> cancelPathSet --> cancelPathExec --> cancelPathUpdate --> updateSOD
    isCancelled -- "false: active" --> jdgHiChrg --> normalPathInit --> normalPathSet --> normalPathExec --> normalPathUpdate --> ekk0401c180Init --> ekk0401c180Set --> ekk0401c180Exec --> ekk0401c180Update --> updateSOD
    cancelPathUpdate --> loopEnd
    ekk0401c180Update --> loopEnd
    updateSOD --> loopEnd
    loopEnd --> loopCheck["End of dataList"]
    loopCheck -- "false" --> loopStart
    loopCheck -- "true" --> outDebugEnd --> RETURN
```

**Constant Resolution Reference:**

| Constant | Value | Business Meaning |
|----------|-------|-----------------|
| `mskm_div = "2"` | `"2"` | Masking division flag — indicates sub-option service record in masking context |
| `svc_div = "2"` | `"2"` | Service division flag — indicates sub-option service type |
| `CD00037_020` | `"020"` | Service contract state code for "cancelled" status |
| `TEMP_ID_EKK0401A010` | `"EKK0401A010"` | Template ID for Sub-option Service Contract Agreement Confirmation SC |
| `TEMP_ID_EKK0401C150` | `"EKK0401C150"` | Template ID for Sub-option Service Contract Cancellation SC |
| `TEMP_ID_EKK0401C171` | `"EKK0401C171"` | Template ID for Sub-option Service Contract Cancellation SC (full path) |
| `TEMP_ID_EKK0401C180` | `"EKK0401C180"` | Template ID for Sub-option Service Contract Cancellation Confirmation SC |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | The session handle managing the current transaction context. Provides database connectivity and transaction boundary for SC (Service Component) invocations. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object holding input/output data maps. Used to initialize data templates, pass in-maps to SCs, and retrieve SC response values (template values, update timestamps). |
| 3 | `fixedText` | `String` | Service message identifier — acts as the key/namespace to identify the specific data map within `param` where contract data is stored. Also used as the service identifier in SC calls. |
| 4 | `dataList` | `ArrayList<HashMap>` | List of sub-option service contract detail records to process. Each `HashMap` entry represents one sub-option service line item containing fields like `mskm_div`, `svc_div`, `sbop_svc_kei_no`, `sbop_svc_cd`, etc. Only records with `mskm_div="2"` and `svc_div="2"` are processed. |
| 5 | `lastUpdDtm` | `String` | Last update timestamp carried forward from prior processing stages. Updated during each service record cancellation to reflect the most recent update time from SC responses. Returned as the method result. |

**Instance fields / external state read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `TEMP_ID_EKK0401A010` | `String` | Template ID constant for the agreement confirmation SC |
| `TEMP_ID_DTL_EKK0401A010` | `String` | Template detail ID for the agreement confirmation SC detail list |
| `TEMP_TEMP_KEY_EKK0401A010` | `String` | SC execution result retrieval key prefix |
| `IN_COL_LIST_EKK0401A010` | `List<String>` | Input column list for agreement confirmation (service contract number, sub-option service contract number, generation timestamp, reservation application date) |
| `ERR_COL_EKK0401A010` | `String` | Error check column for agreement confirmation |
| `TEMP_ID_EKK0401C150` | `String` | Template ID for cancellation SC (cancelled path) |
| `IN_COL_LIST_EKK0401C150` | `List<String>` | Input column list for cancellation SC (cancelled path) |
| `ERR_COL_EKK0401C150` | `String` | Error check column for cancellation SC (cancelled path) |
| `TEMP_ID_EKK0401C171` | `String` | Template ID for cancellation SC (full path) |
| `IN_COL_LIST_EKK0401C171` | `List<String>` | Input column list for cancellation SC (full path) — 12 fields including surcharge and transfer fields |
| `ERR_COL_EKK0401C171` | `String` | Error check column for cancellation SC (full path) |
| `TEMP_ID_EKK0401C180` | `String` | Template ID for cancellation confirmation SC |
| `IN_COL_LIST_EKK0401C180` | `List<String>` | Input column list for cancellation confirmation SC — 8 fields including DSLJI surcharge flag |
| `ERR_COL_EKK0401C180` | `String` | Error check column for cancellation confirmation SC |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JFUBPCommon.executeSC` | EKK0401A010SC | KK_T_SBOP_SVC_KEI (implied) | Reads sub-option service contract agreement confirmation — retrieves current service state (`sbopSvcKeiStat`) to determine cancellation path |
| R | `JFUBPCommon.initData` | (template init) | - | Initializes input data map for EKK0401A010 with columns: KEY_OP_SVC_KEI_NO, KEY_SBOP_SVC_KEI_NO, KEY_GENE_ADD_DTM, KEY_RSV_APLY_YMD |
| - | `setInMapEKK0401A010` | (map setter) | - | Copies data from `dtlMap` into the input map for EKK0401A010 |
| R | `JFUBPCommon.getMaxTempTempleteKey` | (template lookup) | - | Retrieves the latest template key for extracting result values |
| R | `JFUBPCommon.getTemplateListValue` | (template extract) | - | Extracts `SBOP_SVC_KEI_STAT` (sub-option service contract status) from the SC response detail list |
| R | `JFUBPCommon.initData` | (template init) | - | Initializes input data map for EKK0401C150 |
| - | `setInMapEKK0401C150` | (map setter) | - | Copies data from `dtlMap` and `lastUpdDtm` into the input map for EKK0401C150 |
| U | `JFUBPCommon.executeSC` | EKK0401C150SC | KK_T_SBOP_SVC_KEI (implied) | Cancels the sub-option service contract — used when the contract is already in cancelled state (shortcut path) |
| R | `JFUBPCommon.getTemplateValue` | (template extract) | - | Extracts `UPD_DTM` (update timestamp) from EKK0401C150 response |
| R | `JFUBPCommon.getTemplateValue` | (template extract) | - | Extracts `GENE_ADD_DTM` (generation/addition timestamp) from EKK0401C150 response |
| R | `jdgHiChrg` | HiChrg (surcharge check) | - | Performs surcharge determination check — evaluates whether cancellation triggers additional charges |
| R | `JFUBPCommon.initData` | (template init) | - | Initializes input data map for EKK0401C171 |
| - | `setInMapEKK0401C171` | (map setter) | - | Copies data from `dtlMap`, `hiChrgMap`, and `lastUpdDtm` into the input map for EKK0401C171 (12 input fields) |
| U | `JFUBPCommon.executeSC` | EKK0401C171SC | KK_T_SBOP_SVC_KEI (implied) | Executes sub-option service contract cancellation — registers cancellation request with service end date, charge end date, penalty code, transfer division, etc. |
| R | `JFUBPCommon.getTemplateValue` | (template extract) | - | Extracts `UPD_DTM` from EKK0401C171 response to update `lastUpdDtm` |
| R | `JFUBPCommon.initData` | (template init) | - | Initializes input data map for EKK0401C180 |
| - | `setInMapEKK0401C180` | (map setter) | - | Copies data from `dtlMap`, `hiChrgMap`, and `lastUpdDtm` into the input map for EKK0401C180 (8 input fields including DSLJI surcharge flag) |
| U | `JFUBPCommon.executeSC` | EKK0401C180SC | KK_T_SBOP_SVC_KEI (implied) | Confirms sub-option service contract cancellation — finalizes the cancellation with service end date, charge end date, disability code/memo, update timestamp, and DSLJI surcharge flag |
| R | `JFUBPCommon.getTemplateValue` | (template extract) | - | Extracts `UPD_DTM` from EKK0401C180 response |
| R | `JFUBPCommon.getTemplateValue` | (template extract) | - | Extracts `GENE_ADD_DTM` from EKK0401C180 response |
| R | `getUpdateSODMap` | SOD mapping | KK_T_SOD (implied) | Retrieves the current SOD (Service Order Data) map from the in-map for updating with cancellation results |

**CRUD Summary:**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JFUBPCommon.executeSC (EKK0401A010)` | EKK0401A010SC | KK_T_SBOP_SVC_KEI | Read — Sub-option Service Contract Agreement Confirmation: retrieves current service state to route cancellation path |
| U | `JFUBPCommon.executeSC (EKK0401C150)` | EKK0401C150SC | KK_T_SBOP_SVC_KEI | Update — Sub-option Service Contract Cancellation: cancels contract when already in cancelled state (shortcut) |
| U | `jdgHiChrg` | HiChrgCheck | - | Read — Surcharge determination check: evaluates whether cancellation incurs additional charges |
| U | `JFUBPCommon.executeSC (EKK0401C171)` | EKK0401C171SC | KK_T_SBOP_SVC_KEI | Update — Sub-option Service Contract Cancellation: registers cancellation for active contracts |
| U | `JFUBPCommon.executeSC (EKK0401C180)` | EKK0401C180SC | KK_T_SBOP_SVC_KEI | Update — Sub-option Service Contract Cancellation Confirmation: finalizes cancellation with all metadata |
| R | `getUpdateSODMap` | SODMapping | KK_T_SOD | Read — Retrieves and updates the SOD mapping with the latest sub-option service contract number and generation timestamp |

## 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], `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], `getTemplateValue` [R], `getTemplateValue` [R], `getMaxTempTempleteKey` [R], `getMaxTempTempleteKey` [R], `getMaxTempTempleteKey` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: JFUSetOptPackMskmCC | `JFUSetOptPackMskmCC.setMskmData` -> `setSbopSvcKeiDeleData(handle, param, fixedText, opSvcMskmList, lastUpdDtm)` | `EKK0401A010SC [R] KK_T_SBOP_SVC_KEI`, `EKK0401C150SC [U] KK_T_SBOP_SVC_KEI`, `EKK0401C171SC [U] KK_T_SBOP_SVC_KEI`, `EKK0401C180SC [U] KK_T_SBOP_SVC_KEI`, `getUpdateSODMap [R] KK_T_SOD` |

**Caller context:** `JFUSetOptPackMskmCC` (Fujitsu Opt-in Service Pack Masking Common Component Controller) calls `setSbopSvcKeiDeleData` as part of the opt-in service pack masking/unmasking operation. The method is invoked alongside `setSbopSvcKeiMskmData` (registration), `setOpSvcKeiDeleData` (opt service deletion), and `setOpSvcKeiMskmData` (opt service registration), forming the complete lifecycle of opt-in service pack management.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Initialize (L2277)

> Begins execution: logs the method start, retrieves the data map from the request parameter, and initializes the geneAddDtm variable.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `outDebugLog("----- setSbopSvcKeiDeleData Start -----")` // Log method entry |
| 2 | SET | `inMap = (HashMap) param.getData(fixedText)` // Retrieve data map keyed by fixedText from request parameter |
| 3 | SET | `geneAddDtm = null` // Initialize generation timestamp variable |

**Block 2** — [FOR] Iterate over dataList (L2280)

> Loops through each sub-option service contract detail record. Only records where both `mskm_div` and `svc_div` equal `"2"` (sub-option service deletion targets) proceed; others are skipped.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dtlMap` (loop variable, each HashMap from dataList) |

**Block 2.1** — [IF] Filter: mskm_div AND svc_div check (L2285)

> Condition: `!"2".equals(dtlMap.get("mskm_div")) || !"2".equals(dtlMap.get("svc_div"))` — skips records that are NOT sub-option service deletion targets. The constant values `"2"` for both `mskm_div` and `svc_div` indicate the record is a sub-option service flagged for deletion processing.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!"2".equals(dtlMap.get("mskm_div")) \|\| !"2".equals(dtlMap.get("svc_div"))` // msukm_div="2" AND svc_div="2" required |
| 2 | EXEC | `continue;` // Skip non-sub-option or non-deletion records |

**Block 2.2** — [IF body] Sub-option Service Contract Agreement Confirmation (L2292)

> For records passing the filter, the method first executes the agreement confirmation SC (EKK0401A010) to determine the current service state, which decides the cancellation path.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0401A010)` // Init input data: [KEY_OP_SVC_KEI_NO, KEY_SBOP_SVC_KEI_NO, KEY_GENE_ADD_DTM, KEY_RSV_APLY_YMD] |
| 2 | CALL | `setInMapEKK0401A010(param, fixedText, dtlMap)` // Copy dtlMap fields into input map for EKK0401A010 |
| 3 | CALL | `JFUBPCommon.executeSC(handle, param, fixedText, TEMP_ID_EKK0401A010, TEMP_ID_DTL_EKK0401A010, IN_COL_LIST_EKK0401A010, ERR_COL_EKK0401A010)` // Execute SC: Sub-option Service Contract Agreement Confirmation |
| 4 | SET | `sbopSvcKeiStat = JFUBPCommon.getTemplateListValue(inMap, JFUBPCommon.getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0401A010), TEMP_ID_DTL_EKK0401A010, EKK0401A010CBSMsg1List.SBOP_SVC_KEI_STAT, 0)` // Extract service contract state from SC response detail list |

**Block 2.2.1** — [IF-ELSE] Service state check: is already cancelled? (L2302)

> Condition: `JFUStrConst.CD00037_020.equals(sbopSvcKeiStat)` — i.e., `sbopSvcKeiStat = "020"`. The value `"020"` (constant `CD00037_020`) indicates the sub-option service contract is already in a cancelled state.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JFUStrConst.CD00037_020.equals(sbopSvcKeiStat)` // CD00037_020 = "020" (cancelled status) |

**Block 2.2.1.1** — [IF body] Cancelled path: EKK0401C150 Contract Cancellation (L2306)

> When the service is already cancelled, take a shortcut: invoke only the cancellation SC (EKK0401C150) without the surcharge check.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0401C150)` // Init input data for EKK0401C150 |
| 2 | CALL | `setInMapEKK0401C150(param, fixedText, dtlMap, lastUpdDtm)` // Copy dtlMap and lastUpdDtm into input map for EKK0401C150 |
| 3 | CALL | `JFUBPCommon.executeSC(handle, param, fixedText, TEMP_ID_EKK0401C150, TEMP_ID_DTL_EKK0401C150, IN_COL_LIST_EKK0401C150, ERR_COL_EKK0401C150)` // Execute SC: Sub-option Service Contract Cancellation |
| 4 | SET | `lastUpdDtm = JFUBPCommon.getTemplateValue(inMap, JFUBPCommon.getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0401C150), EKK0401C150CBSMsg.UPD_DTM)` // Update lastUpdDtm from SC response |
| 5 | SET | `geneAddDtm = JFUBPCommon.getTemplateValue(inMap, JFUBPCommon.getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0401C150), EKK0401C150CBSMsg.GENE_ADD_DTM)` // Get generation timestamp |

**Block 2.2.1.2** — [ELSE body] Active path: Surcharge Check + Full Cancellation (L2322)

> When the service is NOT cancelled (active), perform surcharge determination then execute the full two-step cancellation: cancellation registration (EKK0401C171) + cancellation confirmation (EKK0401C180).

| # | Type | Code |
|---|------|------|
| 1 | SET | `hiChrgMap = jdgHiChrg(handle, param, fixedText, dtlMap)` // Perform surcharge determination check |

**Block 2.2.1.2.1** — [EXEC] EKK0401C171: Sub-option Service Contract Cancellation (L2329)

> Registers the cancellation request with comprehensive fields including service end date, charge end date, disability code/memo, penalty occurrence code, transfer division, and operation transfer source service contract number.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0401C171)` // Init input: 12 fields [OP_SVC_KEI_NO, SBOP_SVC_KEI_NO, MSKM_DTL_NO, RSV_TSTA_KIBO_YMD, SVC_ENDYMD, SVC_CHRG_ENDYMD, SVC_DLRE_CD, SVC_DLRE_MEMO, PNLTY_HASSEI_CD, IDO_DIV, UPD_DTM_BF, OP_HKTGI_SK_SVC_KEI_NO] |
| 2 | CALL | `setInMapEKK0401C171(param, fixedText, dtlMap, hiChrgMap, lastUpdDtm)` // Copy dtlMap, hiChrgMap, lastUpdDtm into input map |
| 3 | CALL | `JFUBPCommon.executeSC(handle, param, fixedText, TEMP_ID_EKK0401C171, TEMP_ID_DTL_EKK0401C171, IN_COL_LIST_EKK0401C171, ERR_COL_EKK0401C171)` // Execute SC: Sub-option Service Contract Cancellation |
| 4 | SET | `lastUpdDtm = JFUBPCommon.getTemplateValue(inMap, JFUBPCommon.getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0401C171), EKK0401C171CBSMsg.UPD_DTM)` // Update lastUpdDtm |

**Block 2.2.1.2.2** — [EXEC] EKK0401C180: Sub-option Service Contract Cancellation Confirmation (L2339)

> Finalizes the cancellation with confirmation data including service end date, charge end date, disability code/memo, update timestamp before, and DSLJI surcharge flag.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0401C180)` // Init input: 8 fields [OP_SVC_KEI_NO, SBOP_SVC_KEI_NO, SVC_ENDYMD, SVC_CHRG_ENDYMD, SVC_DLRE_CD, SVC_DLRE_MEMO, UPD_DTM_BF, DSLJI_CHRG_FLG] |
| 2 | CALL | `setInMapEKK0401C180(param, fixedText, dtlMap, hiChrgMap, lastUpdDtm)` // Copy dtlMap, hiChrgMap, lastUpdDtm into input map |
| 3 | CALL | `JFUBPCommon.executeSC(handle, param, fixedText, TEMP_ID_EKK0401C180, TEMP_ID_DTL_EKK0401C180, IN_COL_LIST_EKK0401C180, ERR_COL_EKK0401C180)` // Execute SC: Sub-option Service Contract Cancellation Confirmation |
| 4 | SET | `lastUpdDtm = JFUBPCommon.getTemplateValue(inMap, JFUBPCommon.getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0401C180), EKK0401C180CBSMsg.UPD_DTM)` // Update lastUpdDtm |
| 5 | SET | `geneAddDtm = JFUBPCommon.getTemplateValue(inMap, JFUBPCommon.getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0401C180), EKK0401C180CBSMsg.GENE_ADD_DTM)` // Get generation timestamp |

**Block 2.3** — [EXEC] Update SOD (Service Order Data) Mapping (L2357)

> After either cancellation path, create and update the SOD map with the sub-option service contract number and generation timestamp, keyed by sub-option service code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updateSODsbopMap = new HashMap()` // Create new map for this sub-option service cancellation result |
| 2 | SET | `updateSODsbopMap.put("chaf_sbopsvkei_no", (String)dtlMap.get("sbop_svc_kei_no"))` // Set sub-option service contract number |
| 3 | SET | `updateSODsbopMap.put("chaf_sbopsvkei_gene_add_dtm", geneAddDtm)` // Set generation timestamp |
| 4 | SET | `updateSODMap = getUpdateSODMap(inMap)` // Retrieve current SOD map from inMap |
| 5 | SET | `updateSODMap.put(dtlMap.get("sbop_svc_cd"), updateSODsbopMap)` // Map by sub-option service code |

**Block 3** — [EXEC] End processing (L2368)

> Logs the method end and returns the final `lastUpdDtm` timestamp.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `outDebugLog("----- setSbopSvcKeiDeleData End -----")` // Log method completion |
| 2 | RETURN | `return lastUpdDtm` // Return the most recent update timestamp from all processed records |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `mskm_div` | Field | Masking division — classification flag indicating whether a record is a sub-option service in the masking context. Value `"2"` means sub-option service. |
| `svc_div` | Field | Service division — classification flag for the service type. Value `"2"` indicates a sub-option service line item. |
| `sbop_svc_kei_no` | Field | Sub-option service contract number — unique identifier for a sub-option service contract line item. |
| `sbop_svc_cd` | Field | Sub-option service code — code identifying the type of sub-option service. |
| `sbopSvcKeiStat` | Variable | Sub-option service contract status — the current state of the service contract as retrieved from EKK0401A010 SC. Value `"020"` means cancelled. |
| `chaf_sbopsvkei_no` | Field | Contracted sub-option service contract number — field key in the SOD mapping for the sub-option service contract number. |
| `chaf_sbopsvkei_gene_add_dtm` | Field | Contracted sub-option service contract generation timestamp — field key for tracking when the sub-option service was registered/created. |
| `GENE_ADD_DTM` | Field | Generation/addition timestamp — timestamp when the service contract record was created/generated. |
| `UPD_DTM` | Field | Update timestamp — timestamp of the most recent modification to the service contract record. |
| `SOD` | Acronym | Service Order Data — the Fujitsu order management entity representing telecom service orders; maintained via mapping for downstream processing. |
| `SC` | Acronym | Service Component — a reusable business logic component that handles specific CRUD operations on domain entities. Invoked via `JFUBPCommon.executeSC`. |
| `EKK0401A010` | SC Code | Sub-option Service Contract Agreement Confirmation SC — reads and confirms the current state of a sub-option service contract. |
| `EKK0401C150` | SC Code | Sub-option Service Contract Cancellation SC (shortcut path) — cancels a contract that is already in cancelled state. |
| `EKK0401C171` | SC Code | Sub-option Service Contract Cancellation SC (full path) — registers cancellation with full detail including penalty, transfer, and service end dates. |
| `EKK0401C180` | SC Code | Sub-option Service Contract Cancellation Confirmation SC — finalizes the cancellation confirmation with DSLJI surcharge flag and remaining metadata. |
| CD00037_020 | Constant | `"020"` — service contract state code meaning "cancelled". Used to determine the cancellation routing path. |
| `jdgHiChrg` | Method | Surcharge determination check — evaluates whether the cancellation will trigger additional charges (e.g., early termination fees). |
| `fixedText` | Parameter | Service message identifier — acts as the namespace/key for identifying the data map within the request parameter holding contract data. |
| `hiChrgMap` | Variable | High charge (surcharge) determination result map — contains surcharge evaluation results used in the full cancellation path. |
| `lastUpdDtm` | Parameter | Last update timestamp — timestamp carried across processing stages and updated as each record is cancelled. |
| `dataList` | Parameter | Sub-option service contract detail list — ArrayList of HashMap entries, each representing one sub-option service record to process. |
| `opSvcMskmList` | Variable | Opt-in service pack masking list — the data list passed to this method from the caller JFUSetOptPackMskmCC. |
| FPD | Acronym | Fujitsu Packet Telephone — the telecom product line this system manages (inferred from method/class naming). |
| `IN_COL_LIST_EKK0401A010` | Constant | Input column list for EKK0401A010: [KEY_OP_SVC_KEI_NO, KEY_SBOP_SVC_KEI_NO, KEY_GENE_ADD_DTM, KEY_RSV_APLY_YMD]. |
| `IN_COL_LIST_EKK0401C171` | Constant | Input column list for EKK0401C171: 12 fields including OP_SVC_KEI_NO, SBOP_SVC_KEI_NO, MSKM_DTL_NO, RSV_TSTA_KIBO_YMD, SVC_ENDYMD, SVC_CHRG_ENDYMD, SVC_DLRE_CD, SVC_DLRE_MEMO, PNLTY_HASSEI_CD, IDO_DIV, UPD_DTM_BF, OP_HKTGI_SK_SVC_KEI_NO. |
| `IN_COL_LIST_EKK0401C180` | Constant | Input column list for EKK0401C180: 8 fields including OP_SVC_KEI_NO, SBOP_SVC_KEI_NO, SVC_ENDYMD, SVC_CHRG_ENDYMD, SVC_DLRE_CD, SVC_DLRE_MEMO, UPD_DTM_BF, DSLJI_CHRG_FLG. |
| DSLJI_CHRG_FLG | Field | DSLJI surcharge flag — indicates whether a DSLJI-specific surcharge applies to the cancellation. |
| PNLTY_HASSEI_CD | Field | Penalty occurrence code — code indicating whether a cancellation penalty was incurred. |
| IDO_DIV | Field | Transfer division — indicates whether a line transfer (porting) is associated with this cancellation. |
| SVC_DLRE_CD | Field | Service disability/disconnection code — code describing the reason for service disconnection. |
| SVC_DLRE_MEMO | Field | Service disconnection memo — free-text memo for the disconnection reason. |
| RSV_TSTA_KIBO_YMD | Field | Reservation start desired date — the customer's desired service cancellation start date. |
| SVC_ENDYMD | Field | Service end date — the date the service terminates. |
| SVC_CHRG_ENDYMD | Field | Service charge end date — the date the service charges terminate. |
| OPT_PACK | Acronym | Opt-in Service Pack — a bundled telecom service package that customers can opt into or out of. |
