메뉴 건너뛰기

SAP 한국 커뮤니티

Field symbol 과 텍스트 출력

서어억 2022.01.19 22:47 조회 수 : 415

 

Field symbols : <fs> type any,

                         <table> type standard table.

Data : dref_table type ref to data,

           dref_struc type ref to data.

 

... 동적 itab 생성 ... fcat 부분 생략

 

Call method cl_alv_table_create=>create_dynamic_table

  Export 

     it_fieldcatalog = lt_fcat[]

  Importing

     ep_table = dref_table

  Exception

      generate_subpool_dir_full = 1

      Others = 2.

 

assign dref_table->* to <table>

Create data dref_struc like line of <table>.

assign dref_struc-> to <fs>.  

 

Data 

         cc type ref to cl_nls_struc_container,

 

Loop at <table> info <fs>.

  Try.

    Call method cc->struc_to_cont

         exporting 

            Struc = <fs>

            langu = sy-langu

         Importing

            cont = l_str.

 

      ... 중략 ...

      Catch cx_sy_dyn_call_illegal_type.

Endloop.

 

 

안녕하세요. 위와 같이 필드심볼로 itab을 구성하고 파일로 추출하기 위하여

Class를 사용하였는데 illegal type error 에 걸립니다...

Struc 에 필드 심볼은 사용이 안되는 걸까요...

 

선배님들의 답변 부탁드립니다 ㅠ