# Business Logic — KKW03204SFLogic.setDataInit() [103 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW03204SF.KKW03204SFLogic` |
| Layer | Controller / Web Logic (package `eo.web.webview`) |
| Module | `KKW03204SF` (Package: `eo.web.webview.KKW03204SF`) |

## 1. Role

### KKW03204SFLogic.setDataInit()

This method performs the **initial data setup** (初期データセット処理) for a K-Opticom web service contract screen. Its primary business purpose is to populate the **Service Form Bean** with customer and service contract data retrieved from the form data layer, and then conditionally configure the **tab operation interface control** based on telephone number sequencing preference.

The method operates as a **data extraction and routing bridge**: it reads customer service contract continuation items (顧客契約引承項目) from a data bean array obtained from the service form bean, extracts structured fields (transfer division, relocation division, system ID, service contract number), and then writes a comprehensive set of initialization values back into the service form bean for consumption by downstream screen logic.

A key conditional branch handles **variable-length item support**: when the service contract number list contains multiple elements (a String[] field), the method iterates to populate a local array and selects the first element as the optional service contract number. Another critical branch processes **relocation reason codes** (異動理由コード): it reads a count of reason codes from the customer data bean, iterates that count, and for each iteration populates (or appends) a relocation reason list data bean with the code and memo fields.

A secondary business concern is **telephone tab operation interface control code** (電話番号順から判断 → 電話タブオペレーション情報制御コード): depending on the value of `telno_jun`, the method sets either `TEL_1_TAB_OP_IF_CTL_CD` or `TEL_2_TAB_OP_IF_CTL_CD` to `"1"`, enabling or disabling specific telephone tabs in the UI.

The method also sets the **operation date** (運用年月日) and **operation date-time stamp** (運用年月日時分秒) into the service form bean, and statically assigns the **optional service code** (オプションサービスコード) to `"B029"`.

This method is an **internal helper** called from `KKW03204SFLogic.actionInit()`, serving as a dedicated initialization routine for the screen's data layer before further processing (such as contract termination handling or message routing) occurs.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setDataInit()"])
    START --> GET_OPE_DATE["Get opeDate from JCCWebCommon.getOpeDate()"]
    GET_OPE_DATE --> GET_SVC_BEAN["Get svcBean from super.getServiceFormBean()"]
    GET_SVC_BEAN --> GET_CUST_LIST["Get custKeiHktgiList from svcBean.getDataBeanArray(HKTGI_CUST_KEI_HKTGI_LIST)"]
    GET_CUST_LIST --> GET_CUST_INF["Get custKeiHktgiInf = custKeiHktgiList.getDataBean(0)"]
    GET_CUST_INF --> READ_FIELDS["Read trans_div, ido_div, sys_id, svc_kei_no from custKeiHktgiInf"]
    READ_FIELDS --> CHECK_LENGTH{"Check HKTGI_OP_SVC_KEI_NO count (length)"}
    CHECK_LENGTH --> LOOP_LEN["Loop i=0 to length-1, fill obj array"]
    LOOP_LEN --> SET_OP_SVC{"length > 0?"}
    SET_OP_SVC --> YES["op_svc_kei_no = obj[0]"]
    SET_OP_SVC --> NO["op_svc_kei_no = empty string"]
    YES --> GET_IDO_RSN_LIST["Get ido_rsn_list from svcBean.getDataBeanArray(IDO_RSN_LIST)"]
    NO --> GET_IDO_RSN_LIST
    GET_IDO_RSN_LIST --> GET_IDO_CNT["Get cnt from custKeiHktgiInf.sendMessage(IDO_RSN_CD_01, GET_COUNT)"]
    GET_IDO_CNT --> LOOP_IDO["Loop i=0 to cnt-1"]
    LOOP_IDO --> CHECK_RSN_LIST{"idx available in ido_rsn_list?"}
    CHECK_RSN_LIST --> GET_RSN_BEAN["ido_rsn_bean = getDataBean(i)"]
    CHECK_RSN_LIST --> ADD_RSN_BEAN["ido_rsn_bean = addDataBean()"]
    GET_RSN_BEAN --> CHECK_NULL{"ido_rsn_bean == null?"}
    ADD_RSN_BEAN --> CHECK_NULL
    CHECK_NULL --> YES_NULL["continue (skip)"]
    CHECK_NULL --> NO_NULL["Read ido_rsn_cd and ido_rsn_memo from custKeiHktgiInf"]
    YES_NULL --> SET_RSN_VALUES["Set ido_rsn_cd and ido_rsn_memo onto ido_rsn_bean"]
    NO_NULL --> SET_RSN_VALUES
    SET_RSN_VALUES --> LOOP_NEXT["Next iteration"]
    LOOP_NEXT --> GET_APP_NO["Get mskm_no from custKeiHktgiInf"]
    GET_APP_NO --> SET_APP_NO["Set mskm_no onto svcBean(MSKM_NO)"]
    SET_APP_NO --> GET_APP_DTL["Get mskm_dtl_no from custKeiHktgiInf"]
    GET_APP_DTL --> SET_APP_DTL["Set mskm_dtl_no onto svcBean(MSKM_DTL_NO)"]
    SET_APP_DTL --> SET_REMAIN["Set ido_div, sys_id, svc_kei_no, op_svc_kei_no onto svcBean"]
    SET_REMAIN --> SET_UNYO["Set UNYO_YMD and UNYO_DTM onto svcBean"]
    SET_UNYO --> SET_OP_SVC_CD["Set OP_SVC_CD = B029 onto svcBean"]
    SET_OP_SVC_CD --> READ_TELNO["Read telno_jun from custKeiHktgiInf"]
    READ_TELNO --> TELNO_CHECK{"telno_jun == 1?"}
    TELNO_CHECK --> TEL1["Set TEL_1_TAB_OP_IF_CTL_CD = 1"]
    TELNO_CHECK --> TEL_CHECK2{"telno_jun == 2?"}
    TEL1 --> TEL_CHECK2
    TEL_CHECK2 --> TEL2["Set TEL_2_TAB_OP_IF_CTL_CD = 1"]
    TEL_CHECK2 --> ELSE_SKIP["Skip (no tab control)"]
    TEL2 --> END(["Return"])
    ELSE_SKIP --> END
