---
title: Business Logic — KKW12601SFLogic.actionUpdIcrn() [337 LOC]
---

# Business Logic — KKW12601SFLogic.actionUpdIcrn() [337 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW12601SF.KKW12601SFLogic` |
| Layer | Controller (WebLogic) |
| Module | `KKW12601SF` (Package: `eo.web.webview.KKW12601SF`) |

## 1. Role

### KKW12601SFLogic.actionUpdIcrn()

This method implements the **list update confirmation processing** (一覧更新確認処理) for the Welcome Letter List screen (加入御礼書一覧照会). It is the primary change-capture entry point for the KKW12601 (Welcome Letter List) and KKW12605 (Welcome Letter List Update Confirmation) screens. When a user modifies rows in the welcome letter list — toggling "withdrawal" (hikinuki) or "send exclusion" (send_jgi) checkboxes — this method detects all changes, temporarily stores them in separate data bean arrays categorized as update, insert (reissue), or modification records, and then invokes the KKSV0142 service to perform a batch send verification check. If the batch is currently running, an error is displayed; otherwise, the method navigates to the update confirmation screen (KKW12605), carrying the selected row's data and setting a search flag so the confirmation screen re-renders with the updated data. The method enforces a critical business rule: **sent data cannot be modified** — if a record already has a send timestamp (send_dtm) set, any attempted change triggers an early error return. It also supports an additional workflow item from version 4.00 (ANK-1200-00-00): when send exclusion is checked and the terminal purchase notification letter output code is set to "required" (TNMT_BUY_TCS_OPUT_SKCD_Y="1"), a warning message is accumulated to alert the user that the service contract number(s) associated with that change will be subject to device purchase notification letter output.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["actionUpdIcrn()"])
    START --> GET_BEAN["Get service form bean and create param array"]
    GET_BEAN --> CLEAR_UPD["Clear datalistUpd (KANUORESO_LIST_UPD)"]
    CLEAR_UPD --> CLEAR_INS["Clear datalistIns (KANUORESO_LIST_INS)"]
    CLEAR_INS --> CLEAR_MOD["Clear datalistMod (KANUORESO_LIST_MOD)"]
    CLEAR_MOD --> GET_BF["Get datalistBf (KANUORESO_LIST_BF)"]
    GET_BF --> GET_LIST["Get datalist (KANUORESO_LIST)"]
    GET_LIST --> INIT_FLG["Initialize updflg=false, insflg=false, msgOputFlg=false"]
    INIT_FLG --> LOOP_START{"i < datalist.getCount()"}
    LOOP_START -->|true| GET_DATA["Get dataBean from datalist[i]"]
    GET_DATA --> FETCH_FIELDS["Extract: kanuoreso_no, hikinuki, send_jgi, re_hako, send_dtm, svc_kei_no, tnmt_buy_tchisho_oput_skcd"]
    FETCH_FIELDS --> CHECK_REHAKO{"re_hako != null && re_hako == true"}
    CHECK_REHAKO -->|true| CHECK_SENDDTM1{"send_dtm != null && send_dtm != empty"}
    CHECK_SENDDTM1 -->|true| SET_FLG1["updflg=true, insflg=true"]
    CHECK_SENDDTM1 -->|false| REHAKO_MSG["Set error: reissue checked on unsent data (registration)"]
    REHAKO_MSG --> EARLY_RETURN["Return false"]
    SET_FLG1 --> NEXT_ITER["i++"]
    CHECK_REHAKO -->|false| COMPARE_BEF["Get dataBeanBf from datalistBf[i]"]
    COMPARE_BEF --> FETCH_BF["Fetch: hikinukiBf, send_jgiBf"]
    FETCH_BF --> COMPARE_HIKI{"hikinuki changed"}
    COMPARE_HIKI -->|true| CHECK_SENDDTM2{"send_dtm != null && send_dtm != empty"}
    CHECK_SENDDTM2 -->|true| SET_ERR2["Set error: sent data update"]
    SET_ERR2 --> EARLY_RETURN
    CHECK_SENDDTM2 -->|false| SET_UPD["updflg=true"]
    COMPARE_HIKI -->|false| COMPARE_SENDJGI{"send_jgi changed"}
    COMPARE_SENDJGI -->|true| CHECK_SENDDTM3{"send_dtm != null && send_dtm != empty"}
    CHECK_SENDDTM3 -->|true| SET_ERR3["Set error: sent data update"]
    SET_ERR3 --> EARLY_RETURN
    CHECK_SENDDTM3 -->|false| SET_UPD2["updflg=true"]
    COMPARE_SENDJGI -->|false| CHECK_SENDJGI_NEW{"send_jgi changed AND send_jgi == true"}
    CHECK_SENDJGI_NEW -->|true| CHECK_TNMT{"tnmt_skcd == TNMT (1)"}
    CHECK_TNMT -->|true| SET_MSGFLG["msgOputFlg=true, collect svc_kei_no"]
    CHECK_TNMT -->|false| NEXT_ITER
    CHECK_SENDJGI_NEW -->|false| NEXT_ITER
    SET_UPD --> CHECK_UPDFLG{"updflg == true"}
    SET_UPD2 --> CHECK_UPDFLG
    SET_MSGFLG --> NEXT_ITER
    CHECK_UPDFLG -->|true| ADD_UPD["Copy all fields to datalistUpd"]
    ADD_UPD --> RESET_UPD["updflg=false"]
    RESET_UPD --> CHECK_INS{"insflg == true"}
    CHECK_INS -->|true| ADD_INS["Add to datalistIns with kanuoreso_no"]
    ADD_INS --> RESET_INS["insflg=false"]
    CHECK_INS -->|false| ADD_MOD["Add to datalistMod with kanuoreso_no"]
    ADD_MOD --> SHIWAKE_CHK{"hikinuki == true"}
    SHIWAKE_CHK -->|true| SET_KOPT["Set LETTER_HASSO_SHIWAKE_DIV_02 = KOPT (1)"]
    SHIWAKE_CHK -->|false| SET_TUJ["Set LETTER_HASSO_SHIWAKE_DIV_02 = TUJYO (0)"]
    SET_KOPT --> SENDJGI_CHK{"send_jgi == true"}
    SET_TUJ --> SENDJGI_CHK
    SENDJGI_CHK -->|true| SET_JGI["Set SEND_JGI_FLG_02 = JGI (2)"]
    SENDJGI_CHK -->|false| SET_SEND["Set SEND_JGI_FLG_02 = SEND (1)"]
    SET_JGI --> SET_UPDDTM["Set UPD_DTM_02"]
    SET_SEND --> SET_UPDDTM
    SET_UPDDTM --> NEXT_ITER
    RESET_INS --> NEXT_ITER
    NEXT_ITER --> LOOP_START
    LOOP_START -->|false| CHECK_UPDCNT{"updCnt > 0"}
    CHECK_UPDCNT -->|true| GET_CHOICE["Get selected row index"]
    GET_CHOICE --> PARSE_SEL["Parse sel from kanuoreso_choice"]
    PARSE_SEL --> GET_SEL["Get dataBeanSel from datalist[sel]"]
    GET_SEL --> STORE_NO["Store kanuoreso_no to bean KANUORESO_HAKKO_NO"]
    STORE_NO --> SET_SEARCF["Set SEARCH_FLG = Y (1)"]
    SET_SEARCF --> CREATE_MAP["Create KKSV0142 mapper, inputMap"]
    CREATE_MAP --> MAP_KANU["mapper.setKanuoresoIktTrkCC"]
    MAP_KANU --> MAP_SC["mapper.setKKSV014201SC"]
    MAP_SC --> INVOKE["invokeService(KKSV0142, KKSV0142OP)"]
    INVOKE --> CHECK_RESULT{"result == 1"}
    CHECK_RESULT -->|true| BATCH_ERR["Set error: batch processing in progress"]
    BATCH_ERR --> DUMP_RET["Dump DataBean, return true"]
    CHECK_RESULT -->|false| SET_NXTSCRN["Set NEXT_SCREEN_ID=KKW12605"]
    SET_NXTSCRN --> SET_SCRNID["setScreenId KKW12606 from KKW12601"]
    SET_SCRNID --> SET_MSG["Set success: List Update"]
    SET_MSG --> MSG_CHK{"msgOputFlg == true"}
    MSG_CHK -->|true| SET_ALERT["Set alert with svcKeiNo list"]
    MSG_CHK -->|false| DUMP_RET
    SET_ALERT --> DUMP_RET
    CHECK_UPDCNT -->|false| NOCHANGE["Set error: content not changed"]
    NOCHANGE --> DUMP_RET
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no explicit parameters. It operates entirely on instance state held in the web session's shared form bean (X31SDataBeanAccess) and the inputMap/outputMap carried across the logic class. |
| - | `super.getServiceFormBean()` return | X31SDataBeanAccess | The session-bound service form data bean carrying the welcome letter list data, including all rows displayed in the confirmation grid. |
| - | `inputMap` / `outputMap` | HashMap\<String, Object\> | Instance fields used to populate and receive data from the KKSV0142 service invocation. |
| - | `JCCWebCommon` | Common utility | Used for setting message info (error/success messages displayed to the user). |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `KKW12601SFLogic.getServiceFormBean` | KKW12601SF | - | Retrieves the shared service form bean holding list data and update artifacts. |
| R | `X31SDataBeanAccess.getDataBeanArray` | KKW12601SF | - | Fetches data bean arrays for list, update, insert, modification, and before-update snapshots from the form bean. |
| - | `X31SDataBeanAccessArray.clearArray` | KKW12601SF | - | Clears all three artifact arrays (upd, ins, mod) at the start of each processing cycle. |
| - | `X31SDataBeanAccess.sendMessageString` | KKW12601SF | - | Reads welcome letter issuance number, send timestamp, service contract number, and terminal purchase notification code from data beans. |
| - | `X31SDataBeanAccess.sendMessageBoolean` | KKW12601SF | - | Reads withdrawal flag (hikinuki), send exclusion flag (send_jgi), and reissue flag (re_hako) from data beans. |
| R | `X31SDataBeanAccessArray.getCount` | KKW12601SF | - | Iterates the list to check row count for change detection loop. |
| R | `X31SDataBeanAccessArray.getDataBean` | KKW12601SF | - | Retrieves individual data beans from list and before-update snapshot arrays for comparison. |
| - | `X31SDataBeanAccess.sendMessageObject` | KKW12601SF | - | Reads all field values from the original data bean during the copy-to-update-artifact phase. |
| - | `X31SDataBeanAccess.sendMessageBoolean` (SET) | KKW12601SF | - | Writes boolean field values into the update/artifact data beans. |
| - | `X31SDataBeanAccess.sendMessageString` (SET) | KKW12601SF | - | Writes string field values (kanuoreso_no, letter_hassho_shiwake_div, send_jgi_flg, upd_dtm) into update/artifact beans. |
| - | `X31SDataBeanAccessArray.addDataBean` | KKW12601SF | - | Appends a new entry to the update list, insert list, or modification list artifact arrays. |
| C | `KKW12601SFLogic.invokeService` | KKSV0142 | - | Invokes the KKSV0142 (Welcome Letter Issuance Batch Send Check) service with mapped input parameters. |
| R | `KKW12601SFLogic.getKKSV0142Result` | KKSV0142 | - | Reads the service result code ("1" = batch processing in progress). |
| - | `KKSV0142_KKSV0142OPDBMapper.setKanuoresoIktTrkCC` | KKSV0142 | - | Maps kanuoreso (welcome letter) items into the KKSV0142 input parameter map. |
| - | `KKSV0142_KKSV0142OPDBMapper.setKKSV014201SC` | KKSV0142 | - | Maps the service contract data bean array into the KKSV014201SC input parameter map. |
| - | `JKKCreateNhkDntIktCC.setMessageInfo` | JKKCreateNhkDntIktCC | - | Sets error/success messages on the message info manager (EKB0930_NW, EKB0370__I, EKBB410__Q). |
| - | `JCCWebCommon.setScreenId` | JCCWebCommon | - | Sets the return screen ID (KKW12606) and current screen ID (KKW12601) for navigation. |
| R | `KKW12601SFLogic.getCommonInfoBean` | KKW12601SF | - | Retrieves the shared common info bean for setting next-screen navigation data. |
| - | `JSYwebLog.println` | JSYwebLog | - | Dumps the current DataBean state to the log for debugging/auditing purposes. |

