# Business Logic — KKW00804SFLogic.setHPInfoBean() [210 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00804SF.KKW00804SFLogic` |
| Layer | Controller / Service Logic (web logic layer) |
| Module | `KKW00804SF` (Package: `eo.web.webview.KKW00804SF`) |

## 1. Role

### KKW00804SFLogic.setHPInfoBean()

This method is responsible for populating the My Home Page information DataBean with a comprehensive set of business values required for the Home Page information registration screen (KKW00804SF). It acts as a **central data assembler** — translating user-selected capacity values into their numeric equivalents, resolving dropdown list lookups (capacity codes, capacity names, analysis names) from index-based arrays, constructing derived date values (use start date, service charge start date), determining the application type (operation settings vs. new application) based on the movement division code, and computing the additional capacity cost difference between the user-selected capacity and the free capacity baseline. The method then assigns a full suite of static service order constants — including order subtype codes, service order codes, order issuance conditions, request types, and order content codes — to prepare the bean for downstream submission processing (executeAddCfmSvc). It serves as a **shared utility method** called by `actionAddMyHPInfo()`, making it the critical pre-submission data preparation step for the My Home Page registration flow.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setHPInfoBean paramBean"])
    START --> GET_CAPA["Get Home Page capacity info from bean"]
    GET_CAPA --> PARSE_CAPA["Parse capacity value to Integer"]
    PARSE_CAPA --> SET_CAPA_VALUES["Set HP_CAPA_VALUE and CAPA fields"]
    SET_CAPA_VALUES --> GET_CAPA_NM["Get Home Page capacity name"]
    GET_CAPA_NM --> SET_CAPA_NM["Set HP_CAPA_NM field"]
    SET_CAPA_NM --> GET_ACCSS["Get access analysis name (fixed value 0)"]
    GET_ACCSS --> SET_ACCSS_NM["Set ACCSS_BNSK_NM field"]
    SET_ACCSS_NM --> GET_USE_DATE["Get use start date year/month/day"]
    GET_USE_DATE --> BUILD_USE_DATE["Build use_staymd string"]
    BUILD_USE_DATE --> SET_USE_DATE["Set USE_STAYMD field"]
    SET_USE_DATE --> BUILD_USE_STA_MON["Build use_sta_mon (1st of month)"]
    BUILD_USE_STA_MON --> GET_SVC_CHRG["Calculate service charge start date (add 1 month)"]
    GET_SVC_CHRG --> SET_SVC_CHRG["Set SVC_CHRG_STAYMD field"]
    SET_SVC_CHRG --> SET_OP_SVC["Set OP_SVC_CD to My Home Page"]
    SET_OP_SVC --> GET_IDO_DIV["Get movement type from bean"]
    GET_IDO_DIV --> CHECK_IDO["ido_div == IDO_DIV_OP 00031 ?"]
    CHECK_IDO --> IS_OP["Yes - Operation Settings branch"]
    CHECK_IDO --> IS_NEW["No - New Application branch"]
    IS_OP --> SET_OP_SBT["Set MSKM_SBT_CD to 00026"]
    SET_OP_SBT --> CHECK_USE_DATE["unyo_ymd equals use_staymd ?"]
    CHECK_USE_DATE --> SAME_DATE["Yes - PRG_STAT 5102"]
    CHECK_USE_DATE --> DIFF_DATE["No - PRG_STAT 5101"]
    SAME_DATE --> SET_PRG_OP_END["Set PRG_STAT to 5102"]
    DIFF_DATE --> SET_PRG_REQ["Set PRG_STAT to 5101"]
    IS_NEW --> SET_NEW_SBT["Set MSKM_SBT_CD to 00001"]
    SET_NEW_SBT --> CHECK_NEW_DATE["unyo_ymd equals use_staymd ?"]
    CHECK_NEW_DATE --> SAME_DATE2["Yes - PRG_STAT 5102"]
    CHECK_NEW_DATE --> DIFF_DATE2["No - PRG_STAT 5101"]
    SAME_DATE2 --> SET_PRG_END2["Set PRG_STAT to 5102"]
    DIFF_DATE2 --> SET_PRG_REQ2["Set PRG_STAT to 5101"]
    SET_PRG_OP_END --> SET_TKJK["Set PRG_TKJK_1 to My Home Page Info Add"]
    SET_PRG_END2 --> SET_TKJK
    SET_PRG_REQ --> SET_TKJK
    SET_PRG_REQ2 --> SET_TKJK
    SET_TKJK --> SET_AGING["Set AGING_SBT_CD to URL"]
    SET_AGING --> GET_URL_PARTS["Get hpad_domain and hpad_account"]
    GET_URL_PARTS --> BUILD_AGING_URL["Build aging_url from domain + account"]
    BUILD_AGING_URL --> SET_AGING_URL["Set AGING_URL field"]
    SET_AGING_URL --> SET_UNYO_YMD["Set UNYO_YMD via getOpeDate"]
    SET_UNYO_YMD --> SET_UNYO_DTM["Set UNYO_DTM with timestamp zeros"]
    SET_UNYO_DTM --> CHECK_ADD_CAPA["hp_capa_index != 0 ?"]
    CHECK_ADD_CAPA --> HAS_ADD["Yes - Calculate additional capacity"]
    CHECK_ADD_CAPA --> MIN_CAPA["No - Set add_capa to 0"]
    HAS_ADD --> GET_FREE_VAL["Get free capacity value from bean"]
    GET_FREE_VAL --> CALC_ADD_CAPA["add_capa = selected - free capacity"]
    CALC_ADD_CAPA --> CHECK_ADD_POS["add_capa > 0 ?"]
    CHECK_ADD_POS --> ADD_MORE["Yes - Set calculated add_capa"]
    CHECK_ADD_POS --> ADD_ZERO["No - Set add_capa to 0"]
    ADD_MORE --> SET_FINAL_FIELDS["Set final service fields"]
    ADD_ZERO --> SET_FINAL_FIELDS
    MIN_CAPA --> SET_FINAL_FIELDS
    SET_FINAL_FIELDS --> SET_SVC_STAT["Set SVC_KEI_STAT_UKE"]
    SET_SVC_STAT --> SET_OYA_KEI["Set OYA_KEI_SKBT_CD"]
    SET_OYA_KEI --> SET_OP_PCRS["Set OP_PCRS_CD and OP_PPLAN_CD"]
    SET_OP_PCRS --> SET_SBOP_PCRS["Set SBOP_PCRS_CD and SBOP_PPLAN_CD"]
    SET_SBOP_PCRS --> SET_ORDER_INFO["Set ORDER_SBT_CD, SVC_ORDER_CD, ODR_HAKKO_JOKEN_CD"]
    SET_ORDER_INFO --> SET_YOKYU["Set YOKYU_SBT_CD and ODR_NAIYO_CD variants"]
    SET_YOKYU --> SET_AUTO_APLY["Set RULE0059_AUTO_APLY"]
    SET_AUTO_APLY --> SET_NET_CTL["Set NET_TAB_OP_IF_CTL_CD to 1"]
    SET_NET_CTL --> SET_IDO_DTM["Set IDO_DTM to system date stamp"]
    SET_IDO_DTM --> LOG_BEAN["Log DataBean dump"]
    LOG_BEAN --> END_NODE(["Return / Next"])
