음력을 양력으로 변환

음력을=> 양력으로.

FUNCTION z_convert_lunar_to_solar.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(I_LUNAR) TYPE SY-DATUM
*" EXPORTING
*" REFERENCE(O_SOLAR) TYPE SY-DATUM
*" EXCEPTIONS
*" YEAR_NOT_ALLOWED
*" MONTH_NOT_ALLOWED
*" NO_VALID_DATE
*"----------------------------------------------------------------------

DATA : l_syear TYPE i,
l_smonth TYPE i,
l_sday TYPE i,
l_nsyear(4) TYPE n,
l_nsmonth(2) TYPE n,
l_nsday(2) TYPE n,
l_lyear TYPE i,
l_lmonth TYPE i,
l_lday TYPE i,
l_leapyes TYPE i,
l_leap(1),
l_y1 TYPE i,
l_m1 TYPE i,
l_mm TYPE i,
l_i TYPE i,
l_j TYPE i,
l_k1 TYPE i,
l_k2 TYPE i,
l_y2 TYPE i,
l_y3 TYPE i,
l_w TYPE i,
l_td TYPE i,
l_y TYPE i,
l_tab_idx TYPE i,
l_tmp_day TYPE i.

CLEAR: g_lunar_itab, g_lunar_itab[],
g_m_itab, g_m_itab[].
PERFORM fill_g_lunar_itab.
PERFORM fill_g_m_itab.
l_lyear = i_lunar+0(4).
l_lmonth = i_lunar+4(2).
l_lday = i_lunar+6(2).
l_y1 = l_lyear - 1841.
l_m1 = l_lmonth - 1.
l_leapyes = 0.
l_y3 = l_y1 + 1. "첨가..

* L_LEAPYES = 1 윤년
READ TABLE g_lunar_itab INDEX l_y3.
IF g_lunar_itab-nmonth+l_m1(1) > 2.
PERFORM is_yoon USING l_lyear l_leapyes.
ENDIF.
IF l_leapyes = 1.
CASE g_lunar_itab-nmonth+l_m1(1).
WHEN '3'.
WHEN '5'. l_mm = 29.
WHEN '4'.
WHEN '6'. l_mm = 30.
ENDCASE.
ELSE.
CASE g_lunar_itab-nmonth+l_m1(1).
WHEN '1'.
WHEN '3'.
WHEN '4'. l_mm = 29.
WHEN '2'.
WHEN '5'.
WHEN '6'. l_mm = 30.
ENDCASE.
ENDIF.

l_td = 0.
l_i = 0.
WHILE l_i < l_y1 .
l_tab_idx = l_i + 1.
READ TABLE g_lunar_itab INDEX l_tab_idx .
l_j = 0.
WHILE l_j < 12.
CASE g_lunar_itab-nmonth+l_j(1).
WHEN '1'. l_td = l_td + 29.
WHEN '2'.
l_td = l_td + 30.
WHEN '3'. l_td = l_td + 58. "/* 29+29 */
WHEN '4'. l_td = l_td + 59. "/* 29+30 */
WHEN '5'.
l_td = l_td + 59. "/* 30+29 */

WHEN '6'.
l_td = l_td + 60. "/* 30+30 */
ENDCASE.
l_j = l_j + 1.
ENDWHILE.
l_i = l_i + 1.
ENDWHILE.

l_j = 0.

READ TABLE g_lunar_itab INDEX l_y3.
WHILE l_j < l_m1.
CASE g_lunar_itab-nmonth+l_j(1).
WHEN '1'. l_td = l_td + 29.
WHEN '2'. l_td = l_td + 30.
WHEN '3'. l_td = l_td + 58.
WHEN '4'. l_td = l_td + 59.
WHEN '5'. l_td = l_td + 59.
WHEN '6'. l_td = l_td + 60.
ENDCASE.
l_j = l_j + 1.
ENDWHILE.

