Chinaunix首页 | 论坛 | 博客
  • 博客访问: 153544
  • 博文数量: 72
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 745
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-15 14:48
文章分类

全部博文(72)

文章存档

2010年(25)

2009年(47)

我的朋友

分类:

2009-07-28 20:05:07

report z_write_example no standard page heading "屏蔽标准表头

                       line-count 50(3)    "页行数(页尾行数)

                       line-size 120" 页宽

tables:mard,mark spfli.

data:begin of itab occours 0,

     matnr like mard-matnr,

     maktx like makt-maktx,

     werks like mark-werks,

     lgort like mard-lgort,

     labst like mard-labst,

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) '物料描述  centered no-gap,sy-vline no-gap,

write: (04) '工厂'     centered no-gap,sy-vline no-gap,

write: (08) '库存地点' centered no-gap,sy-vline no-gap,

write: (13) '库存'     centered no-gap,sy-vline no-gap.

uline / (79).

endif.

)

end-of-page.

perform end_of_page.

(

 if r1 = 'X'.

  uline / (79).

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 = makt-matnr.

perform write_itab.

(

if r1 = ‘x’.

  color = 1.

  loop at itab.

  if color = 1.

  format color 2 intesified on.

  elseif color = 2.

   format color 2 intesified off.

  endif.

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.

(

 if r2 = 'x'.

data text type string value '012345679ABCDEF',

     col type i value 25,

     len type i value 5.

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:  sy-vline no-gap.

write text.

write: 79 sy-vline no-gap.

uline/(79).

write:  sy-vline no-gap.

write 5(10) text.

write at col(len) text.

write: 79 sy-vline no-gap.

uline/(79).

skip.

uline/(79).

write:  sy-vline no-gap.

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',

       (8) sy-uzeit quickno ' time of list creation'.

write: 79  sy-vline no-gap.

uline / (79).

endif.

)

perform write_int_format_options.

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.

阅读(2283) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~