PARAMETERS: p_cycle LIKE T811C-CYCLE.
======================================================
*사이클 목록가져오기
PERFORM search_help_cursq USING P_ALAR
P_IPKN
'0'
CHANGING p_cycle.
=====================================================
FORM SEARCH_HELP_CURSQ USING I_ALAR
I_IPKN
I_FLAG
CHANGING I_CYCLE.
*search help
DATA: BEGIN OF i_help_cycle OCCURS 0,
CYCLE LIKE t811c-CYCLE,
TXT LIKE T811L-TXT,
SDATE LIKE t811c-SDATE,
ALART LIKE t811c-ALART,
IPKNZ LIKE t811c-IPKNZ,
END OF i_help_cycle.
DATA it_return LIKE TABLE OF ddshretval WITH HEADER LINE.
SELECT A~CYCLE B~TXT A~SDATE A~ALART A~IPKNZ
INTO CORRESPONDING FIELDS OF TABLE i_help_cycle
FROM T811C AS A JOIN T811L AS B ON A~TAB = B~TAB
AND A~CYCLE = B~CYCLE
AND A~SDATE = B~SDATE
WHERE A~TAB = 'CCSS'
AND A~ALART = I_ALAR
AND A~IPKNZ = I_IPKN
AND B~LANGU = SY-LANGU
AND B~SEQNR = '0'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CYCLE'
window_title = 'CYCLE'
value_org = 'S'
TABLES
value_tab = i_help_cycle
return_tab = it_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* 선택화면에서 한개를 선택하므로 첫라인을 읽어서 화면에 뿌려준다
READ TABLE it_return INDEX 1.
IF sy-subrc = 0.
i_cycle = it_return-fieldval.
ENDIF.
ENDFORM. " SEARCH_HELP_CURSQ
댓글 4
-
오렌지겅주님
2011.03.25 18:17
-
오렌지겅주님
2011.03.25 18:33
맨밑에
READ TABLE it_return INDEX 1.
IF sy-subrc = 0.
i_cycle = it_return-fieldval.
ENDIF.
여기서 i_cycle 은 어디서 끌고온거죠?
인터널테이블에 있는 필드명인가요?
-
JH
2011.03.25 18:58
PARAMETERS: p_cycle LIKE T811C-CYCLE.
PERFORM search_help_cursq USING P_ALAR
P_IPKN
'0'
CHANGING p_cycle.
FORM SEARCH_HELP_CURSQ USING I_ALAR
I_IPKN
I_FLAG
CHANGING I_CYCLE.
파라미터로 받았던 변수 이름이네요~
-
오렌지겅주님
2011.03.25 19:05
오 덕분에 잘 해결했네요 ^^
좋은하루 되세요 ~~!
소스 고맙습니다 ^^ 고쳐보고 안되면 또 물어볼꼐요 !!^^