## 5. Dependency Trace

No external callers were found for this method across the codebase. The method appears to be an internal logic entry point invoked directly by the KKW12601/KKW12605 screen framework through the standard web request dispatch mechanism.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW12605 | Web Request -> ActionForm -> KKW12601SFLogic.actionUpdIcrn() -> KKSV0142 OP (batch send check) | invokeService [C] KKSV0142 batch check |

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Initialize processing artifacts (L666)

> Sets up return value, bean access, and clears all data bean arrays for fresh processing.

| # | Type | Code |
|---|------|------|
| 1 | SET | `result = true` |
| 2 | CALL | `bean = super.getServiceFormBean()` — Get service form bean |
| 3 | SET | `paramBean = {bean}` — Wrap bean in parameter array for service mapper |
| 4 | CALL | `datalistUpd = bean.getDataBeanArray(KKW12601SFConst.KANUORESO_LIST_UPD)` — Get update artifact array |
| 5 | EXEC | `datalistUpd.clearArray()` — Clear update artifact |
| 6 | CALL | `datalistIns = bean.getDataBeanArray(KKW12601SFConst.KANUORESO_LIST_INS)` — Get insert artifact array |
| 7 | EXEC | `datalistIns.clearArray()` — Clear insert artifact |
| 8 | CALL | `datalistMod = bean.getDataBeanArray(KKW12601SFConst.KANUORESO_LIST_MOD)` — Get modification artifact array |
| 9 | EXEC | `datalistMod.clearArray()` — Clear modification artifact |
| 10 | CALL | `datalistBf = bean.getDataBeanArray(KKW12601SFConst.KANUORESO_LIST_BF)` — Get before-update snapshot |
| 11 | CALL | `datalist = bean.getDataBeanArray(KKW12601SFConst.KANUORESO_LIST)` — Get main list |
| 12 | SET | `updflg = false` — No changes flag |
| 13 | SET | `insflg = false` — Reissue flag |
| 14 | SET | `msgOputFlg = false` — Message output flag |
| 15 | SET | `svcKeiNo = ""` — Service contract number accumulator |

