메뉴 건너뛰기

SAP 한국 커뮤니티

internal table 선언은 아래와 같이 되어 있고,


한 screen에서 table control을 두개 사용하여 아래 각 internal table을 처리하고 있습니다.


 


types: begin of t_itab.
           INCLUDE STRUCTURE zt02.
types:  mark(01),
          bankl_t(30),
          io_gb_t(04),
          l_cmpno(12),
       end of t_itab.


data: gt_bank type t_itab occurs 0 with header line,
        gt_r3     type t_itab occurs 0 with header line.


사용자가 'SORT'버튼을 누르면


sorting 처리를 하려고 하는데


한 개의 subroutin으로 두개의 internal table에 대한 sorting 처리를 하려니


internal table이름을 바꿔줘야 하는데, internal table이름을 field-symbol로 사용하려 하니


자꾸만 dump(type conflict)가 발생하네요.


 


아래 소스 보시고...


원인이 무엇인지... 해결방법을 아시는 분은 답변 좀 올려주시면 감하겠습니다.


 


 


form sort_table_control using  p_sort_type.
  DATA: lv_tc_name            LIKE feld-name,
        lv_tc_field_name      LIKE feld-name.


 


  GET CURSOR FIELD lv_tc_field_name
             AREA  lv_tc_name.


 


  case lv_tc_name .
    when 'TC1'.
      perform sort_data using lv_tc_name 'GT_BANK' p_sort_type.
    when 'TC2'.
      perform sort_data using lv_tc_name 'GT_R3'   p_sort_type.
  endcase.


endform.


 


 


form sort_data using  p_tc_name p_itab p_sort_type.
  data: lv_index type i.
  FIELD-SYMBOLS:    TYPE cxtab_control.
  ASSIGN (p_tc_name) TO .


  FIELD-SYMBOLS: TYPE any table.
  assign (p_itab) to .                              ===> 요부분에서 dump가 발생합니다.


 


  data: lv_sort_field(30).
  DATA: ls_cols TYPE cxtab_column.


 


  read table -cols into ls_cols with key selected = 'X'.


 


  if sy-subrc = 0.
    lv_index = strlen( p_itab ) + 1.
    move ls_cols-screen-name+lv_index(10) to lv_sort_field.


    case p_sort_type.
      when 'A'.
        sort by (lv_sort_field) ascending.
      when 'D'.
        sort by (lv_sort_field) descending.
    endcase.
  else.
    message s998 with '정렬할 칼럼을 선택하세요.'.
  endif.


 


endform.                    " sort_data


 

번호 제목 글쓴이 날짜 조회 수
27 <b>[완료]</b>관계연산자의 의미를 알고싶습니다. [3] 다급 2008.06.30 11401
26 <b>[완료]</b>라디오 버튼 입고구분 어떻게 해야하나요? [4] hogun 2008.02.29 12064
25 <b>[완료]</b>dataset에 관한 질문입니다. [5] FIFIFI 2007.12.04 12808
24 [요청]T-CODE KO02 내부오더변경에서 문의사항이 있습니다. [2] 이쁜진. 2007.12.07 12889
23 <b>[완료]</b>CBO의 약자가 무엇인가요?(CUSTOMER BOLT ON) [6] sapjoy 2008.11.21 13067
22 parameter ID 확인하는 방법? [2] dhs 2019.11.22 13485
21 <b>[완료]</b>테이블 유지보수 뷰 관련 질문 입니다. [4] 안면도 2007.12.06 14247
20 [요청]펑션 LVC_TRANSFER_FROM_SLIS, LVC_FIELDCAT_COMPLETE의 용도가 궁금합니다. [2] 아밥맨 2008.06.10 14496
19 <b>[완료]</b>[질문] sap서버에 있는 shell script를 실행시키기.. [3] 해처리 2007.12.04 14589
18 <b>[완료]</b>ranges 구문에 대한 정확한 의미와 사용법 [7] BEST!! 2007.11.14 14928
17 [요청]구매요청(PR) 텍스트화면 크기를 조정하려면 어떻게 해야 하나요? file 노름마치 2007.12.07 15016
16 [요청]소수이하 0부분을 떨어버리는 것에 대해 문의드립니다. [5] 풍뎅이 2008.04.23 16327
15 <img src=3.gif>[BSP]원하는 페이지로 값넘기고 받기(get,post) [2] 끼야호 2010.05.14 17117
14 FOR ALL ENTRIES IN 질문드립니다! [5] 아좀더 2019.04.19 17749
13 [re] <img src=1.gif>DOI 예제 따라하고 있는데요, 안되네요.. [2] 요요 2010.03.02 20205
12 <b>[완료]</b>Mark field달기 [6] SAP폐인 2007.12.04 20600
11 <b>[완료]</b>메시지가 잘립니다. [3] 김지성 2007.12.05 24403
10 ALV 에서는 에디팅 기능을 사용 할 수 없나요? [5] file 댕댕 2007.04.03 27054
» <b>[완료]</b>Sorting시 Internal Table 이름이 가변적일때 Field symbol 사용 방법좀 가르쳐 주세요. [4] SkyDream 2007.12.05 27387
8 자재번호 자동 List up..? Search help..? 기능 문의 드립니다 [2] file 아좀더 2019.06.26 30812