```

**Key conditional branches:**

1. **ido_div == "00031" (IDO_DIV_OP)**: This distinguishes **Operation Settings** (operation application mode) from **New Application**. When it is an operation settings case, the application type code is set to `00026` (MSKM_SBT_CD_OP); otherwise, it defaults to `00001` (MSKM_SBT_CD_NEW for new applications). In both cases, the progress status is determined by comparing the operation date (`unyo_ymd`) against the use start date (`use_staymd`).

2. **hp_capa_index != "0"**: This determines whether the user has selected a non-zero (additional) capacity option. If so, the method computes the additional capacity by subtracting the free capacity value from the selected capacity. If the result is positive, it is stored; otherwise, `0` is stored.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `paramBean` | `X31SDataBeanAccess[]` | Array of DataBean objects carrying Home Page registration form data. Index 0 is the primary bean containing all input fields (Home Page capacity dropdown, use start date, domain, account, movement division, operation date) and all output fields that this method populates with resolved values. |
| - | `paramBean[0].getDataBeanArray(KKW00804SFConst.HP_CAPA_INFO)` | `X31SDataBeanAccessArray` | Home Page capacity information list — the dropdown selection source for available capacity options. |
| - | `paramBean[0].sendMessageString(...)` (GET) | Various | Input fields read from the bean: capacity index, capacity code, access analysis index, use start date (year/month/day), movement division (ido_div), operation date (unyo_ymd), Home Page domain, Home Page account, and free capacity value. |

**Instance fields read by this method:**
- `OP_SVC_CD_MYHP` — Operation service code constant for My Home Page
- `PRG_STAT_OP_END`, `PRG_STAT_OP_REQEST` — Progress status constants
- `MSKM_SBT_CD_OP`, `MSKM_SBT_CD_NEW` — Application type code constants
- `IDO_DIV_OP` — Movement division constant for operation settings
- `AGING_SBT_CD_URL` — Aging type code for URL
- `SVC_KEI_STAT_UKE` — Service contract status for "received"
- `OYA_KEI_SKBT_CD_SVC` — Parent contract identification code for service contract number
- `PCRS_CD_MYHP`, `PCRS_CD_HP` — Billing code constants
- `PPLAN_CD_MYHP`, `PPLAN_CD_HP` — Billing plan code constants
- `ORDER_SBT_CD_NET`, `SVC_ORDER_CD_WEB`, `ODR_HAKKO_JOKEN_CD_SOKU` — Order type/service order code/issuance condition constants
- `YOKYU_SBT_CD_NEW`, `YOKYU_SBT_CD_CHG` — Request type codes for new and change
- `ODR_NAIYO_CD_WEB_INS`, `ODR_NAIYO_CD_WEB_CHG` — Order content codes for web registration and web change
- `AUTO_APLY_YOU` — Business handling fee auto-apply flag
- `PRG_TKJK_1_VAL_MYHP_INFO_ADD` — Progress special item 1 value

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JCCWebCommon.getOpeDate(this, null)` | JCCWebCommon | - | Retrieves the current operation date (YYYYMMDD) — called twice for UNYO_YMD and UNYO_DTM |
| R | `JCCWebCommon.getSysDateTimeStamp()` | JCCWebCommon | - | Retrieves the system date and time stamp (YYYYMMDDHHmmSS) for IDO_DTM field |
| C | `JPCDateUtil.addMonth(use_sta_mon, 1)` | JPCDate | - | Adds 1 month to the start-of-month date to compute the service charge start date (SVC_CHRG_STAYMD) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.HP_CAPA_VALUE, X31CWebConst.DATABEAN_SET_VALUE, capa+"")` | DataBean | - | Sets the Home Page capacity code value field |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.CAPA, X31CWebConst.DATABEAN_SET_VALUE, capa+"")` | DataBean | - | Sets the capacity field |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.HP_CAPA_NM, X31CWebConst.DATABEAN_SET_VALUE, hp_capa_nm)` | DataBean | - | Sets the Home Page capacity name field |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.ACCSS_BNSK_NM, X31CWebConst.DATABEAN_SET_VALUE, bnsk_nm)` | DataBean | - | Sets the access analysis name field |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.USE_STAYMD, X31CWebConst.DATABEAN_SET_VALUE, use_staymd)` | DataBean | - | Sets the combined use start date field |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.SVC_CHRG_STAYMD, X31CWebConst.DATABEAN_SET_VALUE, svc_chrg_staymd)` | DataBean | - | Sets the service charge start date field |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.OP_SVC_CD, X31CWebConst.DATABEAN_SET_VALUE, OP_SVC_CD_MYHP)` | DataBean | - | Sets the operation service code (My Home Page) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.MSKM_SBT_CD, X31CWebConst.DATABEAN_SET_VALUE, MSKM_SBT_CD_OP|NEW)` | DataBean | - | Sets the application type code (00026 for operation / 00001 for new) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.PRG_STAT, X31CWebConst.DATABEAN_SET_VALUE, PRG_STAT_OP_END|REQEST)` | DataBean | - | Sets the progress status (5102 for completed / 5101 for in-progress) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.PRG_TKJK_1, X31CWebConst.DATABEAN_SET_VALUE, PRG_TKJK_1_VAL_MYHP_INFO_ADD)` | DataBean | - | Sets the progress special item 1 (My Home Page Info Add) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.AGING_SBT_CD, X31CWebConst.DATABEAN_SET_VALUE, AGING_SBT_CD_URL)` | DataBean | - | Sets the aging type code (URL) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.AGING_URL, X31CWebConst.DATABEAN_SET_VALUE, aging_url)` | DataBean | - | Sets the combined aging URL |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.UNYO_YMD, X31CWebConst.DATABEAN_SET_VALUE, opDate)` | DataBean | - | Sets the operation date |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.UNYO_DTM, X31CWebConst.DATABEAN_SET_VALUE, opDate + "000000000")` | DataBean | - | Sets the operation date-time stamp |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.IDO_DTM, X31CWebConst.DATABEAN_SET_VALUE, sysDateDtms)` | DataBean | - | Sets the movement date-time (system date stamp) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.ADD_CAPA, X31CWebConst.DATABEAN_SET_VALUE, add_capa|0)` | DataBean | - | Sets the additional capacity value |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.SVC_KEI_STAT_UKE, X31CWebConst.DATABEAN_SET_VALUE, SVC_KEI_STAT_UKE)` | DataBean | - | Sets the service contract status (Received) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.OYA_KEI_SKBT_CD, X31CWebConst.DATABEAN_SET_VALUE, OYA_KEI_SKBT_CD_SVC)` | DataBean | - | Sets the parent contract identification code |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.OP_PCRS_CD, X31CWebConst.DATABEAN_SET_VALUE, PCRS_CD_MYHP)` | DataBean | - | Sets the operation billing code |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.OP_PPLAN_CD, X31CWebConst.DATABEAN_SET_VALUE, PPLAN_CD_MYHP)` | DataBean | - | Sets the operation billing plan code |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.SBOP_PCRS_CD, X31CWebConst.DATABEAN_SET_VALUE, PCRS_CD_HP)` | DataBean | - | Sets the sub-operation billing code |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.SBOP_PPLAN_CD, X31CWebConst.DATABEAN_SET_VALUE, PPLAN_CD_HP)` | DataBean | - | Sets the sub-operation billing plan code |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.ORDER_SBT_CD, X31CWebConst.DATABEAN_SET_VALUE, ORDER_SBT_CD_NET)` | DataBean | - | Sets the order subtype code (Net) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.SVC_ORDER_CD, X31CWebConst.DATABEAN_SET_VALUE, SVC_ORDER_CD_WEB)` | DataBean | - | Sets the service order code (WEB) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.ODR_HAKKO_JOKEN_CD, X31CWebConst.DATABEAN_SET_VALUE, ODR_HAKKO_JOKEN_CD_SOKU)` | DataBean | - | Sets the order issuance condition code (Immediate) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.YOKYU_SBT_CD_URL, X31CWebConst.DATABEAN_SET_VALUE, YOKYU_SBT_CD_NEW)` | DataBean | - | Sets the request type code (Web: New) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.ODR_NAIYO_CD_URL, X31CWebConst.DATABEAN_SET_VALUE, ODR_NAIYO_CD_WEB_INS)` | DataBean | - | Sets the order content code (Web: Registration) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.YOKYU_SBT_CD_CAPA, X31CWebConst.DATABEAN_SET_VALUE, YOKYU_SBT_CD_CHG)` | DataBean | - | Sets the request type code (Capacity: Change) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.ODR_NAIYO_CD_CAPA, X31CWebConst.DATABEAN_SET_VALUE, ODR_NAIYO_CD_WEB_CHG)` | DataBean | - | Sets the order content code (Capacity: Web Change) |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.RULE0059_AUTO_APLY, X31CWebConst.DATABEAN_SET_VALUE, AUTO_APLY_YOU)` | DataBean | - | Sets the business handling fee auto-apply flag |
| - | `paramBean[0].sendMessageString(KKW00804SFConst.NET_TAB_OP_IF_CTL_CD, X31CWebConst.DATABEAN_SET_VALUE, "1")` | DataBean | - | Sets the web tab operation info control code |
| - | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` | JSYwebLog | - | Logs the complete DataBean dump for debugging/tracing |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW00804SF | `KKW00804SFLogic.actionAddMyHPInfo()` -> `setHPInfoBean(paramBean)` | `DataBean SET (37 fields)`, `JCCWebCommon.getOpeDate [R]`, `JCCWebCommon.getSysDateTimeStamp [R]`, `JPCDateUtil.addMonth [C]`, `JSYwebLog.println [-]` |

**Terminal operations reached from this method:**
- `sendMessageString` (DataBean SET) × 27 — Sets 27 output fields on the DataBean
- `getOpeDate` (JCCWebCommon R) — Retrieves current operation date
- `getSysDateTimeStamp` (JCCWebCommon R) — Retrieves system date-time stamp
- `addMonth` (JPCDateUtil C) — Computes service charge start date by adding 1 month
- `sendMessageString` (DataBean GET) × 10 — Reads 10 input fields from the DataBean
- `getDataBeanArray` / `getDataBean` (DataBean R) — Accesses nested DataBean arrays
- `println` (JSYwebLog -) — Logs the final DataBean state

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Home Page capacity resolution (L575)

> Retrieve the Home Page capacity information dropdown list from the bean, get the first capacity option, parse its index and value, and store resolved values.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `hp_capa_list = paramBean[0].getDataBeanArray(KKW00804SFConst.HP_CAPA_INFO)` | [-> `HP_CAPA_INFO = "Home Page capacity information"`] |
| 2 | EXEC | `hp_subbean = hp_capa_list.getDataBean(0)` | |
| 3 | EXEC | `hp_capa_index = hp_subbean.sendMessageString(KKW00804SFConst.INDEX_01, X31CWebConst.DATABEAN_GET_VALUE)` | [-> `INDEX_01 = "Addition"`] |
| 4 | EXEC | `hp_capa_value = hp_subbean.sendMessageString(KKW00804SFConst.CD_DIV_LIST_01, X31CWebConst.DATABEAN_GET_VALUE, Integer.parseInt(hp_capa_index))` | [-> `CD_DIV_LIST_01 = "Code list"`] |
| 5 | SET | `capa = Integer.parseInt(hp_capa_value)` | |
| 6 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.HP_CAPA_VALUE, X31CWebConst.DATABEAN_SET_VALUE, capa+"")` | [-> `HP_CAPA_VALUE = "Home Page capacity code"`] |
| 7 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.CAPA, X31CWebConst.DATABEAN_SET_VALUE, capa+"")` | [-> `CAPA = "Capacity"`] |

**Block 2** — [SET] Home Page capacity name lookup (L585)

> Retrieve the human-readable capacity name from the code name list using the same index.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `hp_capa_nm = hp_subbean.sendMessageString(KKW00804SFConst.CD_DIV_NM_LIST_01, X31CWebConst.DATABEAN_GET_VALUE, Integer.parseInt(hp_capa_index))` | [-> `CD_DIV_NM_LIST_01 = "Code name list"`] |
| 2 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.HP_CAPA_NM, X31CWebConst.DATABEAN_SET_VALUE, hp_capa_nm)` | [-> `HP_CAPA_NM = "Home Page capacity name"`] |