```

### Data Flow Pattern

This method follows a **read-transform-write** (RTW) pattern:
1. **Read**: Extract data from the service form bean's customer contract continuation list and data beans.
2. **Transform**: Process variable-length arrays, iterate relocation reason codes, resolve optional fields.
3. **Write**: Populate the service form bean with all extracted and computed values.

The method uses **databean message passing** (`sendMessageString`, `sendMessage`, `getDataBean`, `getDataBeanArray`, `addDataBean`, `setCount`) as its primary data access pattern rather than direct field access, following the framework's data bean abstraction model.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no parameters. It operates entirely on instance fields (e.g., `this.trans_div`, `this.OP_SVC_CD_050`) and the service form bean obtained via `super.getServiceFormBean()`. |

**Instance Fields / External State Read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `this.trans_div` | `String` | Transfer division — stores the processing division code (e.g., "cancel", "restore", "reservation cancellation") populated by the framework before this method runs. Used by the caller for conditional branching. |
| `this.OP_SVC_CD_050` | `String` | Optional service code constant (`"B029"`) — identifies the optional service type for this screen (050-ban haban hensoku — Issue #050 number change). |

## 4. CRUD Operations / Called Services

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

The following table classifies all method calls within `setDataInit()`.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JCCWebCommon.getOpeDate` | - | - | Reads the operation date (運用年月日) for this business session |
| R | `super.getServiceFormBean` | - | - | Retrieves the service form DataBean access object for this screen context |
| R | `X31SDataBeanAccess.getDataBeanArray` | - | Form DataBean | Reads the customer service contract continuation list (顧客契約引承リスト) from the service form bean |
| R | `X31SDataBeanAccess.getDataBean` | - | Form DataBean | Reads the first (index 0) data bean from the customer contract continuation list |
| R | `X31SDataBeanAccess.sendMessageString` | - | Form DataBean | Reads individual string fields from the customer data bean: transfer division, relocation division, system ID, service contract number |
| R | `X31SDataBeanAccess.sendMessage` | - | Form DataBean | Reads the count of optional service contract numbers (HKTGI_OP_SVC_KEI_NO) |
| R | `X31SDataBeanAccess.sendMessageString` (with index) | - | Form DataBean | Iterates and reads each optional service contract number value from the array |
| R | `X31SDataBeanAccess.getDataBeanArray` | - | Form DataBean | Reads the relocation reason list (異動理由リスト) from the service form bean |
| R | `X31SDataBeanAccess.sendMessage` | - | Form DataBean | Reads the count of relocation reason code elements |
| R | `X31SDataBeanAccess.getDataBean` | - | Form DataBean | Reads the relocation reason data bean at the given index |
| C | `X31SDataBeanAccess.addDataBean` | - | Form DataBean | Appends a new data bean to the relocation reason list when the list doesn't yet have an element at the required index |
| R | `X31SDataBeanAccess.sendMessageString` (IDO_RSN_CD_01) | - | Form DataBean | Reads the relocation reason code for the current iteration |
| R | `X31SDataBeanAccess.sendMessageString` (IDO_RSN_MEMO_01) | - | Form DataBean | Reads the relocation reason memo text |
| EXEC | `X31SDataBeanAccess.sendMessageString` (IDO_RSN_CD_02) | - | Form DataBean | Writes the relocation reason code to the destination data bean |
| EXEC | `X31SDataBeanAccess.sendMessageString` (IDO_RSN_MEMO_02) | - | Form DataBean | Writes the relocation reason memo to the destination data bean |
| R | `X31SDataBeanAccess.sendMessageString` (MSKM_NO_01) | - | Form DataBean | Reads the application number (申込番号) |
| EXEC | `X31SDataBeanAccess.sendMessageString` (MSKM_NO) | - | Form DataBean | Writes the application number to the service form bean |
| R | `X31SDataBeanAccess.sendMessageString` (MSKM_DTL_NO_01) | - | Form DataBean | Reads the application detail number (申込詳細番号) |
| EXEC | `X31SDataBeanAccess.sendMessageString` (MSKM_DTL_NO) | - | Form DataBean | Writes the application detail number to the service form bean |
| EXEC | `X31SDataBeanAccess.sendMessageString` (IDO_DIV) | - | Form DataBean | Writes the relocation division code to the service form bean |
| EXEC | `X31SDataBeanAccess.sendMessageString` (SYS_ID) | - | Form DataBean | Writes the system ID to the service form bean |
| EXEC | `X31SDataBeanAccess.sendMessageString` (SVC_KEI_NO) | - | Form DataBean | Writes the service contract number to the service form bean |
| EXEC | `X31SDataBeanAccess.sendMessageString` (OP_SVC_KEI_NO) | - | Form DataBean | Writes the optional service contract number to the service form bean |
| EXEC | `X31SDataBeanAccess.sendMessageString` (UNYO_YMD) | - | Form DataBean | Writes the operation date (運用年月日) to the service form bean |
| R | `JCCWebCommon.getSysDateTimeStamp` | - | - | Reads the current system date-time stamp |
| EXEC | `X31SDataBeanAccess.sendMessageString` (UNYO_DTM) | - | Form DataBean | Writes the operation date-time stamp to the service form bean |
| EXEC | `X31SDataBeanAccess.sendMessageString` (OP_SVC_CD) | - | Form DataBean | Writes the optional service code (B029) to the service form bean |
| R | `X31SDataBeanAccess.sendMessageString` (TELNO_JUN_02) | - | Form DataBean | Reads the telephone number sequence preference |
| EXEC | `X31SDataBeanAccess.sendMessageString` (TEL_1_TAB_OP_IF_CTL_CD) | - | Form DataBean | Writes telephone tab 1 operation interface control code = "1" (enable) |
| EXEC | `X31SDataBeanAccess.sendMessageString` (TEL_2_TAB_OP_IF_CTL_CD) | - | Form DataBean | Writes telephone tab 2 operation interface control code = "1" (enable) |

