메뉴 건너뛰기

SAP 한국 커뮤니티

어떻게 질문을 드려야 할지 모르겠습니다.

bd 2007.04.12 19:19 조회 수 : 2678 추천:161

기존에 테이블에 존재 하는 (ex) 생일 테이블을 불러와.


ALV로 나타내려 합니다.


.


총 2개의 ALV를 사용할것이고.. 테이블은 기존에 존재하는 테이블에서 생일 FIELD 만 꺼내와서


하나의 ALV 에는 태어난 월만 보여주고


하나의 ALV 에는 태어난 연도만 보여 주려고 합니다.


.


어떻게 해야 할까요??? 이리 생각 저리 생각해도 답이 안나오네요 ㅜㅜ


일단 기존 소스 는 이렇습니다....


 


 

*&---------------------------------------------------------------------*
*& Report  Z_BIRTHDAY_1
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

report  z_birthday_1.


data : ok_code type sy-ucomm.

data : con1_ref type ref to cl_gui_custom_container,
       grid1 type ref to cl_gui_alv_grid.
data : gt_fieldcat type lvc_t_fcat.

data : itab_br type table of ztkks01.

selection-screen begin of block bir with frame title text-001 no intervals.
parameter month radiobutton group radi.
parameter year radiobutton group radi.
selection-screen end of block bir.


parameter bir_1 like zbirthday-birthday.



start-of-selection.
  select * from ztkks01 into table itab_br.
  call screen 100.

*----------------------------------------------------------------------*
*  MODULE init_con OUTPUT
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
module init_con output.

  if con1_ref is initial.



    create object con1_ref
    exporting container_name = 'CON1'.


    create object grid1
           exporting
                i_parent = con1_ref.
    perform settin_catalog.



    call method grid1->set_table_for_first_display
*      EXPORTING
*        i_structure_name = 'ZTKKS01'
      changing
        it_outtab        = itab_br
        it_fieldcatalog  = gt_fieldcat.


  endif.
endmodule.                 " init_con  OUTPUT

include z_birthday_1_status_0100o01.
*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module status_0100 output.
  set pf-status '100'.
  set titlebar '100'.


endmodule.                 " STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module user_command_0100 input.
  case ok_code.
    when 'EXIT' or 'BACK' or 'CANC'.
      leave program.
  endcase.

endmodule.                 " USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*&      Module  ini_100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&      Form  settin_catalog
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form settin_catalog .

  data ls_fieldcat type lvc_s_fcat.
  clear ls_fieldcat.
  ls_fieldcat-fieldname = 'BIRTH'.
  ls_fieldcat-coltext = 'month'.
  append ls_fieldcat to gt_fieldcat.

endform.                    " settin_catalog


 


현제 결과 ALV 에선 그냥 생년월일이 다 나오는 상황인데...


요걸 따로 구분해서 보이고 싶은데......


대책이 안서내요 ㅡㅜ 월별이야 정적으로 하드코딩 하면된다지만...


년별을 표시할땐;;;;;; 동적이라......@@;;


어떻게 해야 할까용??


 


 

번호 제목 글쓴이 날짜 조회 수
6349 [요청]refresh_table_display와 cl_gui_cfw=>flush 의 차이점에대해서 알고싶습니다 [3] 고양이야옹 2008.12.04 4966
6348 ALV 가로 출력에 대해서 질문드립니다 엑셀로 희망 화면 그려노았습니다 [1] file 뿌이이잉 2011.12.12 4955
6347 subscreen 에서 사용 하는 sy-repid 변수에 관한질문입니다. [2] bd 2007.04.10 4944
6346 [요청]온라인(모듈풀)에서 라디오버튼 사용법요!!! [6] CoolGuy 2008.08.05 4940
6345 <img src=2.gif>screen structure 에서 group1 ~ group4 사용방법 [5] copine 2011.03.31 4906
6344 [요청]자동 텍스트완성 어떻게 하나요? 답변 부탁드립니다. [3] 쪼꼬팜 2008.07.30 4891
6343 TRY 구문해석좀 해주세요. 이렇게 쓰는 것과 그냥 SELECT 하는 차이가 뭔지요? [7] 김창훈 2007.08.21 4886
6342 <img src=2.gif>신호등(상태표시등)아이콘 관련 질문드려요~ ^-^* [1] ymjeong 2010.10.25 4870
6341 <img src=3.gif>전표 BDC 생성에 대한 질문입니다.. [2] 보경아빠 2010.01.26 4862
6340 <b>[완료]</b>DYNPRO_FIELD_CONVERSION dump관련 [3] 이정한 2008.01.08 4855
6339 <img src=1.gif>질문 >> CALL FUNCTION 'FIMA_NUMERICAL_VALUE_ROUND [2] 아밥콩` 2010.03.03 4848
6338 <b>[완료]</b><b>[완료]</b>[re] 개인pc에 SAP NetWeaver 2004s 설치방법에 질문입니다. [1] 김태완 2006.12.27 4829
6337 null 값 체크 [6] 강진규 2007.05.21 4806
6336 <img src=3.gif>금액 절사방법에 대해 질문드립니다. [6] 해바라기 2009.11.19 4793
6335 <img src=3.gif>스마트 폼에서 그래픽 출력할때 이상합니다. [3] 이소아밀 2011.03.31 4785
6334 <img src=3.gif>alv 필드 오른쪽 정렬에 대해서 질문 좀 드릴게요 [3] file 유정a 2010.08.23 4767
6333 <b>[완료]</b>엑셀업로드시 데이터건수제한에 대해서 질문드립니다. [3] kan145 2009.03.24 4760
6332 <b>[완료]</b>SUBMIT 또는 CALL TRANSACTION 에 관해서... [5] chanmaniac 2008.09.29 4747
6331 [요청]SELECT~ENDSELECT 문에서 문의드립니다. [2] 풍뎅이 2007.12.12 4736
6330 [요청]delete 하는법 알려주세요...조건에 맞는필드를 삭제하려고요... [5] 아밥! 2008.11.06 4732