**Block 3** — [SET] Access analysis name (fixed) (L591)

> The access analysis name is always looked up at index 0 — this represents a fixed default value ("None").

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `accss_bnsk_list = paramBean[0].getDataBeanArray(KKW00804SFConst.ACCSS_BNSK_INFO)` | [-> `ACCSS_BNSK_INFO = "Access analysis information"`] |
| 2 | EXEC | `bnsk_subbean = accss_bnsk_list.getDataBean(0)` | |
| 3 | EXEC | `bnsk_nm = bnsk_subbean.sendMessageString(KKW00804SFConst.CD_DIV_NM_LIST_01, X31CWebConst.DATABEAN_GET_VALUE, 0)` | |
| 4 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.ACCSS_BNSK_NM, X31CWebConst.DATABEAN_SET_VALUE, bnsk_nm)` | [-> `ACCSS_BNSK_NM = "Access analysis name"`] |

**Block 4** — [SET] Use start date construction (L597)

> Combine the year, month, and day fields from the bean into a single YYYYMMDD string.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `use_staymd_year = paramBean[0].sendMessageString(KKW00804SFConst.USE_STAYMD_YEAR, X31CWebConst.DATABEAN_GET_VALUE)` | [-> `USE_STAYMD_YEAR = "Use start date (year)"`] |
| 2 | EXEC | `use_staymd_mon = paramBean[0].sendMessageString(KKW00804SFConst.USE_STAYMD_MON, X31CWebConst.DATABEAN_GET_VALUE)` | [-> `USE_STAYMD_MON = "Use start date (month)"`] |
| 3 | EXEC | `use_staymd_day = paramBean[0].sendMessageString(KKW00804SFConst.USE_STAYMD_DAY, X31CWebConst.DATABEAN_GET_VALUE)` | [-> `USE_STAYMD_DAY = "Use start date (day)"`] |
| 4 | SET | `use_staymd = use_staymd_year + use_staymd_mon + use_staymd_day` | |
| 5 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.USE_STAYMD, X31CWebConst.DATABEAN_SET_VALUE, use_staymd)` | [-> `USE_STAYMD = "Use start date"`] |
| 6 | SET | `use_sta_mon = use_staymd_year + use_staymd_mon + "01"` | Build first-of-month string |