**Block 2** — [FOR LOOP] Iterate over all list rows (L706)

> Loops through each row in the welcome letter list, extracting field values and performing change detection.

| # | Type | Code |
|---|------|------|
| 1 | SET | `i = 0` — Loop counter |
| 2 | SET | `i < datalist.getCount()` — Loop condition |
| 3 | SET | `i++` — Increment |
| 4 | CALL | `dataBean = datalist.getDataBean(i)` — Get current row data bean |
| 5 | CALL | `kanuoreso_no = dataBean.sendMessageString(KKW12601SFConst.KANUORESO_HAKKO_NO_02, ...)` — Welcome letter issuance number |
| 6 | CALL | `hikinuki = dataBean.sendMessageBoolean(KKW12601SFConst.HIKINUKI_02, ...)` — Withdrawal flag |
| 7 | CALL | `send_jgi = dataBean.sendMessageBoolean(KKW12601SFConst.SEND_JGI_02, ...)` — Send exclusion flag |
| 8 | CALL | `re_hako = dataBean.sendMessageBoolean(KKW12601SFConst.RE_HAKO_02, ...)` — Reissue flag |
| 9 | CALL | `send_dtm = dataBean.sendMessageString(KKW12601SFConst.SEND_DTM_02, ...)` — Send timestamp |
| 10 | CALL | `svc_kei_no = dataBean.sendMessageString(KKW12601SFConst.SVC_KEI_NO_02, ...)` — Service contract number |
| 11 | CALL | `tnmt_buy_tchisho_oput_skcd = dataBean.sendMessageString(KKW12601SFConst.TNMT_BUY_TCHISHO_OPUT_SKCD_02, ...)` — Terminal purchase notification letter output code |

