ALV 출력 예
5148 단어 작업
*==========================================================*
* ZTEST ALV 01 *
*==========================================================*
* : *
* : 2006/11/29 *
* : yyyy/mm/dd xxx *
* text *
* yyyy/mm/dd xxx *
* text *
* : ALV *
*----------------------------------------------------------*
REPORT ZTEST0001111 NO STANDARD PAGE HEADING.
*==========================================================*
* TYPE-POOLS
*==========================================================*
TYPE-POOLS SLIS.
*==========================================================*
* TABLES
*==========================================================*
TABLES: EKPO.
*----------------DEFINE MACRO------------------------------*
DEFINE ADD_FIELD.
WA_FIELD-FIELDNAME = &1.
WA_FIELD-REPTEXT_DDIC = &2.
APPEND WA_FIELD TO IT_FIELD.
END-OF-DEFINITION.
*==========================================================*
*
*==========================================================*
DATA: G_REPID TYPE SY-REPID,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV.
*==========================================================*
* TYPES
*==========================================================*
TYPES : BEGIN OF TY_EKPO,
EBELN LIKE EKPO-EBELN,
AEDAT LIKE EKPO-AEDAT,
TXZ01 LIKE EKPO-TXZ01,
MENGE LIKE EKPO-MENGE,
MEINS LIKE EKPO-MEINS,
NETWR LIKE EKPO-NETWR,
END OF TY_EKPO.
*==========================================================*
*
*==========================================================*
DATA: WA_FIELD TYPE SLIS_FIELDCAT_ALV,
IT_FIELD TYPE SLIS_T_FIELDCAT_ALV.
DATA : WA_EKPO TYPE TY_EKPO,
IT_EKPO TYPE STANDARD TABLE OF TY_EKPO. "
*==========================================================*
* ( )
ADD_FIELD 'EBELN' ' '.
ADD_FIELD 'AEDAT' ' '.
ADD_FIELD 'TXZ01' ' '.
ADD_FIELD 'MENGE' ' '.
ADD_FIELD 'MEINS' ' '.
ADD_FIELD 'NETWR' ' '.
*==========================================================*
* SELETION-SCREEN
*==========================================================*
SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME .
SELECT-OPTIONS: S_AEDAT FOR EKPO-AEDAT.
SELECTION-SCREEN END OF BLOCK BLOCK1.
*==========================================================*
* START-OF-SELECTION
*==========================================================*
START-OF-SELECTION.
PERFORM FRM_GET_DATA.
*==========================================================*
* END-OF-SELECTION
*==========================================================*
END-OF-SELECTION.
PERFORM FRM_OUTPUT_ALV.
*&---------------------------------------------------------*
*& Form FRM_GET_DATA
*&---------------------------------------------------------*
*
*----------------------------------------------------------*
FORM FRM_GET_DATA.
SELECT EBELN
AEDAT
TXZ01
MENGE
MEINS
NETWR
INTO TABLE IT_EKPO
FROM EKPO
WHERE AEDAT IN S_AEDAT.
IF SY-SUBRC <> 0.
MESSAGE S208(00) WITH 'NO GET DATA!'.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " FRM_GET_DATA
*
*&---------------------------------------------------------*
*& Form OUT_BY_ALV
*&---------------------------------------------------------*
* ALV
*----------------------------------------------------------*
FORM FRM_OUTPUT_ALV.
G_REPID = SY-REPID.
GS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
GS_LAYOUT-WINDOW_TITLEBAR = TEXT-101. "TITLE
*TEXT-101( ALV )
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
* I_STRUCTURE_NAME = 'EKPO' "
IT_FIELDCAT = IT_FIELD "
IS_LAYOUT = GS_LAYOUT "
I_SAVE = 'A' "
TABLES
T_OUTTAB = IT_EKPO. "
ENDFORM. " FRM_OUTPUT_ALV
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
개인 FLEX 지식 라이브러리 작업 노트[size=large]1、 이 방법은 TileWindows 팝업 창에 있습니다. TitleWindows의 maxWidth와 maxHeight를 지정하지 않으면 최대 값이 화면 전체에 깔립니다. 페이지의minHeigh...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.