**Block 5** — [IF] Service charge start date calculation (L604)

> If the use start date is not empty, add 1 month to the first-of-month date to compute the service charge start date.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_chrg_staymd = ""` | Initialize to empty |
| 2 | IF | `!"".equals(use_staymd)` | Check if use start date is non-empty |

**Block 5.1** — [SET] Inside IF — add 1 month (L607)

> Calculate the service charge start date by adding 1 month to the first-of-month date.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_chrg_staymd = JPCDateUtil.addMonth(use_sta_mon, 1)` | [-> `SVC_CHRG_STAYMD = "Service charge start date-year-month-day"`] |

**Block 5.2** — [ELSE] Empty use start date (implicit)

> If use start date is empty, svc_chrg_staymd remains empty string "".

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_chrg_staymd = ""` | (initialized in Block 5) |

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.SVC_CHRG_STAYMD, X31CWebConst.DATABEAN_SET_VALUE, svc_chrg_staymd)` | Set the computed service charge start date |

**Block 6** — [SET] Operation service code (L615)

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.OP_SVC_CD, X31CWebConst.DATABEAN_SET_VALUE, OP_SVC_CD_MYHP)` | [-> `OP_SVC_CD_MYHP = JKKCommonConst.OP_SVC_CD_VALUE_0020 (JKKCommonConst.java:...)` — Operation service code: My Home Page] |

**Block 7** — [IF/ELSE] Movement type branch — Operation Settings vs. New Application (L620)

> Determine whether this is an operation settings change (ido_div == "00031") or a new application. Each branch sets a different application type code and progress status based on whether the operation date matches the use start date.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `ido_div = paramBean[0].sendMessageString(KKW00804SFConst.IDO_DIV, X31CWebConst.DATABEAN_GET_VALUE)` | [-> `IDO_DIV = "Movement division"`] |
| 2 | EXEC | `unyo_ymd = paramBean[0].sendMessageString(KKW00804SFConst.UNYO_YMD, X31CWebConst.DATABEAN_GET_VALUE)` | [-> `UNYO_YMD = "Operation date"`] |
| 3 | IF | `IDO_DIV_OP.equals(ido_div)` | [-> `IDO_DIV_OP = "00031" (JKKCommonConst.java:1633) — Movement division: Operation settings`] |

**Block 7.1** — [IF] Operation Settings branch — Yes (L623)

> This is an operation settings change. Set application type to "00026" (Operation application).

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.MSKM_SBT_CD, X31CWebConst.DATABEAN_SET_VALUE, MSKM_SBT_CD_OP)` | [-> `MSKM_SBT_CD_OP = "00026" (JKKCommonConst.java:...) — Application type code: Operation application`] |
| 2 | IF | `unyo_ymd.equals(use_staymd)` | Compare operation date vs. use start date |