**Block 2.1** — [IF] Reissue check: re_hako == true (L713)

> Detects if the reissue checkbox is checked. If the record has already been sent (send_dtm is set), sets updflg and insflg. Otherwise, displays an error and returns early (the reissue checkbox is not allowed on unsent data per ANK-2837-00-00, added 2016/03/23, restoring functionality removed by ANK-2737-00-00 in 2016/01/22).

| # | Type | Code |
|---|------|------|
| 1 | SET | `re_hako != null && re_hako == true` |
| 2 | [IF 2.1.1] — [IF] Check if already sent (send_dtm set) (L716) |
| 3 | SET | `send_dtm != null && !"".equals(send_dtm)` |
| 4 | SET | `updflg = true` — Mark as having changes |
| 5 | SET | `insflg = true` — Mark as reissue |
| 6 | [ELSE 2.1.1] — Record is unsent but reissue is checked (ANK-2837-00-00) (L736) |
| 7 | SET | `msgInfo = {"未送信のデータに再発行チェックされている", "登録"}` — Error: reissue checked on unsent data |
| 8 | EXEC | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB0930_NW, msgInfo)` |
| 9 | RETURN | `return result` (false) — Early return with error |

**Block 2.2** — [ELSE-IF] Before-update comparison: withdrawal changed (L752)

> Compares the current withdrawal flag against the before-update snapshot. If different and the record has already been sent, blocks the update with an error.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `dataBeanBf = datalistBf.getDataBean(i)` — Get before-update snapshot |
| 2 | CALL | `hikinukiBf = dataBeanBf.sendMessageBoolean(KKW12601SFConst.HIKINUKI_FLG_03, ...)` — Before-update withdrawal flag |
| 3 | CALL | `send_jgiBf = dataBeanBf.sendMessageBoolean(KKW12601SFConst.SEND_JGI_FLG_03, ...)` — Before-update send exclusion flag |
| 4 | SET | `hikinuki != null && hikinukiBf != null && hikinuki != hikinukiBf` |
| 5 | [IF 2.2.1] — Check if already sent (L761) |
| 6 | SET | `send_dtm != null && !"".equals(send_dtm)` |
| 7 | SET | `msgInfo = {"送信済のデータの", "更新"}` — Error: sent data update |
| 8 | EXEC | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB0930_NW, msgInfo)` |
| 9 | RETURN | `return result` (false) — Early return |
| 10 | [ELSE 2.2.1] |
| 11 | SET | `updflg = true` — Change detected, mark for storage |