## 5. Dependency Trace

### Callers

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Method: `KKW03204SFLogic.actionInit()` | `actionInit()` calls `setDataInit()` | `getSysDateTimeStamp` [R], `sendMessageString` [C/R/U], `getDataBean` [R], `addDataBean` [C] |

**Caller context:** `actionInit()` is the screen entry point method of the `KKW03204SF` logic class. It first reads screen information via `JCCWebCommon.getScreenInfo(this)`, then obtains the service form bean and sets the optional service code (`B029`), before calling `setDataInit()` to populate the form bean with customer and service data. After `setDataInit()` returns, the caller branches on `trans_div` to invoke `setDataInit_Kaiyaku()` (cancel mode) or set completion messages.

### Terminal operations reached from this method

The method's terminal (leaf) operations are:
- **`JCCWebCommon.getOpeDate()`** [R] — reads the operation date from the framework
- **`JCCWebCommon.getSysDateTimeStamp()`** [R] — reads the current system timestamp
- **`X31SDataBeanAccess` methods** [R/C/EXEC] — read, create, and write data bean fields in the service form bean (no direct DB interaction — the form bean is populated by the framework from upstream screens or CBS calls)
- **No direct database table operations** — this method only manipulates form-level DataBean objects. Actual DB reads/writes are performed by upstream callers (e.g., `setKKSV0135*SC` mappers called after `setDataInit()` in `actionInit()`).

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] `(get operation date and service form bean) (L620)`

