메뉴 건너뛰기

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 se80에서 오브젝트 우클릭하면 나오는 메뉴의 언어 (독일어로 나와요 ㅠㅜ) [2] file 흐르링 2023.02.03 508
226 ABAP Trial 서버에서 SE16N 기능 여부 [2] dev 2022.06.13 506
225 SAP 언어 설정이 궁금합니다 [1] file sapbegin 2023.09.21 503
224 SE11, SE16 조회 조건 SELECTION FIELD 선택 문의 [2] 십년만에 2022.03.04 501
223 GUI Status의 Standard toolbar관련 질문 [1] file tubiel 2019.09.04 500
222 excel 하나의 셀에서 줄바꿈 처리 [2] 해피소울 2025.01.06 498
221 ABAP 써티 관련 질문! [2] 진원리달타냥 2021.04.05 495
220 RFC 계정 TMSADM 권한 [1] PraY 2022.09.01 491
219 대학 과제인데 모르는 부분이 있어서요. [8] 대생힘들다 2024.04.03 488
218 SD문서 처리 시 FI처리 [1] file 아바밥 2020.07.07 487
217 혹시 sap gui 소리 안나게 끄는방법 있을까요? activate할때 소리가 너무 커서요 [1] 리얼오버 2021.12.30 483
216 st04에서 select single 사용 질문 [1] 돈테크만 2020.07.24 483
215 권한별 DISPLAY 여부 [1] alarm 2021.07.01 481
214 GUI_DOWNLOAD 두번째 헤더이후 데이터 누락 [2] kesng 2018.12.24 481
213 ABAP 테이블 데이터에 각각의 파일 업로드 하는 방법 [2] GPARK 2023.04.03 479
212 st05성능추적 트랜잭션을 alv로 보는 방법이 있을까요? [1] 로우랜즈 2019.07.09 478
211 3개 테이블 merge 질문 드립니다 [1] nini 2022.12.29 476
210 가끔 데이터를 못읽어 와요. [3] 스게 2019.12.17 476
209 Simple Tree 이벤트 버튼 추가 및 핸들링 문의드립니다. [2] 그렁이 2019.09.03 475
208 BAPI_CONTRACT_CHANGE 사용 예제 [5] DONGHH 2020.12.03 474