**Block 2.3** — [ELSE] Send exclusion changed (L774)

> If the withdrawal flag did not change, check whether the send exclusion flag changed. Same send-datetime guard applies.

| # | Type | Code |
|---|------|------|
| 1 | SET | `send_jgi != null && send_jgiBf != null && send_jgi != send_jgiBf` |
| 2 | [IF 2.3.1] — Check if already sent (L780) |
| 3 | SET | `send_dtm != null && !"".equals(send_dtm)` |
| 4 | SET | `msgInfo = {"送信済のデータの", "更新"}` — Error: sent data update |
| 5 | EXEC | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB0930_NW, msgInfo)` |
| 6 | RETURN | `return result` (false) — Early return |
| 7 | [ELSE 2.3.1] |
| 8 | SET | `updflg = true` — Change detected |

**Block 2.4** — [IF] Send exclusion checked + terminal notification required (ANK-1200-00-00) (L796)

> When send exclusion is newly checked (send_jgi changed to true) AND the terminal purchase notification letter output code is "1" (required), set the message output flag and accumulate service contract numbers.

| # | Type | Code |
|---|------|------|
| 1 | SET | `send_jgi changed AND send_jgi == true` |
| 2 | SET | `tnmt_buy_tchisho_oput_skcd.equals(TNMT_BUY_TCS_OPUT_SKCD_Y = "1")` — Terminal notification required |
| 3 | SET | `msgOputFlg = true` — Will show warning message later |
| 4 | [IF 2.4.1] — svcKeiNo is empty (first collection) |
| 5 | SET | `svcKeiNo = svc_kei_no` |
| 6 | [ELSE 2.4.1] — Accumulate comma-separated |
| 7 | SET | `svcKeiNo = svcKeiNo + "," + svc_kei_no` |

**Block 2.5** — [IF] Save change artifacts (L817)

> When updflg is true (a change was detected), copy the current row data into artifact arrays. Creates separate entries for update vs. insert (reissue) vs. modification with derived values.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updflg == true` |
| 2 | CALL | `dataBeanUpd = datalistUpd.addDataBean()` — Create update artifact entry |
| 3 | CALL | `itemNames = dataBeanUpd.getItemNameList()` — Get field names |
| 4 | [FOR LOOP 2.5.1] — Copy all fields from original data bean |
| 5 | SET | `j = 0` to `j < itemNames.length` |
| 6 | CALL | `val = dataBean.sendMessageObject(itemNames[j], DATABEAN_GET_VALUE)` |
| 7 | [IF 2.5.1.1] — Boolean field |
| 8 | EXEC | `dataBeanUpd.sendMessageBoolean(itemNames[j], DATABEAN_SET_VALUE, (Boolean)val)` |
| 9 | [IF 2.5.1.2] — String field |
| 10 | EXEC | `dataBeanUpd.sendMessageString(itemNames[j], DATABEAN_SET_VALUE, (String)val)` |
| 11 | SET | `updflg = false` — Reset for next iteration |
| 12 | [IF 2.5.2] — Reissue path: insflg == true (L841) |
| 13 | CALL | `dataBeanIns = datalistIns.addDataBean()` — Create insert (reissue) artifact |
| 14 | EXEC | `dataBeanIns.sendMessageString(KKW12601SFConst.KANUORESO_HAKKO_NO_02, ..., kanuoreso_no)` |
| 15 | SET | `insflg = false` |
| 16 | [ELSE 2.5.2] — Regular modification path |
| 17 | CALL | `dataBeanMod = datalistMod.addDataBean()` — Create modification artifact |
| 18 | EXEC | `dataBeanMod.sendMessageString(KKW12601SFConst.KANUORESO_HAKKO_NO_02, ..., kanuoreso_no)` |
| 19 | [IF 2.5.3] — Determine letter dispatch division based on withdrawal flag |
| 20 | SET | `hikinuki == true` — Withdrawal selected |
| 21 | [IF 2.5.3.1] — Withdrawal selected: dispatch to KOPT |
| 22 | EXEC | `dataBeanMod.sendMessageString(LETTER_HASSO_SHIWAKE_DIV_02, ..., LETTER_SHIWAKE_KOPT = "1")` — Dispatch to KOPT |
| 23 | EXEC | `dataBeanUpd.sendMessageString(LETTER_HASSO_SHIWAKE_DIV_02, ..., LETTER_SHIWAKE_KOPT = "1")` |
| 24 | [ELSE 2.5.3.1] — No withdrawal: dispatch to regular address |
| 25 | EXEC | `dataBeanMod.sendMessageString(LETTER_HASSO_SHIWAKE_DIV_02, ..., LETTER_SHIWAKE_TUJYO = "0")` — Dispatch to regular address |
| 26 | EXEC | `dataBeanUpd.sendMessageString(LETTER_HASSO_SHIWAKE_DIV_02, ..., LETTER_SHIWAKE_TUJYO = "0")` |
| 27 | [IF 2.5.4] — Determine send exclusion flag based on send_jgi |
| 28 | SET | `send_jgi == true` — Send exclusion checked |
| 29 | [IF 2.5.4.1] — Send exclusion: set exclusion flag |
| 30 | EXEC | `dataBeanMod.sendMessageString(SEND_JGI_FLG_02, ..., SEND_JGI_JGI = "2")` — Send exclusion |
| 31 | EXEC | `dataBeanUpd.sendMessageString(SEND_JGI_FLG_02, ..., SEND_JGI_JGI = "2")` |
| 32 | [ELSE 2.5.4.1] — Not excluded: set send target |
| 33 | EXEC | `dataBeanMod.sendMessageString(SEND_JGI_FLG_02, ..., SEND_JGI_SEND = "1")` — Send target |
| 34 | EXEC | `dataBeanUpd.sendMessageString(SEND_JGI_FLG_02, ..., SEND_JGI_SEND = "1")` |
| 35 | EXEC | `dataBeanMod.sendMessageString(UPD_DTM_02, ..., dataBean.get(UPD_DTM_02))` — Set update timestamp |