> Retrieve the operation date and access the service form bean for all subsequent data operations.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `opeDate = JCCWebCommon.getOpeDate(this, null)` // Get operation date (運用年月日) [-> HKTGI_CUST_KEI_HKTGI_LIST = "顧客契約引承リスト"] |
| 2 | CALL | `svcBean = super.getServiceFormBean()` // Get service form bean access |

**Block 2** — [SET] `(get customer service contract continuation list) (L624)`

> Retrieve the customer service contract continuation items list from the service form bean.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `custKeiHktgiList = svcBean.getDataBeanArray(JKKCommonConst.HKTGI_CUST_KEI_HKTGI_LIST)` // Get customer contract continuation list |
| 2 | CALL | `custKeiHktgiInf = custKeiHktgiList.getDataBean(0)` // Get first element of the list |

**Block 3** — [SET] `(read basic fields from customer data bean) (L627)`

> Extract four core fields from the first customer contract continuation data bean.

| # | Type | Code | Business Meaning |
|---|------|------|-----------------|
| 1 | CALL | `trans_div = custKeiHktgiInf.sendMessageString(JKKCommonConst.HKTGI_TRAN_DIV, X31CWebConst.DATABEAN_GET_VALUE)` | Transfer division (処理区分) — determines processing mode (cancel/restore/reservation cancel) |
| 2 | CALL | `ido_div = custKeiHktgiInf.sendMessageString(JKKCommonConst.HKTGI_IDO_DIV, X31CWebConst.DATABEAN_GET_VALUE)` | Relocation division (異動区分) |
| 3 | CALL | `sys_id = custKeiHktgiInf.sendMessageString(JKKCommonConst.HKTGI_SYSID, X31CWebConst.DATABEAN_GET_VALUE)` | System ID (SYSID) |
| 4 | CALL | `svc_kei_no = custKeiHktgiInf.sendMessageString(JKKCommonConst.HKTGI_SVC_KEI_NO, X31CWebConst.DATABEAN_GET_VALUE)` | Service contract number (サービス契約番号) |

**Block 4** — [IF-ELSE] `(variable-length item support — optional service contract number) (L631)`

> Handle optional service contract numbers that may be stored as a String[] array. The method reads the array count, iterates to populate a local String array, then selects the first element as the optional service contract number.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `length = (Integer)custKeiHktgiInf.sendMessage(JKKCommonConst.HKTGI_OP_SVC_KEI_NO, X31CWebConst.DATABEAN_GET_COUNT)` // Get array count |
| 2 | SET | `obj = new String[length]` // Create local array |
| 3 | FOR | `for (int i = 0; i < length; i++)` // Iterate over each element |
| 3.1 | CALL | `obj[i] = custKeiHktgiInf.sendMessageString(JKKCommonConst.HKTGI_OP_SVC_KEI_NO, X31CWebConst.DATABEAN_GET_VALUE, i)` |

**Block 4.1** — [IF] `(length > 0)` `(L636)`

