分类:
2009-07-28 20:05:07
report z_write_example no standard page heading "屏蔽标准表头
tables:mard,mark spfli.
data:begin of itab occours 0,
end of itab.
data: color(1).
data: p_row type i.
p_row = 0.
selection-screen begin of block b1 with frame title text-001.
selection-screen begin of line.
parameters: r1 radiobutton group rad1.
selection-screen comment 3(31) text-011 for field r1.
parameters: r2 radiobutton group rad1.
selection-screen comment 19(13) text-012 for field r2.
parameters: r3 radiobutton group rad1.
selection-screen comment 35(13) text-013 for field r3.
parameters: r4 radiobutton group rad1.
selection-screen comment 51(13) text-014 for field r4.
parameters: r5 radiobutton group rad1.
selection-screen comment 67(13) text-015 for field r5.
selection-screen end of line.
selection-screen end of block b1.
top-of-page.
perform top_of_page.
(if r1 = 'X'. uline /(79). format color 7.
write: / sy-vline no-gap.
write: (08) '物料号码' centered no-gap,sy-vline no-gap,
write: (40) '物料描述
write: (04) '工厂'
write: (08) '库存地点' centered no-gap,sy-vline no-gap,
write: (13) '库存'
uline / (79).
endif.
)
end-of-page.
perform end_of_page.
(
write:/ sy-vline no=gap.
write: 35 ‘第’,(04) sy-pagno, ‘页’.
write 79 sy-vline no-gap.
uline / (79).
endif.
)
start-of-selection.
select mard-matnr maktx werks lgort labst into corresponding fields of table itab
from mard join makt on mard-matnr =
perform write_itab.
(
if r1 = ‘x’.
write:/ sy-vline no-gap.
write: (08) itab-matnr no-gap,sy-vline no-gap,
write: (40) itab-maktx no-gap,sy-vline no-gap,
write: (04) itab-werks no-gap,sy-vline no-gap,
write: (08) itab-lgort no-gap,sy-vline no-gap,
write: (13) itab-labst no-gap,sy-vline no-gap.
if color = 1.
color = 2.
elseif color = 2.
color = 1.
endif.
P_row = 47 - sy-linno.
at last. "不全不足行数
color = 1.
do p_row times.
if color = 1.
format color 2 intensified on.
elseif color = 2.
format color 2 intesified off.
endif.
write : / sy-vline no-gap,
write: 10 sy-vlien no-gap,
write: 51 sy-vlien no-gap,
write: 56 sy-vlien no-gap,
write: 65 sy-vlien no-gap,
write: 79 sy-vlien no-gap.
if color = 1.
color = 2.
elseif color = 2.
color = 1.
endif.
enddo.
reserve 53 lines.
endat.
endloop.
endif.
)
perform writet_format1.
(
data text type string value '012345679ABCDEF',
uline / (79).
write:/sy-vline no-gap.
format color 7 intesified on.
write: (78)‘the exaple : write {[AT][/][pos][(len/*/**)]}dobj' centered.
format color off.
write: 79 sy-vline no-gap.
uline/(79).
write:
write text.
write: 79 sy-vline no-gap.
uline/(79).
write:
write 5(10) text.
write at col(len) text.
write: 79 sy-vline no-gap.
uline/(79).
skip.
uline/(79).
write:
format color 7 intesified on.
write: (78) 'the exaple:quickinof info' centered.
format color offf.
write: 79 sy-vline no-gap.
uline/(79).
write: / sy-vline no-gap.
write: (20) sy-datum quickno 'date of list creation',
write: 79
uline / (79).
endif.
)
perform
perform write_ext_format_options.
perform write_list_elements.
"include z_write_example_top_of_pagf01.
"include z_write_example_write_itabf01.
"include z_write_example_formf01.
"include z_write_example_write_int_fo1.
"include z_write_example_write_EXT_fo1."include z_write_example_write_lISTFo1.