**Block 3** — [IF] Post-loop: changes exist (updCnt > 0) (L899)

> After iterating all rows, if any changes were detected, invoke the batch send verification service and navigate to the confirmation screen.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updCnt = datalistUpd.getCount()` |
| 2 | SET | `updCnt != null && updCnt > 0` — Changes exist |
| 3 | CALL | `kanuoreso_choice = bean.sendMessageString(KKW12601SFConst.KANUORESO_CHOICE, ...)` — Get selected row index |
| 4 | [IF 3.1] — Parse selected row index |
| 5 | SET | `sel = 0` (default) |
| 6 | SET | `kanuoreso_choice != null && !"".equals(kanuoreso_choice)` |
| 7 | SET | `sel = Integer.parseInt(kanuoreso_choice)` |
| 8 | CALL | `dataBeanSel = datalist.getDataBean(sel)` — Get selected row data bean |
| 9 | CALL | `kanuoreso_no = dataBeanSel.sendMessageString(KKW12601SFConst.KANUORESO_HAKKO_NO_02, ...)` — Get issuance number |
| 10 | EXEC | `bean.sendMessageString(KKW12601SFConst.KANUORESO_HAKKO_NO, ..., kanuoreso_no)` — Store issuance number in bean |
| 11 | EXEC | `bean.sendMessageString(KKW12601SFConst.SEARCH_FLG, ..., SEARCH_FLG_Y = "1")` — Set search flag for confirmation screen |
| 12 | SET | `mapper = new KKSV0142_KKSV0142OPDBMapper()` — Create service mapper |
| 13 | SET | `inputMap = new HashMap<String, Object>()` — Create input parameter map |
| 14 | EXEC | `mapper.setKanuoresoIktTrkCC(paramBean, inputMap, JPCModelConstant.FUNC_CD_2)` — Map welcome letter items |
| 15 | EXEC | `mapper.setKKSV014201SC(paramBean, inputMap, JPCModelConstant.FUNC_CD_2)` — Map service contract data |
| 16 | CALL | `msgResult = invokeService("KKSV0142", "KKSV0142OP")` — Invoke batch send check service |
| 17 | CALL | `rslt = getKKSV0142Result(outputMap)` — Read service result |
| 18 | [IF 3.2] — Batch processing in progress (rslt == "1") |
| 19 | SET | `rslt.equals("1")` |
| 20 | SET | `msgInfo = {"送信バッチが実行中の", "更新"}` — Error: batch in progress |
| 21 | EXEC | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB0930_NW, msgInfo)` |
| 22 | [ELSE 3.2] — Navigate to confirmation screen |
| 23 | CALL | `commoninfoBean = super.getCommonInfoBean()` — Get shared common info bean |
| 24 | EXEC | `commoninfoBean.sendMessageString(NEXT_SCREEN_ID, ..., SCREEN_ID_KKW12605 = "KKW12605")` — Set next screen ID |
| 25 | EXEC | `commoninfoBean.sendMessageString(NEXT_SCREEN_NAME, ..., SCREEN_NAME_KKW12605 = "KKW12605")` — Set next screen name |
| 26 | EXEC | `JCCWebCommon.setScreenId(this, SCREEN_ID_KKW12606 = "KKW12606", SCREEN_ID_KKW12601 = "KKW12601")` — Set return screen |
| 27 | SET | `msgInfo = {"加入御礼書一覧更新"}` — Success message |
| 28 | EXEC | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB0370__I, msgInfo)` |
| 29 | [IF 3.2.1] — Show terminal notification warning if msgOputFlg was set |
| 30 | SET | `msgOputFlg == true` |
| 31 | SET | `msg = {"(" + svcKeiNo + ")"}` — Comma-separated service contract numbers |
| 32 | EXEC | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKBB410__Q, msg)` |