| # | Type | Code | Business Meaning |
|---|------|------|-----------------|
| 1 | SET | `op_svc_kei_no = obj[0]` // Set optional service contract number from first element |
| 2 | SET | `op_svc_kei_no = ""` // (else) empty string |

**Block 5** — [SET] `(get relocation reason list) (L641)`

> Retrieve the relocation reason list data bean array from the service form bean.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `ido_rsn_list = svcBean.getDataBeanArray(KKW03204SFConst.IDO_RSN_LIST)` // [-> IDO_RSN_LIST = "異動理由リスト"] |

**Block 6** — [SET] `(get relocation reason code count) (L644)`

| # | Type | Code |
|---|------|------|
| 1 | CALL | `cnt = (Integer)custKeiHktgiInf.sendMessage(KKW03204SFConst.IDO_RSN_CD_01, X31CWebConst.DATABEAN_GET_COUNT)` // [-> IDO_RSN_CD_01 = "異動理由コード"] |

**Block 7** — [FOR] `(iterate over relocation reason codes) (L647)`

> For each relocation reason code, either reuse an existing data bean in the list or append a new one, then populate it with the code and memo.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ido_rsn_bean = null` // Initialize to null (must check before use) |
| 2 | IF | `if (ido_rsn_list.getCount() - 1 >= i)` // Check if list has enough elements |
| 2.1 | CALL | `ido_rsn_bean = ido_rsn_list.getDataBean(i)` |
| 3 | ELSE | `(else)` // List is too short, append new data bean |
| 3.1 | CALL | `ido_rsn_bean = ido_rsn_list.addDataBean()` // [-> C operation on form data bean] |
| 4 | IF | `if (ido_rsn_bean == null)` // Safety check — skip if bean creation failed |
| 4.1 | EXEC | `continue` // Skip this iteration |

**Block 7.1** — [SET] `(read and write relocation reason code and memo) (L657)`

> Read the relocation reason code and memo from the source customer data bean, then write them to the destination relocation reason data bean.

| # | Type | Code | Business Meaning |
|---|------|------|-----------------|
| 1 | CALL | `ido_rsn_cd = custKeiHktgiInf.sendMessageString(KKW03204SFConst.IDO_RSN_CD_01, X31CWebConst.DATABEAN_GET_VALUE, i)` // [-> IDO_RSN_CD_01 = "異動理由コード"] — Relocation reason code |
| 2 | CALL | `ido_rsn_memo = custKeiHktgiInf.sendMessageString(KKW03204SFConst.IDO_RSN_MEMO_01, X31CWebConst.DATABEAN_GET_VALUE)` // [-> IDO_RSN_MEMO_01] — Relocation reason memo |
| 3 | CALL | `ido_rsn_bean.sendMessageString(KKW03204SFConst.IDO_RSN_CD_02, X31CWebConst.DATABEAN_SET_VALUE, ido_rsn_cd)` // [-> IDO_RSN_CD_02 = "異動理由コード"] — Write code to destination |
| 4 | CALL | `ido_rsn_bean.sendMessageString(KKW03204SFConst.IDO_RSN_MEMO_02, X31CWebConst.DATABEAN_SET_VALUE, ido_rsn_memo)` // [-> IDO_RSN_MEMO_02] — Write memo to destination |

**Block 8** — [SET] `(transfer application number) (L664)`

> Read the application number from the customer data bean and write it to the service form bean.

| # | Type | Code | Business Meaning |
|---|------|------|-----------------|
| 1 | CALL | `mskm_no = custKeiHktgiInf.sendMessageString(KKW03204SFConst.MSKM_NO_01, X31CWebConst.DATABEAN_GET_VALUE)` // [-> MSKM_NO_01] — Read application number (申込番号) |
| 2 | CALL | `svcBean.sendMessageString(KKW03204SFConst.MSKM_NO, X31CWebConst.DATABEAN_SET_VALUE, mskm_no)` // [-> MSKM_NO = "申込番号"] — Write to service form bean |

**Block 9** — [SET] `(transfer application detail number) (L667)`

> Read the application detail number from the customer data bean and write it to the service form bean.

| # | Type | Code | Business Meaning |
|---|------|------|-----------------|
| 1 | CALL | `mskm_dtl_no = custKeiHktgiInf.sendMessageString(KKW03204SFConst.MSKM_DTL_NO_01, X31CWebConst.DATABEAN_GET_VALUE)` // [-> MSKM_DTL_NO_01] — Read application detail number (申込詳細番号) |
| 2 | CALL | `svcBean.sendMessageString(KKW03204SFConst.MSKM_DTL_NO, X31CWebConst.DATABEAN_SET_VALUE, mskm_dtl_no)` // [-> MSKM_DTL_NO = "申込詳細番号"] — Write to service form bean |

**Block 10** — [SET] `(transfer relocation, system, service, and optional service identifiers) (L669)`

> Write the four core identifiers (relocation division, system ID, service contract number, optional service contract number) to the service form bean.

| # | Type | Code | Business Meaning |
|---|------|------|-----------------|
| 1 | CALL | `svcBean.sendMessageString(KKW03204SFConst.IDO_DIV, X31CWebConst.DATABEAN_SET_VALUE, ido_div)` // [-> IDO_DIV = "異動区分"] |
| 2 | CALL | `svcBean.sendMessageString(KKW03204SFConst.SYS_ID, X31CWebConst.DATABEAN_SET_VALUE, sys_id)` // [-> SYS_ID = "SYSID"] |
| 3 | CALL | `svcBean.sendMessageString(KKW03204SFConst.SVC_KEI_NO, X31CWebConst.DATABEAN_SET_VALUE, svc_kei_no)` // [-> SVC_KEI_NO = "サービス契約番号"] |
| 4 | CALL | `svcBean.sendMessageString(KKW03204SFConst.OP_SVC_KEI_NO, X31CWebConst.DATABEAN_SET_VALUE, op_svc_kei_no)` // [-> OP_SVC_KEI_NO = "オプションサービス契約番号"] |

**Block 11** — [SET] `(set operation date and timestamp) (L673)`

> Write the operation date and system date-time stamp to the service form bean.

| # | Type | Code | Business Meaning |
|---|------|------|-----------------|
| 1 | CALL | `svcBean.sendMessageString(KKW03204SFConst.UNYO_YMD, X31CWebConst.DATABEAN_SET_VALUE, opeDate)` // [-> UNYO_YMD = "運用年月日"] |
| 2 | CALL | `svcBean.sendMessageString(KKW03204SFConst.UNYO_DTM, X31CWebConst.DATABEAN_SET_VALUE, JCCWebCommon.getSysDateTimeStamp())` // [-> UNYO_DTM = "運用年月日時分秒"] |

**Block 12** — [SET] `(set optional service code) (L676)`

> Write the optional service code for screen 050.

| # | Type | Code | Business Meaning |
|---|------|------|-----------------|
| 1 | CALL | `svcBean.sendMessageString(KKW03204SFConst.OP_SVC_CD, X31CWebConst.DATABEAN_SET_VALUE, OP_SVC_CD_050)` // [-> OP_SVC_CD = "オプションサービスコード", OP_SVC_CD_050 = "B029"] — Optional service code for #050 number change |

**Block 13** — [IF-ELSE IF] `(telephone tab operation interface control code based on telephone number sequence) (L681)`

> Determine which telephone tab should be enabled for the optional service based on the telephone number sequence preference (`telno_jun`). When `telno_jun` is `"1"`, enable the first telephone tab; when `"2"`, enable the second telephone tab.

| # | Type | Code | Business Meaning |
|---|------|------|-----------------|
| 1 | CALL | `telno_jun = custKeiHktgiInf.sendMessageString(KKW03204SFConst.TELNO_JUN_02, X31CWebConst.DATABEAN_GET_VALUE)` // [-> TELNO_JUN_02] — Read telephone number sequence (電話番号順) |
| 2 | IF | `if ("1".equals(telno_jun))` — [-> First telephone tab control] |
| 2.1 | CALL | `svcBean.sendMessageString(KKW03204SFConst.TEL_1_TAB_OP_IF_CTL_CD, X31CWebConst.DATABEAN_SET_VALUE, "1")` // [-> TEL_1_TAB_OP_IF_CTL_CD] — Enable tab 1 |
| 3 | ELSE IF | `else if ("2".equals(telno_jun))` — [-> Second telephone tab control] |
| 3.1 | CALL | `svcBean.sendMessageString(KKW03204SFConst.TEL_2_TAB_OP_IF_CTL_CD, X31CWebConst.DATABEAN_SET_VALUE, "1")` // [-> TEL_2_TAB_OP_IF_CTL_CD] — Enable tab 2 |
| 4 | ELSE | `(implicit) — No tab control set when telno_jun is neither "1" nor "2"` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `trans_div` | Field | Transfer division (処理区分) — Processing mode code that determines how the screen behaves (e.g., cancel/restore/reservation cancel). Values include: `OP_TRAN_DIV_DSL` (解約/cancellation), `OP_TRAN_DIV_KAIHK` (回復/restore), `OP_TRAN_DIV_RSV_CL` (予約取消/reservation cancellation). |
| `ido_div` | Field | Relocation division (異動区分) — Indicates the type of service relocation (e.g., new connection, change, transfer). |
| `sys_id` | Field | System ID (SYSID) — Identifies which K-Opticom system originated this service contract data. |
| `svc_kei_no` | Field | Service contract number (サービス契約番号) — The unique identifier for a customer's service contract. |
| `op_svc_kei_no` | Field | Optional service contract number (オプションサービス契約番号) — The contract number for an optional/add-on service associated with the main service contract. |
| `mskm_no` | Field | Application number (申込番号) — The application/order reference number for this customer request. |
| `mskm_dtl_no` | Field | Application detail number (申込詳細番号) — The detail line item number within an application. |
| `ido_rsn_cd` | Field | Relocation reason code (異動理由コード) — The code explaining why a service is being relocated or changed. |
| `ido_rsn_memo` | Field | Relocation reason memo (異動理由メモ) — Free-text memo explaining the relocation reason. |
| `telno_jun` | Field | Telephone number sequence (電話番号順) — Indicates the preferred telephone tab order for optional service UI. Value `"1"` enables the first telephone tab, `"2"` enables the second. |
| `UNYO_YMD` | Constant | Operation date (運用年月日) — The business operation date used for this transaction, obtained from the framework. |
| `UNYO_DTM` | Constant | Operation date-time stamp (運用年月日時分秒) — Full timestamp of the business operation date. |
| `OP_SVC_CD_050` | Constant | Optional service code for screen 050 — Value `"B029"`, represents the #050 number change service (050番番号変更). |
| `IDO_RSN_LIST` | Constant | Relocation reason list (異動理由リスト) — The DataBean array key holding the list of relocation reasons. |
| `CUST_KEI_HKTGI_LIST` / `HKTGI_CUST_KEI_HKTGI_LIST` | Constant | Customer service contract continuation list (顧客契約引承リスト) — The DataBean array key holding customer contract data from the upstream screen. |
| HKTGI | Acronym | Customer service contract continuation (顧客契約引承) — A data group representing a customer's ongoing service contract items. |
| SFC | Screen | `KKW03204SF` — The web screen module for #050 number change (050番番号変更) optional service. |
| DataBean | Pattern | X31SDataBeanAccess — The framework's data bean abstraction for passing screen data between layers using message-based get/set operations. |
| OP_TRAN_DIV_DSL | Constant | Processing division for cancellation (解約) — Triggers the `setDataInit_Kaiyaku()` initialization path. |
| OP_TRAN_DIV_KAIHK | Constant | Processing division for restore (回復) — Triggers restore message display. |
| OP_TRAN_DIV_RSV_CL | Constant | Processing division for reservation cancellation (予約取消) — Triggers reservation cancel message display. |
| KKSV0135*SC | SC Code | KKSV0135 screen component SCs — Database mapping service components called after `setDataInit()` completes, responsible for service item-DataBean matching (サービス項目-DataBean項目マッチング). |
| K-Opticom | Business term | A Japanese telecommunications provider offering fiber-optic (FTTH), mobile, and other telecommunications services. |
| 050-ban haban hensoku | Business term | #050 number change — A K-Opticom optional service allowing customers to change their telephone number. |