**Block 7.1.1** — [IF] Operation date matches use start date — Yes (L628)

> The operation date is the same as the use start date, meaning operation settings are complete.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.PRG_STAT, X31CWebConst.DATABEAN_SET_VALUE, PRG_STAT_OP_END)` | [-> `PRG_STAT_OP_END = "5102" (JKKCommonConst.java:...) — Progress status: Operation settings completed`] |

**Block 7.1.2** — [ELSE] Operation date does not match use start date — No (L635)

> The operation date differs from the use start date; the operation application is still pending.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.PRG_STAT, X31CWebConst.DATABEAN_SET_VALUE, PRG_STAT_OP_REQEST)` | [-> `PRG_STAT_OP_REQEST = "5101" (JKKCommonConst.java:...) — Progress status: Operation application in progress`] |

**Block 7.2** — [ELSE] New Application branch — No (L639)

> This is a new application. Set application type to "00001" (New application).

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.MSKM_SBT_CD, X31CWebConst.DATABEAN_SET_VALUE, MSKM_SBT_CD_NEW)` | [-> `MSKM_SBT_CD_NEW = "00001" (JKKCommonConst.java:...) — Application type code: New application`] |
| 2 | IF | `unyo_ymd.equals(use_staymd)` | Compare operation date vs. use start date |

**Block 7.2.1** — [IF] Operation date matches use start date — Yes (L644)

> Same date as above — progress status is "5102" (operation settings completed).

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.PRG_STAT, X31CWebConst.DATABEAN_SET_VALUE, PRG_STAT_OP_END)` | [-> `PRG_STAT_OP_END = "5102" — Progress status: Operation settings completed`] |

