*&---------------------------------------------------------------------*
*& Report ZTEST_GRID *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT ZTEST_GRID
NO STANDARD PAGE HEADING
LINE-SIZE 50
LINE-COUNT 65.
TABLES MARA.
DATA: choice(1) TYPE C,
NUM1 TYPE I.
data : begin of itab occurs 0,
matnr like mara-matnr,
meins like mara-meins,
end of itab.
START-OF-SELECTION.
SKIP.
ULINE .
write : 10 '在表格内双击屏蔽(选择一项或多选项)' centered .
uline .
uline .
WRITE: / SY-VLINE,(15) '物料编号', SY-VLINE,(15) '基本单位',sy-vline ,(10) '选择'centered,SY-VLINE .
uline.
*selection-screen begin of block b1 with frame title text-001.
* parameters : p_matnr like mara-matnr.
*selection-screen end of block b1.
*
*SELECT * FROM MARA into corresponding fields of table itab where matnr = p_matnr.
*sort itab by matnr.
**DELETE ADJACENT DUPLICATES FROM ITAB COMPARING matnr .
*loop at itab.
* HIDE: itab-matnr.
* HIDE: itab-meins.
* WRITE: / SY-VLINE,(15) itab-matnr, SY-VLINE,(15) itab-meins ,SY-VLINE, 44 SELA AS CHECKBOX,(3)'',SY-VLINE.
* HIDE:SELA.
* uline.
*endloop.
SELECT * FROM MARA.
WRITE: / SY-VLINE,(15) mara-matnr, SY-VLINE,(15) mara-meins ,SY-VLINE, 44 choice AS CHECKBOX,(3)'',SY-VLINE.
hide : mara-matnr.
hide : mara-meins.
hide : choice.
uline.
endselect.
END-OF-SELECTION.
NUM1 = SY-LINNO - 1.
AT LINE-SELECTION.
IF SY-LSIND = 1.
DO NUM1 TIMES.
READ LINE SY-INDEX FIELD VALUE choice.
IF choice = 'X'.
WRITE: / mara-MATNR ,mara-MEINS.
ENDIF.
ENDDO.
ENDIF.
阅读(1696) | 评论(1) | 转发(0) |