<style type="text/css"> SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S32 { color: #3399FF; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } </style>안녕하세요
아래와 같이 값이 조회되어야 하는데요.
생각해보니 이렇게는 안될것 같아요..
IF 문을 어떻게 사용해야하는 지 조언 부탁드립니다.
감사합니다.
LOOP AT gt_sitab INTO gs_sitab.
DATA : lv_months(2) TYPE n.
DATA : lv_laewa_month(2) TYPE n,
lv_stewa_month(2) TYPE n.
CLEAR : lv_ratio, lv_spare, lv_fullname,
lv_poper_expwadtpe,lv_expyyyy,lv_expwadtpe,lv_expwadtperes.
SELECT SINGLE ratio FROM zwaratio INTO lv_ratio
WHERE zyear = p_year AND vkorg = p_vkorg.
SELECT SINGLE spare FROM zwaratio INTO lv_spare
WHERE zyear = p_year AND vkorg = p_vkorg.
IF gs_sitab-zzwar_stdate_end = '00000000' .
gs_alv-expwadt = gs_sitab-zzwar_lasdlv_end.
ELSEIF gs_sitab-zzwar_lasdlv_end = '00000000'.
gs_alv-expwadt = gs_sitab-zzwar_stdate_end.
ELSEIF gs_sitab-zzwar_stdate_end <= gs_sitab-zzwar_lasdlv_end.
gs_alv-expwadt = gs_sitab-zzwar_stdate_end.
ELSEIF gs_sitab-zzwar_stdate_end > gs_sitab-zzwar_lasdlv_end.
gs_alv-expwadt = gs_sitab-zzwar_lasdlv_end.
ENDIF.
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = gs_alv-expwadt
* I_MONMIT = 00
i_periv = 'Z1'
IMPORTING
e_buper = lv_poper_expwadtpe
* E_GJAHR =
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4
.
* IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
* ENDIF.
IF lv_poper_expwadtpe < 004 and gs_alv-expwadt 의 MM(month) 가 10보다 큰 것.
lv_expyyyy = gs_alv-expwadt(4) + 1.
ELSE.
lv_expyyyy = gs_alv-expwadt(4).
ENDIF.
lv_expwadtpe = lv_poper_expwadtpe+1(2).
CONCATENATE lv_expyyyy ', P' lv_expwadtpe
INTO lv_expwadtperes." SEPARATED BY space.
<style type="text/css"> SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S52 { color: #0000FF; } </style> MOVE-CORRESPONDING gs_sitab TO gs_alv.
<style type="text/css"> SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S52 { color: #0000FF; } </style> APPEND gs_alv TO gt_alv.