READ TABLE g_lunar_itab INDEX l_y3.
IF l_leapyes = 1.
CASE g_lunar_itab-nmonth+l_m1(1).
WHEN '3'.
WHEN '4'. l_td = l_td + 29.
WHEN '5'.
WHEN '6'.
l_td = l_td + 30.
ENDCASE.
ENDIF.
l_td = l_td + l_lday + 22.

l_y1 = 1840.

DO.
l_y1 = l_y1 + 1.
PERFORM is_yoon USING l_y1 l_leap.
IF l_leap = 1. "윤달
l_y2 = 366.
ELSE.
l_y2 = 365.
ENDIF.
IF l_td <= l_y2.
EXIT.
ENDIF.
l_td = l_td - l_y2.
ENDDO.

l_syear = l_y1 .
PERFORM update_feb_month USING l_y2.
l_m1 = 0.

DO.
l_m1 = l_m1 + 1.
READ TABLE g_m_itab INDEX l_m1.
IF l_td <= g_m_itab-nmonth.
EXIT.
ENDIF.
l_td = l_td - g_m_itab-nmonth.
ENDDO.

l_smonth = l_m1.
l_sday = l_td.
l_y = l_syear.
l_td = l_y * 365 + l_y / 4 - l_y / 100 + l_y / 400.
l_i = 0.
l_tmp_day = l_smonth - 1.
WHILE l_i < l_tmp_day .
g_loop_cnt = l_i + 1.
READ TABLE g_m_itab INDEX g_loop_cnt.
l_td = l_td + g_m_itab-nmonth.
l_i = l_i + 1.
ENDWHILE.

* L_TD = L_TD + L_SDAY.
* L_W = L_TD mod y.
l_nsyear = l_y.
l_nsmonth = l_smonth.
l_nsday = l_sday.
CONCATENATE l_nsyear l_nsmonth l_nsday INTO o_solar.

ENDFUNCTION.

