slis_t_fieldcat_alv통하여 ALV 레포트를 구현하고자 합니다.
필드수가 104개 인데, 50여개만 나타나고 나머지는 나타나지 않네요.
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
g_inclname = sy-repid.
PERFORM get_filedcatalog USING p_tabname.
***************************************************************
FORM get_filedcatalog USING p_tab.
REFRESH g_fieldcat_t.
IF g_inclname IS INITIAL.
g_inclname = g_repid.
ENDIF.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = g_repid
i_internal_tabname = p_tab
i_client_never_display = 'X'
i_inclname = g_inclname
CHANGING
ct_fieldcat = g_fieldcat_t
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
ENDFORM. " GET_FILEDCATALOG
************************************************************************
LOOP AT g_fieldcat_t INTO ls_fieldcat.
CASE ls_fieldcat-fieldname.
WHEN 'ERSDA'.
PERFORM assign_fieldcat
USING '생성일' 'X' '' '' '' '' '' '' ''
CHANGING ls_fieldcat.
******************************************************
FORM assign_fieldcat USING p_seltext_m p_key p_emphasize
p_qfield p_qtab p_cfield p_ctab
p_sum p_hotspot
CHANGING ps_fieldcat TYPE slis_fieldcat_alv.
ps_fieldcat-seltext_m = p_seltext_m.
ps_fieldcat-key = p_key.
ps_fieldcat-emphasize = p_emphasize.
ps_fieldcat-qfieldname = p_qfield.
ps_fieldcat-qtabname = p_qtab.
ps_fieldcat-cfieldname = p_cfield.
ps_fieldcat-ctabname = p_ctab.
ps_fieldcat-do_sum = p_sum.
ps_fieldcat-hotspot = p_hotspot.
ENDFORM. " ASSIGN_FIELDCAT
**************************************************************
WHEN 'ERNAM'.
PERFORM assign_fieldcat
USING '생성자' 'X' '' '' '' '' '' '' ''
CHANGING ls_fieldcat.
WHEN 'MATNR'.
PERFORM assign_fieldcat
USING '자재번호' '' '' '' '' '' '' '' ''
CHANGING ls_fieldcat.
WHEN 'MBRSH'.
PERFORM assign_fieldcat
USING '산업부문' '' '' '' '' '' '' '' ''
CHANGING ls_fieldcat.
.
.
.
.
WHEN 'KOSGR'.
PERFORM assign_fieldcat
USING '간접비그룹' '' '' '' '' '' '' '' ''
CHANGING ls_fieldcat.
WHEN OTHERS.
ls_fieldcat-tech = 'X'.
ENDCASE.
ls_fieldcat-ddictxt = 'M'.
*
MODIFY g_fieldcat_t FROM ls_fieldcat.
CLEAR ls_fieldcat.
ENDLOOP.
코딩은 이렇습니다.
프로그램 실행후 alv화면에서 보이는 필드가 전부 나타나지 않는 이유가 궁금합니다. ^^
전체다 보이시지 않는다는건지 아니면 104개중에 50개만 보이신다는건지 잘 모르겠군요^^;
일단 밑에 이부분에서 case 문에 선언이 안된 필드들은 화면에 보여주지 않겠다는 명령어인데요.
layout 쪽에 가시면 숨겨져 있는걸 보실수 있을겁니다.
WHEN OTHERS.
ls_fieldcat-tech = 'X'.