메뉴 건너뛰기

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


 

번호 제목 글쓴이 날짜 조회 수
47 <img src=3.gif>숫자 세자리마다 콤마 붙여주는 펑션이 있나요 [7] 아밥맨 2009.10.03 9280
46 [요청]at first, at last, at new, at end 정확한 개념좀 갈켜주세여.. 휴... [5] 아밥입문자 2008.08.25 9310
45 <img src=2.gif>ALV 셀 병합하는 방법 알려주세요.. [4] 은미짱 2011.03.23 9443
44 [요청]alv에서 edit_mask 사용하구싶은데 잘안되네요.. [2] CoolGuy 2008.09.10 9464
43 [요청]SE80에서 프로그램 옆의 Description에 관하여 문의드립니다. [5] 풍뎅이 2008.02.27 9563
42 <b>[완료]</b>Gui->WEB 호출시 파라미터 문제 [2] 윤군친구(bsp개발자) 2007.12.08 9575
41 [요청] 변경된 내용이 없는데도 CHECK_CHANGED_DATA 메소드가 'X'을 내어서 계속 팝업메시지가 뜹니다. [3] 하오 2008.07.03 9644
40 <b>[완료]</b>cursor 프로그램 관련 질문입니다. [4] order001 2007.12.05 9790
39 [요청]ALV 에서 수량 필드 소숫점 없애는 방법 [5] 파릇이 2008.06.12 9979
38 <b>[완료]</b>오라클의 CASE WHEN과 같은 기능.. [8] 풍뎅이 2007.12.06 10234
37 [요청]GETWA_NOT_ASSIGNED 이 오류에 대해서 아시는 분? [7] 나도아밥퍼 2008.01.08 10343
36 [요청]인터널테이블 끼리 move-corresponding 안될까요~~ [5] genius 2008.03.14 10552
35 <b>[완료]</b>"DESCRIBE TABLE ~~~ LINES " 관련 질문입니다. [2] tenyearsago 2009.01.05 10694
34 [질문] alv에서 필드 폭의 길이를 지정할 수 없나요? [5] 나도아밥퍼 2007.05.23 10717
33 <b>[완료]</b>sy-index와 sy-tabix의 차이가 궁금합니다. [7] kkk 2008.02.27 10961
32 <b>[완료]</b>call transaction 사용하는 방법 좀 가르쳐주세요. [8] 행복한외계인 2007.11.22 11194
31 <b>[완료]</b>Internal table을 만든 table로 데이터를 옮기려고 하는데 잘 안되네요. [10] 행복한외계인 2008.01.22 11424
30 [요청]Modify 와 Modify Table 의 차이좀 알고싶어요~ [4] 아밥걸 2008.07.10 11449
29 <b>[완료]</b>관계연산자의 의미를 알고싶습니다. [3] 다급 2008.06.30 11540
28 <b>[완료]</b>라디오 버튼 입고구분 어떻게 해야하나요? [4] hogun 2008.02.29 12346