------------------------
FORM fill_g_lunar_itab.
* year 1841 ~ 2043
g_lunar_itab-nmonth = '124112121221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221211212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '222121412121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221212121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121221212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212152122121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211212122212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121212221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212321212122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212112112212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221211212152'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212211212112'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212212121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121212521212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112122122121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211212122212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121152121222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212112112122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '216112112122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122121212112'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212122122312'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122121221212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112121221221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211241221221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211211221222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121121222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122321121221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '222112112121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '222121211521'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221221212112'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121221212212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112124212212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112121212221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211211212221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221151212212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221121121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221212112121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '224212112121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212212212112'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121212522121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121212122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112112122212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211232122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211211212122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212121121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221521121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212212112121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212212121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '152122121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121212122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112115221222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112112121222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121211212122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212151212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '222121121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122121212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '215221212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212121221212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121252212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121212221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212112121222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121232112212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221211211221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221221121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122412121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121212212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211221212212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '151212122212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121212221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212115122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212112112212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221211211212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221251212112'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212212121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121212212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '232122122121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211212122212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121522122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212112112122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212232112122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122121212112'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212122121211'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212521221212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112121221221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211212122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '151211221222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121121222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122115121221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '222112112121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '222121211212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122161212112'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121221221212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112121221221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '214121212221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211211212221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221121412212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221121121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221212112121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221224112121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212212212112'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121212212212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112412122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112112122212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211211212212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '251211212122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212121121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221212321212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212212112121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212212121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121242121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121122122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112112122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '214112121222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121211212122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212121152122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122121121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122121212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212125212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212121221212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121221221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212321212221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212112121222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121211211221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '225211211221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221221121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122121521212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121212212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211221212212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121152122212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121212221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212112112221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221512112212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221211211212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221212152112'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212212121211'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221212212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211216122121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211212122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212321122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212112112122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212211211522'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122121211212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122122121211'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212215221212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112121221221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211212122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121151212222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121121222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122112112122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '125212112121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '222121211212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122122152112'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121221212212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112121221221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211232212221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211211212221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221121121221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '222321121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221212112121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221221211212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '152212122112'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121212212212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112121522122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112112122212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211211212212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221151212122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212121121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212212112121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '216212112121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212212121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121212125212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121222122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '112112122122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211232121222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121211212122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212121121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212521121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122121212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212122121212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '152121221212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121221221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212115212221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212112121222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121211211222'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '122151211221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221221121122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121221212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '215212212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211212212212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121522212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121212221'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212112112212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221214112122'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221211211212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221212121121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '221252121211'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '212212212121'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '211212212212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '151212122212'. APPEND g_lunar_itab.
g_lunar_itab-nmonth = '121121122122'. APPEND g_lunar_itab.
ENDFORM. " fill_g_lunar_itab
*&----------------------------------------------------------------*
*& Form fill_g_m_itab
*&----------------------------------------------------------------
FORM fill_g_m_itab.
* month
APPEND '31' TO g_m_itab.
APPEND '0' TO g_m_itab.
APPEND '31' TO g_m_itab.
APPEND '30' TO g_m_itab.
APPEND '31' TO g_m_itab.
APPEND '30' TO g_m_itab.
APPEND '31' TO g_m_itab.
APPEND '31' TO g_m_itab.
APPEND '30' TO g_m_itab.
APPEND '31' TO g_m_itab.
APPEND '30' TO g_m_itab.
APPEND '31' TO g_m_itab.
ENDFORM. " fill_g_m_itab
-------------------------------------
*&----------------------------------------------------------------*
*& Form fill_g_m_itab
*&----------------------------------------------------------------
FORM fill_g_m_itab.
* month
APPEND '31' TO g_m_itab.
APPEND '0' TO g_m_itab.
APPEND '31' TO g_m_itab.
APPEND '30' TO g_m_itab.
APPEND '31' TO g_m_itab.
APPEND '30' TO g_m_itab.
APPEND '31' TO g_m_itab.
APPEND '31' TO g_m_itab.
APPEND '30' TO g_m_itab.
APPEND '31' TO g_m_itab.
APPEND '30' TO g_m_itab.
APPEND '31' TO g_m_itab.
ENDFORM. " fill_g_m_itab
---------------------------------------
*&-----------------------------------------------------------------
*& Form is_yoon
*&-----------------------------------------------------------------
FORM is_yoon USING p_lyears p_leapyes.
DATA: modnum TYPE i.
modnum = p_lyears MOD 4.
IF modnum <> 0.
p_leapyes = 0.
EXIT.
ENDIF.
modnum = p_lyears MOD 100.
IF modnum <> 0.
p_leapyes = 1.
EXIT.
ENDIF.
modnum = p_lyears MOD 400.
IF modnum <> 0.
p_leapyes = 0.
EXIT.
ENDIF.
p_leapyes = 1.
ENDFORM. " is_yoon
----------------------------------------
*&----------------------------------------------------------------*
*& Form update_feb_month
*&----------------------------------------------------------------*
FORM update_feb_month USING p_m2.
g_loop_cnt = 1.
LOOP AT g_m_itab.
IF g_loop_cnt = 2.
g_m_itab-nmonth = p_m2 - 337.
MODIFY g_m_itab.
EXIT.
ENDIF.
g_loop_cnt = g_loop_cnt + 1.
ENDLOOP.
ENDFORM. " update_feb_month
----------------------------------------------

by saper | 2008/05/07 17:35 | Function | 트랙백 | 덧글(1)

트랙백 주소 : http://saper.egloos.com/tb/315349
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]
Commented by 서동희 at 2008/11/05 09:27
이 펑션 실제로 써보셨는지요?

g_lunar_itab가 선언되어있지않아 에러가 나는데 어떻게 해야하나요?
g_m_itab도 선언되어있지않구요.

:         :

:

비공개 덧글

◀ 이전 페이지 다음 페이지 ▶