본문 바로가기

SAP/ABAP

Dynamic Internal Table 에서 Cell Tab, Color Tab 만들기

Dynamic Internal Table 에서 Cell Tab, Color Tab 을 적용하기가 쉽지 않다. 그러나 의외로 간단히 적용할 수 있는 방법이 있다.

 

1) Cell Tab 과 Color Tab 을 Structure 에 넣어 생성

2) Dynamic Interanl Table Field Catalog 를 구성시 앞에 생성한 Structure Name 을 REF_TABLE 에 Cell Tab 또는 Color Tab 을 REF_FIELD 로 지정하고 Dynamic Internal Table 을 생성.

 

아래 내용을 참고해서 사용해도 된다. (아래 질문에 있던 답인데 실제 동작하는지는 미확인)

 

wa_fieldcatalog-fieldname  = 'COLOR'.
wa_fieldcatalog-ref_table  = 'LVC_T_SCOL'.
APPEND wa_fieldcat TO gt_fieldcat.

CLEAR wa_fieldcat.

CALL METHOD cl_alv_table_create=>create_dynamic_table
	EXPORTING
		it_fieldcatalog = gt_fieldcat
	IMPORTING
		ep_table = t_output.

ASSIGN t_output->* TO <gt_output>.

 

answers.sap.com/questions/2009260/how-to-create-dynamic-internal-table-to-make-the-c.html

 

How to create dynamic internal table & to make the cells colored - SAP Q&A

You already have an active moderator alert for this content.

answers.sap.com