- 浏览: 280245 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
sunlin:
水文 其他erp就没这样的问题? 不能单方面拿sap说 ...
【转】揭秘SAP在华真相:天价收费与用户之灾 -
zjut_xiongfeng:
用当前日期所在月的第一天,比如2010-7-30的当前月第一天 ...
pb函数库之日期、时间函数 -
550627069:
你好!问下 在PB中显示当前日期的前一个月 应该怎么做?求教
pb函数库之日期、时间函数
*&---------------------------------------------------------------------*
*& program: ZSD_VBAK *
*& to read archive data for sd documents *
*& - va25 *
*& - va05 *
*&---------------------------------------------------------------------*
*& programer: gallen.cong *
*& 2007/06/12 *
*& *
*&---------------------------------------------------------------------*
REPORT ZSD_VBAK NO STANDARD PAGE HEADING MESSAGE-ID SY LINE-SIZE 171.
TABLES: VBAK,VBAP.
TYPE-POOLS: RSDS,SLIS.
*BEGIN OF ADD BY J.SHEN 2008/5/16PM
DEFINE ADD_FIELD.
WA_FIELD-COL_POS = &1.
WA_FIELD-FIELDNAME = &2.
WA_FIELD-REPTEXT_DDIC = &3.
APPEND WA_FIELD TO IT_FIELD.
END-OF-DEFINITION.
DATA: GS_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA: IT_FIELD TYPE SLIS_T_FIELDCAT_ALV.
DATA: IT_SORT TYPE SLIS_T_SORTINFO_ALV.
DATA: G_REPID TYPE SY-REPID.
DATA: WA_FIELD TYPE SLIS_FIELDCAT_ALV.
DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
DATA: IT_EVENTS TYPE SLIS_T_EVENT.
DATA: WA_EVENTS LIKE LINE OF IT_EVENTS.
DATA: IT_LIST_COMMENTS TYPE SLIS_T_LISTHEADER.
DATA: WA_LIST_COMMENTS LIKE LINE OF IT_LIST_COMMENTS.
*END OF ADD BY J.SHEN 2008/5/16PM
DATA: T_ARPTR TYPE TABLE OF AIND_ARKEY.
*DATA: TEMP_TDLINE LIKE TLINE-TDLINE.
DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
LT_VBAP LIKE VBAP OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF LT_VBAK OCCURS 0,
ARCHIVEKEY TYPE ARKEY,
ARCHIVEOFS TYPE ADMI_OFFST,
SEL TYPE C,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
VKORG LIKE VBAK-VKORG,
VTWEG LIKE VBAK-VTWEG,
VKBUR LIKE VBAK-VKBUR,
VKGRP LIKE VBAK-VKGRP,
AUART LIKE VBAK-AUART,
PSTYV LIKE VBAP-PSTYV,
VBTYP LIKE VBAK-VBTYP,
TRVOG LIKE VBAK-TRVOG,
AUDAT LIKE VBAK-AUDAT,
ERDAT LIKE VBAK-ERDAT,
KUNNR LIKE VBAK-KUNNR,
LAND1 LIKE VBPA-LAND1,
BZIRK LIKE VBKD-BZIRK,
BSTNK LIKE VBAK-BSTNK,
MATNR LIKE VBAP-MATNR,
ARKTX LIKE VBAP-ARKTX,
SPART LIKE VBAP-SPART,
MATKL LIKE VBAP-MATKL,
MVGR1 LIKE VBAP-MVGR1,
MVGR2 LIKE VBAP-MVGR2,
PRODH LIKE VBAP-PRODH,
KWMENG LIKE VBAP-KWMENG,
VRKME LIKE VBAP-VRKME,
MEINS LIKE VBAP-MEINS,
NETWR LIKE VBAP-NETWR,
MWSBP LIKE VBAP-MWSBP,
WAERK LIKE VBAP-WAERK,
ERNAM LIKE VBAK-ERNAM,
AUGRU LIKE VBAK-AUGRU,
ABRVW LIKE VBAK-ABRVW,
GBSTA LIKE VBUP-GBSTA,
LFSTA LIKE VBUP-LFSTA,
ERZET LIKE VBAP-ERZET,
END OF LT_VBAK.
DATA:TEM_TLINE LIKE TLINE OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:
S_VBELN FOR VBAP-VBELN,
S_POSNR FOR VBAP-POSNR,
S_VKORG FOR VBAK-VKORG,
S_VTWEG FOR VBAK-VTWEG,
S_VKBUR FOR VBAK-VKBUR,
S_VKGRP FOR VBAK-VKGRP,
S_AUART FOR VBAK-AUART,
S_VBTYP FOR VBAK-VBTYP,
*STARTING ADD BY G.WEI 2009/05/19
S_KUNNR FOR VBAK-KUNNR,
S_MATNR FOR VBAP-MATNR,
S_BSTNK FOR VBAK-BSTNK,
S_AUDAT FOR VBAK-AUDAT,
S_SPART FOR VBAK-SPART,
S_ERNAM FOR VBAK-ERNAM.
*ENDING ADD BY G.WEI 2009/05/19
SELECTION-SCREEN END OF BLOCK BLK1.
*STARTING DELETE BY J.SHEN 2008/5/16PM
*AT LINE-SELECTION.
*PERFORM STXL_GET_TXT.
*ENDING DELETE BY J.SHEN 2008/5/16PM
START-OF-SELECTION.
*从归档文件中查询会计凭证
PERFORM GETDATA_FROM_AS_VBAK TABLES S_VBELN S_POSNR
S_VKORG S_VTWEG
S_VKBUR S_AUART
S_VBTYP
*STARTING ADD BY G.WEI 2009/05/19
S_KUNNR S_MATNR
S_BSTNK S_AUDAT
S_SPART S_ERNAM
*ENDING ADD BY G.WEI 2009/05/19
T_ARPTR LT_VBAK
USING 'Z_SD_VBAK_003'.
*START OF ADD BY J.SHEN 2008/5/16PM
PERFORM EVENT_BUILD.
PERFORM LAYOUT_BUILD.
PERFORM FIELDS.
END-OF-SELECTION.
*END OF ADD BY J.SHEN 2008/5/16PM
*显示
* PERFORM alv.
IF LT_VBAK[] IS NOT INITIAL.
*BEGIN OF DELETE BY J.SHEN 2008/5/16PM
* PERFORM DISPLAY.
*END OF DELETE BY J.SHEN 2008/5/16PM
*BEGIN OF ADD BY J.SHEN 2008/5/16PM
PERFORM FRM_DISPLAY_ALV.
*END OF ADD BY J.SHEN 2008/5/16PM
ELSE.
MESSAGE '归档数据不存在!' TYPE 'I'.
EXIT.
ENDIF.
*&---------------------------------------------------------------------*
*& Form GETDATA_FROM_AS_VBAK
*&---------------------------------------------------------------------*
FORM GETDATA_FROM_AS_VBAK TABLES P_S_VBELN STRUCTURE S_VBELN
P_S_POSNR STRUCTURE S_POSNR
P_S_VKORG STRUCTURE S_VKORG
P_S_VTWEG STRUCTURE S_VTWEG
P_S_VKBUR STRUCTURE S_VKBUR
P_S_AUART STRUCTURE S_AUART
P_S_VBTYP STRUCTURE S_VBTYP
*STARTING ADD BY G.WEI 2009/05/19
P_S_KUNNR STRUCTURE S_KUNNR
P_S_MATNR STRUCTURE S_MATNR
P_S_BSTNK STRUCTURE S_BSTNK
P_S_AUDAT STRUCTURE S_AUDAT
P_S_SPART STRUCTURE S_SPART
P_S_ERNAM STRUCTURE S_ERNAM
*ENDING ADD BY G.WEI 2009/05/19
T_ARCHPTR STRUCTURE AIND_ARKEY
TEMP_VBAK STRUCTURE LT_VBAK
USING VALUE(V_FIELDCAT) LIKE AIND_STR1-ARCHINDEX.
DATA: LT_FRANGE TYPE RSDS_FRANGE_T,
L_FRANGE TYPE RSDS_FRANGE,
L_RSDSSELOPT LIKE RSDSSELOPT,
LT_ARCHPTR TYPE TABLE OF AIND_ARKEY,
L_PROCESSED TYPE I.
DATA: TMP_VBAK LIKE LT_VBAK OCCURS 0 WITH HEADER LINE.
DATA: L_SUBRC TYPE SY-SUBRC,
L_FIRST TYPE C LENGTH 1.
FIELD-SYMBOLS: <L_ARCHPTR> TYPE AIND_ARKEY.
L_FRANGE-FIELDNAME = 'VBELN'.
LOOP AT P_S_VBELN.
MOVE-CORRESPONDING P_S_VBELN TO L_RSDSSELOPT.
APPEND L_RSDSSELOPT TO L_FRANGE-SELOPT_T.
ENDLOOP.
APPEND L_FRANGE TO LT_FRANGE.
CLEAR L_FRANGE.
L_FRANGE-FIELDNAME = 'POSNR'.
LOOP AT P_S_POSNR.
MOVE-CORRESPONDING P_S_POSNR TO L_RSDSSELOPT.
APPEND L_RSDSSELOPT TO L_FRANGE-SELOPT_T.
ENDLOOP.
APPEND L_FRANGE TO LT_FRANGE.
CLEAR L_FRANGE.
L_FRANGE-FIELDNAME = 'VKORG'.
LOOP AT P_S_VKORG.
MOVE-CORRESPONDING P_S_VKORG TO L_RSDSSELOPT.
APPEND L_RSDSSELOPT TO L_FRANGE-SELOPT_T.
ENDLOOP.
APPEND L_FRANGE TO LT_FRANGE.
* CLEAR L_FRANGE.
* L_FRANGE-FIELDNAME = 'VTWEG'.
* LOOP AT P_S_VTWEG.
* MOVE-CORRESPONDING P_S_VTWEG TO L_RSDSSELOPT.
* APPEND L_RSDSSELOPT TO L_FRANGE-SELOPT_T.
* ENDLOOP.
* APPEND L_FRANGE TO LT_FRANGE.
*
*
* CLEAR L_FRANGE.
* L_FRANGE-FIELDNAME = 'VKBUR'.
* LOOP AT P_S_VKBUR.
* MOVE-CORRESPONDING P_S_VKBUR TO L_RSDSSELOPT.
* APPEND L_RSDSSELOPT TO L_FRANGE-SELOPT_T.
* ENDLOOP.
* APPEND L_FRANGE TO LT_FRANGE.
*
* CLEAR L_FRANGE.
* L_FRANGE-FIELDNAME = 'AUART'.
* LOOP AT P_S_AUART.
* MOVE-CORRESPONDING P_S_AUART TO L_RSDSSELOPT.
* APPEND L_RSDSSELOPT TO L_FRANGE-SELOPT_T.
* ENDLOOP.
* APPEND L_FRANGE TO LT_FRANGE.
*
* CLEAR L_FRANGE.
* L_FRANGE-FIELDNAME = 'VBTYP'.
* LOOP AT P_S_VBTYP.
* MOVE-CORRESPONDING P_S_VBTYP TO L_RSDSSELOPT.
* APPEND L_RSDSSELOPT TO L_FRANGE-SELOPT_T.
* ENDLOOP.
* APPEND L_FRANGE TO LT_FRANGE.
*
*
* CLEAR L_FRANGE.
* L_FRANGE-FIELDNAME = 'KUNNR'.
* LOOP AT P_S_KUNNR.
* MOVE-CORRESPONDING P_S_KUNNR TO L_RSDSSELOPT.
* APPEND L_RSDSSELOPT TO L_FRANGE-SELOPT_T.
* ENDLOOP.
* APPEND L_FRANGE TO LT_FRANGE.
*
* CLEAR L_FRANGE.
* L_FRANGE-FIELDNAME = 'MATNR'.
* LOOP AT P_S_MATNR.
* MOVE-CORRESPONDING P_S_MATNR TO L_RSDSSELOPT.
* APPEND L_RSDSSELOPT TO L_FRANGE-SELOPT_T.
* ENDLOOP.
* APPEND L_FRANGE TO LT_FRANGE.
*
* CLEAR L_FRANGE.
* L_FRANGE-FIELDNAME = 'BSTNK'.
* LOOP AT P_S_BSTNK.
* MOVE-CORRESPONDING P_S_BSTNK TO L_RSDSSELOPT.
* APPEND L_RSDSSELOPT TO L_FRANGE-SELOPT_T.
* ENDLOOP.
* APPEND L_FRANGE TO LT_FRANGE.
*
* CLEAR L_FRANGE.
* L_FRANGE-FIELDNAME = 'AUDAT'.
* LOOP AT P_S_AUDAT.
* MOVE-CORRESPONDING P_S_AUDAT TO L_RSDSSELOPT.
* APPEND L_RSDSSELOPT TO L_FRANGE-SELOPT_T.
* ENDLOOP.
* APPEND L_FRANGE TO LT_FRANGE.
*
* CLEAR L_FRANGE.
* L_FRANGE-FIELDNAME = 'SPART'.
* LOOP AT P_S_SPART.
* MOVE-CORRESPONDING P_S_SPART TO L_RSDSSELOPT.
* APPEND L_RSDSSELOPT TO L_FRANGE-SELOPT_T.
* ENDLOOP.
* APPEND L_FRANGE TO LT_FRANGE.
*
* CLEAR L_FRANGE.
* L_FRANGE-FIELDNAME = 'ERNAM'.
* LOOP AT P_S_ERNAM.
* MOVE-CORRESPONDING P_S_ERNAM TO L_RSDSSELOPT.
* APPEND L_RSDSSELOPT TO L_FRANGE-SELOPT_T.
* ENDLOOP.
* APPEND L_FRANGE TO LT_FRANGE.
CALL FUNCTION 'AS_API_READ'
EXPORTING
I_FIELDCAT = V_FIELDCAT
I_SELECTIONS = LT_FRANGE
IMPORTING
E_RESULT = TEMP_VBAK[]
EXCEPTIONS
NO_INFOSTRUC_FOUND = 0.
ENDFORM. " GETDATA_FROM_AS
*&--------------------------------------------------------------------*
*& Form FIELD_CATALOG
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
* -->COL_HEAD text
* -->TABLE text
* -->FIELD text
* -->OUTPUTLEN text
* -->DO_SUM text
* -->NO_OUT text
* -->JUST text
*---------------------------------------------------------------------*
FORM FIELD_CATALOG USING COL_HEAD
TABLE
FIELD
OUTPUTLEN
DO_SUM
NO_OUT
JUST."#EC CALLED
DATA: TMP_FC TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
TMP_FC-REPTEXT_DDIC = COL_HEAD.
TMP_FC-FIELDNAME = FIELD.
TMP_FC-TABNAME = TABLE.
TMP_FC-OUTPUTLEN = OUTPUTLEN.
TMP_FC-JUST = JUST.
TMP_FC-DO_SUM = DO_SUM.
TMP_FC-NO_OUT = NO_OUT.
APPEND TMP_FC TO FIELDCAT.
ENDFORM. " GETDATA_FROM_AS_VBAK
*&---------------------------------------------------------------------*
*& Form stxl_get_txt
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM STXL_GET_TXT .
DATA: L_HANDLE TYPE SY-TABIX.
DATA: TLINE1 LIKE TLINE OCCURS 0 WITH HEADER LINE.
DATA: TMP_SELECTIONS LIKE THEAD OCCURS 0 WITH HEADER LINE.
DATA:TMP_KEY(8) TYPE C.
CALL FUNCTION 'ARCHIVE_READ_OBJECT'
EXPORTING
OBJECT = 'SD_VBAK'
ARCHIVKEY = LT_VBAK-ARCHIVEKEY
OFFSET = LT_VBAK-ARCHIVEOFS
IMPORTING
ARCHIVE_HANDLE = L_HANDLE
EXCEPTIONS
OTHERS = 42.
IF NOT SY-SUBRC IS INITIAL.
MESSAGE ID SY-MSGID TYPE 'I' NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'SELECT_TEXT'
EXPORTING
ARCHIVE_HANDLE = L_HANDLE
TABLES
SELECTIONS = TMP_SELECTIONS
EXCEPTIONS
WRONG_ACCESS_TO_ARCHIVE = 1
OTHERS = 2.
IF NOT SY-SUBRC IS INITIAL.
MESSAGE '归档文件读取失败!' TYPE 'I'.
EXIT.
ENDIF.
IF TMP_SELECTIONS[] IS INITIAL.
MESSAGE '没有文本可以读取!' TYPE 'I'.
EXIT.
ENDIF.
DATA:TMP_TDNAME LIKE THEAD-TDNAME.
LOOP AT TMP_SELECTIONS.
CONCATENATE LT_VBAK-VBELN LT_VBAK-POSNR INTO TMP_TDNAME.
IF TMP_SELECTIONS-TDNAME = LT_VBAK-VBELN OR TMP_SELECTIONS-TDNAME = TMP_TDNAME.
CONTINUE.
ELSE.
DELETE TMP_SELECTIONS.
ENDIF.
ENDLOOP.
CLEAR:TEM_TLINE,
TEM_TLINE[].
SORT TMP_SELECTIONS BY TDOBJECT TDID.
LOOP AT TMP_SELECTIONS.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = TMP_SELECTIONS-TDID
LANGUAGE = TMP_SELECTIONS-TDSPRAS
NAME = TMP_SELECTIONS-TDNAME
OBJECT = TMP_SELECTIONS-TDOBJECT
ARCHIVE_HANDLE = L_HANDLE
TABLES
LINES = TLINE1.
IF TLINE1 IS NOT INITIAL.
CONCATENATE TMP_SELECTIONS-TDOBJECT TMP_SELECTIONS-TDID INTO TMP_KEY.
CASE TMP_KEY .
WHEN 'VBBK0001'.
TEM_TLINE-TDFORMAT = 'A' .
TEM_TLINE-TDLINE = '表抬头' .
APPEND TEM_TLINE.
WHEN 'VBBK0002'.
TEM_TLINE-TDFORMAT = 'A' .
TEM_TLINE-TDLINE = '表头注释 1' .
APPEND TEM_TLINE.
WHEN 'VBBK0003'.
TEM_TLINE-TDFORMAT = 'A' .
TEM_TLINE-TDLINE = '表头注释 2' .
APPEND TEM_TLINE.
WHEN 'VBBK0010'.
TEM_TLINE-TDFORMAT = 'A' .
TEM_TLINE-TDLINE = '格式补充说明' .
APPEND TEM_TLINE.
WHEN 'VBBK0001'.
TEM_TLINE-TDFORMAT = 'A' .
TEM_TLINE-TDLINE = '表抬头' .
APPEND TEM_TLINE.
WHEN 'VBBP0001'.
TEM_TLINE-TDFORMAT = 'A' .
TEM_TLINE-TDLINE = '物料销售文字' .
APPEND TEM_TLINE.
WHEN 'VBBP0003'.
TEM_TLINE-TDFORMAT = 'A' .
TEM_TLINE-TDLINE = '打包注释' .
APPEND TEM_TLINE.
ENDCASE.
APPEND LINES OF TLINE1 TO TEM_TLINE.
ENDIF.
ENDLOOP.
CALL FUNCTION 'ARCHIVE_CLOSE_FILE'
EXPORTING
ARCHIVE_HANDLE = L_HANDLE.
IF TEM_TLINE[] IS INITIAL.
MESSAGE '长文本不存在!' TYPE 'S'.
EXIT.
ENDIF.
*数据处理
LOOP AT TEM_TLINE.
IF TEM_TLINE-TDFORMAT = 'A' .
WRITE AT /1(90) SY-ULINE.
WRITE: / SY-VLINE, 2(89) TEM_TLINE-TDLINE COLOR 1,90 SY-VLINE .
WRITE AT /1(90) SY-ULINE.
ELSE.
WRITE: / SY-VLINE, 5(85) TEM_TLINE-TDLINE,90 SY-VLINE.
ENDIF.
* WRITE:/ SY-VLINE, 5(85) '浙江正泰电器股份有限公司' CENTERED,90
* SY-VLINE.
* WRITE:/ TEM_TLINE-TDLINE.
ENDLOOP.
WRITE AT /1(90) SY-ULINE.
ENDFORM. " stxl_get_txt
*&---------------------------------------------------------------------*
*& Form DISPLAY
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM DISPLAY .
FORMAT COLOR COL_HEADING.
WRITE AT /1(171) SY-ULINE.
WRITE:/ SY-VLINE, 2 TEXT-002,9 SY-VLINE,
10(10) TEXT-003,21 SY-VLINE,
22(18) TEXT-004,41 SY-VLINE,
42(8) TEXT-005,51 SY-VLINE,
52(4) TEXT-006,61 SY-VLINE,
62(10) TEXT-014,73 SY-VLINE,
74(15) TEXT-016,90 SY-VLINE,
91(15) TEXT-015,107 SY-VLINE,
108(8) TEXT-007,117 SY-VLINE,
118(2) TEXT-008,121 SY-VLINE,
122(4) TEXT-009,127 SY-VLINE,
128(1) TEXT-010,130 SY-VLINE,
131(10) TEXT-011,142 SY-VLINE,
143(10) TEXT-012,154 SY-VLINE,
155(15) TEXT-018,171 SY-VLINE.
WRITE AT /1(171) SY-ULINE.
LOOP AT LT_VBAK.
FORMAT COLOR COL_NORMAL.
WRITE: / SY-VLINE,2 LT_VBAK-POSNR,9 SY-VLINE,
10(10) LT_VBAK-VBELN,21 SY-VLINE,
22(18) LT_VBAK-MATNR,41 SY-VLINE,
42(8) LT_VBAK-VKORG,51 SY-VLINE,
52(4) LT_VBAK-VKBUR,61 SY-VLINE,
62(10) LT_VBAK-KUNNR,73 SY-VLINE,
74(15) LT_VBAK-KWMENG,90 SY-VLINE,
91(15) LT_VBAK-NETWR,107 SY-VLINE,
108(8) LT_VBAK-ERNAM,117 SY-VLINE,
118(2) LT_VBAK-VTWEG,121 SY-VLINE,
122(4) LT_VBAK-AUART,127 SY-VLINE,
128(1) LT_VBAK-VBTYP,130 SY-VLINE,
131(10) LT_VBAK-AUDAT,142 SY-VLINE,
143(10) LT_VBAK-ERDAT,154 SY-VLINE,
155(15) LT_VBAK-MWSBP,171 SY-VLINE.
HIDE:LT_VBAK-VBELN,
LT_VBAK-POSNR,
LT_VBAK-ARCHIVEKEY,
LT_VBAK-ARCHIVEOFS.
ENDLOOP.
WRITE AT /1(171) SY-ULINE.
ENDFORM. " DISPLAY
*&---------------------------------------------------------------------*
*& Form FRM_DISPLAY_ALV
*&---------------------------------------------------------------------*
* Display ALV
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM FRM_DISPLAY_ALV .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
IT_FIELDCAT = IT_FIELD
IS_LAYOUT = GS_LAYOUT
IT_EVENTS = IT_EVENTS
* IT_SORT = IT_SORT
I_SAVE = 'A'
TABLES
T_OUTTAB = LT_VBAK
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM. " FRM_DISPLAY_ALV
*&---------------------------------------------------------------------*
*& Form LAYOUT_BUILD
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM LAYOUT_BUILD .
G_REPID = SY-REPID.
GS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
GS_LAYOUT-BOX_FIELDNAME = 'SEL'.
GS_LAYOUT-ZEBRA = 'X'.
GS_LAYOUT-DETAIL_POPUP = 'X'.
GS_LAYOUT-NO_VLINE = ' '.
GS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
GS_LAYOUT-DETAIL_INITIAL_LINES = 'X'.
GS_LAYOUT-DETAIL_TITLEBAR = '详细内容'.
**********************小计***************************
* LS_SORT-FIELDNAME = 'VBELN'.
* LS_SORT-SPOS = 1.
* LS_SORT-UP = 'X'.
* LS_SORT-SUBTOT = 'X'.
* APPEND LS_SORT TO IT_SORT.
ENDFORM. " LAYOUT_BUILD
*&---------------------------------------------------------------------*
*& Form FIELDS
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM FIELDS .
* ADD_FIELD '1' 'POSNR' TEXT-002.
* ADD_FIELD '2' 'VBELN' TEXT-003.
* ADD_FIELD '3' 'MATNR' TEXT-004.
* ADD_FIELD '4' 'VKORG' TEXT-005.
* ADD_FIELD '5' 'VKBUR' TEXT-006.
* ADD_FIELD '6' 'KUNNR' TEXT-013.
* ADD_FIELD '7' 'KWMENG' TEXT-014.
* ADD_FIELD '8' 'NETWR' TEXT-016.
* ADD_FIELD '9' 'ERNAM' TEXT-015.
* ADD_FIELD '10' 'VTWEG' TEXT-007.
* ADD_FIELD '11' 'AUART' TEXT-008.
* ADD_FIELD '12' 'VBTYP' TEXT-010.
* ADD_FIELD '13' 'PSTYV' TEXT-009.
* ADD_FIELD '13' 'AUDAT' TEXT-011.
* ADD_FIELD '14' 'ERDAT' TEXT-012.
* ADD_FIELD '15' 'MWSBP' TEXT-018.
** BEGING OF ADD BY W.GAO 2008/05/19PM
* ADD_FIELD '16' 'ARKTX' TEXT-019.
* ADD_FIELD '17' 'GBSTA' TEXT-020.
* ADD_FIELD '18' 'LFSTA' TEXT-021.
** END OF ADD BY W.GAO 2008/05/19PM
*BEGIN OF MODIFY BY W.GAO 2008/05/19PM
ADD_FIELD '1' 'AUDAT' TEXT-011.
ADD_FIELD '2' 'AUART' TEXT-008.
ADD_FIELD '3' 'VBELN' TEXT-003.
ADD_FIELD '4' 'POSNR' TEXT-002.
ADD_FIELD '5' 'KUNNR' TEXT-013.
ADD_FIELD '6' 'ARKTX' TEXT-019.
ADD_FIELD '7' 'MATNR' TEXT-004.
ADD_FIELD '8' 'KWMENG' TEXT-014.
ADD_FIELD '9' 'NETWR' TEXT-016.
ADD_FIELD '10' 'GBSTA' TEXT-020.
ADD_FIELD '11' 'LFSTA' TEXT-021.
ADD_FIELD '12' 'ERNAM' TEXT-015.
ADD_FIELD '13' 'VKBUR' TEXT-006.
ADD_FIELD '14' 'ERZET' TEXT-022.
* ADD_FIELD '14' 'VTWEG' TEXT-007.
* ADD_FIELD '15' 'VKORG' TEXT-005.
* ADD_FIELD '16' 'VBTYP' TEXT-010.
* ADD_FIELD '17' 'PSTYV' TEXT-009.
* ADD_FIELD '18' 'ERDAT' TEXT-012.
* ADD_FIELD '19' 'MWSBP' TEXT-018.
*END OF MODIFY BY W.GAO 2008/05/19
ENDFORM. " FIELDS
*&---------------------------------------------------------------------*
*& Form EVENT_BUILD
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM EVENT_BUILD .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = IT_EVENTS.
READ TABLE IT_EVENTS
WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO WA_EVENTS.
IF SY-SUBRC = 0.
MOVE 'ALV_TOP_OF_PAGE' TO WA_EVENTS-FORM.
MODIFY IT_EVENTS FROM WA_EVENTS INDEX SY-TABIX.
ENDIF.
ENDFORM. " EVENT_BUILD
*BEGIN OF ADD BY J.SHEN 2008/5/16PM
*&---------------------------------------------------------------------*
*& Form ALV_TOP_OF_PAGE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM ALV_TOP_OF_PAGE .
CLEAR IT_LIST_COMMENTS.
WA_LIST_COMMENTS-TYP = 'H'.
WA_LIST_COMMENTS-KEY = ''.
WA_LIST_COMMENTS-INFO = '销售订单清单'.
APPEND WA_LIST_COMMENTS TO IT_LIST_COMMENTS.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LIST_COMMENTS
I_LOGO = 'PUDGE'
.
ENDFORM. " ALV_TOP_OF_PAGE
*END OF ADD BY J.SHEN 2008/5/16PM
http://www.thespot4sap.com/SAP_Data_Archiving.pdf
相关推荐
5. UPDATES_KEEP_THIS_FILE_IN_THE_ARCHIEVE_NULLERS.TXT:这可能是更新日志文件,列出系统的更新和改进。 6. WAP之家资源站.COM.url、WAP之家.COM.url:这些可能是网站链接,指向与WAP相关的资源站点。 7. admin:...
自述文件 该自述文件通常会记录启动和运行应用程序所需的所有步骤。 您可能要讲的内容: Ruby版本 系统依赖 配置 数据库创建 数据库初始化 如何运行测试套件 服务(作业队列,缓存服务器,搜索引擎等) ...
根据给定文件的信息,我们可以提取出以下IT知识点: 1. 横河电机(Yokogawa Electric Corporation):横河电机是一家知名的日本企业,专注于自动化控制系统、测试测量以及工业设备的制造与销售。...
A simple program to display the System Date using Java servlets. The source code for the java and xml files are included in the zip archieve
**Open Language Archives Community (OLAC)** 是一个致力于促进全球语言资源的发现、访问和共享的国际组织。这个社区的核心目标是通过制定标准和最佳实践,建立一个统一的、互操作的语言资源数字存档网络,从而形成...
CSerializable类和Archieve类是实现这一功能的关键。 7. **数据库访问**:MFC包含了ODBC(Open Database Connectivity)支持,允许应用程序通过ODBC接口连接多种数据库。CDatabase和CRecordset类是进行数据库操作的...
- **数据库安装与配置**:正确规划物理数据库文件的布局,例如将Redolog files、Archieve files与表、索引分开存储在不同的磁盘上,以减少I/O竞争。 - **数据库空间及对象配置**:合理配置数据库及其对象的成长...
【描述】"Flash Projector Archieve"可能是一个用于播放或管理Flash内容的工具,类似于Flash Player,但专门用于存储和归档Flash项目。由于描述中提到了"Windows、Linux 和 Macintosh 平台",这表明该软件是跨平台的...
WayBackArchiver 一键将所有打开的标签页存档到chrome中,以返回计算机! 该代码非常轻巧(小于1 MB)。 安装 ... 现在,只需打开要存档的选项卡(按Control +单击即可在新选项卡中打开链接),然后单击“ W”图标。