**Block 7.2.2** — [ELSE] Operation date does not match — No (L650)

> Different dates — progress status is "5101" (operation application in progress).

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.PRG_STAT, X31CWebConst.DATABEAN_SET_VALUE, PRG_STAT_OP_REQEST)` | [-> `PRG_STAT_OP_REQEST = "5101" — Progress status: Operation application in progress`] |

**Block 8** — [SET] Progress special item 1 (L655)

> Set the progress special item field to "My Home Page Information Registration".

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.PRG_TKJK_1, X31CWebConst.DATABEAN_SET_VALUE, PRG_TKJK_1_VAL_MYHP_INFO_ADD)` | [-> `PRG_TKJK_1_VAL_MYHP_INFO_ADD = "My Home Page Information Registration"`] |

**Block 9** — [SET] Aging type and URL (L659)

> Set the aging (collection/delinquency) type code to URL and construct the full aging URL.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.AGING_SBT_CD, X31CWebConst.DATABEAN_SET_VALUE, AGING_SBT_CD_URL)` | [-> `AGING_SBT_CD_URL = JKKCommonConst.AGING_SBT_CD_URL — Aging type code: URL`] |
| 2 | EXEC | `hpad_domain = paramBean[0].sendMessageString(KKW00804SFConst.HPAD_DOMAIN, X31CWebConst.DATABEAN_GET_VALUE)` | [-> `HPAD_DOMAIN = "Home Page Access Domain"`] |
| 3 | EXEC | `hpad_account = paramBean[0].sendMessageString(KKW00804SFConst.HPAD_ACCOUNT, X31CWebConst.DATABEAN_GET_VALUE)` | [-> `HPAD_ACCOUNT = "Home Page Access Account"`] |
| 4 | SET | `aging_url = hpad_domain + hpad_account` | Concatenate domain + account |
| 5 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.AGING_URL, X31CWebConst.DATABEAN_SET_VALUE, aging_url)` | [-> `AGING_URL = "Aging URL"`] |

**Block 10** — [SET] Operation date and date-time (L667)

> Set the operation date via `JCCWebCommon.getOpeDate()` and construct the date-time stamp.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.UNYO_YMD, X31CWebConst.DATABEAN_SET_VALUE, JCCWebCommon.getOpeDate(this, null))` | [-> `UNYO_YMD = "Operation date"`] |
| 2 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.UNYO_DTM, X31CWebConst.DATABEAN_SET_VALUE, JCCWebCommon.getOpeDate(this, null) + "000000000")` | [-> `UNYO_DTM = "Operation date-time"`] |

**Block 11** — [IF/ELSE] Additional capacity calculation (L673)

> If the user selected a non-zero capacity option, calculate the additional capacity by subtracting the free capacity value from the selected capacity.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!"0".equals(hp_capa_index)` | Check if a non-zero capacity was selected |

**Block 11.1** — [IF] Inside IF — has additional capacity selection (L676)

> Get the free capacity value from the bean and compute the additional capacity.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `hp_capa_value_min = paramBean[0].sendMessageString(KKW00804SFConst.SVCTK_BUT_MRYO_VALUE, X31CWebConst.DATABEAN_GET_VALUE)` | [-> `SVCTK_BUT_MRYO_VALUE = "Service item free value"`] |
| 2 | SET | `add_capa = Integer.parseInt(hp_capa_value) - Integer.parseInt(hp_capa_value_min)` | Calculate additional capacity |
| 3 | IF | `add_capa > 0` | Check if additional capacity is positive |

**Block 11.1.1** — [IF] Additional capacity is positive (L681)

> Register the computed additional capacity value.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.ADD_CAPA, X31CWebConst.DATABEAN_SET_VALUE, add_capa.toString())` | [-> `ADD_CAPA = "Additional capacity"`] |

