메뉴 건너뛰기

SAP 한국 커뮤니티

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

bd 2007.04.13 04:19 조회 수 : 2725 추천: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 에선 그냥 생년월일이 다 나오는 상황인데...


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


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


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


어떻게 해야 할까용??


 


 

번호 제목 글쓴이 날짜 조회 수
227 [질문] SELECTION-SCREEN에서 라디오버튼 이벤트 발생시 문의 [4] file GG 2007.08.22 4616
226 <img src=2.gif>인터널 테이블 중에서 가장 큰 값 작은값 구해오는 방법 [4] 아밥고지를 찾아서 2010.06.25 4623
225 [re] [요청]TYPE p DECIMALS 2. 에 관하여 질문드립니다 [1] 아밥퍼 2008.11.05 4631
224 <b>[완료]</b>alv 호출시 set_table_for_first_display , 필드심볼을 사용하면 refresh가 안됩니다. [5] SARA 2007.12.18 4633
223 [요청]EU_SCRP_WN32 : timeout during allocate / CPIC-CALL: 'ThSAPCMRCV' 노름마치 2007.12.14 4638
222 [요청]like table of, like, type table of, type 의 차이점 [3] copine 2008.06.20 4653
221 <img src=3.gif>문자열 자릿수 계산 질문입니다!! [5] ASDF 2010.11.10 4665
220 <b>[완료]</b>[re][re] 개인pc에 SAP NetWeaver 2004s 설치방법에 질문입니다. [4] sapjoy 2006.12.27 4689
219 <b>[완료]</b><b>[완료]</b>ALV GRID 초기화 하는 메소드? [1] SARA 2007.03.29 4695
218 <img src=3.gif>RFC를 사용하여 델파이와 연동시 한글깨짐 현상이요 [4] 지니 2010.09.10 4701
217 [요청]Sqvi 에서 생성한 Quick View 에 T-code 생성 방법 [6] copine 2009.03.21 4723
216 [요청]지난 달이나 몇달 전 또는 몇달 후의 날짜를 계산하는 방법이나 시스템변수가 없을까요? [5] 대지꿀꾸링 2008.03.13 4726
215 <img src=3.gif>매크로 연동 엑셀에서 PDF 전환 후 메일 첨부... [4] 블랙아이즈 2010.06.19 4728
214 <img src=2.gif>AT SELECTION-SCREEN OUTPUT. 질분입니다 [3] 아밥콩` 2010.06.18 4735
213 <img src=2.gif>bdc return message 질문드립니다.. [6] 무한루프 2010.08.03 4737
212 [요청]max(최대값)조건을 주려고 합니다. [3] 풍뎅이 2008.01.02 4761
211 <img src=2.gif>Loop at Itab에서의 Where 조건을 동적으로 구현가능한지요??? [4] 찬호사랑 2010.05.25 4775
210 <img src=3.gif>BOM 다중 레벨 사용처 리스트 Function [5] 소마1010 2010.05.10 4780
209 <b>[완료]</b>[질문]4개이상의 TABLE INNER JOIN 방법 [5] 아싸ㅎ 2008.04.03 4788
208 [요청]ALV 컬럼고정에 대해 질문입니다. [4] mean 2008.05.29 4795