**Block 4** — [ELSE] No changes detected (L975)

> If no changes were found after iterating all rows, display an error message.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updCnt <= 0` — No changes |
| 2 | SET | `msgInfo = {"内容が変更されていない", "登録"}` — Error: content not changed |
| 3 | EXEC | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB0930_NW, msgInfo)` |

**Block 5** — [SET] DataBean dump and return (L980)

> Final logging and return.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` — Dump DataBean to log |
| 2 | RETURN | `return result` — Return true |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `kanuoreso` | Field | Welcome Letter — the formal welcome letter issued to new subscribers upon contract registration |
| `kanuoreso_no` | Field | Welcome letter issuance number — unique identifier for each welcome letter |
| `hikinuki` | Field | Withdrawal — indicates whether the subscriber has withdrawn from the service (checkbox on list) |
| `send_jgi` / `send_jgi_flg` | Field | Send exclusion — indicates whether the review result letter should be excluded from sending |
| `send_dtm` | Field | Send date/time — timestamp of when the welcome letter was actually sent; presence of a value means the letter has been dispatched |
| `re_hako` | Field | Reissue — indicates whether a reissue (copy reprint) of the welcome letter is requested |
| `svc_kei_no` | Field | Service contract number — internal tracking ID for a service contract line item |
| `tnmt_buy_tchisho_oput_skcd` | Field | Terminal purchase notification letter output code — determines whether a terminal purchase notification letter must be output ("1" = required) |
| `updflg` | Field | Update flag — indicates whether any changes were detected in the current row |
| `insflg` | Field | Insert (reissue) flag — indicates whether the change involves a reissue of the welcome letter |
| `msgOputFlg` | Field | Message output flag — indicates whether the terminal notification warning message should be displayed |
| LETTER_HASSO_SHIWAKE_DIV_02 | Field | Letter dispatch division — determines where the letter is sent ("0" = regular address, "1" = KOPT) |
| UPD_DTM_02 | Field | Update date/time — timestamp when the change was made |
| KANUORESO_LIST | Constant | Welcome letter list — the main data bean array holding all rows displayed on the list screen |
| KANUORESO_LIST_UPD | Constant | Welcome letter update information — artifact array holding rows with changes for the confirmation screen |
| KANUORESO_LIST_INS | Constant | Welcome letter registration information — artifact array holding reissue rows |
| KANUORESO_LIST_MOD | Constant | Welcome letter modification information — artifact array holding regular modification rows |
| KANUORESO_LIST_BF | Constant | Welcome letter before-update information — snapshot array holding the original values for comparison |
| KANUORESO_CHOICE | Constant | Welcome letter selected row — the index of the row selected by the user on the confirmation grid |
| SEARCH_FLG | Constant | Search flag — set to "1" (yes) to trigger a re-query on the confirmation screen |
| TNMT_BUY_TCS_OPUT_SKCD_Y | Constant | Terminal purchase notification required — "1" means the notification letter output is required |
| LETTER_SHIWAKE_KOPT | Constant | Letter dispatch to KOPT — "1" indicates dispatch to the KOPT (K-Opticom) internal address |
| LETTER_SHIWAKE_TUJYO | Constant | Letter dispatch to regular address — "0" indicates dispatch to the customer's registered address |
| SEND_JGI_SEND | Constant | Send exclusion: send target — "1" indicates the review result letter should be sent |
| SEND_JGI_JGI | Constant | Send exclusion: excluded — "2" indicates the review result letter should NOT be sent |
| SEARCH_FLG_Y | Constant | Search flag: yes — "1" |
| JPCOnlineMessageConstant.EKB0930_NW | Constant | Error message code — used for "not changed" and "sent data update" errors |
| JPCOnlineMessageConstant.EKB0370__I | Constant | Success message code — used for "Welcome Letter List Update" success |
| JPCOnlineMessageConstant.EKBB410__Q | Constant | Warning message code — used for terminal notification warning |
| KKSV0142 | Screen | Welcome letter issuance batch send check screen — invokes the batch send verification service |
| KKSV0142OP | CBS | Welcome letter issuance batch send operation — the business component service invoked by KKSV0142 |
| KKW12601 | Screen | Welcome Letter List inquiry screen — the original screen where list changes are made |
| KKW12605 | Screen | Welcome Letter List update confirmation screen — where users review and confirm changes |
| KKW12606 | Screen | Welcome Letter List main screen — the return destination after confirmation |
| X31SDataBeanAccess | Framework | Service-side data bean access class — provides field-level get/set operations on session-bound data |
| X31SDataBeanAccessArray | Framework | Array wrapper for data beans — manages collections of X31SDataBeanAccess instances with add/get/count operations |
| KOPT | Business term | K-Opticom — the telecom operator; letters dispatched to KOPT are internal correspondence |
| FUNC_CD_2 | Constant | Function code 2 — indicates an update/confirmation operation mode in the service mapper |
| ANK-1200-00-00 | Change ticket | Terminal purchase notification letter output warning feature — added in v4.00 (2012/09/26) |
| ANK-2737-00-00 | Change ticket | Consumer protection law review — removed reissue check for unsent data in v23.00.00 (2016/01/22) |
| ANK-2837-00-00 | Change ticket | Reissue (copy) restoration — restored reissue check on unsent data in v23.00.01 (2016/03/23) |
| TAI-2012-0000101 | Change ticket | Send batch presence check — added batch processing status check in v4.02 (2012/12/09) |