**Block 11.1.2** — [ELSE] Additional capacity is zero or negative (L685)

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.ADD_CAPA, X31CWebConst.DATABEAN_SET_VALUE, "0")` | Set to "0" |

**Block 11.2** — [ELSE] User selected minimum/free capacity (L689)

> Set additional capacity to "0" since no upgrade was selected.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.ADD_CAPA, X31CWebConst.DATABEAN_SET_VALUE, "0")` | |

**Block 12** — [SET] Static service fields assignment (L697)

> Assign a comprehensive set of static constant values to the DataBean for the service order and billing information. These are all pre-defined constants with no branching.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.SVC_KEI_STAT_UKE, X31CWebConst.DATABEAN_SET_VALUE, SVC_KEI_STAT_UKE)` | [-> `SVC_KEI_STAT_UKE = JKKCommonConst.SVC_KEI_STAT_010 — Service contract status: Received`] |
| 2 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.OYA_KEI_SKBT_CD, X31CWebConst.DATABEAN_SET_VALUE, OYA_KEI_SKBT_CD_SVC)` | [-> `OYA_KEI_SKBT_CD_SVC = JKKCommonConst.OYA_KEI_SKBT_CD_SVC — Parent contract ID: service contract number`] |
| 3 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.OP_PCRS_CD, X31CWebConst.DATABEAN_SET_VALUE, PCRS_CD_MYHP)` | [-> `PCRS_CD_MYHP = JKKCommonConst.PCRS_CD_MYHP — Billing code: My Home Page`] |
| 4 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.OP_PPLAN_CD, X31CWebConst.DATABEAN_SET_VALUE, PPLAN_CD_MYHP)` | [-> `PPLAN_CD_MYHP = JKKCommonConst.PPLAN_CD_MYHP — Billing plan: My Home Page`] |
| 5 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.SBOP_PCRS_CD, X31CWebConst.DATABEAN_SET_VALUE, PCRS_CD_HP)` | [-> `PCRS_CD_HP = JKKCommonConst.PCRS_CD_HP — Billing code: Home Page capacity`] |
| 6 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.SBOP_PPLAN_CD, X31CWebConst.DATABEAN_SET_VALUE, PPLAN_CD_HP)` | [-> `PPLAN_CD_HP = JKKCommonConst.PPLAN_CD_HP — Billing plan: Home Page capacity`] |
| 7 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.ORDER_SBT_CD, X31CWebConst.DATABEAN_SET_VALUE, ORDER_SBT_CD_NET)` | [-> `ORDER_SBT_CD_NET = JKKCommonConst.ORDER_SBT_CD_NET — Order subtype: Net`] |
| 8 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.SVC_ORDER_CD, X31CWebConst.DATABEAN_SET_VALUE, SVC_ORDER_CD_WEB)` | [-> `SVC_ORDER_CD_WEB = JKKCommonConst.SVC_ORDER_CD_WEB — Service order code: WEB`] |
| 9 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.ODR_HAKKO_JOKEN_CD, X31CWebConst.DATABEAN_SET_VALUE, ODR_HAKKO_JOKEN_CD_SOKU)` | [-> `ODR_HAKKO_JOKEN_CD_SOKU = JKKCommonConst.ODR_HAKKO_JOKEN_CD_SOKU — Order issuance condition: Immediate`] |
| 10 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.YOKYU_SBT_CD_URL, X31CWebConst.DATABEAN_SET_VALUE, YOKYU_SBT_CD_NEW)` | [-> `YOKYU_SBT_CD_NEW = JKKCommonConst.YOKYU_SBT_CD_02 — Request type: New`] |
| 11 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.ODR_NAIYO_CD_URL, X31CWebConst.DATABEAN_SET_VALUE, ODR_NAIYO_CD_WEB_INS)` | [-> `ODR_NAIYO_CD_WEB_INS = JKKCommonConst.ODR_NAIYO_CD_121 — Order content: Web/Registration`] |
| 12 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.YOKYU_SBT_CD_CAPA, X31CWebConst.DATABEAN_SET_VALUE, YOKYU_SBT_CD_CHG)` | [-> `YOKYU_SBT_CD_CHG = JKKCommonConst.YOKYU_SBT_CD_04 — Request type: Change`] |
| 13 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.ODR_NAIYO_CD_CAPA, X31CWebConst.DATABEAN_SET_VALUE, ODR_NAIYO_CD_WEB_CHG)` | [-> `ODR_NAIYO_CD_WEB_CHG = JKKCommonConst.ODR_NAIYO_CD_123 — Order content: Web/Home Page capacity change`] |
| 14 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.RULE0059_AUTO_APLY, X31CWebConst.DATABEAN_SET_VALUE, AUTO_APLY_YOU)` | [-> `AUTO_APLY_YOU = JKKCommonConst.KH_PSG — Business handling fee auto-apply: Yes`] |
| 15 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.NET_TAB_OP_IF_CTL_CD, X31CWebConst.DATABEAN_SET_VALUE, "1")` | [-> `NET_TAB_OP_IF_CTL_CD = "1"` — Web tab operation info control code] |

**Block 13** — [SET] Movement date-time (L671, IT1-2013-0000035) (L747)

> System date timestamp is set for the movement date-time field.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sysDateDtms = JCCWebCommon.getSysDateTimeStamp()` | Get system date-time stamp |
| 2 | SET | `paramBean[0].sendMessageString(KKW00804SFConst.IDO_DTM, X31CWebConst.DATABEAN_SET_VALUE, sysDateDtms)` | [-> `IDO_DTM = "Movement date-time"`] |

**Block 14** — [EXEC] DataBean logging (L752)

> Log the complete DataBean state for debugging/audit purposes.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` | Dump DataBean for logging |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `hp_capa_value` | Field | Home Page capacity code — the selected Home Page bandwidth/capacity option code |
| `hp_capa_nm` | Field | Home Page capacity name — human-readable label for the selected capacity |
| `hp_capa_index` | Field | Addition index — the numeric index into the capacity dropdown list |
| `use_staymd` | Field | Use start date — concatenated YYYYMMDD date when the service begins |
| `svc_chrg_staymd` | Field | Service charge start date-year-month-day — the date when billing starts (use start date + 1 month) |
| `ido_div` | Field | Movement division — the type of contract change being processed |
| `unyo_ymd` | Field | Operation date — the date the operation is performed (YYYYMMDD) |
| `unyo_dtm` | Field | Operation date-time — the operation date with zeroed time component (YYYYMMDD000000000) |
| `ido_dtm` | Field | Movement date-time — system date-time stamp for movement tracking (YYYYMMDDHHmmSS) |
| `add_capa` | Field | Additional capacity — the difference between selected capacity and free capacity |
| `aging_url` | Field | Aging URL — the URL for delinquency/aging information, composed from domain + account |
| `prm_tkjk_1` | Field | Progress special item 1 — a display label for the progress tracking screen |
| MSKM_SBT_CD | Field | Application type code — classifies whether this is a new application (00001) or an operation application (00026) |
| PRG_STAT | Field | Progress status — tracks the application workflow stage (5101: in-progress, 5102: completed) |
| OP_SVC_CD | Field | Operation service code — identifies the operation service type (0020 = My Home Page) |
| SVC_KEI_STAT_UKE | Field | Service contract status (Received) — indicates the service contract has been received/processed |
| OYA_KEI_SKBT_CD | Field | Parent contract identification code — identifies the parent service contract number |
| PCRS_CD_MYHP | Field | Billing code (My Home Page) — the billing code for My Home Page services |
| PPLAN_CD_MYHP | Field | Billing plan code (My Home Page) — the billing plan for My Home Page services |
| PCRS_CD_HP | Field | Billing code (Home Page capacity) — the billing code for Home Page capacity |
| PPLAN_CD_HP | Field | Billing plan code (Home Page capacity) — the billing plan for Home Page capacity |
| ORDER_SBT_CD | Field | Order subtype code — classifies the order subtype (NET = Internet order) |
| SVC_ORDER_CD | Field | Service order code — identifies the service order type (WEB) |
| ODR_HAKKO_JOKEN_CD | Field | Order issuance condition code — specifies when the order is issued (SOKU = Immediate) |
| YOKYU_SBT_CD | Field | Request type code — classifies the request type (02 = New, 04 = Change) |
| ODR_NAIYO_CD | Field | Order content code — specifies the order content (121 = Web Registration, 123 = Web Home Page capacity change) |
| RULE0059_AUTO_APLY | Field | Business handling fee auto-apply flag — whether handling fees are automatically applied (KH_PSG = Yes) |
| NET_TAB_OP_IF_CTL_CD | Field | Web tab operation info control code — flag to control web tab operation information (set to "1") |
| IDO_DIV_OP | Constant | "00031" — Movement division: Operation settings (contract modification/change) |
| IDO_DIV_SINKI | Constant | "00001" — Movement division: New contract |
| IDO_DIV_TSUIKA | Constant | "00002" — Movement division: Service addition |
| My Home Page | Business term | My Home Page — the customer self-service portal for managing internet service subscriptions |
| Operation settings | Business term | Contract modification process — handling changes to existing customer contracts (capacity changes, settings updates) |
| New application | Business term | New subscription process — registering a new internet service contract |
| Home Page capacity | Business term | The bandwidth/throughput tier selected for the Home Page internet service |
| Free capacity | Business term | The default included capacity provided without additional charge |
| Access analysis | Business term | Web traffic/access analysis service name associated with the internet plan |
| Service charge start date | Business term | The date from which billing commences, typically one month after the service start date |
| Aging URL | Business term | The URL used for delinquency tracking and aging collection for customer accounts |
| Service Order Data (SOD) | Acronym | Service Order Data — telecom order fulfillment entity holding order information |
| Net | Business term | Internet service (TCP/IP broadband connection) |
| WEB | Business term | Web-based (online portal) service channel as opposed to phone or counter channels |
| Immediate (SOKU) | Business term | Sokuhan — immediate order issuance condition, processing the order without delay |
| My HP Info Add | Business term | My Home Page Information Registration — the specific progress special item label for this screen flow |
